Posts

VB6 multidimensional array weird statement -

VB6 multidimensional array weird statement - while reviewing old vb6 working code unusual statement. aryvalue = arypersons(8, i) where aryvalue , arypersons multidimensional array , declared as dim arypersons, aryvalue anyone having thought does? tried same in test application giving type mismatch (error 13) answer: bad understand vb code expecting info type language. @ arypersons(8, i) 2 dimension array getting stored , while fetching gives utilize 2d array info can assigned aryvalue 2d array. unusual me in 2d array @ position store kind of info 2d data. it seems arysteppersonoptions has array value: dim somearray(8, 8) string dim arysteppersonoptions, aryvalue dim long somearray(8, 8) = "hello" arysteppersonoptions = somearray = 8 aryvalue = arysteppersonoptions(8, i) msgbox aryvalue of course of study pseudo-hungarian ary prefix used seems more add together confusion otherwise. sadly far much code contains cargo-culted ...

how to alternatively resolve and reject jquery object -

how to alternatively resolve and reject jquery object - is possible resolve jquery deferred object , reject it, , resolve again, etc. , trigger $.when each time resolved ? i trying this, doesn't work : var bindhide = $.deferred(); var bindshow = $.deferred(); if ($('#userdata').is(':hidden')) { bindshow.resolve(); } else { bindhide.resolve(); } //show userdata $.when(bindshow).then(function() { bindshow.reject(); $('#miniweightlevel, #miniweightleveltextlayer').unbind('vclick').bind('vclick', function (e) { showuserdata(); $('#miniweightlevel, #miniweightleveltextlayer').unbind('vclick'); bindhide.resolve(); }); }); //hide userdata $.when(bindhide).then(function() { bindhide.reject(); $('#minifycross').unbind('vclick').bind('vclick', function (e) { hideus...

javascript - Find element hasClass and modify the previous one -

javascript - Find element hasClass and modify the previous one - i have element, lastly one, has step-active class. now, want write method, looks element, has class, remove class , add together previous one. phone call method if button clicked. i have next piece of html code: <div class="col-lg-6 col-md-6 step-panel" style="padding-right: 0"> <div class="step container-fluid"> <p>4</p> </div> <div class="step"> <p>3</p> </div> <div class="step"> <p>2</p> </div> <div class="step step-active"> <p>1</p> </div> </div> this js: function indicatestep() { $('.step').find().hasclass('step-active'); $(this).removeclass('step-active'); $(this).prev().addclass('step-active'); } i can't w...

Multiple htaccess rewrite urls -

Multiple htaccess rewrite urls - i've inquire help .htaccess next need correction in order parse few different urls rewrite rules, here script rewriteengine on rewriterule ^([^/.]+)/?$ /template_store/index.php?manufacturers_id=$1&/template_store/index.php?cpath=$1 [l] i've tried concatenating 2 urls within same rewrite rule still need correction here, please help, greetings url rewrite

javascript - How to continue playing sound when holding key? -

javascript - How to continue playing sound when holding key? - i have sound in javascript plays when press arrow key. have sound play when hold arrow key, pause when release key. this code now: var clicksound = new audio("img/hartslag.mp3"); document.body.onkeyup = function (e){ if(e.keycode == 38){ clicksound.play(); } } you need hear 2 different events. play on key downwards , pause on key up. var clicksound = new audio("img/hartslag.mp3"); var playing = false; document.body.onkeydown = function (e){ if(e.keycode == 38 && !playing){ clicksound.play(); playing=true; } } document.body.onkeyup = function (e){ if(e.keycode == 38){ clicksound.pause(); playing=false; } } code not tested! javascript onkeyup

CQRS client command management -

CQRS client command management - i'm building new project using cqrs, it's 3 tier application , it's expected clients state synchronized. server receive commands , callback events clients. currently, model has several sub model can added/removed/updated, each of has it's own command. events field specific i.e. updateitemcommand createsubitemcommand removesubitemcommand updatesubitemcommand ... itemfieldaupdatedevent subitemfieldaupdatedevent subitemfieldbupdatedevent ... so here's interrogation, client current state of model, user edit local model, click save button , bug. should i compare original state of model (updated received events) , edited state of model generate set of commands (on every received events it's required identify fields has been updated , notify user if edited field has changed), create commands user editing model doing , undoing edit (that hard manage), ... basically don't know strategy should apply generate commands...

postgresql - Complex query for returning an email conversation list -

postgresql - Complex query for returning an email conversation list - i have complex query not working in sql fiddle. in app work for, sync users gmail our database. store emails in emails table , have replies table store references header lists parent replies email. so example, if have email this: id | subject | message_id --------------------------------------------------------------------------------------------- 1 | howzitgoin | 53856b1448c89_23fa9605badd015951@3a139e8c-0b81-42c2-8e59-133c262e96a9.mail there no records in replies table: now if import reply email this: id | subject | message_id --------------------------------------------------------------------------------------------- 2 | re: howzitgoin | caebv8ytu_a6ltp_uguq-qsvj3zojwuiwcjgzpsppez1pj3_i1a@mail.gmail.com we store next in replies table: email_id | message_id ------------------------------------------------------------------------------------------ 2 ...