<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;C0cCSH84cSp7ImA9WhRbF0U.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205</id><updated>2012-02-09T01:51:09.139-08:00</updated><category term="PHP" /><category term="regex" /><category term="Python" /><category term="story" /><category term="Firefox" /><category term="emacs" /><category term="Hosting service" /><category term="Thoughts" /><category term="ubuntu" /><category term="JavaScript" /><category term="Experience" /><category term="Information" /><category term="django" /><category term="wordpress" /><title>SIMPLE_THOUGHTS</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Simple_thoughts" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="simple_thoughts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUYCRHo9eSp7ImA9WhRUEEQ.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-3823130902646414788</id><published>2012-01-20T12:59:00.000-08:00</published><updated>2012-01-20T12:59:25.461-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-20T12:59:25.461-08:00</app:edited><title>Ubuntu 11.10 Recording Sound from the Sound Card</title><content type="html">From the top right corner select sound preference. In the Hardware tab Select the profile 'Analog Stereo Output'.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Install audacity if you don't have. Open audacity, got to Edit&amp;gt;Preference from the devices list select pulse0 as the recording interface.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now record any sound as usual from the audacity&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-3823130902646414788?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IaRxKLh9TR_BctE3Utvkf7qQAZU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IaRxKLh9TR_BctE3Utvkf7qQAZU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IaRxKLh9TR_BctE3Utvkf7qQAZU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IaRxKLh9TR_BctE3Utvkf7qQAZU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/3823130902646414788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2012/01/ubuntu-1110-recording-sound-from-sound.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3823130902646414788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3823130902646414788?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2012/01/ubuntu-1110-recording-sound-from-sound.html" title="Ubuntu 11.10 Recording Sound from the Sound Card" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ICR3w6fCp7ImA9WhRVGUg.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-920157234238027628</id><published>2012-01-17T22:17:00.000-08:00</published><updated>2012-01-18T21:39:26.214-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-18T21:39:26.214-08:00</app:edited><title>Wikipedia Unblocked, Google Chrome Extension</title><content type="html">&lt;b&gt;&lt;u&gt;Wikipedia is unlocked now and this post is obsolete. If you had installed this chrome extension you can remove the extension now.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I respect the wikipedia protest against &lt;a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act"&gt;SOPA&lt;/a&gt;&amp;nbsp;but I can't pass a minute without the amazing wiki. So I made a simple chrome extenstion to unveil my beloved wiki.&lt;br /&gt;
&lt;br /&gt;
You can Install &amp;nbsp;the extension from here. For installing you have to browse this page with the google chrome browser.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ravens4you.com/chrome.crx"&gt;INSTALL&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;It will show you a warning like ''applications, extensions can harm your computer", you will have to continue the installation and you're done.&lt;br /&gt;
&lt;br /&gt;
Then you visit any en.wikipedia.org link in your google chrom browser and the overlay will be removed automatically.&lt;br /&gt;
&lt;br /&gt;
P.S. If you don't want to install an extension you can switch off the javascript from your browser. You can remove the extension tomorrow as it will be useless.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-920157234238027628?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vFjsYh37zodqJZcab0AqLuWa5Uo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vFjsYh37zodqJZcab0AqLuWa5Uo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vFjsYh37zodqJZcab0AqLuWa5Uo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vFjsYh37zodqJZcab0AqLuWa5Uo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/920157234238027628/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2012/01/wikipedia-unblocked-google-chrome.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/920157234238027628?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/920157234238027628?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2012/01/wikipedia-unblocked-google-chrome.html" title="Wikipedia Unblocked, Google Chrome Extension" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE8DRHY4fCp7ImA9WhdXFk8.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-7689511668287401270</id><published>2011-08-29T04:06:00.000-07:00</published><updated>2011-08-29T07:07:55.834-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-29T07:07:55.834-07:00</app:edited><title>Ruby Books</title><content type="html">I have been working on ruby. Best book I have found is "Programmin Ruby" By Dave Thomas.&lt;br /&gt;
&lt;br /&gt;
The language which has best documentation is "PHP" . The php manual is all what you need, I was searching something like that in ruby and 'Programming Ruby' is the gem.&lt;br /&gt;
&lt;br /&gt;
Sadly I haven't found such documentation for Python.&lt;br /&gt;
http://docs.python.org/ is 'ok' to me but it has not been effective like 'php' or 'ruby' .&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-7689511668287401270?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/L3rxnKfv8bTzu6R9dRiSMrXsgQA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L3rxnKfv8bTzu6R9dRiSMrXsgQA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/L3rxnKfv8bTzu6R9dRiSMrXsgQA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L3rxnKfv8bTzu6R9dRiSMrXsgQA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/7689511668287401270/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/08/ruby-books.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/7689511668287401270?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/7689511668287401270?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/08/ruby-books.html" title="Ruby Books" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkEBQX44eyp7ImA9WhdXFUw.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-1073967128635747205</id><published>2011-08-27T22:46:00.000-07:00</published><updated>2011-08-27T22:50:50.033-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-27T22:50:50.033-07:00</app:edited><title>Ruby on Rails Apache passenger defaults to production environment</title><content type="html">I have been playing with ROR. I had been experimenting with WebRick server that comes with rails but default.&lt;br /&gt;
I tried to test my app with apache passenger module/mod_rails.&lt;br /&gt;
Passenger will assume the environment as 'production'.&lt;br /&gt;
On the other hand when you use rake db:migrate command it works for the 'development' environment.&lt;br /&gt;
&lt;br /&gt;
If you want to use passenger for testing/development enviroment use the &lt;br /&gt;
rake db:migrate RAILS_ENV=production command.&lt;br /&gt;
&lt;br /&gt;
or set the RailsEnv in your .conf file or in a .htaccess file(If AllowOverride is&amp;nbsp; set ).&lt;br /&gt;
For details visit here.&lt;br /&gt;
&lt;a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html"&gt;http://www.modrails.com/documentation/Users%20guide%20Apache.html&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-1073967128635747205?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QmwJhetYPOf_Ytwl9L0gFVP6Mns/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QmwJhetYPOf_Ytwl9L0gFVP6Mns/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QmwJhetYPOf_Ytwl9L0gFVP6Mns/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QmwJhetYPOf_Ytwl9L0gFVP6Mns/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/1073967128635747205/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/08/ruby-on-rails-apache-passenger-defaults.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/1073967128635747205?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/1073967128635747205?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/08/ruby-on-rails-apache-passenger-defaults.html" title="Ruby on Rails Apache passenger defaults to production environment" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUUAQHozeCp7ImA9WhdQGE4.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-339223345009824831</id><published>2011-08-20T02:40:00.000-07:00</published><updated>2011-08-20T02:40:41.480-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-20T02:40:41.480-07:00</app:edited><title>javascript IE compatibility</title><content type="html">I was pulling my hair off today when Nothing seemed to work at IE. After Some careful debuggin got out of it.&lt;br /&gt;
'class' is reserved at IE, MIDORi will not validate the script.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-339223345009824831?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tgZ5RvwFKPVP8Ck-95x6gMc8WSM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tgZ5RvwFKPVP8Ck-95x6gMc8WSM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tgZ5RvwFKPVP8Ck-95x6gMc8WSM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tgZ5RvwFKPVP8Ck-95x6gMc8WSM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/339223345009824831/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/08/javascript-ie-compatibility.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/339223345009824831?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/339223345009824831?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/08/javascript-ie-compatibility.html" title="javascript IE compatibility" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A04EQHs4fSp7ImA9WhZUGEU.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-70732156662173677</id><published>2011-06-12T07:45:00.000-07:00</published><updated>2011-06-12T07:45:01.535-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-12T07:45:01.535-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hosting service" /><title>Godaddy</title><content type="html">I have been using &amp;nbsp;&lt;a href="http://x.co/Xj8q"&gt;GoDaddy&lt;/a&gt;&amp;nbsp;for two months now. This is the time to make a review of their service. &amp;nbsp;What I like about GoDadday is domain name registration service. They will tempt you &amp;nbsp;to shop more by offering discount. &amp;nbsp;They have a fine dns manager, which I had used to configure appengine.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;I don't like the hosting service of godaddy, Sometimes the server was really slow especially the cpanel. &amp;nbsp;I have been using hostgator and I like their service.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-70732156662173677?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KWWZZnIW1l7v36O77ZF_kM_9MVs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KWWZZnIW1l7v36O77ZF_kM_9MVs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KWWZZnIW1l7v36O77ZF_kM_9MVs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KWWZZnIW1l7v36O77ZF_kM_9MVs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/70732156662173677/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/06/godaddy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/70732156662173677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/70732156662173677?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/06/godaddy.html" title="Godaddy" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUcHQX07cSp7ImA9WhZVGU8.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-2512567181963362041</id><published>2011-05-31T15:16:00.000-07:00</published><updated>2011-06-01T04:17:10.309-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-01T04:17:10.309-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Ubuntu Recovering Boot menu after installing Windows</title><content type="html">&lt;b&gt;&lt;u&gt;For Ubuntu 9.10 or later:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
If you have installed windows OS after installing ubuntu &amp;nbsp;and windows has deleted the &lt;a href="http://en.wikipedia.org/wiki/Master_boot_record"&gt;mbr(Master Boot Record)&lt;/a&gt;&amp;nbsp;&amp;nbsp;you can't see the ubuntu at your boot menu, Try this solution.&lt;br /&gt;
&lt;br /&gt;
Boot &amp;nbsp;from a Ubuntu CD and select Try Ubuntu&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;First Step: &amp;nbsp;Just checking the Hard Disk&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;br /&gt;
Open a Terminal,Type in:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;pre style="background-color: #f0eee6; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; font-family: courier, monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; white-space: pre-wrap; word-wrap: break-word;"&gt;sudo fdisk -l&lt;/pre&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
If you are Using only one Hard Disk, &amp;nbsp;Your Boot record will be in that disk But if you are using two or more and mark the Hard Disk that you have selected to boot first from your Bios Settings.&lt;br /&gt;
If you are using one HD your device is - /dev/sda&lt;br /&gt;
&lt;br /&gt;
we will continue assuming your device id is /dev/sda .&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Second Step:&lt;/u&gt;&lt;br /&gt;
Now You have to mount the drive that your Ubuntu was installed previously.&lt;br /&gt;
Mount the drive By selecting it from the 'places' menu. It has been mounted at your /media folder(Live CD)&lt;br /&gt;
Check the folder name and copy the folder name. You can do it also By dragging any file/folder from the mounted drive.&lt;br /&gt;
&lt;br /&gt;
Now at Terminal:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', 'Lucida Grande', Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background-color: #f0eee6; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; font-family: courier, monospace; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; white-space: pre-wrap; word-wrap: break-word;"&gt;sudo grub-setup -d /media/FolderName/boot/grub /dev/sda&lt;/pre&gt;&lt;br /&gt;
Replace The 'FolderName' with the Folder you have found at your /media folder.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Third Step:&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;br /&gt;
Restart Your machine and the boot menu should be there but you will be missing the windows boot menu entry there . So after logging in Open a Terminal and Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f0eee6; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; font-family: courier, monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; white-space: pre-wrap; word-wrap: break-word;"&gt;sudo update-grub&lt;/pre&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
It's Done! It'll show you a message if it finds a boot record for the windows.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;If you get any error you check the following link.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
There is a detailed description &amp;nbsp;at &lt;a href="http://help.ubuntu.com/community/Grub2"&gt;http://help.ubuntu.com/community/Grub2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-2512567181963362041?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_YBcNhTBKMvFD5FL_n4gWBNnoSY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_YBcNhTBKMvFD5FL_n4gWBNnoSY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_YBcNhTBKMvFD5FL_n4gWBNnoSY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_YBcNhTBKMvFD5FL_n4gWBNnoSY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/2512567181963362041/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/ubuntu-recovering-boot-menu-after.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2512567181963362041?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2512567181963362041?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/ubuntu-recovering-boot-menu-after.html" title="Ubuntu Recovering Boot menu after installing Windows" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8GSXw7eCp7ImA9WhZVGEU.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-7992160045850801420</id><published>2011-05-30T09:08:00.000-07:00</published><updated>2011-05-31T15:27:08.200-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-31T15:27:08.200-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="regex" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Simple Python HTML,XML DOM Parser</title><content type="html">This parser is intended to be simple and easy to use. You can download a copy from &lt;a href="https://github.com/sabirmostofa/Python-Dom-Parser"&gt;github&lt;/a&gt; . The parser can detect the various forms of tags like id=lorem , id='lorem', id="lorem". I have been using this script for my current scraping project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had been using the python module minidom but it's no use for the malformed xml and html . So I wrote this script using only regular expression.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Usage:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Copy the spp.py in your working directory and import the package.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Instantiate the parser class by providing the url&amp;nbsp; or xml|html string&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;To Get the 'id' attribute of the 'style' tag&lt;br /&gt;
&amp;nbsp;1.spp.parser('http://www.google.com').getByTag('style').item(0).attr('id')&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;To get the attribute of a node whose id is 'csi'&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;2.spp.parser('http://www.google.com').getById('csi).attr('style')&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;# doc is the html or xml string you want to parse&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;3.spp.parser(doc).getById('test').attr('href')&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;To get the src of an image which is the 4th image of the document&lt;br /&gt;
&amp;nbsp;4.spp.parser(doc).getBytag('img').item(4).attr('src')&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;To get the content of a node which has no child&lt;br /&gt;
&amp;nbsp;5.spp.parser(doc).getById('test').innerText()&lt;br /&gt;
&lt;br /&gt;
There are some nice parsing tools for python available.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.crummy.com/software/BeautifulSoup/"&gt;Beautiful Soup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lxml.de/parsing.html"&gt;lxml&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-7992160045850801420?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FpAmxGnEUYL-d4ZO_HMTzKvX0NI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FpAmxGnEUYL-d4ZO_HMTzKvX0NI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FpAmxGnEUYL-d4ZO_HMTzKvX0NI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FpAmxGnEUYL-d4ZO_HMTzKvX0NI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/7992160045850801420/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/simple-python-htmlxml-dom-parser.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/7992160045850801420?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/7992160045850801420?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/simple-python-htmlxml-dom-parser.html" title="Simple Python HTML,XML DOM Parser" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;C0cAQHg_cSp7ImA9WhZVGEU.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-2235181431827059134</id><published>2011-05-28T03:54:00.000-07:00</published><updated>2011-05-31T15:30:41.649-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-31T15:30:41.649-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PHP" /><category scheme="http://www.blogger.com/atom/ns#" term="regex" /><title>PHP regex lookaround assertion: lookbehind and lookahead</title><content type="html">Regular Expression is a mighty beast, if you can tame it Regex will be a great leverage to solve your Problems.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A Real World Example:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Regex assertion is to check if any string matches following or the preceding characters. Suppose we want to check if there is any '.mp3'or '.mp4' string in our text but we only want the value 'mp3'or 'mp4'&lt;br /&gt;
&lt;br /&gt;
One solution is:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;$text = 'demo.mp3, shakira.mp4,lorum ipsum';

if(preg_match_all('/\.mp3|\.mp4/', $text,$matches)):

foreach($matches as $key =&amp;gt; $match){
$matches[$key] =  str_replace('.', '' ,$matches[$key]);
}

endif;
var_dump($matches);
&lt;/pre&gt;&lt;br /&gt;
But this is ugly, we can use the lookbehind assertion to make the code simple:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;preg_match_all('/(?&amp;lt;=.)mp3|mp4/', $text,$matches);
var_dump($matches);&amp;nbsp;&lt;/pre&gt;&lt;pre class="sh_php"&gt;&amp;nbsp;&lt;/pre&gt;&lt;b&gt;Let's Go Back: Check The Basic:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;What are the lookahead and lookbehind assertions? and what are the syntax?&lt;br /&gt;
&lt;br /&gt;
Assertions Only check that from the current position if a string matches the following or preceding characters, It does not consume any character. 'lorum(?=ipsum)' matches 'lorum' from the text 'lorumipsum'. Note that it's not matching 'lorumipsum', it's just checking if 'ipsum' are the next characters after 'lorum'.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;LookAhead Syntax:&lt;/b&gt;&lt;br /&gt;
Positive lookahead:  (?=)&lt;br /&gt;
Negative lookahead:  (?!)&lt;br /&gt;
&lt;br /&gt;
LookAhead Assertion Checks  if following characters matches(positive lookahead) or does not(negative lookahead) from the current position.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;positive Lookahead:&lt;/u&gt;&lt;br /&gt;
The following example matches 'lorum' first then checks that if 'ipsum' is next, If the checking is successful then function returns a successful match.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;preg_match('/lorum(?=ipsum)/','lorumipsum', $match);
var_dump($match);&amp;nbsp;&lt;/pre&gt;&lt;pre class="sh_php"&gt;&amp;nbsp;&lt;/pre&gt;&lt;u&gt;Negative Lookahead:&lt;/u&gt;  The following example matches 'lorum' first then checks that if 'test' is not next, If the checking is successful then function returns a successful match.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;preg_match('/lorum(?!test)/','lorumipsum', $match);
var_dump($match);&amp;nbsp;&lt;/pre&gt;&lt;pre class="sh_php"&gt;&amp;nbsp;&lt;/pre&gt;&lt;b&gt;Look Behind Syntax:&lt;/b&gt;&lt;br /&gt;
Positive lookbehind:(?&amp;lt;=)&lt;br /&gt;
Negative lookbehind:(?&amp;lt;!)&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;positive Lookbehind:&lt;/u&gt;&lt;br /&gt;
This example matches 'ipsum' first then checks that if 'lorum' is previous, If the checking is successful then function returns a successful match. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;preg_match('/(?&amp;lt;=lorum)ipsum/','lorumipsum', $match);
var_dump($match);&amp;nbsp;&lt;/pre&gt;&lt;pre class="sh_php"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="sh_php"&gt;&lt;/pre&gt;&lt;pre class="sh_php"&gt;&amp;nbsp;******&lt;/pre&gt;One important thing to remember: Regex engine searches from left to  right but in this case as there is nothing too match before our  assertion it matces ipsum first to determine the current position. Suppose we would build our regex expression by&amp;nbsp; '^(?&amp;lt;=lorum)ipsum' then the regex engine would match the start of the line first. Then it would determine whether 'lorum' matches previous which would obviously fail as there is no character preceding 'lorum'.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;Negative LookBehind:&lt;/u&gt;&amp;nbsp; &lt;br /&gt;
The following example matches 'ipsum' first then checks that if 'hello' is not previous, If the checking is successful then function returns a successful match.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;preg_match('/(?&amp;lt;!hello)ipsum/','lorumipsum', $match);
var_dump($match); 
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-2235181431827059134?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N0XLT47O-EbO3Vzf46EhEk76134/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N0XLT47O-EbO3Vzf46EhEk76134/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N0XLT47O-EbO3Vzf46EhEk76134/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N0XLT47O-EbO3Vzf46EhEk76134/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/2235181431827059134/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/php-regex-lookaround-assertion.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2235181431827059134?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2235181431827059134?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/php-regex-lookaround-assertion.html" title="PHP regex lookaround assertion: lookbehind and lookahead" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4HRnY5fCp7ImA9WhZVGEU.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-3899839093102800904</id><published>2011-05-16T02:35:00.000-07:00</published><updated>2011-05-31T15:28:57.824-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-31T15:28:57.824-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><title>JavaScript Rolling Animation Using marginTop</title><content type="html">In My &lt;a href="http://sabirul-mostofa.blogspot.com/javascript-scrolling-animation-scrolltop.html"&gt;previous Post&lt;/a&gt; I wrote about how You can get a rolling animtaion using javascript scrollTop property. As the "scrollTop" is not a W3C recommendation we will use 'marginTop' of the style object to make a better solution.&lt;br /&gt;
&lt;br /&gt;
&lt;div id="rollExample" style="border: 2px solid green; font-size: 18px; height: 200px; margin: 10px auto; overflow: hidden; text-align: center; width: 200px;"&gt;&lt;div id="rollChild"&gt;****&lt;br /&gt;
*****&lt;br /&gt;
&lt;b&gt;Javacript Rolling Animation Example Using margin&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
*******&lt;br /&gt;
*********&lt;br /&gt;
*******&lt;br /&gt;
*******&lt;br /&gt;
*********&lt;br /&gt;
*******&lt;br /&gt;
***&lt;br /&gt;
&lt;b&gt;Free Javascript scripts&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
We will set a negative value to the css margin-top property using a recursive function. This will move the div upwards gradually.Here is the sample Code.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_javascript"&gt;d = document.getElementById('cat');

h = 0;

ab = function(){
 if(h == -150){
  h = 0;
  }
 h--;
 d.style.marginTop = h+"px";
 setTimeout('ab();', 10);
 }
 
ab();
&lt;/pre&gt;&lt;br /&gt;
Easy and pretty simple huh? This is just the basic, You can make awesome animations/sliding effects. This is compatible in all modern browsers. If you need more info, post a comment and I'll try to help.&lt;br /&gt;
&lt;script type="text/javascript"&gt;
aRoll=document.getElementById('rollExample');
dRoll=document.getElementById('rollChild');
 cRoll=0;

bRoll= function()
{
cRoll--;
if(cRoll == -150){
  cRoll=0;
  }
 
 dRoll.style.marginTop=cRoll+"px";
 setTimeout('bRoll();',15);
}
bRoll();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-3899839093102800904?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZOh69w4UtNnaxWGQxyHjMTMCzEQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZOh69w4UtNnaxWGQxyHjMTMCzEQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZOh69w4UtNnaxWGQxyHjMTMCzEQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZOh69w4UtNnaxWGQxyHjMTMCzEQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/3899839093102800904/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/javascript-rolling-animation-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3899839093102800904?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3899839093102800904?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/javascript-rolling-animation-using.html" title="JavaScript Rolling Animation Using marginTop" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4GR3g6fip7ImA9WhZVGEU.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-5290188162337093171</id><published>2011-05-15T22:04:00.000-07:00</published><updated>2011-05-31T15:28:46.616-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-31T15:28:46.616-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><title>JavaScript Scrolling Animation Using scrollTop</title><content type="html">Using only the scrollTop and scrollHeight property it is possible to create a nice scrolling effect.scrollTop and scrollHeight aren't W3C recommendation but these properties exist in all the modern browsers. I have checked it in Chromium,Firefox,IE and Midori the following script works perfectly. Let's see the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;div id="scrollExample" style="border: 2px solid green; font-size: 18px; height: 200px; margin: 10px auto; overflow: hidden; text-align: center; width: 200px;"&gt;&lt;b&gt;Javacript Scrolling Animation Using scrollTop property&lt;/b&gt;&lt;br /&gt;
****&lt;br /&gt;
*****&lt;br /&gt;
*******&lt;br /&gt;
*********&lt;br /&gt;
*******&lt;br /&gt;
***&lt;br /&gt;
****&lt;br /&gt;
*****&lt;br /&gt;
*******&lt;br /&gt;
*********&lt;br /&gt;
*******&lt;br /&gt;
***&lt;br /&gt;
&lt;b&gt;Javacript Scrolling Animation Using scrollTop property&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
aExamp=document.getElementById('scrollExample');
 cExamp=0;

bExamp= function()
{
 if(200+aExamp.scrollTop == aExamp.scrollHeight)
 {
  aExamp.scrollTop=0;
  cExamp=0;
 };
 cExamp++;
 aExamp.scrollTop=cExamp;
 setTimeout('bExamp()',10)
}
bExamp();
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
The code is pretty simple. For achieving the animation effect out our div should be overflown.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_javascript"&gt;a = document.getElementById('scroll');
c = 0;
b = function()
{
 if(200+a.scrollTop == a.scrollHeight)
 {
  a.scrollTop = 0;
  c = 0;
 };
 c++;
 a.scrollTop = c;
 setTimeout('b()',10)
}
b();
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Need Explanation?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
scrollTop(integer) property shows that how far you have scrolled from the top. You can also set a value to scrollTop which will scroll automatically to a value specified.&lt;br /&gt;
&lt;br /&gt;
we have a recursive function that sets the scrollTop property. If we reach at the bottom  of our element that's when  &lt;b&gt;if(200+a.scrollTop==a.scrollHeight)&lt;/b&gt;  we reset the scrollTop property.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://sabirul-mostofa.blogspot.com/javascript-rolling-animation-margintop.html"&gt;Here is a tutorial&lt;/a&gt; about How you can achieve the same animation using margin. &lt;br /&gt;
&lt;br /&gt;
If You need more explanation, Let me Know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-5290188162337093171?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ECNi-0f9q3Di4VWPl9M21aQDbGQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ECNi-0f9q3Di4VWPl9M21aQDbGQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ECNi-0f9q3Di4VWPl9M21aQDbGQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ECNi-0f9q3Di4VWPl9M21aQDbGQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="enclosure" type="text/html" href="http://sabirul-mostofa.blogspot.com/javascript-rolling-animation-margintop.html" length="0" /><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/5290188162337093171/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/javascript-scrolling-animation-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/5290188162337093171?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/5290188162337093171?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/javascript-scrolling-animation-using.html" title="JavaScript Scrolling Animation Using scrollTop" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUUDQXs8fip7ImA9WhZXGEo.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-8171160379635740695</id><published>2011-05-08T10:54:00.000-07:00</published><updated>2011-05-08T10:54:30.576-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-08T10:54:30.576-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PHP" /><title>PHP Declaring Object before Defining  Class</title><content type="html">A quiz for you. is the following code snippet valid?&lt;br /&gt;
    &lt;pre class='sh_php'&gt;
    $obj = new hello(); 

    class hello{

        function __construct(){
        echo 'PHP ';
        }
      }

    &lt;/pre&gt;&lt;br /&gt;
  What about the following one?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &lt;pre class='sh_php'&gt;
     hello();

     function hello(){
           echo 'PHP ';
     }

&lt;/pre&gt;&lt;br /&gt;
     what about the next? assuming test.php contains the hello function.&lt;br /&gt;
&lt;br /&gt;
 &lt;pre class='sh_php'&gt;
     hello();

    include test.php;

&lt;/pre&gt;&lt;br /&gt;
 Unlike C/C++/Python  The first two snippets are correct. But the third  one will generate error. When you call a function or make an instance of a class the compiler searches in the same file for the definion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-8171160379635740695?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eEOVGcgKHadwTmdWmFl6BrWhOZo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eEOVGcgKHadwTmdWmFl6BrWhOZo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eEOVGcgKHadwTmdWmFl6BrWhOZo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eEOVGcgKHadwTmdWmFl6BrWhOZo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/8171160379635740695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/php-declaring-object-before-defining.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/8171160379635740695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/8171160379635740695?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/php-declaring-object-before-defining.html" title="PHP Declaring Object before Defining  Class" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkADQHs6fSp7ImA9WhZXGEg.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-6478857905550564551</id><published>2011-05-07T02:12:00.000-07:00</published><updated>2011-05-08T05:46:11.515-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-08T05:46:11.515-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="django" /><title>Django Installation with XAMPP for Linux-(LAMPP)</title><content type="html">I use Ubuntu and XAMPP for my development works. My Xampp location is  &lt;b&gt;/opt/lampp&lt;/b&gt;.&lt;br /&gt;
This post is about Mysql Database connection problem in Django.&lt;br /&gt;
&lt;br /&gt;
First Make sure you've installed the python-mysqldb package.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;sudo apt-get install python-mysqldb&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Then if you get the following error&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")'&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
That means that mysqld can't find you mysql library location. You have to add the library path manually. /etch/ld/so/conf file maintains the extra library locations so add your library here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;sudo gedit /etc/ld.so.conf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Add your mysql library path here. In my case&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;/opt/lampp/lib/mysql&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now update your config by&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;sudo ldconfig&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
And that's it now you can test it by running server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Alternative:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can also create a  .conf file in the /etc/ld.so.conf.d  directory and write your location in that file as the ld.co.conf file loads all the files from the directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-6478857905550564551?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YJknB6t4QidL1-KcI0TQ4tyY2lU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YJknB6t4QidL1-KcI0TQ4tyY2lU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YJknB6t4QidL1-KcI0TQ4tyY2lU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YJknB6t4QidL1-KcI0TQ4tyY2lU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/6478857905550564551/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/django-installation-with-xampp-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/6478857905550564551?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/6478857905550564551?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/django-installation-with-xampp-for.html" title="Django Installation with XAMPP for Linux-(LAMPP)" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUAMRHc5eip7ImA9WhZXF0w.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-3427368929751481987</id><published>2011-05-06T13:22:00.000-07:00</published><updated>2011-05-06T13:29:45.922-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-06T13:29:45.922-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wordpress" /><title>WordPress thickbox for Generated Images Solution</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you want to use Thickbox for the generated images you may get garbage values if you're using a url like &lt;b&gt;http://test.com/image.php?coords=1,2,3&lt;/b&gt; or &lt;b&gt;http://test.com/image/ &lt;/b&gt;. The problem occurs when thickbox detects the url not as image. If you open the wp-includes/js/thickbox/thickbox.js file you will get a line&lt;br /&gt;
&lt;br /&gt;
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;&lt;br /&gt;
&lt;br /&gt;
Image formats or urls other than the above ones will show garbage value. The solution is to edit the thickbox.js file. Do not edit the default file. Make a copy of the file and place it at your theme directory. Another Option is to  obtain  thickbox.js from the jQuery thickbox page. This is better than copying the WordPress included one. I will explain it a bit later.  Now first add the thickbox.js file in you theme. In your functions.php file use the following code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;add_action('wp_print_scripts' , 'add_custom_thickbox');

function add_custom_thickbox(){
wp_enqueue_script('thickbox_edit' , get_bloginfo('stylesheet_directory')
 . '/thickbox.js' , 'jquery' , ' ' , true);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Don't forget to add the thickbox css. Now edit the thickbox.js file around Line no 72. If your url contains  .php :&lt;br /&gt;
&lt;br /&gt;
Replace the line&lt;br /&gt;
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; &lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp|\.php$/;&lt;br /&gt;
&lt;br /&gt;
Then in the line 75 &lt;br /&gt;
&lt;br /&gt;
Replace the line&lt;br /&gt;
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' &lt;br /&gt;
|| urlType == '.bmp'' )&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' &lt;br /&gt;
|| urlType == '.bmp' || urlType == '.php' )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is another edit,  From the whole script remove all the properties and method related with 'thickboxL10n' . This variable has been injected by wodpress as a localization process. If your copy is from jquery website your thickbox.js will have no variable 'thickboxL10n'. So It's a better option to get thickbox from the jQuery website.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;If you copy download jquery from jquery website:&lt;/b&gt;&lt;br /&gt;
Replace all the "$(" with "jQuery(" .  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now click on your image and it should work now. If You face any problem you can comment here, I will try to solve your problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-3427368929751481987?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ObWiNnH03YxrHQnZwcg9QgLXHgE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ObWiNnH03YxrHQnZwcg9QgLXHgE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ObWiNnH03YxrHQnZwcg9QgLXHgE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ObWiNnH03YxrHQnZwcg9QgLXHgE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/3427368929751481987/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/wordpress-thickbox-for-generated-images.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3427368929751481987?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3427368929751481987?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/wordpress-thickbox-for-generated-images.html" title="WordPress thickbox for Generated Images Solution" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk4BRH4yeyp7ImA9WhZXFks.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-2069719513000035394</id><published>2011-05-05T23:54:00.000-07:00</published><updated>2011-05-05T23:55:55.093-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-05T23:55:55.093-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Firefox" /><title>Firefox Setting Google As Default Search Engine using about:config</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If Searching in the main address bar redirects you to a search engine other than Google, that means some firefox add-on is controlling your search options. You can check your add-on preferences for correcting it. There should be some option in a nice add-on but there are some add-ons which don't even ask!&lt;br /&gt;
&lt;br /&gt;
So for Changing the settings type about:conifg in the address bar.  about:config is a advanced settings section of firefox. If you're not sure what to do Don't change the default settings. This may make your browser unstable. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the about:config page search for keyword.url. If you see the value of the term other than google.com click on the value to toggle vaules. when you have got google.com leave it there and test searching in your address bar and Google should be your default search enging now!&lt;/div&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Some Facts:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see the mozilla book verse typing about:mozilla&lt;br /&gt;
&lt;br /&gt;
For Chrome browser There is no about:config pag. But there are some about pages which you can see by typing about:about.&lt;br /&gt;
&lt;br /&gt;
about:about is not supported in mozilla firefox 3.6&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-2069719513000035394?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mqruHP99xwxI5vjUwCF7SHbuyBM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mqruHP99xwxI5vjUwCF7SHbuyBM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mqruHP99xwxI5vjUwCF7SHbuyBM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mqruHP99xwxI5vjUwCF7SHbuyBM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/2069719513000035394/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/firefox-setting-google-as-default.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2069719513000035394?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2069719513000035394?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/firefox-setting-google-as-default.html" title="Firefox Setting Google As Default Search Engine using about:config" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D04ESH4-fyp7ImA9WhZUEE0.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-6103162433137839541</id><published>2011-05-03T08:25:00.000-07:00</published><updated>2011-06-02T02:11:49.057-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-02T02:11:49.057-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><title>JavaScript Find all Elements of an object</title><content type="html">To find All functions and variables of a Javascript class or object you can use the following function. It's a silly little Function   &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_javascript"&gt;function getObj(obj){ 

  var html = '';  

  for (var key in obj){

  html +=   (key + '  -- &amp;gt; '+ typeof obj[key]); 

  
}        

 return html;  

  }
&lt;/pre&gt;&lt;br /&gt;
You Can test the function here. Select a default Object and you will see the object elements. If You are using firefox you may seem nothing when you select the document object. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;select id="inputY" name="inputy"&gt;  &lt;option value="window"&gt;window&lt;/option&gt;  &lt;option value="screen"&gt;screen&lt;/option&gt;  &lt;option value="document"&gt;document&lt;/option&gt;  &lt;option value="location"&gt;location&lt;/option&gt;  &lt;option value="scrollbars"&gt;scrollbars&lt;/option&gt;  &lt;/select&gt;  &lt;button id="clickCap" onclick="clickHandler1128()"&gt;View All Object elements&lt;/button&gt;   &lt;br /&gt;
&lt;div id="holder1128"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
function clickHandler1128(){

var val= document.getElementById('inputY').value;

var html = false;

for (var key in window){

     if(key == val &amp;&amp; typeof window[key] == 'object'){

   html='';   

   var test = window[key];

   for (var key1 in test){

   html +=   (key1 + '  ----&gt; '+ typeof test[key1]); 

  html += '';

   }

   break;

 }

 }

 

 if( typeof html == 'boolean' )document.getElementById('holder').innerHTML = 'The object does not Exist';

 else
 document.getElementById('holder1128').innerHTML = html;
 }
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-6103162433137839541?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XEK9zmziDeKNCG-IL8h9jmez14k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XEK9zmziDeKNCG-IL8h9jmez14k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XEK9zmziDeKNCG-IL8h9jmez14k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XEK9zmziDeKNCG-IL8h9jmez14k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/6103162433137839541/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/javascript-find-all-elements-of-object.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/6103162433137839541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/6103162433137839541?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/05/javascript-find-all-elements-of-object.html" title="JavaScript Find all Elements of an object" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEMMQXY4eip7ImA9WhZXFE4.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-3715155760885250291</id><published>2011-04-05T08:55:00.000-07:00</published><updated>2011-05-03T08:28:00.832-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-03T08:28:00.832-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wordpress" /><title>[SOLVED] WP-PageNavi, wp_pagenavi for custom query</title><content type="html">WP-Pagenavi is a great plugin for paginating your WordPress Pages. Many people find it not working for custom queries like  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;get_posts&lt;/b&gt;, &lt;b&gt;query_posts&lt;/b&gt; or for &lt;b&gt;WP_Query&lt;/b&gt;. Today we'll solve the mystery.&lt;br /&gt;
&lt;br /&gt;
Previously I edited the plugin to work for the custom queries  but now the latest version  has a built in feature to add your custom query object. &lt;br /&gt;
&lt;br /&gt;
Suppose we make a custom  query for getting some specific posts. The post ids are 1,5,8,9,10,34  &lt;br /&gt;
&lt;br /&gt;
&lt;pre class='sh_php'&gt;$my_query = new WP_Query(
 array(
 'post_in' =&gt;array(1,5,8,9,10,34)
 )

);

//If the total page number &gt; 1 we will show the pagination

if($my_query-&gt;max_num_pages&gt;1)
if(function_exists('wp_pagenavi'))
wp_pagenavi(array(
   'query' =&gt;$my_query   
   ));

//note how  $my_query has been passed to wp_pagenavi  

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You should set your posts_per_page to lower than  the total page number to see the pagination. You should see the Pagination now but &lt;b&gt;Wait Sailor, We are not done Yet!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You see that when you click on the second page you actually see the contents from the first page. So the solution is here.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; Check your WordPress version before trying the solution&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class='sh_php'&gt;//Revised code to show posts from all pages

// page no from query

$paged = get_query_var ('paged'); 


// pass the paged value to the WP_Query

$my_query = new WP_Query( array(
 'post__in'  =&gt;  array(1,5,8,9,10,34) ,
 'paged' =&gt; $paged
 
) );


//If the total page number &gt; 1 we will show the pagination

if($my_query-&gt;max_num_pages&gt;1)
if(function_exists('wp_pagenavi'))
wp_pagenavi(array(
   'query' =&gt;$my_query   
   ));

//note how  $my_query has been passed to wp_pagenavi  

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
And &lt;b&gt;you can use wp_pagenavi for get_posts,query_posts providing a paged value&lt;/b&gt;. If you're having any problem implementing, you can post your problem here. I will try to solve your problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-3715155760885250291?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Zllq1UeZ_-LyIApUt4CtQInnsIA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zllq1UeZ_-LyIApUt4CtQInnsIA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Zllq1UeZ_-LyIApUt4CtQInnsIA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zllq1UeZ_-LyIApUt4CtQInnsIA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/3715155760885250291/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/04/solved-wppagenavi-for-all-custom-query.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3715155760885250291?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3715155760885250291?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/04/solved-wppagenavi-for-all-custom-query.html" title="[SOLVED] WP-PageNavi, wp_pagenavi for custom query" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DU4HRnwzfyp7ImA9WhZSFEU.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-3441087418425062552</id><published>2011-03-28T07:07:00.000-07:00</published><updated>2011-03-30T05:25:37.287-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-30T05:25:37.287-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wordpress" /><title>wordpress cron wp_schedule_single event</title><content type="html">In my &lt;a href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-explained.html"&gt;previous post&lt;/a&gt; I wrote how to use&lt;br /&gt;
the wp_schedule_event. This post is about wp_schedule_single_event.&lt;br /&gt;
&lt;br /&gt;
wp_schedule_single_event is for scheduling a single event but you can use it to execute a function more than once.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class='sh_php'&gt;wp_schedule_single_event( $timestamp, $hook, $args = array())
&lt;/pre&gt;&lt;br /&gt;
$timestamp is the timestamp when we want to execute our function&lt;br /&gt;
&lt;br /&gt;
$hook is the hookname(a string) that we will attach our function with.&lt;br /&gt;
&lt;br /&gt;
$args is optional parameter WordPress uses  to make a md5 hash string to make the schedule unique&lt;br /&gt;
&lt;br /&gt;
If you want to execute your function 'my_cron_function' at the timestamp= 'timestamp'  follow the code &lt;br /&gt;
&lt;br /&gt;
&lt;pre class='sh_php'&gt;add_action('my_hook','my_cron_func');

function my_cron_func(){
//do something here
} 

wp_schedule_single_event('timestamp', 'my_hook') 
&lt;/pre&gt;you can use different timestamps with your hook 'my_hook' , but remember that&lt;br /&gt;
WordPress checks  if an identical event is to be executed in 10 minutes, if so WordPress won't execute the current event.&lt;br /&gt;
&lt;br /&gt;
if you use &lt;br /&gt;
&lt;pre class="sh_php"&gt;wp_schedule_single_event(time(), 'my_hook')
wp_schedule_single_event(time()+20, 'my_hook');
&lt;/pre&gt;&lt;b&gt;WordPress will discard the second one&lt;/b&gt; because it's scheduled to execute to in 10 minutes of the previous identical one.&lt;br /&gt;
see the code the the wp-includes/cron.php&lt;br /&gt;
&lt;br /&gt;
&lt;pre class='sh_php'&gt;if ( $next &amp;&amp; $next &lt;= $timestamp + 600 )
  return;
&lt;/pre&gt;
&lt;u&gt;&lt;b&gt;Executing the function more than once using wp_schedule_single_event!&lt;/b&gt;&lt;/u&gt;


if you use some dynamic value in the $timestamp you can make this execute more than once.

for example If you use this code
&lt;pre class='sh_php'&gt;wp_schedule_single_event(time()+60, 'my_hook')
&lt;/pre&gt;when you first activate the plugin the code schedules to execute the function 1min  after the current time if any visitor visits the page 

if you use 
&lt;pre class='sh_php'&gt;wp_schedule_single_event(time(), 'my_hook')
&lt;/pre&gt;it will execute the function immediately. 
If you refresh your page in one minute WordPress won't execute the cron job as 

 &lt;b&gt;WordPress has set the default time interval between two cron jobs to 1 minute&lt;/b&gt;

look for the code the wp-includes/cron.php

&lt;pre class='sh_php'&gt;/*
 don't run if another process is currently running it or more
 than once every 60 sec.
*/
 if ( $flag + 60 &gt; $local_time )
  return;
&lt;/pre&gt;so if you want any cron job to execute maximum time you can use 

&lt;pre class='sh_php'&gt;wp_schedule_single_event(time(), 'my_hook');
&lt;/pre&gt;another way to do this is to use 
&lt;pre class='sh_php'&gt;wp_schedule_event(time(),'every_minute','my_hook');
&lt;/pre&gt;you have make the 'every_minute' schedule yourself see the example  &lt;a href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-explained.html"&gt;Here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-3441087418425062552?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FcsRfBOdwuo36-vncV5RN98j3K4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FcsRfBOdwuo36-vncV5RN98j3K4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FcsRfBOdwuo36-vncV5RN98j3K4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FcsRfBOdwuo36-vncV5RN98j3K4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/3441087418425062552/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-wpschedulesingle-event.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3441087418425062552?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3441087418425062552?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-wpschedulesingle-event.html" title="wordpress cron wp_schedule_single event" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D04NSXoyeip7ImA9WhZSEE4.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-7450993383434201870</id><published>2011-03-24T23:52:00.000-07:00</published><updated>2011-03-24T23:53:18.492-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T23:53:18.492-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="emacs" /><title>Synchronizing Firefox and emacs</title><content type="html">I am loving &lt;a href="http://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt;. Actually I am writing from emacs now. Synchronizing between firefox and emacs has been  a piece of cake due to the "It's all text/textarea firefox add-on".&lt;br /&gt;
&lt;br /&gt;
You can download the addon from &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/its-all-text/"&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After installing this addon go the Tools&gt;add-ons&gt;It's all Text! preference. In the 'editor textfield' add the emacs location. You can add any text editor executable location here.&lt;br /&gt;
You can add a shortuct key for opening emacs.It will save you some clicks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;how it works&lt;/b&gt; &lt;br /&gt;
The credits goes the addon. when there is a textarea in the webpage you will see a edit button created by the firefox add-on. You can open emacs by clicking on that button or you can choose in which mode you want to edit by right-clicking.&lt;br /&gt;
&lt;br /&gt;
when emacs has opened up write something and save(C-xC-s) the text and see how the text has been imported the the webpage textarea automatically. You can also visualize how this code will look  when you're writing by (C-cC-v)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-7450993383434201870?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Of_4rKJDJ9lMp7eF5g1D4oOncP4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Of_4rKJDJ9lMp7eF5g1D4oOncP4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Of_4rKJDJ9lMp7eF5g1D4oOncP4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Of_4rKJDJ9lMp7eF5g1D4oOncP4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/7450993383434201870/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/03/synchronizing-firefox-and-emacs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/7450993383434201870?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/7450993383434201870?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/03/synchronizing-firefox-and-emacs.html" title="Synchronizing Firefox and emacs" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0QDSHYyfSp7ImA9WhZREk0.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-2962016575974691252</id><published>2011-03-21T12:08:00.000-07:00</published><updated>2011-04-07T11:36:19.895-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-07T11:36:19.895-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wordpress" /><title>WordPress cron explained</title><content type="html">&lt;a href="http://en.wikipedia.org/wiki/Cron"&gt;cron&lt;/a&gt; is a job scheduler in the unix-like operating systems that can be very helpful to automate tasks. . Webhosts provide cron service to execute scripts periodically.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;It is encouraged to use the webhost cron service in most of the cases because &lt;b&gt;WordPress cron is actually a psudo cron service&lt;/b&gt;. You might want to use the functions of WordPress in your script. In that Case&amp;nbsp; you will have to load the wp-load.php file and the core WordPress functions, database classes will be available for your script.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;require_once('wp-load.php');
&lt;/pre&gt;&lt;br /&gt;
If your host doesn't support cron, WordPress cron will be handy. You will need the WordPress cron functionalities for your plugins or for automating other tasks like auto-generating posts, sending mails, messages to users. So let's digg into the WordPress cron.&lt;br /&gt;
&lt;br /&gt;
I mentioned before that WordPress cron is a "psudo cron", that means that it won't always execute the script at the real time you want. The cron job is triggered when somebody visits your website. That means if you have scheduled a function to be executed at 8am and if nobody visits your website at 8am the execution will be triggered suppost at 8:10 am when somebody has hit your site.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;WordPress cron doesn't make your website slow!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
May be you are thinking what if the cron-script takes a long time to be executed, will the visitors have to wait until the script is&amp;nbsp; executed. Nope! How can that be possible? If you look at the wp-cron.php file you will find a line&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;ignore_user_abort(true);
&lt;/pre&gt;&lt;br /&gt;
It's a php.ini configuration that sets that if you stop loading the site/script the script won't stop executing.&lt;br /&gt;
&lt;br /&gt;
If you look at the wp-includes/cron.php file you'll find a line like this&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;wp_remote_post( $cron_url, 
array('timeout' =&gt; 0.01,
 'blocking' =&gt; false, 
 'sslverify' =&gt; apply_filters('https_local_ssl_verify', true)) );
 &lt;/pre&gt;&lt;br /&gt;
