Thursday, December 29, 2011
Wednesday, December 28, 2011
Tuesday, December 27, 2011
Sunday, December 25, 2011
Saturday, December 24, 2011
Cracking the Entrepreneur Code, http://goo.gl/Ah3bP ... just realized this encourages me to be the entrepreneur I want to be ..
Friday, December 23, 2011
Thursday, December 22, 2011
Wednesday, December 21, 2011
Tuesday, December 20, 2011
MySQL scales appropriately according to Facebook, so why bother to use alternatives? http://goo.gl/2R4cg
Monday, December 19, 2011
Wednesday, December 14, 2011
Tuesday, December 13, 2011
Friday, December 09, 2011
Thursday, December 08, 2011
Wednesday, December 07, 2011
Tuesday, December 06, 2011
Monday, December 05, 2011
Our team will continue to use MySQL, for the main reason being that FB is using it, http://goo.gl/oEPld
Sunday, December 04, 2011
Saturday, December 03, 2011
Just do it, and do it, and do it, and do it until the job is done! Be inspired .... http://goo.gl/ZZ0V6 iaffirm
Wednesday, November 30, 2011
Tuesday, November 29, 2011
Monday, November 28, 2011
Sunday, November 27, 2011
Saturday, November 26, 2011
If we could serve as much patients as this, http://goo.gl/gH6Xl ... we'll be genuinely fulfilled ...
Friday, November 25, 2011
Thursday, November 24, 2011
Saturday, November 19, 2011
Wednesday, November 16, 2011
All Philippine-based software developers, attention .. you're invited at DevCon Summit 2011, http://devcon.ph/
Tuesday, November 15, 2011
Monday, November 14, 2011
Sunday, November 13, 2011
Saturday, November 12, 2011
Friday, November 11, 2011
Wednesday, November 09, 2011
Friday, November 04, 2011
Thursday, November 03, 2011
Tuesday, November 01, 2011
Monday, October 31, 2011
Dart: a language for structured web programming, newest language from Google, http://www.dartlang.org
Wednesday, October 05, 2011
Saturday, September 24, 2011
Wednesday, September 21, 2011
Monday, September 19, 2011
To change timezone for Redhat linux make sure to download correct tz from http://goo.gl/l22VX, then modify /etc/localtime accordingly
Saturday, September 17, 2011
Wednesday, September 14, 2011
Saturday, September 10, 2011
Thursday, September 08, 2011
Tuesday, September 06, 2011
Saturday, September 03, 2011
Sunday, August 28, 2011
Friday, August 26, 2011
Monday, August 15, 2011
How true that Microsoft is dominating over Linux in ALL aspect of the IT market, yes, even outside of Desktop computing, http://goo.gl/BX6kg
Monday, August 08, 2011
So, now I have compelling reason not to go the Mac way, and ditch the Windows ... :) http://t.co/7nWC59h
Thursday, August 04, 2011
Generating Unique Primary Key In MySQL To Avoid Collision
Since I'm having a bit of trouble publishing this at stackoverflow.com, I'm posting it here instead.
One may want to consider using BIGINT data type in MySQL for table primary key index. Thanks to the following link,
http://forums.mysql.com/read.php?24,423422,423697#msg-423697
I was able to finalize my solution.
A bit of modification from its original suggestion, I made use of:
- PHP microtime: 14 digit number, after removing the decimal point
- zerofill autoincrement column from "Accounts" table
I have a utility class in PHP with the following static method:
This generates 18 digit unique code that combines 14-digit from microtime and 4-digit from account code. Hence I have up to 9999 accounts to fit in the 4 digit allotment. But in actuality, BIGINT can still be extended up to a total of 20 digit, so I still have 999999 accounts that can be created. Instead of account code, you may rather use the server id, to further avoid key collision.
In my apps case, accounts are created per client who accesses my app offline in their premises. Each offline app has a sync capability to a central app that contains universal data from the offline clients, hence collision is apparent, especially for the logs table which has to be sequential as well for the synchronization to work correctly.
With this solution, I'm at peace, knowing that numeric index keys are a lot faster than character keys.
Hope this helps.
One may want to consider using BIGINT data type in MySQL for table primary key index. Thanks to the following link,
http://forums.mysql.com/read.php?24,423422,423697#msg-423697
I was able to finalize my solution.
A bit of modification from its original suggestion, I made use of:
- PHP microtime: 14 digit number, after removing the decimal point
- zerofill autoincrement column from "Accounts" table
I have a utility class in PHP with the following static method:
public static function generateIdx($isFloat, $random=NULL) {
$idx = (String)microtime($isFloat);
$idx = preg_replace("/\./", "", $idx);
$maxMicrotimeLength = 14;
$max = 18;
if (strlen($idx) < $max)
{
if (strlen($idx) < maxMicrotimeLength)
{
$diff = (maxMicrotimeLength - strlen($idx));
while($diff > 0)
{
$idx .= 0;
$diff--;
}
}
if (!is_null($random))
{
$idx += $random;
}
}
return $idx;
}
This generates 18 digit unique code that combines 14-digit from microtime and 4-digit from account code. Hence I have up to 9999 accounts to fit in the 4 digit allotment. But in actuality, BIGINT can still be extended up to a total of 20 digit, so I still have 999999 accounts that can be created. Instead of account code, you may rather use the server id, to further avoid key collision.
In my apps case, accounts are created per client who accesses my app offline in their premises. Each offline app has a sync capability to a central app that contains universal data from the offline clients, hence collision is apparent, especially for the logs table which has to be sequential as well for the synchronization to work correctly.
With this solution, I'm at peace, knowing that numeric index keys are a lot faster than character keys.
Hope this helps.
Wednesday, August 03, 2011
Thursday, July 21, 2011
How Generics And ObamaCare Led To Express Scripts' Mammoth Purchase Of Medco http://t.co/8AJpNEI via @forbes
Thursday, July 07, 2011
Preserving Relationship Diagram in MySQL after export
Discovered a smooth technique on preserving the relationship constraints when uncertain error occurs as one attempts to recreate a db into a new one via phpMyAdmin. First, attempt to to copy db via operations tab, Second, export structure only, then copy paste the whole constraint part, then run them against the new db, and viola! Hope this helps.
Monday, July 04, 2011
Friday, July 01, 2011
Thursday, June 30, 2011
Wednesday, June 29, 2011
Tuesday, June 28, 2011
Monday, June 27, 2011
Sunday, June 26, 2011
Saturday, June 25, 2011
Thursday, June 23, 2011
Tuesday, June 21, 2011
Friday, June 17, 2011
Thursday, June 16, 2011
Sunday, May 29, 2011
Error: Bad Request The CSRF token could not be verified
Error: Bad Request The CSRF token could not be verified
Just got the above error while submitting a form in my Yii powered SaaS app. I realized that the form isn't generated by Yii, but was customized. Hence I had to add a hidden field:
echo CHtml::hiddenField('YII_CSRF_TOKEN',Yii::app()->request->csrfToken);
Wednesday, May 25, 2011
/sbin/mount.vboxsf: mounting failed with the error: No such device
I had been searching for the solution for:
/sbin/mount.vboxsf: mounting failed with the error: No such device
... and apparently there's a difference between:
apt-get install build-essential linux-headers-`uname -r`
and
apt-get install build-essential linux-header-`uname -r`
The former saved me from the error.
In case you'll encounter another error with the word "protocol", just change the folder name in the edit share sectio of the virtualbox, then try the mount command again and you're good to experience relief.
Tuesday, April 12, 2011
Join http://bit.ly/utopialife ... gamers network with FREE 100 Initial Credits to use on games and more!
Join http://bit.ly/utopialife the new gamers network and get 100 Free Credits to use on games and more!
Knows anyone diagnosed with Crohn''s? Help them out by supporting http://bit.ly/Crohns-ColitisFoundation
Please help this important cause and donate to the Crohn''s and Colitis Foundation. http://bit.ly/Crohns-ColitisFoundation
Tuesday, April 05, 2011
Please help this important cause and donate to the Crohn's and Colitis Foundation http://bit.ly/Crohns-ColitisFoundation
Wednesday, March 30, 2011
Securing js files by putting them within the protected folders in Yii, on top of lowering web files latency. http://bit.ly/PhilYiiUsersGroup
Wednesday, March 16, 2011
Monday, March 14, 2011
Great opportunity to Earn Money, Help People, Have Fun. Test drive it free for 14 days http://bit.ly/GlobalAccess
Saturday, March 12, 2011
Friday, March 11, 2011
Tuesday, March 01, 2011
Please check out this Facebook page, http://ping.fm/pXCVJ full of inspiring quotes and great health tips - Thank You !
Wednesday, February 16, 2011
Monday, February 14, 2011
Saturday, January 29, 2011
Love a hot bowl of homemade chili? For those collecting chili recipes, go to http://bit.ly/ChiliRecipe
... contribute for greener environment .. make your own solar energy, http://bit.ly/CleanGreenEnergy
Wednesday, January 26, 2011
Monday, January 24, 2011
Thursday, January 20, 2011
Wednesday, January 19, 2011
Tuesday, January 18, 2011
Monday, January 17, 2011
Sunday, January 16, 2011
Friday, January 14, 2011
Thursday, January 13, 2011
Tuesday, January 11, 2011
Finaly I can now offer secure backup system of any Vista/XP PCs to remote/local Linux servers, http://goo.gl/4DwzN
Sunday, January 09, 2011
Saturday, January 08, 2011
Continuously being amazed by Yii, quickly doing my development of Crewing System, http://bit.ly/PhilYiiUsersGroup totally OOP .. love it!
Thursday, January 06, 2011
Subscribe to:
Posts (Atom)