When comparing two arrays (in PHP), what is the difference between == and === ?
Wish happy independence day to all Indians.
I have not posted anything since a long time. I thought to break the silence with this small post.
I was appearing for a skill test in Advanced PHP. I scored 82% (though I was expecting to get 90%), but I am upset as the percentile is just 72%. During the skill test, I found many tricky questions. But I am discussing about this particular thing, as I did not found anyone discussing this on the Internet.
How to show your Facebook profile picture as large as possible?
You might have seen, some people has large images on their Facebook profile as their profile picture and some other people have tiny profile pictures. Do you want to make your Facebook profile picture as large as possible? It’s easy. Facebook profile picture has no limit on their height. But the width of the picture is limited to 158 pixels. So when you upload a photo with higher width (higher than the height) and do not crop it, then Facebook reduces the width to 158 pixels. As the height is related to the width, to show the image properly, the height again decreases to much lower size. For example, if the width of your photo is 1600 pixels and the height of the picture is 900 pixels, then after uploading it as your profile picture, the width becomes the fixed width size, 158 pixels and the height becomes 89 pixels. So your profile picture looks smaller in size.
Importing MySQL Database in Mac Terminal
Few days back I have posted “How to Dump MySQL Database to a file on Windows”. Exporting large database in phpMyAdmin is not much difficult (however command line is better), but importing large database in phpMyAdmin is a read headache. First you need to allow to upload a large file. For this you need to change your php settings (you need to modify php.ini file). Your application may not need to upload such large files, but you need to modify this for uploading large database dump file. Then it’ll take a bit long time to upload the huge database file. Then when phpMyAdmin will execute huge number of lines SQL, crossing the maximum execution time and again starting from the point, whether it just crossed maximum execution time. During this process, if you encounter any other problem, then you will have a bigger headache. So you should always prefer importing large MySQL database using command line, i.e. Terminal in Mac. You will find many resources on web discussing about how to Import MySQL Database in linux. But you will find very less resource on Importing MySQL Database in Mac Terminal. So, I decided to write about this here.
Dump MySQL Database to a file on Windows
Most of the people out there are talking about dumping MySQL Database to a file on Linux servers. Many of you must be using MySQL on Windows, with WAMP. However, most of the PHP and MySQL powered websites and applications are hosted on a Linux server, most of the developers must be using WAMP on Windows, as their local development platform. What if you added a new developer to the development team and you all are using your own computer as your local development environment, how will you provide the current MySQL database to the new developer. There is a great chance that you must be using phpMyAdmin. Using phpMyAdmin, you can export your database and save (download) it as a SQL file with zero compression or compressing as zipped or gzipped. But what if you have a large database (in my case, it’s around 100 MB, that means, lots of data)?
Eclairs to Froyo
Few months back, I felt like I should have a smartphone, which may make me smart. So, I was planning to get a Samsung Galaxy 3, which was a good Android phone on a low budget, as per the reviews I came across the web. And I got a good deal online, so I bought it. I got my first Android, with Eclairs (Android 2.1 is called as Eclairs).










