refresh

Refresh a local web page using Python

僤鯓⒐⒋嵵緔 提交于 2019-11-30 03:01:31
问题 I'm using Python to gather some information, construct a very simple html page, save it locally and display the page in my browser using webbrowser.open('file:///c:/testfile.html'). I check for new information every minute. If the information changes, I rewrite the local html file and would like to reload the displayed page. The problem is that webbrowser.open opens a new tab in my browser every time I run it. How do I refresh the page rather than reopen it? I tried new=0, new=1 and new=2,

android auto-refresh listview items

妖精的绣舞 提交于 2019-11-29 23:57:28
问题 I'm really new to android programming, I successfully get data from server and then populated into a listview. But how do I auto-refresh the listview items within certain amount of time? There maybe new items coming in from the server when I refresh the new items may appear. Here's my code of retrieving data from server: public class TabActivityQueue extends Fragment { ListView list; TextView number; TextView info; TextView remark; TextView statuss; Button Btngetdata; ArrayList<HashMap<String

Auto Refresh IFrame HTML

寵の児 提交于 2019-11-29 23:02:12
问题 How do I auto Refresh a Iframe every 3 Seconds with out it refreshing the entire page. I use <meta http-equiv="refresh" content="1"> but it shows the entire page refresh and puts you to the top of the page each time it does. My Iframe is pointed at a text file to read live messages I put in. Is there even a way to do this with out it refreshing the entire page, just the element. I am a HTML beginner so explain thoroughly please. I google alot and tried many things and so far nothing works and

JWT token refresh (sliding sessions) and signout

落花浮王杯 提交于 2019-11-29 22:40:00
I am very new to JWT and I ended up inheriting a codebase which makes use of JWT. Now there are some very fundamental problems which I am facing and I am not finding any answers. This question is not code based so please bear with me. Let us say that my JWT token is valid for 4 hours. Here are my requirements/constraints If a user is working at 3 hours 59 minutes. their session should get extended by 2 hours and they should not be required to re-enter credentials. The client side java script must not cache the user credentials in any way. It is OK to refresh the JWT token with a new one... but

Meta-refresh doesn't work?

泄露秘密 提交于 2019-11-29 22:09:56
I have a page using something along the lines of <meta http-equiv="refresh" content="0;url=http://example.com/" /> but for certain users on a certain workstation this doesn't work. The is in IE. Is there something wrong with cookies or a setting somewhere which would cause this to fail? I never heard of such a thing. The problem is that when IE sees this: <meta http-equiv="refresh" content="0;http://www.example.com" /> it expects the contents attribute to contain a number. The only time IE will check for a URL is if the content attribute contains "URL=" so the redirect that is most usable in

PHP refresh window? equivalent to F5 page reload?

给你一囗甜甜゛ 提交于 2019-11-29 18:31:01
问题 Is there anything in PHP that is the equivalent of manually pressing the F5 page reload button? My php script is in a frame and isn't the parent script but it needs to refresh the entire page and not just it's frame. 回答1: With PHP you just can handle server-side stuff. What you can do is print this in your iframe: parent.window.location.reload(); 回答2: Actually it is possible: Header('Location: '.$_SERVER['PHP_SELF']); Exit(); //optional And it will reload the same page. 回答3: If you have any

PHP header(“Refresh”) problems

放肆的年华 提交于 2019-11-29 18:10:02
I have some code like: header('Refresh: 15; url=' . $url); This works fine, except when people are visiting this url via Twitter (posted from a Hootesuite client). Apparently, in all browsers other than IE this works properly. With IE, from the Hootesuite link, this does not refresh properly; a direct link does. Why? I always advocate a combination to avoid problems with the inevitable WebTV user: Header (as you're doing) Meta tag (in the HTML head) Javascript timeout If the Twitter client is using a link shortener, the type of redirect may be influencing IE in an unanticipated way. It turns

Refresh image in Tkinter window

Deadly 提交于 2019-11-29 17:40:16
I am building an application to continuously display an image fetched from an IP camera. I have figured out how to fetch the image, and how to also display the image using Tkinter. But I cannot get it to continuously refresh the image. Using Python 2.7+. Here is the code I have so far. import urllib2, base64 from PIL import Image,ImageTk import StringIO import Tkinter URL = 'http://myurl.cgi' USERNAME = 'myusername' PASSWORD = 'mypassword' def fetch_image(url,username,password): # this code works fine request = urllib2.Request(url) base64string = base64.encodestring('%s:%s' % (username,

Meteor Page Refreshing with Button Click

微笑、不失礼 提交于 2019-11-29 17:01:10
I was following some code here: http://code.tutsplus.com/tutorials/real-time-messaging-for-meteor-with-meteor-streams--net-33409 To build a chat app. I wanted to add another text input box that also sent items to the chatbox but whenever I press another button a created. In other words there are two input boxes for one chat box. When I press one button it works, when I press the other button it refreshes the page and removes everything previously in the chatbox. Any help would be excellent. <!-- Chat Box with chat messages and the input box --> <template name='chatBox'> <div id='messages'> {{

I have a bar chart which I want to update and I tried the revalidate and repaint methods but with no success

老子叫甜甜 提交于 2019-11-29 16:57:38
class GraphGenerator1 extends JPanel { ChartPanel chartPanel, sbc; void generator(int t, int Value1, int Value2) { if (t == 1) { DefaultCategoryDataset gData = new DefaultCategoryDataset(); gData.setValue(Value1, "What you saved", ""); gData.setValue(Value2, "What you paid", ""); JFreeChart chart = ChartFactory.createBarChart("", "", "", gData, PlotOrientation.VERTICAL, false, false, false); chart.setBackgroundPaint(Color.WHITE); BarRenderer br = (BarRenderer) chart.getCategoryPlot() .getRenderer(); br.setBarPainter(new StandardBarPainter()); br.setSeriesPaint(0, Color.decode("#97d95c")); br