Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Balachandran Sivakumar
Hi, On Wed, Nov 16, 2011 at 11:28 AM, Girish Venkatachalam wrote: > On Wed, Nov 16, 2011 at 11:00 AM, Balachandran Sivakumar > wrote: > > Only that I dunno how to fix it. Are you supposed to say something like: > > "HOST foobar \r\n\r\n" > > or something? > > I am sure it is before the GET right

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Shakthi Kannan
Hi, --- On Wed, Nov 16, 2011 at 10:16 AM, Girish Venkatachalam wrote: | I asked you to send your code. \-- libcurl is quite mature, and I am giving an example to show separation of functions. It can also be used with https URLs. Make sure you have libcurl, libcurl-devel installed on your system.

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Girish Venkatachalam
On Wed, Nov 16, 2011 at 11:00 AM, Balachandran Sivakumar wrote: > Hi, > > On Wed, Nov 16, 2011 at 7:54 AM, Girish Venkatachalam > wrote: >> >> #define HTTP_GET_CMD "GET /%s HTTP 1.1\r\n\r\n" >> > >       Not nitpicking, but I guess that's an RFC violation ;) HTTP 1.1 > says Host header is mandato

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Balachandran Sivakumar
Hi, On Wed, Nov 16, 2011 at 7:54 AM, Girish Venkatachalam wrote: > > #define HTTP_GET_CMD "GET /%s HTTP 1.1\r\n\r\n" > Not nitpicking, but I guess that's an RFC violation ;) HTTP 1.1 says Host header is mandatory. From RFC 2616, : "A client MUST include a Host header field in all HTTP/1.

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Girish Venkatachalam
On Wed, Nov 16, 2011 at 10:07 AM, Shakthi Kannan wrote: > Hi, > > --- On Wed, Nov 16, 2011 at 9:17 AM, Girish Venkatachalam > wrote: > | Okay man. Please send your version. People can choose what they want. > | I did not lose you. I asked you to send your code. > > You lost me there. I was addi

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Shakthi Kannan
Hi, --- On Wed, Nov 16, 2011 at 9:17 AM, Girish Venkatachalam wrote: | Okay man. Please send your version. People can choose what they want. | | I am going to send the same thing in perl and python on subsequent days. | | I will also try to do it using lua with the luasocket library. | | We can't

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Girish Venkatachalam
On Wed, Nov 16, 2011 at 8:27 AM, Shakthi Kannan wrote: > Answering to your reply on dl() function not being too long. It is not > just that. It is a question of being modular. > > Tomorrow, if I want to change the way I connect or download, I only > need to change the function that does that rathe

[Ilugc] Fwd: [chennai.rb] [JOBS] Looking out for 1-2 yrs ruby on rails dev

2011-11-15 Thread Shrinivasan T
-- Forwarded message -- From: "shital" Date: 16 Nov 2011 08:25 Subject: [chennai.rb] [JOBS] Looking out for 1-2 yrs ruby on rails dev To: "chennai.rb" Hi job seekers, I am looking for Ruby On Rails developer (with jQuery experience) having at-least 1 year of experience, for a st

