This debate has been there for a while now. When first Android came up lots of apps started to gain people attention by promoting themselves as a task killer and speed booster. I have used them too, there is no blame on them. Android is not doing a good job in restricting applications on system… Continue reading Should you kill background tasks in Android?
Vagrant up and Vagrant Add Blank Error
Last week my boss told me that I have to be outstation in another state of Malaysia to be on the client side for a week. So since I work with a PC in company I requested for a laptop so when I’m outstation I can take it with me. Well as usual once I… Continue reading Vagrant up and Vagrant Add Blank Error
Laravel 5: Manual Pagination From Array.
Laravel documents is not covering anything about making a pagination from your custom array. its very nice and easy to use pagination out of the box with eloquent queries, but if you want to know how to do it with your custom arrays then you might find it hard searching around in their website. Anyway… Continue reading Laravel 5: Manual Pagination From Array.
Detect MIME type and buffer it to browser using PHP
The following piece of code handles detection of mime type, file size and existence of the file for you. I always use this piece for buffering files into browser of my users. if (file_exists($fileLocation)) { header(‘Content-Description: File Transfer’); header(‘Content-Type: ‘ .mime_content_type($fileLocation)); header(‘Content-Disposition: attachment; filename=”‘.basename($fileLocation).'”‘); header(‘Expires: 0’); header(‘Cache-Control: must-revalidate’); header(‘Pragma: public’); header(‘Content-Length: ‘ . filesize($fileLocation)); readfile($fileLocation);… Continue reading Detect MIME type and buffer it to browser using PHP
Keep Get Variables with Laravel 5 Pagination in Blade
Using pagination in Laravel views using blade will automatically add the pages get request to the page whenever you click on a page number. by default this will cause all other get requests of the page to be removed and replaced by ?pages. To overcome this you should use the pagination in your blade template… Continue reading Keep Get Variables with Laravel 5 Pagination in Blade