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: 1822.24 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-28
[19:58]<txnjzd>no need for a vs.net plugin
[20:00]<mycnw>I'm trying to use an array of BackgroundWorker so I can have multiple background threads going at the same time. I call a run method, it plucks off the item to process from the start of the queue, calls the RunWorkerAsync with it, and when the RunWorkerCompleted finishes, I call the run method again
[20:00]<su2zgzzc>Is there a way to do a registry transaction?
[20:01]<svzz[wjzc]>Hey guys, i need some help regarding templates, i don't know much about them :-/ : http://rafb.net/paste/results/h2EwHc65.html <- here the behavior of this is to check if Value is null or DBnull, if it's the case, return an instatiated variable of the Template type, if not return Value casted as the Template type... my template type WILL ALWAYS BE a ValueType (int, string, DateTime, etc.) so how could i do this here... on
[20:01]<svzz[wjzc]>(do you see my question or it was too long?)
[20:01]<mycnw>but I want to know which backgroundworker it is working on so when one is finished, I can start work on the next item using the same backgroundworker
[20:01]<su2zgzzc>i.e. perform a bunch of registry actions all at once, and if any of them fail, rollback all the actions
[20:06]<mycnw>Hmm, actually how do I get a unique identifier for an object so I know which is which?
[20:14]<-- __zxzys xzs fuyv>127.0.0.1")
[20:24]<mycnw>Gagh
[20:24]<mycnw>TargetInvocationException was unhandeled
[20:27]<svzz[wjzc]>hey with C# templates, can you specify the compiler that T can only be a value type like in this : public T foo<T>(object bar, T Value) ?
[20:31]<afd>hmmmmmmm
[20:31]<sdnffdxdlld>generics .. not templates ... they work in very different ways
[20:32]<sdnffdxdlld>and no you cant specify value types only
[20:33]<svzz[wjzc]>genreics != template? i learned templates in C++... which is why i call them this way, in what are they different in C#?
[20:33]<svzz[wjzc]>oh and thanks for the answer
[20:34]<vufvuzn>http://msdn2.microsoft.com/en-us/library/d5x73970.aspx
[20:34]<sdnffdxdlld>yeah do a search for generics vs templates
[20:34]<vufvuzn>StaZ[work]: :that might help
[20:34]<vufvuzn>smellyhippy: you might want to take a read too.. *shrugs*
[20:34]<sdnffdxdlld>i've read up on the differences
[20:35]<vufvuzn>that's not about the differences
[20:35]<vufvuzn>it's about constraints, and how you can constrain a generic type to be a struct (value type)
[20:35]<sdnffdxdlld>ahhh i use constaints alot
[20:35]<sdnffdxdlld>you can constrain agisnt reference types but not value
[20:36]<sdnffdxdlld>iirc
[20:36]<vufvuzn>that page seems to say otherwise
[20:36]<lnvnzxu>first where
[20:36]<vufvuzn>"where T : struct" "the type argument must be a value type. ..."
[20:36]<sdnffdxdlld>ahhhh cool
[20:36]<sdnffdxdlld>:)
[20:36]<svzz[wjzc]>ah that's great, thank you
[20:37]<vufvuzn>StaZ[work]: For the record, I know/knew nothing about these things when you asked (didn't even known what a constraint was) - but I got that link as the first result of googling: C# generics type restriction
[20:39]<sdnffdxdlld>aye i have some fucked uyp shit with inheritance and constraints and constraints that work with generics ie <T,U> where T : U where U : ISOmething
[20:39]<sdnffdxdlld>the chains of inheritance can be a ball ache to debug
[20:39]<svzz[wjzc]>vulture i would've never thought of searching for restriction lol... my google-fu is weak :(
[20:39]<afd>why do my asp.net app get UnauthorizedAccessException when it's able to write into the dir??
[20:40]<sdnffdxdlld>is the asp.net user account granted explicit permissions?
[20:40]<vufvuzn>smellyhippy: I'll stick with the old classic: curiously recurring templates (well it works with C# & Java generics too)
[20:40]<afd>smellyhippy: yes
[20:40]<afd>smellyhippy: but some uploadings do work
[20:40]<afd>smellyhippy: only dotLucene fails
[20:41]<sdnffdxdlld>:/
[20:44]<awjzdd>AqD! smellyhippy!
[20:44]<afd>jwormy: !
[20:44]<afd>smellyhippy: dotlucene is beginning to piss me off...
[20:45]<afd>wtf it has to wrap exceptions?!
[20:45]<afd>and instead it give me almost useless error message like "i can't open the dir blah blah"
[20:45]<afd>:-/
[20:45]<sdnffdxdlld>wrapping exceptions is normally used for logging them
[20:45]<sdnffdxdlld>can't you see the inner exceptions?
[20:46]<afd>smellyhippy: it doesn't pass the inner exception
[20:46]<sdnffdxdlld>!
[20:46]<afd>smellyhippy: so everything is covered
[20:46]<afd>damn stupid java lib
[20:46]<afd>thx god i have the source
[20:47]<afd>ok i traced the inner exception
[20:47]<afd>still "UnauthorizedAccessException"
[20:47]<afd>........
[21:10]<svzz[wjzc]>hm that's fun, SQL Server "money" datatype appear in C# as a System.Decimal... a type i didn't know it existed until 10 seconds ago :P
[21:12]<sdnffdxdlld>I had fun today finding out that sql float != c# float
[21:13]<sdnffdxdlld>serves me right for assuming
[21:18]<lyfuym-wjzc>y0 y0 y0
[21:18]<lyfuym-wjzc>jwormy :) sup d00d
[21:18]<lyfuym-wjzc>eh sup smippy
[21:18]<sdnffdxdlld>lo :)
[21:18]<lyfuym-wjzc>wazzzup d00d?
[21:18]<lyfuym-wjzc>smippy how is the bot comming?
[21:19]<sdnffdxdlld>good ... got some more work penciled in to do tonight
[21:19]<sdnffdxdlld>need to work on the error handling for the current stuff too lol
[21:21]<-- ges wes ludv ("ge>blah; cat blah | sed -e 's/[^fmrt]//g' -e 's/r/f/' -e 's/^f/r/' -e 'y/mt/tm/'")
[21:24]<awjzdd>Liquid-Work: oi!
[21:28]<lyfuym-wjzc>worms
[21:28]<lyfuym-wjzc>wazzup?
[21:28]<awjzdd>eh workin'
[21:28]<awjzdd>tryin to get it all done
[21:31]<lyfuym-wjzc>lawl
[21:31]<lyfuym-wjzc>wtf
[21:31]<lyfuym-wjzc>I have to write a doc
[21:31]<lyfuym-wjzc>brb
[21:48]<su2zgzzc>How do I tell the machine to restart?
[21:48]<lyfuym-wjzc>hmmm
[21:49]<lyfuym-wjzc>fucking hell you can not cntrl + shift + b a word doc
[21:49]<sdnffdxdlld>subanark: tried google?
[21:49]<lyfuym-wjzc>smellyhippy :P
[21:50]<lyfuym-wjzc>subanark I think it has something with system.eviroment
[21:50]<sdnffdxdlld>I googled and the first page was packed with answers
[21:51]<su2zgzzc>I looked and I saw some app that does scheduled shutdowns, and another horrid one that shutdowns using native dll calls
[21:51]<sdnffdxdlld>horrid native calls?
[21:51]<sdnffdxdlld>or the way to do it? ;)
[21:51]<su2zgzzc>creating a struct and passing it to a native dll call
[21:52]<sdnffdxdlld>you can use rundll32 too
[21:52]<lyfuym-wjzc>smellyhippy I am rundll32
[21:52]<zugmff1q>see?
[21:52]<su2zgzzc>I just want to know if there is a more eligant solution than starting process: shutdown -r -t 0
[21:53]<sdnffdxdlld>ahhh ya should have said that in the first place :)
[21:53]<sdnffdxdlld>that shows you've looked into it/thought about it
[21:54]<su2zgzzc>thought about it? Naw... thats what I usually do when doing it by hand or with a batch script.
[21:54]<sdnffdxdlld>theres lots of ways really rundll32, native calls, the wmi







