Recent Entries: |
|
|
|
|
|
|
My Dev Setup Lately
|
FWIW, I have really been enjoying my Macbook. For those that care, I upgraded to 4 GB of RAM (do it yourself from Crucial and save >$100!!!) For my Blackberry and WinMo development, I have installed VirtualBox from Sun (Free!) and am running Windows 7 in the VM. For mobile dev, it is more than adequate and the combo of 4GB + Win7 makes it feel pretty smooth. No, it's not quite as good as my desktop, but this is an all in one solution. Sweet!
|
Submitted by bosshogg on Tuesday the 27th of October 2009, at 10:59 pm
|
Three Ways To Randomize on the iPhone
|
To the best of my knowledge, there are three ways to generate random numbers on the iPhone:
The first, SecRandomCopyBytes:
UInt32 randomResult = 0;
int result = SecRandomCopyBytes(kSecRandomDefault,                   sizeof(int), (uint8_t*)&randomResult);
if (result != 0)
      randomResult = arc4random();
The second, arc4random:
UInt32 randomResult = arc4random();
The last (and worst) rand():
UInt32 randomResult = rand();
Good luck with all your random things!
-Jon
|
Submitted by bosshogg on Monday the 05th of October 2009, at 03:51 am
|
|
 
|
|