| |
| |
| |
|
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 32 33 34 35 36 37 38
Comments:
<0> heng: read the coping with scoping article it will help you, basically you can't redefine $this without a little trickery <1> you should also note, inside [] . means . (the thing on the end of sentences outside irc) <2> http://sial.org/pbot/16498 <1> and * means * <2> someone with SQL skills look at that <0> heng: once you've created the handler that is <3> heng: if $this is a lexical (my) variable and you don't change it in the scope, then the sub will know about it automatically: the sub becomes a closure on it <2> how do you express "if setA, use setA, otherwise use setB" in SQL? <4> is there a way to display a bitmap from memory in win32::gui? <1> sili, you could just do a union, I suppose. If setA turns up empty there'll be nothing on top :) <1> thats ***uming both sets return the same rowtypes <2> Shadda: that'll **** up if setA has data <2> you'll set the union of A and B <2> heh. <5> b_jonas: thanks, one more Q on the snippet from oreilly perl cookbook : in my handler which registered with SIG{CHLD}, I got something like : $SIG{CHLD}=sub {my $this = shift; $this->handler}; sub handler {my $shift; $SIG{CHLD}=\&handler; } I doubt the $SIG{CHLD} = \&handler should be changed to $SIG{CHLD} = sub {$this->handler} in the method handler ? <6> heng: what is that code supposed to do?
<1> sili, coalesce might do it <1> select * from coalesce((query1), (query2)); <7> What is the difference between `` and $() anyway? <4> Hello, how do I display a bitmap from memory using cygwin and win32::gui? <6> Juerd: $() supports easy nesting <2> Shadda: <2> ERROR: more than one row returned by a subquery used as an expression <2> stop making things up <1> sili, pff, never. <2> hah <7> mauke: Right, but otherwise? <1> when a man can't mutter things in his half sleep to a channel full of people, he is not a man. <6> I don't think there's a difference <7> sili: <insert standard "this isn't an sql channel" response> <8> eval: $_ = '612125552424'; /^(?:6(\d+)|011(\d+))$/; return $1; <9> x86: Return: 12125552424 <8> wtf is this things problem then <8> eval: $_ = '01112125552424'; /^(?:6(\d+)|011(\d+))$/; return $1; <9> x86: Return: <2> Juerd: eat it <8> any ideas anyone? <10> sili: off the top of my head.. maybe something like select 1 as set, foo from bar union select 2 as set, baz from blah; and wrap the entire thing in another select something like select foo from (.. union ..) where set == max(set); <6> x86: what kind of ideas? <10> s/max/min/ <8> mauke: as to why this regex isnt working as i want ;) <6> x86: because you're doing it wrong, probably <6> I have no idea what you want <11> x86: it is working <11> x86: check $2 <1> Paladin, you can't have aggregates in the WHERE clause <8> encryptio: err, but shouldnt that | in there make a new $1 ? <7> sili: :P <11> x86: iirc, no <6> x86: | doesn't care about captures <8> eval: $_ = '01112125552424'; /^(?:6(\d+)|011(\d+))$/; return $2; <9> x86: Return: 12125552424 <8> i'll be damn <11> =) <12> x86: /^(?:6|011)(\d+)$/ <12> now it's always in $1 :p <8> Botje++ :) <11> eval: $_ = '01112125552424'; /^(?:6(\d+)|011(\d+))$/; return $^N; <9> encryptio: Return: 12125552424 <11> eval: $_ = '642138749'; /^(?:6(\d+)|011(\d+))$/; return $^N; <9> encryptio: Return: 42138749 <11> woot <13> Is this the blessed method in perl to change foo into bar writing to the same file?: open(FILE,"+<$file"); while (<FILE>) { s/foo/bar/; print FILE;} Will this DWIM with respect to non-clobber and so on? <11> Botje's is better tho. <14> ] <10> duncanh: no.. 2 files.. IN and OUT <6> duncanh: that looks bad, and it won't work <3> heng: the difference is, $SIG{FOO} = sub { $this->handler } asks to call the handler method on the $this object, <11> duncanh: no, you have one pointer for read and write. open out to another file, and move (rename()) it to your original name (this also has the advantage of being atomic) <10> duncanh: or something like Tie::File <13> ok, understand. can you give me an example of when +< should be used? <3> while $SIG{FOO} = \&handler is similar to $SIG{FOO} = sub { handler() } which asks to call the handler function without arguments <3> \&{$this->handler} just doesn't make much sense <15> hi <16> is there a way to print() to a scalar? or store print() output to be retrieved? <15> what is the Tk version of VBs onload event? <6> Hawkaloogie: yes, but why use print in the first place?
<17> Hawkaloogie: yes, you can open a reference to a scalar <11> Hawkaloogie: yes. $scalar = "foo" <11> $scalar .= "my new stuff" <3> if you need to call the method on a ceratian object, you want sub { $this->handler } <18> Hawkaloogie: What are you trying to do? print() takes a list, and so does =. <16> mauke, the idea is to allow users of the module to select() whatever filehandle they want, and in this case i need to return the printed output <6> ah <3> Hawkaloogie: you stringify a scalar by concatenating with the empty string, like $string = "" . $scalar <6> Hawkaloogie: sounds like a weird interface <17> Hawkaloogie: open my $fh, ">", \$scalar; print $fh "foo"; <-- writes to $scalar. But it is kinda weird. <3> that's what print does when you print a scalar, except that it adds $\ when it's set (not by default) and stuff with encodings etc <15> how do I call a sub when a TK window is loaded? <18> Hawkaloogie: I think I would treat returning a scalar as a special case and not a form of print. <16> it's a weird situation, one I didn't intend, and it would be possible to modify the interface to allow for returning, but then it complicates the modules <16> Yaakov, the sub that will return calls another sub that will print <18> Hawkaloogie: Sometimes, generalization is not a good thing. <19> Yaakov: btf i finnaly realy solved my problem,downgrading perl did the trick <20> Hawkaloogie: beware the hobgoblin of foolish consistency. <3> also when you p*** multiple arguments to print, then they're concatenated with $, which is again unset by default. but that's all the formatting print does <18> mc__: Good to hear, but weird. <21> Heh... surprising the amount of breakage one can cause by forgetting a single "+" in a large perl regexp. <19> Yaakov yeah vreally strange <18> Hawkaloogie: I _think_ PerlJam just called you small-minded! <20> LeoNerd: If you use the /x modifier, you can comment your large regular expression. <3> oh, I see, so you want to print by default and capture the output? yes, there's a way to do that <18> LeoNerd: That's why I keep my regexes under 1000 lines! <21> Oh yes... But this is just a onetime throwaway script... <3> with stringstreams, see perlfunc -f open <20> LeoNerd: makeshifts last the longest. <18> Hawkaloogie: It might be called for to back up and fix the previous level that caused the problem rather than work around it. As you said, you didn't intend it. <3> lol, <19> im installing Net::Jabber with cpan(install Net::Jabber) an it hangs no for 15 minutes "t/tcpip2ssl.....ok 1/3" shall i wait or might that be a problem? <3> the longest regex I've seen was about 20 lines <15> any TK gurus? how do I call a sub when a TK window is loaded? <2> Juerd: everyone knows that perl folk know everything. <2> i'd say they're the most well-rounded coders i've encountered. <16> b_jonas, thanks, that should work <7> sili: I know; you know; and it just had to be said. <22> good evening all <2> Juerd: right <2> integral: GOOD AFTERNOON <23> hi, this is heng , actually, for some reason, My former connection is ghost under nick heng so I have to change the nick to hengha :-) <23> mauke: still there ? :-) <22> hengha: no, it's not... <23> integral: what ? :_0 <23> :-0 <22> I wasn't meaning mauke. <19> Yaakov: what do you think? <15> any TK gurus? how do I call a sub when a TK window is loaded? <23> anyway, hehe. I dont quite understand why it put SIG{CHLD} handler inside itself here, here is the url of the code : http://www.unix.org.ua/orelly/perl/cookbook/ch17_13.htm and the sub has that is called : sub REAPER. you mind taking a look ? :_) <22> hengha: DO NOT POST THE URL OF AN ILLEGAL COPY OF A BOOK HERE. <22> hengha: do you know about zombies? <3> well in fact I've written a 16 line long regexp once but it's all very short lines <19> perlboyUK aks in #tcl <3> in http://www.math.bme.hu/~ambrus/pu/cgrep <15> thank you mc__ <12> send a mail to o'reilly? :p <22> PerlJam: try it! <23> integral: o, sorry for that, sorry <22> alternatively ask O'Reilly to sue google for caching the contents of those pages and linking to them? :-P <14> integral: how do you know that book is illetal? <22> kilohurt: ... <12> every book can be lethal <23> integral: zombies are the process whose parent process got killed but himself didnt wipe out in the process table in the OS, am I right ? :-) <22> hengha: not quite <20> Botje: I and others have already talked to O'Reilly. There isn't too much they can do. <12> if accelerated to sufficiently high velocities <14> integral: haha nevermind <24> wrong <23> integral: please, which part I missed ? :-) <22> hengha: when a process exits, it has an exit status, and that is stored in the process table. Someone has to remove that entry from the process table; this is "reaping" and it is the parent processes reponsbility <18> mc__: I don't know. I would probably interrupt it and force install.
Return to
#perl or Go to some related
logs:
gtk2-theme-switch emerge GLXUnsupportedPrivateRequest motherboard convert a 10 digit -zip -ISBN -telephone
#perl ebcd raid php.info exploit #math pretty print with PHP yast kbfx #osdev
|
|