<?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"
	>

<channel>
	<title>Tech Pedia &#187; Programming</title>
	<atom:link href="http://technopedia.info/tech/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://technopedia.info/tech</link>
	<description>The Matrix of Technology</description>
	<pubDate>Mon, 01 Dec 2008 10:54:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>An efficient UNIX shell-script&#8230;</title>
		<link>http://technopedia.info/tech/2008/10/22/an-efficient-unix-shell-script-to-compare-two-files-delete-one-of-them-if-they-are-duplicates.html</link>
		<comments>http://technopedia.info/tech/2008/10/22/an-efficient-unix-shell-script-to-compare-two-files-delete-one-of-them-if-they-are-duplicates.html#comments</comments>
		<pubDate>Wed, 22 Oct 2008 21:11:14 +0000</pubDate>
		<dc:creator>om</dc:creator>
		
		<category><![CDATA[Linux and Unix]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/?p=1494</guid>
		<description><![CDATA[If you use lot of Unix shellscripts in the VI editor, then here&#8217;s an efficient UNIX shell-script to compare two files &#038; delete one of them if they are duplicates&#8230; Simple yet pretty handy, just check-up!






if(test $# -eq 2)
then
if(test -f $1 &#038;&#038; test -f $2)
then
if(cmp $1 $2)
then
echo &#8220;files are same&#8221;
echo &#8220;$2 deleted&#8221;
rm $2
else
echo &#8220;files are [...]]]></description>
			<content:encoded><![CDATA[<p>If you use lot of Unix shellscripts in the VI editor, then here&#8217;s an efficient UNIX shell-script to compare two files &#038; delete one of them if they are duplicates&#8230; Simple yet pretty handy, just check-up!<br />
<span id="more-1494"></span></p>
<div style="display:block;float:right;padding:5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* tp-latest */
google_ad_slot = "9187503082";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>if(test $# -eq 2)<br />
then<br />
if(test -f $1 &#038;&#038; test -f $2)<br />
then<br />
if(cmp $1 $2)<br />
then<br />
echo &#8220;files are same&#8221;<br />
echo &#8220;$2 deleted&#8221;<br />
rm $2<br />
else<br />
echo &#8220;files are not same&#8221;<br />
fi<br />
else<br />
echo &#8220;one of them is not a file&#8221;<br />
fi<br />
else<br />
echo &#8220;MY COMMAND: enter two file names&#8221;<br />
fi</p>
<p>Sounds pretty ordinary, but just check up is that really what you do as well?</p>
<p>And sure thing if have a better way then share it here :)<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* windows_trial */
google_ad_slot = "0431279924";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2008/10/22/an-efficient-unix-shell-script-to-compare-two-files-delete-one-of-them-if-they-are-duplicates.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to generate the magical Kaprekar&#8217;s number 6174</title>
		<link>http://technopedia.info/tech/2008/09/21/how-to-generate-the-magical-kaprekars-number-6174.html</link>
		<comments>http://technopedia.info/tech/2008/09/21/how-to-generate-the-magical-kaprekars-number-6174.html#comments</comments>
		<pubDate>Sun, 21 Sep 2008 11:50:36 +0000</pubDate>
		<dc:creator>om</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/?p=1424</guid>
		<description><![CDATA[Are you aware of the fact that by taking any 4 digit number, &#038; performing the following operations, the result converges to a constant magical number&#8230;

 






 Yes that magical number is 6174,popularly known as the Kaprekar&#8217;s number, named after great former Indian scientist cum mathematician Mr. Kaprekar&#8230; 
1. Sort the digits of the number [...]]]></description>
			<content:encoded><![CDATA[<p>Are you aware of the fact that by taking any 4 digit number, &#038; performing the following operations, the result converges to a constant magical number&#8230;<br />
<span id="more-1424"></span><br />
<html><head></head> <body><br />
<!-- google_ad_section_start -->
<div style="display:block;float:right;padding:5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* big_sq_red */
google_ad_slot = "4937024846";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p> <strong>Yes that magical number is 6174,</strong>popularly known as the <strong>Kaprekar&#8217;s number</strong>, named after great former Indian scientist cum mathematician <strong>Mr. Kaprekar</strong>&#8230; <!-- google_ad_section_start(weight=ignore) --></p>
<p>1. Sort the digits of the number in descending order & store; lets say asc_sort<br />
2. Sort the digits in ascending &#038; store,; lets say desc_sort<br />
3. Subtract the second series from the first; (desc_sort-asc_sort)<br />
4. Repeat steps 1-3 for the resultant upto 10 iterations (max)<br />
<!-- google_ad_section_end(weight=ignore) --><br />
Ultimately the result will converge to a unique number <strong>6174; the Kaprekar&#8217;s magical number</strong>, &#038; after that doing infinite iterations further also yield the same result <strong>6174</strong>!!</p>
<p>This holds true even for a 3-digit number &#038; the series converges to <strong>495</strong>; the 3 digit <strong>Kaprekar&#8217;s constant</strong>!!</p>
<p><a href="http://technopedia.info/tech/2008/09/21/c-code-snippet-to-generate-kaprekars-magical-constant-6174.html">Click here</a> to see the <strong>C Code snippet</strong> to generate the <strong>4 digit magical Kaprekar&#8217;s constant 6174</strong><br />
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* black_ads */
google_ad_slot = "7949173399";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> <!-- google_ad_section_end --><br />
</body><br />
</html></p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2008/09/21/how-to-generate-the-magical-kaprekars-number-6174.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>C code snippet to generate Kaprekar&#8217;s magical constant 6174</title>
		<link>http://technopedia.info/tech/2008/09/21/c-code-snippet-to-generate-kaprekars-magical-constant-6174.html</link>
		<comments>http://technopedia.info/tech/2008/09/21/c-code-snippet-to-generate-kaprekars-magical-constant-6174.html#comments</comments>
		<pubDate>Sun, 21 Sep 2008 11:48:58 +0000</pubDate>
		<dc:creator>om</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/?p=1429</guid>
		<description><![CDATA[A handy C code snippet to generate the 4 digit Kaprekar&#8217;s constant 6174


#include < stdio.h >
#include < conio.h >
void asc(int *a) // to sort the array elements in ascending order
{
 int i,j;
 for(j=1;j < 4;j++)
 {
  for(i=0;i < (4-j);i++)
  {
   if(a[i] > a[i+1])
   {
    int temp=a[i+1];
 [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#om-->A handy <strong>C code snippet</strong> to generate the 4 digit <strong>Kaprekar&#8217;s constant 6174<br />
</strong><br />
<span id="more-1429"></span></p>
<p>#include < stdio.h ><br />
#include < conio.h ></p>
<p>void asc(int *a) // to sort the array elements in ascending order<br />
{<br />
 int i,j;<br />
 for(j=1;j < 4;j++)<br />
 {<br />
  for(i=0;i < (4-j);i++)<br />
  {<br />
   if(a[i] > a[i+1])<br />
   {<br />
    int temp=a[i+1];<br />
    a[i+1]=a[i];<br />
    a[i]=temp;<br />
   }<br />
  }<br />
 }<br />
}<br />
int* desc(int *a) //to sort the array elements in descinding order{<br />
 int b[4],i,j;<br />
 for(i=3,j=0; i > =0;i&#8211;,j++)<br />
  b[j]=a[i];<br />
 return b;<br />
}</p>
<p>int magic(int *n)  //  Function to find out the magic number<br />
{<br />
 int a[4],*d,i=0,anum=0,dnum=0,diff;<br />
 static int count=1,prev=0;<br />
 for(i=0; i < 4; i++)  //  To read each digit of the number into an array<br />
 {<br />
  a[i]=(*n)%10;<br />
  *n=(*n)/10;<br />
 }<br />
 asc(a);<br />
 d=desc(a);</p>
<p> for(i=0;i < 4;i++)  //  Loop to get the number fron array elements<br />
 {<br />
  anum=anum*10+a[i];<br />
  dnum=dnum*10+d[i];<br />
 }<br />
 diff=dnum-anum;<br />
 if(diff==prev)<br />
 {<br />
  printf("%d",diff);<br />
  return count;<br />
 }<br />
<!--adsense#om--><br />
 prev=diff;<br />
 count++;  //  To find out number of iterations<br />
 magic(&#038;diff);<br />
}</p>
<p>void main()<br />
{<br />
 int num,cnt;<br />
 printf(&#8221;Enter any 4 digit number:  &#8220;);<br />
 scanf(&#8221;%d&#8221;,&#038;num);<br />
 cnt=magic(&#038;num);<br />
 printf(&#8221;\n%d&#8221;,cnt);<br />
} </p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* black_ads */
google_ad_slot = "7949173399";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_a</p>
<p>ds.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2008/09/21/c-code-snippet-to-generate-kaprekars-magical-constant-6174.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>XHTML Requirements</title>
		<link>http://technopedia.info/tech/2008/09/15/xhtml-requirements.html</link>
		<comments>http://technopedia.info/tech/2008/09/15/xhtml-requirements.html#comments</comments>
		<pubDate>Mon, 15 Sep 2008 14:02:48 +0000</pubDate>
		<dc:creator>Abhinav Kaiser</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Tutorial]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/?p=1361</guid>
		<description><![CDATA[XHTML, the latest revision of HTML, adds another required element to your Web pages: the &#60;!DOCTYPE&#62; tag. This tag appears at the top of the file and identifies the file as an HTML document conforming to the XHTML requirements. If you were to create an XHTML-conforming document, it would look like the following:


&#60;!DOCTYPE html
PUBLIC "-//W3C//DTD [...]]]></description>
			<content:encoded><![CDATA[<p>XHTML, the latest revision of HTML, adds another required element to your Web pages: the <code>&lt;!DOCTYPE&gt;</code> tag. This tag appears at the top of the file and identifies the file as an HTML document conforming to the XHTML requirements. If you were to create an XHTML-conforming document, it would look like the following:</p>
<p><span id="more-1361"></span></p>
<p><!--adsense#abs_vert_banner-->
<pre><code>&lt;!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en"&gt;
&lt;head&gt;
&lt;title&gt;My XHTML Page&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;This is my first XHTML page.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>The <code>&lt;!DOCTYPE&gt;</code> tag has three variations: Strict, Transitional, and Frameset. You declare which one you are using in the top of the file.</p>
<p>Strict Declare this variation when you are certain that your viewers will be accessing your pages from newer browsers that interpret style sheets correctly. The Strict variation looks like this:</p>
<pre><code>&lt;!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</code></pre>
<p>Transitional Declare this variation when you are not certain how your viewers will be accessing your pages.</p>
<pre><code>&lt;!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
     transitional.dtd"&gt;</code></pre>
<p>Frameset Declare this variation when you are working in frames. </p>
<pre><code>&lt;!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
     frameset.dtd"&gt;</code></pre>
<p><!--adsense#abs_vert_banner-->You might have noticed one more change from the HTML required elements: The <code>&lt;html&gt;</code> tag has some new attributes: xmlns, xml:lang, and lang. In HTML, you only have to include the <code>&lt;html&gt;</code> tag to identify the document as an HTML file, but XHTML requires that you use the xmlns attribute to link your document to the W3C&#8217;s definition of XHTML, which continues to evolve. Remember to include the <code>&lt;!DOCTYPE&gt;</code> tag and the full <code>&lt;html&gt;</code> tag (shown in the following sample) in all your Web pages. </p>
<pre><code>&lt;!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
     transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"
       xml:lang="en" lang="en"&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2008/09/15/xhtml-requirements.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>C# code snippet for demonstration of data casting!</title>
		<link>http://technopedia.info/tech/2008/09/06/c-code-snippet-for-demonstration-of-data-casting.html</link>
		<comments>http://technopedia.info/tech/2008/09/06/c-code-snippet-for-demonstration-of-data-casting.html#comments</comments>
		<pubDate>Sat, 06 Sep 2008 15:44:33 +0000</pubDate>
		<dc:creator>om</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/?p=1220</guid>
		<description><![CDATA[A handy C# code snippet to demonstrate ways of achieve data typecasting like int -> double, int-> and so on&#8230;

using System;




 
  class CastDemo {
  public static void Main()
{
    double x, y;
    byte b;
    int i;
    char ch;
    [...]]]></description>
			<content:encoded><![CDATA[<p>A handy C# code snippet to demonstrate ways of achieve data typecasting like int -> double, int-> and so on&#8230;<br />
<span id="more-1220"></span></p>
<p>using System;</p>
<div style="display:block;float:left;padding:5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* vert_tech */
google_ad_slot = "5080039498";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> </div>
<p>  class CastDemo {<br />
  public static void Main()<br />
{<br />
    double x, y;<br />
    byte b;<br />
    int i;<br />
    char ch;<br />
    uint u;<br />
    short s;<br />
    long l;</p>
<p>    x = 10.0;<br />
    y = 3.0;<br />
    // cast an int into a double<br />
    i = (int) (x / y); // cast double to int, fractional component lost<br />
    Console.WriteLine(&#8221;Integer outcome of x / y: &#8221; + i);<br />
    Console.WriteLine();</p>
<p>    // cast an int into a byte, no data lost<br />
    i = 255;<br />
    b = (byte) i;<br />
    Console.WriteLine(&#8221;b after assigning 255: &#8221; + b +<br />
                      &#8221; &#8212; no data lost.&#8221;);</p>
<p>    // cast an int into a byte, data lost<br />
    i = 257;<br />
    b = (byte) i;<br />
    Console.WriteLine(&#8221;b after assigning 257: &#8221; + b +<br />
                      &#8221; &#8212; data lost.&#8221;);<br />
    Console.WriteLine();</p>
<p>    // cast a uint into a short, no data lost<br />
    u = 32000;<br />
    s = (short) u;<br />
    Console.WriteLine(&#8221;s after assigning 32000: &#8221; + s +<br />
                      &#8221; &#8212; no data lost.&#8221;);</p>
<p>    // cast a uint into a short, data lost<br />
    u = 64000;<br />
    s = (short) u;<br />
    Console.WriteLine(&#8221;s after assigning 64000: &#8221; + s +<br />
                      &#8221; &#8212; data lost.&#8221;);<br />
    Console.WriteLine();</p>
<p>    // cast a long into a uint, no data lost<br />
    l = 64000;<br />
    u = (uint) l;<br />
    Console.WriteLine(&#8221;u after assigning 64000: &#8221; + u +<br />
                      &#8221; &#8212; no data lost.&#8221;);
<div style="display:block;float:right;padding:5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* best_horiz */
google_ad_slot = "9017392229";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>    // cast a long into a uint, data lost<br />
    l = -12;<br />
    u = (uint) l;<br />
    Console.WriteLine(&#8221;u after assigning -12: &#8221; + u +<br />
                      &#8221; &#8212; data lost.&#8221;);<br />
    Console.WriteLine();</p>
<p>    // cast an int into a char</p>
<p>    b = 88; // ASCII code for X<br />
    ch = (char) b;<br />
    Console.WriteLine(&#8221;ch after assigning 88: &#8221; + ch);<br />
  }<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2008/09/06/c-code-snippet-for-demonstration-of-data-casting.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>C-code snippet to print a file by removing comments</title>
		<link>http://technopedia.info/tech/2008/09/04/c-code-snippet-to-print-a-file-by-removing-comments.html</link>
		<comments>http://technopedia.info/tech/2008/09/04/c-code-snippet-to-print-a-file-by-removing-comments.html#comments</comments>
		<pubDate>Thu, 04 Sep 2008 10:00:24 +0000</pubDate>
		<dc:creator>om</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/?p=1197</guid>
		<description><![CDATA[If you have a file full of scraps and comments and you wanna print it by removing comments, then here&#8217;s a C-code snippet to do the task&#8230;





 
#include < stdio.h >
void main(int argc , char *argv[])
{
	FILE *fp,*fp1;
	char ch;
 	clrscr();
        fp=fopen(argv[1],&#8221;r&#8221;);
	fp1=fopen(argv[2],&#8221;w&#8221;);
	while(1)
	{
		ch=fgetc(fp);  /*fgetc*/
		if(ch==EOF)    //eof
		break;
		else
		{
			if(ch==&#8217;/')
			{
				ch=fgetc(fp);
				if(ch==&#8217;/')
				{
					while(1)
					{
						ch=fgetc(fp);
						if(ch==&#8217;\n&#8217;)
						goto label;
					}
				}
  [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a file full of scraps and comments and you wanna print it by removing comments, then here&#8217;s a C-code snippet to do the task&#8230;<br />
<span id="more-1197"></span></p>
<div style="display:block;float:left;padding:5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* vert_tech */
google_ad_slot = "5080039498";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> </div>
<p>#include < stdio.h ><br />
void main(int argc , char *argv[])<br />
{<br />
	FILE *fp,*fp1;<br />
	char ch;<br />
 	clrscr();<br />
        fp=fopen(argv[1],&#8221;r&#8221;);<br />
	fp1=fopen(argv[2],&#8221;w&#8221;);<br />
	while(1)<br />
	{<br />
		ch=fgetc(fp);  /*fgetc*/<br />
		if(ch==EOF)    //eof<br />
		break;<br />
		else<br />
		{<br />
			if(ch==&#8217;/')<br />
			{<br />
				ch=fgetc(fp);<br />
				if(ch==&#8217;/')<br />
				{<br />
					while(1)<br />
					{<br />
						ch=fgetc(fp);<br />
						if(ch==&#8217;\n&#8217;)<br />
						goto label;<br />
					}</p>
<p>				}</p>
<p>                            if(ch==&#8217;*')<br />
				{<br />
					while(1)<br />
					{<br />
						ch=fgetc(fp);</p>
<p>                                                                    if(ch==&#8217;*')<br />
						{<br />
							ch=fgetc(fp);<br />
							if(ch==&#8217;/')<br />
							{</p>
<p>								      while(1)<br />
								{<br />
									ch=fgetc(fp);
<div style="display:block;float:left;padding:5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9680100702980837";
/* fresher_3 */
google_ad_slot = "0396384350";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>									goto label;<br />
								}<br />
							}<br />
							else printf(&#8221;*&#8221;);<br />
						}<br />
					}<br />
				}<br />
				else printf(&#8221;/&#8221;);<br />
			}<br />
		}<br />
		label:fputc(ch,fp1);<br />
	}<br />
	fclose(fp); /*closes the file*/<br />
	fclose(fp1);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2008/09/04/c-code-snippet-to-print-a-file-by-removing-comments.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>HTML Code for Redirection</title>
		<link>http://technopedia.info/tech/2007/05/06/html-code-for-redirection.html</link>
		<comments>http://technopedia.info/tech/2007/05/06/html-code-for-redirection.html#comments</comments>
		<pubDate>Sun, 06 May 2007 05:12:04 +0000</pubDate>
		<dc:creator>Abhinav Kaiser</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/2007/05/06/html-code-for-redirection.html</guid>
		<description><![CDATA[I was working on a project last week and I wanted to redirect one website to another. Although I have designed quite a few websites, it was hard for me to recollect the syntax for redirection. So, I am just posting it on my website as an easy reference for next time and also for [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a project last week and I wanted to redirect one website to another. Although I have designed quite a few websites, it was hard for me to recollect the syntax for redirection. So, I am just posting it on my website as an easy reference for next time and also for Tech Pedia readers. </p>
<p><em><code>&lt;meta HTTP-EQUIV="REFRESH" content="0; url=http://technopedia.info/tech"&gt;</code></em></p>
<p>This code should go between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code>. The content which is &#8220;0&#8243; in this case is the time in seconds for redirection to happen. If the content is set to &#8220;5&#8243;, redirection takes place after 5 seconds and so on and so forth.<br />
<span id="more-348"></span><br />
Note: For this webpage, the body section is not necessary.</p>
<p>So, the HTML file looks like this:</p>
<pre><code>&lt;html&gt;

&lt;head&gt;
&lt;meta HTTP-EQUIV="REFRESH" content="0; url=http://technopedia.info/tech"&gt;
&lt;/head&gt;

&lt;/html&gt;</code></pre>
<p>It&#8217;s simple but hard to remember.</p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2007/05/06/html-code-for-redirection.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Howto : Crash Internet Explorer</title>
		<link>http://technopedia.info/tech/2006/08/31/howto-crash-internet-explorer.html</link>
		<comments>http://technopedia.info/tech/2006/08/31/howto-crash-internet-explorer.html#comments</comments>
		<pubDate>Thu, 31 Aug 2006 08:27:49 +0000</pubDate>
		<dc:creator>Abhinav Kaiser</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/2006/08/31/howto-crash-internet-explorer.html</guid>
		<description><![CDATA[
The news of a single line of javascript code crashing internet explorer intermittently was like Yanni to my ears. This is very true, Stuart Brown has come up with a piece of code which is exactly 61 bytes long and it crashes IE but not Firefox. The piece of code throws an exception in IE [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#abs_med_rect--></p>
<p>The news of a single line of javascript code crashing internet explorer intermittently was like Yanni to my ears. This is very true, Stuart Brown has come up with a piece of code which is exactly 61 bytes long and it crashes IE but not Firefox. The piece of code throws an exception in IE and quits. This piece of code can be incorporated on any webpage. So, wemasters who support Firefox, let&#8217;s start adding this code to all the websites we design.</p>
<p><span id="more-312"></span><br />
Stuart Brown accidentally stumbled upon this piece of code which he wrote one year back. He wrote a script to iterate through objects and print their properties. He tried this on the &#8216;document.write&#8217; method, used to output text to the document. He forgets the reason, but remembers the outcome.</p>
<p>Here is the code :<br />
<code>&lt;script&gt;for (x in document.write) { document.write(x);}&lt;/script&gt;</code></p>
<p>Be warned, if you are running Internet Explorer, your browser will most likely crash, taking all your currently open windows with it, and possibly rendering your system unstable.</p>
<p>For those of you running IE still, it&#8217;s time to switch to stop all these glitches hampering your browsing experience. Better late than never. </p>
<p><em>via <a href="http://www.modernlifeisrubbish.co.uk/how-to-crash-internet-explorer.asp">Modern Life Rubbish</a></em></p>
<p><center><!--adsense#firefox_banner--></center></p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2006/08/31/howto-crash-internet-explorer.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Do not run this script, ever!</title>
		<link>http://technopedia.info/tech/2006/08/27/do-not-run-this-script-ever.html</link>
		<comments>http://technopedia.info/tech/2006/08/27/do-not-run-this-script-ever.html#comments</comments>
		<pubDate>Sun, 27 Aug 2006 21:11:44 +0000</pubDate>
		<dc:creator>Abhinav Kaiser</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/2006/08/27/do-not-run-this-script-ever.html</guid>
		<description><![CDATA[
The recent flame war on ColdFusion brought to mind somthing that happened about 10 years ago.
I worked in a fairly large department that used a spreadsheet as the bug-submission-tracking &#8220;system&#8221;. Naturally, the person who assigned the work kept it open at all time, making it impossible for anyone to actually open it to enter a [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#abs_med_rect--></p>
<p>The recent flame war on ColdFusion brought to mind somthing that happened about 10 years ago.</p>
<p>I worked in a fairly large department that used a spreadsheet as the bug-submission-tracking &#8220;system&#8221;. Naturally, the person who assigned the work kept it open at all time, making it impossible for anyone to actually open it to enter a new bug.</p>
<p><span id="more-308"></span><br />
My boss was modestly technical, but could understand anything if you broke it down into reasonable bites (arguably one of, if not the best boss I&#8217;ve ever had). Part of my job was to evaluate new technologies to see if they could be of use in our department. This time around, it was ColdFusion.</p>
<p>I installed and played with it a while, and decided that the best way to get a feel for it was to build a throw-away system that actually did something of substance. Having been inflicted with the daily arguments about who left the bug-spreadsheet open, I decided that I&#8217;d build a bug-<a href="http://www.landairsea.com">tracking system</a> - at least it was something to focus on.</p>
<p>I built it and it worked. Then someone saw it on the screen on my PC and asked if they could enter a bug report. I told them it was just a test-bed. They nodded, and began to type away. A few days later, my boss was asking around what happened to the bug reports entered by this person (remember that my &#8217;system&#8217; wasn&#8217;t being used by anyone, so she had no reason to think the bugs might be in it). I just happened to put 2 and 2 together, and we all had a good laugh. Then she decided that maybe we should use my system, for real.</p>
<p>Um, wait a minute - no passwords, everything passed in clear-text, etc. No matter, it was just within our department, and nobody would abuse it&#8230;.(actually, nobody ever did)</p>
<p>The thing actually worked fairly well. I started the bug tracking numbers at 300, so that they could prime it with the bugs from the spreadsheet. Over the next year, the users feature-creeped the thing into a fairly useful utility.</p>
<p>Then it was my time to move on to another project. I trained the noobie they hired on how it worked, what made it tick under the hood, the database, all its tables, etc. Even the script that [re]created the database from scratch. After all, you always do these things in a script, right?</p>
<p>It was a ksh script that looked something like this:</p>
<pre><code>#!/bin/ksh
echo "DO NOT EVER RUN THIS SCRIPT - IT DESTROYS, THEN RE-CREATES THE DATABASE"
exit 1
drop table ...
create table ...
...
# prime the database
insert into table values (...</code></pre>
<p>This particular script was also read-only, just to make sure that it was never run after people started using the system.</p>
<p>About a week later, everyone is running around - why are all the menus truncated? Where are all the bug reports? Wha&#8230;.</p>
<p>Then my boss asks me to look at it. It took me 1 second to find the problem. The bug numbers for newly entered bugs were coming out at 305, 306, 307, &#8230;   Hmmm, between that, and the fact that all the menus had been reduced to their original default values, it seemed that the database had been reset.<!--adsense#abs_med_rect--></p>
<p>We went to the person responsible for the system. He explained that he wanted to see what the database-creation script did, so he ran it. I asked how he was able to execute a read-only script. He replied that he saw that it was read-only, so he made it executable. I asked what he thought when it printed the do-not-run-ever message and exited without doing anything. He said he saw that, but really wanted to see what it did, so he commented out the &#8216;exit 1&#8242; and ran it again. Then, when the users started complaining, he kept re-running the script to try and fix the problem.</p>
<p>We rolled back to the last checkpoint, and re-entered the few missing bugs by hand (thankfully I had programmed it to dump stuff to log files).</p>
<p>Doh!!!</p>
<p>Published on <a href="http://thedailywtf.com/forums/thread/88298.aspx">Daily WTF</a> by snoofle</p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2006/08/27/do-not-run-this-script-ever.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Top 10 Things You Need to Know About Java SE 6</title>
		<link>http://technopedia.info/tech/2006/08/03/top-10-things-you-need-to-know-about-java-se-6.html</link>
		<comments>http://technopedia.info/tech/2006/08/03/top-10-things-you-need-to-know-about-java-se-6.html#comments</comments>
		<pubDate>Thu, 03 Aug 2006 18:06:49 +0000</pubDate>
		<dc:creator>Abhinav Kaiser</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://technopedia.info/tech/2006/08/03/top-10-things-you-need-to-know-about-java-se-6.html</guid>
		<description><![CDATA[
Java platform 6 is currently in its beta 2 and is codenamed &#8220;mustang&#8221;. Sun website gives a list of 10 things that are native to Java 6. The website promises to give more details in its further articles. If you would like to download the beta 2, here is the link.

Here is the top ten [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#abs_med_rect--></p>
<p>Java platform 6 is currently in its beta 2 and is codenamed &#8220;mustang&#8221;. <a href="http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/beta2.html">Sun website</a> gives a list of 10 things that are native to Java 6. The website promises to give more details in its further articles. If you would like to download the beta 2, here is the <a href="http://java.sun.com/javase/6/">link</a>.</p>
<p><span id="more-224"></span><br />
Here is the top ten things listed on the website :</p>
<p>1. Web Services</p>
<p>2. Scripting</p>
<p>3. Database</p>
<p>4. More Desktop APIs</p>
<p>5. Monitoring and Management</p>
<p>6. Compiler Access</p>
<p>7. Pluggable Annotations</p>
<p>8. Desktop Deployment</p>
<p>9. Security</p>
<p>10. The -ilities: Quality, Compatibility, Stability</p>
<p>Well, this list might sound pretty basic, but this is a start. It would be interesting to read the rest of the features. But, this information is sufficient to download and try out Java 6.</p>
]]></content:encoded>
			<wfw:commentRss>http://technopedia.info/tech/2006/08/03/top-10-things-you-need-to-know-about-java-se-6.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