That means WordPress will wait only 0.01 second for triggering the execution then it will abort but as you have set ignore_user_abort to true the script will be executing.This functionality is a huge advantage to execute large scripts in the WordPress cron.&lt;br /&gt;
&lt;br /&gt;
Now we know the basics of WordPress cron but how will we implement this&amp;nbsp; beast?&lt;br /&gt;
&lt;br /&gt;
Let's point out the most used cron WordPress functions:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt; &lt;a href="http://codex.WordPress.org/Function_Reference/wp_schedule_event#Further_Reading"&gt;&lt;b class="selflink"&gt;wp_schedule_event&lt;/b&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="http://codex.WordPress.org/Function_Reference/wp_schedule_single_event" title="Function Reference/wp schedule single event"&gt;wp_schedule_single_event&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="http://codex.WordPress.org/Function_Reference/wp_clear_scheduled_hook" title="Function Reference/wp clear scheduled hook"&gt;wp_clear_scheduled_hook&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="http://codex.WordPress.org/Function_Reference/wp_next_scheduled" title="Function Reference/wp next scheduled"&gt;wp_next_scheduled&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="http://codex.WordPress.org/Function_Reference/wp_unschedule_event" title="Function Reference/wp unschedule event"&gt;wp_unschedule_event&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="http://codex.WordPress.org/Function_Reference/wp_get_schedule" title="Function Reference/wp get schedule"&gt;wp_get_schedule&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;wp_schedule_event($timestamp, $recurrence, $hook, $args);
&lt;/pre&gt;&lt;br /&gt;
Here $timestamp indicates the first time we want to execute the script.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
$recurrence is the interval between the two execution.&lt;br /&gt;
$hook is the hook or tag with with we attach our cron functions, $args are some optional parameters&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Let's make a plugin using the function.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;&amp;lt;?php
/*
Plugin Name: cron-robot
Plugin URI: http://sabirul-mostofa.blogspot.com
Author: Sabirul Mostofa
Version: 0.1
*/


