du -sch FOLDER-NAME
Monthly Archives: September 2011
javascript load a url in new tab
javascript:window.open(‘www.example.oom’,’_blank’)
Install rar on ubuntu
1) Goto terminal and type the command sudo apt-get install rar
OR
2)Goto System->Administration->Synaptic Package Manager
Search for the package named rar and mark for installation. Then Apply.
check if value present in array – PHP
<?php
if(in_array(“val”,$array))
echo “Exists” ;
?>
if(in_array(“val”,$array))
echo “Exists” ;
?>
Validate a number – PHP
if(!is_numeric($number))
echo “Not a number”;
echo “Not a number”;
Validate a phone number – PHP
if( !preg_match(“/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i”, $phone_number) )
echo ‘Invalid Phone Number’;
echo ‘Invalid Phone Number’;
Code to display the option to select languages – vbulletin
<vb:if condition=”$show[‘languagechooser’]”>
<select name=”langid” onChange=”switch_id(this, ‘lang’)”>
<optgroup label=”{vb:rawphrase quick_language_chooser}”>
{vb:raw languagechooserbits}
</optgroup>
</select>
</vb:if>
<select name=”langid” onChange=”switch_id(this, ‘lang’)”>
<optgroup label=”{vb:rawphrase quick_language_chooser}”>
{vb:raw languagechooserbits}
</optgroup>
</select>
</vb:if>
Code to display the option to select templates – vbulletin
<vb:if condition=”$show[‘quickchooser’]”>
<select name=”styleid” onChange=”switch_id(this, ‘style’)”>
<optgroup label=”{vb:rawphrase quick_style_chooser}”>
{vb:raw quickchooserbits}
</optgroup>
</select>
</vb:if>
<select name=”styleid” onChange=”switch_id(this, ‘style’)”>
<optgroup label=”{vb:rawphrase quick_style_chooser}”>
{vb:raw quickchooserbits}
</optgroup>
</select>
</vb:if>
Install font Ubuntu
1) Download the required font
2) Create the folder mkdir /home/<YOUR_USERNAME>/.fonts
3) Move the downloaded font to the folder “.fonts“
2) Create the folder mkdir /home/<YOUR_USERNAME>/.fonts
3) Move the downloaded font to the folder “.fonts“
Linux command install tasksel – ubuntu
sudo apt-get install tasksel