Posts

c# - Building a report from a runtime generated datatable -

i have datatable data have read csv file (you helped me yesterday that, thanks). now, want show report columns of datatable. it easier if see fields , select them report designer: i'd have drag them columns. problem datatable generated in runtime, can't use designer. how that? how make report data generated in runtime, , visualize in reportviewer? thanks in advance!

vb.net - UnhandledException handler in a .Net Windows Service -

is possible use unhandledexception handler in windows service? normally use custom built exception handling component logging, phone home, etc. component adds handler system.appdomain.currentdomain.unhandledexception far can tell doesn’t achieve win windows service end pattern in 2 (or 4) service entry points: protected overrides sub onstart(byval args() string) ' add code here start service. method should set things ' in motion service can work. try myservicecomponent.start() catch ex exception 'call our exception handler myexceptionhandlingcomponent.manuallyhandleexception (ex) 'zero default exitcode successfull exit, if set non-zero exitcode = -1 'so, use environment.exit, seems appropriate thing use 'we pass exit code here well, in case. system.environment.exit(-1) end try end sub is there way custom exc...

.net - Combining Enums -

is there way combine enums in vb.net? i believe want flag type enum. you need add flags attribute top of enum, , can combine enums 'or' keyword. like this: <flags()> _ enum combinationenums integer hasbutton = 1 titlebar = 2 readonly = 4 etc = 8 end enum note: numbers right twice big (powers of 2) - needed able separate individual flags have been set. combine desired flags using or keyword: dim settings combinationenums settings = combinationenums.titlebar or combinationenums.readonly this sets titlebar , readonly enum to check what's been set: if (settings , combinationenums.titlebar) = combinationenums.titlebar window.titlebar = true end if

java - Are there any code analysis tools that will make my job easier? -

i have inherited program written in managed c++ guy retired. after spending time digging through it, can @ least 95% of belongs on thedailywtf . however, tasked modifying , porting on language i'm comfortable with. the program takes in many many parameters (50+) read in file , performs series of calculations , spits out report. once i'm done plowing way through pages of 3 letter variables (many of them reused totally unrelated purposes), need come way test code make sure comes same answers previous code. this wishful thinking, there automated code analysis tools out there can aid me in task in way or form? i porting on java. i need come way test code make sure comes same answers previous code. unit testing since mentioned program takes parameters in file , outputs report, generate few inputs give sufficient coverage portions want unit test against output old code. if breaks don't forget there chance have discovered bug in old code. htt...

vb.net - how to start new thread as soon as previously thread gets finished? -

i have develop windows service copy files different servers. have task using multi-theading. have start 3-4 threads. whenever 1 threads finished have start new thread count of thread should remain 3 or 4. how apply check on ? please provide information on it. this might give starting point. idea use blocking queue block on dequeue operation until item available. worker threads spin around infinite loop waiting items appear in queue. main thread enqueue items queue. following example uses blockingcollection class .net 4.0 bcl. if not available can implementation of blocking queue stephen toub's blog . module example private m_queue blockingcollection(of string) = new blockingcollection(of string) sub main() dim threads(4) thread integer = 0 threads.length - 1 threads(i) = new thread(addressof consumer) threads(i).isbackground = true threads(i).start() next dim files ienumerable(of string)...

Can I perform database specific operation using android.preference package? -

i need database in can store data , data whenever need. possible android.preference package. not want use sqlite database regards according shared preferences | android developer tutorial (part 13) sai geetha m n, many applications may provide way capture user preferences on settings of specific application or activity. supporting this, android provides simple set of apis. preferences typically name value pairs. can stored “shared preferences” across various activities in application (note cannot shared across processes). or can needs stored specific activity. shared preferences: shared preferences can used components (activities, services etc) off applications. activity handled preferences: these preferences can used in activity , can not used other components of application. shared preferences: the shared preferences managed of getsharedpreferences method of context class. preferences stored in default file(1) or can specify file name...

firefox - How can I specify a browser that GWT tests should be run on? -

i writing gwt project uses html5 canvas. to test application use gwttestcase. for firefox functions supported since gecko 1.9. while testing, firefox 3.0.1 being used , errors occur. how can set gwt tests launched on firefox 3.6? (in eclipse using gwt plugin or using build.xml ant) measuretext wasn't there until gecko 1.9.1. the workaround run tests runstyle=manual:1 gives me link can paste browser want tests run in. -dgwt.args="-runstyle manual:1"