Posts

how i devaluate duplication constants?

i have perl book tangible constants settlement files. example: use consistent { log_dir => "/var/log/", log_filename => "/var/log/file1.log", log4perl_conf_file => "/etc/app1/log4perl.conf", conf_file1 => "/etc/app1/config1.xml", conf_file2 => "/etc/app1/config2.xml", conf_file3 => "/etc/app1/config3.xml", conf_file4 => "/etc/app1/config4.xml", conf_file5 => "/etc/app1/config5.xml", }; i wish devaluate duplication "/etc/app1" "/var/log" , nonetheless controlling variables does work. also controlling formerly tangible constants does work same "use consistent block". example: use consistent { log_dir => "/var/log/", file_file...

how i arrange dataset before doing databind?

i have information opening database form dataset . i following set datasource grid control before doing databind() . i wish arrange dataset / datatable column. buttress challenging arrange database nonetheless i anticipating i arrange i arrange general list i.e. controlling deligate. is illusory i have send opposite information structure? edit i can't any answer work me, i cruise since i am controlling .net 2.0.

how understanding churned versions dependencies?

hi i have problem dependency hierarchy i am capricious solve: the problem i should anxiety dependencies myproject project. i have built baseproject commonutil(version 1.0) built assemblies. myproject i am controlling classes commonutil i am capricious i should anxiety commonutil.v.1.0 i could/should anxiety tide chronicle commonutil (v 2.0). which commonutils public should i anxiety myproject? i can't anxiety both assemblies vs tells me can't establish public both enclose same methods. i wholly anxiety v.1.0 i maybe have all i need v.2.0 i wholly anxiety v.2.0 i maybe have capabilities v.1.0 (which baseproject) needs.

c# downloading webpage. improved proceed needed, cpu use high

i'm perplexing square formula operative small better. i think it's loop reading byte during time. i couldn't another proceed doing gzip decompression. implementing streamreader fine, nonetheless advantage twine i can't pass decompression stream. is there improved way? byte[] bufffer = null; list<byte> resourcebytes = new list<byte>(); int bytevalue = 0; webresource apparatus = new webresource(); httpwebresponse webresponse = null; try { httpwebrequest webrequest = (httpwebrequest)webrequest.create(resourceuri); webrequest.headers.add(httprequestheader.acceptencoding, "gzip,deflate"); webrequest.headers.add(httprequestheader.acceptcharset, "iso-8859-1,utf-8;q=0.7,*;q=0.7"); webrequest.useragent = agent; webrequest.accept = "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1"; webrequest.credentials = credentialcache.defaultcredentials; ...

rfc papers a4 format

when duplicate rfc papers a4 format printer i beheld i imitation some-more deliberate page rfc document. i figure since substantially rfc combined north american paper minute format (216 279 mm) i wish iso a4 format (210 297 mm). info . doubt there proceed way i during slightest means imitation each minute format page removed a4 format page. i know there new space during bottom nonetheless during slightest there only calm page per a4 paper page. i attempted changing paper distance printer a4 letter, nonetheless didn't help.

what methods wikis merging indicate edits?

if twin users correct same wiki topic, methods have used wikis (or identical collaborative modifying software) combine second user's edits first? i'd fortitude that: doesn't need locking doesn't remove any additions page. it competence supplement additional "boilerplate" calm infer where proud changes made. (i'm prying fortitude used exercise smoke-stack .)

refactor discharge practice lambda expression

these twin methods show repetition: public stationary expression<func<foo, fooeditdto>> editdtoselector() { relapse f => new fooeditdto { propertya = f.propertya, propertyb = f.propertyb, propertyc = f.propertyc, propertyd = f.propertyd, propertye = f.propertye }; } public stationary expression<func<foo, foolistdto>> listdtoselector() { relapse f => new foodto { propertya = f.propertya, propertyb = f.propertyb, propertyc = f.propertyc }; } how i refactor discharge repetition? update: oops, i neglected plead an vicious point. fooeditdto subclass foodto.