<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5368897754301307869</id><updated>2011-12-28T01:22:02.642+05:30</updated><category term='Camera-Projector Systems'/><category term='PHP'/><category term='iiit'/><category term='cgi'/><category term='FuckProxy'/><category term='web tools'/><category term='javascript'/><category term='personal'/><category term='python'/><category term='web'/><category term='FTPSearch'/><category term='programming'/><category term='internet'/><category term='FTPBrowser'/><category term='BTP'/><category term='network'/><category term='IIITLANBrowser'/><category term='bakwas'/><category term='YUI'/><category term='http'/><category term='code-snippets'/><title type='text'>Turbo's Technical Adventures</title><subtitle type='html'>Notes and reports on my tiny mind's technical wanderings.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-4352106919992178432</id><published>2008-06-24T23:43:00.003+05:30</published><updated>2008-06-25T10:22:30.622+05:30</updated><title type='text'>YUI and FTP++</title><content type='html'>Well a few months ago I was very much excited &lt;a href="http://turbo-technical-report.blogspot.com/2007/06/its-fun-to-make-pages-with-yui.html"&gt;about YUI&lt;/a&gt;. I used it to make the search UI for FTP++ look good.(Well.. atleast tried to make it look good :). But it seems the datatable from YUI is inefficient in handling large amount of data. Searching FTP++ with 1000 results basically hangs your browser. Search on FTP++ is currently pretty useless and most people directly jump to movies page. So, now I am going to follow Google's technique of "Keep it simple" :P (Read between the lines too :D )  I would remove the YUI stuff and display a simple HTML page with search results.&lt;br /&gt;Another ideas is to reverse index the urls to make search faster. Right now I just dump all urls in mysql table and do a simple mysql search.&lt;br /&gt;Also I wish to put some counters etc. to track which part of site is mostly used.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-4352106919992178432?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/4352106919992178432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=4352106919992178432' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4352106919992178432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4352106919992178432'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2008/06/yui-and-ftp.html' title='YUI and FTP++'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-5514791154683609279</id><published>2008-06-13T00:23:00.004+05:30</published><updated>2008-06-13T00:41:07.153+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIITLANBrowser'/><category scheme='http://www.blogger.com/atom/ns#' term='web tools'/><title type='text'>IIIT Lan Browser fixed to work with Firefox 3</title><content type='html'>Left college and entered into the corporate world. Last 2 weeks were really hectic (on account of joining the new company). Finally found some time to fix some of my old stuffs :)&lt;br /&gt;&lt;br /&gt;So don't wait and &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/IIITLANBrowser/"&gt;click here&lt;/a&gt; to get the lastest version of ILB. If you want to know what was actually wrong, read on.&lt;br /&gt;&lt;br /&gt;Firefox 3 is now all gaga about preventing "&lt;a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack"&gt;man in the middle&lt;/a&gt;" attacks and has introduced the funda of secure updates. Extensions hosted on SSL secure sites like addons.mozilla.org have no problems(other than updating the maxVersion variable to 3.0.*). But the ones hosted on normall HTTP sites need to provide SSL secure updates or some weird key, hash, bla bla functionality to work with FF3.&lt;br /&gt;&lt;br /&gt;Now I don't know how to host my 200 website on HTTPS  without going to the sysadmins. And setting public/private keys and signing with digital signatures is a pain in the ***.  And uploading my extension to addons.mozilla.org will take time in getting reviewed and being publicly available. So I have disabled automatic updates in version 1.2 to make it compatible with ff3. Once the new version gets reviewed by mozilla, people can then uninstall this one and install the one hosted at mozilla.(and get auto updates).&lt;br /&gt;&lt;br /&gt;Any problems? &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/IIITLANBrowser/comments.cgi"&gt;Post here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;bbye.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-5514791154683609279?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/5514791154683609279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=5514791154683609279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5514791154683609279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5514791154683609279'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2008/06/iiit-lan-browser-fixed-to-work-with.html' title='IIIT Lan Browser fixed to work with Firefox 3'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-1751432589165424750</id><published>2007-06-11T22:21:00.000+05:30</published><updated>2007-06-11T22:38:33.758+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='YUI'/><category scheme='http://www.blogger.com/atom/ns#' term='web tools'/><category scheme='http://www.blogger.com/atom/ns#' term='FTPBrowser'/><category scheme='http://www.blogger.com/atom/ns#' term='FTPSearch'/><title type='text'>Its fun to make pages with YUI</title><content type='html'>Lately I have been experimenting with &lt;a href="http://developer.yahoo.com/yui/"&gt;Yahoo User Interface&lt;/a&gt; (YUI) library. Its a library for making web interfaces, in javascript / ajax. It has controls similar to win32 common controls like treeView, dataTable, dataGrid, button, menu, etc. This library makes "web page making" so easy. It also has connection manager, xml parser, event handler, etc. to make life easy with ajax kind of scripting.  It provides standard CSS files which allows you to make similar looking pages irrespective of the browser: Reset CSS, Font CSS, Grid CSS. I haven't tried much of the CSS files, though.&lt;br /&gt;I made an FTP browser using YUI. &lt;a href="http://192.168.36.200/%7Esandeep_kr/cgi-bin/FTPBrowser/fileList.cgi?ip=172.16.8.234"&gt;Ceck this out&lt;/a&gt;. Obviously, there is more to it then just YUI. The server side scripting for it is part of what I was making for FTP Search. But it seems that I don't have time for it now :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-1751432589165424750?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/1751432589165424750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=1751432589165424750' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1751432589165424750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1751432589165424750'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/06/its-fun-to-make-pages-with-yui.html' title='Its fun to make pages with YUI'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-755636941699942380</id><published>2007-05-12T10:36:00.000+05:30</published><updated>2007-05-12T11:11:55.341+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='code-snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='web tools'/><category scheme='http://www.blogger.com/atom/ns#' term='FTPSearch'/><title type='text'>Finding out available FTP servers on LAN : Part 2</title><content type='html'>I talked about finding ftp servers on a LAN using nmap in a &lt;a href="http://turbo-technical-report.blogspot.com/2007/04/finding-out-available-ftp-servers-on.html"&gt;previous post&lt;/a&gt;. Well, looks like I got a better alternative to nmap. And what is it? Well its no great software.. its just a small 50 lines program that attempts to connect on port 21 to PCs on LAN. If you can connect, then this PC has an FTP server hosted on it... add it to the list. I takes about 1.5 minutes on my network to scan 8960 IPs.&lt;br /&gt;I was surprised how such a small and simple program could outperform a giant GNU tool like nmap. Or may be I could not fine-tune nmap to my needs. Anyway, this is the exact fine-tuned nmap command I was using that takes about 3.7 minutes to scan a list of 8960 IPs:-&lt;br /&gt;&lt;blockquote&gt;$ nmap -n -P0 -p 21 --max_rtt_timeout 100 --max_retries 0 -oG ftpLog.gnmap -iL IPs.txt&lt;/blockquote&gt;&lt;br /&gt;I also tried using min_parallelism option and min_hostgroup option but they didn't provide any speedup. May be some nmap expert could comment on it. One more thing to be said is that if remove -P0 option or in other words enable pinging .. it takes only 1.5 mins! A great improvement.. but it misses out some FTP servers(those whose firewall disable ping scanning). So I had no resort but to use my own program.&lt;br /&gt;This is the program in case someone is interested:-&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* NetworkScanner.c&lt;br /&gt;*&lt;br /&gt;* A fast network scanner that scans for a specified open port.&lt;br /&gt;*&lt;br /&gt;* It is an enhanced version of propecia.c created by Troy Robinson&lt;br /&gt;* Created : 02/05/2007&lt;br /&gt;* Author : Sandeep Kumar aka Turbo : http://students.iiit.ac.in/~sandeep_kr&lt;br /&gt;*&lt;br /&gt;* Usage: ./a.out &lt;port&gt; &lt;parallel&gt; &lt;ipfile&gt; &lt;output&gt;&lt;br /&gt;* Examples of Ip in ipfile:-&lt;br /&gt;* 172.16-31.*.*&lt;br /&gt;* 192.168.36.200&lt;br /&gt;* 172.*.*.*&lt;br /&gt;* 172.16.0-255.0-255&lt;br /&gt;*&lt;br /&gt;* Sample Usage: ./a.out 21 255 IP_List.txt Out.txt&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;stdlib.h&gt;&lt;br /&gt;#include &lt;unistd.h&gt;&lt;br /&gt;#include &lt;errno.h&gt;&lt;br /&gt;#include &lt;sys h=""&gt;&lt;br /&gt;#include &lt;sys h=""&gt;&lt;br /&gt;#include &lt;netinet h=""&gt;&lt;br /&gt;int ParseIPPart(char *ipPart, int n, int *s, int *e, int startCtr, int dashCtr);&lt;br /&gt;int ParseIP(char *ip, int s[4], int e[4]);&lt;br /&gt;int main (int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt;   if (argc &lt;&gt; &lt;parallel&gt; &lt;ipfile&gt; &lt;output&gt;\n", argv[0]);&lt;br /&gt;       printf("Examples of Ip in ipfile:-\n172.16-31.*.*\n192.168.36.200\n172.*.*.*\n172.16.0-255.0-255\n");&lt;br /&gt;       printf("Sample Usage: %s 21 255 IP_List.txt Out.txt\n",argv[0]);&lt;br /&gt;       exit(1);&lt;br /&gt;   }&lt;br /&gt;   int port = atoi(argv[1]); // Port to scan&lt;br /&gt;   int parallelLimit = atoi(argv[2]); // Max no. parallel processes (using fork)&lt;br /&gt;   char *fname = argv[3]; // input filename&lt;br /&gt;   char *outFname = argv[4]; // output filename&lt;br /&gt;   int procCtr = 0; // current count of parallel propcesses&lt;br /&gt;   char ip[20]; // scanned ip string from input file&lt;br /&gt;   int s[4],e[4]; //ip range as parsed from scanned ip string ip.&lt;br /&gt;   char host[16];&lt;br /&gt;   int i1,i2,i3,i4;&lt;br /&gt;   int sockfd, result;&lt;br /&gt;   struct sockaddr_in address;&lt;br /&gt;   FILE *fp = fopen(fname,"r");&lt;br /&gt;   if(fp==NULL)&lt;br /&gt;   {&lt;br /&gt;       perror("fopen");&lt;br /&gt;       exit(0);&lt;br /&gt;   }&lt;br /&gt;   FILE *fw = fopen(outFname,"w");&lt;br /&gt;   if(fw==NULL)&lt;br /&gt;   {&lt;br /&gt;       perror("fopen");&lt;br /&gt;       exit(0);&lt;br /&gt;   }&lt;br /&gt;   while(fscanf(fp," %s",ip)!=EOF)&lt;br /&gt;   {&lt;br /&gt;       if(ParseIP(ip,s,e)==-1)&lt;br /&gt;       {&lt;br /&gt;           fprintf(stderr,"Invalid IP Range: %s\n",ip);&lt;br /&gt;           continue;&lt;br /&gt;       }&lt;br /&gt;       //printf("Range is:%d-%d.%d-%d.%d-%d.%d-%d\n",s[0],e[0],s[1],e[1],s[2],e[2],s[3],e[3]);&lt;br /&gt;       for(i1=s[0];i1&lt;=e[0];i1++)for(i2=s[1];i2&lt;=e[1];i2++)for(i3=s[2];i3&lt;=e[2];i3++)for(i4=s[3];i4&lt;=e[3];i4++)         {             sprintf (host, "%d.%d.%d.%d", i1,i2,i3,i4);             if(procCtr&gt;=parallelLimit)&lt;br /&gt;           {&lt;br /&gt;               wait(NULL);&lt;br /&gt;               procCtr--;&lt;br /&gt;           }&lt;br /&gt;           int childPid = fork();&lt;br /&gt;           if(childPid&gt;=0) // fork succeeded&lt;br /&gt;           {&lt;br /&gt;               if (childPid == 0) //child&lt;br /&gt;               {&lt;br /&gt;                   address.sin_family = AF_INET;&lt;br /&gt;                   address.sin_port = htons (port);&lt;br /&gt;                   address.sin_addr.s_addr = inet_addr (host);&lt;br /&gt;                   sockfd = socket (AF_INET, SOCK_STREAM, 0);&lt;br /&gt;                   if (sockfd &lt; result =" connect" result ="=""&gt;0)&lt;br /&gt;   {&lt;br /&gt;       wait(NULL);&lt;br /&gt;       procCtr--;&lt;br /&gt;   }&lt;br /&gt;   close (sockfd);&lt;br /&gt;   exit(0);&lt;br /&gt;}&lt;br /&gt;// Parses one part of an IP. An IP has 4 parts separated by dots.&lt;br /&gt;int ParseIPPart(char *ipPart, int n, int *s, int *e, int starCtr, int dashCtr)&lt;br /&gt;{&lt;br /&gt;   int i,j;&lt;br /&gt;   if(starCtr) // For *&lt;br /&gt;   {&lt;br /&gt;       if(n!=1)return -1;&lt;br /&gt;       *s=0;*e=255;return 0;&lt;br /&gt;   }&lt;br /&gt;   if(dashCtr==0) // For normal number without star or dash&lt;br /&gt;   {&lt;br /&gt;       if(n==0||n&gt;3)return -1;&lt;br /&gt;       *s=0;for(j=0;j&lt;n;j++)if(!isdigit(ippart[j]))return else="" s="*s*10+ipPart[j]-'0';"&gt;255)return -1;&lt;br /&gt;       *e=*s;&lt;br /&gt;       return 0;&lt;br /&gt;   }&lt;br /&gt;   else if(dashCtr==1) // For dash&lt;br /&gt;   {&lt;br /&gt;       for(i=0;i&lt;n;i++)if(ippart[i]=='-')break; i="=0||i==n-1||i"&gt;3||n-1-i&gt;3)return -1;&lt;br /&gt;       *s=0;for(j=0;j&lt;i;j++)if(!isdigit(ippart[j]))return else="" s="*s*10+ipPart[j]-'0';"&gt;255)return -1;&lt;br /&gt;       *e=0;for(j=i+1;j&lt;n;j++)if(!isdigit(ippart[j]))return else="" e="*e*10+ipPart[j]-'0';"&gt;255)return -1;&lt;br /&gt;       return 0;&lt;br /&gt;   }&lt;br /&gt;   else if(dashCtr&gt;1) return -1;&lt;br /&gt;}&lt;br /&gt;// Parses an IP into the IP format: a-b.c-d.e-f.g-h&lt;br /&gt;int ParseIP(char *ip, int s[4], int e[4])&lt;br /&gt;{&lt;br /&gt;   int last=0,partCtr=0,starCtr=0,dashCtr=0,i;&lt;br /&gt;   for(i=0;1;i++)&lt;br /&gt;   {&lt;br /&gt;       if(ip[i]=='.'||ip[i]=='\0')&lt;br /&gt;       {&lt;br /&gt;           if(last==i || starCtr+dashCtr&gt;1)return -1;&lt;br /&gt;           if(ParseIPPart(ip+last,i-last,&amp;s[partCtr],&amp;amp;e[partCtr],starCtr,dashCtr)==-1)return -1;&lt;br /&gt;           starCtr=0,dashCtr=0;&lt;br /&gt;           last = i+1;&lt;br /&gt;           partCtr++;&lt;br /&gt;           if(ip[i]=='\0')break;&lt;br /&gt;           if(partCtr==4)return -1;&lt;br /&gt;       }&lt;br /&gt;       else if(isdigit(ip[i]));&lt;br /&gt;       else if(ip[i]=='*')starCtr++;&lt;br /&gt;       else if(ip[i]=='-')dashCtr++;&lt;br /&gt;       else return-1;&lt;br /&gt;   }&lt;br /&gt;   if(partCtr!=4)return -1;&lt;br /&gt;   return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This could be used for scanning any port, not just FTP port(21). The comments in the code says all about the program.&lt;br /&gt;&lt;br /&gt;PS: I wonder why Blogspot does not provide code tags. Users have asked for it since ages. But Blogger just ignores us all. Need to move to Wordpress.&lt;/n;j++)if(!isdigit(ippart[j]))return&gt;&lt;/i;j++)if(!isdigit(ippart[j]))return&gt;&lt;/n;i++)if(ippart[i]=='-')break;&gt;&lt;/n;j++)if(!isdigit(ippart[j]))return&gt;&lt;/output&gt;&lt;/ipfile&gt;&lt;/parallel&gt;&lt;/port&gt;&lt;/netinet&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;/errno.h&gt;&lt;/unistd.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;/output&gt;&lt;/ipfile&gt;&lt;/parallel&gt;&lt;/port&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-755636941699942380?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/755636941699942380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=755636941699942380' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/755636941699942380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/755636941699942380'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/05/finding-out-available-ftp-servers-on.html' title='Finding out available FTP servers on LAN : Part 2'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-2043384472123913169</id><published>2007-05-12T09:57:00.000+05:30</published><updated>2007-05-12T10:13:39.916+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIITLANBrowser'/><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><title type='text'>FuckProxy vs IIITLANBrowser</title><content type='html'>Just now got a scrap on orkut from Ankur Khare thanking me for &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy&lt;/a&gt;. I am always delighted to hear such compliments. But I noticed he was using it from his home. I was surprised how could FP work from outside campus as I had specifically disabled it for requests from outside IIIT on Monga's request. Actually it has a bug and it works from everywhere. Need to fix that.&lt;br /&gt;&lt;br /&gt;FP is not meant to be used from outside. If you are outside, use &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/IIITLANBrowser/"&gt;IIITLANBrowser&lt;/a&gt;. It provides a login mechanism so that only IIITians can use it. Also, FuckProxy url redirect mechanism is set for inside campus. I guess people manually change urls to view pages through FP. Why to take that pain when you have an option?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-2043384472123913169?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/2043384472123913169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=2043384472123913169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2043384472123913169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2043384472123913169'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/05/fuckproxy-vs-iiitlanbrowser.html' title='FuckProxy vs IIITLANBrowser'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-2079802792755909966</id><published>2007-04-29T03:40:00.001+05:30</published><updated>2009-06-25T16:23:22.117+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><category scheme='http://www.blogger.com/atom/ns#' term='web tools'/><category scheme='http://www.blogger.com/atom/ns#' term='FTPSearch'/><title type='text'>Finding out available FTP servers on LAN</title><content type='html'>Its summer vacation now and I have again started doing bc work (as I call it), though I am not so free this vacation :) Shwetabh and I are trying to build a FTP Search which will allow you to find out movies, etc. available on FTP servers on our LAN. I know there is already a similar site built by &lt;a href="http://students.iiit.ac.in/%7Eparesh/"&gt;Paresh Jain&lt;/a&gt; on &lt;a href="http://192.168.36.150/media/"&gt;150/media&lt;/a&gt;. &lt;strike&gt;But (SEEMS TO ME that) it only scans a list of manually specified servers, which were specified long long back&lt;/strike&gt;. [Update: The server list is PROGRAMATICALLY updated once in a while (around a month)]. Other thing is that, its interface does not allow a proper search (although you can of course use ctrl+f). Also, we wish to provide a DC++ like interface for browsing FTP servers. And not to forget, having something &lt;span style="font-style: italic;"&gt;showable&lt;/span&gt; is a plus point during job interviews.&lt;br /&gt;&lt;br /&gt;So in the process of searching about how to best do this, I came across &lt;a href="http://insecure.org/nmap/"&gt;nmap&lt;/a&gt; - the network security tool written by &lt;a href="http://insecure.org/fyodor/"&gt;Fyodor&lt;/a&gt;. It has lots and lots of options and the corresponding uses... quite a good tool.. awesome. This is how I get a list of available FTP servers at any point of time:-&lt;br /&gt;&lt;blockquote&gt;// basic command. can be optimized.&lt;br /&gt;$ nmap -p 21 -iL IPs.txt -oG ftpLog.gnmap ; grep open ftpLog.gnmap | cut -d ' ' -f 2&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;where IPs.txt contains the range of IPs to look for. This is my IPs.txt :-&lt;br /&gt;&lt;blockquote&gt;172.16.1-16.*&lt;br /&gt;172.16.18-20.*&lt;br /&gt;172.16.22.*&lt;br /&gt;172.16.24-32.*&lt;br /&gt;172.17.0.*&lt;br /&gt;172.17.8-10.*&lt;br /&gt;172.17.16.*&lt;br /&gt;192.168.36.*&lt;br /&gt;[ Do tell me if I have missed any IP ]&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I adjusted the timings, etc. to find the best configuration for scanning our LAN. Actually, I am still tinkering with it and will post the exact command later. Any suggestions for improving the performance? At present it takes around 5 mins.&lt;br /&gt;&lt;a href="http://turbo-technical-report.blogspot.com/2007/05/finding-out-available-ftp-servers-on.html"&gt;Part 2&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-2079802792755909966?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/2079802792755909966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=2079802792755909966' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2079802792755909966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2079802792755909966'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/04/finding-out-available-ftp-servers-on.html' title='Finding out available FTP servers on LAN'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-5550079469583054168</id><published>2007-01-11T23:24:00.000+05:30</published><updated>2007-01-15T18:33:20.779+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='IIITLANBrowser'/><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><category scheme='http://www.blogger.com/atom/ns#' term='web tools'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Welcome to the launch of IIIT LAN Browser 1.0 and FuckProxy 0.2</title><content type='html'>So all my readers( thats only me, I guess :P But isn't this blog meant for me only?) , I did some good work in this winter vacation. I released &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy&lt;/a&gt; 0.2, the upgrade for the old 0.1 and made a new firefox extension &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/IIITLANBrowser/"&gt;IIIT LAN Browser&lt;/a&gt;. See &lt;a href="http://sandy007smarty.blogspot.com/2007/01/not-in-iiit-but-still-of-iiit-its-for.html"&gt;my post here&lt;/a&gt; that kind of advertises it :D&lt;br /&gt;&lt;br /&gt;This is the change log for FuckProxy 0.2:&lt;br /&gt;1. Fixed a few bugs.&lt;br /&gt;2. Added better support for ftp.&lt;br /&gt;3. Added auto-update feaure.&lt;br /&gt;4. Changed the position of FP Button as the previous position was interfering with the toolbars of delicious,etc.&lt;br /&gt;5. Now typing "http" in the address bar is not a compulsion.&lt;br /&gt;&lt;br /&gt;IIIT LAN Browser is an extension for the LAN Browser CGI proxy I had earlier. It provides the same functionality but much more easier to use now. Apart from that its much much more robust. The earlier version used to throw errors on half of the sites because of bad parsing. But this one does not parses at all. It directly uses the DOM Tree generated by firefox! So no problem at all. I guess no CGI proxy in world would have as robust parsing as this one.(Well if I dont't parse at all and use Firefox's work, then obviously it will be robust :P ).&lt;br /&gt;I also added login functionality so that only iiitians can use it. You need to enter your 200 login and password to use it. Have fun...&lt;br /&gt;&lt;br /&gt;PS: I have been always saying "PHP sucks, Python rocks". But looks like its not so true. However good python may be, but when it comes to making sites, PHP has the greatest no. of functionalities available. Python does not even have basic Session support!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-5550079469583054168?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/5550079469583054168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=5550079469583054168' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5550079469583054168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5550079469583054168'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/01/welcome-to-launch-of-iiit-lan-browser.html' title='Welcome to the launch of IIIT LAN Browser 1.0 and FuckProxy 0.2'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-4094186044761709008</id><published>2007-01-11T22:09:00.000+05:30</published><updated>2007-01-11T22:49:01.960+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIITLANBrowser'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='code-snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>How to refresh a page that is not loaded?</title><content type='html'>First of let us understand the heading of my post ;) If a page is already loaded in the browser, there are several methods to refresh it. You will find them all over the internet.&lt;br /&gt;For example, you can use:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&amp;lt;equiv="refresh" content="5"&amp;gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;location.reload(true)&lt;/li&gt;&lt;li&gt;&lt;span nd="7" name="intelliTxt" id="intelliTxt"&gt;&lt;/span&gt;javascript:history.go(0)&lt;/li&gt;&lt;li&gt;etc.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;However, consider a different scenario. I typed the url of a page "A" that requires login. Now the page will redirect you to the login page "B". After you login successfully, you will again be redirected to the actual page that you requested, that is page A. Now your browser knows from its cache, that when you earlier requested page A, it was redirected to page B. So it will now not send a request for page A to server. It will directly load the contents of page B instead! Now browser is doing correct by trying to save network bandwidth and by trying to reduce server load. But in our case its a problem.&lt;br /&gt;Now you will ask this scenario happens in most of the sites and they all work perfectly fine. The reason is that in most of the sites, when they redirect you after successful login, to page A, they change the url of A a little bit. That is mostly you will find that after you login, there will be some sid, or username appended to the url. That concatenation makes this url not same a A and so browser loads it all over again and the site seems to be working fine.(though the site maker has no idea about all this and was just lucky).&lt;br /&gt;But I have a site where the url of page A does not changes. There are some restrictions and the url of Page A has to remain exactly same. So how do I solve the problem? I searched all over net but couldn't find.(though there must be some solution). But right now I am using this method:-&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body onLoad="document.form1.submit();" &amp;gt;&lt;br /&gt;Login successful. You are being redirected to the page requested by you.&lt;br /&gt;&amp;lt;form method="post" action="URL of the page to redirect to" name="form1"&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;Note that the above thing will ask the browser to use POST method. And browser knows that pages fetched with POST method are dynamic and it can't rely on cache. So it won't rely on cache and ask a copy of the page again from the server. Thats it.&lt;br /&gt;&lt;br /&gt;PS: Even if the urls are same,  browser will sometimes fetch the new copy from the server. This is just my observation. Because in my lab, I had no problem with the simple redirection. But I found that at few other places the cache copy was being used. So I had to use the post method. I guess this all depends on browser settings and proxy settings.&lt;br /&gt;&lt;br /&gt;PS: The above problem happened with me with my &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/IIITLANBrowser/"&gt;IIIT LAN Browser&lt;/a&gt; project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-4094186044761709008?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/4094186044761709008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=4094186044761709008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4094186044761709008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4094186044761709008'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/01/how-to-refresh-page-that-is-not-loaded.html' title='How to refresh a page that is not loaded?'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-7945882358520122969</id><published>2007-01-09T03:17:00.000+05:30</published><updated>2007-01-13T04:57:21.404+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='web tools'/><title type='text'>Shell : Its simply awesome man!</title><content type='html'>Linux lovers please don't start patting your back, because the Shell in consideration here is not the Unix shell but the &lt;a href="http://www.squarefree.com/bookmarklets/webdevel.html#shell"&gt;shell javascript bookmarklet&lt;/a&gt; developed by &lt;a href="http://www.squarefree.com/"&gt;Jesse Ruderman&lt;/a&gt;. Man it gives you so much insight into the webpage. You can see the total DOM structure. Though DOM Inspector does the same, but its much more easier to use the command line. And the DOM Inspector won't allow you execute commands,etc. In shell you can live edit your page.&lt;br /&gt;Remember, many times you write a page with a little javascript in a console and then test it in a browser to see if your functions are working or not. Many times you don't even know whether a function exists or not. You use it and then run in browser to see if it works or not. Many times you don't know how a particular function behaves. Man this all can be done very easily in this shell.&lt;br /&gt;&lt;br /&gt;For me the best part is :&lt;br /&gt;I am new to the javascript and DOM,etc. When I code something I don't know which function would work correctly here. So I code with a lot of assumptions in my mind, and then finally when I don't see the expected results I have a tough time debugging it. This shell will now help me in this area.&lt;br /&gt;I am sure if I had known about it before I made the &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy&lt;/a&gt; and &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/IIITLANBrowser/"&gt;IIIT LAN Browser&lt;/a&gt; extensions, then I would have made them in a much more better and efficient way. And in much less time also.&lt;br /&gt;Thank You Jesse Ruderman!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-7945882358520122969?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/7945882358520122969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=7945882358520122969' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7945882358520122969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7945882358520122969'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/01/shell-its-simply-awesome-man.html' title='Shell : Its simply awesome man!'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-2562730516561119328</id><published>2007-01-05T07:54:00.000+05:30</published><updated>2007-01-05T08:02:59.952+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><title type='text'>FuckProxy Update</title><content type='html'>&lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy&lt;/a&gt;  has been updated to work with latest firefox version 2.0.0.1.&lt;br /&gt;I have kept the old version number, so in order to install it, please uninstall the previous version first.&lt;br /&gt;I am thinking of enabling the auto-update option so that firefox automatically looks for updates as it does for other extensions. But that will take time.&lt;br /&gt;Also FuckProxy has been disabled for requests that are from outside IIIT intranet. This has been done to prevent possible misuse of IIIT resources.&lt;br /&gt;&lt;br /&gt;Enjoy!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-2562730516561119328?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/2562730516561119328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=2562730516561119328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2562730516561119328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2562730516561119328'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2007/01/fuckproxy-update.html' title='FuckProxy Update'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-2434925452771258266</id><published>2006-12-20T10:43:00.000+05:30</published><updated>2006-12-20T11:11:44.231+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='code-snippets'/><title type='text'>Calculate nth fibonacci number in O(log(n))</title><content type='html'>I wrote this function that calculates nth fibonacci number in O(log(n)) time complexity and O(log(n)) space complexity. This is helpful when n is very large. You can't calculate nth fib iteratively when n is say 2^31. You need O(log(n))  or better algorithm for that. However the below function can't calculate 2^31th fib because it won't fit into long long. But my point now is to just present the implementation of O(log(n)) algo for small integers. It can be easily adapted to any integer(however large) if you have a &lt;a href="http://www.comp.nus.edu.sg/%7Estevenha/programming/BigInteger.h"&gt;BigInt library&lt;/a&gt;. I will try to write the BigInt version later when I get time.&lt;br /&gt;&lt;br /&gt;The logic behind this algo is explained &lt;a href="http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibFormula.html#exact"&gt;here&lt;/a&gt;. Note that this algo does not use any approximation. Its 100% accurate. The O(1) alogs available for this use approximation and MAY give wrong answers for some value of n.&lt;br /&gt;Note that F(0)=0 and F(1)=1.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;/*&lt;br /&gt; * This function computes the nth fibonacci number in log(n) time and log(n) space complexity.&lt;br /&gt; * This is helpful when we need to calculate fibonacci number where n is very large.&lt;br /&gt; * Note that when n is large, fib(n) won't fit in integer.&lt;br /&gt; * So essentially this function will have to be adapted for bigint.&lt;br /&gt; *&lt;br /&gt; * We assume F(0)=0 and F(1)=1.&lt;br /&gt; *&lt;br /&gt; * Note that this function does not use any approximation. Its 100% accurate.&lt;br /&gt; */&lt;br /&gt;#include&lt;cstdio&gt;&lt;br /&gt;#include&lt;iostream&gt;&lt;br /&gt;#include&lt;cstdlib&gt;&lt;br /&gt;#include&lt;cmath&gt;&lt;br /&gt;#include&lt;algorithm&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;int Fibonacci(int n)&lt;br /&gt;{&lt;br /&gt;    if(n&lt;=1)return n;&lt;br /&gt;    int *nums=NULL,*values=NULL,ret,ctr,a,b,i;&lt;br /&gt;    nums = new int[int(ceil(4*log(n)))+4];&lt;br /&gt;    ctr=0;&lt;br /&gt;    nums[ctr++]=n;&lt;br /&gt;    for(i=0;i&lt;ctr;i++)&lt;br /&gt;    if(nums[i]&gt;1)&lt;br /&gt;    {&lt;br /&gt;        if(nums[i]&amp;1) // if odd&lt;br /&gt;        {&lt;br /&gt;        if(find(nums+i+1,nums+ctr,(nums[i]+1)/2)==nums+ctr)&lt;br /&gt;            nums[ctr++]=(nums[i]+1)/2;&lt;br /&gt;        if(find(nums+i+1,nums+ctr,(nums[i]+1)/2-1)==nums+ctr)&lt;br /&gt;            nums[ctr++]=(nums[i]+1)/2-1;&lt;br /&gt;        }&lt;br /&gt;        else // if even&lt;br /&gt;        {&lt;br /&gt;        if(find(nums+i+1,nums+ctr,nums[i]/2)==nums+ctr)&lt;br /&gt;            nums[ctr++]=nums[i]/2;&lt;br /&gt;        if(find(nums+i+1,nums+ctr,nums[i]/2-1)==nums+ctr)&lt;br /&gt;            nums[ctr++]=nums[i]/2-1;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    values = new int[ctr];&lt;br /&gt;    for(i=ctr-1;i&gt;=0;i--)&lt;br /&gt;    {&lt;br /&gt;    if(nums[i]&lt;=1)values[i]=nums[i];&lt;br /&gt;    else if(nums[i]&amp;1) // if odd&lt;br /&gt;    {&lt;br /&gt;        a=values[find(nums+i+1,nums+ctr,(nums[i]+1)/2)-nums];&lt;br /&gt;        b=values[find(nums+i+1,nums+ctr,(nums[i]+1)/2-1)-nums];&lt;br /&gt;        values[i]=a*a+b*b;&lt;br /&gt;    }&lt;br /&gt;    else // if even&lt;br /&gt;    {&lt;br /&gt;        a=values[find(nums+i+1,nums+ctr,nums[i]/2)-nums];&lt;br /&gt;        b=values[find(nums+i+1,nums+ctr,nums[i]/2-1)-nums];&lt;br /&gt;        values[i]=(2*b+a)*a;&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;    ret = values[0];&lt;br /&gt;    delete nums;&lt;br /&gt;    delete values;&lt;br /&gt;    return ret;&lt;br /&gt;}&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    int n;&lt;br /&gt;    while(scanf(" %d",&amp;n)!=EOF)&lt;br /&gt;    printf("%d\n",Fibonacci(n));&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-2434925452771258266?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/2434925452771258266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=2434925452771258266' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2434925452771258266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2434925452771258266'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/12/calculate-nth-fibonacci-number-in-ologn.html' title='Calculate nth fibonacci number in O(log(n))'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-2764443532069663391</id><published>2006-11-29T23:42:00.000+05:30</published><updated>2006-11-29T23:43:01.257+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Camera-Projector Systems'/><category scheme='http://www.blogger.com/atom/ns#' term='BTP'/><title type='text'>How about a projector without a canvas and on the battered corner of your room?</title><content type='html'>How about a projector which does not need a white canvas or a flat surface to project on?&lt;br /&gt;&lt;br /&gt;I was reading about my BTP(Smart Camera - Projector Systems), and then found this cool application of it. No need to roll down a big white canvas anymore for a theater experience. Just select any part of your wall, or just a curtain, a table cloth or just anything. The surface need not be even flat..., you can even choose corners of your room as a screen..... To know what I am talking about see the pics below:-&lt;br /&gt;&lt;br /&gt;A scruffy corner(yes a corner of a wall!):-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/6946/1885/1600/39917/corner-orginal.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/6946/1885/400/889708/corner-orginal.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Output of a normal projector(notice the effect of choosing a corner as your viewing screen):-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/6946/1885/1600/524223/corner-NormalProjector.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/6946/1885/400/301494/corner-NormalProjector.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Geometry-Corrected output by the smart camera-projector system:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/6946/1885/1600/440189/corner-GeoCorrected.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/6946/1885/400/608284/corner-GeoCorrected.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Geo+color corrected output by smart camera-projector system:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/6946/1885/1600/846496/corner-geo-and-color-corrected.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/6946/1885/400/104781/corner-geo-and-color-corrected.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;For more &lt;a href="http://www.physorg.com/news2790.html"&gt;read this&lt;/a&gt; or this &lt;a href="http://gonzo.uni-weimar.de/%7Ebimber/Pub/SmartProjector.pdf"&gt;research paper(pdf)&lt;/a&gt;.&lt;br /&gt;Here a few more cool pics:-&lt;br /&gt;Projection on a natural stone wall inside a castle vault (click to get a larger view):-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/6946/1885/1600/890125/smart.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/6946/1885/400/120005/smart.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Projection on a checkered curtain:-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/6946/1885/1600/873580/fish.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/6946/1885/400/870353/fish.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Its cool!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-2764443532069663391?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/2764443532069663391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=2764443532069663391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2764443532069663391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2764443532069663391'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/how-about-projector-without-canvas-and.html' title='How about a projector without a canvas and on the battered corner of your room?'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-1637571661410135136</id><published>2006-11-29T06:55:00.000+05:30</published><updated>2006-11-29T07:33:18.342+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Camera-Projector Systems'/><category scheme='http://www.blogger.com/atom/ns#' term='BTP'/><title type='text'>Dynamic Shadow Elimination with Occluder light suppression</title><content type='html'>I read one more &lt;a href="http://www.cs.cmu.edu/%7Erahuls/pub/cvpr2003-shadow-rahuls.pdf"&gt;paper&lt;/a&gt; today by the same &lt;a href="http://www.cs.cmu.edu/%7Erahuls/"&gt;author&lt;/a&gt;. This paper is an advancement of his earlier paper on shadow elimination. The new technique not only eliminates shadows but also removes the light falling on the occluder i.e. the person presenting the slides. This prevents the presenter of the annoying bright light falling on his/her face.&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/wJv6tAB6xTk"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/wJv6tAB6xTk" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;The logic is an advanced version of the one used in simple shadow elimination, explained in my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/dynamic-shadow-elimination-for-multi.html"&gt;earlier post&lt;/a&gt;. The shadow elimination part is same. But now we need to identify which projector's light is being blocked by the presenter and turn off the blocked pixels of that projector. For that the author uses a cyclic check. The author defines a new alpha this time, which is not the same for the corresponding pixels of all the projectors. Its different for each of the projectors.&lt;br /&gt;&lt;span style="font-size:180%;"&gt;da&lt;sub&gt;jt&lt;/sub&gt; = (da&lt;sub&gt;jt&lt;/sub&gt;)&lt;sub&gt;SE&lt;/sub&gt; + (da&lt;sub&gt;jt&lt;/sub&gt;)&lt;sub&gt;LS&lt;/sub&gt;&lt;/span&gt;,&lt;br /&gt;where d stands for the triangle - symbol for delta and a stands for alpha. SE is shadow elimination and LS is light suppression. Delta alpha jt SE is the same old alpha of last post.&lt;br /&gt;&lt;span style="font-size:180%;"&gt;(da&lt;sub&gt;jt&lt;/sub&gt;)&lt;sub&gt;SE&lt;/sub&gt;&lt;/span&gt; =  - y(Z&lt;sub&gt;t&lt;/sub&gt; - Z&lt;sub&gt;o&lt;/sub&gt;),&lt;br /&gt;where y stands for gamma which was choosen as 0.25 by the author. This shadow elimination alpha is same as before. The  new thing is:-&lt;br /&gt;&lt;span style="font-size:180%;"&gt;(da&lt;sub&gt;jt&lt;/sub&gt;)&lt;sub&gt;LS&lt;/sub&gt; = - B(da&lt;sup&gt;2&lt;/sup&gt;&lt;sub&gt;j(t-N)&lt;/sub&gt;)/(dZ&lt;sup&gt;2&lt;/sup&gt;&lt;sub&gt;(t-N)&lt;/sub&gt;+e)&lt;/span&gt;,&lt;br /&gt;where B stands for a beta(a constant) and e for epsilon just added to prevent the denominator from being 0. Now if changing the alpha valus of projector j does not change &lt;span style="font-size:180%;"&gt;Z&lt;/span&gt; i.e. &lt;span style="font-size:180%;"&gt;dZ&lt;/span&gt; is 0, then that projector is being occluded and its alpha should go to 0. so when &lt;span style="font-size:180%;"&gt;dZ&lt;/span&gt; goes 0, denominator becomes very low, so the overall fraction becomes very high and the minus sign leads to subtractiion which makes the alpha near to 0. So thats how Light suppression works. LS has to be done in a cyclic way. Changing alpha LS for the projectors one at a time. For 2 projectors its pretty easy.&lt;br /&gt;Now the author clips &lt;span style="font-size:180%;"&gt;da&lt;sub&gt;jt&lt;/sub&gt; = (da&lt;sub&gt;jt&lt;/sub&gt;)&lt;sub&gt;SE&lt;/sub&gt; + (da&lt;sub&gt;jt&lt;/sub&gt;)&lt;sub&gt;LS&lt;/sub&gt;&lt;/span&gt;, to between 1 and 0 to prevent it from going out of bound.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-1637571661410135136?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/1637571661410135136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=1637571661410135136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1637571661410135136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1637571661410135136'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/dynamic-shadow-elimination-with.html' title='Dynamic Shadow Elimination with Occluder light suppression'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-8824322451579215302</id><published>2006-11-26T23:02:00.000+05:30</published><updated>2006-11-29T05:30:35.145+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Camera-Projector Systems'/><category scheme='http://www.blogger.com/atom/ns#' term='BTP'/><title type='text'>Dynamic Shadow Elimination for Multi-Projector Displays</title><content type='html'>Yes I am posting very frequently nowadays. The reason is I am reading a lot of papers for my BTP. I have to give a presentation soon on Applications of Smart Camera-Projector Systems. A lot of cool things could be developed by combining a camera and a projector. I have already blogged about &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/vision-based-automatic-keystone.html"&gt;Keystone Correction&lt;/a&gt; and &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/vision-based-presentation-control.html"&gt;Presentaion Control using Laser Pointer&lt;/a&gt;. Today I am writing my notes on what I understood about Shadow Elimination using 2 or more projectors by reading this paper:-&lt;br /&gt;&lt;a href="http://www.cs.cmu.edu/%7Erahuls/pub/crltr-2001-04-rahuls.pdf"&gt;Dynamic Shadow Elimination for Multi-Projector Displays&lt;/a&gt; - Compaq Tech Report CRLTR 2001/4.&lt;br /&gt;This video(&lt;a href="http://www.cs.cmu.edu/%7Erahuls/Research/Projector/#shadow"&gt;courtesy this site&lt;/a&gt;) explains the concept nicely:-&lt;br /&gt;&lt;object align="left" height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/nx2nPEVcNw4"&gt;&lt;embed src="http://www.youtube.com/v/nx2nPEVcNw4" type="application/x-shockwave-flash" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt; &lt;blockquote&gt; A major problem with interactive displays based on front-projection is that users cast undesirable shadows on the display surface. This situation is only partially-addressed by mounting a single projector at an extreme angle and pre-warping the projected image to undo keystoning distortions. But shadows can be muted by redundantly illuminating the display surface using multiple projectors, all mounted at different locations, and with the aid of a low resolution camera. The camera could be mounted at extreme angle to the screen.&lt;/blockquote&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/873609/shadow-elimination.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/400/502628/shadow-elimination.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This task is done in three steps:-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Automatic Multi-Projector alignment:&lt;/span&gt; First of all, all the projectors need to be aligned accurately so that they don't form multiple images on the screen (note that 2 projectors are enough for dynamic shadow elimination). For this, the transform for each projector to camera has to be determined. A few reference images are first displayed and their images are taken by camera. Using these, the transforms for each projector is determined by the method described in &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/vision-based-automatic-keystone.html"&gt;my earlier post on keystone correction&lt;/a&gt;. Note that, in keystone correction, there was only 1 projector. But here we have to align more than 1. For this the scaling+translation matrix &lt;span style="font-weight: bold;"&gt;S&lt;/span&gt; is choosen appropriately.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Occlusion detection:&lt;/span&gt; Note that we can only remove penumbral shadows. Umbral shadows i.e. the shadows formed when light from no projector is reaching at a spot could not be removed. Also note that a single occlusion can cause multiple shadows because we have multiple source of lights(projectors).&lt;br /&gt;&lt;br /&gt;The technique used is very simple - &lt;span style="font-style: italic;"&gt;negative feedback&lt;/span&gt;.&lt;br /&gt;First a reference image is created for each slide. For this, each slide is presented and camera takes a few images of it. This is done as an intialization step and no occlusion should be present during this process. Note that this is kind of bad. Before each presentation, the system will create reference images of all the slides, which may take around may be 1 mintue. Also this technique will work only for static slides. Won't work for slides containing animations or videos. I think this concept of reference image is the only glitch in this whole technique of shadow elimination.&lt;br /&gt;So after the initialization step is over, user can start the presentation any time. The camera takes images and calculates the pixel by pixel difference of the current image and its corresponding reference image taken earlier  i.e.  &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;&lt;sub&gt;t&lt;/sub&gt;(x,y) - &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;&lt;sub&gt;0&lt;/sub&gt;(x,y). The difference come out to be negative for pixels correspondig to shadow regions and almost 0 for normal regions. The system then adjust the intensities for the new time step as:-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/340144/eq.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/400/307819/eq.png" alt="" border="0" /&gt;&lt;/a&gt;Alpha is the intensity multiplication factor(0-255). Intially it is set at 256/(no. of projectors). For a 2 projector system, this is 128. Then this alpha is adjusted everytime based on the difference image - negative feedback. Note that this alpha is calculated for all the pixels. For a 2 projector system the value of alpha will change gradually from 128 to 256 for the pixles corresponding to the shadow regions. This perfectly eliminates the shadows. Note that the same alpha is valid for all the projectors and need not be calculated separately for each one. This is because the increase in alpha of the projector being occluded has no effect on the slide,  because that projector is already occluded! The paper author used a value of 0.25 for gamma. He claims this leads to stabilization in around 3 steps for his experiments.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;3. Shadow elimination:&lt;/span&gt; Now this alpha mask i.e the set of pixel differences calculated above needs to be applied to all the projectors. But we calculated this mask in camera frame/domain. We transform this in the original domain using the inverse of &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;, calculation of which I explained in my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/vision-based-automatic-keystone.html"&gt;Keystone correction post&lt;/a&gt;. Now apply this mask and bingo! shadow is eliminated!&lt;br /&gt;&lt;br /&gt;Next I am reading a paper from the same author on Dynamic Shadow Elimination with Occluder light suppression. Note that when a presenter comes in front of a projector, not only he casts a shadow but he/she is also annoyed with the bright light falling on his/her eyes. Occluder light suppression algorithm identifies which projector is being occluded and its corresponding pixels are turned off. So no light falls on the presentor and the shadow is still eliminated using the help of other projector(s). Note that the projector as a whole is not turned off but only the pixels that are under the shadow are turned off.&lt;br /&gt;Watch this video to see it in action(courtesy this site):&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/wJv6tAB6xTk"&gt;&lt;embed src="http://www.youtube.com/v/wJv6tAB6xTk" type="application/x-shockwave-flash" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt; I am not quite impressed with the results in above video. I would prefer simple shadow elimination without the occluded light suppression because the annoying to the presenter is not that important as compared to the artifacts that we see in the above video.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-8824322451579215302?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/8824322451579215302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=8824322451579215302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/8824322451579215302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/8824322451579215302'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/dynamic-shadow-elimination-for-multi.html' title='Dynamic Shadow Elimination for Multi-Projector Displays'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-5783367261146906762</id><published>2006-11-26T15:34:00.000+05:30</published><updated>2006-11-26T17:12:03.555+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Camera-Projector Systems'/><category scheme='http://www.blogger.com/atom/ns#' term='BTP'/><title type='text'>Vision-based Presentation Control</title><content type='html'>Vision-based Presentation Control is another small application for smart camera - projector systems.&lt;br /&gt;&lt;blockquote&gt;Vision-based presentation control frees the speaker from standing beside the computer while delivering a talk. The speaker uses a pointing device (typically a laser pointer) to activate virtual buttons on the projected slide to drive the presentation.&lt;/blockquote&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/312054/caps.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/400/483430/caps.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This one actually uses the same concept being used by the keystone correction that I talked about in my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/vision-based-automatic-keystone.html"&gt;earlier post&lt;/a&gt;. In fact, its much simpler. Just detect the position of the laser pointer in the camera Image &lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; and map it to the original image &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt; using the inverse of transformation &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt; (discussed in my earlier post). Thats it. Once you know the position of laser pointer in the original image, check if its on some button or not and do appropriate actions. The  vision part is this much only. Rest is software, provide different kind of buttons and all.&lt;br /&gt;The &lt;a href="http://www.cs.cmu.edu/%7Erahuls/"&gt;author&lt;/a&gt; of the &lt;a href="http://www.cs.cmu.edu/%7Erahuls/pub/iccv2001-rahuls.pdf"&gt;paper&lt;/a&gt; from where I read this has provided a few extra buttons that makes it easier to go to next and previous slide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-5783367261146906762?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/5783367261146906762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=5783367261146906762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5783367261146906762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5783367261146906762'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/vision-based-presentation-control.html' title='Vision-based Presentation Control'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-7983051807526504307</id><published>2006-11-25T19:19:00.000+05:30</published><updated>2006-11-26T19:11:33.621+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Camera-Projector Systems'/><category scheme='http://www.blogger.com/atom/ns#' term='BTP'/><title type='text'>Vision based automatic keystone correction for projectors</title><content type='html'>As said in my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/got-my-btp.html"&gt;earlier post&lt;/a&gt;, I love my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/got-my-btp.html"&gt;BTP&lt;/a&gt; and have started working on it. I read a paper today:-&lt;br /&gt;&lt;a href="http://www.cs.cmu.edu/%7Erahuls/pub/icmi2000-rahuls.pdf"&gt;Automatic Keystone Correction for Camera-assisted Presentation Interfaces&lt;/a&gt; - &lt;span style="font-style: italic;"&gt;Proceedings of International Conference on Multimodal Interfaces&lt;/span&gt;, 2000.&lt;br /&gt;Its on keystone correction using camera-projector system.&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;UPDATE : The same author wrote a new version of the above paper 1 year later to be presented in another conference. The new paper explains things better:-&lt;br /&gt;&lt;a href="http://www.cs.cmu.edu/%7Erahuls/pub/iccv2001-rahuls.pdf"&gt;Smarter Presentations: Exploiting Homography in Camera-Projector Systems&lt;/a&gt; -      &lt;em&gt;Proceedings of International Conference on Computer Vision&lt;/em&gt;, 2001.&lt;br /&gt;----------------------&lt;br /&gt;&lt;br /&gt;Below are notes on my understanding of the paper.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;Unless the projector is precisely aligned to the presentation screen, the resulting image suffers from perspective (keystone) distortions requiring manual optical or digital correction. For todays mobile LCD projectors, adjusting them manually every time is a tedious task. This method automates this task using the projector - camera combination.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;The following three images (&lt;a href="http://www.cs.cmu.edu/%7Erahuls/Research/Projector/keystone.html"&gt;courtesy this site&lt;/a&gt;) explains this nicely:-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/866815/Slide13.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/200/94031/Slide13.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/424919/Slide12.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/200/992570/Slide12.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/54017/Slide14.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/200/697311/Slide14.jpg" alt="" border="0" /&gt;&lt;/a&gt;PS:  The notes below are for my personal reference. It may not make sense to you.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Vision Based Keystone Correction&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Correcting keystone by pre-warping the image. Uses normal LCD projectors. And low quality(yes very low quality) camera.&lt;br /&gt;&lt;br /&gt;Let &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt; be the orginal Image. &lt;span style="font-weight: bold;"&gt;ProjImg&lt;/span&gt; be the projected image that audience sees and let &lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; is the image seen/recorded by camera.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/418162/keystone.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/400/464073/keystone.png" alt="" border="0" /&gt;&lt;/a&gt;Now we develop techniques to find the &lt;span style="font-weight: bold;"&gt;OrgImg -&gt; CamImg&lt;/span&gt; transformation (&lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;) and &lt;span style="font-weight: bold;"&gt;ProjImg -&gt; CamImg&lt;/span&gt; Transformation (&lt;span style="font-weight: bold;"&gt;C&lt;/span&gt;). Using these two we determine the &lt;span style="font-weight: bold;"&gt;OrgImg -&gt; ProjImg&lt;/span&gt; transformation (&lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;):-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt; x &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;C &lt;/span&gt;x &lt;span style="font-weight: bold;"&gt;ProjImg&lt;/span&gt;&lt;br /&gt;=&gt; &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; x &lt;span style="font-weight: bold;"&gt;ProjImg&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt; x &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt;&lt;br /&gt;=&gt; &lt;span style="font-weight: bold;"&gt;ProjImg&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt;&lt;sup style="font-weight: bold;"&gt;-1&lt;/sup&gt; x &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt; x &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt;&lt;br /&gt;i.e &lt;span style="font-weight: bold;"&gt;P&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt;&lt;sup style="font-weight: bold;"&gt;-1&lt;/sup&gt;&lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So to correct the image we just have to apply &lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;&lt;sup style="font-weight: bold;"&gt;-1&lt;/sup&gt; to the original image, and apply little scaling and translation (&lt;span style="font-weight: bold;"&gt;S&lt;/span&gt;) to make the image form at proper place and inside the projection keystone.&lt;br /&gt;So &lt;span style="font-weight: bold;"&gt;W&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;&lt;sup style="font-weight: bold;"&gt;-1&lt;/sup&gt;&lt;span style="font-weight: bold;"&gt;S&lt;/span&gt; needs to be applied.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Calculating &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;:&lt;/u&gt;&lt;br /&gt;We know that &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;ProjImg&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;) is a perspective transform and so is &lt;span style="font-weight: bold;"&gt;ProjImg&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;C&lt;/span&gt;). But the combination of them, that is &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;) is not. We can represent the transformation from &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;) as:-&lt;br /&gt;&lt;pre&gt;|        (p1X + p2Y + p3)   (p4X + p5Y + p6)&lt;br /&gt;|(x,y) = ---------------- , ----------------&lt;br /&gt;|        (p7X + p8Y + p9)   (p7X + p8Y + p9)&lt;/pre&gt;where &lt;span style="font-weight: bold;"&gt;(x,y)&lt;/span&gt; is a point in &lt;span style="font-weight: bold;"&gt;OrgImg&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;(X,Y)&lt;/span&gt; is a point in &lt;span style="font-weight: bold;"&gt;CamImg&lt;/span&gt;. ( By the way, reverse mapping can also be represented in the same way. ) There are 9 unknowns. But actually only 8  since  &lt;span style="font-weight: bold;"&gt;p1&lt;sup&gt;2&lt;/sup&gt;&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;p2&lt;sup&gt;2&lt;/sup&gt;&lt;/span&gt;+...+&lt;span style="font-weight: bold;"&gt;p9&lt;sup&gt;2&lt;/sup&gt;&lt;/span&gt;=1. I don't know how that constraint came. I understand that since we are dealing with homogeneous co-ordinates, so there are only 8 unknowns. But how did the author of the paper came with that constraint, I don't know(please comment if you know). So 4 points are enough.(Each point provides 2 equations.)&lt;br /&gt;This transformation can be represented as a matrix (&lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;) (using &lt;span style="font-weight: bold;"&gt;2-D&lt;/span&gt; homogeneous co-ordinates):&lt;br /&gt;&lt;pre&gt;|  -          -&lt;br /&gt;|T=| p1 p2 p3 |&lt;br /&gt;|  | p4 p5 p6 |&lt;br /&gt;|  | p7 p8 p9 |&lt;br /&gt;|  -          -&lt;/pre&gt;These unknowns are found using 4 points on the screen during the setup of projector(using some predefined image).&lt;br /&gt;&lt;u&gt;Calculating &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt;:&lt;/u&gt;&lt;br /&gt;The four corners of screen is used to calculate this in a similar manner as done above.&lt;br /&gt;&lt;br /&gt;The picture below explains the result:-&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/798728/keystone2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/400/957034/keystone2.jpg" alt="" border="0" /&gt;&lt;/a&gt;I will be posting more on this as I read more. Got to give a presentation on applications of camera - projector systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-7983051807526504307?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/7983051807526504307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=7983051807526504307' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7983051807526504307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7983051807526504307'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/vision-based-automatic-keystone.html' title='Vision based automatic keystone correction for projectors'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-1577301121495753192</id><published>2006-11-25T15:14:00.000+05:30</published><updated>2006-11-25T15:43:34.170+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><category scheme='http://www.blogger.com/atom/ns#' term='BTP'/><title type='text'>Got my BTP</title><content type='html'>Yesterday I got my BTP under Prof. X inspite of doing absolutely nothing on the hons. project under him for the whole of 5th semester. There were reasons for not working. The combination of me and my partner was not right. Moreover, neither of us was actually interested in the project that we got - SBD. So we ended up doing nothing for the whole sem. But I am very grateful to Prof. X that inspite of all this he believed in us and alloted us BTPs. And yes we have now taken BTPs separately. Hope this concept of single would work out right.&lt;br /&gt;&lt;br /&gt;And yes the BTP that I have got is really cool. It is to explore the various possible applications of Smart Camera - Projector systems and build and demonstrate a few of them. One of the possible cool applications could be:&lt;br /&gt;Project the image of a piano on a table. And press those virtual '&lt;span style="font-style: italic;"&gt;projected keys&lt;/span&gt;'. The attached camera will track your hand movements and instruct the computer to produce the corresponding sounds and tones.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/7133/655383026648108/1600/48753/virtual-laser-keyboard.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/7133/655383026648108/400/243468/virtual-laser-keyboard.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Cool... isn't it? No need to take a 2 m long 50 Kg bulky piano with you. Just take a 6x3x2 inch camera+projector system, attach it to ur laptop and releash the pianist inside you.... at home, on train, on flight, at picnic!!. And yes todays LCD projector + camera systems are of such small dimensions. And mind you THEY ARE POWERFUL.&lt;br /&gt;&lt;br /&gt;I really like this project and won't disappoint Prof. X again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-1577301121495753192?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/1577301121495753192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=1577301121495753192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1577301121495753192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1577301121495753192'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/got-my-btp.html' title='Got my BTP'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-7261790808472225755</id><published>2006-11-07T19:37:00.000+05:30</published><updated>2006-11-07T19:40:32.186+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><title type='text'>FuckProxy project now has a comment page</title><content type='html'>I added this beautiful &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/comments.cgi"&gt;comment page&lt;/a&gt; for the &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy Project&lt;/a&gt;. Please feel free to post your comments, suggestions, bugs there. Your comments are valuable to me.&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-7261790808472225755?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/7261790808472225755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=7261790808472225755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7261790808472225755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7261790808472225755'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/fuckproxy-project-now-has-comment-page.html' title='FuckProxy project now has a comment page'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-1529257616299864432</id><published>2006-11-07T17:47:00.000+05:30</published><updated>2006-11-07T17:50:38.694+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><title type='text'>FuckProxy fucking my exam...</title><content type='html'>Well.. my endsems are getting fucked coz of this FuckProxy project. I am wasting all my time on it instead of reading for the exams. Or may be its the other way around, I am working on it coz I don't want to read the stupid books.  Whatever... the point is that my endsems are getting fucked.&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-1529257616299864432?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/1529257616299864432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=1529257616299864432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1529257616299864432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/1529257616299864432'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/fuckproxy-fucking-my-exam.html' title='FuckProxy fucking my exam...'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-5104869444954235691</id><published>2006-11-06T14:56:00.000+05:30</published><updated>2006-11-06T15:02:45.357+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><title type='text'>TODO list for the FuckProxy Project</title><content type='html'>This is my current TODO list for the FuckProxy project:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;relative urls starting with / in css scripts not working correctly. e.g. google image . Needs to  be corrected.&lt;/li&gt;&lt;li&gt;Need to put FP button in url hbox. Define size etc. for it. make a good image. make a transparent image.&lt;/li&gt;&lt;li&gt;Give options for whether user want the FP button on tool bar.&lt;/li&gt;&lt;li&gt;Add "view this page without fp" and "view link target without fp" to right click context menu.&lt;/li&gt;&lt;li&gt;squirrel mail not working. Don't know why. something has to be done.&lt;/li&gt;&lt;/ol&gt;Exams are on. No time...&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-5104869444954235691?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/5104869444954235691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=5104869444954235691' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5104869444954235691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5104869444954235691'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/todo-list-for-fuckproxy-project.html' title='TODO list for the FuckProxy Project'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-7078128490801168818</id><published>2006-11-06T12:28:00.000+05:30</published><updated>2006-11-08T19:09:45.769+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><title type='text'>Bad News for the FuckProxy Project</title><content type='html'>Well... it seems like &lt;a href="http://iiitnetwork.blogspot.com/2006/11/i-have-improved-says-iiits-internet-hi.html"&gt;IIIT Network is coming back to normal&lt;/a&gt;. That means my whole week effort on this FuckProxy Project is going to be waste. No users for this project now :(&lt;br /&gt;&lt;br /&gt;Anyways, its good that network will be back. Slow speed is making our lives hell. I learned quite a lot while working on this project. Will continue this project if network is not back in time.&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/network" rel="tag"&gt;network&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-7078128490801168818?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/7078128490801168818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=7078128490801168818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7078128490801168818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7078128490801168818'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/bad-news-for-fuckproxy-project.html' title='Bad News for the FuckProxy Project'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-6905480153249628302</id><published>2006-11-06T06:17:00.000+05:30</published><updated>2006-11-06T06:24:44.646+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><title type='text'>Now FuckProxy comes with a cool toolbar button!</title><content type='html'>Yes. I added a "FuckProxy Go" toolbar button just after the go button. This button will take you to the typed url through FuckProxy.&lt;br /&gt;Had to spend 6 hours on it. Wasted my whole night. I am saying wasted because, just in 3 hours I have my endsem exam. And I haven't even started reading. Spent all time for a stupid FuckProxy Button.&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/internet" rel="tag"&gt;internet&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-6905480153249628302?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/6905480153249628302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=6905480153249628302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/6905480153249628302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/6905480153249628302'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/now-fuckproxy-comes-with-cool-toolbar.html' title='Now FuckProxy comes with a cool toolbar button!'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-4793177363119452502</id><published>2006-11-05T12:45:00.000+05:30</published><updated>2006-11-06T06:18:24.362+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><category scheme='http://www.blogger.com/atom/ns#' term='cgi'/><title type='text'>FuckProxy 0.1 Beta is released again!!</title><content type='html'>Yeah... This time FuckProxy is a firefox extension and not a greasemonkey script. So easier installation and easy to use!&lt;br /&gt;So what are you waiting for? Get &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy&lt;/a&gt;.&lt;br /&gt;For those who don't know what is FuckProxy project, here is a brief description:-&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Most of the time IIIT's proxy(204) goes down even when the ISP link is perfect. In such cases internet can be accessed using 200. FuckProxy firefox extension lets you do that by using 200 as a CGI Proxy.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Adds a "View this page with FuckProxy" or "Open Link Target with FuckProxy" option to your Firefox right-click menu, depending on where you click. Also adds a "View with FuckProxy" Button for the address bar.&lt;/span&gt;&lt;p&gt; &lt;/p&gt;There is one more good news:-&lt;br /&gt;I have succeeded in my search for a IIIT system that connects to net without proxy. I am testing it for speed and then I will include it in my project.&lt;br /&gt;Enjoy!!&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/cgi" rel="tag"&gt;cgi&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/internet" rel="tag"&gt;internet&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-4793177363119452502?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/4793177363119452502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=4793177363119452502' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4793177363119452502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4793177363119452502'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/fuckproxy-01-beta-is-released-again.html' title='FuckProxy 0.1 Beta is released again!!'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-4374306028479865957</id><published>2006-11-03T23:15:00.000+05:30</published><updated>2006-11-03T23:58:58.812+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><category scheme='http://www.blogger.com/atom/ns#' term='cgi'/><title type='text'>Finally FuckProxy 0.1 Beta is released!</title><content type='html'>I have been saying in the last 3-4 posts that FuckProxy is almost complete. Well now it is fully complete and I have formally released &lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/"&gt;FuckProxy 0.1 Beta&lt;/a&gt;.&lt;br /&gt;For more on "why and what of FuckProxy?", visit my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/fuckproxy-project-is-coming-out-fine.html"&gt;previous post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I found that most of the time IIIT's proxy(204) goes down even when the ISP link is perfect. In such cases internet can be accessed using 200. This Greasemonkey(&lt;a href="http://greasemonkey.mozdev.org/"&gt;what is Greasemonkey&lt;/a&gt;) script lets u do that by using 200 as a CGI Proxy. &lt;h3&gt;How to install?&lt;/h3&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://www.mozilla.com/en-US/"&gt;Install Firefox&lt;/a&gt; (If you don't have it)&lt;/li&gt;&lt;li&gt;&lt;a href="https://addons.mozilla.org/firefox/748/"&gt;Install Greasemonkey Firefox Extension&lt;/a&gt; (If you don't have it, and restart Firefox)&lt;/li&gt;&lt;li&gt;&lt;a href="http://students.iiit.ac.in/%7Esandeep_kr/cgi-bin/FuckProxy/fuckproxy.user.js"&gt;Install FuckProxy&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; Thats it. Now whenever 204 is down, click on Tools-&gt;Greasemonkey-&gt;User Script Commands-&gt;Enable FuckProxy. And start browsing!&lt;br /&gt;[Note : When you install FuckProxy for the first time, remember to refresh any one of the page. Or open a new tab and type some url.]&lt;br /&gt;&lt;br /&gt;If you want to stop using FuckProxy then click on Tools-&gt;Greasemonkey-&gt;User Script Commands-&gt;Disable FuckProxy.&lt;br /&gt;&lt;br /&gt;Have Fun!!&lt;br /&gt;&lt;br /&gt;PS: Then name FuckProxy was coined by my friend &lt;a href="http://students.iiit.ac.in/%7Ebharatj/"&gt;Bharat Joshi&lt;/a&gt;. Thanks to him for providing me with such a creative name.&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/cgi" rel="tag"&gt;cgi&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/internet" rel="tag"&gt;internet&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-4374306028479865957?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/4374306028479865957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=4374306028479865957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4374306028479865957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4374306028479865957'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/finally-fuckproxy-01-beta-is-released.html' title='Finally FuckProxy 0.1 Beta is released!'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-7881959955377248157</id><published>2006-11-03T18:39:00.000+05:30</published><updated>2006-11-03T19:13:53.306+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='code-snippets'/><title type='text'>Trim, ltrim, rtrim / strip, lstrip, rstrip fucntions for javascript</title><content type='html'>In programming, trim or strip is a string manipulation function or algorithm which removes leading and trailing whitespace from a string. ltrim removes only leading trailing whitespaces and rtrim removes only trailing whitespaces and trim removes both leading and trailing whitespaces.&lt;br /&gt;Trim, ltrim and rtrim are also known as strip, lstrip and rstrip, respectively.&lt;br /&gt;&lt;br /&gt;Javascript does not have its own trim or strip function. But you can define your own. Write the codes given below in your source code and you can use them as you do in other languages. Take care, that these codes should be written in your code before they are called.&lt;br /&gt;&lt;br /&gt;trim:&lt;blockquote&gt;String.prototype.trim = function() {&lt;br /&gt;return this.replace(/^\s*|\s*$/g, "")&lt;br /&gt;}&lt;/blockquote&gt;ltrim:&lt;blockquote&gt;String.prototype.trim = function() {&lt;br /&gt;return this.replace(/^\s*/g, "")&lt;br /&gt;}&lt;/blockquote&gt;rtrim:&lt;blockquote&gt;String.prototype.trim = function() {&lt;br /&gt;return this.replace(/\s*$/g, "")&lt;br /&gt;}&lt;/blockquote&gt;After writing the above codes you can use the functions normally. A few examples are:-&lt;blockquote&gt;trimmed_str=str.trim();&lt;br /&gt;trimmed_str=' someString '.trim();&lt;br /&gt;str=str.ltrim();&lt;br /&gt;str=str1.rtrim() + str2.rtrim();&lt;/blockquote&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/javascript" rel="tag"&gt;javascript&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/programming" rel="tag"&gt;programming&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/code-snippets" rel="tag"&gt;code-snippets&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-7881959955377248157?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/7881959955377248157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=7881959955377248157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7881959955377248157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7881959955377248157'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/trim-ltrim-rtrim-strip-lstrip-rstrip.html' title='Trim, ltrim, rtrim / strip, lstrip, rstrip fucntions for javascript'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-2230198051311180384</id><published>2006-11-03T18:27:00.000+05:30</published><updated>2006-11-03T18:34:45.724+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='bakwas'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><title type='text'>One Alternative down</title><content type='html'>Out of the two alternatives that I came out with in my &lt;a href="http://turbo-technical-report.blogspot.com/2006/11/alternatives-to-fuckproxy.html"&gt;last post&lt;/a&gt;, the second one is down.&lt;br /&gt;I searched for ways to how to change the url just before it is fetched. But could not find satisfying solutions.&lt;br /&gt;But the first option is still alive. In fact, I got a few promising solutions. &lt;a href="http://xhaus.com/alan/python/proxies.html"&gt;This site&lt;/a&gt; lists a few http proxy servers that have been made in python that do not need superuser privileges. The one that I downloaded requires python 2.4 and our 200 is still in the old age of 2.3. So I will have to select some other one. Lets see...&lt;br /&gt;And yes FuckProxy is on its way. Its almost complete.&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/bakwas" rel="tag"&gt;bakwas&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/http" rel="tag"&gt;http&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/internet" rel="tag"&gt;internet&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/python" rel="tag"&gt;python&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-2230198051311180384?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/2230198051311180384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=2230198051311180384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2230198051311180384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/2230198051311180384'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/one-alternative-down.html' title='One Alternative down'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-7870131968916897720</id><published>2006-11-03T14:27:00.000+05:30</published><updated>2006-11-03T14:32:18.726+05:30</updated><title type='text'>Technorati Claim - Ignore this post</title><content type='html'>Wrote this put just to claim my blog on technorati.&lt;br /&gt;Ignore it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.technorati.com/claim/xcds9vfyt3" rel="me"&gt;Technorati Profile&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-7870131968916897720?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/7870131968916897720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=7870131968916897720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7870131968916897720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/7870131968916897720'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/technorati-claim-ignore-this-post.html' title='Technorati Claim - Ignore this post'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-5174203285631709340</id><published>2006-11-03T12:18:00.000+05:30</published><updated>2006-11-03T13:05:21.391+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='bakwas'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><category scheme='http://www.blogger.com/atom/ns#' term='cgi'/><title type='text'>Alternatives to FuckProxy</title><content type='html'>My mind travels faster than speed of light. FuckProxy is not even complete and I have already thought of two more approaches to tackle this same problem. And did I mention that the FuckProxy project is my 6th approach for creating a proxy. Well... none of them was perfect and so I keep trying newer and newer approaches. FuckProxy is a totally new approach that uses greasemonkey. And its almost over. Beta version is just coming.&lt;br /&gt;Well... now the alternatives:-&lt;br /&gt;&lt;br /&gt;1. I heard newer versions of python have some built-in library for creating proxy servers. I could run such a proxy server on 200 and bingo nothing else needs to be done. This is not the proxy that I have been making for so long. This one is not like anonymous proxy, but exactly like the 204 proxy using port 8080. The only possible glitch could be the requirement of superuser privileges. I have not seen yet whether it needs super user privileges or not.&lt;br /&gt;&lt;br /&gt;2. I could make a firefox extension that changes each url just before it is fetched. This will be very easy if I could find how to do it. No more parsing the page source or DOM.&lt;br /&gt;&lt;br /&gt;I have also thought to improve FuckProxy.  I could install my proxy cgi scripts, that is presently on 200, on several other iiit systems that have direct access to internet and my greasemonkey script could use all of them at random to balance the load, enhancing the user experience!&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/cgi" rel="tag"&gt;cgi&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/bakwas" rel="tag"&gt;bakwas&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/internet" rel="tag"&gt;internet&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-5174203285631709340?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/5174203285631709340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=5174203285631709340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5174203285631709340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/5174203285631709340'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/alternatives-to-fuckproxy.html' title='Alternatives to FuckProxy'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-6270624213628450957</id><published>2006-11-03T06:00:00.000+05:30</published><updated>2006-11-03T06:13:19.748+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FuckProxy'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='iiit'/><title type='text'>FuckProxy Project is coming out fine</title><content type='html'>The FuckProxy project is coming out fine. Its almost over.&lt;br /&gt;Its actually a combination of python cgi  + greasemonkey script that lets IIITians to browse net even when 204 is down.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What and why?&lt;/span&gt;&lt;br /&gt;Recently, IIIT Hyderabad appointed stupid system administrators which are unable to manage IIIT's servers properly. It has been observed that 204 (our proxy), goes down frequently even when the ISP link is perfect. So I thought why not create a proxy on our 200 that would allow users to browse net even when 204 is down. Note that 200 connects without proxy(204). So one could easily browse net using 200!&lt;br /&gt;But there is still a problem. 200 itself is so slow that it delivers mail late by 1-2 days sometimes. So, my FuckProxy script gets extremely slow. So, I am searching for some other system in IIIT that connects without 204 and is not slow. Then I will use that machine for my FuckProxy script.&lt;br /&gt;&lt;br /&gt;Another idea that is striking my mind right now is:-&lt;br /&gt;IIITs net connection has gone extremely slow. Again thanks to the stupid sysadmins. I think that if this problem is due to misconfigurations with the proxy server and not due to the ISP link being slow, then I could use my FuckProxy script with some decent IIIT system that connects without proxy to provide better speed!! It would be so good. But first I have to search for such a decent machine. Lets see...&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/FuckProxy" rel="tag"&gt;FuckProxy&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/iiit" rel="tag"&gt;iiit&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/internet" rel="tag"&gt;internet&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-6270624213628450957?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/6270624213628450957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=6270624213628450957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/6270624213628450957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/6270624213628450957'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/fuckproxy-project-is-coming-out-fine.html' title='FuckProxy Project is coming out fine'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-8523775344474670986</id><published>2006-11-02T01:47:00.000+05:30</published><updated>2006-11-02T01:48:43.137+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='cgi'/><title type='text'>Server Side 301, 302 HTTP Response Header Redirect in python</title><content type='html'>Today while working on my FuckProxy project, I got totally frustrated while writing the code for 301 redirect http response header in python.&lt;br /&gt;PHP has this small and easy to use code for it:-&lt;br /&gt;&lt;blockquote&gt;header('HTTP/1.1 301 Moved Permanently');&lt;br /&gt;header('Location: '.$location);&lt;/blockquote&gt;But for python no such function exists. Moreover I spent 2-3 hrs on net searching for it. But there was no exact answer. Finally by several hit-and-trials and using the information collected from net, I could do it:-&lt;br /&gt;&lt;blockquote&gt;print "Status: 301"&lt;br /&gt;print "Location: " + location&lt;br /&gt;print&lt;br /&gt;sys.exit(1)&lt;/blockquote&gt;Of course, you must include sys using "import sys" statement.&lt;br /&gt;For 302 (temporary redirect) just replace 301 to 302 in above code.&lt;br /&gt;Thats it.&lt;br /&gt;Done!!&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/python" rel="tag"&gt;python&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/cgi" rel="tag"&gt;cgi&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/http" rel="tag"&gt;http&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-8523775344474670986?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/8523775344474670986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=8523775344474670986' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/8523775344474670986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/8523775344474670986'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/server-side-301-302-http-response.html' title='Server Side 301, 302 HTTP Response Header Redirect in python'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5368897754301307869.post-4096831520246634931</id><published>2006-11-02T00:50:00.000+05:30</published><updated>2006-11-02T01:00:46.411+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='bakwas'/><title type='text'>Hello World</title><content type='html'>So this is the customary "Hello World" post.&lt;br /&gt;Well.. I have started this blog to maintain personal notes and reports on whatever little technical *bc* I keep doing now and then. My winds keeps wandering in endless regions and sometimes I take some silly idea seriously and start working on it. I need to record all those things for my future reference. I work in bursts and I need some way to recall exactly what I did before and what I was thinking before.&lt;br /&gt;At first I thought to keep this blog private... as it is for my own reference. But then, on a second thought, may be my little *bc* work may be of some help to some wannable geek sitting in some other corner of the world. Also a little extra money through google adsense program never hurts :D&lt;br /&gt;So guys and gals, wish me luck for all my future technical endeavours.&lt;br /&gt;Bye for now.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /&gt;&lt;strong&gt;Technorati: &lt;/strong&gt;&lt;a href="http://www.technorati.com/tag/bakwas" rel="tag"&gt;bakwas&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/personal" rel="tag"&gt;personal&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5368897754301307869-4096831520246634931?l=turbo-technical-report.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://turbo-technical-report.blogspot.com/feeds/4096831520246634931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5368897754301307869&amp;postID=4096831520246634931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4096831520246634931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5368897754301307869/posts/default/4096831520246634931'/><link rel='alternate' type='text/html' href='http://turbo-technical-report.blogspot.com/2006/11/hello-world.html' title='Hello World'/><author><name>Turbo</name><uri>http://www.blogger.com/profile/07259771986819614763</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
