One of our websites has a glitch which occasionally takes it down - the back end needs to be restarted.  The replacement is not yet ready for production, so I've created a VBS script which polls the server and restarts the server if:  a) The HTTP status code &lt;> 200, or b) The page loads but a substring is not found on the page.  The HTTP status check times out if the tomcat service fails to respond; I would like to call a function if that occurs.  Is it possible to capture and handle a timeout?  This is a snippet of my relevant code pieces.  xmlhttp.setOption 2, 13056 xmlhttp.open "get", "https://www.mywebsite.com/thisurl", false xmlhttp.send  if xmlhttp.status &lt;&gt; 200 then     call restartTomcat()     call emailAlert() end if   Thank you in advance.
I want to use VBScript to catch errors and log them (ie on error "log something") then resume the next line of the script.  For example,   On Error Resume Next 'Do Step 1 'Do Step 2 'Do Step 3   When an error occurs on step 1, I want it to log that error (or perform other custom functions with it) then resume at step 2. Is this possible? and how can I implement it?  EDIT: Can I do something like this?   On Error Resume myErrCatch 'Do step 1 'Do step 2 'Do step 3  myErrCatch: 'log error Resume Next
Making a HUD/GUI with OpenGL (LWJGL) How to find stopping distance of a car? A ring $R$ is a Boolean ring provided that $a^2=a$ for every $a \in R$. How can we show that every Boolean ring is commutative? How to remove all white spaces just between brackets [] using Unix tools? Why are hexadecimal numbers prefixed with 0x? Can I speed up iCloud photo sync between iPhone and Macbook? I have an iPhone 5 running iOS 9.1 and a Macbook Pro running Yosemite.  Both devices are set up to sync photos to and from iCloud.  When I take a photo on the iPhone (for further processing on the Macbook), it takes an inordinate amount of time until the photo shows up in the Macbook's photos library - sometimes up to 10-20 minutes. Sometimes it seems to work faster if I quit the Photos app on both devices, and start it again.  I often end up sending myself photos through E-Mail because it's quicker. That seems ridiculous!  Is there a way to force a sync on the iPhone, or to speed up the process some other way? Invalid Data Source when importing geojson to QGIS Im trying to import geojson, I add data, select protocol and use the uri  QGIS says "Invalid Data Source:  is not a valid or recognized data source"  I've followed the tutorial here  but I cant get the data to come in, any ideas? I'm using QGIS version 2.18.13 How to change the style of the title attribute inside an anchor tag? Combinatorial proof of $\sum_{i = 0}^{n} \binom{i}{r - 1} = \binom{n + 1}{r}$ and then use result to find a formula for $1^2 + 2^2 + \ldots + n^2$ Why is voltage same for the two resistors connected parallel in circuit? We know that the electric field inside resistor produced by battery is the actual thing that pushes the electrons in it to move and thus producing some current. We also know that strength of electric field can be described by the electric flux which is the total amount of fields passing through an area. That flux when combined(multiplied) with charge of electron gives the amount of force on it. Now comes our two resistors R1 and R2. Assuming a number of field lines coming out of a terminal going towards another terminal through these resistors, the field lines should get divided into the resistances R1 and R2. Therefore giving a reduced flux through each resistor than in a series. Which will then give a lower voltage for both resistors. Wasn't the electric fields strength divided across resistors in parallel? What is the main cause of voltage? How electrons get a force to produce current even when the wire is very long in? I think it is better to understand with reality than analogy. Please don't give misleading pictures Windows 8.1 64-bit: High memory usage I have 8GB of memory on a 64 bit windows 8.1 machine, and windows is telling me I'm using 91% of my memory, yet its simultaneously telling me I'm only using 3GB.  I literally just restarted my machine a few minutes ago because it was being incredibly rediculously slow. I'm currently only running chrome (with a ton of tabs, but doesn't add up to anywhere near 7.5GB). What could be going on here?   Here's a bunch of my current info       I took a look at this:  but I wasn's able to use xperf and the rest didn't lead me to a solution.  UPDATE - RamMap:   UPDATE 2: I checked Resource Monitor at Wouter's suggestion and found an "Image" called lxdecoms.exe with over 6GB of Commt (KB). I tried killing the process, but while it lowered my Commit Charge, it didn't affect "Used Physical Memory". So I restarted hoping to capture it again in full, but its not back yet and yet the problem persists.  I should note that I do have a Centos virtual box virtual machine running on my machine, not sure if that has any weird memory impacts that aren't reflected in the numbers in these tools.   I got xperf working, so here's my resource monitor and a wpa analysis of my xperf output (from xperf -on ReferenceSet -BufferSize 1024 -MaxFile 512 -FileMode Circular  &amp;&amp; timeout 5 &amp;&amp; xperf -d MemUsage.etl):     What is N/A that's taking up 2.7GB of memory? My VM? I started learning Bash a couple of days ago.  I'm trying to obtain an exit status of grep expression into a variable like this:  check=grep -ci 'text' file.sh   and the output that I got is   No command '-ic' found   Should I do it with a pipe command? Does deleting iCloud photos affect them on devices? If I delete a photo from my iCloud will it also be removed from my devices that are connected to my account? Layover in Europe to the US - allowed? Many people have asked questions on this site regarding the rules for layovers, with no definitive answers. The rules are constantly in flux and it is very difficult to get a clear answer from government websites. I would like to buy a plane ticket for my mother-in-law (who has a visa) from Ukraine to the US. Most available flights have at least one layover in Europe. My understanding is that EU countries (minus some special cases and US citizens) are currently banned from travel to the US. If we buy a ticket with a layover in, say, Switzerland, can there be a problem? Is this allowed under current rules? Auto comment "possible duplicate of ..." missing on voting to close as duplicate Please refer to the following question:    The  had posted an  a while back.  I posted a comment referring to the same and voted to close the question as a duplicate of the referenced question.  Surprisingly, an auto comment saying "possible duplicate of ..." was not generated.  I agree that the referenced question shows up in the linked questions list but an auto comment ought to be generated.  Seems like a bug.    EDIT: I understand that the above behavior is by-design.  However, I'd say that the behavior in the following case should also be the same:  It's interesting to see that the auto comment would be generated if you were to add a comment linking to an answer and then voting to close the question as duplicate.  For example, observe the following question: How do you set, clear, and toggle a single bit? How do you set, clear, and toggle a bit? Notify on retagging A question here on meta for instance may stick around for quite a while. A feature-request  maybe even for months. Then the status (tags) gets changed to  or  or whatever and the OP does not get notified.  On a normal post-edit we get a notification but retagging does not count for that. Please add retagging to the edit notifications. Why do some questions in question lists have a yellow background? On SO, when I'm scrolling through "questions" some have a yellow background.  Is this intuitive to everyone but me?  What is the yellow background trying to tell me about this particular question? Airplane ground speed and direction, given airspeed and wind An airplane heads northeast at an airspeed of 900 km/hr, but there is a wind blowing from the west at 60 km/hr. In what direction does the plane end up flying? (angle). What is its speed relative to the ground?   I drew a picture. I think I am having a hard time understanding how to solve the problem. I want to add the wind vector to the plane vector - is that as simple as 840 km/hr? After really adding the vectors together, do I do: (added vectors)cos(45)? Are numbers in which all substrings are primes finite regardless of base?