Skip to content
Advertisement

Tag: c++

Understanding safe access of JNI arguments

I’m doing some research regarding how HotSpot performs garbage-collection and/or heap-compaction while JNI code is running. It appears to be common knowledge that objects could be moved at any time in Java. I’m trying to understand, definitively if JNI is subject to effects garbage-collection. There exist a number of JNI functions to explicitly prevent garbage-collection; such as GetPrimitiveArrayCritical. It makes

UDP communication between Java and C#

I’m trying to communicate a Java program with a C# one but it’s not working. The code is really basic, here it is: This is the Java client And here it is the C# server The c# server is a Unity file, I mean, I execute it from Unity, so Start is the first method called. I would like them

Android Create Calendar Event always as Birthday

I have a strange issue when I create a calendar event programmatically its always noted as Birthday Calendar (type) I don’t have any clue why its noted like that. My code I use is as below: Xamarin C# Please does someone has any tips or ideas which can point me to the right direction? Thanks in advance. Answer The question

Windows scaling

Windows 8/10 has started to include a slider for how much GUI elements should scale, right click on desktop -> display. For a colleague with a laptop 4k-screen it’s 250% while another colleague using the same resolution on a 4k 28″ screen it’s 150%. How do I read that value programmatically? I need to adjust some graphics so it looks

Java collection like c# KeyedColllection

Is there a Java collection that has the same behavior as the c# abstract KeyedCollection class (that is items can be retrieved by both key and index)? I have looked around but can’t find anything similar. Thanks, Nick Answer I think you can develop Your own class by extending a HashMap

How to create C style union in java?

I have to convert one of my code segment from C to java. Code is given below. union commandString{ char commndStr[20]; struct{ char commnd[4]; char separator1; char …

Advertisement