<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>memento</title>
	<atom:link href="http://ragrawal.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ragrawal.wordpress.com</link>
	<description>"A retentive memory may be a good thing, but the ability to forget is the true token of greatness.” - Elbert Hubbard</description>
	<lastBuildDate>Wed, 30 Nov 2011 12:02:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ragrawal.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>memento</title>
		<link>http://ragrawal.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ragrawal.wordpress.com/osd.xml" title="memento" />
	<atom:link rel='hub' href='http://ragrawal.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Moving</title>
		<link>http://ragrawal.wordpress.com/2011/02/05/moving/</link>
		<comments>http://ragrawal.wordpress.com/2011/02/05/moving/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 21:49:14 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=626</guid>
		<description><![CDATA[Hi all, I have created another blog on my own server. Hopefully this will give more flexibility in terms of design and plugins. Here is the link to new server: http://findnwrite.com/musings Filed under: General<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=626&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p style="font-size:medium;font-family:'Bookman Old Style';">I have created another blog on my own server. Hopefully this will give more flexibility in terms of design and plugins. Here is the link to new server:<br />
<a href="http://findnwrite.com/musings">http://findnwrite.com/musings</a></p>
<br />Filed under: <a href='http://ragrawal.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/626/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=626&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2011/02/05/moving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>
	</item>
		<item>
		<title>Using ruby gems along with hadoop streaming</title>
		<link>http://ragrawal.wordpress.com/2010/03/18/using-ruby-gems-along-with-hadoop-streaming/</link>
		<comments>http://ragrawal.wordpress.com/2010/03/18/using-ruby-gems-along-with-hadoop-streaming/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 19:39:20 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Hadoop]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Gem]]></category>
		<category><![CDATA[Streaming]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=531</guid>
		<description><![CDATA[I just discovered there is a simple way to use ruby gems (or ruby libraries) in your mapper or reducer script even if you don&#8217;t have administrative rights. Below is a short and quick explanation of how to do this. One of the parameter in hadoop streaming is &#8220;-cacheArchive&#8221;. It allows you to specify path [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=531&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">I just discovered there is a simple way to use ruby gems (or ruby libraries) in your mapper or reducer script even if you don&#8217;t have administrative rights. Below is a short and quick explanation of how to do this. One of the parameter in hadoop streaming is &#8220;-cacheArchive&#8221;. It allows you to specify path of the archive on the master machine and create a symbolic link. You can read more about it over <a title="Hadoop Streaming" href="http://hadoop.apache.org/common/docs/r0.15.2/streaming.html" target="_blank">here</a>. In order to use ruby gems, we will need to do four simple steps</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Step 1. Zip gem source code:</strong><br />
Download the source code of a gem and zip it. Lets assume you want to use the awesome geokit gem. At the top level of the geokit gem there is one file (geokit.rb) and a folder (geokit). Use the following command on MacOSX to create a zip file</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">$&gt; zip -r geokit.zip geokit.rb geokit</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Note: use -r parameter to recursively include subfolders</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Step 2: Upload the zip file on hadoop&#8217;s distributed file system</strong><br />
</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><span style="font-size:medium;font-family:'Bookman Old Style';">$&gt; hadoop dfs -copyFromLocal geokit.zip lib/</span></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Step 3: Tell Hadoop about the zip file</strong><br />
In your hadoop streaming file, use the cacheArchive option to specify location of the gem and also its symbolic link. Below is a just an example of a hadoop streaming file. Note that Hadoop will unzip the file before running mapper script and hence the files inside the zip will be available to our ruby mapper.</span></p>
<p><code>#!/bin/bash<br />
$HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/.../hadoop-0.20.1-dev-streaming.jar<br />
-input input_file<br />
-output &lt;output_file&gt;<br />
-mapper "ruby Mapper.rb"<br />
-file code/Mapper.rb<br />
-cacheArchive hdfs://machine-name:port-number/user/user_name/lib/geokit.zip#geokitgem</code></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Step 4: Tell ruby mapper/reducer about the gem</strong><br />
</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Now modify ruby library path in Mapper.rb as follows<br />
<code>#file: Mapper.rb<br />
$: &lt;&lt;   'geokitgem/'<br />
require 'rubygems'<br />
require 'geokit'<br />
</code><br />
That&#8217;s it.</span></p>
<br />Filed under: <a href='http://ragrawal.wordpress.com/category/programming/hadoop/'>Hadoop</a>, <a href='http://ragrawal.wordpress.com/category/programming/'>Programming</a>, <a href='http://ragrawal.wordpress.com/category/programming/ruby/'>Ruby</a> Tagged: <a href='http://ragrawal.wordpress.com/tag/gem/'>Gem</a>, <a href='http://ragrawal.wordpress.com/tag/hadoop/'>Hadoop</a>, <a href='http://ragrawal.wordpress.com/tag/ruby/'>Ruby</a>, <a href='http://ragrawal.wordpress.com/tag/streaming/'>Streaming</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/531/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=531&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2010/03/18/using-ruby-gems-along-with-hadoop-streaming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>
	</item>
		<item>
		<title>Postgres/Postgis Tips</title>
		<link>http://ragrawal.wordpress.com/2009/12/08/postgrespostgis-tips-2/</link>
		<comments>http://ragrawal.wordpress.com/2009/12/08/postgrespostgis-tips-2/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 18:02:18 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/2009/12/08/postgrespostgis-tips-2/</guid>
		<description><![CDATA[Tip 1: Importing DBF Files shp2pgsql command is mainly to import shapefiles. However, it does come with an optional parameter -n that allows to import dbf files. You might need to install postgis in order to have shp2pgsql command. /&#62; shp2pgsql -n filename &#62; outfile.sql /&#62; pgsql -h hostname -U username -d database -f outfile.sql [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=522&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-size:medium;font-family:'Bookman Old Style';">Tip 1: Importing DBF Files</span></strong></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">shp2pgsql command is mainly to import shapefiles. However, it does come with an optional parameter -n that allows to import dbf files. You might need to install postgis in order to have shp2pgsql command.<br />
</span></p>
<div style="border:medium dotted;background-color:#ffffee;padding:5px;"><code><br />
/&gt; shp2pgsql -n filename &gt; outfile.sql<br />
/&gt; pgsql -h hostname -U username -d database -f outfile.sql<br />
</code></div>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">The above two commands can be further shortened into a single command</span></p>
<div style="border:medium dotted;background-color:#ffffee;padding:5px;"><code> &gt; shp2pgsql -n filename tableName dbName | psql -d dbName<br />
</code></div>
<p><strong><span style="font-size:medium;font-family:'Bookman Old Style';">Tip 2: Calculating Area</span></strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Use transform function (st_transform) to project geometry onto some spatial reference system. I would recommend using a projection system that preserves area. Then use the st_area function. The unit depends on the unit used by the projected spatial reference system; most likely it will be in meters (or square meters for area). An excellent resource to find SRID number is </span><a href="http://spatialreference.org/">http://spatialreference.org/</a></p>
<div style="border:medium dotted;background-color:#ffffee;padding:5px;"><code><br />
/&gt; select st_area(st_transform(the_geom, 3035 ) from table<br />
</code></div>
<p><strong><span style="font-size:medium;font-family:'Bookman Old Style';">Tip 3: Counting number of words</span></strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Unlike char_length, which returns number of characters in a string, there is no function to count number of words. However, you can nest two function in order to number of words.</span></p>
<div style="border:medium dotted;background-color:#ffffee;padding:5px;"><code><br />
/&gt; select array_upper(regexp_split_to_array('this is trial. it should return 7', E'\\s'), 1);</code></div>
<p><strong><span style="font-size:medium;font-family:'Bookman Old Style';">Tip 4: Fixing &#8220;Operations on mixed Geometries&#8221; Error</span></strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Checkout my <a href="http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries/">previous post</a></span></p>
<p><strong><span style="font-size:medium;font-family:'Bookman Old Style';">Tip 5: Fixing &#8220;Ring Self-Intersection&#8221; Error </span></strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Use ST_Simplify or ST_SimplifyPreserveTopology functions to make sure all the geometries are valid geometries and there are not self-intersections. I would recommend first trying ST_SimplifyPreserveTopology operation and then ST_Simplify operation as shown below.</span></p>
<div style="border:medium dotted;background-color:#ffffee;padding:5px;"><code>&gt; update &lt;table&gt; set the_geom = ST_SimplifyPreserveToplogy(the_geom, 1) where ST_IsValid = false<br />
&gt; update &lt;table&gt; set the_geom = ST_Simplify(the_geom, 1) where ST_IsValid = false</code></p>
</div>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=2a7ff64a-96fa-87f1-ab4d-1c41d197f9d1" alt="" /></div>
<br />Posted in Database, postgis, Postgres, Tips  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/522/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=522&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/12/08/postgrespostgis-tips-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=2a7ff64a-96fa-87f1-ab4d-1c41d197f9d1" medium="image" />
	</item>
		<item>
		<title>PostGIS Error: Operation on mixed geometries</title>
		<link>http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries/</link>
		<comments>http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 18:01:46 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries/</guid>
		<description><![CDATA[PostGIS usually raises &#8220;operations on mixed geometries&#8221; while trying to use topological functions (such as st_intersects, st_within, etc). There can be many different reasons because of which one might encounter this error. Below are the steps that I found useful in resolving this error. 1. Validate Geometries: Make sure all the geometries are valid. psql&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=520&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font face="georgia">PostGIS usually raises &#8220;operations on mixed geometries&#8221; while trying to use topological functions (such as st_intersects, st_within, etc). There can be many different reasons because of which one might encounter this error. Below are the steps that I found useful in resolving this error. </font></p>
<p><font face="georgia"><b>1. Validate Geometries:</b> Make sure all the geometries are valid. <br /><code>psql&gt; select *, ST_IsValidReason(&lt;geometry_column&gt;) from &lt;table&gt; where ST_IsValid(&lt;geometry_column&gt;) = false</p>
<p></code><b>2. Simplify Invalid Geometries: </b>Skip this step if you didn&#8217;t find any invalid geometries in the above step. If you did, then use the ST_Simplify or ST_SimplifyPreserveTopology functions to fix them. <br /><code>psql&gt; update &lt;table&gt; set &lt;geometry_column&gt; = ST_Simplify(&lt;geometry_column&gt;, &lt;tolerance&gt;) where ST_IsValid(&lt;geometry_column&gt;) = false<br /></code> <br /><b>3. Check SRID:</b> Then make sure that all the geometries have the same projection system. You can check all the different SRID values using the following query<br /><code>psql&gt; select distinct(SRID(&lt;geometry_column&gt;)) as srid, count(*) from &lt;table&gt; group by srid</code></p>
<p><b>4. Update SRID:</b> Skip this step if you find only one SRID value in the above step. If not, then use the setSRID values to set SRID for geometries or ST_Transform to transform from one projection system to another.&nbsp; <br /><code>psql&gt; update &lt;table&gt; set &lt;geometry_column&gt; = setSRID(&lt;geometry_column&gt;, &lt;SRID_Value&gt;)&nbsp; where SRID(&lt;geometry_column&gt;) &lt;&gt; &lt;SRID_Value&gt;</code><br />&nbsp;&nbsp;&nbsp; <br /><b>5. Check Geometry_Columns Table: </b>Postgis maintains basic information about any geometry column in any table in a separate table known as &#8220;Geometry_Columns&#8221;. Make sure that there is an entry for your table in the &#8220;Geometry_Columns&#8221; table. <br /><code>psql&gt; select * from geometry_columns where f_table_name = &lt;table&gt;</code><br /><b><br />6. Insert geometry information in Geometry_Columns Table:</b> if in the above step (step 5), you didn&#8217;t find any entry for the geometry column, then manually add it to geometry_columns table <br /><code>psql&gt; INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") SELECT '', '&lt;schema&gt;', '&lt;table&gt;', '&lt;geometry_column&gt;', ST_CoordDim(&lt;geometry_column&gt;), ST_SRID(&lt;geometry_column&gt;), GeometryType(&lt;geometry_column&gt;) FROM &lt;schema&gt;.&lt;table&gt; where &lt;geometry_column&gt; is not null LIMIT 1</code></p>
<p><b>7. Use UpdateGeometryColumn function: </b>if you performed step 6, then this step is optional. Use updateGeometryColumn to set SRID value<br /><code>psql&gt; select updateGeometryColumn(&lt;schema&gt;, &lt;table&gt;, &lt;SRID_Value&gt;) where f_table_name = &lt;table&gt;</code></p>
<p><b>8. Now try your original query. </b>That&#8217;s all. Now try running your command and most likely you should be able to get it working. </p>
<p></font><br />&nbsp;&nbsp;</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=276e496a-8150-8b4b-95b9-222de4dec555" /></div>
<br />Posted in Database, postgis, Postgres, Tips  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/520/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=520&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=276e496a-8150-8b4b-95b9-222de4dec555" medium="image" />
	</item>
		<item>
		<title>Automating Interactive Shell Script (Mac)</title>
		<link>http://ragrawal.wordpress.com/2009/10/03/automating-interactive-shell-script-mac/</link>
		<comments>http://ragrawal.wordpress.com/2009/10/03/automating-interactive-shell-script-mac/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 05:30:53 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=498</guid>
		<description><![CDATA[Shell scripting is a powerful way to automate things. However, writing a shell script to automate interactive shell commands can be tricky. For instance, I weekly download log files from the server to my local machine. For this, I use scp command. While I had written shell script to automate this process, it wasn&#8217;t really [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=498&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 352px"><img title="Automation" src="http://www.straightupsearch.com/archives/images/automation.JPG" alt="Automation" width="342" height="366" /><p class="wp-caption-text">Automation</p></div>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Shell scripting is a powerful way to automate things. However, writing a shell script to automate interactive shell commands can be tricky</span><span style="font-size:medium;font-family:'Bookman Old Style';">. For instance, I weekly download log files from the server to my local machine. For this, I use scp command. While I had written shell script to automate this process, it wasn&#8217;t really an automation. The scp command requires password, which I cannot pass as a parameter but has to be entered interactively.  Thus, my script wasn&#8217;t really an automation. To overcome this specific issue (entering password for using scp command), you can use RSA key as suggested <a href="http://www.linuxjournal.com/article/8600">here</a>. However, this would only solve the password problem. Also for a newbie like me who is entered the Mac world recently, this seemed to be much more involving. I was looking for an approach that was much more generic, simple and less geeky. </span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Luckily, today I came across another solution that satisfy all of my above constraints.  However, the simplicity of this second approach approach comes with the price of being less secure. As explained here, the second solution is to use the &#8220;expect&#8221; command. For instance below a sample code that shows how to use expect command to write an interactive shell script.</span></p>
<div style="clear:both;background-color:#ffffee;border:dotted;padding:5px;"><code><br />
#!/usr/bin/expect -f<br />
spawn scp user@hostname.com:/path_to_file/filename.tar /tmp/<br />
expect {<br />
-re ".*sword.*" {<br />
exp_send "password\r"<br />
exp_continue<br />
}<br />
}<br />
exit<br />
</code></div>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">In order to get the above code, however, make sure you have following things correctly done:</span></p>
<ol style="font-size:medium;font-family:'Bookman Old Style';">
<li><strong>Make sure the first line is correct:</strong> The first line should be address leading to the location where the compiler/interpreter (not sure) can find expect command. Usually it is at /usr/bin/. If you not sure, open a terminal and type &#8220;which expect&#8221;. This will tell the location where the compiler can find the expect command. Also include trailing -f</li>
<li><strong>Spawn: </strong>Include &#8220;spawn&#8221; before all your commands</li>
<li><strong>exp_continue: </strong>Also include exp_continue after sending the password</li>
<li><strong>Running the file using ./: </strong>Normally we run a shell script using the &#8220;/bin/sh file_to_execute.sh&#8221;. If you try running the code using this method, it will generate errors. Make sure you run the code using &#8220;./file_to_execute.sh<strong>&#8220;</strong></li>
</ol>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Expect command, as used above, is not limited to sending password but can be used to send any other parameter. See the original post for an example.This make expect command much more generic than using RSA key. However, as you might have notice that you have explicitly type the password in the file. Anyone with system administrator privileges can easily open you shell script and look at the password. Hence, as I said before, the simplicity of the &#8220;expect&#8221; command tradeoffs security. Nevertheless, I am quite thrilled to find this and having fun with my new or real automation script.</span><br />
Enjoy</p>
<br />Posted in General  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/498/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=498&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/10/03/automating-interactive-shell-script-mac/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://www.straightupsearch.com/archives/images/automation.JPG" medium="image">
			<media:title type="html">Automation</media:title>
		</media:content>
	</item>
		<item>
		<title>Calculating Geographic Distance</title>
		<link>http://ragrawal.wordpress.com/2009/07/11/calculating-geographic-distance/</link>
		<comments>http://ragrawal.wordpress.com/2009/07/11/calculating-geographic-distance/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 18:04:20 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Map]]></category>
		<category><![CDATA[Distance]]></category>
		<category><![CDATA[great circle]]></category>
		<category><![CDATA[haversine]]></category>
		<category><![CDATA[pythagorus]]></category>
		<category><![CDATA[vincety]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=484</guid>
		<description><![CDATA[Any geographical analysis almost invariably involves calculating distance between two points on the surface of the Earth (or two geographic coordinates). Below are four different options/formulas to calculate geographic distance. Each formula makes different assumption about the Earth&#8217;s shape and thereby has different accuracy and computational complexity. Formula 1: Pythagorus&#8217; distance formula distance = ( [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=484&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">Any geographical analysis almost invariably involves calculating distance between two points on the surface of the Earth (or two geographic coordinates). Below are four different options/formulas to calculate geographic distance. Each formula makes different assumption about the Earth&#8217;s shape and thereby has different accuracy and <a class="zem_slink" title="Computational complexity theory" rel="wikipedia" href="http://en.wikipedia.org/wiki/Computational_complexity_theory">computational complexity</a>.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Formula 1: Pythagorus&#8217; distance formula</strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">distance = ( (lat2 &#8211; lat1) ** 2 + (lng2 &#8211; lng1) ** 2) ** 0.5</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">where<br />
lat1,lat2, lng1, lng2 &#8211; lat/lng in decimal degrees</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong><em>Assumption:</em></strong> Earth is flat.<br />
<strong><em>Notes about error: </em></strong>Although, the Earth is not flat, over a very small distance it can be reasonably assumed to be flat. Thus, Pythagorus formula can be used to calculate geographic distance between two <a class="zem_slink" title="Geographic coordinate system" rel="wikipedia" href="http://en.wikipedia.org/wiki/Geographic_coordinate_system">geographic coordinates</a> when two geographic coordinates are close to each other. However, the definition of &#8216;close&#8217; remains ambiguous. I haven&#8217;t found any numerical value to define &#8216;close&#8217; and identifying that value is an aspect of my next post.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Formula 2: Modified Pythagorus&#8217; distance formula</strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">distance = (<br />
[69.1 * (lat2 - lat1)] ** 2 +<br />
[53.0 * (lng2 - lng1)] ** 2<br />
)** 0.5</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><em><strong>Notes:</strong></em> This formula is same as Pythagorus&#8217; formula but includes correction for the spherical surface of the Earth. Again, this is not very accurate formula and should be used only for small distances</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Formula 3: <a class="zem_slink" title="Great-circle distance" rel="wikipedia" href="http://en.wikipedia.org/wiki/Great-circle_distance">Great Circle Distance</a> Formula</strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">distance = R * arccos( [sin(lat1) * sin(lat2)] + [cos(lat1) * cos(lat2) * cos(lon2-lon1)] )</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">where<br />
R = <a class="zem_slink" title="Earth radius" rel="wikipedia" href="http://en.wikipedia.org/wiki/Earth_radius">radius of the Earth</a> (equatorial radius)<br />
lat1, lat2, lon1, lon2 &#8211; latitude/longitude in radians.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><em><strong>Assumption</strong></em>: Earth is spherical<br />
<em><strong>Notes about error: </strong></em> One of the problem with Great Circle formula is that cos(x) value tends to be unreliable. For example, see below (<a title="http://www.movable-type.co.uk/scripts/gis-faq-5.1.html" rel="external nofollow" href="http://www.movable-type.co.uk/scripts/gis-faq-5.1.html" target="blank">Ref</a>)</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">cos (5 degrees) = 0.996194698<br />
cos (1 degree) = 0.999847695<br />
cos (1 minute) = 0.9999999577<br />
cos (1 second) = 0.9999999999882<br />
cos (0.05 sec) = 0.999999999999971</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">As can be seen from above values, the difference between cos(1 minute) and cos (1 sec) starts to appear only after 8 decimal places. Thus, make sure to use datatype that has sufficient long to capture these minute differences. In Java, always use &#8220;double&#8221; (and not float) to perform these calculations<strong>. </strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Formula 4: Haversine Formula</strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">d = R * 2 arcsin ( sqrt[ sin_square(dlat/2) + cos(lat1)*cos(lat2)*sin_square(dlon/2)] )</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">where<br />
R = radius of the Earth<br />
dlat = lat2 &#8211; lat1<br />
dlon = lon2 &#8211; lon1<br />
lat1, lat1, lon1, lon2 are in radians</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Assumption: Earth is spherical, but includes some correction for flattening around poles<br />
Notes about error: <a class="zem_slink" title="Haversine formula" rel="wikipedia" href="http://en.wikipedia.org/wiki/Haversine_formula">Haversine formula</a> is also based on spherical model of the Earth but is considered more accurate than the Great Circle Formula.</span></p>
<p><strong><span style="font-size:medium;font-family:'Bookman Old Style';">Formula 5: Vincety&#8217;s Algorithm</span></strong></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><a href="http://www.movable-type.co.uk/scripts/latlong-vincenty.html" target="_blank">Reference to Vincety&#8217;s algorithm</a></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><em><strong>Assumption:</strong></em> Earth is ellipsoidal.<br />
<em><strong>Notes about error:</strong></em> Vincety&#8217;s algorithm is the most accurate formula to calculate distance between two geographic coordinates. Based on empirical evidences, it has been shown to be accurate within 0.5 mm. However, Vincety&#8217;s algorithm is an iterative distance calculation algorithm and thereby, as compared to any of the above formula, it takes longer time.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>References:</strong><br />
1. Vincenty&#8217;s Algorithm &#8211; http://www.movable-type.co.uk/scripts/latlong-vincenty.html<br />
2. Modified Pythagorus Formula &#8211; http://www.meridianworlddata.com/Distance-Calculation.asp</span></p>
<div class="zemanta-pixie" style="margin-top:10px;height:15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/dd61bcd2-4e37-4147-bfbf-1098b479f2b3/"><img class="zemanta-pixie-img" style="border:medium none;float:right;" src="http://img.zemanta.com/reblog_e.png?x-id=dd61bcd2-4e37-4147-bfbf-1098b479f2b3" alt="Reblog this post [with Zemanta]" /></a></div>
<br />Posted in Map Tagged: Distance, great circle, haversine, pythagorus, vincety <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/484/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=484&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/07/11/calculating-geographic-distance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/reblog_e.png?x-id=dd61bcd2-4e37-4147-bfbf-1098b479f2b3" medium="image">
			<media:title type="html">Reblog this post [with Zemanta]</media:title>
		</media:content>
	</item>
		<item>
		<title>Knee Surgery (ACL Reconstruction) Journal</title>
		<link>http://ragrawal.wordpress.com/2009/06/26/knee-surgery-acl-reconstruction-journal/</link>
		<comments>http://ragrawal.wordpress.com/2009/06/26/knee-surgery-acl-reconstruction-journal/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 13:37:26 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[acl reconstruction]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[Knee]]></category>
		<category><![CDATA[Orthopedic]]></category>
		<category><![CDATA[surgery]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=469</guid>
		<description><![CDATA[17th June 2009 In an unfortunate event of mugging and assault, I severely damaged my left knee.There are four ligaments in and around a knee: ACL, PCL, MCL, and FCL. ACL and PCL corss each other and are at the center of the knee. They help prevent excessive forward and backward movement of the knee. MCL and FCL are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=469&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>17th June 2009</strong><span style="font-size:medium;font-family:'Bookman Old Style';"> </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">In an unfortunate event of mugging and assault, I severely damaged my left knee.There are four <a class="zem_slink" title="Ligament" rel="wikipedia" href="http://en.wikipedia.org/wiki/Ligament">ligaments</a> in and around a knee: <a class="zem_slink" title="Cruciate ligament" rel="wikipedia" href="http://en.wikipedia.org/wiki/Cruciate_ligament">ACL</a>, <a class="zem_slink" title="Posterior cruciate ligament" rel="wikipedia" href="http://en.wikipedia.org/wiki/Posterior_cruciate_ligament">PCL</a>, <a class="zem_slink" title="Medial collateral ligament" rel="wikipedia" href="http://en.wikipedia.org/wiki/Medial_collateral_ligament">MCL</a>, and FCL. ACL and PCL corss each other and are at the center of the knee. They help prevent excessive forward and backward movement of the knee. MCL and FCL are around the knee and prevent sideways movement of the knee. Lastly, there is a <a class="zem_slink" title="Meniscus (anatomy)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Meniscus_%28anatomy%29">meniscus</a> that acts as a shock absorber and prevents rubbing of thigh and shine bone and, thereby prevents arthritics. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><a href="http://www.drwaltlowe.com/attachments/contentmanagers/4/knee-anatomy.jpg"><img class="alignnone" src="http://www.drwaltlowe.com/attachments/contentmanagers/4/knee-anatomy.jpg" alt="" width="426" height="369" /></a><br />
</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
</span></p>
<p style="text-align:center;">
<div class="zemanta-img zemanta-action-dragged" style="display:block;margin:1em;">
<div>
<dl class="wp-caption alignright">
<dt class="wp-caption-dt"><a href="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Diagrama_rodilla_color.png/300px-Diagrama_rodilla_color.png"><img title="diagrama anatomía rodilla en color, knee anato..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Diagrama_rodilla_color.png/300px-Diagrama_rodilla_color.png" alt="diagrama anatomía rodilla en color, knee anato..." width="300" height="274" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution"> </dd>
</dl>
</div>
</div>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">In my case, I completely ruptured ACL and MCL and the <a title="Lateral meniscus" rel="wikipedia" href="http://en.wikipedia.org/wiki/Lateral_meniscus">lateral meniscus</a> got displaced. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>19th June &#8211; 25th June </strong><br />
</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">I saw four <a class="zem_slink" title="Orthopedic surgery" rel="wikipedia" href="http://en.wikipedia.org/wiki/Orthopedic_surgery">orthopaedic</a> specialists, each having a different opinion, suggestion and a rational. Below is a table comparing their suggestions and arguments.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
</span></p>
<table style="width:90%;" border="1">
<tbody>
<tr>
<td>Specialist</td>
<td>Saw on</td>
<td>ACL Reconstruction</td>
<td>MCL Reconstruction</td>
<td>Fixing Meinscus</td>
<td>Surgery Time</td>
<td>No. of Surgeries</td>
</tr>
<tr>
<td>1st</td>
<td>19th June</td>
<td>Yes</td>
<td>No &#8211; grows naturally</td>
<td>Yes</td>
<td>After swelling goes down &#8211; difficult to operate</td>
<td>1</td>
</tr>
<tr>
<td>2nd</td>
<td>23th June</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>After swelling goes down &#8211; difficult to analyze and operate and let the knee heel by itself for sometime</td>
<td>1</td>
</tr>
<tr>
<td>3rd</td>
<td>24th June</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>After swelling goes down</td>
<td>2: ACL surgery should be followed by leg extension physiothearphy. Whereas MCL surgery should be followed by giving a knee rest for two-three weeks. Thus both cannot be operated at the same time</td>
</tr>
<tr>
<td>4th</td>
<td>25th June</td>
<td>Yes</td>
<td>No:  grows naturally</td>
<td>Yes</td>
<td>As soon as possible. The major concern for him is lateral meinscus. If not treated soon, lateral meniscus might get more damaged increasing chances of arthritics</td>
<td>1</td>
</tr>
</tbody>
</table>
<p><strong>Jun 26th 2009</strong></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">I decided to go with the fourth specialist. However, If one goes with the above table, the fourth specialist has a very unconventional beliefs. In contrast to all other specialist, the fourth specialist has suggested for a surgery as soon as possible. Nevertheless, my decision to stick with the fourth specialist is based on the fact that he is affiliated with big sports team and specializes in <a class="zem_slink" title="Anterior cruciate ligament reconstruction" rel="wikipedia" href="http://en.wikipedia.org/wiki/Anterior_cruciate_ligament_reconstruction">ACL reconstruction</a>. Another big motivation is that I wan&#8217;t to get rid of this knee pain as soon as possible and getting surgery quickly done will help with alleviate this problem.<br />
</span></p>
<p><strong>June 30th 2009</strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Follow up meeting with the fourth specialist. To reduce swelling, the doctor took out some blood from the knee. This helped both in reducing the pain and swelling<br />
</span></p>
<p><strong>July 1st 2009</strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Surgery started at 1:15. Doctors gave me general anesthesia and bored three holes in my knee. A cadaver was used to reconstruct ACL. Doctors were able to salvage lateral meniscus.</span></p>
<p><strong>July 2rd 2009</strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Follow-up meeting with the specialist. The specialist saw the knee and asked his assistant to take out some more blood from my left knee to reduce swelling. Gave me some instructions and asked to visit him again after a month</span></p>
<p><strong>July 3rd 2009</strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Started using CPM. The other machine, ice-therapy machine, was not so useful. I found using regular ice pack to be more convenient.</span></p>
<p><strong>July 10th 2009</strong><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">Started physio-therapy. Most of the first session was spent on massaging knee and getting my left kneecap mobile. </span></p>
<h6 class="zemanta-related-title" style="font-size:1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.nationalpost.com/story.html?id=1324931">Knowing the needs of knees</a> (nationalpost.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top:10px;height:15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/087b15de-212b-4feb-944d-1d28eec6e4b4/"><img class="zemanta-pixie-img" style="border:medium none;float:right;" src="http://img.zemanta.com/reblog_e.png?x-id=087b15de-212b-4feb-944d-1d28eec6e4b4" alt="Reblog this post [with Zemanta]" /></a></div>
<br />Posted in General Tagged: acl reconstruction, Health, Knee, Orthopedic, surgery <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/469/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=469&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/06/26/knee-surgery-acl-reconstruction-journal/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://www.drwaltlowe.com/attachments/contentmanagers/4/knee-anatomy.jpg" medium="image" />

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Diagrama_rodilla_color.png/300px-Diagrama_rodilla_color.png" medium="image">
			<media:title type="html">diagrama anatomía rodilla en color, knee anato...</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/reblog_e.png?x-id=087b15de-212b-4feb-944d-1d28eec6e4b4" medium="image">
			<media:title type="html">Reblog this post [with Zemanta]</media:title>
		</media:content>
	</item>
		<item>
		<title>30 Day Workout Challenge</title>
		<link>http://ragrawal.wordpress.com/2009/05/17/30-day-workout-challenge/</link>
		<comments>http://ragrawal.wordpress.com/2009/05/17/30-day-workout-challenge/#comments</comments>
		<pubDate>Sun, 17 May 2009 14:07:54 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Challenge]]></category>
		<category><![CDATA[Gym]]></category>
		<category><![CDATA[habit]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=428</guid>
		<description><![CDATA[Challenge: Go for 30 days workout streak. Motivation: They say it takes 30 days to make a habit. Starting Date: 17th May 2009 Rules: Keep track of thoughts. Especially note down all the positive and negative thoughts. No breaks. Although, on some days I can go for easy workout such as walking only. However, break [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=428&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Challenge:</strong> Go for 30 days workout streak.<br />
<strong>Motivation: </strong>They say it takes 30 days to make a habit.<br />
<strong>Starting Date: </strong>17th May 2009<strong><br />
Rules:</strong></p>
<ol>
<li>Keep track of thoughts. Especially note down all the positive and negative thoughts.</li>
<li>No breaks. Although, on some days I can go for easy workout such as walking only. However, break days should be at-least 3 days apart.</li>
</ol>
<p><strong>Contestants<br />
</strong></p>
<p>Meet the two contestant of this challenge.</p>
<table border="1" align="center">
<tbody>
<tr>
<td align="top"><a href="http://www.imageenvision.com/sm/0012-0710-1620-2660_evil_devil_smiling_and_holding_a_pitchfork_clipart.jpg"><img class="alignnone" src="http://www.imageenvision.com/sm/0012-0710-1620-2660_evil_devil_smiling_and_holding_a_pitchfork_clipart.jpg" alt="" width="118" height="150" /></a></td>
<td align="top"><a href="http://www.teachmecartoons.com/images/how-to-draw-a-cartoon-angel.gif"><img title="angel" src="http://www.teachmecartoons.com/images/how-to-draw-a-cartoon-angel.gif" alt="" width="112" height="104" /></a></td>
</tr>
<tr>
<td style="text-align:center;"><strong><span style="color:#ff0000;">The Procrastinator</span></strong></td>
<td style="text-align:center;"><span style="color:#008000;"><strong>The Achiever </strong><br />
</span></td>
</tr>
</tbody>
</table>
<p>The Procrastinator: He is one powerful evil and the master of rationality and logic. But the problem is he uses rational and logical argument to procrastinate things. He is very active only in building logical arguments to procrastinate important things in life. The very existence of this challenge is because of this powerful procrastinator.</p>
<p>The Achiever: He is a weak humble soul who wants to achieve lot of things in life. He believes in hard work but often losses to the procrastinator.</p>
<p>Ever since I existed, the two have struggled to gain control over my mind. Generally, its the procrastinator that wins.  Let see who wins this challenge.</p>
<h3><strong>Score board</strong></h3>
<p>Scoring mechanism: if I go to the gym, the achiever gets a point. Otherwise, the procrastinator gets a point<strong><br />
</strong></p>
<h4><span style="color:#008080;">The Achiever:   6</span><span style="color:#ff0000;"><br />
The Procrastinator: 1<br />
</span></h4>
<h3><span style="color:#ff0000;"><span style="color:#000000;">The Debate</span></span></h3>
<p>Day 6 &#8211; Friday May 22nd</p>
<ul>
<li>bummer&#8230;.so finally procrastinator got a point. Yesterday I thought I will go to gym after in the evening. However, in the evening got busy in party and came back home at 10 PM. I could have still gone to gym as the gym is open 24 hrs and is just one block from my apartment. But, influenced by the procrastinator, I started watching a movie.</li>
</ul>
<p>Day 5 &#8211; Thursday May 21st</p>
<ul>
<li>I guessed today the procrastinator worked silently. Although I went to the gym I was not able to enjoy it.I skipped cardio, but did following exercise
<ul>
<li>3 sets of compound exercise ( lift, balance, curl and shoulder press)</li>
<li>3 sets of cross-cycle</li>
<li>3 sets of shoulder press (sitting on a ball)</li>
<li>3 sets of triceps extension</li>
<li>3 sets of tricep press.</li>
</ul>
</li>
</ul>
<ul>
<li>Most likely it was procrastinator working silently because of which I was not able to enjoy today&#8217;s workout. But it might be also possible that I need to allow my muscle relax. Hence, tomorrow I am planning to do only cardio and stretching exercise. Actually there is a free yoga class in the gym. I should try that.</li>
</ul>
<p><strong>Day 4 &#8211; Wednesday May 20th</strong></p>
<ul>
<li>11:56 AM &#8211; <span style="color:#800000;">you are so close to completing your thesis and you are running out of time. Skip today&#8217;s gym and focus on your thesis. Right now, your thesis is the most important thing. Work on it. You have already worked all major muscle group, take a break for a day and work on your thesis. <span style="color:#003300;">Don&#8217;t listen to him. He just want to procrastinate. Going to gym will make you active and will increase your productivity.</span></span></li>
<li><span style="color:#800000;"><span style="color:#003300;"><span style="color:#000000;">9:40 PM: I must confess that today it was one of the most intense battle that I have ever seen between procrastinator and achiever. The procrastinator even went to the extent of suggesting giving a point to the Achiever without going to the gym. But don&#8217;t worry, The achiever is not here to win only this challenge but the whole life long challenge. Finally, the achiever convienced me to go to gym<br />
</span></span></span></li>
<li><span style="color:#800000;"><span style="color:#003300;"><span style="color:#000000;">10 PM: went gm and did<br />
</span></span></span></p>
<ul>
<li><span style="color:#800000;"><span style="color:#003300;"><span style="color:#000000;">Running &#8211; 25 min / 2.25 miles</span></span></span></li>
<li><span style="color:#800000;"><span style="color:#003300;"><span style="color:#000000;">Elliptical &#8211; 15 min / 1.25 miles</span></span></span></li>
<li><span style="color:#800000;"><span style="color:#003300;"><span style="color:#000000;">Sit-up 2 sets of 12 rep.<br />
</span></span></span></li>
</ul>
</li>
<li><span style="color:#800000;"><span style="color:#003300;"><br />
</span></span></li>
</ul>
<p><span style="color:#ff0000;"><strong><span style="color:#000000;">Day 3 &#8211; Tuesday  May 19th</span></strong></span></p>
<ul>
<li><span style="color:#ff0000;"><span style="color:#000000;">5:50 AM:</span> <span style="color:#ff0000;">Man, you have just gained 3.5 lbs in just one day because of exercise. You should stop going to gym.  You lost 3 lbs last week by not going to the gym.  See exercise is not meant for you. </span><span style="color:#ff0000;"><span style="color:#008000;">Weight gain can be due to many reasons. May be because of water retention and you just read that 3-5 lbs fluctuation is normal. Just keep on doing. Let complete this challenge and see. <span style="color:#ff0000;">But by then, you might gain lot of weight. <span style="color:#008000;">Exercise cannot cause weight gain as long as you are controlling food, which you are doing I know. Just keep on doing. Do it three more days and on friday take a yoga class. That will stretch your muscles and will allow lactic acid to go. Keep on doing and we will analyze the results after 28 days.<br />
</span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">3:15 PM &#8211; went gym.<br />
</span></span></span></span></span></span></p>
<ul>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">15 min running ( 3 min walk + 6 min @ 6 mph/1 inclination + 6 min @ 7 mph / 0 inclination)</span></span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">Inclined chest press &#8211; 3 sets of 35 lbs, 12 repetitions &#8211; next time reduce to 30 lbs</span></span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">Push-up &#8211; 3 sets, 12 repetitions</span></span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">Chest Extension &#8211; 20 lbs, 12 repetitions, 3 sets<br />
</span></span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">Chest Press using ball &#8211; 20 lbs, 3 sets</span></span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">Rowing &#8211; 1000 m in 4 min 30 seconds</span></span></span></span></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#008000;"><span style="color:#000000;">leg raises<br />
</span></span></span></span></span></span></li>
</ul>
</li>
</ul>
<p><strong>Day 2 &#8211; Monday May 18th</strong></p>
<ul>
<li>10:30 AM &#8211; <span style="color:#003300;">lets go to gym after weekly meeting (which is at 1:30 PM)</span><strong> </strong></li>
<li><span style="color:#000000;">3:01 PM</span><strong><span style="color:#003300;"><span style="color:#000000;"> </span>-</span></strong><span style="color:#003300;"><span style="color:#800000;"> lets go to the gym around 4:30 and use this time to work on some new ideas</span></span><strong> </strong></li>
<li><span style="color:#000000;">5:22 PM</span><strong><span style="color:#003300;"> &#8211; </span></strong><span style="color:#008000;">went gym</span><strong> </strong>
<ul>
<li><span style="color:#003300;">10 min elliptical</span></li>
<li><span style="color:#003300;">leg press (4 sets of lbs, 12 repetition)</span></li>
<li><span style="color:#003300;">calf press (4 sets of 55 lbs, 12 repetitions)</span></li>
<li><span style="color:#003300;">hack machine (4 sets of 45 lbs, 10 repetitions)</span></li>
<li><span style="color:#003300;">cross cycle (for core &#8211; 3 sets of 25)</span></li>
<li><span style="color:#003300;">10 min cycle</span></li>
<li><span style="color:#003300;"><span style="color:#ff0000;">Missed &#8211; Lunches with rotation &amp; Squats</span></span><strong><span style="color:#003300;"><br />
</span></strong></li>
</ul>
</li>
</ul>
<p><strong>Day 1 &#8211; Sunday May 17th<br />
Mind at work:<br />
</strong></p>
<ul>
<li>7:02 AM -  <span style="color:#ff0000;">Will go Gym in the afternoon. Morning time is good for studies and I can effectively use it for writing my thesis.</span></li>
<li>7:04 AM &#8211; <span style="color:#ff0000;">man 30 days is too long. Probably I should start with one week or two week. My two cents go for two weeks. Also, doctors don&#8217;t suggest working out for 30 days. <span style="color:#008000;">Take one day at a time and forget about 30 days</span><br />
</span></li>
<li>10:41 AM -<span style="color:#ff0000;"> oh man, today is so hot. Just saw the weather and according to the report today afternoon temperate will be around 90 F. Do I really want to go gym in this hot weather and that to in the afternoon. Let&#8217;s go in the evening.<span style="color:#008000;"> </span></span><span style="color:#008000;">Talking as if you will be working outside. The gym has controlled environment and you will be never exposed to the sun. Go and get some workout. You will feel good after workout. Don&#8217;t your remember that </span><span style="color:#008000;">exercise regulates stress hormones and promotes the release of endorphins that make you feel good</span></li>
<li><span style="color:#008000;"><span style="color:#000000;">7:30 PM &#8211; <span style="color:#008000;">So what happened about the challenge. <span style="color:#ff0000;">I got some new ideas about my thesis. Let me just put them in writing otherwise I will forget it. Will go to gym around 9 PM ( <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' />  ) . <span style="color:#008000;">Achiever mind  ( <img src='http://s2.wp.com/wp-includes/images/smilies/icon_mad.gif' alt=':-x' class='wp-smiley' /> </span></span></span></span> )</span></li>
<li><span style="color:#008000;"><span style="color:#000000;">9:oo PM  &#8211; <span style="color:#008000;">Common body, get up and move. Anyway you are not able to write any new sentence (for thesis) and just moving statements from here to there. Go to gym. <span style="color:#ff0000;">Oh!!. its already 9 PM. If you will go now, you will get late for bed and tomorrow you will be late for office. Lets forget about this challenge and we will start it again sometime later.<br />
</span></span></span></span></li>
<li><span style="color:#008000;"><span style="color:#000000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;">9:15 PM: <span style="color:#008000;">Ahh, finally I got a chance to win. </span><br />
</span></span></span></span></span></p>
<ul>
<li><span style="color:#008000;">5 min walk (3.5 mph) + 7 min running (6 mph / 1 inclination) + 3 min walk (3.5 mph / 0.5 inclination)</span></li>
<li><span style="color:#008000;">Lower T-Row (4 sets of 90 lbs and 10 repetition)<br />
</span></li>
<li><span style="color:#008000;">Back Extension (4 sets of 10 repetition)<br />
</span></li>
<li><span style="color:#008000;">Upper Back T-Row (3 sets of 80 lbs, 12 repetition + 1 set of 95 lbs, 10 repetition)</span></li>
<li><span style="color:#008000;">Lift &amp; Swing (Squat Raises ) &#8211; (3 sets with 30 lbs and 10 repetition)</span></li>
<li><span style="color:#008000;">Sit-ups (3 sets at 2 inclination, 10 repetitions)</span></li>
<li><span style="color:#008000;"><span style="color:#000000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;"><span style="color:#008000;">5 minutes elliptical </span><br />
</span></span></span></span></span></li>
<li><span style="color:#008000;"><span style="color:#000000;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;"><span style="color:#ff0000;">Missed Chin-ups, 10 minutes of elliptical, 1 set of situp and 1 set of lift &amp; swing</span><br />
</span></span></span></span></span></li>
</ul>
</li>
</ul>
<p><strong><br />
</strong></p>
<br />Posted in Challenge Tagged: Challenge, Gym, habit <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/428/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=428&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/05/17/30-day-workout-challenge/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://www.imageenvision.com/sm/0012-0710-1620-2660_evil_devil_smiling_and_holding_a_pitchfork_clipart.jpg" medium="image" />

		<media:content url="http://www.teachmecartoons.com/images/how-to-draw-a-cartoon-angel.gif" medium="image">
			<media:title type="html">angel</media:title>
		</media:content>
	</item>
		<item>
		<title>Releasing Reference Manager (Beta) For Word 2007</title>
		<link>http://ragrawal.wordpress.com/2009/03/07/releasing-reference-manager-beta-for-word-2007/</link>
		<comments>http://ragrawal.wordpress.com/2009/03/07/releasing-reference-manager-beta-for-word-2007/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 07:26:22 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Word]]></category>
		<category><![CDATA[Bibliography]]></category>
		<category><![CDATA[Bibtex]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[Import]]></category>
		<category><![CDATA[LaTex]]></category>
		<category><![CDATA[Memento]]></category>
		<category><![CDATA[Microsoft Word 2007]]></category>
		<category><![CDATA[RIS]]></category>
		<category><![CDATA[Word 2007]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=394</guid>
		<description><![CDATA[Note: I am not able to maintain this software anymore. Its still up and running, but I can&#8217;t help fix bugs. However, I am open to the idea of releasing the software as open source if someone can help me with cleanly separating the pieces. Most of the back hand logic is written in CakePHP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=394&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;">Note: I am not able to maintain this software anymore. Its still up and running, but I can&#8217;t help fix bugs. However, I am open to the idea of releasing the software as open source if someone can help me with cleanly separating the pieces. Most of the back hand logic is written in CakePHP while the fornt-end is written in Visual Basic.  Shoot me an email if you are interested in helping me make this software open source.</span></p>
<p><strong>What is Reference Manager ?</strong></p>
<p>Reference Manager is an &#8220;Add-in&#8221; for Word 2007 that enhances Word 2007&#8242;s inbuilt bibliography feature. It essentially makes it possible to import and export articles using standard formats such as BibTex, RIS, etc. Currently, Reference Manager has four features:</p>
<p>1. <em>Import from Website:</em> Given a URL, this utility will automatically pull all the reference details. Check below for the list of compatible websites</p>
<p>2. <em>Import from text file: </em> If you have citations in BibTex, RIS or any other standard format, use this utility to import your citations into word.</p>
<p>3. <em>Export: </em>Export<em> </em> references in Bibtex and other standard formats</p>
<p>4.<em> Search &amp; Import:</em> Search and import new articles. Currently, search functionality is limited to <a href="http://findnwrite.com/memento" target="_blank">Memento</a> Search. Thus, it can only retrieve those articles that are present on Memento</p>
<p>Checkout the  <a href="http://findnwrite.com/clients/word/refmanager.htm" target="_blank">video</a> to learn more about reference manager add-in</p>
<p><strong>To download, click </strong><a href="http://findnwrite.com/clients/word/RefManager.zip"><strong>here</strong></a></p>
<p><strong>Is Reference Manager free?<br />
<span style="font-weight:normal;">Yes, Referece Manager is complete free. I developed this tool mainly to streamline my thesis writing process. I am so used to word that I wasn&#8217;t able to adopt any other writing tool such as LaTex. However, lack of ability to import articles made my life a hell. Finally, last month, I decided to write this add-in. </span></strong></p>
<p><strong>What are the system requirements to install this add-in</strong></p>
<p>1. <strong><em>Internet &#8211; </em></strong>Reference manager calls Memento, an online bibliography manager, to import and export articles. Essentially, all the back-end process is done by the Memento server and the Reference Manager (or Memento) add-in simply provides a nice interface to integrate Word 2007 and Memento&#8217;s web-service.<br />
2. <strong><em>Windows XP or Vista</em></strong> &#8211; I don&#8217;t know whether you can *.exe file on Mac<br />
3. <strong><em>Microsoft Word 2007 or later</em></strong> &#8211; Of-coure !.  :)</p>
<p><strong>How to Install<br />
<span style="font-weight:normal;">Note:</span> </strong>I don&#8217;t have any other windows machine than my development machine. Hence, I can&#8217;t guarantee that installation will work perfectly. Try it and let me know if you are having any problem. I can, then, work on getting a cleaner installation file. In general, the installation process should be simple.</p>
<p>1. Download the zip file from <a href="http://findnwrite.com/clients/word/RefManager.zip">here</a><br />
2. Unzip the downloaded file and place it at some secure place such as under your documents folder.<br />
3. Click on setup.exe. Depending on your system&#8217;s configuration, you might also have to install VSTO 2008. In any case, the setup.exe will report any problems. Just follow them. Also, if you find any problem, please let me know so that I can take appropriate actions so that other users won&#8217;t have to deal with the same problem.<br />
4. Once everything is install properly, Open Word and check if there is a &#8220;Memento&#8221; tab or not. If there is, you are good to go. Enjoy</p>
<p>List of Compatible Websites</p>
<div style="padding:15px;">
<ul>
<li><a href="http://www.amazon.com/">Amazon</a></li>
<li><a href="http://ajol.info/">African Journals Online</a></li>
<li><a href="http://journals.asm.org/">ASM Journals</a></li>
<li><a href="http://www.blackwell-synergy.com/">Blackwell Synergy</a></li>
<li><a href="http://citeseer.ist.psu.edu/">CiteSeer</a></li>
<li><a href="http://www.hubmed.org/">HubMed</a></li>
<li><a href="http://ieeexplore.ieee.org/">IEEEXplorer</a></li>
<li><a href="http://www.ingentaconnect.com/">IngentaConnect</a></li>
<li><a href="http://www.informaworld.com/">InformaWorld</a></li>
<li><a href="http://www3.interscience.wiley.com/">Wiley InterScience</a></li>
<li><a href="http://www.leaonline.com/">Lawrence Erlbaum Associates (LEA Online)</a></li>
<li><a href="http://www.nature.com/index.html">Nature</a></li>
<li><a href="http://portal.acm.org/">ACM Portal</a></li>
<li><a href="http://www.pubmed.gov/">PubMed</a></li>
<li><a href="http://www.plos.org/">PLoS Jounals</a></li>
<li><a href="http://www.plos.org/">PLoS</a></li>
<li><a href="http://www.pubmedcentral.nih.gov/">Pubmed Central</a></li>
<li><a href="http://online.sagepub.com/">Sage Journals Online</a></li>
<li><a href="http://www.scielo.org/">SciELO</a></li>
<li><a href="http://www.scielosp.org/">SciELO Health Public</a></li>
<li><a href="http://www.springerlink.com/">SpringerLink</a></li>
<li><a href="http://scholar.google.com/">Google Scholar</a></li>
</ul>
</div>
<br />Posted in Tips, Tools, Word Tagged: Bibliography, Bibtex, Export, Import, LaTex, Memento, Microsoft Word 2007, RIS, Word 2007 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/394/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=394&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/03/07/releasing-reference-manager-beta-for-word-2007/feed/</wfw:commentRss>
		<slash:comments>67</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>
	</item>
		<item>
		<title>A point about Latitude/Longitude</title>
		<link>http://ragrawal.wordpress.com/2009/01/24/a-point-about-latitudelongitude/</link>
		<comments>http://ragrawal.wordpress.com/2009/01/24/a-point-about-latitudelongitude/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 21:36:58 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Map]]></category>
		<category><![CDATA[Datum]]></category>
		<category><![CDATA[Latitude]]></category>
		<category><![CDATA[longitude]]></category>
		<category><![CDATA[NAD27]]></category>
		<category><![CDATA[NAD83]]></category>
		<category><![CDATA[WGS84]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=372</guid>
		<description><![CDATA[With the increasing proliferation of GIS Technology and GPS enabled devices, it is increasingly getting common for everyone to deal with latitude/longitude (lat/lon) on a daily basis. However, a simple, yet important, about lat/lon is often missed by users of GPS devices and also by the developers of mapping application. Most users and developers assume [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=372&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">With the increasing proliferation of GIS Technology and GPS enabled devices, it is increasingly getting common for everyone to deal with latitude/longitude (lat/lon) on a daily basis. However, a simple, yet important, about lat/lon is often missed by users of GPS devices and also by the developers of mapping application. Most users and developers assume that lat/lon of a point (or landmark such as building) is sufficient to find that landmark on a map (such as google map). To some extent this is true, but not completely. For instance, consider these two geographic coordinates (latitude, longitude) : (1) 47.62054, -122.34947 and (2) 47.62054, -122.34947. If we try to plot these two geographic coordinates, the two points are separated almost by 95 meters (see google map below). The two points are reference for Space Needle building in Seattle, WA but using different datums. Simply speaking, a datum defines shape and size of the Earth and also initial point of reference from which all lat/lon measurements are made. The first coordinate is based on NAD83 datum and the second is based on NAD27. However, since google map doesn&#8217;t have the option of specifying datum, both were plotted assuming that both the coordinates are based on same datum. As a result, the two markers (each referring to one of the above geographic coordinates) are separated almost by 95 meteres on the map. However, in reality, two markers should overlap.  </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Geographic Coordinates for Space Needle, Seattle, WA </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"> 1.  47.62054, -122.34947 (based on NAD83 datum)<br />
2. 47.620719, -122.348646  (based on NAD27 datum)</span></p>
<div id="attachment_374" class="wp-caption aligncenter" style="width: 310px"><a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=117670038643606142349.00046140650b89cfd8778&amp;ll=47.620619,-122.34886&amp;spn=0.001349,0.002414&amp;z=19"><img class="size-medium wp-image-374 " title="space_needle" src="http://ragrawal.files.wordpress.com/2009/01/space_needle.png?w=300&#038;h=241" alt="space_needle" width="300" height="241" /></a><p class="wp-caption-text">Space needle (different datums)</p></div>
<p style="text-align:center;"> </p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Over the centuries, many researchers have proposed many different datum, each suitable for different model of the Earth. For instance, in 1927, US started following NAD27 for which the reference point was located at <a class="mw-redirect" title="Meades Ranch" href="http://en.wikipedia.org/wiki/Meades_Ranch">Meades Ranch</a> in Kansas. NAD27 is based on elliposidal (Clarke Ellipsoid) model of the Earth. A elliposidal model assume that the shape of Earth is similar to an Ellipse. But with improving technology, researchers had access to better tools and technology, which led to more accurate models of the Earth. Most researchers now follow GRS80 model of the Earth. Based on GRS80 model of the Earth, a new datum, NAD83, was proposed in 1983 for use in US. Research on an accurate model of the Earth and most suitable datum is still ongoing and many changes to NAD84 have been already proposed. But these changes are still not in use.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">The crux of all this discussion to emphasize the need for specifying datum when reporting lat/lon. However, if datum information is missing, below are some guidlines on what to assume:</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><span style="font-size:medium;font-family:'Bookman Old Style';"> 1. By default most GPS uses WGS84 datum. Thus, if you are getting data from GPS equipment and no datum information is available, assume it is WGS84. <br />
2. By default use WGS84 datum if your mapping application can be used by anyone for any geographic region. WGS84 is based on GRS80 model of the Earth, which is most accurate model of the Earth. <br />
3. If you&#8217;re mapping application is only for US then use NAD83. All USGS data is reported based on NAD83 datum and is the best for US. <br />
4. If the geographic data is for US, but very old (such as historical data), it is better to assume that it is based on NAD27 datum.  </span></span></p>
<p>Enjoying mapping.</p>
<p> </p>
<p>References:</p>
<p>1. <a href="http://www.ngs.noaa.gov/cgi-bin/nadcon.prl">NADCON</a> &#8211; to convert geographic coordinates between NAD27 and NAD83<br />
2. <a href="http://en.wikipedia.org/wiki/GRS80">GRS80</a> (wiki)<br />
3. <a href="http://en.wikipedia.org/wiki/NAD83">NAD27 / NAD 83</a> (wiki)<br />
4. <a href="http://en.wikipedia.org/wiki/WGS84">WGS84</a><br />
5. <a href="http://geography.about.com/od/geographyintern/a/datums.htm">Simple explanation of datum</a></p>
<br />Posted in Map Tagged: Datum, Latitude, longitude, NAD27, NAD83, WGS84 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/372/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=372&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/01/24/a-point-about-latitudelongitude/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2009/01/space_needle.png?w=300" medium="image">
			<media:title type="html">space_needle</media:title>
		</media:content>
	</item>
		<item>
		<title>Urban shock</title>
		<link>http://ragrawal.wordpress.com/2009/01/20/urban-shock/</link>
		<comments>http://ragrawal.wordpress.com/2009/01/20/urban-shock/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 06:36:32 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Urban Shock]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=359</guid>
		<description><![CDATA[Wow, finally got my Internet connection started. I have been waiting for it for quite sometime, as I wanted to share my &#8216;Urban Shock&#8217; experience.  Image Source: Amazon was modified by the author Last month was terrible as I moved from State College, a small university town and home of Nittany Lion and Joe Paterno, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=359&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">Wow, finally got my Internet connection started. I have been waiting for it for quite sometime, as I wanted to share my &#8216;Urban Shock&#8217; experience. </span></p>
<div style="float:left;padding-right:10px;padding-bottom:10px;"><span style="font-size:medium;font-family:'Bookman Old Style';"><a href="http://ragrawal.files.wordpress.com/2009/01/partner__s_in_time__futureshock_by_.jpg"><img class="alignleft size-medium wp-image-362" title="partner__s_in_time__futureshock_by_" src="http://ragrawal.files.wordpress.com/2009/01/partner__s_in_time__futureshock_by_.jpg?w=198&#038;h=300" alt="partner__s_in_time__futureshock_by_" width="198" height="300" /></a></span><br />
Image Source: <a href="http://www.amazon.com/Partners-Time-3-Future-Shock/dp/0595410421" target="_blank">Amazon</a><br />
was modified by the author</div>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Last month was terrible as I moved from State College, a small university town and home of Nittany Lion and Joe Paterno, to Bay Area or SFO, an urban city. After spending six years as a graduate student and living in small university town, I got used to certain things in life such as to live frugually, shopping at Walmart,  sharing apartment, spend less than 10 minutes on commuting, etc. However, as I moved to San Francisco last month, I was suddenly gripped by an Urban shock. My urban shock came in the following ways:</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">1. <strong>Paying more than $1000 for a 1BHK</strong> apartment. In State College, I was sharing a 3 bed-room apt and the whole 3BHK apt. cost less than $900</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">2. <strong>Commuting more than 1 hour each way</strong>. Wow..this was something I never imagined. Everyday I spend more than 2 and 1/2 hour commuting and this is not unusual for people working in San Francisco city. I regularly meet many people in BART (Bay Area Rapid Transit) that have been doing this for generations (figuratively). In university, I hardly had to walk more than 15 minutes to get to college from my apartment.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">3. <strong>Home alone</strong>. Well, for time-being I am enjoying the solitude. But, I am sure soon the same solitude will get onto my nerve.  </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">4. <strong>8 hours are too-much</strong>: In college, I often thought that I am working more than 8 hours. However, I guess, that was only my false belief. For last two weeks, I have been working continuously 8-5 and now realizing that 8 hours is too-much. Every-day, I just wait for the friday 5 PM, so that I can go home and relax the whole weekend. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">5. <strong>Ironing clothes:</strong> Wow, this was another big shock. In the last 6 years, I don&#8217;t remember a single day when I ironed my clothes. I am even not sure whether I had a iron <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  . However, now, I have to iron my clothes everyday.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">6. <strong>Day starts at 5:30 AM:</strong> In college, my day used to start at noon (even those were good days). But now I had to get up at 5:30 so I can get time to iron my clothes, have breakfast and leave for BART station by 6:30 AM so as to reach office by 8 AM. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">the list goes on..Nevertheless, SFO is a great place and I am enjoying its fast-pace life. It has a energy that I never experienced in any other big city. </span></p>
<br />Posted in General Tagged: Urban Shock <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/359/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=359&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2009/01/20/urban-shock/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2009/01/partner__s_in_time__futureshock_by_.jpg?w=198" medium="image">
			<media:title type="html">partner__s_in_time__futureshock_by_</media:title>
		</media:content>
	</item>
		<item>
		<title>Developing Ajax based web application using CakePHP</title>
		<link>http://ragrawal.wordpress.com/2008/12/17/developing-ajax-based-web-application-using-cakephp/</link>
		<comments>http://ragrawal.wordpress.com/2008/12/17/developing-ajax-based-web-application-using-cakephp/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 00:25:29 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=344</guid>
		<description><![CDATA[One of the challenges in developing ajax application using CakePHP is to figure out how to load ajax view (interface) for first time and request only data (json or XML) in subsequent ajax calls. Luckily, with CakePHP this is simple and you really don&#8217;t need to write many different functions. The trick is to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=344&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">One of the challenges in developing ajax application using CakePHP is to figure out how to load ajax view (interface) for first time and request only data (json or XML) in subsequent ajax calls. Luckily, with CakePHP this is simple and you really don&#8217;t need to write many different functions. The trick is to use ParseExtension and RequestHandler. You can read more about ParseExtension and requestHandler in CakePHP cookbook (here are links <a href="http://book.cakephp.org/view/477/The-Simple-Setup">ParseExtension</a> and <a href="http://book.cakephp.org/view/174/Request-Handling">requestHandler</a>)</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Even after reading about ParseExtension and requestHandler, if you have question on how to develop ajax application using CakePHP, then continue reading <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Lets assume that you want to display all the registered users of an application. If you have thousands of users, you don&#8217;t want to show all of them at once but use pagination. Now, lets assume that you have Ajax Table with a pagination toolbar( somthing like this <a href="http://extjs.com/deploy/dev/examples/grid/paging.html">example)</a>. Further, users can access this page by reaching to the following URL &#8211; http://localhost/users/index. This page renders the table, paging toolbar and loads first 10 registered users. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">However, the problem is that in subsequent calls to &#8220;users/index&#8221;, we don&#8217;t want to re-render the table and pagination toolbar, but simply fetch data, usually in JSON or XML format. So, here is the trick. Within our initial view that is located at &#8220;views/users/index.ctp&#8221; file, set remote ajax calls to point to &#8220;users/index.json&#8221; and make sure that you have enabled requestHandler component and set Router::parseExtension to handle json extension.  That is, in your app/config/routes.php, you have added this line Router::parseExtension(&#8220;json&#8221;);. Thus, now, when the browser request for &#8220;users/index.json&#8221; page, CakePHP calls a different view, a json view, that is located at &#8220;views/users/json/index.ctp&#8221;. In this second view, you simply echo json data using the following line &lt;?php echo $javascript-&gt;object($data); ?&gt;. Thus, we have a single function (index within our user controller class), but there are two views related to this function, namely:</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">     1. views/users/index.ctp   &#8211; this view creates table structure, paging toolbar and, if available, loads initial data<br />
    2. views/users/json/index.ctp  - this view only sends json data to the browser</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
Below is a diagram that indicates how query/request/data flow across different components when developing a ajax application using the above approach. Note, the diagram shows my approach and is not endorsed by CakePHP or any other group. Thus, there might be other approaches that might be more efficient than mine. The numbers in the image indicate how query/data flow from one component to another and is explaind below the image.</span></p>
<p> </p>
<div id="attachment_345" class="wp-caption aligncenter" style="width: 490px"><a href="http://ragrawal.files.wordpress.com/2008/12/ajax.png"><img class="size-full wp-image-345" title="ajax" src="http://ragrawal.files.wordpress.com/2008/12/ajax.png?w=468" alt="Ajax Flow"   /></a><p class="wp-caption-text">Ajax Flow</p></div>
<p> </p>
<p> <br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><br />
1.    A User requests for http://localhost/users/index  page<br />
2.    &#8221;User controller&#8221; then calls &#8220;user model&#8221; to get first 10 registered users<br />
3.    Model returns data<br />
4.    &#8221;User Controller&#8221; sends data to the view that is located at &#8220;views/users/index.ctp&#8221; In this view, we remotely set ajax functions to call http://localhost/users/index.json (note extra &#8220;.json&#8221; at the end of the URL).<br />
5.    Rendered table, pagination toolbar and initial data is to the brower is passed to the browser and is rendered by the browser engine. <br />
6.    Users clicks on &#8220;next&#8221; button on the pagination toolbar<br />
7.    Next button sends an ajax calls to http://localhost/users/index.json and also query parameter such as page 2, limit 10, etc. <br />
8.    Controller sends parameters to the model<br />
9.    Model sends data back to controller<br />
10.  Since, the URL had a &#8220;.json&#8221; at the end, requestHandler understands that &#8220;json&#8221; data is requested and sends data (PHP array) to the second view that is located at &#8220;view/users/json/index.ctp&#8221;. This view simply converts PHP array into json using $javascript-&gt;object($data) command. <br />
11.  The json data from the second view is passed to the browser (or table ), completing the ajax request.</span></p>
<p> </p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"> Let me know if you have used any other approach to develop ajax applications.</span></p>
<br />Posted in CakePHP, General Tagged: Ajax, CakePHP <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=344&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/12/17/developing-ajax-based-web-application-using-cakephp/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2008/12/ajax.png" medium="image">
			<media:title type="html">ajax</media:title>
		</media:content>
	</item>
		<item>
		<title>CakePHP &#8211; using associationForeignKey with belongsTo</title>
		<link>http://ragrawal.wordpress.com/2008/12/16/cakephp-using-associationforeignkey-with-belongsto/</link>
		<comments>http://ragrawal.wordpress.com/2008/12/16/cakephp-using-associationforeignkey-with-belongsto/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 05:13:53 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[association]]></category>
		<category><![CDATA[belongsTo]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=331</guid>
		<description><![CDATA[While defnining &#8220;belongsTo&#8221; association in CakePHP 1.2, there are five keys that you can use (to read more about association or belongsTo, checkout this page) . The five keys are className, foreignKey, conditions, fields, counterCache. In general, if you have followed CakePHP conventions, you wont need any other key. However, today I stumbled across a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=331&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">While defnining &#8220;belongsTo&#8221; association in CakePHP 1.2, there are five keys that you can use (to read more about association or belongsTo, checkout <a href="http://book.cakephp.org/view/78/Associations-Linking-Models-Together">this page</a>) . The five keys are className, foreignKey, conditions, fields, counterCache. In general, if you have followed CakePHP conventions, you wont need any other key. However, today I stumbled across a situation where the database was not structured according to CakePHP conventions. As a result, the belongsTo query that CakePHP was generating was not coming out right. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Consider a scenario where a &#8220;users&#8221; table belongsTo &#8220;loctions&#8221; table and the two tables are defined as shown below: </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"> 1. Users {id, username, passwd, zipcode}<br />
<span style="font-family:Georgia;"> 2. locations {id, zipcode, city, zipcode}</span></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Above tables break two of CakePHP&#8217;s conventions:</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">1. CakePHP expects &#8220;users&#8221; table to have a field &#8220;location_id&#8221;. However, in the above scenario, the &#8220;location_id&#8221; is named as &#8220;zipcode&#8221;. As shown below, this problem can be easily addressed using &#8220;foreignKey&#8221; </span></p>
<p>class User extends AppModel{</p>
<p>var $belongsTo = array(</p>
<p>&#8216;Location&#8217; =&gt; array(</p>
<p>&#8216;foreignKey&#8217; =&gt; &#8216;zipcode&#8217; //now CakePHP will use zipcode instead of location_id</p>
<p>)</p>
<p>);</p>
<p>}</p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
2. The second problem is that CakePHP assumes &#8220;users.zipcode&#8221; is equal to &#8220;locations.id&#8221; and therefore result in such a query<br />
</span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><br />
users left join locations on (users.zipcode = locations.id)<br />
</span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><br />
However, in the above scenario, users.zipcode corresponds to locations.zipcode. This problem could have been easily solved by using &#8220;associationForiegnKey&#8221; (available only with HABTM). However, CakePHP ignores associationForeignKey when used along with belongsTo association. To address this problem, then, there are two options. First, change your database schema to confirm with CakePHP&#8217;s conventions. Second, thanks to AD7six (see his comment below) is to set foreginKey to false and define condition. Thus, define the association between user and location as follow</span></p>
<p>var $belongsTo =&gt; array(<br />
&#8216;Location&#8217; =&gt; array(<br />
foreignKey =&gt; false,<br />
conditions  =&gt; array(&#8216;User.zipcode&#8217; =&gt; &#8216;Location.zipcode&#8217;)<br />
)<br />
);</p>
<p><span style="font-size:medium;"><span style="color:#ff0000;">Note: </span></span><span style="font-size:medium;"><span style="color:#ff0000;">Below is another solution that I was using before AD7six gave me the above idea. I don&#8217;t recommend this third option, but I just kept it over here so as to simply provide you with an idea of how problems can be solved using CakePHP. </span></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Another solution is to change the primary key of the locations table from &#8220;id&#8221; to &#8220;zipcode&#8221; before a query is sent to the database and reset it to &#8220;id&#8221; after the query </span></p>
<p>//<br />
// find uesrs and their locations (in app/models/uesr.php)<br />
//</p>
<p>function getAllUsers(){</p>
<p>$this-&gt;contain(&#8216;Location&#8217;);</p>
<p>$originalPrimaryKey = $this-&gt;Location-&gt;primaryKey;     // fetch orignal primary key</p>
<p>$this-&gt;Location-&gt;primaryKey = &#8216;zipcode&#8217; ;   // (zipcode refers to the zipcode field in the locations table)</p>
<p>$result = $this-&gt;find(&#8216;all&#8217;, array());</p>
<p>$this-&gt;Location-&gt;primaryKey = &#8216;id&#8217;;              // reassign original primary key</p>
<p>return $result;</p>
<p>}</p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
The above solution works but is not optimal as it involves lot of hard coding and also you have to make sure that every controller and model is properly setting primary key of location table. Below is a more optimal solution. While, it is based on the above approach (swapping primary key), it automates the process using beforeFind and afterFind functions. However, this approach requires defining associationForeignKey while defining belongsTo association.<br />
</span></p>
<p>//<br />
// User.php<br />
//</p>
<p>class User extends AppModel{</p>
<p>var  $name = &#8216;Article&#8217;;</p>
<p>var  belongsTo = array(</p>
<p>&#8216;Location&#8217; = array(</p>
<p>&#8216;foreignKey&#8217; =&gt; &#8216;zipcode&#8217;, //refers to zipcode field of users table</p>
<p>&#8216;associationForeignKey&#8217; = &#8220;zipcode&#8221;   //refers to zipcode field of location table.</p>
<p>// While CakePHP ignores associationForeignKey,</p>
<p>// I use it in beforeFind function</p>
<p>)</p>
<p>var $swapPrimaryKey = null;     // A variable to temporarily store primary keys</p>
<p>//</p>
<p>// beforeFind function &#8211; CakePHP calls beforeFind just before executing a query</p>
<p>//</p>
<p>function beforeFind($queryData){</p>
<p>//Make sure swapKeys variable is initalized</p>
<p>$this-&gt;swapKeys = array();</p>
<p>//Check if any belongsTo association is defined in the Model</p>
<p>if(isset($this-&gt;belongsTo) &amp;&amp; !empty($this-&gt;belongsTo)){</p>
<p>foreach($this-&gt;belongsTo as $key =&gt; $value){</p>
<p>if(!is_array($value)) continue;</p>
<p>//Check if associationForeignKey is defined.</p>
<p>//If it is, then change the primary key of the associated model</p>
<p>if(    array_key_exists(&#8216;associationForeignKey&#8217;, $value)</p>
<p>&amp;&amp; !empty($value['associationForeignKey'])){</p>
<p>$this-&gt;swapKeys[$key] = $this-&gt;{$key}-&gt;primaryKey;  // save orignal primary key</p>
<p>$this-&gt;{$key}-&gt;primaryKey = $value['associationForeignKey']; //change primary key</p>
<p>} //next $key</p>
<p>} //endif</p>
<p>}  //end beforeFind<br />
//<br />
// Defining afterFind function. This function is called by CakePHP after it executed a query<br />
//<br />
function afterFind($results){</p>
<p>//reset primary keys for all belongsTo association</p>
<p>foreach($this-&gt;swapKeys as $key =&gt; $value)</p>
<p>$this-&gt;{$key}-&gt;primaryKey = $value;</p>
<p>unset($this-&gt;swapKeys);</p>
<p>return $results;</p>
<p>}</p>
<p>//</p>
<p>// get all users and their locations (with above changes..this function becomes a piece of cake)</p>
<p>// compare it with the above getAllUsers() &#8211; this is much more elegant and simple</p>
<p>//</p>
<p>function getAllUsers(){</p>
<p>$this-&gt;contain(&#8216;Location&#8217;);</p>
<p>return  $this-&gt;find(&#8216;all&#8217;, array());</p>
<p>}</p>
<p>}</p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"> If you want, you can move afterFind and beforeFind functions in app_model.php.<br />
</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Comments are welcome! </span></p>
<br />Posted in CakePHP Tagged: association, belongsTo, CakePHP <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/331/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=331&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/12/16/cakephp-using-associationforeignkey-with-belongsto/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>
	</item>
		<item>
		<title>Integrating CakePHP and ExtJS: A complete guide</title>
		<link>http://ragrawal.wordpress.com/2008/12/13/integrating-cakephp-and-extjs-a-complete-guide/</link>
		<comments>http://ragrawal.wordpress.com/2008/12/13/integrating-cakephp-and-extjs-a-complete-guide/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 22:27:27 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[DataValidation]]></category>
		<category><![CDATA[User Registration]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=247</guid>
		<description><![CDATA[A tutorial on how to integrate CakePHP and ExtJS. Demonstrates the integration of the two using the example of a simple user registration form. Also shows how to load data and validation errors returned by the server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=247&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3><span style="color:#ff0000;">I have moved my blog. To see any updated information related to this post, please visit over </span> <a href="http://www.findnwrite.com/musings/integrating-cakephp-and-extjs-a-complete-guide/">here</a></h3>
<table border="0" align="center">
<tbody>
<tr>
<td align="bottom"><img class="alignnone" title="CakePHP 1.2" src="http://cakephp.org/img/cake-logo.png" alt="" width="120" height="120" /></td>
<td align="top"><span style="font-size:40px;font-family:'Bookman Old Style';"><strong>+</strong></span></td>
<td align="bottom"><img class="alignnone" title="ExtJS 2.2" src="http://extjs.com/assets/images/oss.gif" alt="" width="120" height="90" /></td>
<td align="top"><span style="font-size:40px;font-family:'Bookman Old Style';"><strong>=</strong></span></td>
<td align="top"><span style="font-size:40px;font-family:'Bookman Old Style';"><strong>Awesome</strong></span></td>
</tr>
</tbody>
</table>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">CakePHP and ExtJS are two excellent frameworks that complement each other very well. However, CakePHP does not support ExtJS as it supports Prototype javascript library. Nevertheless, as this tutorial shows, it is still very simple to integrate the two to create a web 2.0 application. In this tutorial, I show how to create a simple user registration form using ExtJS and pass data back and forth between CakePHP and ExtJS. If you are interested in reading about developing ajax application using CakePHP and ExtJS, then, I recommend you reading this post and also my another <a href="http://ragrawal.wordpress.com/2008/12/17/developing-ajax-based-web-application-using-cakephp/">post</a></span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';">You can download the complete tutorial from  <a href="http://findnwrite.com/blog_resources/CakeExtJS.zip">here</a>. To run this tutorial, you will need to follow these steps:</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">1. Unzip the file in your htdocs folder.<br />
2. Create a new database schema (name it as &#8220;tutorial&#8221;) and create a user table (see step 2 for SQL code)<br />
3. Modify app/config/database.php to define database connection<br />
4. Go to <a href="http://localhost/CakeExtJS/users/register">http://localhost/CakeExtJS/users/register </a><br />
5. Simply enter value in one of the fields and click on &#8220;Create Account&#8221; button. This sends form data (in this case it will be empty) to the server. Server then validates the data and reloads the register page. The register.ctp agains creates the form and loads user entered data and validation errors. Checkout step 6 on how to load validation errors and data returned by the server.<br />
</span></p>
<p>Some Notes about the tutorial:</p>
<ul>
<li>This tutorial assumes that the reader has some level of expertise in CakePHP and, thereby, skips lot of details.</li>
<li>The code is only for learning purpose and is not meant for production use.</li>
</ul>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
<strong>Step 1: Setting CakePHP and ExtJS</strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
To integrate CakePHP and ExtJS setup, follow these steps:</span></p>
<ol style="font-size:medium;font-family:'Bookman Old Style';">
<li>Download Ext JS 2.2. SDK library from <a href="http://extjs.com/products/extjs/download.php">here</a></li>
<li>Unzip the folder somewhere on your desktop. Make sure it has following files and folders &#8220;adapter&#8221;, &#8220;resources&#8221;, &#8220;build&#8221;, and ext-js.all</li>
<li>In your vendor/js (at root level), now copy create a folder &#8220;extjs&#8221; and copy &#8220;build&#8221; and &#8220;adapter&#8221; from the above unzipped folder over here. Also copy ext-all.js file in your vendor/js folder.</li>
<li>Now, copy &#8220;css&#8221; and &#8220;images&#8221; folder from &#8220;resources&#8221; folder to your vendor/css/extjs folder.</li>
<li>Verify: The final cakephp folder should look something similar to shown in the image below</li>
</ol>
<div id="attachment_298" class="wp-caption aligncenter" style="width: 266px"><a href="http://ragrawal.files.wordpress.com/2008/12/file_folder_structure.gif"><img class="size-full wp-image-298" title="file_folder_structure" src="http://ragrawal.files.wordpress.com/2008/12/file_folder_structure.gif?w=468" alt="CakePHP + ExtJS Setup"   /></a><p class="wp-caption-text">CakePHP + ExtJS Setup</p></div>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
<strong>Step 2. Creating User Table:</strong></span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><br />
Now, lets create a simple &#8220;User&#8221; table with six fields: id, name, email, username, passwd (password), and created. Below is the SQL command to create this table.</span><br />
<code> create table users (<br />
id int not null auto_increment primary key,<br />
name varchar(50) not null,<br />
email varchar(50) not null unique,<br />
username varchar(50) not null unique,<br />
passwd varchar(32) not null,<br />
created datetime )<br />
</code></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
<strong>Step 3: Create User Model </strong><br />
In app/models create a user.php file. In user.php, we only define validation criteria for all the fields (see validate variable). CakePHP uses validate variable to verify incoming data. </span><br />
<code><br />
class User extends AppModel {</code></p>
<p><code> var $name = 'User';</code></p>
<p><code> //Validation<br />
//name cannot be empty<br />
//username has to be unique and alphanumeric<br />
//passwd has to be min of 5 characters,<br />
//email has to be a valid email<br />
var $validate = array(<br />
'name'  =&gt; array(<br />
'notEmpty' =&gt; array(<br />
'rule'    =&gt; 'notEmpty',<br />
'required'=&gt; true,<br />
'message' =&gt; 'Name is required'<br />
)<br />
),<br />
'username'=&gt; array(<br />
'alphaNumeric' =&gt; array(<br />
'rule' =&gt; alphaNumeric,<br />
'required' =&gt; true,<br />
'message'  =&gt; 'username can only alphanumeric'<br />
),<br />
'isUnique' =&gt; array(<br />
'rule' =&gt; 'isUnique',<br />
'message' =&gt; 'username is already registered',<br />
'required' =&gt; true<br />
)<br />
),<br />
'passwd' =&gt; array(<br />
'minLength' =&gt; array(<br />
'rule' =&gt; array('minLength', 5),<br />
'message' =&gt; 'Password should contain atleast 5 characters',<br />
'required' =&gt; true<br />
)<br />
),<br />
'email' =&gt; array(<br />
'email' =&gt; array(<br />
'rule' =&gt; 'email',<br />
'required' =&gt; true,<br />
'message' =&gt; 'requires valid email id'<br />
),<br />
'isUnique' =&gt; array(<br />
'rule' =&gt; 'isUnique',<br />
'required' =&gt; true,<br />
'message' =&gt; 'email is already registered'<br />
)<br />
)<br />
); </code></p>
<p><code>}</code></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
<strong>Step 4: creating user_controller.php</strong></span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><br />
With model ready, now create user_controller.php file. In the controller file, we first setup authentication parameters in beforeFilter. Later, we define register function that handles data sent by register form. As discussed above, CakePHP uses validation variable defined in the model to validate data before saving it in the user table. If validation fails, it populates validationErrors variable. </span><br />
<code><br />
class UsersController extends AppController {</code></p>
<p><code> var $name = 'Users';<br />
var $components = array('RequestHandler', 'Auth');<br />
var $helpers = array('Javascript', 'Html', 'Paginator');</code></p>
<p><code> function beforeFilter(){</code></p>
<p><code> //Change Default Hashing Function<br />
Security::setHash('md5');</code></p>
<p><code> //Modify Auth's Default Parameters<br />
$this-&gt;Auth-&gt;fields = array('username' =&gt; 'username', 'password' =&gt; 'passwd');</code></p>
<p><code> //Allow Register function to be called without requiring users to login<br />
$this-&gt;Auth-&gt;allow('register');<br />
}</code></p>
<p><code> // Register fucntion - creates a new account<br />
function register(){<br />
//If no data is available then simply render the form<br />
if(empty($this-&gt;data)) return;</code></p>
<p><code> //Save data<br />
//if validation fails, errors are populated in validationErrors variable </code></p>
<p><code> if($this-&gt;User-&gt;save($this-&gt;data, true)){<br />
//User record was successfully created<br />
//redirect user to some other page<br />
}else{<br />
//Failed to create user record<br />
//send user back to registration form with all data and error<br />
//remove password as it has been hashed<br />
// and therefore is not same to be one that user provided</code></p>
<p><code> unset($this-&gt;data['User']['passwd']);<br />
return;</code></p>
<p><code> </code></p>
<p><code> }<br />
}<br />
}<br />
?&gt;</code></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
<strong>Step 5: Creatin ExtJS view</strong></span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><br />
Now  is the exciting part. Create &#8216;register.ctp&#8217; file in your app/views/users/register.ctp. Copy and paste  the following code in register.ctp file. There are certaings things to note about register.ctp. </span></p>
<ul>
<li><span style="font-family:'Bookman Old Style';font-size:medium;">CakePHP uses automatgic to convert &#8220;name&#8221; property of a form field into a PHP array and hence  name of the field has to be  as data[ModelName][FieldName].</span></li>
<li><span style="font-family:'Bookman Old Style';font-size:medium;">While, it is not required to define &#8220;id&#8221; property, I use it to repopulate data in the form field and display validation errors. In order to achive this, I have written two form utility functions &#8211; loadData and loadError. The two functions are defined in app/webroot/js/FormUtil.js file and called after the form is rendered (see towards the end of the code )<br />
</span></li>
<li><span style="font-family:'Bookman Old Style';font-size:medium;">Finally, note the line that renders the form [ simple.render('content') ]. Thus, the form is rendered in content div. Here &#8216;content&#8217; refer to the id of a div that is defined in default layout file. </span></li>
</ul>
<p><code><br />
Ext.onReady(function(){</code></p>
<p><code> //To display error tips<br />
Ext.QuickTips.init();</code></p>
<p><code> // Show validation errors on side<br />
Ext.form.Field.prototype.msgTarget = 'side';</code></p>
<p><code> //Setup Registration From<br />
var simple = new Ext.FormPanel({</code></p>
<p><code> labelWidth: 100,<br />
url:'&lt;?php echo $html-&gt;url(); ?&gt;',<br />
frame:true,<br />
width: 600,<br />
defaults: {width: 350},<br />
defaultType: 'textfield',<br />
onSubmit: Ext.emptyFn,<br />
submit: function(){<br />
this.getForm().getEl().dom.submit();<br />
},<br />
//Note the id and name property.<br />
items: [</code></p>
<p><code> { fieldLabel: 'Name', name: 'data[User][name]', id: 'data[User][name]' },<br />
{ fieldLabel: 'Email', name: 'data[User][email]', id: 'data[User][email]'},<br />
{ fieldLabel: 'username', name: 'data[User][username]', id: 'data[User][username]'},<br />
{ fieldLabel: 'Password', inputType:'password', name: 'data[User][passwd]',id: 'data[User][passwd]'}<br />
],<br />
buttons: [<br />
{ text: 'Create Account',<br />
handler: function(){ simple.submit(); }</code></p>
<p><code> }]<br />
});</code></p>
<p><code> //Render the form in a content content div<br />
//(content refers to ehe id of a div specified in default layout)<br />
simple.render('content');</code></p>
<p><code> //Utility functions to load data and errors. Checkout app/webroot/js/FormUtil.js<br />
loadData(&lt;?php echo $javascript-&gt;object($this-&gt;data); ?&gt;);<br />
loadError(&lt;?php echo $javascript-&gt;object($this-&gt;validationErrors); ?&gt;);<br />
});</code></p>
<p>Don&#8217;t forget to download the whole application from</p>
<br />Posted in CakePHP, ExtJS Tagged: CakePHP, DataValidation, ExtJS, User Registration <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/247/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=247&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/12/13/integrating-cakephp-and-extjs-a-complete-guide/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://cakephp.org/img/cake-logo.png" medium="image">
			<media:title type="html">CakePHP 1.2</media:title>
		</media:content>

		<media:content url="http://extjs.com/assets/images/oss.gif" medium="image">
			<media:title type="html">ExtJS 2.2</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2008/12/file_folder_structure.gif" medium="image">
			<media:title type="html">file_folder_structure</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Task Lists</title>
		<link>http://ragrawal.wordpress.com/2008/12/09/google-task-lists/</link>
		<comments>http://ragrawal.wordpress.com/2008/12/09/google-task-lists/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 03:55:25 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Product]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[GMail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Task List]]></category>
		<category><![CDATA[ToDo]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=277</guid>
		<description><![CDATA[       Horrrrrrraaay&#8230;&#8230;..Finally, Google released a much awaited Gadget: todo or Task list. Checkout the Google Blog post for more details. Based on few minutes of testing, below are some insights:  Pros: 1. Similar to any Google product, the Task Gadget has a clean interface and is simple to use.  2. Users can create [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=277&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';margin:15px;padding:10px;"><a href="http://www.istockphoto.com/file_thumbview_approve/415316/2/Pumped_guy.jpg"><img class="alignleft" title="Horray" src="http://www.istockphoto.com/file_thumbview_approve/415316/2/Pumped_guy.jpg" alt="" width="228" height="184" /></a></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">       Horrrrrrraaay&#8230;&#8230;..Finally, Google released a much awaited Gadget: todo or Task list. Checkout the <a href="http://gmailblog.blogspot.com/2008/12/new-in-labs-tasks.html">Google Blog pos</a>t for more details. Based on few minutes of testing, below are some insights: </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Pros:</strong></span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;"><br />
1. Similar to any Google product, the Task Gadget has a <strong>clean interface and is simple to use. </strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;">2. Users can create <strong>multiple lists</strong> to separate tasks. Thus, you can create Grocery task list, Work related task list, Study related task list, movies list, songs lists, etc. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;">3. Tasks can be organized hierarchically. Thus, you can have <strong>multiple level of subTasks. </strong>This is one of the feature that is currently lacking in &#8220;Remember The Milk&#8221;, one of the best task managing software/website I ever used. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;">4. You can automatically <strong>create tasks from email</strong>. Simply select the email and select &#8220;Add to task&#8221; from &#8220;More actions&#8221; drop down menu. An interesting feature about this is that the newly create task also links backs to the original email. Thus, you can click on &#8216;related email&#8217; below the task and it will open the email which was used to create the task. <br />
</span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';"><strong>Cons:</strong></span><br />
<span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;"><br />
1. To set due date, you need to click on little arrow on the right hand side of the task and <strong>manually set the due date</strong>. It would have been much more convenient to use GCal like feature where you can simply say &#8220;to do this by Tomorrow&#8221; or &#8220;to do that by Jan 5, 2009&#8243;.  I am not sure why Task Gadget simply reused that GCal&#8217;s functionality. But I am sure Google will improve on this. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;">2. You <strong>can&#8217;t view all the list at the same time</strong>. You have to switch between lists. Similar to GCal Gadget in GMail, it would have been nice to have a view that shows all the tasks from all the list that are due today, tomorrow and in coming days.</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;">3. You c<strong>annot import or export list </strong>or tasks. Well, the Gadget is still in Labs and I assume this functionality will be available soon. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';line-height:20px;">In Summary,  I really found Task Gadget very interesting. Moreover, It will become more powerful as it will get integrated with Google products, mainly with GCal. However, as discussed above, there are definitely some issues that Google will have to work on. For me, the biggest drawback is its inability to view all tasks from all list at the same time.  Nevertheless, I am sitll excited about it. </span></p>
<p><strong>How to enable task list functionality: </strong>Go to Gmail setting page &gt; click on Labs Tab &gt; Enable Tasks Gadget &gt; Click on Save. In the left column of GMail (below the navigation menu), you will see a new label &#8220;Tasks&#8221;. Click on &#8220;Tasks&#8221; and this popup a small widget which is basically your Task Gadget.</p>
<br />Posted in Product, review Tagged: GMail, Google, Task List, ToDo <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=277&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/12/09/google-task-lists/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://www.istockphoto.com/file_thumbview_approve/415316/2/Pumped_guy.jpg" medium="image">
			<media:title type="html">Horray</media:title>
		</media:content>
	</item>
		<item>
		<title>Turning GMail into a central Google application</title>
		<link>http://ragrawal.wordpress.com/2008/12/04/turning-gmail-into-a-central-google-application/</link>
		<comments>http://ragrawal.wordpress.com/2008/12/04/turning-gmail-into-a-central-google-application/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 14:48:13 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[GCal]]></category>
		<category><![CDATA[GChal]]></category>
		<category><![CDATA[GMail]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=251</guid>
		<description><![CDATA[I extensively use GMail, GCal, GChat, Notebook, Reader, and Google Docs. However, I always felt the need for a central application that provides access to all these different Google products. Recently, I figured out that there are two options to turn GMail into such a central Google application. As shown in top image, the first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=251&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:medium;font-family:'Bookman Old Style';">I extensively use GMail, GCal, GChat, Notebook, Reader, and Google Docs. However, I always felt the need for a central application that provides access to all these different Google products. Recently, I figured out that there are two options to turn GMail into such a central Google application. As shown in top image, the first option is to add Gadgets in the left column of GMail. Most Google products have corresponding Gadgets which can be placed in iGoolge or Desktop. Using some of the new features, now it is possible to put some of these Gadgets in GMail. The second option is to use Firefox extension &#8220;<a href="https://addons.mozilla.org/en-US/firefox/addon/9457">Integrated GMail</a>&#8220;. As shown in bottom image, it essentially add internal frames, each containing different Google product. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">Both the options have their own advantages and issues.  The first option (Gadget based) is browser and machine independent, i.e., it works for all the browsers and, once set, can be accessed from any machine. However, the down side is that Gadgets provide limited access, i.e., you wont have all the features of an application. In contrast, the second option is browser and machine dependent, i.e., it only works on Firefox and only on those machines that have &#8220;Integrated GMail&#8221; extension installed. However, the good thing is that it provides full access to other Google application. </span></p>
<p> </p>
<table border="0" align="center">
<tbody>
<tr>
<td align="top">
<p><div id="attachment_252" class="wp-caption aligncenter" style="width: 310px"><a href="http://ragrawal.files.wordpress.com/2008/12/gmailapp.png"><img class="size-medium wp-image-252" title="GMail as Google Product Controller" src="http://ragrawal.files.wordpress.com/2008/12/gmailapp.png?w=300&#038;h=223" alt="Turning GMail into Central Controller" width="300" height="223" /></a><p class="wp-caption-text">Turning GMail into Central Controller</p></div></td>
</tr>
<tr>
<td align="top">
<p><div id="attachment_266" class="wp-caption aligncenter" style="width: 310px"><a href="http://ragrawal.files.wordpress.com/2008/12/integratedgmail1.gif"><img class="size-medium wp-image-266" title="Turning GMail into Central Google Application (Firefox Only)" src="http://ragrawal.files.wordpress.com/2008/12/integratedgmail1.gif?w=300&#038;h=225" alt="Turning GMail into Central Google Application (Firefox Only)" width="300" height="225" /></a><p class="wp-caption-text">Turning GMail into Central Google Application (Firefox Only)</p></div></td>
</tr>
</tbody>
</table>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
Below are the steps that are needed in order to turn GMail into a central Google application. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">1. <strong>Move Labels and Chat to right side</strong>: You don&#8217;t want a big left column that keeps scrolling down and down. In order to create space for other gadgets, move &#8220;Labels&#8221; and &#8220;GChat&#8221; to the right side. In order to do this, click on &#8220;settings&#8221; &gt; &#8220;labs&#8221; tab and then enable &#8220;Right-side chat&#8221; and &#8220;Right-side Labels&#8221;. Make sure you click on &#8220;Save&#8221; after enabling above options. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">2. <strong>Add</strong><strong> other Gadgets:</strong> After above step, you will have more space in the left column to put other gadgets. Again go to the &#8220;Labs&#8221; tab and now enable &#8220;Google Calendar Gadget&#8221;, &#8220;Google Docs Gadget&#8221;, &#8220;Task List&#8221;, and other gadgets, depending on your need. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">3. <strong>ToDo List (Optional, for users who want a todo list): </strong><span style="text-decoration:line-through;">One of features/products that Google is currently lacking is a todo list. Although, there are signs indicating that Google will soon include todo list with GCal, for now, I use &#8220;</span><a href="http://www.rememberthemilk.com" target="_blank"><span style="text-decoration:line-through;">Remeber The Milk</span></a><span style="text-decoration:line-through;">&#8221; todo application. Its has been around for quite some time. It is simple to use and has all the necessary features of a todo list. One of the good thing about &#8220;Rember The Milk&#8221; is that it can be access from phone and also when you are offline. In order to add &#8220;Remember The Milk&#8221; as a gadget in GMail, follow directions given </span><a href="http://www.rememberthemilk.com/services/gmail/gadget/"><span style="text-decoration:line-through;">here.</span></a></span></p>
<p><span style="font-family:'Bookman Old Style';">Update: Google released its own Task List Gadget. To find more about it checkout this <a href="http://ragrawal.wordpress.com/2008/12/09/google-task-lists/">link</a></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">4. <strong>Increase screen space (Optional, only for Google Chrome Users):</strong> Since, now there are so many things in GMail, we need to maximize screen space. It means getting rid of all the uncessary things such as addressbar, statusbar, tools, etc. Luckily it is quite simple to do with <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>. Simply open your GMail in Google chrome and save it as an application shortcut. </span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><strong>5. Integrated Gmail Extension (Optional, only for Firefox Users)</strong>: Download &#8220;Integrated GMail&#8221; firefox extension to have a central google application as shown in second image. </span></p>
<p><span style="font-family:'Bookman Old Style';"><br />
</span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';"><br />
</span></p>
<br />Posted in General Tagged: GCal, GChal, GMail, Google <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=251&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/12/04/turning-gmail-into-a-central-google-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2008/12/gmailapp.png?w=300" medium="image">
			<media:title type="html">GMail as Google Product Controller</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2008/12/integratedgmail1.gif?w=300" medium="image">
			<media:title type="html">Turning GMail into Central Google Application (Firefox Only)</media:title>
		</media:content>
	</item>
		<item>
		<title>A Week Without Identity</title>
		<link>http://ragrawal.wordpress.com/2008/10/18/a-week-without-identity/</link>
		<comments>http://ragrawal.wordpress.com/2008/10/18/a-week-without-identity/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 19:32:46 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[H-1B]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[OPT]]></category>
		<category><![CDATA[SEVIS]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=225</guid>
		<description><![CDATA[In April, I was interviewed by Microsoft. Although, Microsoft never offered me a job, they by mistake filed an H-1B visa for me and neither asked me or notified about it. As a result, immigration services terminated my F-1 status and put on hold my OPT application causing a week of tension for me.  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=225&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img title="Identify Theft" src="http://www.cartoonstock.com/lowres/hsc1578l.jpg" alt="Identify Theft" /></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">In short: In April, I was interviewed by Microsoft. Although, Microsoft never offered me a job, by mistake, they filed an &#8220;H-1B&#8221; visa on my behalf. They neither asked me about it nor notified about it. As a result, immigration services terminated my F-1 status and put on hold my OPT application. As a result, for a week, I wasn&#8217;t sure of my status in USA.</span></p>
<p><span style="font-size:large;font-family:'Bookman Old Style';"><strong>Complete Story:</strong></span></p>
<p><span style="font-size:medium;font-family:'Bookman Old Style';">As time will go, I am sure I will rejoice the tension filled last week. It all started on Monday Oct. 3rd, 2008, the day when I received a notice from USCIS (US Immigration Services) informing that they were not able to process my OPT (Optional Practical Training) application. The reason being that my F1 (student) status was terminated. The notice duly informed me to go to University DSO (Designated School officer) to reinstate my F-1 Status. Initially, I thought there might be some minor mistake with my records and it should take only couple of minutes for the DSO (Designated School Officer) to fix my records.</span></p>
<p class="posttext"><span style="font-size:medium;font-family:'Bookman Old Style';">However, to my horror, when the DSO opened my SEVIS document, he found that my F-1 student status was terminated because I was approved an H-1B visa by USCIS. For many, it is a moment of joy to find out that their H-1B visa has been approved. However, for me, it was scary. I never applied for H-1B, then how the heck I can be approved an H-1B visa. </span></p>
<p class="posttext"><span style="font-size:medium;font-family:'Bookman Old Style';">It didn&#8217;t take more than a minute for my rational mind to think of all the possible reasons and speculate grave consequences. The first explanation that came to my mind was of &#8220;Identity Theft&#8221;. Oh my God !. I could see myself working hard to pay the debt that I never took and going to prison for crimes that I never did. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </span></p>
<p class="posttext"><span style="font-size:medium;font-family:'Bookman Old Style';">However, to my relief, I suddenly started thinking about next possibility. It might be that some poor soul at USCIS made  a mistake: &#8220;To err is to human&#8221;. Someone at USCIS possibly made a change in my record instead of someone else. Damm it!, why my record. I could see myself struggling for years, straddling from one office to another.  </span></p>
<p class="posttext"><span style="font-size:medium;font-family:'Bookman Old Style';">After three days of tension, fear, etc., finally, on the fourth day, I found out that it was neither the case of &#8220;identify theft&#8221; nor of USCIS making a mistake. Indeed, some company did filed an application for me. But, it still remain unknown which company filed the application. What the hell!. I was offered a job, but long after the deadline for H-1B visa application was passed. </span></p>
<p class="posttext"><span style="font-size:medium;font-family:'Bookman Old Style';">Finally, from the inner depths of my mind, a voice said: &#8220;<strong>It is Microsoft</strong>&#8220;. What the hell!. They did interviewed me in April and asked for my all my documents, but never offered me a job. How come then they applied for H-1B visa for me. Nevertheless, I finally ended up calling Microsoft and found out that they did, by mistake, filed an I-129 (H-1B visa) application for me. I was furious and agitated. For a minute, I even thought of suing for all the psychological pressure and tension (and also to make some cheap money <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ). However, they were quick to fix the problem and worked hard on Friday evening to send USCIS a withdrawal notice. Hence, I dropped the idea of suing the company <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  . I can understand that it must be a challenge for Microsoft&#8217;s HR department to manage paperwork of 1000s of applicants. But on the other hand, I am also forced to think about the software company that claims to enhance productivity with its office tools, but is not able to manage its own mess and paperwork. </span></p>
<br />Posted in General Tagged: H-1B, Microsoft, OPT, SEVIS <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=225&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/10/18/a-week-without-identity/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://www.cartoonstock.com/lowres/hsc1578l.jpg" medium="image">
			<media:title type="html">Identify Theft</media:title>
		</media:content>
	</item>
		<item>
		<title>Unleash Your Goals: Turn Desktop into a Vision Board</title>
		<link>http://ragrawal.wordpress.com/2008/09/28/unleash-your-goals-turn-desktop-into-a-vision-board/</link>
		<comments>http://ragrawal.wordpress.com/2008/09/28/unleash-your-goals-turn-desktop-into-a-vision-board/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 20:32:26 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Dreammanifesto]]></category>
		<category><![CDATA[post-it]]></category>
		<category><![CDATA[Secret]]></category>
		<category><![CDATA[vision board]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=208</guid>
		<description><![CDATA[If you have seen the movie/document &#8220;The Secret&#8221;, you know what I mean by the term &#8220;vision board&#8221;. The movie is essentially about the &#8220;Power of attraction&#8221; which says that anyone can achieve anything as long he/she deeply desires it. One of the idea that I really liked in the movie is about &#8216;vision board&#8217;. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=208&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_210" class="wp-caption aligncenter" style="width: 490px"><a href="http://ragrawal.files.wordpress.com/2008/09/visionboard.png"><img class="size-large wp-image-210" title="visionboard" src="http://ragrawal.files.wordpress.com/2008/09/visionboard.png?w=480&#038;h=360" alt="Digital Vision Board" width="480" height="360" /></a><p class="wp-caption-text">Digital Vision Board</p></div>
<p style="font-size:12pt;font-family:Bookman Old Style;">If you have seen the movie/document<em> &#8220;The Secret&#8221;</em>, you know what I mean by the term &#8220;vision board&#8221;. The movie is essentially about the &#8220;<em>Power of attraction</em>&#8221; which says that anyone can achieve anything as long he/she deeply desires it. One of the idea that I really liked in the movie is about &#8216;vision board&#8217;. The idea is simple. A vision board is a collection of images, text, etc. that reflect your goals and desires. The idea is to collect images of what you want and keep referring to them on daily basis. For instance, if you preparing for a marathon then have an image that shows you crossing the ribbon or simply enjoying your running. Constantly referring to this image will make your desire strong and finally one day you will be able to achieve it. </p>
<p style="font-size:12pt;font-family:Bookman Old Style;">Well the idea of &#8216;vision board&#8217; is simple and yet powerful. There are psychological evidences that having an image of something in your mind enhances your abilities. So, I though it doesn&#8217;t hurt to try. So, now I needed a vision board for myself. </p>
<p style="font-size:12pt;font-family:Bookman Old Style;">As a geek, my first reaction was to look for some software. Influenced by the above movie, there are many software to help you remind of your goals. One such software is &#8220;<a href="http://www.dreammanifesto.com/" target="_blank">dreammanifesto</a>&#8220;. This software basically allows you to create small snippets containing a image and small text. These snippets will popup at regular interval to remind you of your goal. This definitely works, but I wanted something more simpler. Something that I can post on desktop and refer to it whenever I want. Also, priced at $40, Dreammanisfesto seems expensive.  </p>
<p style="font-size:12pt;font-family:Bookman Old Style;">After some more search, I came across &#8220;<a href="http://www.3m.com/us/office/postit/digital/digital_notes.html" target="_blank">digital post-it notes</a>&#8220;. Digital post-it notes are no different from regular post-it not. The only difference, as you already have guessed it, is that they are digital and sit on your desktop. Digital post-it notes offer many interesting features. Such as you can you have images and text in a post-it, you can group many post-it into a memoboard and the best thing is they sit on desktop and, thereby, are always infront of you. </p>
<p style="font-size:12pt;font-family:Bookman Old Style;">So, finally using &#8220;digital post-it&#8221; notes, I got my vision board ready (see picture above). Let see, whether this digital vision board enables me to unleash my goals and achieve things that I desire the most. </p>
<br />Posted in General Tagged: Dreammanifesto, post-it, Secret, vision board <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=208&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/09/28/unleash-your-goals-turn-desktop-into-a-vision-board/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2008/09/visionboard.png?w=480" medium="image">
			<media:title type="html">visionboard</media:title>
		</media:content>
	</item>
		<item>
		<title>Word 2007 &#8211; Keeping Table Rows in One Page</title>
		<link>http://ragrawal.wordpress.com/2008/09/20/word-2007-keeping-table-rows-in-one-page/</link>
		<comments>http://ragrawal.wordpress.com/2008/09/20/word-2007-keeping-table-rows-in-one-page/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 15:37:18 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Word]]></category>
		<category><![CDATA[Table]]></category>
		<category><![CDATA[Word 2007]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=194</guid>
		<description><![CDATA[Thanks to Microsoft Office (especially Word 2007) for making simple things difficult. I thought keeping a table on one page should be simple, but I was wrong. Thanks to this tutorial, I knew what I have to do. However, the tutorial is for Word 2003 and before. The technical details of the tutorial still applies to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=194&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="font-size:12pt;font-family:Bookman Old Style;">Thanks to Microsoft Office (especially Word 2007) for making simple things difficult. I thought keeping <strong>a table on one page</strong> should be simple, but I was wrong. Thanks to this <a href="http://word.mvps.org/FAQs/TblsFldsFms/KeepTableOn1Page.htm">tutorial</a>, I knew what I have to do. However, the tutorial is for Word 2003 and before. The technical details of the tutorial still applies to Word 2007, but the procedure has changed. So, below are the steps on how to format the table so that it is on one page (or view <a title="Word 2007 Tutorial - Keeping Table in One Page" href="http://www.personal.psu.edu/rja171/projects/Tutorial/word/Word2007_Tutorial.htm" target="_blank">this tutorial video</a>) .  </p>
<ol style="font-size:12pt;font-family:Bookman Old Style;">
<li>Click inside any table cell and then right click and <strong>s</strong><strong>elect &#8220;Table Properties&#8221;</strong> from the popup menu. </li>
<li>In the &#8220;Table Properties&#8221; dialog box and under the &#8220;Row&#8221; tab, <strong>uncheck the &#8220;Allow row to break across pages&#8221; box.</strong></li>
<li>Now, <strong>select all the rows except the last one</strong>. Navigate to the <strong>&#8220;Home&#8221; Tab</strong> of the Word 2007 and click on the drop down button in the &#8220;Styles&#8221; Panel and <strong>select &#8220;Apply Styles&#8221; Option.</strong></li>
<li>In the &#8220;Apply Styles&#8221; dialog box, <strong>click on &#8220;Modify&#8221; Button.</strong></li>
<li>Finally, in the &#8220;Modify Style&#8221; dialog box, <strong>click on &#8220;Format&#8221; button</strong> and select &#8220;Paragraph&#8221; and then <strong>click on &#8220;Lines and Page Break&#8221; tab.</strong> </li>
<li>Lastly, <strong>check-on the &#8220;Keep With Next&#8221; and &#8220;Keep Lines Together&#8221; checkboxes.</strong></li>
</ol>
<br />Posted in Tips, Word Tagged: Table, Word 2007 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=194&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/09/20/word-2007-keeping-table-rows-in-one-page/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>
	</item>
		<item>
		<title>What&#8217;s your plan?</title>
		<link>http://ragrawal.wordpress.com/2008/08/30/whats-your-plan/</link>
		<comments>http://ragrawal.wordpress.com/2008/08/30/whats-your-plan/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 17:43:01 +0000</pubDate>
		<dc:creator>ragrawal</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ragrawal.wordpress.com/?p=156</guid>
		<description><![CDATA[Life is full of dichotomies and one such dichotomy that most international student often face is whether they should return back to their country or not. In this post, I try to analyze and answer this particular question<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=156&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseroyston.com/dichotomy"><img class="alignleft size-medium wp-image-159" src="http://ragrawal.files.wordpress.com/2008/08/jesse-royston-dichotomy.jpg?w=300&#038;h=299" alt="" width="300" height="299" /></a></p>
<p><span><br />
Image Source: <a href="http://jesseroyston.com/" target="_blank">72oz. Sip</a><br />
Artist:  Jesse Royston </span></p>
<p style="font-size:12pt;font-family:Bookman Old Style;"><span>As an international student from India studying in The United States of America, I often come face-to-face with the question &#8220;What&#8217;s your plan?&#8221;. Although, seemingly a vague question, it is not. In the context of Indian international students, it means &#8220;am I planning to return to India and if so when?&#8221;. </span></p>
<p class="MsoNormal" style="font-size:12pt;font-family:Bookman Old Style;margin:0 0 10pt;"><span>For most Indian international students, especially when you are single child or all of your brothers and sisters are out of India and only your parents and relatives are India, the question is not trivial but a question that is full </span><span>of dichotomies. On one hand you have aging parents who needs your love, care, and support and on the other you have your own life, your goals and desires. On one hand you have the opportunity to fulfill your own and your family&#8217;s desires, on other hand there is constant anxiety and fear about your legal status in USA. On one hand you have the all social culture, customs, and festivals with which you identify yourself and on the other hand India bureaucracy and politics, long working hours and day-to-day struggle maintaining basic living. </span></p>
<p class="MsoNormal" style="font-size:12pt;font-family:Bookman Old Style;margin:0 0 10pt;"><span>Answering the above question would have been simple if I could list all the parameters that concerns me, identify positive and negative aspects related to each of these parameters, clearly list all my own priorities and, thereby, apply proper deductive logical reasoning and come to a conclusion. Nevertheless, similar to many decisions of life, such a decision about “India or USA” seems to be beyond the realm of logical reasoning but more in the realm of emotional and social realm.</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;">(Note: Thanks to Jesse for allowing me use one of her portrait for this blog)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ragrawal.wordpress.com/156/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ragrawal.wordpress.com/156/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ragrawal.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ragrawal.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ragrawal.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ragrawal.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ragrawal.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ragrawal.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ragrawal.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ragrawal.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ragrawal.wordpress.com&amp;blog=1372632&amp;post=156&amp;subd=ragrawal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ragrawal.wordpress.com/2008/08/30/whats-your-plan/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63ec0f8e5911b3fe9e2accb067abcc22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">ragrawal</media:title>
		</media:content>

		<media:content url="http://ragrawal.files.wordpress.com/2008/08/jesse-royston-dichotomy.jpg?w=300" medium="image" />
	</item>
	</channel>
</rss>
