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.68 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-31
[23:25]<svzz[wjzc]>key must be unique anyway :-/
[23:25]<sdnffdxdlld>return (AD.ID_dos == D.ID_dos);
[23:25]<svzz[wjzc]>okay i'll try that out
[23:25]<sdnffdxdlld>store ID_dos
[23:25]<svzz[wjzc]>that's not unique, ID_dos is PK in D, but is Foreign key on AD
[23:26]<svzz[wjzc]>D vs. AD have a one-to-many relationship
[23:26]<sdnffdxdlld>ahhh then you'll need an List<T> stored in the Dictionary<T,U>
[23:26]<svzz[wjzc]>okay you lost me there..
[23:26]<sdnffdxdlld>(these of course can be replaced by custoim collections if you want)
[23:27]<sdnffdxdlld>staz ... you can store anything in a Dictionary<T,U> right?
[23:27]<svzz[wjzc]>yes
[23:27]<sdnffdxdlld>so store a List<T> of the objects with that key
[23:27]<zgzzcygnv>so how does a dictionary internally search for stuff?
[23:27]<sdnffdxdlld>SpikeLite google hash buckets
[23:27]<slycnlyvn>Result: <b>hash bucket</b> : http://catb.org/jargon/html/H/hash-bucket.html
[23:28]<zgzzcygnv>does SpikeLite have a wikipedia function? :P
[23:28]<sdnffdxdlld>not yet
[23:28]<sdnffdxdlld>SpikeLite google hash buckets wikipedia
[23:28]<slycnlyvn>Result: Bloom filter - <b>Wikipedia</b>, the free encyclopedia : http://en.wikipedia.org/wiki/Bloom_filter
[23:28]<sdnffdxdlld>but it will :)
[23:28]<sdnffdxdlld>and a codeproject one too
[23:28]<rrd2uppnw>havent looked at your code.. but im running into mad issues binding to datagrids using dictionary<t,u>
[23:29]<sdnffdxdlld>well staz is using business objects
[23:29]<sdnffdxdlld>and issues? I cant see there'd be any framework bugs in Dictionary<T,U> :S
[23:29]<svzz[wjzc]>smellyhippy okay so here, i have, for instance : a table Person, and a Table Addresses.... so Person have it's own unique ID, and Addresses has it's own ID plus a PersonID, because one person can have multiple address... so what would that look like Dictionary<PersonID, List<Addresss>> ?
[23:30]<sdnffdxdlld>Dictionary<PersonIDType, List<Address>>
[23:30]<sdnffdxdlld>oh wait
[23:31]<sdnffdxdlld>my mind isnt in the rihgt place to understand your example ;) I'll write some sample code
[23:31]<rrd2uppnw>what is Addresses ?
[23:31]<svzz[wjzc]>and mapping that Dictionary + search for list when mapping my person will be shorter than finding Addresses in a List<> ?
[23:31]<sdnffdxdlld>yes for a large amount alot faster
[23:32]<svzz[wjzc]>well... guess it's worth the try...
[23:32]<sdnffdxdlld>it is ;)
[23:32]<sdnffdxdlld>it'll help alot!
[23:33]<svzz[wjzc]>(it's a chance that i SQL-side filter the tables caus i would need to map, 19k addresses, 25K phone numbers and 23k PhoneCalls on 16K persons)
[23:33]<rrd2uppnw>can multiple people have the same address ?
[23:33]<sdnffdxdlld>as much as i love the perdicate methods they do get slow
[23:33]<svzz[wjzc]>jaybuffe1 yeah but it's not linked
[23:33]<rrd2uppnw>how can you have a personId on the address reord if another person could have that address also
[23:34]<svzz[wjzc]>jaybuffe1 i don't have a many-to-many relation ship (3 tables, the middle one having the PersonID and the AddressID)
[23:34]<svzz[wjzc]>jaybuffe1 it's not linked
[23:34]<y-gz>the dictionary is O(1) where as the IList is O(n) i think
[23:34]<svzz[wjzc]>if 2 persons are on the same adress
[23:34]<svzz[wjzc]>there will be 2 Address records
[23:34]<rrd2uppnw>ok
[23:35]<rrd2uppnw>that kind of defeats duplicate data ?
[23:35]<sdnffdxdlld>yer and since both address have the same key you add them both to the List<Address>
[23:35]<sdnffdxdlld>there is no duplicate data if you have 2 different addresses for a person
[23:36]<rrd2uppnw>your Addresses object could be a Dictionary<int, List<Address>> where the int is the personId... then D.Addresses = Addresses[D.ID_dos]
[23:37]<rrd2uppnw>i think he is saying 2 people with 2 rows for addresses, but the addresses are the same
[23:37]<svzz[wjzc]>yeah that's what i thought
[23:37]<svzz[wjzc]>that's exactly it, just need to implement that in my fucked up pattern... why the hell did i made used a fucked up pattern
[23:38]<svzz[wjzc]>for 1 Table, i need 5 classes...
[23:38]<svzz[wjzc]>-_-
[23:39]<rrd2uppnw>there classes for codestables, though right
[23:39]<rrd2uppnw>nm.. that sentence doesn't make sense
[23:40]<gwyvmggu>hello, is anyone here using visual studios team studio ?
[23:40]<svzz[wjzc]>oh phew, thanks for clarifying i was having a headache trying to decode it
[23:42]<gwyvmggu>if so could you please tell me what the 2005 version uses for source contol and it has a external (non intergrated clinet) that can check in any type off file?
[23:43]<gwyvmggu>*of
[23:47]<rrd2uppnw>i would like to create my own type that extends DateTime... is that possible ?
[23:47]<pz2>anything is possible, just don't ask me
[23:47]<sdnffdxdlld>try it
[23:47]<sdnffdxdlld>it'll soon tell you if its sealed
[23:48]<rrd2uppnw>well intellisense wont let me pick it... so i would only assume
[23:48]<sdnffdxdlld>oh wait isnt datetime a value type
[23:48]<zgzzcygnv>yes
[23:49]<sdnffdxdlld>hehe value tpyes cant use inheritance
[23:49]<rrd2uppnw>sealed type
[23:49]<zgzzcygnv>no
[23:49]<zgzzcygnv>its a struct
[23:49]<rrd2uppnw>thats the error i got in VS
[23:49]<rrd2uppnw>'myobj.ShortDateTime': cannot derive from sealed type 'System.DateTime'
[23:49]<sdnffdxdlld>StaZ[home]: any improvement?
[23:50]<sdnffdxdlld>jaybuffe1: you can always wrap it
[23:50]<rrd2uppnw>smellyhippy: how so
[23:51]<sdnffdxdlld>create a class/struct with a datetime in it then just provide all the functionality that the datetime does and your stuff
[23:51]<zgzzcygnv>public class DateTimeExtended { private DateTime _DT; }
[23:51]<sdnffdxdlld>you'll need to do operator overloading and stuff to make it exchangable with a datetime
[23:52]<rrd2uppnw>AnarkiNet: do i make a public property to set _DT ?
[23:52]<svzz[wjzc]>smellyhippy still thinking how i could stick that in my pattern, and i'm about to say fuckoff the pattern
[23:53]<sdnffdxdlld>staz it works almost exactly the same as the predicate :S
[23:53]<svzz[wjzc]>it's mapping the Dictionnary that is a problem
[23:53]<sdnffdxdlld>you search on the id using dic[key] and it returns a List<T> the same as the FIndAll
[23:54]<sdnffdxdlld>you just if on dict.COntainsKey(key) if it does then retrive the List<T> and add to that or create a new List<T> and add it to the dict
[23:54]<svzz[wjzc]>yeah i know how to map it, i said it's about my pattern
[23:55]<svzz[wjzc]>just gotta think about it
[23:55]<sdnffdxdlld>gotta be a strange apttern if you cant do a straight swap :S
[23:56]<svzz[wjzc]>http://www.c-sharpcorner.com/UploadFile/rmcochran/elegant_dal05212006130957PM/elegant_dal.aspx?ArticleID=b9f94d24-6933-48e7-9c16-879ba906d28b <- this pattern i use
[23:56]<y-gz>hm opera can't handle msdn1
[23:56]<svzz[wjzc]>a Template Pattern
[23:56]<y-gz>odd
[23:57]<sdnffdxdlld>http://pastebin.ca/109084
[23:57]<sdnffdxdlld>^^^ thats my test code for performance testing .Find and dictionary
[23:58]<rrd2uppnw>U NEED A PERM LINK FOR THAT :-]
[23:58]<rrd2uppnw>oops caps
[23:58]<rrd2uppnw>still important though
[23:58]<sdnffdxdlld>yeah I know ... with soem results too
[23:58]<sdnffdxdlld>but I havent got a blog running yet :P
[23:58]<sdnffdxdlld>got lots of useful stuff to put up