Re: [Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Shakthi Kannan
Hi, --- On Wed, Nov 16, 2011 at 7:54 AM, Girish Venkatachalam wrote: | int | dl(char *url) \-- Answering to your reply on dl() function not being too long. It is not just that. It is a question of being modular. Tomorrow, if I want to change the way I connect or download, I only need to change

Re: [Ilugc] [TIP] C program to download a file using HTTP#include #include #include #include #include #include #include

2011-11-15 Thread Girish Venkatachalam
Please don't reply to this thread. The other one please. Looks horrible in the archive view. It may also crash some people's mail clients. Your points taken. But the dl() function ain't long. -Girish On Wed, Nov 16, 2011 at 8:03 AM, Shakthi Kannan wrote: > Hi, > > --- On Wed, Nov 16, 2011 at 7

Re: [Ilugc] [TIP] C program to download a file using HTTP#include #include #include #include #include #include #include

2011-11-15 Thread Shakthi Kannan
Hi, --- On Wed, Nov 16, 2011 at 7:38 AM, Girish Venkatachalam wrote: |        int c, ret = -1, fd = -1; |        int bytes, off; |        struct hostent *h; |        struct sockaddr_in s; \-- int c = 0; int bytes = 0; int off = 0; struct hostent *h = NULL; --- |        char *p, *p2, host[1024],

[Ilugc] [TIP] C language code to download file using HTTP

2011-11-15 Thread Girish Venkatachalam
Dear boys and girls, Here we have a cool C program to download from the command line. It is self contained and does not take care of URL handling and will fail in some cases but I bet it will work in nearly all of the cases. Now the code is here: $ cat htdl.c #include #include #include #incl

Re: [Ilugc] [TIP] C program to download a file using HTTP#include #include #include #include #include #include #include

2011-11-15 Thread Girish Venkatachalam
Really sorry the subject line got mangled. -Girish On Wed, Nov 16, 2011 at 7:38 AM, Girish Venkatachalam wrote: > Dear boys and girls, > > Here we have a cool C program to download from the command line. > > It is self contained and does not take care of URL handling and will > fail in some > ca

[Ilugc] [TIP] C program to download a file using HTTP#include #include #include #include #include #include #include

2011-11-15 Thread Girish Venkatachalam
Dear boys and girls, Here we have a cool C program to download from the command line. It is self contained and does not take care of URL handling and will fail in some cases but I bet it will work in nearly all of the cases. Now the code is here: $ cat htdl.c #include #include #include #incl

Re: [Ilugc] Fwd: [ILUG-Cochin.org] The 20th IOCCC Competition

2011-11-15 Thread 0
> > This has to be organised by the The worst cretin in this planet under > the son. This is a total insult and disrespect to Dr. Dennis Ritchie > and Mr. Ken Thomson. > > above imho, of course, > Have you ever heard of something called "Anvil Shooting?". It is soo not the way of using an anvil.

Re: [Ilugc] Fwd: [ILUG-Cochin.org] The 20th IOCCC Competition

2011-11-15 Thread Sarma Tangirala
On 15 Nov 2011 23:06, "Rajagopal Swaminathan" wrote: > > Greetings, > > > On Tue, Nov 15, 2011 at 10:50 PM, Ashok Gautham > wrote: > > On Tue, Nov 15, 2011 at 09:51:33PM +0530, Rajagopal Swaminathan wrote: > > Why? Writing obfuscated code is an art too. Look at the previous > > entries. It is bea

Re: [Ilugc] Fwd: [ILUG-Cochin.org] The 20th IOCCC Competition

2011-11-15 Thread Rajagopal Swaminathan
Greetings, On Tue, Nov 15, 2011 at 10:50 PM, Ashok Gautham wrote: > On Tue, Nov 15, 2011 at 09:51:33PM +0530, Rajagopal Swaminathan wrote: > Why? Writing obfuscated code is an art too. Look at the previous > entries. It is beautiful. Perl Golfing has been around for ages. Is > Larry Wall angry?

Re: [Ilugc] Fwd: [ILUG-Cochin.org] The 20th IOCCC Competition

2011-11-15 Thread Ashok Gautham
On Tue, Nov 15, 2011 at 09:51:33PM +0530, Rajagopal Swaminathan wrote: > Greetings, > This has to be organised by the The worst cretin in this planet under > the son. This is a total insult and disrespect to Dr. Dennis Ritchie > and Mr. Ken Thomson. Why? Writing obfuscated code is an art too. Look

Re: [Ilugc] Fwd: [ILUG-Cochin.org] The 20th IOCCC Competition

2011-11-15 Thread Rajagopal Swaminathan
Greetings, On Tue, Nov 15, 2011 at 9:35 PM, Shrinivasan T wrote: > -- Forwarded message -- > >  The International Obfuscated C Code Contest (abbreviated IOCCC) is a > programming contest for the most creatively obfuscated C > code. This has to be organised

[Ilugc] Fwd: [ILUG-Cochin.org] The 20th IOCCC Competition

2011-11-15 Thread Shrinivasan T
-- Forwarded message -- From: "aravind vijayan" Date: 15 Nov 2011 20:32 Subject: [ILUG-Cochin.org] The 20th IOCCC Competition To: The International Obfuscated C Code Contest (abbreviated IOCCC) is a programming contest for the most creatively obfuscated C

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread technocraze
On 11/15/2011 6:32 PM, 0 wrote: > > As far as development goes, I personally do not like the idea of a > consumer operating system developed by the government. For a simple > reason that the vested interest lies is National Security which could > curb our liberty at a later point. However, this opi

[Ilugc] NIC Deploys Open Source Software For e-Gov Projects

2011-11-15 Thread Diksha Gupta
National Informatics Centre (NIC) has chosen and deployed the open source Eucalyptus Infrastructure-as-a-Service (IaaS) software in the e-governance cloud project in India. With this, NIC aims to deliver the power of modern information technology (IT) to remote districts and villages throughout t

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread 0
> > Please elaborate on "community involvement" - development contrib, > support or PR? > In short, the answer is, As much as possible. Of course, thats just my opinion. If you look at the forums for BOSS, http://forums.bosslinux.in/ , the last post was on Jul 09 2011. It seems to be pretty de

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread pavithran
On 15 November 2011 12:33, Srinivasan Sundararajan wrote: > NRCFOSS/CDAC/BOSS is planning a mini workshop with about 20-30 participants > from engg colleges (staff/students) and ILUG membes -- to discuss about > BOSS community portal, maintenance, participation by members for FOSS/BOSS > support,

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread pavithran
On 15 November 2011 16:12, technocraze wrote: > Is there any plans to release BOSS CD free of cost (or at some nominal > cost), to the students, just like Ubuntu does?   This is one of the way > where we can popularise our local version of linux, and build an > ecosystem out of it. Guess you miss

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread technocraze
On 11/15/2011 12:33 PM, Srinivasan Sundararajan wrote: > On Tue, Nov 15, 2011 at 1:13 AM, pavithran wrote: > > NRCFOSS/CDAC/BOSS is planning a mini workshop with about 20-30 participants > from engg colleges (staff/students) and ILUG membes -- to discuss about > BOSS community portal, maintenance,

Re: [Ilugc] download from the terminal(curl,wget,lftp,lynx)

2011-11-15 Thread Girish Venkatachalam
On Tue, Nov 15, 2011 at 10:30 AM, Balachandran Sivakumar wrote: > Hi, > > On Tue, Nov 15, 2011 at 10:21 AM, Girish Venkatachalam > wrote: > >> even one of those popular commands like grep you ought to remember the >> appropriate switch. >> > >       Or install manpages and be happy for the rest o

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread Arun Khan
On Tue, Nov 15, 2011 at 1:53 PM, 0 <0...@0throot.com> wrote: >> NRCFOSS/CDAC/BOSS is planning a mini workshop with about 20-30 participants >> from engg colleges (staff/students) and ILUG membes -- to discuss about >> BOSS community portal, maintenance, participation by members for FOSS/BOSS >> sup

Re: [Ilugc] download from the terminal(curl,wget,lftp,lynx)

2011-11-15 Thread Girish Venkatachalam
Hmm right but only if you are in the same directory. ;) On Tue, Nov 15, 2011 at 11:29 AM, prasannatsmkumar wrote: > wget -c "url" is the one i use always.. If the download stops in mid way > this command will continue from where it stopped. > > e.g., I accidentally closed Firefox yesterday while

