BitLocker status "Not Encryptable" for my USB drives
It appears to be the usual suspect: group policies. The following GPO prevents me from enabling BitLocker on removable drives:
Windows Components/BitLocker Drive Encryption/Removable Data Drives/Control use of BitLocker on removable drives was set to Disabled
So no luck for me :) - I'll try an alternative like TrueCrypt, but that isn't as transparent of course.
Related videos on Youtube
Kaelinator
Updated on September 18, 2022Comments
-
Kaelinator over 1 year
I am just testing out some threads, trying to figure out how to use them. My question is, how can I get my current scenario to work how I want it?
I want to have this program print out 1 - 100. I have two methods;
oddNumbers
andevenNumbers
oddNumbers:
public static void oddNumbers() { new Thread(new Runnable() { public void run() { for (int i = 0; i < 100; i++) { if (i % 2 == 1) { System.out.println(i); } } } }).start(); }
evenNumbers:
public static void evenNumbers() { new Thread(new Runnable() { public void run() { for (int q = 0; q < 100; q++) { if (q % 2 == 0) { System.out.println(q); } } } }).start(); }
main method
public static void main(String[] args) { evenNumbers(); oddNumbers(); }
So, from what I understand, the methods
oddNumbers
andevenNumbers
are running on different threads. So if they are, then why isn't my output 1-100?Here's the output I get:
0 2 4 6 . . . 50 1 3 5 . . . 99 52 54 56 . . . 100
About half way through the
evenNumbers
loop, theoddNumbers
loop cuts it off. Why does this happen, and how do I set it up so that it'll print 1-100?Thanks in advance!
-
iglvzx over 12 yearsWindows 7? or Vista?
-
Thomas Vochten over 12 yearsMy laptop runs Windows 7 x64 Enterprise
-
Ramhound over 12 years@iglvzx - What does it matter? Bitlocker works nearly identical in both cases. Besides base on the screenshot thats Windows 7.
-
Andy Turner about 8 yearsWell, you start the even numbers thread before the odd numbers thread... But even if they started at the same time, why do you think they would alternate?
-
Kaelinator about 8 yearsI wasn't really expecting a perfect alternation, but I thought the numbers would be a bit mixed. I don't get why one for loop cuts another off, and why they can't go at the same time. @AndyTurner
-
Daniel Widdis about 8 yearsIt's more likely your output buffers filling and being flushed to output than the actual execution time of the programs. Tack on a timestamp and you might see a bit more overlap.
-
zapl about 8 yearsReminds me of: 'A programmer had a problem. He thought to himself, "I know, I'll solve it with threads!". has Now problems. two he'
-
Sleiman Jneidi about 8 years@Kaelinator what to do you mean by "same time"? threads might be running at the same time on multi-core, but System.out.print has a synchronized block that serialises writes
-
Andy Turner about 8 years@Kaelinator well, like I say, you start one thread first - so it gets a way through its numbers before the other one starts; then the other one starts and "cuts off" the first thread.
-
MadProgrammer about 8 yearsThread scheduling is something you should know about, but try not to spend to much time thinking about. Try adding a Thread.yield after each System.out statement or Thread.sleep(1)
-
-
Thomas Vochten over 12 yearsThe 3 reasons a disk cannot be encrypted (disk full, incompatible file system, or a drive is designated as the system partition) don't apply to my situation I'm afraid...