By default Surface Pro 3 will go into deep sleep (hibernate) mode once you don’t use it for around 4 hours. which is basically a good feature. it helps a lot with the battery. Recently I realized that my surface pro 3 which is running latest version of windows 10 is not going to that state… Continue reading Fix: Surface Pro 3 is not going to deep sleep in Windows 10
Category: Technology
Should you kill background tasks in Android?
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