freeze

javascript loop freezes browser and can't see change before loop

给你一囗甜甜゛ 提交于 2019-12-01 17:34:08
I have a simple javascript loop as you seen below: function runCode() { $("#sample-span").removeAttr("style"); for (var i = 0; i < 100000; i++) { console.log(new Date()); } $("#sample-span").toggleClass("colorized"); } That toggle class of span in the page as below: <span id="sample-span" style="color: orange;">Sample Text</span> <input type="button" value="click to run" onclick="runCode()" /> <style> span { color: blue; } .colorized { color: red; } </style> The problem is that when the loop is running the page freezes and can't see that span color changes. How can I solve this problem?

javascript loop freezes browser and can't see change before loop

泄露秘密 提交于 2019-12-01 17:10:05
问题 I have a simple javascript loop as you seen below: function runCode() { $("#sample-span").removeAttr("style"); for (var i = 0; i < 100000; i++) { console.log(new Date()); } $("#sample-span").toggleClass("colorized"); } That toggle class of span in the page as below: <span id="sample-span" style="color: orange;">Sample Text</span> <input type="button" value="click to run" onclick="runCode()" /> <style> span { color: blue; } .colorized { color: red; } </style> The problem is that when the loop

R freezes in Mac OS X Yosemite

夙愿已清 提交于 2019-12-01 16:48:06
I encountered this problem and there was no clear explanation about how to work around this bug. The latest version of R (v. 3.1.2) for OS X Mavericks freezes in Yosemite whenever I try to save a file which is written using R's internal editor. It also freezes when you try to source a function. Edit: This was supposed to be a self-answered question, but I found a better answer, so I marked that as the answer. I have run into the same problem. I haven't tried Metallica's answer but found the problem has 95% disappeared after installing the latest "patch" version of R , as found at att.com .

R freezes in Mac OS X Yosemite

拈花ヽ惹草 提交于 2019-12-01 14:59:05
问题 I encountered this problem and there was no clear explanation about how to work around this bug. The latest version of R (v. 3.1.2) for OS X Mavericks freezes in Yosemite whenever I try to save a file which is written using R's internal editor. It also freezes when you try to source a function. Edit: This was supposed to be a self-answered question, but I found a better answer, so I marked that as the answer. 回答1: I have run into the same problem. I haven't tried Metallica's answer but found

Python Pmw and cx_Freeze?

旧街凉风 提交于 2019-12-01 10:40:37
I am unable to make an executable from my python program which uses Pmw (Python mega widgets). I use cx_Freeze (through gui backend "Gui2Exe"). Searching Pmw site I've found that it's caused by how the Pmw library checks for modules when ran and it doesn't work when you use py2exe or similar programs because the libraries are in a zip file. More info can be found here: http://pmw.sourceforge.net/doc/dynamicloader.html So they give a solution in that page, under "Freezing Pmw", by providing a script which generates a single standalone Pmw module which you can easily freeze. However, that script

Inno setup: ExtractTemporaryFile causes wizard freeze

我是研究僧i 提交于 2019-12-01 08:47:00
问题 I've made custom pages to manage specific redist tools install depending on the user choice. Those tools are linked to checkboxes checked by the user if he wants or not install those tools. Then come a page only there to show the user the progression of the installation of each tool. The issue I have here is that the progress page is shown only when first ExtractTemporaryFile of the setups for the tools is done, showing the last page as if it has frozen. The only way I have to let the

Python Pmw and cx_Freeze?

不羁的心 提交于 2019-12-01 08:42:39
问题 I am unable to make an executable from my python program which uses Pmw (Python mega widgets). I use cx_Freeze (through gui backend "Gui2Exe"). Searching Pmw site I've found that it's caused by how the Pmw library checks for modules when ran and it doesn't work when you use py2exe or similar programs because the libraries are in a zip file. More info can be found here: http://pmw.sourceforge.net/doc/dynamicloader.html So they give a solution in that page, under "Freezing Pmw", by providing a

window.scroll function freezes firefox

橙三吉。 提交于 2019-12-01 05:20:58
I'm working on a page with a fixed menu that picks up after the user has scrolled a certain distance from the top, and as they scroll down the page, different links from the menu are given a class that changes the color. All of this seems to work well in Chrome and Safari, but in Firefox, the page freezes at the top. I'm wondering if it is looping through some code incessantly...essentially freezing the window. Here is my code. $.localScroll({ onBefore: function() { $('body').data('scroll-executing', true); }, onAfter: function() { $('body').data('scroll-executing', false); $(window).trigger(

window.scroll function freezes firefox

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 03:04:05
问题 I'm working on a page with a fixed menu that picks up after the user has scrolled a certain distance from the top, and as they scroll down the page, different links from the menu are given a class that changes the color. All of this seems to work well in Chrome and Safari, but in Firefox, the page freezes at the top. I'm wondering if it is looping through some code incessantly...essentially freezing the window. Here is my code. $.localScroll({ onBefore: function() { $('body').data('scroll

How can I call ajax synchronously without my web page freezing

≯℡__Kan透↙ 提交于 2019-11-30 15:51:59
I have some javascript that fires off about 100 calls to a php script. the php script uses up a lot of memory and takes a few seconds to complete, then returns a json response of pass or fail. I don't want the ajax calls to be asynchronous as the server would come to a grinding halt running 100 instances of itself, so I tried using synchronous, the only problem being it freezes the webpage while it calls the script one call at a time. How can I fire off the ajax calls one at a time and not freeze the page i'm on? var a = []; a[0] = 'test'; a[1] = 'hello'; a[2] = 'another'; $(document).ready