Posts

HTML5 live video Apple iOS -

so far understand it, there no way (yet) play live video streams using html5 video on apple device , have 1-1.5 second latency or less. streaming protocol apple seems support hls , involves dividing video chunks, downloading them 1 one, , having downloaded enough pieces ( 3 default) start playing it. if each of these pieces 3 seconds long, looking @ 9-10 second latency. reducing length of piece causes constant disruption when streaming , reducing bitrate of video doesn't seem reduce said marker. is there other viable solution streaming truly live video using html5 on apple mobile devices? if anybody's wondering - there still hacky workaround avoid using hls @ all. you can convert video stream sequence of images in mpeg1 format (using ffmpeg example) , download them @ client side using javascript library , use canvas element display them. can achieved using jsmpeg , streaming-server code runs on node.js i able 30 fps 540x320 resolution 150ms lat...

php - Checkboxes with FormData.Append -

i using javascript formdata.append pass values php file, cannot check boxes working. example html <input type="checkbox" name="xxx" value="xxx" /><label>xxx option</label> js formdata.append( 'xxx', $('input[name=xxx]').val()); php if (isset($_post['xxx'])) { echo "checked!";} whether check box or not, response - checked! or php $xxx= $_post['xxx']; the var $xxx shows value xxx whether checked or not. how can pass checkboxes using method can differentiate if checkbox ticked or not! try using document.getelementsbyname('xxx')[0].checked to check status of whether it's checked or not.

How to get src of image in androids ImageView -

in application need find out source of image in 1 imageview can put same image on imageview. need actual source, , not resource id, because need other actions it. i tried with: imageview image = (imageview) view; string src = view2.getdrawable().tostring(); but want returned value like: some_packages/image.png same in c# image.source.tostring() . posible? sorry english , thank answer. is posible? not way going it. imageview not have populated resource. can using sort of drawable . drawable can created either in java code or resource. so, neither imageview nor drawable inside of able tell resource used, there may not such resource. either: hold onto source somewhere else, or put source in tag of imageview via settag() , retrieve later via gettag()

javascript - Django and autocomplete quick and dirty approach -

can suggest simple quick , dirty method of providing autocomplete text field example. may consider drop down later on. can think of few strategies doing this, i'd stay away non-standard django packages. are there js libraries help? thinking speed, need query options - i.e. text fields , let js/jquery figure out 1 works best , i'll expose js/jquery library list of keywords. any suggestions save time? there pretty 1 option i'd suggest : django-autocomplete-light’s purpose enable autocompletes , in django project: fruit of half decade of r&d , thousands of contributions. designed django every part overridable or reusable independently. stable, tested, documented , supported: tries neighbour in django ecosystem. its easy setup, has no dependencies , plays django.

data insertion in 2D array in jquery -

i want insert data in array through jquery below: means @ first time insert values on first position , second time insert values on second postion (i.e not insert values @ time on both positions) var custarr = new array(); custarr.push(["structure", "select parent"]); custarr.push(["a", ""]); custarr.push(["b", ""]); var sel = $('<select>').appendto('body'); (var = 0; < custarr.length; i++) { custarr.push("", sel.append($("<option>").attr('value', "some values"); } expected result is: custarr.push(["structure", sel.append($("<option>").attr('value', "some values")]); i cannot insert them both problem firstly in first loop. can insert structure values , in second loop need insert dropdown in front of structure values.

javascript - jQuery undefined value of an existing html element -

i have jquery code check whether html element particular id exists or not. have written if , else clause of existing , non existing html element. when element exists why jquery returns value undefined ? you can see jquery code below. variable start_time defined, because enters clause condition value detected undefined. wrong code? var count = 0; for(i=1; i<=n_day; i++){ count = count + 1 ; var start_time = jquery("#txtstarttime_detail"+i); var end_time = jquery("#txtendtime_detail"+i); var start_location = jquery("#txtstartlocation_detail"+i); var end_location = jquery("#txtendlocation_detail"+i); var start_location_coor = jquery('#txtstartlocation_coordinates_detail'+i); var end_location_coor = jquery('#txtendlocation_coordinates_detail'+i); //var day = jquery('#txtday'+i); if(typeof start_t...

java - Convert int, long, boolean, String, double in List (two variants), Set(two variants), Queue, Deque -

i have method convert array arraylist follows: public class main { //https://docs.oracle.com/javase/tutorial/extra/generics/methods.html public static <t> void fromarraytocollection(t[] a, collection<t> c) { (t o : a) { c.add(o); } } public static void main(string[] args) { car [] cars = new car[2]; cars[0] = new car(1, "volvo", "2612axa"); cars[1] = new car(2, "toyota", "1861axa"); int [] = new int[2]; i[0] = 1; i[1] = 1; long [] l = new long[2]; l[0] = 122342141; l[1] = 214214211; double [] d = new double[2]; d[0] = 1.0; d[1] = 2.0; boolean [] b = new boolean[2]; b[0] = true; b[1] = false; string [] s = new string[2]; s[0] = "one"; s[1] = "two"; collection<string> sc = new arraylist<string>(); ...