SDK for QS pda 3505 - printing

i have purchase a QS pda 3505 android device which has a scanner and a thermal printer, my problem is i need the sdk and also the codes that will help me print through the printer.

Late answer but you can get the SDK and example files from http://www.qsprinter.com/download.html
Direct link grabbed from the above site:
http://www.qsprinter.com/ufile/75040aed8bd95d668ab0cc5cb5042f4c.7z
You will get android project source code which you can import into Android Studio.
Example for accessing printer:
    // first declare `printerClass`
    Public static PrinterClassSerialPort printerClass=null;
then onResume:
    printerClass=new PrinterClassSerialPort(new Handler());
    printerClass.open();
printing some text:
    printerClass.printText(str);
There is also function for printing Bitmaps using printerClass.printImage(bitmap)
The above code was not tested and taken from the above website's PDF document about the JAVA API which can be found at http://www.qsprinter.com/ufile/adb6bd0043d705d50363d2bb04dbac24.pdf

Related

Multiple Target named 'X' in: '<MyFramework>', '<otherDependancyFramework>'; consider using the `moduleAliases` parameter in manifest

I am working on a framework/SPM which our client will use in their app. In our framework/SPM we use one XCFramework as dependancy eg, X
Our client App may have some other dependancy/SPM, lets say one of those also used X in their frameworkSPM.
 
Error: 
multiple targets named 'X' in: '',
''; consider using the moduleAliases
parameter in manifest to provide unique names
 
Not very sure of moduleAliases.
 
if you are going further, This link explains same
https://github.com/apple/swift-evolution/blob/main/proposals/0339-module-aliasing-for-disambiguation.md
After some research I found that Apple has come with this concept recently. (Swift 5.7)

HighCharts Custom maps not working on react

I am building a web app on React Js and trying too build a custom map of floors of building. I followed the article on https://www.highcharts.com/docs/maps/create-custom-maps and created an application using HTML CSS and JavaScript,https://jsfiddle.net/hop9cqxj/92/ however I want it inside of ReactJS. Whenever I paste the map options into the React JS variable. I get the error below:
Error
Highcharts error #17: www.highcharts.com/errors/17/?missingModuleFor=map
The demo work's link is here: https://codesandbox.io/s/inspiring-sunset-o3pf92
missingModuleFor: map
You need to use Highmaps source code and mapChart chart constructor type.
import Highcharts from "highcharts/highmaps";
import HighchartsReact from "highcharts-react-official";
import React from "react";
const option2 = {...};
export default function DeltaSecond() {
return (
<>
<HighchartsReact
highcharts={Highcharts}
options={option2}
constructorType="mapChart"
></HighchartsReact>
</>
);
}
Also, I have noticed that Highcharts doesn't work in StrictMode from the newest React, so you can report a potential bug on highcharts-react github: https://github.com/highcharts/highcharts-react
Live demo: https://codesandbox.io/s/nifty-satoshi-xxt-xxtkp9?file=/src/components/buildings/Delta/delta2nd.js
Docs: https://www.npmjs.com/package/highcharts-react-official#options-details

My angular 4 + mvc web app not working in Internet explorer.

I have developed a application with angular 4 and mvc but I am facing issue with browser. It perfectly works for the chrome, firefox and any other browser except Internet explorer. Can anyone suggest me possible ways to fix this issue?
In your root source folder there is a file called "polyfills.ts". This contains some commented out lines for libraries that are required for Angular to work correctly in Internet Explorer.
Open the file in your editor and uncomment the lines that are related to IE9, IE10 and IE11 (they are near the top) and, rebuild and it should work :)
In your angular project, you have a polyfills.ts file in that uncomment the following lines,
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

Filter blur CSS property from Dart

