live

Adding new HighChart Series

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 15:07:10
At this code javascrip give an error $.each(JSON, function(i, array) { chart.series[i].name = array.teamName; chart.series[i].setData(array.teamPower, true); }); I must define the chart.series[i] because it say "Cannot set property 'name' of undefined" but i can't find a way in order to do this. Because it fonction runs with requestData so it came after chart determine with options function showGraph() { chart = new Highcharts.Chart(option); } chart: { renderTo: 'graphicShow', type: 'spline', events: { load: requestData } } ...in option... title: { text: 'Power %' }, series: [] ... You need to

How to remove an appended element with Jquery and why bind or live is causing elements to repeat

谁说我不能喝 提交于 2019-11-30 13:17:18
问题 Now I know this basic question has been asked before, but I must be doing something wrong. I know that an appended element must bound before I can do anything to it. However, try as I might I can't get it to work. I am pulling in a message and displaying when people click a radio select. When ever I try to bind the new element, it stacks in odd ways. It will start to stack the elements. eg- [Click 1]message 1, [Click 2] message 1 and 2 and so on. I have tried a whole bunch of different ways

Assigning click event to dynamically added buttons

社会主义新天地 提交于 2019-11-30 13:08:35
问题 I am creating some buttons dynamically and assigning them IDs. When ever someone clicks that button I want to collect the ID and from there perform some task. Here's my work in progress $(document).ready(function() { $('input:button').addClass("btnClass"); fillData(); $('#btnGet').click(function() { fillData(); }); function fillData() { $.ajax({ type: "Post", url: "../Linq/myService.asmx/getStudent", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { /

Any quick Python GUI to display live images from Camera

醉酒当歌 提交于 2019-11-30 10:21:48
I am trying to display live images from my 1394 camera. Currently my code is able to obtain images in a loop from the camera and I was looking for any quick GUI that will update dynamically (as a separate thread). I can do this in PyQt maybe using QThreads but is there any recommendation or faster way of doing this?? Here's my code #Loop capturing frames from camera for frame in range(1,500): print 'frame:',frame TIME.sleep(1) #capture frame every second image_binary = pycam.cam.RetrieveBuffer() #convert to PIL Image pilimg = PIL.Image.frombuffer("L",(cimg.GetCols(),cimg.GetRows()),image

how to make live click event on new added DOM

本秂侑毒 提交于 2019-11-30 09:46:58
问题 i am a live() user and i know somehow live() is deprecated. i've tried to use bind() to have the event on new added dom working, but it's not. can you please tell me how to do bind() properly ? or is there any other method to do this task? this is the html: <table> <tr> <td> hi there <span class="click">click me</span></td> <tr> <tr> <td> hi there2 <span class="click">click me</span></td> <tr> <tr class="end"> <td></td> </tr> </table> <button class="add_new">add new row</button> this is the

jQuery live() removing iPhone touch event attributes?

爱⌒轻易说出口 提交于 2019-11-30 07:01:16
问题 I am binding live events on links in my PhoneGap app. The event does fire successfully (confirmed by alert() ing), but it seems any touch data is not attached to the event object like it should be. This happens on all touch events - touchstart , touchmove , and touchend . $('a').live('touchend', function(event) { event.preventDefault(); alert(event.touches.length); // event.touches should be populated! }); Any ideas? Am I SOL with jQuery.live()? 回答1: The touch events are not currently

How to remove an appended element with Jquery and why bind or live is causing elements to repeat

风格不统一 提交于 2019-11-30 06:58:38
Now I know this basic question has been asked before, but I must be doing something wrong. I know that an appended element must bound before I can do anything to it. However, try as I might I can't get it to work. I am pulling in a message and displaying when people click a radio select. When ever I try to bind the new element, it stacks in odd ways. It will start to stack the elements. eg- [Click 1]message 1, [Click 2] message 1 and 2 and so on. I have tried a whole bunch of different ways to bind it. My hope was the remove would strip #feedback and then create and bind the next message. I

jQuery .on() with multiple selectors in event delegation?

自作多情 提交于 2019-11-30 06:07:17
I have using .on() in jQuery 1.7 and wondered whether it is possible to attach multiple selectors at a time for elements that have been injected onto a page. Previously, I was using live() - but it's obvious why I want to move given performance improvements. Can you use .on() in the manner like: $(document).on('click', '#selector1, #selector2, .class1', function () { //stuff }); And are there any benefits lost in attaching to document ? ? Can you use .on() in the manner like: $(document).on('click', '#selector1, #selector2, .class1', function () { //stuff }); Yes, that will work. I want to use

Assigning click event to dynamically added buttons

ぃ、小莉子 提交于 2019-11-30 05:31:25
I am creating some buttons dynamically and assigning them IDs. When ever someone clicks that button I want to collect the ID and from there perform some task. Here's my work in progress $(document).ready(function() { $('input:button').addClass("btnClass"); fillData(); $('#btnGet').click(function() { fillData(); }); function fillData() { $.ajax({ type: "Post", url: "../Linq/myService.asmx/getStudent", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { //var nMsg = (typeof msg.d) == 'string' ? eval('(' + msg.d + ')') : msg.d; var t = "<table width='80%' id

How to live stream video from iPhone to a Wowza server?

老子叫甜甜 提交于 2019-11-30 02:45:58
I would like to live stream a video from the iPhone camera to a Wowza server using the RTP protocol. I was 'playing' with the AVFoundation framework but is not possible to send the data to an specific URL to do it. I read in the forums that the better way is to use the ffmpeg library. I compile the it and I got all the *.a files. Also, I compile a library of a user of this forums (Livu creator) called ffstream.a I think I have to encode my RAW images which I get with the AV framework to H264 and after it send it to the wowza server. Someone could help me with some tips of how to send the raw