what's wrong with this javacard .cap file? - applet

I have a fresh java card and two .cap file!
one of them successfully installed on the card (and deleted successfully!) and the another one failed to upload and install. I put the output of "GPJ" in the below. what's wrong with the .cap file? and how I can fix it?
I made cap file with Eclipse and its source code is in this link.
and this is output of 'gpj'
thank you.

there is a wide range of possiblities for this error, as smartcard return codes are not vvery specific, my thoughts would be:
check for correct JavaCard Version(cap file must be compiled for the version supported by your card)
your code uses an api call that is nit supported by your card(its manufacturers decision which algorithms he supports or not)
try read Global Platform Specification for these detailed questions

Related

Multiple _PublishedWebsites Folders

I am using VS Code on Manjaro and have setup a solution with 2 projects, a webapp and a test project.
Each time I do a build it appears to generate a new _PublishedWebsites folder with NetCoreApp underneath it. I am surprised that nobody else seems to have encountered this issue. Can anyone tell me why this is happening and how to fix it?
Many thanks.
You should check your csproj file, particularly PublishDir element which is your specified location for publishing output files and change that if your like.
However, I think this is required behavior for .net core support in app harbor, find more details in the support webpage over here.

SDL.h "Program file does not exist"

I'm pretty new to c++ (and programming in general) and I'm currently trying to inlcude the "SDL.h" header into a c++ project in Eclipse (I use minGW btw). I've provided the project with the paths to the the header files and the library of SDL. However, whenver I specifically include "SDL.h" and the build then project I get the following Message:
" 'Launching SDL Basic.exe' has encountered a problem. Program file does not exist. "
I'm pretty sure that this has to do with the fact that no .exe file is generated whenever I build the project with SDL.h included. What I don't get is why this happens. When I include some other SDL header, such as SDL_assert, this is not a problem. Then the .exe file is generated just as usual and the program runs just as it should.[enter image description here][1]
http://i.stack.imgur.com/cdV8U.jpg How it looks when SDL.h is included.
http://i.stack.imgur.com/MW7PX.jpg How it looks when something else from SDL is included.
I seem to have fixed the problem. Whenever I ran the program the console window outout " undefined reference to 'Winmain#16' ". So I googled on it and found out that SDL defines its own main function in SDL_main.h, which in total would give me two main functions. To prevent SDL from defining its own main function I had to define the macro SDL_MAIN_HANDLED before I included SDL.h, and look, it worked:
http://i.stack.imgur.com/mNOOE.jpg
If someone can explain this in more detail I'd really appreciate it.
I did a little research and it looks like the undefined reference to WinMain#16 is because SDL is automatically creating a Windows entry point for your application, but you haven't provided the necessary libraries to link in the SDL implementation of that entry point. However, if you intend to use the SDL functionality, you really do need that entry point, because it performs several important initialization steps necessary to leverage the SDL features that you presumably want to use.
Defining SDL_MAIN_HANDLED is a mechanism that would allow you to provide your own Windows entry point (i.e.: WinMain), but that is a more complicated approach (albeit more flexible). This only solves your problem because it happens to prevent "main" from being redefined to "SDL_main" which in turn means that your .cpp file no longer even requires any of the SDL libraries. So it compiles and links, but you won't have any of the SDL functionality you're looking for.
You need to link in the appropriate libraries. See here - it provides some info that might help.

What are these errors in BlackBerry 10 Mometics while trying to build LAME?

I'm trying to build with the LAME files but I'm getting these errors on the machine.h file
What's going on?
Short answer : your defines are not what they are supposed to be. The BB10 SDK provides stdlib.h and string.h so you should either :
add a #define STDC_HEADERS 1 somewhere in the include path (inside version.h maybe, because it's seems to be included by everyone else)
add DEFINES += STDC_HEADERS to your .pro file.
You are trying to build your library inside Momentics.
That's usually the fastest way to go.
The issue is that you are skipping the whole configure part of Lame compilation, which was supposed to gather insight about the system you're trying to compile on by trial and error.
I haven't looked at Lame specificaly, but usually configure either creates an header file with all the right defines or add them in the Makefile it creates as arguments to the compiler.
Momentics, on the other way, compiles all .c|.cpp file and link them all together using qmake to handle all Qt specific bits. Momentics sets the right environment, and then there is a lot of scripts to handle all the BB10 processes (package, sign, ..).
So you'll have to provide the missing parts. Usually it's faster to create a new config.h from scratch, but sometimes you may want to use a console with the BB10 SDK environment and do a ./configure manually. Don't forget that the simulator is x86 and the real thing is ARM, so you will have take care of that too (Endianness/optimization issues).

How to cross compile tesseract ocr engine for iphone?

I am struggling from past 1 week that how to compile the tesseract ocr enging for iphone. I have gon through through some link, But i couldn't find the proper way. Can anyone help me through step by step procedure. Thanks in advance.
I will have to agree with you on this that it is not an easy task, but the below links finally helped me achieve this... hoping this helps..
http://tinsuke.wordpress.com/2011/11/01/how-to-compile-and-use-tesseract-3-01-on-ios-sdk-5/
http://tinsuke.wordpress.com/2011/02/17/how-to-cross-compiling-libraries-for-ios-armv6armv7i386/
That probably won't be enough. I know nothing about Tesseract OCR library but you will require the include directives, plus specify the directory to where the Tesseract header files are installed via a compiler switch (usually -I) and (possibly) link with the Tesseract library file(s).
That would be enough to compile the sources if the header files are installed into common include directories. However, if the header files do not contain the definitions (not just declarations) for all functions/variables then there will be a library file(s) (like libtesseract.a or/and libtesseract.so) that must be linked in order to compile your binary.

How to download ParseKit for iPhone?

Really basic (and probably quite idiotic) question but I'm not familiar with this procedure of downloading source code. Even if you've never download this you may be able to point out what I'm missing.
I'm trying to get the ParseKit parser generator for use with my iPhone app:
The instructions say I need a project file called 'ParseKit.xcodeproj':
http://parsekit.com/iphone.html
The link below takes me to the source files, but I can't see where to get the actual project file:
http://code.google.com/p/todparsekit/source/browse/#svn%2Ftags%2Frelease-1.5-tag
ParseKit.xcodeproj is on the left but I can't download it itself, project.pbxproj opens up to contain some source code. How can I get the project file itself?
Apologies for the question but the whole thing seems painfully unobvious, why not just provide a download link? I must be missing something...
Thanks!
You have to check out the code using svn.
http://subversion.tigris.org/