//adding the function to our  hook 'practice_cron_job'

add_action('practice_cron_jobs','practice_cron_func');

//calling the cron function 

if(!wp_next_scheduled('practice_cron_jobs'))
wp_schedule_event(time(),'hourly','practice_cron_jobs');


 // a function to add a option in the options table

function practice_cron_func(){
if($a=get_option('practice_cron'))
update_option('practice_cron',$a.'+');
else
add_option('practice_cron','init_value');

}

//for clearing the sceduled tasks

register_deactivation_hook(__FILE__,'deactivate_cron_hook');

function deactivate_cron_hook(){
wp_clear_scheduled_hook('practice_cron_jobs');
}
?&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;what this plugin does&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
This plugin runs the function 'practice_cron_func' once in a hour. you&lt;br /&gt;
can make your own time intervals. see below in the 'what is hourly?' section.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;what does the wp_next_scheduled() do? &lt;/b&gt;&lt;br /&gt;
It will take a hook as a parameter and will return the timestamp of the cron hook's next execution time&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
you can add these lines in the above plugin to test:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;echo wp_next_scheduled('practice_cron_jobs');
exit;
&lt;/pre&gt;&lt;br /&gt;
remove these lines after testing!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Why I am adding&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;if(!wp_next_scheduled('practice_cron_jobs'))
&lt;/pre&gt;This is just to make sure that you are not making the same cron job again because when you are scheduling a event by &lt;br /&gt;
&lt;pre class="sh_php"&gt;wp_schedule_event(time(),'hourly','practice_cron_jobs');
&lt;/pre&gt;it will&amp;nbsp; schedule another event attached to the hook.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;what is 'hourly'?&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you look at the function the second parameter is the time intervalbetween the executions. 'hourly' is the WordPress defined time interval. WordPress has three defined values that you can use they are &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;hourly&lt;/li&gt;
&lt;li&gt;daily&lt;/li&gt;
&lt;li&gt;twicedaily&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
You can add your defined values like 'every_minute', 'twice_a_hour' etc. This can be done by hooking a function to 'cron_schedules'. Follow the following procedure.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;add_filter('cron_schedules','cron_minute');

