<?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>Programming Ideas, Logics, Tips and Tricks &#187; code</title>
	<atom:link href="http://www.sajithmr.me/tag/code/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Mon, 23 Jan 2012 15:44:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mysql Table Editor</title>
		<link>http://www.sajithmr.me/mysql-table-editor</link>
		<comments>http://www.sajithmr.me/mysql-table-editor#comments</comments>
		<pubDate>Thu, 04 Jun 2009 04:31:56 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[msql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/?p=439</guid>
		<description><![CDATA[In a php project, if we get the requirement , we usually start design and database. But the data entry procedure is very hard. In this case PhpMyadmin is a good comfort.  Here is another tool from phpguru.org , MySQL Table Editor. Using this library you can make your database table editable from your php [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sajithmr.com/wp-content/uploads/2009/06/mysql-table-editor.png"><img class="alignnone size-full wp-image-442" title="mysql-table-editor" src="http://www.sajithmr.com/wp-content/uploads/2009/06/mysql-table-editor.png" alt="" width="291" height="59" /></a></p>
<p>In a php project, if we get the requirement , we usually start design and database. But the data entry procedure is very hard. In this case PhpMyadmin is a good comfort. </p>
<p>Here is another tool from phpguru.org , MySQL Table Editor. Using this library you can make your database table editable from your php code. </p>
<p>You can  :</p>
<ol>
<li>Select the table to be displayed</li>
<li>decide which column should be hidden</li>
<li>Whether a column should be editable or not</li>
<li>Add advanced searching option</li>
<li>Download the table as csv format</li>
<li>Add pagination</li>
<li>Set alias display name for your column</li>
</ol>
<div>Download Library from: </div>
<div><a href="http://www.phpguru.org/downloads/TableEditor/TableEditor.zip">http://www.phpguru.org/downloads/TableEditor/TableEditor.zip</a></div>
<div></div>
<div>Documentation:</div>
<div><a href="http://www.phpguru.org/static/TableEditor.html">http://www.phpguru.org/static/TableEditor.html</a></div>
<div></div>
<div>Sample Code Below:</div>
<pre lang="php">

<?php
require_once('TableEditor.php');
//database connection object
$db_conn = mysql_connect('localhost','root','');
mysql_select_db('mydbname'); 

//select the table to be edited, here it is accounts
$editor = new TableEditor($db_conn, 'accounts');
//I dont want to display id and password column
$editor->noDisplay('id');
$editor->noDisplay('password');
//the email column should not be editable
$editor->noEdit('email');
//set display name for column email and login
$editor->setDisplayNames(array('email'       => 'Email',
                              'login'     => 'Username'
                              ));
//sort order of first name
$editor->setDefaultOrderby('namefirst', 0);
//set which are the filed to be searchable
$editor->setConfig('searchableFields', array('namefirst', 'namelast', 'email'));
//can set the type of input field
$editor->setInputType('available', 'select');
//finally display the editor window
$editor->display();
?>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/mysql-table-editor/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Contact Grabber</title>
		<link>http://www.sajithmr.me/contact-grabber</link>
		<comments>http://www.sajithmr.me/contact-grabber#comments</comments>
		<pubDate>Thu, 06 Nov 2008 10:55:51 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[AOL]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[contact]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fetch]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[grab]]></category>
		<category><![CDATA[grabber]]></category>
		<category><![CDATA[Hotmail]]></category>
		<category><![CDATA[Indiatimes]]></category>
		<category><![CDATA[Linkedin]]></category>
		<category><![CDATA[lycos]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[orkut]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Rediff]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/?p=353</guid>
		<description><![CDATA[If you are a social media website developer , sometimes you might search for grabbing contacts from a particular email account if the password is given. I also did the same.  In most of the cases it did not work properly. But recently i got a contact grabber from phpclasses.org which works perfectly on Gmail, [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a social media website developer , sometimes you might search for grabbing contacts from a particular email account if the password is given. I also did the same.  In most of the cases it did not work properly. But recently i got a contact grabber from <a href="http://www.phpclasses.org" target="_blank">phpclasses.org</a> which works perfectly on <strong>Gmail</strong>, <strong>Hotmail</strong>, <strong>Rediff</strong>, <strong>Yahoo</strong>, <strong>Orkut</strong>, <strong>MySpace</strong>, <strong>Indiatimes</strong>, <strong>Linkedin</strong> , <strong>AOL</strong> and <strong>lycos</strong></p>
<div id="attachment_355" class="wp-caption alignnone" style="width: 371px"><a href="http://www.sajithmr.com/wp-content/uploads/2008/11/grabber.jpg"><img class="size-full wp-image-355" title="Contact Grabber " src="http://www.sajithmr.com/wp-content/uploads/2008/11/grabber.jpg" alt="screen shot" width="361" height="225" /></a><p class="wp-caption-text">screen shot</p></div>
<p>But the zip file i got is not well arranged, so it shows some errors . I arranged it in proper way and uploaded here:</p>
<p><span style="text-decoration: underline;">Download:</span></p>
<p><a href="http://sajithmr.com/downloads/grabber.zip" target="_self"><img class="alignnone size-thumbnail wp-image-354" title="winzip_180x180" src="http://www.sajithmr.com/wp-content/uploads/2008/11/winzip_180x180-150x150.gif" alt="" width="98" height="98" /></a></p>
<p><a title="Contact Grabber" href="http://sajithmr.com/downloads/grabber.zip" target="_self">http://sajithmr.com/downloads/grabber.zip</a></p>
<p><span style="color: #808080;"><em>(Under GNU Public License)</em></span></p>
<p>Using this <strong>php code</strong> , you can <strong>export the email contacts</strong> as csv file.</p>
<p>Here is the actual source website : <a href="http://www.phpclasses.org/browse/package/3895.html" target="_blank">http://www.phpclasses.org/browse/package/3895.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/contact-grabber/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Pagination in Ruby on Rails</title>
		<link>http://www.sajithmr.me/pagination-in-ruby-on-rails</link>
		<comments>http://www.sajithmr.me/pagination-in-ruby-on-rails#comments</comments>
		<pubDate>Sun, 02 Nov 2008 08:38:43 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rail]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/?p=341</guid>
		<description><![CDATA[Old rails has a buitl in pagination option. For example is you have to paginate @user, which is a model object for the table user def user_list @user_pages,@users=paginate(:users,:order=&#62;&#8217;name&#8217;) end But in new version of rails, they removed the pagination option. So you need to install a plugin , which name is will_paginate You can install [...]]]></description>
			<content:encoded><![CDATA[<p>Old rails has a buitl in pagination option. For example is you have to paginate @user, which is a model object for the table user</p>
<p><strong>def user_list<br />
@user_pages,@users=paginate(:users,:order=&gt;&#8217;name&#8217;)<br />
end</strong></p>
<p>But in new version of rails, they removed the pagination option. So you need to install a plugin , which name is will_paginate</p>
<p>You can install this plugin using gem</p>
<p><strong>gem install will_paginate </strong></p>
<p>After the installation you have to add <strong>require &#8220;will_paginate&#8221; </strong>in config/environment.rb (at bottom)</p>
<p>You have to restart your ruby server after that.</p>
<p>In the controller area use:</p>
<pre><code class="ruby"><span class="keyword">def</span> index
  @poems = Poem.paginate<span class="symbol"> :page</span> =&gt; params<span class="symbol">[:page</span>],<span class="symbol"> <img src='http://www.sajithmr.me/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder</span> =&gt; <span class="string">'created_at DESC'</span>
<span class="keyword">end
</span></code></pre>
<p>and in the template page use</p>
<p><strong>&lt;%= will_paginate @poems, :container =&gt; false %&gt;</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/pagination-in-ruby-on-rails/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Intelligent Watermark (php + gd)</title>
		<link>http://www.sajithmr.me/intelligent-watermark-php-gd</link>
		<comments>http://www.sajithmr.me/intelligent-watermark-php-gd#comments</comments>
		<pubDate>Sat, 09 Aug 2008 04:51:45 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[watermark]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/intelligent-watermark-php-gd/</guid>
		<description><![CDATA[Online Photoshop in PHP Part (5) &#62;&#62; (image after watermarked with gmail logo) Those who haven&#8217;t seen  the online photoshop tool created by me, just click here: http://www.sajithmr.com/photoshop Today we will implement the watermarking on images using php gd library. Intelligent watermarking means, apply a logo or a watermark image on another image by measuring [...]]]></description>
			<content:encoded><![CDATA[<p><font color="#339966"><strong>Online Photoshop in PHP Part (5)</strong></font> &gt;&gt;</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/08/watermark.jpg" /></p>
<p><em><font color="#999999">(image after watermarked with gmail logo) </font></em></p>
<p>Those who haven&#8217;t seen  the online photoshop tool created by me, just click here: <a href="http://www.sajithmr.com/photoshop/" title="Online Photoshop" target="_blank">http://www.sajithmr.com/photoshop</a></p>
<p>Today we will implement the watermarking on images using php gd library. Intelligent watermarking means, apply a logo or a watermark image on another image by measuring the color depth of the applied image. For this water marking, use png images as logo or watermark  for better results.</p>
<p>Live example for watermark implementation:<a href="http://sajithmr.com/photoshop-tuts/watermark/addwatermark.php" title="Watermark implementation " target="_blank"> http://sajithmr.com/photoshop-tuts/watermark/addwatermark.php </a></p>
<p>You can see different watermark location by changing the x1,y1 and x2,y2 parameters of the following url:</p>
<p><a href="http://sajithmr.com/photoshop-tuts/watermark/showresult.php?x1=405&amp;y1=285&amp;x2=520&amp;y2=392&amp;width=115&amp;height=107" target="_blank">http://sajithmr.com/photoshop-tuts/watermark/showresult.php?x1=405&amp;y1=285&amp;x2=520&amp;y2=392&amp;width=115&amp;height=107 </a></p>
<p>See the watermark php source code here: <a href="http://sajithmr.com/photoshop-tuts/watermark/watermark.class.txt" title="Source code for watermark" target="_blank">http://sajithmr.com/photoshop-tuts/watermark/watermark.class.txt </a></p>
<p>Download the full-source code of watermarking implementation using php+gd from here: <a href="http://sajithmr.com/photoshop-tuts/watermark.rar" title="Full Source Code" target="_blank">http://sajithmr.com/photoshop-tuts/watermark.rar </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/intelligent-watermark-php-gd/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

