Saturday, September 10, 2011

... wanting equals luck, .... feeling of having combined with released energies rather make things easy ...
You cannot solve a problem from the same consciousness that created it - Albert Einstein
The unexamined mind is not worth living ...

Thursday, September 08, 2011

Yes, Microsoft Did Change The World More Than Apple, http://goo.gl/wzeLE

Tuesday, September 06, 2011

Yahoo! CEO Carol Bartz is out ... coincidental that I read more of Michael Arrington last night, who in May this year interviewed her.
No business is without database, and now-a-days, usual that data are sync between backups and business related interfaces ...

Saturday, September 03, 2011

... the mindfulness of things other than the unwanted emotions and thoughts ... http://goo.gl/bfttT

Sunday, August 28, 2011

Web Camera + Credit Card = Secure Payment, http://ping.fm/9urdW Cool!

Friday, August 26, 2011

Cook's message to employees as the new CEO of Apple, http://goo.gl/Wjzqi

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
97% of $104 million of Mozilla's income is from Google. In November 2011, Mozilla's contract with Google will expire. Will Google renew it?

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:


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

Using rSSH in combination with restrictive apache config and appropriate file permission for a temporary web server user ...

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

... principals should be able to evaluate top 4 seafarer ranks via online interface ... major, major feature, need emphasis in the video ..
After seafarers medical records module, I thought the qualification assessment is easy, it's challenging enough to need few diversions .. :)

Friday, July 01, 2011

Hope to start initial production of video tutorial for the crewing system using Camtasia ...
Accept credit card payments via Android, http://ping.fm/juSjx

Thursday, June 30, 2011

Credit to http://ping.fm/LyRFJ .. solved my issue ...
Steady growth of an estimated 270,000 Filipino seafarers, .. interesting figure, specially if we consider how they're systematically managed
Never thought applying triggers in MySQL Db to be this exciting ... :)
Now I can listen to FM music through the speakers in HTC Desire HD ...

Wednesday, June 29, 2011

Facebook rival just arrived, http://ping.fm/GA8d3

Tuesday, June 28, 2011

Thanks there's headerHtmlOptions in Yii's CGridView, sample usage: 'headerHtmlOptions'=>array('width'=>'80px')
Who owns the biggest home in London? http://ping.fm/vbYv6
Simply copy-paste a truncate function, http://ping.fm/xj9H3
new versus old Japan, http://ping.fm/WXyxg

Monday, June 27, 2011

Already tired ... hope to finish polishing the seafarers medical records part by tomorrow ... goodnight everybody ...
AndroidOS Dominating PH Smartphone market.. http://ping.fm/iU59A

Sunday, June 26, 2011

Is under P20k onetime setup fee for offline mode and P15k monthly online access/storage of scanned med results reasonable for each clinic?

Saturday, June 25, 2011

Is availability of med results via online access a true value add to clinics, compelling enough for them to invesi in I.T. infrastructure?
Appreciating the music of Andrew Lloyd Webber ...

Thursday, June 23, 2011

Great sonic technology, http://ping.fm/fnmmX
For stranded motorists in Metro Manila area, be careful not contribute further :) ... be safe on your way home guys ...

Tuesday, June 21, 2011

Friday, June 17, 2011

Downloading Angry Birds Seasons .. thought I wouldn't love Angry Birds Rio hahaha

Thursday, June 16, 2011

Opted to use BigInt(12) rather than any GUID type of lengthy alphanumeric datatype. This should assure me of no duplication.
Though the 2038 year limit of timestamp (due to 32 bit computers limitation) isn't coming soon, better to be at peace by using datetime data type instead ... :)

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

Sunday, March 27, 2011

IMHA, AMCOW, MTC ... great opportunities waiting to be cooked ...

Wednesday, March 16, 2011

Get 2 free NCAA Basketball jerseys. http://bit.ly/JerseysOfChoice

Monday, March 14, 2011

Great opportunity to Earn Money, Help People, Have Fun. Test drive it free for 14 days http://bit.ly/GlobalAccess
Get 2 free NCAA Basketball jerseys. Perfect for March Madness! http://bit.ly/JerseysOfChoice

Saturday, March 12, 2011

My latest share in Yii forum ... http://goo.gl/Wb8zH

Friday, March 11, 2011

Network, socialize, or find a date ... 18 - 25 years old ... http://bit.ly/snakbox

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

Online Marketer? 10 BEST ways to build your subscriber list with http://bit.ly/BuildingLists

Monday, February 14, 2011

10 BEST ways to build your subscriber list with http://bit.ly/BuildingLists

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

Thursday, January 27, 2011

To remove apache autostart in Ubuntu: update-rc.d -f apache2 remove