function cron_minute($cron_schedules){
   
     $cron_schedules['every_minute'] = array(
      'interval'=&gt; 60,
      'display'=&gt;  __('every minute')
  );

    return $cron_schedules;
   
    } 
    
    &lt;/pre&gt;&lt;br /&gt;
&lt;b&gt; # Take a note that WordPress won't run cron jobs more than once a minute.&lt;/b&gt; see &lt;a href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-wpschedulesingle-event.html"&gt;here&lt;/a&gt; for further details.&lt;br /&gt;
&lt;br /&gt;
if we want to clear all the schedueled hooked with 'practice_cron_jobs'&lt;br /&gt;
use this code&lt;br /&gt;
&lt;pre class="sh_php"&gt;wp_clear_scheduled_hook('practice_cron_jobs') ;
&lt;/pre&gt;It will delete the cron tasks from the wp_options table&lt;br /&gt;
&lt;br /&gt;
you can view the scheduled tasks attached to our defined hook by &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;wp_get_schedule('practice_cron_jobs');
&lt;/pre&gt;&lt;br /&gt;
When you deactivate plugin clear the scheduled hook which will free many scheduled events.&lt;br /&gt;
&lt;br /&gt;
Use this code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sh_php"&gt;register_deactivation_hook(__FILE__,'deactivate_cron_hook');

