Posts

Android WebView: Video Playing issues -

note: works fine on 4.1.2 (samsung galavy tab 2), not work on 4.1.1 i trying play video inside webview, long using url web source of video, works fine. <source src="http://0800200c9a66-content-preview.testvideo.com/video.mp4" type="video/mp4"> function playvideo() { var video = document.getelementbyid("video"); video.focus(); video.load(); //have load first, play video.play(); the problem comes when change source video on sd card like src="file:////storage/sdcard0/android/data/com.example.player/files/content_path/sample.mp4" type="video/mp4"> when give local file source, audio plays , video shows black screen. idea how fix this? p.s. video url in above code not real one, example of code. real url works fine. note: works fine on 4.1.2 (samsung galavy tab 2), not work on 4.1.1

java - At subclass Compilation Error: Unreachable catch block for CloneNotSupportedException -

in superclass , when override clone() method there no problem. public class superclass implements serializable, cloneable { public object clone() { try { return super.clone(); } catch (clonenotsupportedexception e) { return null; } } } when override clone() method in subclass doing same ( copy , paste clone() method super class) it's showing compilation error public class subclass extends superclass implements serializable, cloneable { public object clone() { try { return super.clone(); } catch (clonenotsupportedexception e) { return null; } } } compilation error in subclasss @ line containing catch : unreachable catch block clonenotsupportedexception. exception never thrown try statement body again, if remove method clone() superclass subclass wont show error. where gap of understanding? if superclass 's clone catches cloneno...

javascript - Angular2 - sum the values of a property in the Object sent from an observerable -

in service.component.j s return observable of array of student http call. student object has property called age, student.ts export class student { id: number; name: string; age:number; } service.componnet.js getstudents (): observable< student[]> in studentmanagement.component.ts observer observable above, want sum age of students. know can put sum() in source (which less preferred, need display other info of students in page, such id, name ,individual age well.) or calculate _studentlist. besides these two, other way? private _studentlist:student[]=[]; .subscribe( returnedstudents => { console.log(returnedstudents); this._studentlist = returnedstudents; }, erromsg => this._errormessage = erromsg ) you use map on observable return sum. getstudents().map(arr => arr.reduce((a, b) => + b.age, 0)); here reduce inner array sum of age property of students. ...

php - Amazon MWS ListOrders Misiing orders with different Currency/ Timezone -

i using listorders api orders amazon store https://sellercentral.amazon.co.uk i have set timezone europe/london but orders missing listorders api , these orders having different currency (euro) , perhaps placed different country (spain). all orders currency pound listed api. tried changing time zone europe/madrid, still these orders not listed. can cause? please help. thanks i added method amazon orders api class , returned me 100 orders , gave me nexttoken access next 100 or remaining orders. need set createdafter date , marketplaceid other not required fields. public function getorderlist() { $this->config['serviceurl'] = "https://mws-eu.amazonservices.com/orders/2013-09-01"; $this->serviceurl = "https://mws-eu.amazonservices.com/orders/2013-09-01"; $service = new marketplacewebserviceorders_client($this->aws_access_key, $this->aws_secret_access_key, $this->application_name, $this->appli...

html - tabindex="-1" on <ul> doesn't work -

i have mega dropdown menu bootstrap (code simplified) : <li class="dropdown mega-dropdown"> <a href="#">menu button</a> <ul tabindex="-1"> <li>1st link</li> <li>2nd link</li> <!-- many other links --> </ul> <!-- many other menu buttons --> </li> small fiddle here : https://jsfiddle.net/48m2ppzc/ i want simplify navigation tab key : at beginning element <ul> has max-height of 0px shoudn't able navigate inside tab key (because menu hidden). when click on "menu button" link, menu should show (i set max-height 500px ), , need change tabindex '0' (i can jquery that's not problem) the problem @ first point : tabindex="-1" doesn't work, can still navigate inside menu tab key. how can fix problem? use html5 tabindex should work on html elements, tried tabindex="0" . tabindex...

android - proximity Alert not fired -

this first question here , search answer not found. build simple app that current position , give alert if i'm stand on specific position, alert not fired, please help. here code : mainactivity: package com.lda.notyalert; public class mainactivity extends activity { proximityintentreceiver proximityintentreceiver; private static final string proximity_alert = "com.lda.notyalert.proximityintentreceiver"; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); locationmanager locationmanager; string svcname = context.location_service; locationmanager = (locationmanager) getsystemservice(svcname); criteria criteria = new criteria(); criteria.setaccuracy(criteria.accuracy_fine); criteria.setpowerrequirement(criteria.power_low); criteria.setaltituderequired(false); criteria.setbearingrequi...

c# - How can I get type double array from List<string>? -

this question has answer here: how convert list of strings doubles? 5 answers var array1 = (from ir in pmec.interestrateset select new list<string> { ir.tenor.tostring() }).tolist(); var array2 = (from ir in pmec.interestrateset select new list<string> { ir.rate.tostring() }).tolist(); array1.addrange(array2); var array = array1.toarray(); for example, array1 has 6 numbers, array2 has 6 numbers, after combined, array has 12 numbers. then should in order array of type double? if tenor , rate double properties should not convert them string. list<double> tenorlist = pmec.interestrateset .select(irs => irs.tenor) .tolist(); list<double> ratelist = pmec.interestrateset .select(irs => irs.rate) .tolist(); list<double> tenorratelist = tenorlist.concat(ratelist).tolist(...