Posts

Making Long variables work in 64 bit AND 32 bit Excel VBA -

i have quite complex excel vba project runs on 32-bit systems, trying make work 64-bit systems too. have resolved function declarations, still issues long data type. doing research, come (from msdn pages): the actual data type longptr resolves depends on version of office running in: longptr resolves long in 32-bit versions of office, , longptr resolves longlong in 64-bit versions of office. but mean can change dim statements from dim x long to dim x longptr should everywhere? or have got wrong end of stick? there circumstances won't work or change should avoided? try longlong. spec, looks longlong replacement 32 type long.

ios - Pinching/Panning a CCNode in Cocos2d 3.0 -

i want zoom in out ccnode pinching , panning screen. node has background large portionof shown on screen. node contains other sprites. what have done first register uipinchgesturerecognizer uipinchgesturerecognizer * pinchrecognizer = [[uipinchgesturerecognizer alloc] initwithtarget:self action:@selector(handlepinchfrom:)]; [[[ccdirector shareddirector] view] addgesturerecognizer: pinchrecognizer]; -(void)handlepinchfrom:(uipinchgesturerecognizer *) pinch { if(pinch.state == uigesturerecognizerstateended) { prevscale = 1; } else { cgfloat dscale = [self scale] - prevscale + pinch.scale; if(dscale > 0) { deltascale = dscale; } cgaffinetransform transform = cgaffinetransformscale(pinch.view.transform, deltascale, deltascale); [pinch.view settransform: transform]; // [_contentnode setscale:deltascale]; prevscale = pinch.scale; } } the problem scalw whole uiview not ccnode. h...

responsive design - How to pin an image onto another image css -

i have code: <body style="margin:0; padding:0;"> <div style="position: relative; left:0; top:0;"> <img src="images/fullscreen.png" style="max-width: 100%; width: 100%; height:auto; position: relative; top:0; left:0;"/> <img src="images/smaller_animated.gif" style="position:absolute; top:140px; left:458px;"/> </div> </body> fullscreen.png large full screen image. made kind of responsive, if make browser width less doesn't scroll , instead resizes. now have animated gif want place within area of fullscreen image. there large rectangle grey background within fullscreen image , want pin animated gif centre of space. works fine except when resize window, gif doesnt move/resize fullscreen image , moves outside rectangle background. ive played around making absolute , relative dont seem getting close, ideas? you can this: html: <div id="...

rsa - Time to verify a signature on a long message -

i'm studying speed (time verify) signed message rsa or dsa on different processors in link, there benchmarks the time verify signature on short message (59 bytes) http://bench.cr.yp.to/results-sign.html but i need times verify signature on long message (1500) byte , there relation between time verify signature on message , message length ? there 2 parts verification: hashing message, , performing public key operation , comparison on supplied signature , hash 1) takes longer longer messages, whereas 2) depend on size of public key. also, 2) dominate 1) except long messages. when benchmarking verification times interested in #2, might use short message benchmark cited does. can benchmark hashing times separately if you're interested in that.

ios - Swift: method called more than once after restarting game -

i'm making little game user has tap on circle 10 times. each time label shows how many times tap left. after every tap number in label decreases one. after finishing brought new view can tap "play again" button. the problem when playing second time number decreases 2 on every tap , when playing third time 3 , on. here's code: import uikit var circletaptrue = uibutton() var circletapfalse1 = uibutton() var circletapfalse2 = uibutton() var circletapfalse3 = uibutton() var circletapfalse4 = uibutton() var lbltappingspeed = uilabel() var tappingspeed = 0.00 var lblmovesleft = uilabel() var movesleft = int() var imgcirclewidthheight = float() var imgcirclexpos = float() var imgcircleypos = float() class viewcontroller: uiviewcontroller { var timercountdown = nstimer() override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. movecircles() movesleft = 10 lblmovesleft.text ...

Javascript:void(0) meaning -

this question has answer here: what “javascript:void(0)” mean? 12 answers i curious 1 thing happen : when hover link in bottom of page there appears javascript:void(0); mean ? thank ! the void operator evaluates given expression , returns undefined. usually, when want add link has "onclick" function(and no href) this: <a href='javascript:void(0);' onclick='dosomething()'>click me</a> clicking on return undefined href , no navigate, onclick function happen. read this: void operator .

javascript - Incrementing undefined object properties without performance penalty -

is there way increment both defined , undefined properties of plain js object without performance "penalty"? var foo = { counter: 0 }; (var i=10000; >= 0; i--) { foo['counter']++; foo['anyothercounter']++; // should work 'counter' without errors } using conditionals (if statement or ternary operator) check if property defined recognized performance penalty. bleeding edge es features welcome. you don't around conditional (of kind) in loop if don't setup property before. i've set testcase @ http://jsperf.com/incrementing-properties , it's not of penalty if don't coerce undefined number. bleeding edge es features welcome i don't think so, they're rather not as optimized. proxies yield 0 instead of undefined non-existing properties might idea, though.