function deactivate_cron_hook(){
wp_clear_scheduled_hook('practice_cron_jobs');

}

&lt;/pre&gt;&lt;br /&gt;
Recently I have been working on &lt;a href="http://iappsy.com/"&gt;iappsy.com&lt;/a&gt; I have used cron to autogenerate the posts and it's working perfectly.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Limitations:&lt;/b&gt;&lt;/u&gt; It won't execute more than once if time limit is exceeded. For example if you have scheduled a task to do every hour and if a visior comes after 10 hours you can expect there will be 10 executions but actually it doesn't happen It'll execute only once.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;WordPress won't execute cron jobs more than once a minute&lt;/b&gt;. see &lt;a href="http://sabirul-mostofa.blogspot.com/2011/03/wordPress-cron-wpschedulesingle-event.html"&gt;here&lt;/a&gt; for more details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-2962016575974691252?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vjf-vW6cWiJGnYEX40bmV1TFY5w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vjf-vW6cWiJGnYEX40bmV1TFY5w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vjf-vW6cWiJGnYEX40bmV1TFY5w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vjf-vW6cWiJGnYEX40bmV1TFY5w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/2962016575974691252/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-explained.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2962016575974691252?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2962016575974691252?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/03/wordpress-cron-explained.html" title="WordPress cron explained" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CkMMQ38_eCp7ImA9Wx9bEUw.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-40869639076833620</id><published>2011-02-07T06:39:00.000-08:00</published><updated>2011-02-19T02:14:42.140-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-19T02:14:42.140-08:00</app:edited><title>Eclipse Xdebug installation With XAMPP LINUX</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Eclipse is a great open-source and free tool to manage your programming projects.&lt;br /&gt;
&lt;br /&gt;
I have been using eclipse for my java and php projects. Xdebug is an awesome debugging tool you can use with eclipse to debug your php code.&lt;br /&gt;
&lt;br /&gt;
I assume you are using xampp linux and you have set the server at /opt/lampp location.&lt;br /&gt;
&lt;br /&gt;
Requiremnts:&lt;br /&gt;
eclipse classic/eclipse for php developers installation 3.6.1.&lt;br /&gt;
&lt;br /&gt;
At first we shall install xdebug as an extension of php &lt;br /&gt;
1. Download the source code from http://www.xdebug.org/&lt;br /&gt;
2.unzip the tar file and move in to the directory.&lt;br /&gt;
&lt;br /&gt;
Now we will use the phpize utility in your /opt/lampp/bin/phpize location&lt;br /&gt;
if it shows error like "segmentation fault", Run in the terminal sudo apt-get install php-dev&lt;br /&gt;
&lt;br /&gt;
Xdebug website has an amazing insturction page. check it here&lt;br /&gt;
&lt;a href="http://www.xdebug.org/find-binary.php"&gt;http://www.xdebug.org/docs/install&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Don't forget to check the following wizard:&lt;br /&gt;
&lt;a href="http://www.xdebug.org/find-binary.php"&gt;http://www.xdebug.org/find-binary.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;After following the instruction you will have installed xdebug which you can check by the phpinfo();&lt;br /&gt;
&lt;div style="color: black;"&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;u&gt; Configuration at Eclipse:&lt;/u&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Go to window&amp;gt;preferences&amp;gt;php&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: black;"&gt;Set you php executable path first (e.g. /opt/lampp/bin/php)&lt;/div&gt;&lt;div style="color: black;"&gt;Then configure the debug section. Select the php debugger as Xdebug.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: black;"&gt;You are almost done! &lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: black;"&gt;********* &lt;/div&gt;&lt;div style="color: black;"&gt;Now Go to Run&amp;gt;Debug configuration &lt;/div&gt;&lt;div style="color: black;"&gt;make sure you have selected xdebug. Now you're ready to bite the bugs .Hope this helps. Enjoy!&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-40869639076833620?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tGhATxZw1PMI9gFgeXPC10F8QzA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tGhATxZw1PMI9gFgeXPC10F8QzA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tGhATxZw1PMI9gFgeXPC10F8QzA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tGhATxZw1PMI9gFgeXPC10F8QzA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/40869639076833620/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/02/eclipse-xdebug-installation-with-xampp.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/40869639076833620?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/40869639076833620?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2011/02/eclipse-xdebug-installation-with-xampp.html" title="Eclipse Xdebug installation With XAMPP LINUX" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUcHR3k8eSp7ImA9Wx9REEs.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-5464717639178215264</id><published>2010-12-11T03:30:00.000-08:00</published><updated>2010-12-11T03:30:36.771-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-11T03:30:36.771-08:00</app:edited><title>Bohemian words</title><content type="html">Learning the zend framework. First difficulty was connecting to database. Found the solution by editing the mysql configuration file my.cnf located in the /path/to/lampp/etc/my.cnf&lt;br /&gt;
If you face this problem comment the skip-networking line.&lt;br /&gt;
&lt;br /&gt;
I'm working on &lt;a href="http://www.corporatekeys.com.au/blog/"&gt;http://www.corporatekeys.com.au/blog/&lt;/a&gt; website now.&lt;br /&gt;
&lt;br /&gt;
I didn't know that Drupal doesn't follow the object oriented paradigm!&lt;br /&gt;
&lt;br /&gt;
Trying to write a post on wordpress codeflow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-5464717639178215264?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gcLz9MyA2Qmvu2PQ19p-_AGKqUk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gcLz9MyA2Qmvu2PQ19p-_AGKqUk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gcLz9MyA2Qmvu2PQ19p-_AGKqUk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gcLz9MyA2Qmvu2PQ19p-_AGKqUk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/5464717639178215264/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/12/bohemian-words.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/5464717639178215264?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/5464717639178215264?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/12/bohemian-words.html" title="Bohemian words" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkADQX8_eip7ImA9WxFaEE0.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-3906552434177944469</id><published>2010-07-13T00:06:00.000-07:00</published><updated>2010-07-13T00:06:10.142-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-13T00:06:10.142-07:00</app:edited><title>Find your Flickr ID</title><content type="html">I was trying to learn the flickr api.I found that I don't know my flickr ID! so I have made a small script that can help everyone finding  FLICKR ID.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://hit-moviez.co.cc/get-your-flickr-id/" target="_blank"&gt;&lt;h3&gt;FIND YOUR ID HERE&lt;/h3&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I used the &lt;a href="http://www.flickr.com/services/api/"&gt;flickr api&lt;/a&gt; to fetch the ID.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-3906552434177944469?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5fkesgN33_vTXavS_RJZuivDGKU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5fkesgN33_vTXavS_RJZuivDGKU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5fkesgN33_vTXavS_RJZuivDGKU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5fkesgN33_vTXavS_RJZuivDGKU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/3906552434177944469/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/07/find-your-flickr-id.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3906552434177944469?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/3906552434177944469?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/07/find-your-flickr-id.html" title="Find your Flickr ID" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8GRnc9fSp7ImA9WxFbE0w.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-2750713707491946536</id><published>2010-07-04T23:20:00.000-07:00</published><updated>2010-07-04T23:20:27.965-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-04T23:20:27.965-07:00</app:edited><title>hit-moviez.co.cc wordpress posts automated</title><content type="html">&lt;a href="http://hit-moviez.co.cc"&gt;http://hit-moviez.co.cc&lt;/a&gt;&lt;br /&gt;
I had beeen plannig to write a script that can publish posts automatically in wordpress from different sites. It took me two days to write the script. currently it takes movie information from IMDB and publishes automatically.&lt;br /&gt;
    Only best 5 movies are published now.It publishes the images,title,poster,review etc.categoris users are automatically created.planning to convert it to a wordpress plugin.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-2750713707491946536?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vmaiLR_oxqeE7x1hmkRCxO4LyyA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmaiLR_oxqeE7x1hmkRCxO4LyyA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vmaiLR_oxqeE7x1hmkRCxO4LyyA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmaiLR_oxqeE7x1hmkRCxO4LyyA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/2750713707491946536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/07/hit-moviezcocc-wordpress-posts.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2750713707491946536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/2750713707491946536?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/07/hit-moviezcocc-wordpress-posts.html" title="hit-moviez.co.cc wordpress posts automated" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0YGRHozeip7ImA9WhZSFEw.&quot;"><id>tag:blogger.com,1999:blog-1431548068596873205.post-4401548077828277322</id><published>2010-04-25T00:07:00.000-07:00</published><updated>2011-03-29T08:05:25.482-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-29T08:05:25.482-07:00</app:edited><title>PHP Listing all files in a folder and sub-folders</title><content type="html">I was trying to write a php code that lists all files in a folder and sub folders tree.&lt;br /&gt;
