Posts

javascript - Html5 audio playlist not working -

i have audio html5 player, since working fine on single audio when adding more audios : pitbull shakira bilal saeed now, click on pitbull (ok working fine) when click on (bilal saeed or shakira) song song playing instead of, pause pitbull , start shakira or bilal saeed. check on jsfiddle html <div id="playlist"> <a href="#"> <span class="glyphicon glyphicon-play-circle"> <audio preload='none'> <source src='http://freshly-ground.com/data/audio/mpc/20090119%20-%20untitled%20groove.mp3' type='audio/mpeg' /> </audio> </span> </a> <a href="#"> <span class="glyphicon glyphicon-play-circle"> <audio preload='none'> <source src='http://audio.khanqah.org/ak20021104%20rozay%20or%20taqwa%20may%20rabt.mp3' type='audio/m...

html - ASP.Net Display value for radio button selected on my confirmationpage -

i have 4pg asp.net form storing data in session , button on 3rd page clears session. working fine i'm having 2 problems radio buttons. first problem on confirmation page (pg3) displaying 'true' or 'false'. want value 'yes' or 'no'. how do this second problem how display selected value on confirmation pg? know if needs wrapped in if statement i'm unsure how write complete brain fart i'm afraid. html page radio button on <div class="form-group"> <div class="col-xs-12"> <asp:label id="label2" class="col-md-2 control-label" runat="server" text="do have kids?"></asp:label> <div class="col-md-3"> <asp:label runat="server" class="radio-inline"> <asp:radiobutton runat="server" id="pg2yes" va...

unit testing - Mockito - Null Pointer Exception -

i have stupidly simple class (right now) takes id , passes along dao. @service public class adhocreportserviceimpl { @autowired private adhocreportserviceimpl adhocreportdao; public list<adhocreportresponsedto> getadhocreportresults(string reportid) { return adhocreportdao.getadhocreportresults(reportid); } } and i'm attempting use mockito verify logic there (this app has no code coverage , i'm trying change bit) @runwith(mockitojunitrunner.class) public class adhocreportservicetest { @injectmocks private adhocreportserviceimpl adhocreportserviceimpl = new adhocreportserviceimpl(); @mock private adhocreportdao adhocreportdao; @test public void getadhocreportresultstest() { list<adhocreportresponsedto> adhocreportresponsedtolist = new arraylist<adhocreportresponsedto>(); adhocreportresponsedto adhocreportresponsedto1 = new adhocreportresponsedto(); adhocreportresponsedto adhocreportresponsedto2 = new adhocrepor...

sockets - PHP simple_html_dom and file_get_html in foreach loop. How to speed up parse time? -

i'm using php simple_html_dom , file_get_html in foreach loop loops 4,000 times. here's i'm doing. i'm extracting content multiple urls on same host. there 4,000+ urls on same host. example.com example url: example.com/product.php?prod=00283 on next pass-thru of loop example.com/product.php?prod=03418 next pass-thru of loop example.com/product.php?prod=08192 etc, etc until 4000+ urls looped over. tested 100 urls took on 1 , half minutes parse , output content. is possible setup multithreaded approach in foreach loop bring contents of 4000 urls simultaneously? in other words, use sockets or other kind of multithreaded approach iterate on urls in parallel? here sample code below can see i'm doing here. include 'simple_html_dom.php'; $partlist_file = 'parts.txt'; $partlist = file('partnumberlist.txt', file_ignore_new_lines | file_skip_empty_lines); $stock = ''; $isfirst = true; $firstline = 'sku,...

.net - Dynamic Start menu WinRT tile for a normal desktop WPF application on Windows 10? -

i remember live tiles on win8/8.1.x possible store apps. with release of windows 10, has changed? did new solutions appear in time since question last asked (besides devexpress control)? you'll able use project centennial things this: https://channel9.msdn.com/events/build/2015/2-692

regex - How do i match a specific input within a string in Java? -

i using regex in line of code: if (line.matches("^.*\b(" + incomingmachineip + ")\b.*$")) so, assume following inputs: incomingmachineip = "10.10.10.10" line = "abcde=10.10.10.10abcedf" i want if condition return true, i'm trying regex above false still returned though value of incomingmachineip found in string (line) any how resolve appreciated. you need escape backslash 1 more times , need remove second \b or replace \b because there isn't word boundary exists between last 0 , letter a if(line.matches(".*\\b" + pattern.quote(incomingmachineip) + ".*")) since you're using matches method, won't require anchors.

php - How to de-link a URL from Symfony link -

i have issue while trying deference url code. want url as: www.imaginar.fr instead getting: http://localhost/epita/web/app_dev.php/questionanswer/cat/www.imaginar.fr my twig code below: <tr><td> <a href="{{ entity.resource}}" target="_blank">{{ entity.resource}}</a></td></tr> my controller code fetches resource data database , trying open resource in new browser without symfony extension $query1 = $em->createquery('select p.id, p.question, p.answer, r.resource, r.cover epitaepitabundle:questionanswer p left join p.resource r p.id :id') ->setparameter('id', $id); $res = $query1->getresult(); without http:// prefix links appended current pages url.