I did get this:
ManagementFactory.getRuntimeMXBean()
I got that after posting this however.
You can consider my question answered.
Type: Posts; User: sci4me
I did get this:
ManagementFactory.getRuntimeMXBean()
I got that after posting this however.
You can consider my question answered.
Is there any way to get all the command-line flags for the JVM in my code? I.e. the -XX: flags as well as -server/-client ?
If so, how?
I apologize if this is not a great place to post this.
So, I am doing a bit of learning about Virtual Machines. I am wondering about Instruction Pipelining in the context of a Virtual Machine.
...
Sorry if wrong section / crap name.
I have an index that is encoded as such:
int idx = x << 11 | z << 7 | y;
my question is: can i go from idx back to x, z, y?
If so, how?
Hey guys, sorry if this isn't the correct area for this.
Basically, I am trying to write a method that will take a string, a target, and a replacement (a replacement function like...
Hey guys! So, after a longer time than it should have taken, something clicked in my tiny little brain and I understood salts. Now, my question: are LARGE salts a bad idea? I don't see much...
Oh I see... then.. how do you know which two bits are on... I mean, yes the 6 tells that but.. eh..
This is what I have:
boolean[] array = new boolean[3];
for(int i=0; i<3; i++)
{
array[i] = (a & (1 << i)) != 0;
}
works beautifully. I figured this out by printing the result of the...
This is what it's giving me now:
0 [false, false, false]
1 [true, false, false]
2 [false, false, false]
3 [true, false, false]
4 [false, false, false]
5 [true, false, false]
Oh, derp. So, loop 3 times... right? That's giving me the same results.
I think something just clicked in my brain :P
I was forgetting that the pattern I need is binary... so .. essentially I just create a int to binary (in the form of a boolean array, only 3 bits)...
Ok, that makes it a little clearer... but I still don't understand how it gives me my 3 booleans from the one int...
I don't want to ask for code and wont (not that I expect it would be given...
Hmm... I'm fairly new to this kind of logic... I haven't worked with this kind of thing very much. I kind of understood the pseudocode but really don't know how to write it... could you go more into...
It takes an int, 0-7. Outputs a 3 long boolean array. The switch case pretty much explains what it does... If I rewrite the output for each input, you'll get essentially the switch case. I'll do it...
Hey guys. So, I have a piece of code that works:
public static boolean[] sub(int a) {
assert (a >= 0 && a <= 7);
boolean uread = false, uwrite = false, uexecute = false;
switch (a)...
I think the title says it all. I have two Date objects and I need to calculate the time between them in milliseconds not counting saturday and sunday.
EDIT: nevermind, i got it
Ok, I have since realized that the LIFO is broken. I do want it to return and remove like an ArrayList.
I forgot to mention, I do need duplicate entries...
Looking into it a tish more, it seems...
Ah bloody hell, I have to stop deleting things. (oh yeah its on git.. oh well) Deleted the profiling code. Lets start from a different spot.
First of all, my requirements:
A collection that will...
Why worry about it.. well.. as much as I want to argue a point, I know that I cannot. :P
Okay, when I say fast.. I dont care about indexes or where elements go... it doesn't matter whatsoever to...
I'm not really noticing issues (yet). I will be adding/removing a LOT. I don't care about indexes or ordering.
I wrote an implementation of exactly what I need which, with a bit of testing, seems...
I need a collection that I can add/remove to. Order doesnt matter at all. The only thing that matters is SPEED. Honestly, push/pop or even add/pop.. doesnt matter. Just different names for the "same"...
Perhaps I should word this better... My code will work with or without the interface, the interface is simply a way to add an "extra feature" to the class. It is not required for the class to...
Hey guys. So, I am working in an environment where certain API's may or may not exist depending on the scenario. I have classes that implement certain interfaces from API's which might not always...
not sure about the code, but use [ code ] and [/ code ]
If im not mistaken, the main difference is that vector is thread safe. I may be wrong or slightly off on that, but im pretty sure thats it.