Posts

Showing posts from March, 2013

How to get most recent date from an array of dates?

$all_dates = array( "15-03-2015-14:50", "16-03-2013-14:50", "15-08-2017-14:52", "15-03-2014-14:50", "20-03-2016-14:50", ); // foreach($all_dates as $date_one){ $date_one_to_string = strtotime($date_one); $all_date_strings[$date_one] = $date_one_to_string; } arsort($all_date_strings); $latest_date_strings = current($all_date_strings); $key = array_search($latest_date_strings, $all_dates); print 'Latest Date Is :'.$latest_date_strings;

Install urdu fonts in Linux (Ubuntu)

1- NafeesWeb.ttf (For urdupoint.com etc) Go to  http://www.crulp.org/software/localization/Fonts/nafeesWebNaskh.html Download the file with title ‘ Font with MS VOLT project source ‘. Unzip it. 2- asunaskh.ttf (For bbcurdu.com etc) Download from http://www.quran.or.kr/urdu/font/asunaskh.ttf 1- Go to your home directory like /home/[name]. You can use nautilus for this. Click on Places -> Computer and then navigate to your home directory . 2- Now click on ‘ View ‘ in the menu and click ‘ Show hidden files ‘. Or you can use Ctrl+h . 3- Search for folder .fonts . Just create it if it is not there, right click and create a directory with name without quotes ‘ .fonts ‘. 4- Now copy the fonts from the downloaded directory and paste it in .fonts directory. 5- Open terminal and type sudo fc-cache -vf Enter your password if asked 6- Thats it, restart the browsers and check the websites.

Installing Gnome 3 on Ubuntu 12.04

Image
Installing Gnome 3 on Ubuntu 12.04 is very easy. Just copy-paste the following lines for the latest release from the Gnome team into a terminal. sudo add-apt-repository ppa:gnome3-team/gnome3 sudo apt-get update sudo apt-get install gnome-shell Now reboot your computer and when you see your login screen you have the following additional options (click on the little Ubuntu icon next to your login name).