<?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>Vinodkram</title>
	<atom:link href="http://www.vinodkram.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vinodkram.com</link>
	<description>Creative, Informative and Entertaining Stuff for everyone</description>
	<lastBuildDate>Thu, 08 Jul 2010 17:41:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to fetch multi-lingual content from database</title>
		<link>http://www.vinodkram.com/how-to-fetch-multi-lingual-content-from-database</link>
		<comments>http://www.vinodkram.com/how-to-fetch-multi-lingual-content-from-database#comments</comments>
		<pubDate>Thu, 08 Jul 2010 17:41:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1461</guid>
		<description><![CDATA[The basic purpose of this post is to guide you all about fetching multilingual content from database. I mean to say that, if you have stored japanese text in your database, So in order to fetch the japanese content , you need to set the character encoding to UTF-8 format, while communication with the database [...]]]></description>
			<content:encoded><![CDATA[<p>The basic purpose of this post is to guide you all about fetching multilingual content from database.<br />
  I mean to say that, if you have stored japanese text in your database, So in order to fetch the japanese content , you need to set the character encoding to UTF-8 format, while communication with the database for fetching the result.</p>
<p>In Case of MYSQLi </p>
<p><?php<br />
$mysqli = new mysqli("localhost", "db_user", "db_password","db_name");</p>
<p>/* check connection */<br />
if (mysqli_connect_errno()) {<br />
    printf("Connect failed: %s\n", mysqli_connect_error());<br />
    exit();<br />
}</p>
<p>/* change character set to utf8 */<br />
if (!mysqli_set_charset($link, "utf8")) {<br />
    printf("Error loading character set utf8: %s\n", mysqli_error($link));<br />
} else {<br />
    printf("Current character set: %s\n", mysqli_character_set_name($link));<br />
}</p>
<p>/* Select queries return a resultset */<br />
if ($result = $mysqli->query(&#8220;SELECT ColumnName FROM tableName &#8220;)) {<br />
    printf(&#8220;Select returned %d rows.\n&#8221;, $result->num_rows);</p>
<p>    /* free result set */<br />
    $result->close();<br />
}<br />
$mysqli->close();<br />
?></p>
<p>In case you are using multiple database</p>
<p><?php<br />
$link1 = mysqli_connect('localhost','user1','pass1',TRUE);<br />
$link2 = mysqli_connect('localhost','user1','pass1',TRUE);</p>
<p>mysqli_select_db('db1',$link1);<br />
mysqli_select_db('db2',$link2);</p>
<p>mysqli_set_charset('latin1',$link1);<br />
mysqli_set_charset('utf8',$link2);<br />
?></p>
<p>If you don&#8217;t pass in &#8220;true&#8221; to mysqli_connect() in the example below, $link1 and $link2 will have the same resource id# and both database connections will end up being set to utf-8 charsets. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-fetch-multi-lingual-content-from-database/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use FCKeditor in symfony</title>
		<link>http://www.vinodkram.com/how-to-use-fckeditor-in-symfony</link>
		<comments>http://www.vinodkram.com/how-to-use-fckeditor-in-symfony#comments</comments>
		<pubDate>Fri, 25 Dec 2009 15:34:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/2009/12/how-to-use-fckeditor-in-symfony/</guid>
		<description><![CDATA[1. Download the FCKeditor source from http://ckeditor.com/download 2. Extract the source to /web/js/ directory of your symfony project directory 3. To use the editor in symfony, add (edit if present)the below line //config/settings.yml .settings: rich_text_fck_js_dir: js/fckeditor 4. You have to edit /web/js/fckeditor/fckconfig.js var _FileBrowserLanguage = &#8216;php&#8217; ; // asp &#124; aspx &#124; cfm &#124; lasso [...]]]></description>
			<content:encoded><![CDATA[<p>1. Download the FCKeditor source from <a href="http://ckeditor.com/download">http://ckeditor.com/download</a></p>
<p>2. Extract the source to /web/js/ directory of your symfony project directory</p>
<p>3. To use the editor in symfony, add (edit if present)the below line /<name of app>/config/settings.yml </p>
<p>.settings:<br />
    rich_text_fck_js_dir: js/fckeditor</p>
<p>4. You have to edit /web/js/fckeditor/fckconfig.js </p>
<p>var _FileBrowserLanguage	= &#8216;php&#8217; ;	// asp | aspx | cfm | lasso | perl | php | py<br />
var _QuickUploadLanguage	= &#8216;php&#8217; ;	// asp | aspx | cfm | lasso | php</p>
<p>Depending on the technology you are using you have to set the above two parameter</p>
<p>5. In newer versions of FCKEditor you also have to enable the PHP connector in file /web/js/fckeditor/editor/filemanager/connectors/php/config.php on line 28, and also set your upload directory (on line 32). </p>
<p>$Config['Enabled'] = false;<br />
$Config['UserFilesPath'] = &#8216;/uploads/assets/&#8217; ;</p>
<p>You can set the UserFilesPath to whatever folder you want to store the uploaded file</p>
<p>6. Now you are ready to use the fck editor in your page</p>
<p>$options = array(<br />
	&#8216;rich&#8217; => &#8216;fck&#8217;,<br />
	&#8216;height&#8217; => 500,<br />
	&#8216;width&#8217;	=> 500,<br />
);<br />
echo textarea_tag(&#8216;inputname&#8217;, &#8216;Lorem ipsum&#8217;, $options ); </p>
<p>Thats All <img src='http://www.vinodkram.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-use-fckeditor-in-symfony/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update query in symfony</title>
		<link>http://www.vinodkram.com/update-query-in-symfony</link>
		<comments>http://www.vinodkram.com/update-query-in-symfony#comments</comments>
		<pubDate>Sat, 12 Dec 2009 06:04:54 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/2009/12/update-query-in-symfony/</guid>
		<description><![CDATA[Suppose you want to execute query like UPDATE tableName SET column1 = &#8216;abc&#8217;,column2 = &#8216;xyz&#8217; WHERE column =&#8217;1&#8242;; then you can use the below syntax to do so &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- $con = Propel::getConnection(); /* Here you have to set the condition for which you need to update */ $c1 = new Criteria(); $c1->add(TableNamePeer::COLUMN_NAME, $conditionForColumn1); /* Here [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you want to execute query like<br />
UPDATE tableName SET column1 = &#8216;abc&#8217;,column2 = &#8216;xyz&#8217; WHERE column =&#8217;1&#8242;;<br />
then you can use the below syntax to do so <img src='http://www.vinodkram.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>$con = Propel::getConnection();</p>
<p>/* Here you have to set the condition for which you need to update */<br />
$c1 = new Criteria();<br />
$c1->add(TableNamePeer::COLUMN_NAME, $conditionForColumn1);</p>
<p>/* Here you have to set the column value */<br />
$c2 = new Criteria();<br />
$c2->add(TableNamePeer::COLUMN_TO_UPDATE, $value);</p>
<p>BasePeer::doUpdate($c1, $c2, $con);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/update-query-in-symfony/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set the meta tag information intemplate file in symfony</title>
		<link>http://www.vinodkram.com/how-to-set-the-meta-tag-information-intemplate-file-in-symfony</link>
		<comments>http://www.vinodkram.com/how-to-set-the-meta-tag-information-intemplate-file-in-symfony#comments</comments>
		<pubDate>Sun, 25 Oct 2009 14:46:02 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/2009/10/how-to-set-the-meta-tag-information-intemplate-file-in-symfony/</guid>
		<description><![CDATA[You can set the meta tag information in your template file as below. sfContext::getInstance()->getResponse()->setTitle(&#8216;Your meta title here&#8217;); sfContext::getInstance()->getResponse()->addMeta(&#8216;description&#8217;,&#8217; Meta description information&#8217;); sfContext::getInstance()->getResponse()->addMeta(&#8216;keywords&#8217;,'meta tag keywords seperated by commas&#8217;); That&#8217;s it. Thanks]]></description>
			<content:encoded><![CDATA[<p>You can set the meta tag information in your template file as below.</p>
<p>sfContext::getInstance()->getResponse()->setTitle(&#8216;Your meta title here&#8217;);<br />
					sfContext::getInstance()->getResponse()->addMeta(&#8216;description&#8217;,&#8217; Meta description information&#8217;);<br />
					sfContext::getInstance()->getResponse()->addMeta(&#8216;keywords&#8217;,'meta tag keywords seperated by commas&#8217;);</p>
<p>That&#8217;s it.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-set-the-meta-tag-information-intemplate-file-in-symfony/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nl2br in perl</title>
		<link>http://www.vinodkram.com/nl2br-in-perl</link>
		<comments>http://www.vinodkram.com/nl2br-in-perl#comments</comments>
		<pubDate>Thu, 20 Aug 2009 07:23:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PERL]]></category>
		<category><![CDATA[nl2br]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/2009/08/nl2br-in-perl/</guid>
		<description><![CDATA[How to replace new line character with br $tempString = &#8220;Hello is testing for new line\n to br&#8221;; $tempString =~ s/\n/&#60;br\/&#62;/; output = &#8220;Hello is testing for new line to br&#8221;;]]></description>
			<content:encoded><![CDATA[<p>How to replace new line character with br</p>
<p>$tempString = &#8220;Hello is testing for new line\n to br&#8221;;</p>
<p>$tempString =~ s/\n/&lt;br\/&gt;/;</p>
<p>output = &#8220;Hello is testing for new line<br/> to br&#8221;;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/nl2br-in-perl/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to convert bitmap image(.jpg , .jpeg, .gif, .png) to vector format (.ai , .eps, .svg)</title>
		<link>http://www.vinodkram.com/how-to-convert-bitmap-image-jpg-jpeg-gif-png-to-vector-format-ai-eps-svg</link>
		<comments>http://www.vinodkram.com/how-to-convert-bitmap-image-jpg-jpeg-gif-png-to-vector-format-ai-eps-svg#comments</comments>
		<pubDate>Fri, 14 Aug 2009 10:26:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=88</guid>
		<description><![CDATA[For converting bitmap image to vector image you need to have autotrace library installed . If you not installed you can install that bu using the command &#8220;yum install autotrace&#8221;. Follow the instruction step till the installation is complete. Once its installed you can use the below command to convert the image to vector format. [...]]]></description>
			<content:encoded><![CDATA[<p>For converting bitmap image to vector image you need to have autotrace library installed .</p>
<p>If you not installed you can install that bu using the command &#8220;yum install autotrace&#8221;.</p>
<p>Follow the instruction step till the installation is complete.</p>
<p>Once its installed you can use the below command to convert the image to vector format.</p>
<p>$ autotrace testInputImage.png -output-file testOutputImage.svg</p>
<p>Other example : </p>
<p>$autotrace &#8211;input-format=jpg &#8211;output-file=tshirt.ai &#8211;dpi=1024 &#8211;color-count=256 &#8211;despeckle-level=0 &#8211;despeckle-tightness=0 &#8211;corner-always-threshold=60 &#8211;line-threshold=0.1 &#8211;width-weight-factor=0.1 &#8211;line-reversion-threshold=0.1 &#8211;preserve-width &#8211;remove-adjacent-corners tshirt.ai 2>&#038;1
</p>
<p>and your are done.</p>
<p>For more information and option visit  <a href="http://autotrace.sourceforge.net">http://autotrace.sourceforge.net</a></p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-convert-bitmap-image-jpg-jpeg-gif-png-to-vector-format-ai-eps-svg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GD support</title>
		<link>http://www.vinodkram.com/gd-support</link>
		<comments>http://www.vinodkram.com/gd-support#comments</comments>
		<pubDate>Sat, 11 Jul 2009 15:10:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=70</guid>
		<description><![CDATA[How to check if GD support is enabled or not. &#60;?php var_dump(gd_info()); ?&#62; If GD support is enabled then you will get an array in that you will get &#8220;GD Version&#8221;. If you didn&#8217;t get this that means GD support is not there . To enable GD support you should install GD library by the [...]]]></description>
			<content:encoded><![CDATA[<p>How to check if GD support is enabled or not.</p>
<p>&lt;?php<br />
var_dump(gd_info());<br />
?&gt;</p>
<p>If GD support is enabled then you will get  an array in that you will get &#8220;GD Version&#8221;.</p>
<p>If you didn&#8217;t get this that means GD support is not there .</p>
<p>To enable GD support you should install<br />
GD library by the below command<br />
&#8220;yum install php-gd&#8221; (Fedora Linux)<br />
This will install GD support.</p>
<p>Now when you check the output of the above php code it will display the GD version</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/gd-support/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to execute local system command by using javascript</title>
		<link>http://www.vinodkram.com/how-to-execute-local-system-command-by-using-javascript</link>
		<comments>http://www.vinodkram.com/how-to-execute-local-system-command-by-using-javascript#comments</comments>
		<pubDate>Sat, 11 Jul 2009 06:31:25 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=67</guid>
		<description><![CDATA[&#60;script type=&#8221;text/javascript&#8221;&#62; MyObject = new ActiveXObject( &#8220;WScript.Shell&#8221;) MyObject.Run(&#8220;cmd&#8221;) ; &#60;/script&#62; In second line instead of &#8220;cmd&#8221; you can execute any command of your system , it could me &#8220;notepad.exe&#8221; or any other command .]]></description>
			<content:encoded><![CDATA[<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
MyObject = new ActiveXObject( &#8220;WScript.Shell&#8221;)<br />
MyObject.Run(&#8220;cmd&#8221;) ;<br />
&lt;/script&gt;</p>
<p>In second line instead of &#8220;cmd&#8221; you can execute any command of your system , it could me &#8220;notepad.exe&#8221; or any other command .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-execute-local-system-command-by-using-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to establish oracle database connection in php</title>
		<link>http://www.vinodkram.com/how-to-establish-oracle-database-connection-in-php</link>
		<comments>http://www.vinodkram.com/how-to-establish-oracle-database-connection-in-php#comments</comments>
		<pubDate>Wed, 03 Jun 2009 06:36:07 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[ORACLE]]></category>

		<guid isPermaLink="false">http://vinodkram.wordpress.com/?p=65</guid>
		<description><![CDATA[First of all you need to check whether &#8220;oci8&#8243; support is enabled or not, if not you have to enable that you can check this in your phpinfo file. Once this is done. Now in you test.php file You have to explicitly set the ORACLE_HOME and LD_LIBRARY_PATH path. This information will be available in you [...]]]></description>
			<content:encoded><![CDATA[<p>First of all you need to check whether &#8220;oci8&#8243; support is enabled or not, if not you have to enable that you can check this in your phpinfo file.</p>
<p>Once this is done.</p>
<p>Now in you test.php file</p>
<p>You have to explicitly set the ORACLE_HOME and LD_LIBRARY_PATH path.<br />
This information will be available in you phpinfo file.</p>
<p>The &#8220;$dbstr&#8221; variable information you can find it from your &#8220;tnsnames.ora&#8221;  file .</p>
<p>Test.php start</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>if (!ini_get(&#8216;display_errors&#8217;)) {<br />
ini_set(&#8216;display_errors&#8217;, 1);<br />
}<br />
PutEnv(&#8220;ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/&#8221;);<br />
PutEnv(&#8220;LD_LIBRARY_PATH=-Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh&#8221;);</p>
<p>$dbstr =&#8221;(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.XX)(PORT = 1521))<br />
(CONNECT_DATA =<br />
(SERVER = DEDICATED)<br />
(SERVICE_NAME = YOURDATABASENAME)<br />
)<br />
)&#8221;;</p>
<p>if(!@($conn = oci_connect(&#8216;DBUSERNAME&#8217;,'DBPASSWORD&#8217;,$dbstr)))<br />
{<br />
print_r(ocierror());</p>
<p>}<br />
else<br />
{<br />
echo &#8220;connected succesfully&#8221;;<br />
}</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-establish-oracle-database-connection-in-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to import data into mysql db from sql file</title>
		<link>http://www.vinodkram.com/how-to-import-data-into-mysql-db-from-sql-file</link>
		<comments>http://www.vinodkram.com/how-to-import-data-into-mysql-db-from-sql-file#comments</comments>
		<pubDate>Tue, 26 May 2009 10:15:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://vinodkram.wordpress.com/?p=63</guid>
		<description><![CDATA[Open your shell prompt navigate to the mysql directory (default is /var/lib/mysql) cd /pathToYourMysqlDirectory/ then type the below command $ mysql -u mysqlUserName -p Password -h HostName DatabaseName &#60; /loactionOfYourSqlFile/yourSqlFileName.sql Where mysqlUserName = Mysql User Name Password = Mysql User Password HostName = Mysql Host Name (This could be local host or some remote IP [...]]]></description>
			<content:encoded><![CDATA[<p>Open your shell prompt</p>
<p>navigate to the mysql directory (default is /var/lib/mysql)<br />
cd  /pathToYourMysqlDirectory/</p>
<p>then type the below command</p>
<p>$ mysql -u mysqlUserName -p Password -h HostName DatabaseName &lt; /loactionOfYourSqlFile/yourSqlFileName.sql</p>
<p>Where<br />
mysqlUserName = Mysql User Name<br />
Password            = Mysql User Password<br />
HostName          = Mysql Host Name (This could be local host or some remote IP where you want to import the database)<br />
DatabaseName = Mysql Database Name<br />
/loactionOfYourSqlFile/yourSqlFileName.sql  = This is the location of your sql file</p>
<p>Note : This is work only in Linux system</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-import-data-into-mysql-db-from-sql-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
