@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31



Comments:

<0> hobbs: Ah, I didn't know that.
<1> mjl69: Hrmm. It's an idea. Random dungeons? Nah, random regexps.
<2> something like this yes? print $query->header(-type => "application/octet-stream", -attachment => "endnote-$PMID.txt");
<3> cvill64: very vaguely like that
<0> cvill64: Yes, something like that.
<4> dabreegster: I think it could be fun. I accidently started a game of it once with a bot that gave karma if you said something that matched his regexp.
<5> 0x0d is \r is it not?
<2> so I have to tie the STDOUT to $query and then it will write STDOUT as an attachment then?
<1> cvill64: Listen. You said you don't want to generate a text file. You're sending data directly back to the browser. You don't need a filename.
<3> cvill64: no. What are you smoking?
<2> I want it to create the text docuemtn, I don't want the text docuemtn to be saved, I'm pretty sure that's what I said earlier....
<3> cvill64: uh huh, and?
<0> cvill64: Do you know what STDOUT is?
<0> cvill64: Do you know what `print "foo"` does by default in a CGI script?
<2> a way to write text to user



<3> cvill64: what in the world gave you the idea that "tie the STDOUT to $query" is something that even makes _sense_, let alone is necessary?
<2> printer foo to the broswer
<6> eval: package g;sub new{bless{}}sub meth{print"yay - ".$_[0]}package main;my $m = "meth"; my $o = new g; my $arg = rand; $o->$m($arg)
<7> encryptio: yay - g=HASH(0x842ea54) 1
<6> eval: package g;sub new{bless{}}sub meth{print"yay - ".$_[0]}package main;my $m = "meth"; my $o = new g; my $arg = rand; $m $o $arg
<7> Scalar found where operator expected at eval line 1, near "$m $o" (Missing operator before $o?) Scalar found where operator expected at eval line 1, near "$o $arg" (Missing operator before $arg?) en
<3> cvill64: you just use "print".
<0> cvill64: Please do some research on STDOUT.
<3> cvill64: which is another thing that I've said about a dozen times in the past half hour.
<0> hobbs: It's a whole new paradigm! :-o
<2> hobbs: yes, I've read everything you said, and then more questions come and I answer them
<3> but maybe on the seventeenth time, you'll say "oh, you meant... (thing you just said seventeen times?)" and I'll say "yes."
<2> I'm not ignoring your information, trust me on that
<3> cvill64: You're indistinguishable from someone who is ignoring me ;)
<2> well...when I get told Header compisition, STDOUT, and print all from people, I try and figure out which one is going to work for what I need
<0> You need to try and better understand the basics of the CGI module, Perl I/O and perlfunc -f print.
<0> I don't mean to be rude, but it doesn't sound like you understand any of those.
<0> In particular how to use the CGI module.
<2> I try and learn what to know for what I'm trying to do, sorry that I don't know everything it can do yet
<2> I had to learn everything about perl/xml to get one thing to work
<2> now I have to learn how to do this so I can offer the infromation back to the usre after its added to the db
<0> Not knowing is perfectly alright. What is not alright is not listening when people are trying to help you.
<0> I don't mean you were deliberately doing that; maybe you didn't understand.
<0> At any rate, there's no point in going over it again.
<2> Aankhen``: I am listening, but three people told me different things and then contradicted each other....
<0> I believe hobbs explained it quite clearly.
<8> all three people told you the same thing
<2> you did?
<2> wow....sorry, they all looked different
<3> cvill64: not since you started giving a different story every time you were asked what you were doing
<2> or maybe they looked like parts
<3> cvill64: since then everyone's been telling you the same thing. repeatedly and constantly.
<3> s/started/stopped/
<2> this is what I asked at very first: does anybody know how one would write a .txt document on the fly and offer it for download to the user w/o changing pages? the script is connected to a database and all the correct information is in individual varialbes w/in an array
<3> cvill64: yes, which is nothing like what you're actually doing
<6> writing a file is not the same thing as writing it directly to the user.
<2> perhaps I'm just not clear enough with my questions yet, I try and keep getting better with what I ask when I get here so that the questions are smarter rather than dumber
<8> except as we mentioned there is no need to write to a file
<9> where can i get some perl sdl help??
<2> okay....but I don't want it to print to the user, I want it printed to the document and then offered as d/l .... I guess that's not the same/different
<3> cvill64: NO YOU DON'T WANT THAT
<3> cvill64: have you BEEN HERE at ANY TIME in the past half hour?
<2> Khisanth: yes, if there is not need to write a file to offer something to d/l to the user, that's fine
<0> hobbs: I just laughed out loud.
<2> yes, I've been here
<8> well it depends on what your definition of "here" is
<10> #perl needs a good dose of the Postel Principle
<3> cvill64: you do not ****ing want to "print to a document" and "offer" something.
<3> cvill64: you DO want to print it to the user.
<3> cvill64: and there is no spoon... file.
<2> okay, then when you say "print to the user" are you talking about printing the information in the brower or as a file to ther user?
<4> cvill64: so you are trying to generate files on-the-fly for download by users?
<3> cvill64: say that again in english
<2> mjl69: I thought so...
<2> hobbs: what part of the question is not clear?
<3> cvill64: the nonsense phrases in the middle of it
<3> cvill64: like "as a file to ther user"
<4> cvill64: what is the content of the file? binary, text?
<10> cvill64: you just output the appropriate HTTP headers, then output the appropriate data. The End.
<2> mjl69: text.txt