Wednesday, January 26, 2011

"My willingness to fail gives me the ability to succeed" Billionaire Venture Capitalist Vinod Khosla

Monday, January 24, 2011

Successfully created Ubuntu 10.04 OpenVZ container within a virtualized Ubuntu 8.04 ... details later :)
Currently creating Ubuntu 10.04 OpenVZ container within a virtualized Ubuntu 8.04 ... maximizing hardware capacities ..
Checking out NoSQL, and why mongoDb could be my next candidate, http://goo.gl/qkPv0

Thursday, January 20, 2011

Revisiting redmine ... my personal choice for project management tool ...

Wednesday, January 19, 2011

Solid-state drive(SSD) data storage device,uses solid-state memory to store data, use microchips which retain data no moving parts.

Tuesday, January 18, 2011

HipHop is a source code transformer which transforms PHP source code into highly optimized C++ and then compiles it using g++.
Ok, ping.fm isn't open to give out user API keys at this time .... maybe I'll just create my own :)

Monday, January 17, 2011

Characteristics of good IT Project Managers, http://goo.gl/Ll1bF
Beginning to really appreciate git, quite easy to use as a version control ... then backing it up to central backup sys .. safe :)

Sunday, January 16, 2011

Finishing touches for the TwitterFarm project, Crewing Sys, preparing for teaching demo, as Sr TO ... thanking God for more blessings :)

Friday, January 14, 2011

Might go back to part-time teaching ... Java and/or OOP PHP .. love to introduce Yii ...:) Thanks Oliver, my .NET co-faculty way back
I should a set time to finally share my twitter app as an open source ... after fixing the easy app registration process ... target tom
Visited MS Excel VBA again after 8 years. Great I was able to deliver ... well, accounting stuff ... hahaha

Thursday, January 13, 2011

Great, now I'm in CIO.com Forum ... just being grateful .... affirming positivity, peace and wealth abundance ...
Being grateful for so many opportunities to introduce Disaster Recovery, Agile Methodology, Yii, NetBeans, etc ... might teach again :)
Incremental Hourly/daily backup using cwRsync is great for Windows/Linux .... now I have them setup

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

Confirmed ..rsync in cygwin works in XP, time to rest, later will setup a script scheduled to backup from any windows to remote linux
Now testing if passwordless rsync/ssh possible from my WinXP Pro VM .... will be the best incremental windows-linux backup system!
Switching user account from DOS prompt, http://j.mp/ebQgwp

Saturday, January 08, 2011

Setting up rsync daemon in my remote Linux server to backup own SVN server ... a lot of reading being done ...
Continuously being amazed by Yii, quickly doing my development of Crewing System, http://bit.ly/PhilYiiUsersGroup totally OOP .. love it!

Thursday, January 06, 2011

Revisiting Yii for the exciting projects ... the Twitter Farm, Crewing System, Payroll, etc. I hope git is in NetBeans soon.

Saturday, January 01, 2011

Appreciating git ... with my own (Twitter Farm Management) and few projects coming up, I have to get ready. Happy New Year to all!

Wednesday, December 29, 2010

PHP Type casting, XML obj to string: $str = (string) $obj

Tuesday, December 28, 2010

Cool new wordpress plugin increases your subscribers and sales, awesome plugin! http://bit.ly/WPTurboCharger

Sunday, December 26, 2010

... inspiring video about Loving one's Self ... http://bit.ly/LovingYourself
... please check out this great movie: The A-Team .. http://goo.gl/UFXsD ...
.. please check out Glee Season Two, http://goo.gl/bFwvi ..

Saturday, December 25, 2010

My newly discovered youtube talents, and honestly they are wow! http://goo.gl/GCzon

Thursday, December 23, 2010

Thanks to this one-liner code, sed -i "/line you want to remove/d" /etc/apt/sources.list

Saturday, December 18, 2010

Check out the latest Desktop and Do-It-All Twitter Tool, http://bit.ly/TweetTwain

Friday, December 17, 2010

Prince Malik Official VIdeo " Billionare " Re-Mix Feat Jim Jones, http://bit.ly/PrinceMalik_BillionaireVideo
Wishing you all a beautiful journey ahead to the sacred place http://bit.ly/OnYourPath
TweetDeck App Racked Thousands Of Installations http://bit.ly/TweetDeck4Chrome .. this is now my new favorite app ...

Wednesday, December 15, 2010

Tuesday, December 14, 2010

Take the hassle out of choosing the perfect holiday gift, http://bit.ly/GiftGivingMadeEasy

Thursday, December 02, 2010

Please meet and follow twitter.com/moneymagnet1988 who owns marketingsecretsunlimited.com followback