refresh

How do you update the screen after you change the text with a setText?

跟風遠走 提交于 2019-12-11 00:19:28
问题 Right now I am using the following code to update a TextView txtMain.setText("new text"); After that code executes, the screen does not update with the new text. Is there a way I can force the text to update right then and there? 回答1: After that code executes, the screen does not update with the new text It should, once you return control to Android. Suppose, for example, you tried doing a Thread.sleep(5000); immediately after the setText() call. The text will not appear on the screen,

CURLOPT_FOLLOWLOCATION not working

半世苍凉 提交于 2019-12-10 23:58:32
问题 I'm trying to scrape the data at this link: http://www.treasurydirect.gov/NP/BPDLogin?application=np which contains a meta refresh. I'm using curl_exec with CURLOPT_FOLLOWLOCATION set to true. In phpinfo() I confirmed that safe mode and basedir are not set. However CURLOPT_FOLLOWLOCATION is still not working. Here's my code: <?php error_reporting(E_ALL); $url = 'http://www.treasurydirect.gov/NP/BPDLogin?application=np'; // READ THE WEB PAGE $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url)

Start and Stop a javascript refresh

帅比萌擦擦* 提交于 2019-12-10 20:19:04
问题 I have a page that needs to be refreshed every 60 seconds. On this page I am using iBox to popup various items. My problem is that a meta refresh kills the popup which is not wanted. Please keep in mind I have zero to little experience with javascript so my solution may be fundamentally wrong. The solution I came up with is to use javascript to do the refresh. When the page loads I will start the timer, when an ibox pops up I will clear the timer, when the ibox closes I will start the timer

Rails: Ruby debugger shows old code unless I stop the server and start it again

为君一笑 提交于 2019-12-10 19:08:47
问题 Using ruby-debug, when I issue a list command, it shows old code. So if I update the code surrounding (especially before) the debugger command in the model it still shows the old code. The only way I have found to 'refresh' this code is by stopping the server and running it again. Is there a better way? Thanks, Josh 回答1: Can't you just do a reload ? You can also set a flag for auto-reloading but never tried it myself (I tend to use Netbeans now) 来源: https://stackoverflow.com/questions/2449705

@font-face won't load when visiting the site for the first time, must refresh/reload

旧街凉风 提交于 2019-12-10 17:53:16
问题 I've properly configured the CSS file using the http://www.fontsquirrel.com/fontface/generator kit generator and css codes, uploaded the font files in the right directory. The fonts work perfectly fine on my website after refreshing once entered for the first time even while switching between pages, it's just that first time that the fonts don't show when entering the website until you refresh the page, happens in both Firefox and Chrome. css code in the top of my CSS file: @charset "utf-8";

Testcafe how to reload actual page

淺唱寂寞╮ 提交于 2019-12-10 17:53:16
问题 Is there a way to reload the actual tested page I'm visiting in TestCafe and not the site that TestCafe is running under. I've tried using: await t.eval(() => location.reload(true)); but that just reloads the server page that Testcafe uses. So for example, if I test www.google.com, the URL in the browser after I launch TestCafe will be something like http://172.16.0.152:58486/Qf6eMxOvA/https:/www.google.com/ That is the site that reloads when I execute the code above. Is there a way to force

changing <ul> to <ul data-role=“listview”>

▼魔方 西西 提交于 2019-12-10 16:15:40
问题 I have a list which I'm displaying with icons and title only - no JQM formatting. If the screenwidth is below 320 px, I want to convert the list into a JQM <ul data-role="listview"> list. I can add the attribute via Jquery, but when I call $('.menuList').listview('refresh'); I get the following error: cannot call methods on listview prior to initialization; attempted to call method 'refresh' Any clues as to what I'm doing wrong? Thanks! Frequent HTML: <ul class="menuList"> <li> <div> <a href=

C# WPF refresh listbox from another window

感情迁移 提交于 2019-12-10 15:55:17
问题 I'm making a WPF project based on an Access database. The database has two tables: tblMovies (MovieID: PK, Title, Director, Genre etc) tblActors (ActorID: PK, MovieID: FK, Firstname, Lastname etc) I have listbox where I can see all the movies, and if I click on one, it shows a new window with all the details about that movie: the title, director, genre, but also the actors. In this window I have added a button to create a new actor. This opens a new window where you can enter the MovieID (FK)

PHP - Session_Destroy upon pressing Back button

﹥>﹥吖頭↗ 提交于 2019-12-10 15:28:41
问题 Here is my issue: I have a login page called login.php (containing no HTML code). When the user types in his credentials correctly he's redirected to a specific page; we'll say test.php for this example. The only links on that page logout of the current session, and return the user to index.html. My problem is that if the user presses the back button, it goes back to login.php and you get a blank page. If you navigate away from that blank page you have no way to get back to test.php thus no

Page refresh in case of javascript errors

时光怂恿深爱的人放手 提交于 2019-12-10 13:57:50
问题 I have some pages running javascript for displaying updates of different measure values. These stuff seems to run fine. But - there is always the risk that javascript can crash in case of a fault (especially after running some hours) So I want to implement a simple kind of watch dog. One of my ideas is to use a meta-refresh-tag. The Browser will reload the site after xy minutes and all javascripts will be reinitalized. Of course I do not want to refresh the site if no error occured and want