In the Android frameworks, a long member called native anything is usually a platform pointer (a C/C++ pointer) stored in an integer. The bitmap object is allocated in native (C/C++) code, and the pointer to that object is stored on the Java object as a long. They use a long...
c#,.net,multithreading,native,appdomain
Yes it can be done but you should seriously measure if effort is repaid by benefits. Windows won't load multiple copies of an unmanaged DLL and unmanaged DLLs are loaded per-process (not per AppDomain). What you can do is to create multiple temporary copies of same DLL then load them...
java,mysql,hibernate,jpa,native
@Entity(name = "tb_practice") public class Practice { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private String address; private String city; private String distance; } Because Native Query can be Map to only @Entity....
If you are able to do live debugging, you can try to set a break: bp ntdll!RtlCreateHeap "kc;gc" will display the call stack and continue. Maybe you see the culprit. Do also the same with ntdll!RtlDebugCreateHeap...
There is a way to accomplish what you want using standard iOS APIs. No need to use external components. You control your webpage and your app, so you know the exact URL that has the link to your app. These are the steps: 1) In your app, define a custom...
mysql,hibernate,primary-key,generator,native
Hibernate when selecting the key generation mechanism in native mode, will try to choose the best mechanism available in the database. In the case of MySQL, auto increment is available and Hibernate uses it instead of a sequence, because the auto increment mechanism is slightly better altough sequences also work...
There are two methods to answer such a question precisely: 1.) Look at the IL code (and/or) aassembly code produce and count the CPU cycles needed to execute this code (Hint: this is not for beginners) 2.) Build a small test programm which executes both variants a large number of...
From the source repository, it seems that the arpspoof Makefile does not look for libnet from the system. Instead, the dSploit repository includes libnet as a Git submodule. Did you clone recursively? (git clone --recursive ...). If you did not, change to the dSploit directory and run: git submodule update...
java,arrays,string,append,native
You can do it in three lines, but the overall efficiency is going to be the same: String[] a = new String[] {"quick", "brown", "fox"}; List<String> s = new ArrayList<String>(Arrays.asList(a)); s.add("jumps"); a = s.toArray(new String[s.size()]); System.out.println(Arrays.toString(a)); Demo. However, the best approach when you need expandability of your container is to...
java,android,sockets,jni,native
should have added "android.permission.INTERNET" and "android.permission.ACCESS_NETWORK_STATE" android permissions in the AndroidManifest.xml. <uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission> ...
The difference seems to largely be due to the fact that your Quicksort uses builtins. It slices and uses len. Keep in mind that sort.Sort takes in a sort.Interface. So every time you call len it calls slice.Len and every time you do array[i],array[j] = array[j],array[i] it has to call...
javascript,css,css3,accordion,native
There are a couple of issues at play here. As previous commenters noted, you are not properly looping over each of the sections within your accordion. After fixing that, you will also need to address the fact that your onClick handler will not work correctly. The problem with looping over...
I believe you're thinking of the BootExecute value, located in this key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager This is a REG_MULTI_SZ value, i.e., it contains multiple strings. Each string contains an arbitrary identifier, the name of the executable to run, and the arguments to pass to the executable. For example, the default setting...
The convention for native binaries in Gradle is to put headers in src/{componentName}/headers and C source files in src/{componentName}/c, where componentName would be whatever you name the component (given the question, I'm guessing that would be helloworld, but it depends on how you declare it). Flavors are for different variants...
Here is how you implement an output parameter in C++/CLI, like C#'s void func(out int x). Note that there is no int^. void Open([OutAttribute] int% retval) { int result; if (!UnmanagedOpen(&result)) throw gcnew Exception("Open failed!"); retval = result; } Note that it is probably even better to simply return the...
javascript,safari,native,indexeddb
According to the current update in http://caniuse.com/indexeddb the IndexedDB should be supported in Safari 8.0, so it is definitive a good choice to go with IndexedDB instead of WebSQL, currently i am using https://github.com/axemclion/IndexedDBShim to fill the gap for Safari and Android Browsers.
c++,networking,blackberry,native,blackberry-cascades
You can use QNetworkConfigurationManager.isOnline(). QNetworkConfigurationManager mgr; mgr.isOnline(); If you want to get notified about changes of the online state then you also can connect to the QNetworkConfigurationManager::onlineStateChanged(bool isOnline) signal. connect(mgr, SIGNAL(onlineStateChanged(bool)), this, SLOT(onOnlineStateChanged(bool))); ...
You are looking for ViewPager. I don't know where you found these tutorials that lead you to believe that the interactions would appear that the pages are not interconnected. You can find a good tutorial and demo transitions on the official documentation: http://developer.android.com/training/animation/screen-slide.html Additionally, if you also want the indicators...
android,eclipse,exception,native
launcher activity declare like this in ur manifest.xml. (launcher acticity is a starting activity of application) <activity android:name="packagename.LauncherActivityName" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> other classes declare like this <activity android:name="packagename.OtherActivityName" android:label="@string/app_name" >...
c,linux-kernel,make,arm,native
As requested: This was a known problem. A patch exists (see for example here)...
The only to-native-code Java compiler that I'm aware of is The GNU Compiler for the Javatm Programming Language. But it's extremely unlikely you really need a to-native-code compiler. Packers like the ones you've dismissed can make your program entirely self contained, including installing a private JVM, seamlessly. I strongly recommend...
No, this will not work. If you compile an AnyCPU assembly that depends on a 32-bit native DLL then it will throw an exception if you attempt to load it in x64 mode. This is no different to the case where you compile your own application as AnyCPU and attempt...
web-applications,cordova,kendo-ui,native,mobile-application
Kendo is a great framework to go with for your mobile or web application.The support provided is great and you can achive native like feel with kendo UI.I'll leave you a link to the mobile app developed using kendo https://play.google.com/store/apps/details?id=com.payoda.Insurance this app has been released in IOS,android and windows store....
Its working fine for me after doing some of the changes. remove all children[0].children[0] remove $entry() complete code: public static native String initiateFilesInput(Element fileUpload, UploadItemWidget imagesPanel)/*-{ fileUpload.addEventListener("change", fileUpload.addEventListener( "change", function(e) { showThumbnail(fileUpload.files, imagesPanel); }, false)); function showThumbnail(files, imagesPanel) { for ( var i = 0; i < files.length; i++) {...
Basically, because the clone() method does something that you cannot do in the Java language: it clones the state the of the object, including its actual class designation. The cloning mechanism in Java is based on each class calling the superclass's clone method, all the way up to Object. Object...
1 and 4 fill_parent is just a deprecated version of match_parent. match_parent is the new way so you should always use match_parent instead of fill_parent. 2 and 3 layout_weight is used in addition to something like layout_width="0dp". For example, say you have 3 items in a horizontal linearlayout, if you...
c++,keyboard,native,boot,defragmentation
Finally , i got the solution.Problem was regarding type of keyboard you are using i.e, PS2 or USB. you need to get all of the instances of the keyboard interface and read from all the keyboards simultaneously.As there exists port for the PS2 keyboard on motherboard,it gets priority at the...
Though you could use Kodiak (http://www.becomekodiak.com/kodiak-php.html), I would still go with an HTML5 / javascript app because you get the advantage of being able to run both in the browser and on the iPad. You could have a manifest file which would let the browser know what to cache, you...
java,android,database,sqlite,native
The simplest solution is to use SQLiteAssetHelper. You basically drop your SQLite database into your project's assets/ directory, and use SQLiteAssetHelper in lieu of SQLiteOpenHelper. In addition to the sample code up on Jeff Gilfelt's GitHub repo for the library, I have a sample app demonstrating it as well.
android,override,native,back-button
hi why dont you use onBackPressed() @Override public void onBackPressed() { super.onBackPressed(); } Try this. and let me know the feedback's....
actionscript-3,flash,air,native
Try this: https://code.google.com/p/nativeapplicationupdater/ Or, if you only need to update some content that is used by the app, you can just have your app download it using URLLoader and store it using File, say to File.applicationStorageDirectory. ...
So, by looking trough the NDK documentation I found this interesting hint (look inside the NDK folder in docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html): put your library inside assets folder at runtime detect the cpu architecture using this java call: String arch = System.getProperty("os.arch"); If the result is something like "armv71" copy the lib from...
I am not sure exactly what you mean by multiple JNI layers. It sounds like you are asking if you can run javah against two distinct java files and create a single JNI library based on native methods contained in those two files? Absolutely. Simply compile and link each file...
Don't add the jar, it will get packaged into the final build. Try setting the build argument j2me.ashaNative=true. ...
It seems that the libraries are always created under the same location - see here for the details - You need to hardcode only part of the path. Unfortunately I haven't tested it - don't know how, to be honest. EDIT Below you can find a sample script (created after...
The problem is a simple typo: div.innerHtml = "hey do you see me"; should be div.innerHTML = "hey do you see me"; See here...
java,android,android-ndk,native,android-runtime
You shouldn't call DeleteGlobalRef on a local ref - only on the actual jobject pointers that you've got returned from NewGlobalRef. So in this case, as long as you aren't calling NewGlobalRef, you don't need to call DeleteGlobalRef either. You only need to use NewGlobalRef if you store a reference...
I was multiplying a matrix with another in the wrong order, as is tradition
I finnaly found a fix this way, and still don't know why the first one doesn't work: val data2 = Pointer.pointerToPointer(data); ret = Netfilter_queueLibrary.nfq_get_payload(tb, data2) if (ret >= 0) { println(String.format(" payload_len=%d ", ret)); println("data: "); for (i <- 0 until ret) { printf("%02x", (data2.get().getBytes(ret)(i))); } hope it will help...
java,class,jvm,classloader,native
These clasess are pre-loaded using an optimized code path which circumvents almost all the standard classloading mechanisms and verifications. That's why you don't see them. Basically, one cannot distinguish the loading of such a class as a separate event; they are loaded in bulk from a pre-cached image.
The problem is that the jar you included has a dependency to a Java method that is not available in Android SDK. You should understand that even though Android programs are written in Java, they are not run by JVM....
android,mobile,cordova,browser,native
As it turns out, my inital guess is correct. Phonegap is using the Webview Class, which starting with Android 4.4 is now using the Chromium Engine instead of Webkit. This change is the root of my issue. For those interested, my keyup and keydown events were not receiving the proper...
multithreading,c++11,pthreads,native,handle
Introduction There's nothing saying that a certain MACRO, or equivalent, will be available for the preprocessor (that would yield what thread-implementation a certain implementation is using). If we instead were to inspect the returned value (more specifically the returned type) of std::thread::native_handler (std::thread::native_handle_type) one might think that it would yield...
Why do you use objective-c then? You could just start a java program and write anything you need in a file. Or you just use c# ^^
java,intellij-idea,jar,classpath,native
I don't have my copy of Ultimate available currently, so I'm not sure about solving this in the UI. But one workaround would be to just edit the library config file directly. If you're using the directory-based project format, it'll be in .idea/libraries/MyLibrary.xml. Find your entry under NATIVES (or whatever...
Can I change my Windows desktop wallpaper programmatically in Java/Groovy? So the correct way is with JNA if you are not familiar with JNA or if you haven't used JNA the link above is for you. Otherwise you are right about using natives but you never stated how you are...
webrtc definition. webrtc is stuck into two parts, complementary but separated. the W3C consortium is standardizing a JS API for browsers named webRTC. The IETF is standardizing the underlying protocols and what happen on the wire for interoperability, it is named rtcweb. the IETF's rtcweb group defines everything you...
c++,pointers,native,local,command-line-interface
someclass instance() is a function pointer as you can see from the error message. Change it to someclass instance.
javascript,css,firefox,styles,native
Because objects are passed around by reference, you don't need return source; and you don't need testEl.style = either. Try removing these two things and see if that fixes the problem in Firefox - it probably doesn't like you doing a complete re-assign of the style object ;)
c++,visual-studio-2012,native,project-management
My personal solution to the problem is as follows. Every project generating a binary builds to: $(SolutionDir)build\$(Configuration)\` Every project generating a static library builds to: $(SolutionDir)build\$(Configuration)\Libraries\ The intermediate directory for all projects is: $(SolutionDir)build\$(ProjectName)\$(Configuration)\ And runs the following pre-build command: Copy /Y "$(ProjectDir)*.h" + "$(ProjectDir)*.hpp" "$(SolutionDir)build\$(Configuration)\Libraries\" Advantages of this system...
frameworks,worklight,native,mobile-application,tradeoff
The essence of native development differs greatly than that of hybrid development. In native development Worklight provides a set of APIs that allow you to work with the Worklight Server and the features that surround it (as listed in the question you've linked to), Whereas in hybrid development you also...
The maven-assembly-plugin should be sufficient to package your native binaries into an archive. Clients can the use the unpack goal of the maven-dependency-plugin to unpack this archive into a given directory, e.g. the current target. Then all you need is a Maven plugin that knows how to run your native...
A comment suggested a system property so I looked at the list of those - it turns out there is one that gives this value: System.getProperty("sun.arch.data.model") ...
For calling the method of the C++ class in the JNI, the object of this class must be created already(if it's not a static method). You need to create the JNI wrappers only for the methods that can be called from the Java code. Example: C++ class: class Controller...
This example will work with installers exe/msi/image only (have no Mac to test dmg). This step by step assumes, that you already installed the needed tools like InnoSetup, Wix Toolset, etc. It also assumes, that you have configured the tools to run with netbeans (setting paths, edit config files, etc.)....
javascript,node.js,mongodb,native,capped-collections
Regarding your questions 1 - 4 about capped collections and creating them automatically, there are several ways to do this. On the one hand, you could run a script to initialise your database so that it has the capped collections available to your client when you run it for the...
java,c++,memory-leaks,jni,native
The Java GC should clean up any objects you allocate. See this answer for more details....
android,cordova,webkit,native,hybrid-mobile-app
It would be a lot easier (as well as interesting) to write simple mobile clients in native Java/Objective-C for Android & iOS. For an experienced web developer, it would not be hard to create simple apps using articles on Google/StackOverflow. Not to mention that using the native mobile SDKs' is...
java,android,callback,android-ndk,native
If your code is not invoked from a Java method it will use the system classloader in FindClass() which only knows about the Android system classes. I suggest using getting a reference to the class in JNI_OnLoad, creating a global reference to that via NewGlobalRef and passing that to your...
c++,c,asynchronous,pinvoke,native
No, this is a universal bug and not specific to asynchronous code. It is just a bit more likely to byte in your case since you never have the machinery behind [DllImport] to keep you out of trouble. I'll explain why this goes wrong, maybe that helps. A delegate declaration...
We ended up by doing the following: Moved and exposed the C specific code to a URL endpoint, i.e. RPC style web service (basically a remote call): @WebService @SOAPBinding(style = Style.RPC) And subsequently exposing its interface endpoint: @WebService(endpointInterface.. During web server init published this endpoint Endpoint.publish(...) in a new java...
c#,performance,image-processing,native,template-matching
Did you try locking bits or using FastBitmap implementation? You should be able to find tons of implementations like this one. It should speed up getting pixels multiple times. You just need to take care of properly disposing it.
java,android,video-streaming,native,videoview
Short answer is no, not that I know of. Long answer is that you haven't given enough detail. What data exactly do you need access to? Are you writing an application, or modifying your OS to do this to other applications? The code that actually fetches a remote video is...
.net,memory-management,null,native,nothing
Generally speaking: A reference to Null takes only the space of the reference itself on the stack. Which should be 8 byte on a 64 bit system. In your particular case: Note the difference between boxed and unboxed values! A boxed integer is a reference to an instance of the...
android,c++,opencv,android-ndk,native
After few days of hopelessness :D I solve my problem. The issue was that $(OPENCV_INSTALL_MODULES) should be equal. At the line OPENCV_INSTALL_MODULES:=on in my Android.mk file. I overrided OPENCV_INSTALL_MODULES:=on to OPENCV_INSTALL_MODULES=on and now it works.... Perhaps it might help to someone else too :)...
You are not alone. This is a bug that appears to happen in some versions of JDK 1.6 and 1.7. I haven't seen it occuring in JDK 1.8. It can occur on Windows too and all you can do is either update the JVM or not use the Desktop class...
In fact, answer depends on framework which was used for building app. The are two kinds of frameworks that I've seen so far: Based on C/C++ languages (Marmalade SDK, e.g.) Based on JavaScript (Appcelerator Titanium, PhoneGap, etc.) In first case the only way to recognize that app is not native...
How to create iOS- / OSX- library from Haxe and use it in native application Actuality: 12.2014; HXCPP-ver.: 3.1.39~git. Dependency: hxcpp 1. Haxe -> Library Create a new Haxe-project with main class named HxModule. src/HxModule.hx class HxModule { public static function main() { Sys.println('Hello from HxModule: "${test()}"'); } @:headerCode public...
android,notifications,push,native
Actually Push Notification mainly sends from server, from application side you must need to create one Browser Key on Google Api Console, after creating your app there and need to activate GCM from there. Then, you need to give GCM Registration Id to your server and then whatever push you...
To build a native 32bit app on 64bit platform, you should use jx compiled for ia32 processor. If this is on Windows, you can either use the Windows Setup (x32/x64/SM/V8) (on x64 Windows you will have an option to install x32 JXcore binaries as well) or download the exact binary...
c++,windows-phone-8.1,native,codec,amr
I posted this question in Microsoft forum and i got the answer, the answer is Microsoft doesn't support in-build AMR codec, to support AMR codec in windows phone we need to use Third Party Codec Library. refer this link anybody has same question: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/28e2bc65-e938-4256-b8ee-43affe556666/is-it-possible-to-use-media-extension-for-encoding-raw-audio-pcm-data-to-amr-data?forum=wpdevelop...
The WlanEnumInterfaces populates the field you provide it with the address of a struct. You are passing in the address of a struct rather than the address of an address. Use PointerByReference to get the address of the struct, e.g. PointerByReference pref = new PointerByReference(); Wlanapi.INSTANCE.WlanEnumInterfaces(handle, null, pref); WLAN_INTERFACE_INFO_LIST list...
ios,binding,enums,xamarin,native
Yes, there is. Use a 64-bit type (long or ulong) for the enum, and decorate it with the [Native] attribute: [Native] public enum MyEnum : long { // ... } And then you can use the enum in your ApiDefinition.cs, and the binding code will automatically generate the right thing....
android,listview,arraylist,jni,native
As you have mentioned that the data available in SQLite database, you can access this SQLite database from Android app layer using the SQLite related classes available in Android. It helps you the extra processing of data through JNI layer. Also modification of list items will be directly done on...
android,ios,windows-phone-8,xamarin,native
You can generate a .NET DLL that can be used in WP8, or any .NET platform. You cannot create libraries for native Android/iOS use.
I don't think it is possible to call loadLibrary on a .so that is not in the app's apk or on the device (expansions included). What you can do, though, is include your .so libraries inside an expansion file, create a Starter activity that extracts these SO to a system...
The problem was due to an naming error in my method in the C header and source files per the jni standard. The correct way to use jni with clojure is to create a Java wrapper class as I have done and load the dynamic library with the method clojure.lang.RT.loadLibrarySince...
The JNI side of this code is C, not C++, and C's laxer handling of pointer punning is part of the problem. Your code breaks on these two lines: jstring plainText = (*env)->NewStringUTF(env, "Hello from JNI ! Compiled with ABI 2222 "); return (*env)->NewStringUTF(env, plainText); because NewStringUTF has the signature...
java,ios,objective-c,mobile,native
A quote right from the page you have linked to: A small disclaimer is that the Objective-C benchmark is a bit heavy on the method/message calls which biases the benchmark in our favor. Method invocations in Codename One are naturally much faster than the equivalent Objective-C code due to the...
Your use of DirectByteBuffer will almost certainly fail in spectacular, core-dumping, and unpredictable ways. And its behavior may vary between JVM implementations and operating systems. The problem is that your direct memory must remain valid for the lifetime of the DirectByteBuffer. Since your string is on the stack, it will...
If your goal is only to inform yourself, go ahead, Android AOSP is available at this address https://android.googlesource.com If you decide to modify something to fit your needs, you will need to rebuild Android and flash your device. For your case, the read() method comes from java.io.InputStream (check your imports)...