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.51 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-09-06
[00:00]<kjr>although, the real litmus test is: TIAS
[00:00]<kjr>the question is: why interop when not necessary
[00:00]<kjr>well?
[00:01]<kjr>unless you're doing legacy or stuff that's low level there's generally no reason
[00:01]<kjr>also, interop isn't as portable
[00:02]<kjr>couldn't rightly say...
[00:02]<kjr>I'd imagine there's probably a tad bit of overhead, but I've never noticed it
[00:02]<kjr>but I'm far from an expert on the subject heh
[00:05]<sxyg-rr>http://img523.imageshack.us/my.php?image=untitled1md5.jpg
[00:05]<sxyg-rr>why is it doing that>?
[00:07]<cjgpnssjz>Microsoft.DirectX.Direct3D.Device dev = (Microsoft.DirectX.Direct3D.Device)sender;
[00:07]<cjgpnssjz>sender arrives as an object.
[00:07]<cjgpnssjz>This casts it to a device before setting dev equal, right?
[00:07]<sxyg-rr>I do dataGridView1.Rows.Add("Hello", 1) and it does like 20 rows of it
[00:10]<sxyg-rr>omfg
[00:11]<fzvjzyv>hello
[00:12]<cjgpnssjz>Have you done a step-through, Shin-Ra?
[00:12]<sxyg-rr>?
[00:12]<sxyg-rr>im trying to add rows manually and not db driven
[00:12]<zugvydn>how do people like google and 1and1 and godaddy register their domains, and how much does it cost them?
[00:13]<fzvjzyv>I'm trying to make a very simple tcp client for a test, just to learn some stuff, but for some reason I'm not really successful. When I send 1 command to a server, i get a response OK, and response is getting displayed to me, but when i send 2nd command, I see no response, altho tcpdump shows that I get it. http://www.nomorepasting.com/paste.php?pasteID=68222 - any ideas why StreamReader doesn't wanna show me subsequent lines?
[00:13]<cjgpnssjz>Have If it involves C# code, have you stepped through the relevant code manually to determine the problem?
[00:14]<cjgpnssjz>runtime: What in the world made you think that this was the best channel in which to ask that question?
[00:15]<zugvydn>Confessor: because i felt like it
[00:15]<fzvjzyv>runtime: bad idea if you ask me. /j #googledomains and ask there
[00:16]<zugvydn>Favorit: theres no one there
[00:16]<fzvjzyv>runtime: bad luck, they are probably out to lunch
[00:17]<zugvydn>Favorit: I don't think that chanell exists...
[00:17]<cjgpnssjz>So long as you join it, it exists!
[00:18]<cjgpnssjz>It's sort of like love.
[00:18]<fzvjzyv>Confessor: could you be so kind and glance through my paste? I'm eyeing that piece of code for 30 mins now - i just do NOT understand what's wrong :)
[00:18]<cjgpnssjz>I do not believe I'll be able to help...
[00:19]<zugvydn>Favorit: can I see your code?
[00:19]<cjgpnssjz>But I'll give it a look-see.
[00:20]<fzvjzyv>one guess would be that I need to reinitialize StreamReader after every send...
[00:20]<lfrcnnus_frl>Can anyone tell me why this code: http://www.nomorepasting.com/paste.php?pasteID=68224 would not include the windows directory?
[00:26]<fzvjzyv>ok, i almost solved it with another approach i think :)
[00:29]<vynvyv>how do i make a label that can't be focused in vs?
[00:30]<dyguw>Give me a name for my company, Net Excellence was rejected.
[00:36]<su2zgzzc>I'm having a problem starting a service right after I stop it. I get the error that the service could not be started. Is there any kind of workaround for this if I just want to restart a service?
[00:37]<kuggys>I'm stuck working with asp classic... I have a line wher eI'm checking for null... if genOptName2 is not Nothing then blah with genOptName2 endif, and it's returning an error saying "Object variable not set" Any hints?
[00:39]<zltnz>Is there some profiler for C#?
[00:40]<kuggys>aLTer Sorta. Devexpress has one that you can find through the MS site, and there's one by redgate called ants.
[00:41]<fzvjzyv>mrr
[00:41]<fzvjzyv>I'm gonna shoot myself soon :)
[00:41]<su2zgzzc>All I know about is etw logging... so don't ask me :P
[00:41]<zltnz>Kunnis: thanks.
[00:42]<kuggys>aLTer Though look where you're doing string concationation, switch to using a stringbuilder if you're doing more then 3 to produce one result...
[00:42]<fzvjzyv>resp = new StringBuilder(); while(ns.DataAvailable) { int rx = ns.Read(buf, 0, buf.Length); resp.Append(...GetString(buf,0,rx); } Console.WriteLine(resp.ToString()); - Why do I get my resp filled in only on 2nd iteration?
[00:43]<kuggys>I switched an app from using 50 concats to using a stringbuilder, and got a ~10x speedup out of it
[00:43]<kuggys>Favorit I don't understand the context...
[00:43]<fzvjzyv>Kunnis: sec, i'll paste to a website
[00:44]<kuggys>what is a res?
[00:44]<kuggys>resp?
[00:44]<kuggys>and what's ns?
[00:44]<fzvjzyv>Kunnis: http://www.nomorepasting.com/paste.php?pasteID=68227
[00:45]<fzvjzyv>Kunnis: what happens is - I send an input line, server sends response, I get empty line printed. I send another command - server sends response, i get 1st response printed and 2nd buffered somewhere or so
[00:45]<fzvjzyv>Kunnis: the question is - why oh why? :)
[00:46]<dgdyrg>hi
[00:49]<fzvjzyv>Kunnis: any ideas? :~-(
[00:54]<sxyg-rr>yay
[00:54]<sxyg-rr>I got my program working good so far :D
[00:54]<sxyg-rr>w00t
[00:55]<fzvjzyv>heh
[00:55]<fzvjzyv>grats on that ;) i'm still struggling.
[00:55]<fzvjzyv>why do all the problems need to be this small, but so annoying
[00:59]<su2zgzzc>OK... whats a better solution to restart a service, either A. System.ServiceProcess.Start() then try System.ServiceProcess.Stop() until it works, or B. spawn process net stop <service> net start <service>?
[01:00]<kuggys>subanark I think there's a restart...
[01:00]<su2zgzzc>where?
[01:00]<kuggys>And you have to wait for the process to stop before you want to send it a start...
[01:01]<kuggys>Get the handle to the serviceprocess... I'm just doing it from memory, but I thought it was there.
[01:01]<su2zgzzc>I wait for 1/2 second. I had a loop to catch an exception and retry twice, but that wasn't enough, 10 was
[01:02]<su2zgzzc>http://msdn2.microsoft.com/en-us/library/system.serviceprocess.servicecontroller_members.aspx (I don't see Restart)
[01:03]<kuggys>Okay, then my memory is wrong.
[01:03]<kuggys>Call stop, then start
[01:03]<kuggys>That's what the class is there for
[01:03]<su2zgzzc>I do and get an exception
[01:03]<kuggys>Waht's the excpetion
[01:04]<su2zgzzc>"Cannot start service wuauserv on computer ."
[01:05]<kuggys>I'd bet you have the anme of the service wrong
[01:05]<kuggys>It may take the long name...
[01:05]<su2zgzzc>Since I stop it using the same object I dout it
[01:05]<kuggys>Oh, I bet you need to wait for it to finish stopping
[01:06]<su2zgzzc>Oh how do I do that?
[01:06]<kuggys>check the state of the service
[01:06]<su2zgzzc>Oh nm ServiceControler.WaitForStatus
[01:06]<kuggys>One of the properties is the state, wait for it to be out of stopPending...
[01:06]<kuggys>There ya go!
[01:08]<vynvyv>what component should i use that looks like a list box but each row can have many columns in it?
[01:14]<su2zgzzc>The documentation for ServiceControler.Start() should indicate that this is a non-blocking operation. Instead of just "Starts the service."
[01:15]<fzvjzyv>hmm
[01:15]<kuggys>Hehe
[01:15]<kuggys>it sends the start message to the service
[01:16]<su2zgzzc>But it does not act like "net start <service>"
[01:17]<kuggys>Well it sorta does. Net start starts the service, then pops up a window to display it's status, but it also gives you the command line back if I remmber right
[01:18]<su2zgzzc>If I have net start <service> then net stop <service> on the next line in a batch script it works
[01:18]<fzvjzyv>i hate it all. I just don't understand this.
[01:49]<fzzrjs>does anyone have any advice on serializing / deserializing code that makes use of singletons?
[01:49]<fzzrjs>s/code/objects/
[01:51]<fzzrjs>I have a singleton that pretty much everything uses (it's a small prototype) and up till now it's been stateless, so serialization hasn't been a problem, but now I need to memoize function params, and I keep getting "An item with this key alread exists..." when deserializing objects