At first I wrote this one&lt;br /&gt;
&lt;pre class='sh_php'&gt;function printAll($dirName)
{
$handle=opendir($dirName);
while($file=readdir($handle)){
if(is_file($file)){
echo $file;
}
else if(is_dir($file)&amp;&amp;$file!='.' &amp;&amp; $file!='..')//for excluding . and .. 
{
$dirName=$dirName.'/'.$file;
chdir($dirName);
printAll($dirName);
}//elseif
}
}
printAll(getcwd());//calling the function 
&lt;/pre&gt;&lt;br /&gt;
But it will list only the deepest files in the first subfolder tree.SO I searched  php.net and got the solution. all the subfolder will be kept in a array and will be searched recursively. Here is the code &lt;br /&gt;
&lt;pre class='sh_php'&gt;function printAll($dirName)
{
$dirs=array($dirName);
$files=array();
while($dir=array_pop($dirs)){
$handle=opendir($dir);
while($file=readdir($handle)){
if($file!='.' &amp;&amp; $file!='..'){
$dest=$dir.'/'.$file;
if(is_file($dest)){
$files[]=$file;
echo $file;
}
else{
$dirs[]=$dest;
}
}
}//end of 1st while
}//end of 2nd while

return $files;
}//end of function

printAll(getcwd());
&lt;/pre&gt;The function now returns a array containing the name all files in the current folder and subfolders tree.It will print all the file names too. you can easily modify this.&lt;br /&gt;
That's it! It was fun.If any function is unknown to you just  visit &lt;a href="http://php.net" target='_blank'&gt;php.net&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1431548068596873205-4401548077828277322?l=sabirul-mostofa.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2f_jdsphhcdwmtsH504CHlk02SI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2f_jdsphhcdwmtsH504CHlk02SI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2f_jdsphhcdwmtsH504CHlk02SI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2f_jdsphhcdwmtsH504CHlk02SI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sabirul-mostofa.blogspot.com/feeds/4401548077828277322/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/04/php-listing-all-files-in-folder-and-sub.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/4401548077828277322?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1431548068596873205/posts/default/4401548077828277322?v=2" /><link rel="alternate" type="text/html" href="http://sabirul-mostofa.blogspot.com/2010/04/php-listing-all-files-in-folder-and-sub.html" title="PHP Listing all files in a folder and sub-folders" /><author><name>sabbir</name><uri>http://www.blogger.com/profile/06845605734931950348</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry></feed>

