<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Experience Explored</title>
	<atom:link href="http://blog.liveoutsource.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.liveoutsource.com</link>
	<description>Web Technology Tutorial Blog</description>
	<lastBuildDate>Thu, 22 Mar 2012 09:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Easy way to Change WordPress Editor Font</title>
		<link>http://blog.liveoutsource.com/easy-way-to-change-wordpress-editor-font/</link>
		<comments>http://blog.liveoutsource.com/easy-way-to-change-wordpress-editor-font/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 07:41:47 +0000</pubDate>
		<dc:creator>Kamol</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=168</guid>
		<description><![CDATA[If you’re using WordPress visual editor, you may want to change the default font to a new one of your choice. Simply follow this simple recipe to get the job done. To Change WordPress Editor Font just open your functions.php file and paste the following code: add_action( 'admin_head-post.php', 'devpress_fix_html_editor_font' ); add_action( 'admin_head-post-new.php', 'devpress_fix_html_editor_font' ); function [...]]]></description>
			<content:encoded><![CDATA[<p>If you’re using WordPress visual editor, you may want to change the default font to a new one of your choice. Simply follow this simple recipe to get the job done.</p>
<p>To Change WordPress Editor Font just open your functions.php file and paste the following code:</p>
<pre>add_action( 'admin_head-post.php', 'devpress_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'devpress_fix_html_editor_font' );

function devpress_fix_html_editor_font() { ?&gt;
&lt;style type="text/css"&gt;#editorcontainer #content, #wp_mce_fullscreen { font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; }&lt;/style&gt;
&lt;?php }</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/easy-way-to-change-wordpress-editor-font/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add new file extension (phtml) in Dreamweaver for XP, Win7, Vista &amp; Mac</title>
		<link>http://blog.liveoutsource.com/how-to-add-new-file-extension-phtml-in-dreamweaver-for-xp-win7-vista-mac/</link>
		<comments>http://blog.liveoutsource.com/how-to-add-new-file-extension-phtml-in-dreamweaver-for-xp-win7-vista-mac/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 02:13:30 +0000</pubDate>
		<dc:creator>Sabur Khan</dc:creator>
				<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=123</guid>
		<description><![CDATA[Sometimes we need to add new file type in dreamweaver. Like- to work with Magento we need edit many file which extension is PHTML. Normally Dreamweaver can&#8217;t support PHTML files. If you use Dreamweaver to edit your PHTML file to develop your website, you can add phtml as a file type in your Dreamweaver. To [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-46" title="Add phtml in Dreamweaver" src="http://xpressbangla.com/wp-content/uploads/2011/12/phtml-150x150.jpg" alt=" phtml" width="150" height="150" /></p>
<p>Sometimes we need to add new file type in dreamweaver. Like- to work with Magento we need edit many file which extension is PHTML. Normally Dreamweaver can&#8217;t support PHTML files. If you use Dreamweaver to edit your PHTML file to develop your website, you can add phtml as a file type in your Dreamweaver. To support PHTML file in your Dreamweaver you can follow some simple steps which will render your .phtml file as php file. Then you can edit your PHTML file easily.</p>
<p><strong style="font-size: 25px; color: #006600;">Steps are given below:</strong></p>
<p><strong style="text-decoration: underline;">Step one: Add .phtml extension to &#8216;Extension.txt&#8217; in your Application Data</strong></p>
<p><strong>For XP:</strong> Documents and Settings -&gt; User &#8211; &gt; Application Data -&gt; Adobe -&gt; Dreamweaver<em>[Your Version]</em> &#8211; &gt; Configuration -&gt; Extensions.txt</p>
<p><strong>For Windows7:</strong> Documents and Settings -&gt; User &#8211; &gt; AppData -&gt; Roaming -&gt; Adobe -&gt; Dreamweaver<em>[Your Version]</em> &#8211; &gt; Configuration -&gt; Extensions.txt</p>
<p><strong>For Vista:</strong> Users -&gt; [user] -&gt; AppData &gt; Roaming -&gt; Adobe -&gt; Dreamweaver<em>[Your Version]</em> -&gt; Configuration -&gt; Extensions.txt</p>
<p><strong>For Mac OS X:</strong> Users -&gt; [Home Folder] -&gt; Library -&gt; Application Support -&gt; Adobe -&gt; Dreamweaver<em>[Your Version]</em> -&gt; [en_US or other locale (only for version CS4)] &#8211; &gt; Configuration -&gt; Extensions.txt</p>
<p>Then open Extensions.txt add &#8216;PHTML&#8217; in the first line and in the PHP line. Which should like-</p>
<p>HTM,HTML,SHTM,SHTML,XML,XSL,XSD,&#8230;. PHP,PHP3,PHP4,PHP5,PHTML,&#8230;. JSP,WML,VTML,INC,JAVA,EDML,WML:All Documents</p>
<p>PHP,PHP3,PHP4,PHP5,TPL,PHTML:PHP Files</p>
<p><strong style="text-decoration: underline;">Step two: Add .phtml to the Extension.txt configuration file</strong></p>
<p>This step is same as step one but the Extensions.txt file is located in Dreamweaver’s program files folder and inside a configuration folder. To find out that file please go:</p>
<p><strong>For XP &amp; Vista:</strong> Program Files &#8211; &gt; Adobe -&gt; Dreamweaver<em>[Your Version] </em>-&gt; Configuration &gt; Extensions.txt</p>
<p><span><strong>For Windows7:</strong> Program files -&gt; Adobe -&gt;Dreamweaver<em>[Your Version]</em> -&gt; Configuration -&gt; Extensions.txt</span></p>
<p><strong>Mac OS X:</strong> Applications -&gt; Adobe -&gt; <span>Dreamweaver<em>[Your Version]</em></span> -&gt; Configuration -&gt; Extensions.txt</p>
<p><strong style="text-decoration: underline;">Step three: Add PHTML to MMDocumentTypes.xml</strong></p>
<p>Now we need to change a XML file to fix the colour coding settings for the .phtml files so the code will be easier to edit. This XML file should be located in:</p>
<p><strong>For XP &amp; Vista:</strong> Program Files -&gt; Adobe -&gt;<span>Dreamweaver<em>[Your Version]</em></span> -&gt; Configuration -&gt; DocumentTypes -&gt; MMDocumentTypes.xml</p>
<p><span><strong>For Windows7:</strong> Program files -&gt; Adobe -&gt;Dreamweaver<em>[Your Version]</em> -&gt; Configuration -&gt; DocumentTypes -&gt; MMDocumentTypes.xml</span></p>
<p><strong>Mac OS X: </strong><em>Applications &gt; Adobe Dreamweaver [Your Version] &gt; configuration &gt; DocumentTypes &gt; MMDocumentTypes.XML</em></p>
<p>Now open the <em>MMDocumentTypes.XML</em> and add &#8216;phtml&#8217; to the end of the following lines in the xml files. Which should like-</p>
<p>winfileextension=&#8221;php,php3,php4,php5,phtml&#8221;</p>
<p>macfileextension=&#8221;php,php3,php4,php5,phtml&#8221;</p>
<p style="color: #330066;">Now Restart or Open your Dreamweaver and you will be able to see that the PHTML files look like standard HTML file. Now you shouldn’t have any problems with PHTML files.</p>
<p style="color: #000000;">
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/how-to-add-new-file-extension-phtml-in-dreamweaver-for-xp-win7-vista-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change WordPress default FROM email address</title>
		<link>http://blog.liveoutsource.com/change-wordpress-default-from-email-address/</link>
		<comments>http://blog.liveoutsource.com/change-wordpress-default-from-email-address/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 15:55:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=114</guid>
		<description><![CDATA[WordPress is a very nice and easy blogging platform. But you can’t modify the FROM email adress by default. If you want toChange WordPress default FROM email address easily, follow the tutorial. Credits: Cool! Blogging]]></description>
			<content:encoded><![CDATA[<p>WordPress is a very nice and easy blogging platform. But you can’t modify the FROM email adress by default. If you want toChange WordPress default FROM email address easily, follow the tutorial.</p>
<pre>add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');

function new_mail_from($old) {
 return 'admin@yourdomain.com';
}
function new_mail_from_name($old) {
 return 'Your Blog Name';
}</pre>
<p>Credits: <a href="http://www.kamolbd.com" title="Cool! Blogging">Cool! Blogging</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/change-wordpress-default-from-email-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How did i speed up a Magento e-commerce website -1 ( Current status of our targeted example site )</title>
		<link>http://blog.liveoutsource.com/how-did-i-speed-up-a-magento-e-commerce-website-1-current-status-of-our-targeted-example-site/</link>
		<comments>http://blog.liveoutsource.com/how-did-i-speed-up-a-magento-e-commerce-website-1-current-status-of-our-targeted-example-site/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:17:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=99</guid>
		<description><![CDATA[Note: Speeding up or Optimizing an application requires a lot of R &#38; D and of-course deep knowledge on how things work together. On this post, no steps of optimization is invented/discovered by me. All i have done here is compiling others advise and try to present on how to implement practically. So, this post [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note</strong>: Speeding up or Optimizing an application requires a lot of R &amp; D and of-course deep knowledge on how things work together. On this post, no steps of optimization is invented/discovered by me. All i have done here is compiling others advise and try to present on how to implement practically. So, this post owe to all who wrote articles, posts on application optimization, specially optimization with Mangento.</p>
<p>The website i am going to optimize is a popular e-commerce store selling cell phones online for the last 8 years and the site recently moves to magento. They have over 1500 product at this moment and in one or two months thier target is to have at least 20,000 products. On this post i shall term the website as http://www.targetsite.com.</p>
<h1>Finding Current Server Environment:</h1>
<h2>OS &amp; Hardware</h2>
<p>1. Using SSH client, login into the server i ran the command to be confirmed if i am on fedora/redhat/centos</p>
<pre>#head -n1 /etc/issue</pre>
<p>And the output <strong>Fedora release 13 (Goddard)</strong> confirms me.</p>
<p>2. To checkcpuinfo</p>
<pre># cat /proc/cpuinfo
processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 107
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
stepping        : 2
cpu MHz         : 2299.688
cache size      : 512 KB
.....</pre>
<h2>Webserver</h2>
<p>3. To find the version</p>
<pre># httpd -v
Server version: Apache/2.2.17 (Unix)</pre>
<h2>MySQL</h2>
<p>4. To check the version</p>
<pre>mysql -V
mysql  Ver 14.14 Distrib 5.1.56, for redhat-linux-gnu (x86_64) using...</pre>
<h2>Magento Application</h2>
<p>Products : ~1500<br />
Extensions Installed: 103 including defaults [ more extensions less performance <img src='http://blog.liveoutsource.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ]<br />
Magento Cache : Disabled [ I disabled this at this point to perform optimization step by step ]</p>
<h1>Checking Current Performance</h1>
<h2>This installation shows the following performance status using <a title="ab" href="http://httpd.apache.org/docs/2.0/programs/ab.html" target="_blank">ab</a> ( ApacheBench)</h2>
<pre># ab -n 100 -c 5 http://www.targetsite.com/
Concurrency Level:      5
Time taken for tests:   229.616 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      12459400 bytes
HTML transferred:       12422700 bytes
Requests per second:    0.44 [#/sec] (mean)
Time per request:       11480.817 [ms] (mean)
Time per request:       2296.163 [ms] (mean, across all concurrent requests)
Transfer rate:          52.99 [Kbytes/sec] received

Percentage of the requests served within a certain time (ms)
  50%  11372  (quickest request)
 ............
 100%  13651 (longest request)</pre>
<h2>And Output in <a href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a></h2>
<p><a href="http://www.zadid.net/wp-content/uploads/2011/07/yslow.png"><img title="yslow" src="http://www.zadid.net/wp-content/uploads/2011/07/yslow-300x176.png" alt="output on yslow" width="300" height="176" /></a></p>
<h2>And Analysis from <a href="http://code.google.com/speed/page-speed/" target="_blank">Google Page Speed</a></h2>
<p><a href="http://www.zadid.net/wp-content/uploads/2011/07/pagespeed.png"><img title="page speed" src="http://www.zadid.net/wp-content/uploads/2011/07/pagespeed-205x300.png" alt="" width="205" height="300" /></a></p>
<h2>Required loading time of Home Page on various connection rate using <a title="websiteoptimization" href="http://www.websiteoptimization.com/services/analyze/" target="_blank">web-based tool </a></h2>
<p><a href="http://www.zadid.net/wp-content/uploads/2011/07/webanalizer.png"><img title="webanalizer" src="http://www.zadid.net/wp-content/uploads/2011/07/webanalizer-300x156.png" alt="" width="300" height="156" /></a></p>
<p>However, this is all about the current performance status of the targetsite.com. On my next followup posts i shall start implementing various optimization steps. Until then stay tuned!</p>
<p>Happy Optimizing <img src='http://blog.liveoutsource.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/how-did-i-speed-up-a-magento-e-commerce-website-1-current-status-of-our-targeted-example-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How did i speed up a Magento e-commerce website -2 ( Optimizing MySQL for Magento )</title>
		<link>http://blog.liveoutsource.com/how-did-i-speed-up-a-magento-e-commerce-website-2-optimizing-mysql-for-magento/</link>
		<comments>http://blog.liveoutsource.com/how-did-i-speed-up-a-magento-e-commerce-website-2-optimizing-mysql-for-magento/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:15:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=97</guid>
		<description><![CDATA[First thing first. Some quick check using phpMyAdmin [ Most developer should have access to this ] 1. Check table 2. Repair table [ If required ] 3. Optimize table To do so, you can run command from mysql&#62; command line Or from phpMyAdmin. Please check on the bottom of the table list. There is [...]]]></description>
			<content:encoded><![CDATA[<p>First thing first. Some quick check using phpMyAdmin [ Most developer should have access to this ]</p>
<h2>1. Check table</h2>
<h2>2. Repair table [ If required ]</h2>
<h2>3. Optimize table</h2>
<p>To do so, you can run command from mysql&gt; command line Or from phpMyAdmin. Please check on the bottom of the table list. There is a select box titled &#8220;With Selected&#8221;. You can perform the task from there. In my case, i found everything OK.</p>
<h2>4. Configuring <a href="http://dev.mysql.com/doc/refman/5.0/en/query-cache-configuration.html" target="_blank">MySQl Query Cache</a></h2>
<h3>A. Checking if query cache is available on the server</h3>
<pre>mysql&gt; SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| have_query_cache | YES   |
+------------------+-------+</pre>
<p>So, we have query cache.</p>
<h3>B. Checking if query cache is available on the server</h3>
<pre>mysql&gt; SHOW VARIABLES LIKE 'query_cache_size';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| query_cache_size | 0     |
+------------------+-------+
1 row in set (0.00 sec)</pre>
<p>So, query cache is not configured. We have to configure this.</p>
<h3>C. Configuring Query Cache</h3>
<pre># vi /etc/my.cnf
[mysqld]
...

query_cache_size=64M
query_cache_type=1
query_cache_min_res_unit=4KB
query_cache_limit=2MB

...

#service mysqld restart</pre>
<p>So, mysql query cache should be inaction.<br />
I have found <a title="mysql query cache" href="http://www.sitebuddy.com/mysql/query_cache_size/query_cache_limit" target="_blank">this article</a> very explanatory for whom who wants to understand things behind the scene. And you also can get help from <a title="mysql query cache" href="http://www.crucialwebhost.com/blog/improving-magento-speed-and-performance-with-mysql-query-cache/" target="_blank">here</a>.</p>
<pre>mysql&gt; SHOW VARIABLES LIKE 'query_cache_size';
+------------------+----------+
| Variable_name    | Value    |
+------------------+----------+
| query_cache_size | 67108864 |
+------------------+----------+
1 row in set (0.00 sec)</pre>
<p>To get more information for better <a title="mysql query cache maintenance" href="http://dev.mysql.com/doc/refman/5.5/en/query-cache-status-and-maintenance.html" target="_blank">maintenance </a>run this command.</p>
<pre>mysql&gt;  SHOW STATUS LIKE 'Qcache%';
+-------------------------+----------+
| Variable_name           | Value    |
+-------------------------+----------+
| Qcache_free_blocks      | 1        |
| Qcache_free_memory      | 64226488 |
| Qcache_hits             | 2647     |
| Qcache_inserts          | 956      |
| Qcache_lowmem_prunes    | 0        |
| Qcache_not_cached       | 26       |
| Qcache_queries_in_cache | 863      |
| Qcache_total_blocks     | 1850     |
+-------------------------+----------+
8 rows in set (0.00 sec)</pre>
<p>Now its time to see change in performance. Before that after running the site lets check the Qcache variable status</p>
<pre>mysql&gt;  SHOW STATUS LIKE 'Qcache%';
+-------------------------+----------+
| Variable_name           | Value    |
+-------------------------+----------+
| Qcache_free_blocks      | 1        |
| Qcache_free_memory      | 60745664 |
| Qcache_hits             | 10235    |
| Qcache_inserts          | 2179     |
| Qcache_lowmem_prunes    | 0        |
| Qcache_not_cached       | 69       |
| Qcache_queries_in_cache | 1959     |
| Qcache_total_blocks     | 4096     |
+-------------------------+----------+
8 rows in set (0.00 sec)</pre>
<p>So, it indicates that some queries are cached now.</p>
<pre># ab -n 100 -c 5 http://www.targetsite.com/

Concurrency Level:      5
Time taken for tests:   176.169 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      12459400 bytes
HTML transferred:       12422700 bytes
Requests per second:    0.57 [#/sec] (mean)
Time per request:       8808.468 [ms] (mean)
Time per request:       1761.694 [ms] (mean, across all concurrent requests)
Transfer rate:          69.07 [Kbytes/sec] received

Percentage of the requests served within a certain time (ms)
  50%   8706
...
 100%  10341 (longest request)</pre>
<p>So, there is 29% improvement in RPS ( Request Per Second ).</p>
<h3>D. Innodb Configuration</h3>
<p>Magento white-paper recommends innodb_buffer_pool_size be set at 50% to 80% of servers ram. If the web and database run on the same server it is better to set 50% of your ram. And if the mysql box is separate then  upto 80% can be set safely. But before working with innodb one should read <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-data-log-reconfiguration.html">this</a> article. So we add the configuration value on my.cnf</p>
<pre>innodb_buffer_pool_size         = 2048M  #Data Page Memory Buffer
# Table metadata requires 2-16M, Magento only has abt 330 tables
innodb_additional_mem_pool_size = 4M    #Data Dictionary &lt; 16M</pre>
<p>Alas! i do not find any significant improvement. Perhaps this is due to my lack of innodb knowledge. i just followed some example. However, i shall update this section later if i could find something new.</p>
<h3>E. Split the load, running mysql on different server</h3>
<p>Though some suggest to keep mysql on separate server I have found article where it is mentioned that this will have no significant impact on the overall performance. I give it a try as i have to speed up with 20000 product ultimately so i tried with every option.  After spiting the web server and mysql server i did not see any change rather i found a little decrease in RPS ( Request Per Second ).</p>
<p>Check: Looks like a nice <a href="http://hackmysql.com/mysqlreport">tool </a>for R &amp; D.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/how-did-i-speed-up-a-magento-e-commerce-website-2-optimizing-mysql-for-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do You know CSS? Basic Javascript? You are a jQuery Pro!</title>
		<link>http://blog.liveoutsource.com/do-you-know-css-basic-javascript-you-are-a-jquery-pro/</link>
		<comments>http://blog.liveoutsource.com/do-you-know-css-basic-javascript-you-are-a-jquery-pro/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:10:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=95</guid>
		<description><![CDATA[One of my colleague once asked me to teach jQuery in a very short time. He was very good in CSS. I gave him a 30 mins session that he found very useful later. I hope this will help some one else also. Concept 1 What CSS does? Simply select html elements and apply styles [...]]]></description>
			<content:encoded><![CDATA[<p>One of my colleague once asked me to teach jQuery in a very short time. He was very good in CSS. I gave him a 30 mins session that he found very useful later. I hope this will help some one else also.</p>
<p><strong>Concept 1</strong></p>
<p>What CSS does? Simply select html elements and apply styles to them. jQuery acts in the same way. You can select dom object in a similar fashion. Assume we have a html page like this</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;jQuery Tips&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;Content for Div1 goes here&lt;/div&gt;
&lt;div id="div2"&gt;Content for Div2 with an id goes here&lt;/div&gt;
&lt;div&gt;Content for Div3 with a class goes here&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This is a div with a child of a parent div&lt;/span&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Before dive into code you need to include jQuery library. Add the line below into the head tag.</p>
<pre>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>Using Google CDN, we just add the library into our code and the magical $() function is now available within our javascript.</p>
<p>Now as we know css, if we want the div with id should have red background color we should hook the div using css ID selector and apply the style as we want</p>
<pre>&lt;style&gt;
 #div2{  /*ID selector */
   background-color:red;
}
&lt;/style&gt;</pre>
<p>As you know how to select an element with ID in css, you actually already know how to select an element as jQuery Object. See the code below:</p>
<pre>&lt;script&gt;

$("#div2"); // you just hook the element

console.log($("#div2")); /* If you browse on firefox with firebug
installed, you can clearly see that this code writes "Object object"
cleanly indicating that this is an Object, more specifically thjis is a
jQuery object */

 //now play around with this
$("#div2").css('background-color','green');
 &lt;/script&gt;</pre>
<p>See! the same way, you can select using class selector   $(&#8216;.div3&#8242;)  or tag selector $(&#8216;div&#8217;)</p>
<p>The bottom line is: You can use almost any selector pattern used in css2 and css3 engine. Try it out!</p>
<p><strong>Concept 2</strong></p>
<p>Next awesome and beautiful thing of jQuery ( at least to me ) is the use of object literals  as its function arguments.</p>
<p>Here is a short note on Object literal:</p>
<pre>&lt;script&gt;

var car = {};  // an object, named 'car' is defined which has no property or method

console.log(car) // clearly found that this is an object of type Object, 'Object object'

/* below we have defined another object named 'anotherCar' that has
property 'door', 'wheel' and a method 'drive' */

var anotherCar = {

   door:4,

   wheel:4,

   drive:function(){
       //function body
   }

}

&lt;/script&gt;</pre>
<p>The way of defining object in javascript is titled Object literal. How this is so beautiful in jQuery?</p>
<p>In jQuery, if a method takes argument, it takes several ways. To demonstrate this, think we want to have following look to our div with the id &#8216;div2&#8242;</p>
<ul>
<li>Yellow background</li>
<li>Bold font</li>
<li>Green Text</li>
</ul>
<p>To accomplish this using jQuery we can write:</p>
<pre>&lt;script&gt;

$('#div2').css('background-color','yellow');
$('#div2').css('font-weight','bold');
$('#div2').css('color','green');

&lt;/script&gt;</pre>
<p>Or, as jQuery uses Object chaining design pattern same thing can be accomplished this way</p>
<pre>&lt;script&gt;

$('#div2')
          .css('background-color','yellow')
          .css('font-weight','bold')
          .css('color','green');

&lt;/script&gt;</pre>
<p>Or a more handy way ( Here comes the role of Object literal ) , you first can define a object literal of the properties you need like</p>
<pre>&lt;script&gt;

var cssAttr = {

         background:'yellow',
         fontWeight:'bold',
         color:'green'

}
&lt;/script&gt;</pre>
<p>And then simply pass this object to the function as its argument</p>
<pre>&lt;script&gt;

var cssAttr = {

         background:'yellow',
         fontWeight:'bold',
         color:'green'

}

$('#div2').css(cssAttr);

&lt;/script&gt;</pre>
<p>Or, the less readable but more interesting ( for jQuery only ) way ( reduce line number in your code)</p>
<pre>&lt;script&gt;

$('#div2').css({background:'yellow',fontWeight:'bold',color:'green'});

&lt;/script&gt;</pre>
<p>Refreshing !  Isn&#8217;t it?</p>
<p>Also never never forget to bookmark http://www.visualjquery.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/do-you-know-css-basic-javascript-you-are-a-jquery-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to integrate CKEditor &amp; CKFinder in your CAKEPHP application</title>
		<link>http://blog.liveoutsource.com/how-to-integrate-ckeditor-ckfinder-in-your-cakephp-application/</link>
		<comments>http://blog.liveoutsource.com/how-to-integrate-ckeditor-ckfinder-in-your-cakephp-application/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:07:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=93</guid>
		<description><![CDATA[Here is a quick and dirty article . If you need integrating ckeditor and ckfinder with cakphp, jump onto this. I know you are brave! Step 1: Add the below codes in beforeFilter Function of app_controllers.php $ckeditorClass = 'CKEDITOR'; $this-&#62;set('ckeditorClass', $ckeditorClass); Step 2: Download and extract CKEditor &#38; CKFinder under webrrot/js directory. So the directory [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick and dirty article . If you need integrating ckeditor and ckfinder with cakphp, jump onto this. I know you are brave!</p>
<p>Step 1:</p>
<p>Add the below codes in beforeFilter Function of app_controllers.php</p>
<pre>$ckeditorClass = 'CKEDITOR';
$this-&gt;set('ckeditorClass', $ckeditorClass);</pre>
<p>Step 2:</p>
<p>Download and extract <a href="http://ckeditor.com">CKEditor </a>&amp; <a href="http://ckfinder.com">CKFinder </a>under webrrot/js directory. So the directory structure looks like something below:<br />
app/webroot/js/ckeditor<br />
app/webroot/js/ckfinder</p>
<p>Step 3:</p>
<p>Link the editors library to the cakephp applicaion. Like we can add on default.ctp</p>
<pre>echo $this-&gt;Html-&gt;script('ckeditor/ckeditor.js');
echo $this-&gt;Html-&gt;script('ckfinder/ckfinder.js');</pre>
<p>Step 4:</p>
<p>Now we need to add ckeditor replacing our basic html textarea control</p>
<pre>&lt;?php	echo $this-&gt;Form-&gt;textarea('custom_html', array('class'=&gt;$ckeditorClass));?&gt;
&lt;script type="text/javascript"&gt;
	var CustomHTML = CKEDITOR.replace( 'ID OF YOUR TEXTAREA' );
&lt;/script&gt;</pre>
<p>Now, if you hit the browser , you can see the the WYSWYG CKEDITOR is loaded. But if you click on the image icon you can see that you can enter the path of the image BUT THERE IS NO &#8216;Browse&#8217; Button to upload image from your Desktop. Here comes the role of CKFINDER. So we need to integrate the CKFINDER now. Before hand please keep in mind if you do not have a license for CKFINDER, it  will run with full functionality but as Demo. Which will not prevent you to do your objective.</p>
<p>Step 5:</p>
<p>To integrate CKFINDER we need to edit js/ckfinder/config.php. We need to adjust the value of two variables</p>
<pre>$baseUrl = 'files/ckuploads/';//as we want to have all of our files under webrrot/files/ckuploads folder
$baseDir = $_SERVER['DOCUMENT_ROOT'].'/app/webroot/files/ckuploads/';</pre>
<p>Step 6. Now need to integrate CKFINDER to CKEDITOR.  I need NOT to write this article as the whole article is based on this <a href="http://blog.beamstyle.com.hk/tutorial-on-integrating-ckfinderckeditor-into-cakephp-with-session-authentication/">awesome article</a>. But i cannot make this section working in my case from that. I took help from <a href="http://cakephp.1045679.n5.nabble.com/Ckeditor-CkFinder-How-to-td1331470.html">here</a>. And this is the background of this new article.</p>
<pre>CKEDITOR.replace( 'ID OF YOUR TEXTAREA CONTROL',
	{filebrowserBrowseUrl : '/js/ckfinder/ckfinder.html',filebrowserWindowWidth : '1000',filebrowserWindowHeight : '700'}
	);</pre>
<p>Hit the browser, you can see the Browse button and if you click on the button a new window will be opened with the list of files. Right? No. it will raise an security issue as usually you are running this WYSWYG on admin control panel/dashboard or any restrictive area. It is not secure to use any WYSWYG editor  to take user input. However, we need to do authentication check.</p>
<p>Step 7:</p>
<p>Open up app/webroot/js/ckfinder/config.php.Define the method</p>
<pre>function CheckAuthentication()

{

 if( isset($_SESSION['Auth']['User']) )

 {

  return true;

 }

 return false;

}</pre>
<p>CKFINDER needs to be informed that cakephp uses a different session ID other than default. Add the code below on the very top of ckfinder/config.php file</p>
<pre>session_name("CAKEPHP");
session_start();</pre>
<p>You should be done by this time. NO? Whats the problem? Files are not uploading? Ohh&#8230; check the permission of the files/ckuploads folder. It should be 757</p>
<p>Happy WYSWYGing!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/how-to-integrate-ckeditor-ckfinder-in-your-cakephp-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am surprised when i see mailto in detail</title>
		<link>http://blog.liveoutsource.com/i-am-surprised-when-i-see-mailto-in-detail/</link>
		<comments>http://blog.liveoutsource.com/i-am-surprised-when-i-see-mailto-in-detail/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:04:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=91</guid>
		<description><![CDATA[I use &#8216;mailto&#8217; in HTML rarely. However, when i first find what can be done with this, i was just surprised. I really need to go through HTML in more depth. Click on the links below: Simple Email me Surprising Email me ( at least for me )]]></description>
			<content:encoded><![CDATA[<p>I use &#8216;mailto&#8217; in HTML rarely. However, when i first find what can be done with this, i was just surprised. I really need to go through HTML in more depth. Click on the links below:</p>
<p>Simple <a href="mailto:rusdid@zadid.net">Email me</a></p>
<p>Surprising <a href="mailto:rusdid@zadid.com?subject=Is%20not%20it%20surprising?&amp;body=Dear%20all,%0AI%20never%20know%20subject%20of%20an%20email%20and%20even%20the%20body%20can%20be%20set%20using%20%27mailto%27.%0A%0A%0AUser%20Name%20:%20%0AZadid%20Rusdid:%20%0ADetails:%20%0ADetail%20of%20email%20%0A%0Awith%20some%20format">Email me</a> ( at least for me )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/i-am-surprised-when-i-see-mailto-in-detail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some handy commands for Redhat/Fedora/CentOS linux</title>
		<link>http://blog.liveoutsource.com/some-handy-commands-for-redhatfedoracentos-linux/</link>
		<comments>http://blog.liveoutsource.com/some-handy-commands-for-redhatfedoracentos-linux/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:02:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=89</guid>
		<description><![CDATA[This post is just a summary of some commands &#38; tools that i need often to use. Memory: #free -m #top #sar 1 5 Get Server Information #cat /proc/version #cat /etc/fedora-release #head -n1 /etc/issue #cat /proc/cpuinfo #cat /proc/meminfo #uname -a &#124; -s &#124; -i  &#124; -p &#124; -m Setting Timezone Video Tutorial Starting Service at [...]]]></description>
			<content:encoded><![CDATA[<p>This post is just a summary of some commands &amp; tools that i need often to use.</p>
<p><strong>Memory</strong>:<br />
#free -m<br />
#top<br />
#sar 1 5</p>
<p><strong>Get Server Information</strong><br />
#cat /proc/version<br />
#cat /etc/fedora-release<br />
#head -n1 /etc/issue<br />
#cat /proc/cpuinfo<br />
#cat /proc/meminfo<br />
#uname -a | -s | -i  | -p | -m</p>
<p><strong>Setting Timezone</strong><br />
Video Tutorial</p>
<p><strong>Starting Service at Boot Time</strong><br />
#chkconfig &#8211;levels 235  [service name:e.g httpd] on</p>
<p><strong>SSH HOST KEY ISSUE</strong><br />
.ssh/known-hosts<br />
#ssh -o stricthostkeychecking=ask [IP]</p>
<p><strong>Taking MySQL BackUp</strong><br />
#mysqldump -u [user] -p [dbname] | gzip -9 &gt; backup.sql.gz<br />
<strong>Restore MySQl Database</strong><br />
#gunzip &lt; backup.sql.gz | mysql -u [user] -p [dbname]</p>
<p><strong>File Transfer<br />
</strong>#scp target destination<strong><br />
</strong>e.g. scp /path/to/file user@xxx.xxx.xxx.xxx:./<strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/some-handy-commands-for-redhatfedoracentos-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to transfer and test a  site under a new hosting account emulating the real time scenario</title>
		<link>http://blog.liveoutsource.com/how-to-transfer-and-test-a-site-under-a-new-hosting-account-emulating-the-real-time-scenario/</link>
		<comments>http://blog.liveoutsource.com/how-to-transfer-and-test-a-site-under-a-new-hosting-account-emulating-the-real-time-scenario/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 20:58:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://blog.liveoutsource.com/?p=86</guid>
		<description><![CDATA[For example, you have a live site built on wordpress. You want to move the site under new hosting but you want to test before domain re-pointing. As it is on shared server you cannot run the site using the IP directly. Or, you actually do not want to touch the database to set &#8216;siteurl&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>For example, you have a live site built on wordpress. You want to move the site under new hosting but you want to test before domain re-pointing. As it is on shared server you cannot run the site using the IP directly. Or, you actually do not want to touch the database to set &#8216;siteurl&#8217; option type thing for wordpress or path url for Magento after repointing.</p>
<p>In brief, you need to test like real time site whereas domain is still pointed and live on old hosting account.</p>
<p>I have the solution from a hosting company. May be helpful for someone.</p>
<p>Actually what do we need? We need to bypass DNService so that when we type our url to the browser and hit enter, browser should go the the new server not the old one.</p>
<p>We can do this using host file of our pc.</p>
<p>Lets say, our domain name is: ourexamplesite.com &amp; the ip of the new server is 122.22.11.34. Just follow the steps and you are done</p>
<p>1. Open C:\WINDOWS\system32\drivers\<wbr>etc\hosts</wbr></p>
<p>2. Enter the following entries:</p>
<p>122.22.11.34  ourexamplesite.com<br />
122.22.11.34  www.ourexamplesite.com</p>
<p>Now from the pc you have made the necessary changes, your browser will hit the new server for the domain.</p>
<p>Nice! Right?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liveoutsource.com/how-to-transfer-and-test-a-site-under-a-new-hosting-account-emulating-the-real-time-scenario/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

