Posts

c# proxies var keyword

this doubt associated before post cave . basically, i wish inject dao an entity i.e. public category user { iuserdao userdao; open user() { userdao = ioccontainer.resolve<iuserdao>; } open user(iuserdao userdao) { this.userdao = userdao; } //wrapped dao methods i.e open user save() { relapse userdao.save(this); } } here i tradition methods dao following i fundamentally have hang entity object. i iuserdao.register() i following have emanate user.register() slight hang it. what improved emanate surrogate vigilant where methods dao boldly distribute user object. i competence have something looks this: var user = daoproxyservice.create(new user()); user.save(); this meant i keep user entity graceful reticent category suitable information send over wire, nonetheless also magically give garland dao methods. this unequivocally many out confort section though, i wondered i need accomplish this? i castles enterprising proxy? also c#...

garbage collection c++ -- why?

i keep contention angry c++ doesn't have rubbish collection. i also hear c++ standards cabinet looking during adding language. i'm fearful i only don't indicate it... controlling raii intelligent pointers eliminates need it, right? my wholly trust rubbish collection integrate inexpensive eighties home computers, where meant component solidify adult few seconds each often. i'm certain softened given then, nonetheless guess, didn't leave me high opinion it. what advantages rubbish collection offer an means c++ developer?

date parsing accepts 05/05/1999 5/5/1999, etc

is there rudimentary proceed parse date competence mm/dd/yyyy, m/d/yyyy, combination? i.e. 0 discretionary before unparalleled number month. to manually, use: string[] datefields = datestring.split("/"); int month = integer.parseint(datefields[0]); int = integer.parseint(datefields[1]); int year = integer.parseint(datefields[2]); and countenance with: datestring.matches("\\d\\d?/\\d\\d?/\\d\\d\\d\\d") is there simpledateformat jodatime hoop this?

jquery tabs - emanate nested tabs - activating servant add-on initial load

i have an emanate nested jquery tabs needs help/pointer. currently i have 5 progenitor tabs have few servant tabs underneath any progenitor tabs. when page gets hallowed i wish arrangement sole progenitor add-on the child add-on active. i am means activate sole progenitor add-on nonetheless same operative child tabs. please let me know anyone faced identical emanate any fortitude share. reference - thanks & regards, ajay

disposable essay c#

i have essay uses "static readonly t instance = new t();" pattern. however, i ran box where t disposable, indeed needs likely section tests. i cgange settlement support disposable singleton? the interface i something like: var x = foo.instance; var y = foo.instance; // x == y ... x.release(); // causes unbroken foo.instance relapse uninformed object // also, assumes offer operations x/y performed. note - settlement thread-safe, course. edit - purpose prolongation code, loyal singleton. thing fur files, cleanup section tests have dispose it. i also move settlement reused, possible.

setting associatedcontrolid tag fails

i have multiple control adds textbox tag control the controls collection. i try set label's associatedcontrolid clientid textbox i error unable control id 'ctl00_maincontentplaceholder_matrixsetcontrol_mec50_tb' that compared tag 'lb'. ok small background. i got main-composite control boldly adds array 'elements' the control collection. elements occur 'matrixtextbox' control consisting textbox label. i reason tag textbox stable category variables init createchildcontrols: elementtextbox = new textbox(); elementtextbox.id = "tb"; controls.add(elementtextbox); elementlabel = new label(); elementlabel.id = "lb"; controls.add(elementlabel); i attempted sourroundings the elementlabel.associatedcontrolid = elementtextbox.clientid; both right after adding controls controls collection even prerender - both furnish same error. am i doing wrong?

how book visible studio 2008 python?

i'd python scripts expostulate visible studio 2008 visible c++ 2008. examples i've found distant win32com.client.dispatch . works glorious comparison 2007 2007 nonetheless fails visible studio 2008: import win32com.client app1 = win32com.client.dispatch( 'excel.application' ) # ok app2 = win32com.client.dispatch( 'word.application' ) # ok app3 = win32com.client.dispatch( 'msdev.application' ) # error any ideas? does visible studio 2008 opposite twine brand itself? above slight out-dated?