Posts

TYPO3: Access old-style piBase methods from Extbase extension -

can access old-style pibase classes , methods extbase extension? for example, can create accessmyoldextensionservice.php service wrapper class , pull return values controller? in case, need return list of old data records can't migrated mvc style directly. if so, basic approach be? to access on db records of old extension can map table new extension. create new model matching properties of needed table fields. create mapping in ts setup.txt like persistence{ [...] classes{ tx_yournewextension_domain_model_bar { mapping { tablename = tablenameofoldextension } } } } create related repository.

jquery - javascript simple countdown with refresh function -

i getting output of 00 min nan sec. know may wrong code? desired outcome, countdown 5min add class 'ended' using jquery.countdown.js thank you. $(function() { var enddate = "05:00"; $('.countdown.callback').countdown({ date: enddate, render: function(data) { $(this.el).html("<div>" + this.leadingzeros(data.min, 2) + " <span>min</span></div><div>" + this.leadingzeros(data.sec, 2) + " <span>sec</span></div>"); }, onend: function() { $(this.el).addclass('ended'); } }).on("click", function() { $(this).removeclass('ended').data('countdown').update(enddate).start(); }); }); if recall correctly, enddate variable not valid. believe needs follow javascript method of getting date might need this var enddate = new da...

sql - Conditionally Select additional rows from another table -

i have 2 tables: tablea pk alpha critter etc 1 zebra apple 2 c lion orange 3 r giraffe banana 4 d gopher pear tablec pk alpha animal misc 1 d beaver kiwi 2 d camel avacado i need result: result pk alpha critter etc 22 zebra apple 23 c lion orange 24 r giraffe banana 25 d gopher pear 26 d beaver kiwi 27 d camel avacado if value of tablea.alpha equals more 1 tablec.alpha same value select be: select ta.alpha, ta.critter, ta.etc tablea ta and select tc.alpha, tc.animal, tc.misc tablec tc on separate rows (3 rows in above example) otherwise just select ta.alpha, ta.critter, ta.etc tablea ta (one row) i might use cte. like: with t_cte (alpha,countalpha) (select tc. alpha, count(tc.alpha) countalpha tablec tc group tc.alpha having (count(tc.alpha) > 1 )) ...

javascript - Retaining elements while using .replaceWith() -

i've struggled welcome. have created toggle between grid(divs) , table using jquery replacewith function. works great, issue lies keeping each element's specific link constant through each click. in attached example, i've added item replacewith function, renders outside desired elements. example, want link remain in tr or div resides in. when renders, links render outside table/div elements. example: <table class="toggle" style="display: table;"> <tbody> <tr class="table-head"> <--- link should here ---> <th>title</th><th>date</th><th>info</th></tr><tr><td>class title</td><td>item details</td><td>item details</td></tr> </tbody> </table> hopefully i've described enough answer. http://jsfiddle.net/rymill2/r3j5m/ js: $btntable = ".button-table"; $btngrid = ".button-gr...

php - CakePHP: How to find columns ordered by number of related models? -

i hope able me. have 2 tables websites , likes. each website has likes. can't figure out how can websites ordered number of likes. sounds pretty basic me failed find solution... something following tried last (actsas containable in model available): $this->paginate = array('contain' => array( 'like' => array( 'order' => array('count(like.id) desc') ) )); $this->set('websites', $this->paginate()); could me please? cheers. andreas // update found solution. use countercache. interested should countercache - cache count() here , thats code $this->paginate = array( 'order' => array('like_count' => 'desc'), 'limit' => 15 ); $this->set('websites', $this->paginate()); i found solution. use countercache. interested should read countercache - cache count() here , thats code $this->paginate = array( 'order' =...

css - Keeping active menu option's background the same colour -

i have superfish menu that, when hover on , sub-menu comes view, wish keep background-color selected option. i have written this, however, doesn't seem apply: .sf-menu ul li:hover > {background-color: #da2026;} would work if targeted element , used < arrow work backwards? this place start .sf-menu li li a:hover, .sf-menu li.sfhover li a:hover { background-color: #da2026; } or maybe .sf-menu li li.sfhover a{ background-color: #da2026; }

Windows Phone 7: How to access built-in Calculator? -

does know how access built-in calculator application on windows phone 7? have googled 4 hours , couldn't find answer. any suggestion highly appreciated, thanks i'm afraid not possible windows phone 7 sdk: launching apps/services, need use launchers in launchers list , there isn't calculator. even on windows phone 8 have access more launchers via uri schemes , there no way launch calculator.