IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.66 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-29
[01:15]<gjrvcxnne>an infinite loop?
[01:15]<aucr>yeah
[01:15]<aucr>private void mystuff() { // calls thread here; // waits for it to finish; // calls itself again mystuff(); }
[01:16]<aucr>so infinite :D
[01:16]<gjrvcxnne>eh?
[01:16]<aucr>ill post code
[01:16]<gjrvcxnne>yeah
[01:16]<aucr>pretty simple
[01:16]<gjrvcxnne>your work should b e done in the DoWork event, where you can check if there is a cancellation pending
[01:17]<as_>you dont need to put a loop in the thread function?
[01:17]<aucr>it is
[01:17]<aucr>GoatCheez^
[01:18]<aucr>http://rafb.net/paste/results/Vb2FOf27.html
[01:18]<gjrvcxnne>you shouldn't recursively call pingbox like that
[01:19]<aucr>ok
[01:19]<aucr>didnt wanna use a timer
[01:19]<aucr>so i did that
[01:19]<gjrvcxnne>you don't have to use a timer either
[01:19]<aucr>ok cool
[01:20]<gjrvcxnne>try encompasing all of the ping function in a while (!this.CancellationPending) {}
[01:20]<gjrvcxnne>errr no
[01:20]<gjrvcxnne>i misread
[01:21]<gjrvcxnne>don't do that it won't even compile
[01:21]<gjrvcxnne>lol
[01:21]<aucr>lol
[01:21]<slzygc>if I want to create a array of 4 charactors I do char[] bah = new char[4]; correct?
[01:21]<aucr>yeah
[01:22]<aucr>char[n], n = number :P, dont have to do n-1 for index at 0, it just takes the n
[01:22]<gjrvcxnne>ok, jukg: put everything else in the pingbox function into the while loop you have
[01:22]<kjr>jukg: yes, size != index
[01:22]<gjrvcxnne>but don't call pingbox again
[01:22]<aucr>ok
[01:22]<slzygc>then to convert that to a string I could do Convert.ToString(bah);
[01:22]<gjrvcxnne>err shit
[01:22]<aucr>ill try that
[01:23]<gjrvcxnne>well, you are going to have to do a couple things
[01:23]<aucr>well see how i update the textbox
[01:23]<aucr>gotta do that...
[01:23]<gjrvcxnne>modify pingbox so that it does what you want to do without calling itself multiple times
[01:23]<edjg>So I started my port of bsdiff to C# about 20 minutes ago.
[01:23]<edjg>My progress so far: a class definition
[01:23]<edjg>:S
[01:24]<rxrcr>heh
[01:24]<edjg>I am NOT looking forward this
[01:24]<edjg>to this*
[01:24]<rxrcr>I ported a simple RC4 implementation to C#.. wasn't too bad
[01:24]<edjg>the code I am porting is a complete mess
[01:24]<kjr>chaka: the infamous 4 line perl function?
[01:25]<aucr>ok this while works fine
[01:25]<aucr>now what
[01:25]<rxrcr>Kog, not quite :)
[01:25]<aucr>after the while, gotta clean up thread i guess?
[01:25]<gjrvcxnne>jukg: the code needs a bit of work...
[01:25]<slzygc>how do you convert a char arrary to a string?
[01:25]<gjrvcxnne>jukg: i'm not clear on what it's even trying to do
[01:26]<aucr>its pretty clear
[01:26]<aucr>pings a site, reports it to textbox
[01:27]<gjrvcxnne>jukg: you are accessing mydata across threads as well, bad thing... but probably works for now...
[01:27]<aucr>i should use a callback
[01:27]<aucr>but in this case, it wont crash either way its not big enoug to matter
[01:27]<aucr>this is first time i used backgroundworker, i think ill just use normal threads instead
[01:28]<gjrvcxnne>jukg: not a bad idea
[01:28]<aucr>:P
[01:28]<gjrvcxnne>since i gotta go, do it that way lol
[01:28]<aucr>lol
[01:28]<gjrvcxnne>i'll c yall on monday
[01:28]<aucr>k
[01:28]<slzygc>isn't a array of charactors just a string? I dont get this
[01:29]<aucr>sprink: what are you trying to do
[01:29]<slzygc>convert a array of charactors to a string
[01:29]<edjg>new String(charArray)
[01:29]<edjg>I think
[01:29]<slzygc>well.. I just wanna pass it to a function that takes string as a paremeter
[01:29]<aucr>all you gotta do is this
[01:29]<aucr>string s = new string(c);
[01:30]<aucr>where c is ur character array
[01:32]<slzygc>hmm.. this seems sloppy.. what i'm really trying to do is pass only the first few charactors of a string to a method
[01:32]<aucr>myMethod(string.substring(0,3));
[01:32]<aucr>do that then
[01:32]<slzygc>like the first 4 charactors
[01:32]<aucr>or ToCharArray()
[01:32]<aucr>and pass it as a character array
[01:32]<slzygc>ahhh.. thats a lot better.. hehhe thanks
[01:33]<aucr>private void myConvertMethod(char[] myChars) { // stubbed } myConvertMethod(myString.ToCharArray());
[01:33]<aucr>should work
[01:34]<slzygc>yup .. cool thanks
[01:43]<rxrcr>Kog, I never even knew about these http://www.cypherspace.org/adam/rsa/rc4.html
[01:44]<rxrcr>I've tried to read past winners of the perl obfuscation contests.. but this is a bit out of my daily reading.
[01:44]<ymuggt0t0t>What's the first quote that comes to people's minds when they talk about documentation
[01:44]<kjr>I ended up using the 4 line Perl RC4 once upon a time
[01:44]<kjr>idunn50505: RTFM
[01:45]<kjr>idunn50505: why do you care heh
[01:45]<ymuggt0t0t>aha
[01:45]<ymuggt0t0t>I'm making a presentation and I was thinking of catchphrases
[01:46]<ymuggt0t0t>What about an image to go along with RTFM?
[01:46]<rgmznrs_>http://images.google.com/images?q=rtfm&hl=en&btnG=Search+Images
[01:46]<zgzzcygnv>wow
[01:46]<zgzzcygnv>#!/usr/bin/perl -p
[01:46]<zgzzcygnv>INIT{@k=pop=~/../g;$^C=map@s[$w++,$^C]=@s[$^C+=$_+hex$k[$w%@k],$w],@s=0..255}
[01:46]<zgzzcygnv>s#\C#$&^chr$s[255&map{1..$_}@s[$^C,$x]=@s[++$x,$^C+=$s[$x%=@s]]]#eg







