Code Is Poetry

Life is Binary

Posts

The last run query log in Cakephp

To debug and see the last run query in cakephp 2 you need to put the following code in AppModel.php and then call the method using through controller model method.AppMode.phpfunction getLastQuery() {   $dbo = $this->getDatasource();   $logs = $dbo->getLog();   $lastLog = end($logs['log']);   return $lastLog['query']; } SomethingsController.phpdebug($this->Something->getLastQuery());

Read more

Centereing a div in bootstrap 3

It is quite easy to do. You can use offset property of bootstrap 3 to achieve this. It can be done as follows:If your main class is for example col-lg-4 which you want to be centered than you have to use col-lg-offset-((12-4)/2) as your chain class beside that main class.<div class='container'><div class='col-lg-4 col-lg-offset-4'>some content goes here</div></div>

Read more

English Proverbs to learn english in structured way

"There's no time like the present." If you need to do something, don't wait until later. Do it now. "The pen is mightier than the sword." Trying to convince people with ideas and words is more effective than trying to force people to do what you want. "When in Rome, do as the Romans." Act the way that the people around you are acting. This phrase might come in handy when you're traveling abroad notice that people do things differently than you're used to. "Honesty is the best...

Read more

tiConf Dhaka at Digital Fair 2015

It was first arranged in Dhaka. It was held at China Bangladesh Conference in Hall - 02 hosted by CloudCampBangladesh. It was a long day session. It started from 9.30 am and ended at 3.00 pm.The speakers were from Australia, UK, Italy and USA and they spoke mainly on high lebel concept of mobile app development1. Alloy Framework and Best Practice – Fokke Zandbergen, Founder, App Imagineer2. Mobile First UX/UI with Titanium – Alessio Ricco, UX Evangelist, Titanium3. Extending The...

Read more

Paypal ipn code step by step

You will find in depth about how the IPN of Paypal works in the paypal site itself. Following that source code I have re touched it with addiitonal features like querying mysql database and using php file logging for debugging purpose. Use this ipn code with your caution. You will need paypal sandbox account first along with paypal developer account to implement this IPN.To test this ipn after completing integration whether it works properly or not, you can do it from your created...

Read more