Re: [Ilugc] download from the terminal(curl,wget,lftp,lynx)

2011-11-15 Thread Girish Venkatachalam
On Tue, Nov 15, 2011 at 2:54 PM, Kumara Guru wrote: > On Tue, Nov 15, 2011 at 10:21 AM, Girish Venkatachalam > wrote: >> This is not just a simple tip. This is a tip cluster so to speak. >> > > To make these emails easier to find later, please use a [TIP] tag in > the subject. > I already have s

[Ilugc] Google Releases Honeycomb Code!

2011-11-15 Thread Swapnil Bhartiya
While everyone is talking about Android 4.0 code, what is worth mentioning is that Google has also released source code of Honeycomb as well. Despite Google's repeated clarification that holding back Honeycomb code was not intended to make it close source but to stop OEMs from starting to put

Re: [Ilugc] download from the terminal(curl,wget,lftp,lynx)

2011-11-15 Thread Kumara Guru
On Tue, Nov 15, 2011 at 10:21 AM, Girish Venkatachalam wrote: > This is not just a simple tip. This is a tip cluster so to speak. > To make these emails easier to find later, please use a [TIP] tag in the subject. Thanks, Kumaraguru ___ ILUGC Mailing

Re: [Ilugc] BOSS Wins Over Windows In Tamil Nadu

2011-11-15 Thread 0
> NRCFOSS/CDAC/BOSS is planning a mini workshop with about 20-30 participants > from engg colleges (staff/students) and ILUG membes -- to discuss about > BOSS community portal, maintenance, participation by members for FOSS/BOSS > support, etc., > > Since exams are on, am checking up with them to f