<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ask Your Question &#187; Tips n Tricks</title>
	<atom:link href="http://askbahar.com/category/tips-n-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://askbahar.com</link>
	<description>Lets Talk</description>
	<lastBuildDate>Sun, 11 Mar 2012 09:50:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to add command shortcut in Ubuntu shell</title>
		<link>http://askbahar.com/2011/04/01/how-to-add-command-shortcut-in-ubuntu-shell/</link>
		<comments>http://askbahar.com/2011/04/01/how-to-add-command-shortcut-in-ubuntu-shell/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 04:43:30 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=111</guid>
		<description><![CDATA[<p>When you need to write long commands in Linux shell, like me, you must have been looking for a way (if you haven&#8217;t found the way already ) to create shortcuts for those long commands.<br /> Based on your need, you can do any of the following:<br /> alias: If you need a shortcut for [...]]]></description>
			<content:encoded><![CDATA[<p>When you need to write long commands in Linux shell, like me, you must have been looking for a way (if you haven&#8217;t found the way already <img src='http://askbahar.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) to create shortcuts for those long commands.<br />
Based on your need, you can do any of the following:<span id="more-111"></span><br />
<strong>alias: </strong>If you need a shortcut for only the current shell session, use alias.</p>
<ul>
<li>To check current aliases list: <em>alias</em></li>
<li>To check an existing alias: <em>alias ALIAS_NAME</em></li>
<li>To add new alias: <em>alias </em><em>COMMAND_SHORTCUT = </em><em>&#8216;LONG_COMMAND&#8217; </em>[example: <em>alias apacheReload = '/etc/init.d/apache2 reload'''</em>]</li>
<li>To remove an existing alias: <em>unalias ALIAS_NAME</em></li>
<li>Learn more about alias at <a href="http://en.wikipedia.org/wiki/Alias_%28command%29" target="_blank">Wikipedia</a>, <a href="http://ss64.com/bash/alias.html" target="_blank">Bash Man Page for Alias</a></li>
</ul>
<p><strong>Symbolic Links: </strong>This is actually my favorite. Does not depend on current shell session. FYI. each command is actually an executable script.</p>
<ul>
<li>To create a shortcut for all users, create a soft symbolic link of the executable script in <em>/usr/local/bin</em>. For example, to execute apache related commands using just apache, issue this command<br />
<em>ln -s /etc/init.d/apache2 /usr/local/bin/apache </em>#this command will create a soft symbolic link of apache2 in /usr/local/bin directory. Now you can just manage apache by using <em>apache</em> command<em>.</em></li>
<li>To create a shortcut only for current user, create a soft symbolic link of the executable script in <em>$HOME/bin</em></li>
</ul>
<p><strong>Using your own shell scripts</strong>: This requires understanding of shell scripting. You can create a shell script which essentially provide the full ability to create new system commands. Make the script executable, keep it in home directory.</p>
<p>&nbsp;</p>
<p>I hope it helps some one. Please use the comment section to provide your feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2011/04/01/how-to-add-command-shortcut-in-ubuntu-shell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to run Python scripts in your shared hosting server</title>
		<link>http://askbahar.com/2010/10/28/how-to-run-python-scripts-in-your-shared-hosting-server/</link>
		<comments>http://askbahar.com/2010/10/28/how-to-run-python-scripts-in-your-shared-hosting-server/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 03:38:18 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Shared Hosting]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[cgi-bin]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[run python]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=108</guid>
		<description><![CDATA[<p>Direct to the how-to </p> First make sure your hosting supports Python. Now a days almost all shared hosting providers support Python. Find your python installation location, this is required for &#8220;shebang&#8221; line added at the top of your python script. Usually this is /usr/bin/python or /usr/local/bin/python Make sure to include two print statements which [...]]]></description>
			<content:encoded><![CDATA[<p>Direct to the how-to <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ol>
<li>First make sure your hosting supports Python. Now a days almost all shared hosting providers support Python.</li>
<li>Find your python installation location, this is required for &#8220;shebang&#8221; line added at the top of your python script. Usually this is <em>/usr/bin/python </em>or <strong><em>/usr/local/bin/python</em></strong></li>
<li>Make sure to include two print statements which will print the content-type and an empty line.<strong> </strong></li>
<li>Now put the script in <em>cgi-bin</em> directory inside your root public folder, usually <strong><em>public_html</em></strong></li>
<li>Change the permission of the script to <strong><em>0755</em></strong></li>
<li>Try to browse now <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p><span id="more-108"></span></p>
<p>Example, hello.py:</p>
<blockquote><p>#! /usr/bin/python</p>
<p>print &#8216;Content-type: text/html&#8217;<br />
print &#8221;<br />
print &#8216;Hello, World!&#8217;</p></blockquote>
<p>Now look at the top of hello.py script, you will notice the &#8216;shebang&#8217; is <strong><em>#! /usr/bin/python</em></strong>.And also the first two print statements <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now its little bit annoying to put all python scripts inside that cgi-bin directory. So heres what you will need to do to run a python script inside any directory&#8230;</p>
<ol>
<li>Make an empty <em style="font-weight: bold;">.htaccss </em>file inside the directory you want to drop your python scripts. (Just open the existing .htaccess file, make sure you have enabled &#8216;Show Hidden Files&#8217; in cPanel File Manager or in your favorite FTP manager)</li>
<li>Add the following two lines and save.</li>
</ol>
<blockquote><p>Options +ExecCGI<br />
AddHandler cgi-script .py</p></blockquote>
<p>Tips:</p>
<ol>
<li>You will get <em style="font-weight: bold;">500 </em>error if anything goes wrong.</li>
<li>Make sure to clear your cache, when you modify any settings/content</li>
<li>And there is always the nice people waiting for you in hosting support section, try them <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>I hope it helps. Let me know your comment <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/10/28/how-to-run-python-scripts-in-your-shared-hosting-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What is the difference between the variables of Python and other language</title>
		<link>http://askbahar.com/2010/10/25/difference-between-variables-of-python-and-other-language/</link>
		<comments>http://askbahar.com/2010/10/25/difference-between-variables-of-python-and-other-language/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 14:31:11 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Object Oriented Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[identifier]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=104</guid>
		<description><![CDATA[<p>If you are from C/C++/Java and started learning Python, this should be an interesting topic for you.</p> <p>In languages like C, C++, Java, PHP etc a variable is a memory location where its value is saved. When you copy a variable into another variable, both of them still in existence and you can use both [...]]]></description>
			<content:encoded><![CDATA[<p>If you are from C/C++/Java and started learning Python, this should be an interesting topic for you.</p>
<p>In languages like C, C++, Java, PHP etc a variable is a memory location where its value is saved. When you copy a variable into another variable, both of them still in existence and you can use both of them.</p>
<p>But in Python, its different. As a matter of fact Python don&#8217;t have any variables, it has &#8216;name&#8217; or &#8216;identifier&#8217; attached to an object (everything in Python is an object).</p>
<p>Let me clear this using an example:</p>
<p><span id="more-104"></span></p>
<blockquote><p>In other language:</p>
<p>int a_variable = 1; //Here a_variable has a value of 1.</p>
<p>a_variable = 2; //Now a_variable has an updated value of 2.</p>
<p>int another_variable = a_variable; //Now another_variable is a new variable with a value of 2.</p>
<p>int sum = a_variable + another_variable; //you can still use both of the variables.</p>
<p>In Python:</p>
<p>a_variable = 1  #Here integer object 1 (see, everything is an object) has a name tag (or identifier) &#8216;a_variable&#8217;</p>
<p>a_variable = 2 #Now a_variable name tag is now attached to integer object 2. Old integer object 1 can&#8217;t be accessed via a_variable anymore.</p>
<p>another_variable = a_variable #Now both another_variable and a_variable name tag is attached to integer object 2.</p></blockquote>
<p>Though we still call them variables in Python, but you see, they behave differently (almost like the pointers in C).</p>
<p>I hope it helps. Let me know your comments <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/10/25/difference-between-variables-of-python-and-other-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to restore volume icon in Ubuntu Gnome</title>
		<link>http://askbahar.com/2010/09/21/restore-volume-icon-in-ubuntu/</link>
		<comments>http://askbahar.com/2010/09/21/restore-volume-icon-in-ubuntu/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 04:09:39 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[volume]]></category>
		<category><![CDATA[volume icon]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=96</guid>
		<description><![CDATA[<p>So why would someone need this at the first place? When someone like me make a stupid mistake by removing them </p> <p>Restoring volume icon is different in Ubuntu 9.10 or later versions.<br /> </p> <p>So if you are in Ubuntu 9.04 or earlier,</p> <p>1. Right click on the panel and click &#8216;Add to Panel&#8217;</p> [...]]]></description>
			<content:encoded><![CDATA[<p>So why would someone need this at the first place? When someone like me make a stupid mistake by removing them <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Restoring volume icon is different in Ubuntu 9.10 or later versions.<br />
<span id="more-96"></span></p>
<p>So if you are in Ubuntu 9.04 or earlier,</p>
<blockquote><p>1. Right click on the panel and click &#8216;Add to Panel&#8217;</p>
<p>2. Find Sound/Volume</p>
<p>3. Add it.</p></blockquote>
<p>And if you are in Ubuntu 9.10 or later like me</p>
<blockquote><p>1. Right click on the panel and click on Add to Panel</p>
<p>2. Find &#8216;Notification Area&#8217; and add it. (IN case you have already have a notification area added like me, you can skip this step).</p>
<p>3. Right click near Notification Area</p>
<p>4. Find &#8216;Indicator Applet&#8217; and add it.</p></blockquote>
<p>By any chance if the above method does not work for you, you can restore your gnome panel by applying following commands in your terminal.</p>
<blockquote><p><code>rm -f ~/.gconf/apps/panel<br />
sudo /etc/init.d/gdm restart</code></p></blockquote>
<p>Partial credit for this post: <a href="http://ubuntuforums.org/showthread.php?t=1357005" target="_blank">Ubuntu Forum</a> <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Let me know if you have any problem figuring this <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/09/21/restore-volume-icon-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prepare bootable flash drive of Windows 7 and Ubuntu</title>
		<link>http://askbahar.com/2010/09/19/prepare-bootable-flash-drive-windows-7-ubuntu/</link>
		<comments>http://askbahar.com/2010/09/19/prepare-bootable-flash-drive-windows-7-ubuntu/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 13:11:36 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Bootable ISO]]></category>
		<category><![CDATA[Links Collection]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Maverick]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[boot os]]></category>
		<category><![CDATA[bootable ubuntu]]></category>
		<category><![CDATA[flash drive]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[universal usb installer]]></category>
		<category><![CDATA[winodws 7]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=92</guid>
		<description><![CDATA[<p>There are bunch of articles and softwares available online to achieve this. So instead of writing another tutorial, I am sharing the available tutorials which I have used often when I needed.</p> <p>Here are the links:</p> <p>Make your own bootable Windows 7 Flash Drive</p> Recommended: <a href="http://kmwoley.com/blog/?p=345" target="_blank">http://kmwoley.com/blog/?p=345</a> Without using any additional software: <a href="http://maketecheasier.com/boot-and-install-windows-7-from-usb-flash-drive/2009/01/23" target="_blank">http://maketecheasier.com/boot-and-install-windows-7-from-usb-flash-drive/2009/01/23</a> With [...]]]></description>
			<content:encoded><![CDATA[<p>There are bunch of articles and softwares available online to achieve this. So instead of writing another tutorial, I am sharing the available tutorials which I have used often when I needed.</p>
<p>Here are the links:</p>
<p><strong>Make your own bootable Windows 7 Flash Drive</strong></p>
<ul>
<li>Recommended: <a href="http://kmwoley.com/blog/?p=345" target="_blank">http://kmwoley.com/blog/?p=345</a></li>
<li>Without using any additional software: <a href="http://maketecheasier.com/boot-and-install-windows-7-from-usb-flash-drive/2009/01/23" target="_blank">http://maketecheasier.com/boot-and-install-windows-7-from-usb-flash-drive/2009/01/23</a></li>
<li>With Microsoft provided software: <a href="http://store.microsoft.com/help/iso-tool]http://store.microsoft.com/help/iso-tool" target="_blank">http://store.microsoft.com/help/iso-tool]http://store.microsoft.com/help/iso-tool</a> (only 2.6 MB)</li>
<li>Using 3rd party software: <a href="http://maketecheasier.com/updated-boot-and-install-windows-7-from-usb-flash-drive/2009/09/" target="_blank">http://maketecheasier.com/updated-boot-and-install-windows-7-from-usb-flash-drive/2009/09/</a> (only 6.7 MB)</li>
</ul>
<p><strong>Make bootable Ubuntu using Flash Drive</strong></p>
<p>Actually this is very much easy, and same for all distro. all are free n opensource.</p>
<ul>
<li><a href="http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/" target="_blank">Universal USB Installer</a></li>
<li><a href="http://unetbootin.sourceforge.net/" target="_blank">UNetbootin</a></li>
</ul>
<p>I hope it helps, if you need any help, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/09/19/prepare-bootable-flash-drive-windows-7-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Sun Java JDK/JRE in Ubuntu Maverick</title>
		<link>http://askbahar.com/2010/09/18/how-to-install-sun-java-jdkjre-in-ubuntu-maverick/</link>
		<comments>http://askbahar.com/2010/09/18/how-to-install-sun-java-jdkjre-in-ubuntu-maverick/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 04:24:49 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Java JDK]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Maverick]]></category>
		<category><![CDATA[jdk install problem]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[sun jdk]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=85</guid>
		<description><![CDATA[<p>As Sun (Oracle) repos has been removed completely from Ubuntu Partner repos in Ubuntu Maverick, you can&#8217;t install Sun Java JDK or JRE any more.</p> <p>Running sudo apt-get install sun-java6-jdk will produce the following error</p> Package sun-java6-jre is not available, but is referred to by another package. This may mean that the package is missing, [...]]]></description>
			<content:encoded><![CDATA[<p>As Sun (Oracle) repos has been removed completely from Ubuntu Partner repos in Ubuntu Maverick, you can&#8217;t install Sun Java JDK or JRE any more.</p>
<p>Running <strong>sudo apt-get install sun-java6-jdk </strong>will produce the following error</p>
<pre dir="ltr"><strong>Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate</strong></pre>
<p><span id="more-85"></span><br />
Same error will be produced if you want to install Sun JAVA JRE.</p>
<p>To solve the issue, you have to switch back to <strong>Ubuntu Lucid </strong>distribution temporarily. After installing JDK/JRE switch back to original Ubuntu Maverick distro again.</p>
<blockquote><p><em><span style="font-style: normal;">1. System-&gt;Administrator-&gt;Synaptic Package Manager</span></em></p>
<p><em><span style="font-style: normal;">2. Settings-&gt;Repositories</span></em></p>
<p><em><span style="font-style: normal;">3. Other Softwares</span></em></p>
<p><em><span style="font-style: normal;">4. Select Canonical Partners, click Edit, change Distribution to <strong>lucid</strong>, click OK</span></em></p>
<p><em><span style="font-style: normal;">5. Repeat step 4 for Canonical Partner (Source Code)</span></em></p>
<p><em><span style="font-style: normal;">6. Hit Reload</span></em></p></blockquote>
<p>Now try to install Sun Java JDK/JRE <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Don&#8217;t forget to change back to original distribution <strong>Maverick </strong>following the same steps once you are done.</p>
<p>Tips credit: <a href="http://www.thewindows7site.com/forum/threads/18438-Ubuntu-10.10-Maverick-Meercat-and-Sun-JRE" target="_blank">Ubuntu 10.10 Maverick Meercat and Sun JRE</a></p>
<p>If you need any help, have any query please use the comment form below <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/09/18/how-to-install-sun-java-jdkjre-in-ubuntu-maverick/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu Maverick (beta) repository problem</title>
		<link>http://askbahar.com/2010/09/18/ubuntu-maverick-repository-problem/</link>
		<comments>http://askbahar.com/2010/09/18/ubuntu-maverick-repository-problem/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 04:06:28 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Maverick]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu repository]]></category>
		<category><![CDATA[vlc install problem]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=82</guid>
		<description><![CDATA[<p>I used to be a Fedora distro fan, but considering the popularity of Ubuntu, I have decided to try Ubuntu, and downloaded the latest one, <a title="Try Ubuntu Maverick" href="http://www.ubuntu.com/testing/maverick/beta" target="_blank">Ubuntu Maverick (10.10 beta) </a>.</p> <p>After installation, first I enabled Ubuntu Multiverse repository then tried to install vlc applying the following command in terminal:</p> <p [...]]]></description>
			<content:encoded><![CDATA[<p>I used to be a Fedora distro fan, but considering the popularity of Ubuntu, I have decided to try Ubuntu, and downloaded the latest one, <a title="Try Ubuntu Maverick" href="http://www.ubuntu.com/testing/maverick/beta" target="_blank">Ubuntu Maverick (10.10 beta) </a>.</p>
<p>After installation, first I enabled Ubuntu Multiverse repository then tried to install vlc applying the following command in terminal:</p>
<p style="padding-left: 30px;"><strong>sudo apt-get update</strong></p>
<p style="padding-left: 30px;"><strong>sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc</strong></p>
<p>But I got this error:</p>
<blockquote><p>Reading package lists&#8230; Done<br />
Building dependency tree<br />
Reading state information&#8230; Done<br />
E: Couldn&#8217;t find package vlc</p></blockquote>
<p><span id="more-82"></span><br />
<em> After some investigation, I found out that some Ubuntu mirror repositories aren&#8217;t fully updated for Maverick yet. </em><em><strong>Bangladesh Ubuntu mirror</strong> is one of them <img src='http://askbahar.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </em></p>
<p><em>Solution? Just change the active mirror server to US or main server. I changed mine to Singapore eznetsols.org mirror.</em></p>
<p><em><span style="font-style: normal;">To change using GUI, </span></em></p>
<blockquote><p><em><span style="font-style: normal;">1. System-&gt;Administrator-&gt;Synaptic Package Manager</span></em></p>
<p><em><span style="font-style: normal;">2. Settings-&gt;Repositories</span></em></p>
<p><em><span style="font-style: normal;">3. Click on Download From drop down menu, select Other, then choose a better mirror server near your location.</span></em></p>
<p><em><span style="font-style: normal;">4. Hit Reload</span></em></p>
<p><em><span style="font-style: normal;">5. Now install any package you want <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></em></p></blockquote>
<p>I hope it helps. For any query/help please use the comment from below.</p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/09/18/ubuntu-maverick-repository-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the difference between this &amp; this(), super &amp; super()</title>
		<link>http://askbahar.com/2010/07/30/difference-this-super/</link>
		<comments>http://askbahar.com/2010/07/30/difference-this-super/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 04:34:41 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Object Oriented Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[super]]></category>
		<category><![CDATA[this]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=73</guid>
		<description><![CDATA[<p>Well the topic is a basic in OOP, when I first learned my first OO language (C++ back in 2004), I have learned the basic. Few days ago some one asked the question, suddenly I become confused, so I made a quick research, and decided to post </p> <p>this and super both are object. this() [...]]]></description>
			<content:encoded><![CDATA[<p>Well the topic is a basic in OOP, when I first learned my first OO language (C++ back in 2004), I have learned the basic. Few days ago some one asked the question, suddenly I become confused, so I made a quick research, and decided to post <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>this </strong>and <strong>super </strong>both are object. <strong>this() </strong>and <strong>super() </strong>both are constructors.</p>
<p><strong>this </strong>is the object of current class.</p>
<p><strong>this() </strong>is the constructor of current class.</p>
<p><strong>super </strong>is the object of parent class.</p>
<p><strong>super()</strong> is the constructor of parent class.</p>
<p><strong>Example (</strong><em>in java) </em>please check out this nice example provided in <a title="Java Constructors" href="http://leepoint.net/notes-java/oop/constructors/constructor.html" target="_self">this link</a></p>
<p>I hope this will save someone&#8217;s day <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/07/30/difference-this-super/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to generate getter/setter in PHP easily</title>
		<link>http://askbahar.com/2010/07/14/generate-getter-setter-in-php-easily/</link>
		<comments>http://askbahar.com/2010/07/14/generate-getter-setter-in-php-easily/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 04:21:16 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[get-set]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=70</guid>
		<description><![CDATA[<p>For one of my current project I need to write getter/setter functions for 20+ variables. You know, how annoying it is! Well, I can use magic quotes, but I don&#8217;t like it. More over getter setter will help you later to use the class when your IDE (in my case <a title="Netbeans IDE" href="http://netbeans.org" target="_self">Netbeans</a>) [...]]]></description>
			<content:encoded><![CDATA[<p>For one of my current project I need to write getter/setter functions for 20+ variables. You know, how annoying it is! Well, I can use magic quotes, but I don&#8217;t like it. More over getter setter will help you later to use the class when your IDE (in my case <a title="Netbeans IDE" href="http://netbeans.org" target="_self">Netbeans</a>) supports <em>auto complete suggestion</em>. Though all Java development environments allow to generate getter and  setter code automatically.<br />
Then I started coding a php script for generating getter/setter for supplied variables, but I was lucky as suddenly I thought &#8220;why don&#8217;t I look for something like this online&#8221; <img src='http://askbahar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And here is the link I got, its quite good. <a title="PHP Getter Setter Generator" href="http://www.icurtain.co.uk/getset.php" target="_blank">http://www.icurtain.co.uk/getset.php</a>, It saved my time.</p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2010/07/14/generate-getter-setter-in-php-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable Apache HTTP Authentication using PHP</title>
		<link>http://askbahar.com/2009/11/11/enable-apache-http-authentication-using-php/</link>
		<comments>http://askbahar.com/2009/11/11/enable-apache-http-authentication-using-php/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 09:24:39 +0000</pubDate>
		<dc:creator>Habib Ullah Bahar</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://askbahar.com/?p=48</guid>
		<description><![CDATA[<p>The easiest way to password-protect a site is to use HTTP Authentication, where if a browser’s request for a protected page is not accompanied by the correct username and password, the Web server replies with an HTTP 401 error – which means “Unauthorized Access” – and an invitation for the browser to re-submit the request [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest way to password-protect a site is to use HTTP Authentication, where if a browser’s request for a protected page is not accompanied by the correct username and password, the Web server replies with an HTTP 401 error – which means “Unauthorized Access” – and an invitation for the browser to re-submit the request with a proper username and password. From the user’s point of view, most of this dialogue is hidden. Following that first failed request, the browser prompts the user (in a dialog box) for a username and password, and then re-submits the request, this time with the authentication information attached. Assuming the username/password combo is on the list of allowed users, the Web server then sends the page requested. The Web browser will likewise continue to send that username/password with all subsequent requests.</p>
<p>Look at the following code:<br />
<span id="more-48"></span></p>
<pre>
<code>
<?php
/*
    Document   : auth
    Created on : Nov 11, 2009, 9:08:32 AM
    @author    : Bahar
    Email      : bahar@progmaatic.com
    Copyright  : http://progmaatic.com

    Description: Authenticate user
*/

require_once 'settings.php';

$failure_msg = " <HTML>
 <HEAD><TITLE>Authorization Failed</TITLE></HEAD>
 <BODY>
 <H1>Authorization Failed</H1>
 <P>Without a valid username and password,
    access to this page cannot be granted.
    Please click 'reload' and enter a
    username and password when prompted.
 </P>
 </BODY>
 </HTML>";

if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!==$site_user || $_SERVER['PHP_AUTH_PW']!==$site_pass)
   {
       header("WWW-Authenticate: Basic realm=\"Protected Page: Enter your username and password for access.\"");
       header("HTTP/1.0 401 Unauthorized");
       exit($failure_msg);
   }

?>
</code>
</pre>
<p>For each page, you want to authenticate user, each page must have the above code. You can save this code to a script (for example <em>auth.php</em>) and include <em>auth.php</em> to any page, hence save yourself from rewriting the code for each page.</p>
]]></content:encoded>
			<wfw:commentRss>http://askbahar.com/2009/11/11/enable-apache-http-authentication-using-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

