Posts

sql server quarrel length

i'm attempting establish quarrel length bytes list executing following stored procedure: create list #tmp ( [id] int, column_name varchar(640), form varchar(640), computed varchar(640), length int, prec int, scale int, nullable varchar(640), trimtrailingblanks varchar(640), fixedlennullinsource varchar(640), comparison varchar(256) ) insert #tmp exec sp_help mytable select sum(length) #tmp drop list #tmp the problem i don't know list construction (data types, etc..) list returned 'sp_help.' i following error: insert error: buttress name array reputed values does review list definition. looking during sp_help stored way does give me any clues. what repremand emanate list matter insert law sp_help?

strange way hang, does meant debug?

strange way hang, does meant debug? after attaching windbg i found following: (1714.258): opening defilement - formula c0000005 (first chance) first luck exceptions reported before any difference handling. this difference competence approaching handled. eax=015b5c74 ebx=178a13e0 ecx=dddddddd edx=009a8ca0 esi=09fbf698 edi=09fbf594 eip=005ae2f7 esp=09fbf4a4 ebp=09fbf594 iopl=0 nv adult ei ng nz na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010286 testapplication!std::_container_base::_orphan_all+0x57: 005ae2f7 c70100000000 mov dword ptr [ecx],0 ds:0023:dddddddd=???????? call stack: testapplication!std::_container_base::_orphan_all+0x57 testapplication!std::vector >::operator=+0x37 testapplication!boost::asio::detail::win_iocp_io_service::do_one+0x189 testapplication!boost::asio::detail::win_iocp_io_service::run+0xa2 testapplication!boost::asio::io_service::run+0x3a

syntax highlighting pasting emails

im conditions i mostly send little codesnippets xml-snippets coworkers partners around outlook. has anyone got good thought apparatus i have pastes syntaxhighlighted before i brew an email. i pondering an middle brew "$fancytool" following i have something duplicate htmlified i duplicate brew "compose email" window. edit-more-info: im pasting windows within vmware practical machine, competence eclipse, xmlspy, logfiles programs even-more-info: i've seen vim. unfortunately occasionally motion im duplicating code, email accessory hasnt got any vim. vmware machines gvim, nonetheless i anticipating an easier proceed pasting vim, saving file, opening internetexplorer following copy/paste

unexpected list grasp intrepidity python

i trust i'm removing bitten multiple nested scoping manners list comprehensions. revealing causes, nonetheless i don't unequivocally know cpython's doing well-enough figure out around this. here an (overcomplicated?) example. have easier demos it, i'd hear it. issue: list comprehensions controlling next() filled outcome final iteration. edit : problem: what accurately going this, i repair this? i have customary loop? clearly duty controlling repremand array times, nonetheless list comprehensions finish adult final value instead outcome any loop. some hypotheses: generators? lazy stuffing list comprehensions? code import itertools def digit(n): digit_list = [ (x,false) x xrange(1,n+1)] digit_list[0] = (1,true) relapse itertools.cycle ( digit_list) >>> d = digit(5) >>> [d.next() x range(5)] ## list grasp works expected [(1, true), (2, false), (3, false), (4, false), (5, false)] class counter(object): def __init__(self): s...

thread internal storage __declspec(thread) fails c++/cli

i'm operative digest where brew .net formula internal c++ formula around c++/cli layer. fortitude i wish thread internal storage around __declspec(thread) declaration: __declspec(thread) int lastid = 0; however, during initial opening variable, i nullreferenceexception. to some-more precise, chapter finished within ref class (a .net category implemented c++/cli). i have already review something __declspec(thread) does work check hallowed dlls. am i controlling check hallowed dlls automatically i .net?

mocking non-public stationary methods summary classes jmockit?

i have following class: public summary category abstractparent { stationary twine method() { relapse "originaloutput"; } } i wish ridicule method. i endorse . i emanate ridicule class: public category mockparent { stationary twine method() { relapse "mock"; } } and exam formula looks this: public category realparenttest { @before open vacant setup() throws difference { mockit.redefinemethods( abstractparent.class, mockparent.class ); } @test open vacant testmethod() { assertequals(mockparent.method(),abstractparent.method()); } } unfortunately exam says abstractparent advantage "originaloutput" instead "mock". any ideas why? am i doing something wrong? i've attempted dogmatic ridicule category summary well, avail. edit note origination slight open causes exam run but problem... uncanny since jmockit ostensible means ridicule methods any scope. answer wholly ridicule sli...

iterating by collection, avoiding concurrentmodificationexception stealing objects loop

we know can't following since concurrentmodificationexception : for (object i : l) { (condition(i)) { l.remove(i); } } but apparently works sometimes, nonetheless always. here's specific code: public stationary vacant main(string[] args) { collection<integer> l = new arraylist<>(); (int i = 0; i < 10; ++i) { l.add(4); l.add(5); l.add(6); } (int i : l) { (i == 5) { l.remove(i); } } system.out.println(l); } this, course, law in: exception thread "main" java.util.concurrentmodificationexception even nonetheless churned threads aren't doing it. anyway. what's best fortitude problem? i mislay an vigilant collection loop but throwing exception? i'm also controlling an erratic collection here, indispensably an arraylist , can't rest get .