Search:

Type: Posts; User: sci4me

Page 1 of 4 1 2 3 4

Search: Search took 0.07 seconds.

  1. Thread: Get JVM Flags?

    by sci4me
    Replies
    2
    Views
    1,168

    [SOLVED] Re: Get JVM Flags?

    I did get this:


    ManagementFactory.getRuntimeMXBean()

    I got that after posting this however.

    You can consider my question answered.
  2. Thread: Get JVM Flags?

    by sci4me
    Replies
    2
    Views
    1,168

    [SOLVED] Get JVM Flags?

    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?
  3. Replies
    2
    Views
    1,136

    VM Instruction Pipelining

    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.
    ...
  4. Replies
    2
    Views
    16,909

    Simple Bitwise Encoding and Reversing

    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?
  5. Replies
    1
    Views
    1,061

    Replace unless inside quotes?

    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...
  6. Replies
    1
    Views
    1,632

    Password hashing & Salts

    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...
  7. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    Oh I see... then.. how do you know which two bits are on... I mean, yes the 6 tells that but.. eh..
  8. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    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...
  9. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    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]
  10. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    Oh, derp. So, loop 3 times... right? That's giving me the same results.
  11. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    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)...
  12. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    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...
  13. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    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...
  14. Replies
    18
    Views
    1,038

    Re: Numbers & Binary

    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...
  15. Replies
    18
    Views
    1,038

    Numbers & Binary

    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)...
  16. [SOLVED] Calculate milliseconds between two dates not counting weekends?

    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
  17. Thread: FASTEST List

    by sci4me
    Replies
    10
    Views
    1,414

    Re: FASTEST List

    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...
  18. Thread: FASTEST List

    by sci4me
    Replies
    10
    Views
    1,414

    Re: FASTEST List

    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...
  19. Thread: FASTEST List

    by sci4me
    Replies
    10
    Views
    1,414

    Re: FASTEST List

    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...
  20. Thread: FASTEST List

    by sci4me
    Replies
    10
    Views
    1,414

    Re: FASTEST List

    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...
  21. Thread: FASTEST List

    by sci4me
    Replies
    10
    Views
    1,414

    FASTEST List

    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"...
  22. Thread: API Hell

    by sci4me
    Replies
    4
    Views
    1,222

    Re: API Hell

    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...
  23. Thread: API Hell

    by sci4me
    Replies
    4
    Views
    1,222

    API Hell

    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...
  24. Replies
    1
    Views
    1,242

    Re: value change listener dident call

    not sure about the code, but use [ code ] and [/ code ]
  25. Replies
    9
    Views
    1,392

    [SOLVED] Re: Which is better Vector or ArrayList ?

    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.
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4