refresh

Continuously updating php page

拈花ヽ惹草 提交于 2019-12-23 23:16:26
问题 I have created a php page to display a image from a set of five images. The image is displayed based on the data read from a text file.Another application is continuously updating data in that text file.So my php page need to read data from that file whenever the file is updated and display image based on that data. I created a infinite loop to read data. But when i tried to access the php page from a browser , it is not loading because of the infinite loop. $myfile1 = fopen("readfile.txt",

How to refresh an iframe not using javascript?

大城市里の小女人 提交于 2019-12-23 22:19:39
问题 I have an iframe which I would like to refresh every fifteen seconds, but I'm not sure how to do this or if it is even possible. If it is, how would I go about doing this without the use of JavaScript. If JavaScript is necessary then please post how I would do it in JavaScript. Thank you. 回答1: You might be able to achieve this using a meta tag, inside the HEAD element of the HTML file being included inside the iframe: <meta http-equiv="refresh" content="5" /> This will refresh the page every

JLabel refresh icon with updated image

拥有回忆 提交于 2019-12-23 19:48:35
问题 I'm trying to make an experiment in image manipulation. Basically I have an image that is continously updated by a timer and i display that image in a JLabel. My problem is that JLabel does'nt refresh the image. Here is my timer code: Timer timer = new Timer(200, new ActionListener() { public void actionPerformed(ActionEvent e) { count++; System.out.println("timer"); System.out.println(filename); ImageIcon icon = new ImageIcon(filename); label = new JLabel(); label.setIcon(icon); label

Changing “src” of an “img” html element doesn't refresh it

∥☆過路亽.° 提交于 2019-12-23 17:11:53
问题 I'm using $("#my_img").attr("src", "/another_img.png"); inside the "beforeSend" callback of an Ajax request using jQuery, the problem is that the the img isn't being always refreshed to the user, sometimes I saw the new image and sometimes not, is there anyway to force the refresh of the img ? I was thinking that by changing the "src" attribute of the img element was enough to make the engine refresh the image. Thanks ! 回答1: Sounds like it might be a caching issue, try: $("#my_img").attr("src

div refresh without click of the button

时光怂恿深爱的人放手 提交于 2019-12-23 14:36:10
问题 how do i make the div refresh, say after 10 secs and execute the run_query() function without clicking on the button? <script src="scripts/ajax.js" type="text/javascript"></script> <div id="quote"><strong>Quote of the Day</strong></div> <div><a style="cursor:pointer" onclick="run_query()">Next quote …</a></div> 回答1: Use setInterval function. setInterval(function(){run_query();}, 10000); For the initial load you can do that from the server side code. 回答2: setTimeout("run_query()",10000); 来源:

How should I update an existing firebase token on my server when it gets refreshed by firebase?

你。 提交于 2019-12-23 12:26:16
问题 This question is about device groups and how to efficiently keep track of valid tokens. The problem I see is when a token is refreshed on a device and you send it to the server, how are you going to identify the old token that is not valid anymore. The device token is used to identify the device but it has been changed so there is no relation anymore between the device and the old token. Am i supposed to just check the validity of all the tokens that belong to a device group every now and

How to distinguish Unload Event triggered by Refresh or Window Close?

China☆狼群 提交于 2019-12-23 09:02:22
问题 Unload Event can be triggered both by Refresh action and Window Close action. is there a way to distinguish which action that actually trigger it? In my situation, i want to ignore the Refresh action. Could you please give me some insight what the work around is? I noticed that there is already this sort of question asked, but it seems to they are all unresolved. Therefore i came up this question again and hopefully some intelligent guy can solve this problem. 回答1: I do not believe the

How to “refresh” DOMDocument instances of LibXML2?

风格不统一 提交于 2019-12-23 05:29:20
问题 Using PHP to illustrate: there are a BUG in the normalizeDocument() method, or a lack of a "refresh" method, because DOM consistence is lost after changes (even only attribute changes)... So, any algorithm "with DOM changes" that you implement with LIBXML2 somethimes works and sometimes not, is unpredictable!! (?) The "refresh" by $doc->LoadXML($doc->saveXML()); is a workaround and lost performance in a flow of work with DOM... A sub-question: all moment I need to refresh DOM? $XML = ' <html>

refresh a dataGridView from another form

限于喜欢 提交于 2019-12-23 01:18:26
问题 I have Form1 and Form2. Form1 has a dataGridView and a button for opening Form2. I have written a method in Form1 as below that perfectly refreshes the dataGridView: public void RefreshGrid() { dataGridView1.DataSource = empControl.SelectAll(); //Works great } In Form2 I insert into the table and use the below Code for Calling the above method. When I traced the code I saw that it implements all the way but the dataGridView isn't refreshed! private void btnInsert_Click(object sender,

Refresh tableview after delete a tableview cell and refresh view controller

前提是你 提交于 2019-12-22 19:40:11
问题 I need answer for swift by the way. Basically, I have two questions for refreshing. If you think the code is too long to look at, this is what I'm trying to do. one is to refresh the tableview after clicking on the delete button on one of the tableview cell. I've tried refreshcontrol, it didn't work and it wasn't what I wanted but it would be cool to have them. My other question is, how to refresh a view controller by clicking on of the buttons. And here is the code. The delete button is