<8> the browser will know what to do with it
<2> when yo usay "print to the user" do you mean a: have the information displayed in the broswer webpage to just read or b: what PerlJam is saying in that it will "export" a file to the user?
<4> cvill64: could you just present the text in a web page and the user could select "save" from their browser menu?
<3> cvill64: CONTENT. DISPOSITION. DOWNLOAD. BOX. SAVE.
<2> mjl69: I just would like it to be d/led by the user, to make it easier
<4> cvill64: will each user get their own personalized file content or will it be the same download for everyone?
<2> it will be the same, I just don't want the server to have to store the information again in text docuements as the mysql db already has it, just not formatted correctly
<10> hobbs: Clearly there is a communication problem. as such, yelling does no more good here as it does when trying to communicate to someone who doesn't speak your language/
<10> NO HABLO SPANISH. DO YOU UNDERSTAND?
<10> que?
<10> It just doesn't work.
<8> having multiple people that come in the middle of what is happening doesn't help ;)
<4> cvill64: I think I get it. You want to present database content to the user in the form of a text file which the user can click on a link and download. The text could come from one of many records in the database, but the downloadable file should be the same?
<10> sure it does.
<2> hablo espanol :P
<10> It adds to the "fun" :)
<3> PerlJam: Cllate la boca
<11> Then change the content-type of the header you return from default text/html to text/cvs or whatever?
<10> collate my mouth? (that's what it looks like on my terminal)
<3> mjl69: look, he has a text. He knows how to generate it. What it is is irrelevant.
<2> PerlJam: he's saying to "shut up" :P
<3> mjl69: all he needs is one line of code that we gave him half an hour ago :)
<4> cvill64: there could be trouble if more than one person is using the website at the same time. maybe you could lock the file while a user is downloading it.
<10> cvill64: I understood his meaning fine. It's his text that doesn't look right.
<3> mjl69: and an understanding of what his actual problem is :)
<10> cvill64: I gues that means I SHOULD START SHOUTING SO THAT I CAN COMMUNICATE BETTER
<3> PerlJam: get with the utf-8 program? :)
<1> PerlJam: Well, I can hear you better now. :)
<2> mjl69: no, the format is the same, the information changes for each record
<2> hobbs: what is the one line of code you gave me?
<2> I'm looking for it....
<8> print for @array;
<10> hobbs: my terminal claims it's utf-8
<3> cvill64: print qq{Content-disposition: attachment;filename="beesknees.txt"}
<2> okay, now I see too commands, print for @data and print qq
<3> cvill64: congratulations, you have eyes!
<12> hobbs: no that would be if I wasn't so lazy
<10> cvill64: Ignore everyone but hobbs. Even though he's slightly ascerbic, he is trying to help :)
<3> doctormo: writing the program would have been less work than bothering people on IRC :)
<2> hobbs: I see two commands, and you said I had to add only one, that's why I stated that
<3> cvill64: you might notice that I only wrote one of them
<12> hobbs: only from a typing perspective, from a think obout it perspective since I have no idea what your going on about with HTML::Twig (wreched thing) I would have to spend far more time digging through documents.
<3> doctormo: I didn't say anything about HTML::Twig. You were saying something incoherent about it, though.
<2> okay, so I striped everything but the following posted
<4> push @array, "</pre>";reverse @array; push @array, "<pre>"; reverse @array; print for @array;
<8> HTML::Twig doesn't even exists!
<12> hobbs: oh then I don't know what those 3 lines of code are.
<13> "cvill64" at 128.173.100.104 pasted "redone" (76 lines, 2.3K) at http://sial.org/pbot/18894
<4> not tested
<12> Khisanth: you are correct I meant XML::Twig
<8> ah useful module
<2> doctormo: I suggessted XML::Twig earlier...not hobbs
<8> had to use it to convert pan's tasks.xml to nzb format
<2> hobbs: I'm ***uming to get rid of the print OUT statements
<3> cvill64: um
<3> cvill64: You know what, I give up. You're still trying to deliver MULTIPLE files at once
<2> no, just one file
<14> I have an addition to the perlop page. Is there anyplace where I can add it?
<2> I forgot to take out the extra print OUT statements
<3> cvill64: no, multiple
<15> GumbyBRAIN: ping
<16> Purl, ping me.
<3> cvill64: read your own program please.
<8> cvill64: the print qq{Content-disposition: attachment;filename="endnote-$PMID.txt"} should only happen ONCE in the entire program
<8> it should also come BEFORE any of the data is printed
<3> Khisanth: but he's giving $PMID its value in a while loop
<3> Khisanth: it's not just a placement error, it's a logic error.
<8> the PMID sent as part of the query so there is no need for the loop
<8> I have no idea why he is reading from <> though
<3> heh... actually now that I look at it
<3> that's probably one of the reasons the script originally failed to work
<2> the while loop was just to get the information of the record that matched with the pmid number


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

sli on master and sli on slave
1064(You have an error in your SQL syntax; check the manual that corresponds to
debian etch kernel raid=part
#fluxbox
boot-admin ubuntu
loop-aes suspend2
offline files ubuntu
gentoo nox
#math
opensuse 10.2 pptpconfig



Home  |  disclaimer  |  contact  |  submit quotes