Posts

asp.net - enabalajx() not defined -

i m building web control in aspx 3.5 in m using ajax hover menu extender. works fine in chrome. in ie8 crashes when hover on button. when check in chrome error given there uncaught referenceerror: enabalajax not defined. please me in regard try using enableajax

regex - How to create inverse of scrubbing script in SED? -

i wrote sed script deletes rows ("/d") match set of ip regular expressions. want re-read same source file , create inverse output - delete not in list. if throw "!" expression, delete since match "not" condition of other ip list entries. here's example of regex in internal.lst: /10\.10\.50\.0/d /10\.100\.0\.0/d /10\.101\.0\.0/d /10\.101\.0\.128/d and example of sed execution (in .bat file): for /f %%f in ('dir /b source\*.txt') ( sed -f ..\internal.lst staging\%%f > scrubbed\external\%%f rem inverse of above line!!!! >scrubbed\internal\%%f move staging\%%f scrubbed\original ) edit: confirm understand bobbogo's comment, i'd like: sed -f list.lst staging\in.txt > out.txt and i'll put in list.lst file: /10\.100\.0\.0{p;n} /10\.101\.0\.0{p;n} /10\.101\.0\.128{p;n} is right? in gnu sed , -n option suppresses automatic printing of pattern space, allows use p command print select line...

image - speech bubbles like in comics for iphone -

i new iphone application development. building iphone app user needs able add speech bubbles (think comics) on existing images. have questions on how implement this, have empty speech bubble image , overlay on existing image - use separate uiimage speech bubble? or should draw speech bubble myself? allow user move speech bubble using touch- pointers or examples great! also let him resize speech depending on amount of text - pointers or examples great! finally should able add text speech bubble - there way add textbox on existing image? thanks, update - found similar example on site move/resize uiview - http://www.switchonthecode.com/tutorials/creating-basic-animations-on-iphone i use transparent uiview uiimageview containing bubble , uitextview set editable. use resize text view whenever text view changed notification sent: cgrect frame = textview.frame; frame.size.height = textview.contentsize.height; textview.frame = frame; subclass uiview , use touchesb...

jboss - Error deploying a Grails 1.3.2 war on JBoss6 -

we trying upgrade jboss 4 jboss 6 , receive following error when deploying our grails 1.3.2 war: 09:53:33,343 info [jmxkernel] legacy jmx core initialized 09:53:37,515 info [abstractserverconfig] jboss web services - stack cxf server 3.4.1.ga 09:53:38,000 info [jsfimplmanagementdeployer] initialized 3 jsf configurations: [mojarra-1.2, myfaces-2.0, mojarra-2.0] 09:53:42,515 warning [fileconfigurationparser] aio wasn't located on platform, fall using pure java nio. if platform linux, install libaio enable aio journal 09:53:52,593 warn [classloadermanager] unexpected error during load of:groovy.jmx.builder.package-info: java.lang.classformaterror: illegal class name "groovy/jmx/builder/package-info" in class file groovy/jmx/builder/package-info @ java.lang.classloader.defineclass1(native method) [:1.6.0_20] @ java.lang.classloader.defineclasscond(unknown source) [:1.6.0_20] @ java.lang.classloader.defineclass(unknown ...

arrays - Highest Percentage Increase -

lets have following set of numbers representing values on time 1 2 3 10 1 20 40 60 now looking algorithm find highest percentage increase 1 time another. in above case, answer pair (1, 60), has 6000% increase. so far, best algorithm can think of brute-force method. consider possible pairs using series of iterations: 1st iteration: 1-2 1-3 1-10 .. 1-60 2nd iteration 2-3 2-10 2-1 ... 2-60 (etc.) this has complexity o(n 3 ). i've been thinking approach. find strictly increasing sequences, , determine perecentage increase in strictly increasing sequences. does other idea strike guys? please correct me if ideas wrong! i may have misunderstood problem, seems want largest , smallest numbers, since 2 numbers matter. while true: indexofmax = max(list) indexofmin = min(list) list.remove(indexofmax) list.remove(indexofmin) if(indexofmax < indexofmin) contine else if(indexofmax == indexofmin) return -1 els...

version control - How to setup SVN repo for emergency fixes? -

being developer number of years should know don't. i working on released product on small team. main developer committing of code there couple other developers commit time time. currently, have staging server running hudson ci builds after every commit. production updated manually simple svn command when trunk stable , tested. this has worked fine except have situations requiring emergency/urgent changes production when code not finalized in trunk. how can setup repo accommodate situation? thought this response reply still little on head. i thinking, when updating production, create branch @ revision. however, if need make urgent production fixes, how access branch , how can update production pulling branch , not trunk? how make sure urgent fixes production branch committed trunk? ie. situation want have better solution because has occurred few times rev 1000 updated on production rev 1001-1005 new feature requests/bug fixes included in next version rev 10...

Where should signal handlers live in a django project? -

i have started implementing signal listeners in django project. while understand , how use them. having hard time figuring out should put them. documentation django site has say: where should code live? you can put signal handling , registration code anywhere like. however, you'll need make sure module it's in gets imported on signal handling gets registered before signals need sent. makes app's models.py place put registration of signal handlers. while suggestion, having non model classes or methods in models.py rubs me wrong way. so then, best practice/rule storing , registering signal handlers? i make them classmethods of model itself. keeps within 1 class, , means don't have worry importing anything.