Dart filter blur doesn't work with Safari, Chrome... Why ?
<h1>This text will blur in Firefox, not in Webkit</h1>
import 'dart:html';
import 'dart:core';
main() {
document.querySelector('h1').style.filter = 'blur(5px)';
}
Looks like Dart doesn't replace filter with -webkit-filter in Chrome but it should. There are plans to support unprefixed filter in Chrome (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/R2gCfHjNgKs) but it's not clear when this will ship. It might be worth creating a bug report in http://github.com/dart-lang/sdk/issues/new so the prefix gets added automatically for Chrome.

Testng, Emma, Cobertura, coverage and JDK 7 result in ClassFormatError and VerifyError

I have switched to the newest JDK 7 and I am having problems with running testng unit test on byte code that is fiddled by emma coverage tool. None of my test cases are run correctly and for most of them I am receiving such errors.
java.lang.ClassFormatError: Illegal local variable table length 10 in method measurement.meter.AbstractSerialPortMeter.<init>(Lmeasurement/meter/SerialPort;)V at measurement.meter.Elc3133aTest.setUp(Elc3133aTest.java:42)
I have found an article here JSR 292 Goodness Fast Code Coverage Tool Less 10k,
which is saying that "JSR 292 introduces a new bytecode instruction invokedynamic but also several new kind of constant pool constants. Which means that most of the tools that parse bytecodes like ASM, BCEL, findbugs or EMMA will need to be updated to be java 7 compatible."
Checked Emma homepage, but it looks like it has not been updated for a long long time.
Has anybody solved a similar problem?
I have also tried with Cobertura. It looks to work a bit better but I am getting a lot of exceptions of type VerifyError.
java.lang.VerifyError: Expecting a stackmap frame at branch target 85 in method measurement.meter.AbstractSerialPortMeter.close()V at offset 26
at measurement.meter.AbstractSerialPortMeterTest.setUp(AbstractSerialPortMeterTest.java:27)
I had same problem using maven cobertura plugin. All tests failed when run from cobertura:report. But all tests succeeded when run directly from surefire plugin. As some of you already said the problem is that coberture byte code instrumentation of is not compatible with JDK7.
You can see here http://vikashazrati.wordpress.com/2011/10/09/quicktip-verifyerror-with-jdk-7/ that the exception is related to the "new type checker with StackMapTable attributes" (see: -X:+UseSplitVerifier JVM option in http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html).
So my solution is to configure surefire-plugin to always execute the tests with JVM arg "-XX:-UseSplitVerifier. It works well with and without cobertura instrumentation.
My surefire configuration in maven:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<argLine>-XX:-UseSplitVerifier</argLine>
</configuration>
</plugin>
I had the same issue.
Fortunately beta works with JDK 7.
Update site link: http://download.eclipselab.org/eclemma/beta/2.0.0/update/
This link should be used in Eclipse:
Help -> Install new software... -> Add...
Rest should be easy ;)
I got Gradle 1.0M9, Java 7 and EMMA 2.1 working with the patches suggested here: using the jvm argument.
Details here...
http://marcellodesales.wordpress.com/2012/04/03/running-emma-code-test-coverage-with-java-7-and-gradle-1-0m9/?preview=true&preview_id=179&preview_nonce=261e892908
configurations{
emma
}
dependencies {
// EMMS Code Coverage
emma "emma:emma:2.1.5320"
emma "emma:emma_ant:2.1.5320"
...
testCompile group: 'junit', name: 'junit', version: '4.9'
}
test {
// add EMMA related JVM args to our tests
   jvmArgs "-XX:-UseSplitVerifier", "-Demma.coverage.out.file=$buildDir/tmp/emma/metadata.emma", "-Demma.coverage.out.merge=true"
doFirst {
      println "Instrumenting the classes at " + sourceSets.main.output.classesDir.absolutePath
      // define the custom EMMA ant tasks
      ant.taskdef( resource:"emma_ant.properties", classpath: configurations.emma.asPath)
ant.path(id:"run.classpath") {
         pathelement(location:sourceSets.main.output.classesDir.absolutePath)
      }
      def emmaInstDir = new File(sourceSets.main.output.classesDir.parentFile.parentFile, "tmp/emma/instr")
      emmaInstDir.mkdirs()
      println "Creating $emmaInstDir to instrument from " +       sourceSets.main.output.classesDir.absolutePath
      // instruct our compiled classes and store them at $buildDir/tmp/emma/instr
      ant.emma(enabled: 'true', verbosity:'info'){
         instr(merge:"true", destdir: emmaInstDir.absolutePath, instrpathref:"run.classpath",
               metadatafile: new File(emmaInstDir, '/metadata.emma').absolutePath) {
            instrpath {
            fileset(dir:sourceSets.main.output.classesDir.absolutePath, includes:"**/*.class")
            }
         }
      }
      setClasspath(files("$buildDir/tmp/emma/instr") + configurations.emma +    getClasspath())
   }
// The report should be generated directly after the tests are done.
   // We create three types (txt, html, xml) of reports here. Running your build script now should
   // result in output like that:
   doLast {
      def srcDir = sourceSets.main.java.srcDirs.toArray()[0]
      println "Creating test coverage reports for classes " + srcDir
      def emmaInstDir = new File(sourceSets.main.output.classesDir.parentFile.parentFile, "tmp/emma")
      ant.emma(enabled:"true"){
         new File("$buildDir/reports/emma").mkdirs()
         report(sourcepath: srcDir){
            fileset(dir: emmaInstDir.absolutePath){
               include(name:"**/*.emma")
            }
            txt(outfile:"$buildDir/reports/emma/coverage.txt")
            html(outfile:"$buildDir/reports/emma/coverage.html")
            xml(outfile:"$buildDir/reports/emma/coverage.xml")
         }
      }
      println "Test coverage reports available at $buildDir/reports/emma."
      println "txt: $buildDir/reports/emma/coverage.txt"
      println "Test $buildDir/reports/emma/coverage.html"
      println "Test $buildDir/reports/emma/coverage.xml"
}
}
Running "gradle test" gives the following:
marcello#hawaii:/u1/development/workspaces/open-source/interviews/vmware$ gradle test
:compileJava
:processResources UP-TO-DATE
:classes
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test
Instrumenting the classes at /u1/development/workspaces/open-source/interviews/vmware/build/classes/main
Creating /u1/development/workspaces/open-source/interviews/vmware/build/tmp/emma/instr to instrument from /u1/development/workspaces/open-source/interviews/vmware/build/classes/main
Creating test coverage reports for classes /u1/development/workspaces/open-source/interviews/vmware/src/main/java
Test coverage reports available at /u1/development/workspaces/open-source/interviews/vmware/build/reports/emma.
txt: /u1/development/workspaces/open-source/interviews/vmware/build/reports/emma/coverage.txt
Test /u1/development/workspaces/open-source/interviews/vmware/build/reports/emma/coverage.html
Test /u1/development/workspaces/open-source/interviews/vmware/build/reports/emma/coverage.xml
BUILD SUCCESSFUL
Emma works if you do not use new language features (like try-with-resources, etc.). You can use Java 7 using new libraries (Paths, DirectoryStream, etc.).
I know this would be not a solution to your problem, but if you want to only check "how JDK 7 performs" it may work...
I was having this problem. Upgrading to 2.0.1.201112281951 using the Eclipse marketplace worked for me.
IntelliJ IDEA 11's internal coverage tool works fine for my project using try-with-resources, diamond operator but we are not using invokedynamic. I think the coverage tool is not included in the community edition, ultimate only.
I have yet to try jacoco - it's where most of emma's former developers seem to have gone.
The Java 8+ equivalent of the answer by Pedro Ballesteros is:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<argLine>-noverify</argLine>
</configuration>
</plugin>
(Tweak the version number to match the version of Surefire you are using.)

Resources