File used by another process
Is there a way to check if a file is in use?
How can I find out when Windows was last restarted? How can I know when my computer running Windows 7 was last restarted?   I prefer a solution that doesn't involve searching the event log, but something like wmic or maybe cmd commands. Why are naturals < modulus equal if congruent? [uniqueness of remainder] Let $a$, $b$, and $n$ be integers with $0 \le a \lt n$ and $0 \le b \lt n$. Suppose $a \equiv b \pmod n$. Then $a-b=0$ and $a=b$. Why does the congruence of two non negative integers imply that they must be equal? How do I use F3 to get my coordinates when my laptop makes F3 a special key? Words with different meanings in American and British English This is similar to , but not quite the same.  There are quite a few words which have totally different meanings in American and British English and which are likely to cause confusion when heard by non-local speakers.  What are they?  We are looking for the same word with different meanings (for example jumper), and not words which are different between the two dialects (for example truck and lorry). Shell script works when saved with nano but not when saved with Notepad++ When I copy my bash script across from Notepad++ into a new file with nano editor inside SSH and save. It runs fine. (sh ./install).   But if I save the file (Exact same contents), upload to my web server, download it using Wget on the same machine. I get syntax errors. I've checked the encoding and they seem to be the same. I have since used a plethora of character encoding to see if it will resolve the issue. I am also setting the file to executable once I download it using wget!  The file runs fine and I have zero errors when copy and pasting using nano. Any idea what this may be? How is it the Voyagers are a few seconds closer to Earth than earlier? The  of March 01, 2013 put it's distance at 14 hrs 04 mins 23 secs of light-travel time from Earth. A  (earlier today) tweet says it is 14 hrs 04 mins 22 secs of light-travel time from Earth. An  tweet put it still further out at 14 hrs 04 mins 25 secs of light-travel time.  The Voyager 2 tweets on Voyager 1's proximity to Earth too has reduced similarly to  earlier today from  reported on Feb 28 2013  It could quite simply be a typo ... If not a typo then my curiosity is piqued; I was under the impression the Voyagers are outbound from the Solar System now without any major in-system activities now.   How is it the Voyagers are closer to Earth than before? I am wondering if there is away (possibly a better way) to order by the order of the values in an IN() clause.  The problem is that I have 2 queries, one that gets all of the IDs and the second that retrieves all the information. The first creates the order of the IDs which I want the second to order by. The IDs are put in an IN() clause in the correct order.  So it'd be something like (extremely simplified):  SELECT id FROM table1 WHERE ... ORDER BY display_order, name  SELECT name, description, ... WHERE id IN ([id's from first])   The issue is that the second query does not return the results in the same order that the IDs are put into the IN() clause.  One solution I have found is to put all of the IDs into a temp table with an auto incrementing field which is then joined into the second query.  Is there a better option?  Note: As the first query is run "by the user" and the second is run in a background process, there is no way to combine the 2 into 1 query using sub queries.  I am using MySQL, but I'm thinking it might be useful to have it noted what options there are for other DBs as well. I'm currently doing a couple of exercises on logarithmic expressions, and I was a bit confused when presented with the following: $5^{\log_5 17}$.  The answer is $17$, which is the argument of the logarithm in the exponent, but I don't understand the reason why.  A previous question in the exercise was $12^{\log_{12} 144}$, which is pretty straight forward since $\log_{12} 144=2$ and $12^2=144$ but since $\log_5 17$ is an irrational number, I couldn't calculate it the same way.  So my question is, why is $x^{\log_x n}=n$?  [Update]  I've now managed to reason this out and realized how simple it is.  Basically, if $y=\log_x n$, then $y$ is the number that  $x$ must be raised to to become $n$; therefore, if I raise $x$ to that power $y$, I will naturally get $n$.  I guess my problem was that I tried to work out the question mechanically instead of intelligently and that's why I failed, because once I realized that I can't calculate $\log_5 17$, I was stumped.  Now that I reasoned it out, as explained in the previous paragraph, I understand it. Projectile/orbital motion over very long distance We know the optimum angle for greatest horizontal displacement when launching an object with projectile motion is 45 degrees.  How to solve the angle when it is real long distance around the earth where we cannot assume that gravity is constant but is given by $F=\frac {-GMm}{r^2}$. I use differetial equation to solve it and obtain 45 degrees.   First, for the vertical distance $y$, change $v=u-gt$ to $y'=u-y''t$. Then solve it to obtain a function $y(t)$. When $y'(t)=0$ we have the time for maximum vertical distance. Then insert the value to horizontal equation.   Can anyone guide me through this problem because I am not confident with my working I just dropped my Vaporeon off at the gym, but to my surprise, he can still be viewed in my Pokémon list! The buttons are there to level him up, but I'm not gonna be able to get any Eevee candy for a few hours to try. Can I level him up while he's in the gym? Securing WMS against unauthorized access? In a project the customer wants the images of the WMS to be secured against unauthorized access.   What are the common solutions to realize that?   Are they compatible with the OGC-standards? What is the closed form of $\int e^{x^2} \, dx$? How can I do a closed form expansion of $\int e^{x^2} \, dx$? Please be specific as to which method I must use. This question has come up    ( ), but I'm finding the answers to be generally incomplete. The general question is "Why does/doesn't my job get killed when I exit/kill ssh?", and here's what I've found.  The first question is:  How general is the following information?  The following seems to be true for modern Debian linux, but I am missing some bits; and what do others need to know?   All child processes, backgrounded or not of a shell opened over an ssh connection are killed with SIGHUP when the ssh connection is closed only if the huponexit option is set: run shopt huponexit to see if this is true. If huponexit is true, then you can use nohup or disown to dissociate the process from the shell so it does not get killed when you exit.  Or, run things with screen. If huponexit is false, which is the default on at least some linuxes these days, then backgrounded jobs will not be killed on normal logout. But even if huponexit is false, then if the ssh connection gets killed, or drops (different than normal logout), then backgrounded processes will still get killed.  This can be avoided by disown or nohup as in (2). There is some distinction between (a) processes whose parent process is the terminal and (b) processes that have stdin, stdout, or stderr .  I don't know what happens to processes that are (a) and not (b), or vice versa.   Final question: How can I avoid behavior (3)?  In other words, by default in Debian backgrounded processes run along merrily by themselves after logout but not after the ssh connection is killed.  I'd like the same thing to happen to processes regardless of whether the connection was closed normally or killed.  Or, is this a bad idea?  Edit: Another, important way to keep jobs of being killed, that works (?) in either case is to run them through .  But, the question is more about understanding when things get killed and when they don't: sometimes people want the jobs to be killed on logout, for instance.  More threads: -  -  -  -  -  -  -  - What does bookmarking a question mean? How do you bookmark a question? Do users get updates on their bookmarked questions? Are my bookmarks publicly visible? How do you see your own bookmarks? How do you see other users' bookmarks? How do you see which users have bookmarked a particular question? What impact does the bookmark system have on the voting system? Can I &quot;un-bookmark&quot; a question? Can I search within my bookmarks? Email SMTP validator I need to send hundreds of newsletters, but would like to check first if email exists on server. It's called  validation, at least I think so, based on my research on Internet.    There's several libraries that can do that, and also a page with open-source code in  (), but I have hard time reading ASP Classic, and it seems that it uses some third-party library...    Is there some code for SMTP validation in C#, and/or general explanation of how it works? The world I've been playing crashed recently and took the level.dat with it, so I've recreated it, however I have no idea what my seed used to be, and I really don't want to end up with another corrupted game world from exploring with the wrong seed.  How can I recover the seed which was used to generate my world? Identifying selected feature using PyQGIS? How can I fix a geoTiff with an incorrect CRS? Trying to load and plot a raster (it's a DEM) in R, but having problems.    Using R I read in a raster file:  library(raster)  dem &lt;- raster("DEM_Victoria.tif")  # &gt;70 MB print(dem)  class       : RasterLayer  band        : 1  (of  3  bands) dimensions  : 5444, 6007, 32702108  (nrow, ncol, ncell) resolution  : 100, 100  (x, y) extent      : 176615.6, 777315.6, 5650397, 6194797  (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +ellps=WGS84 +no_defs  data source : DEM_Victoria.tif names       : DEM_Victoria values      : 0, 255  (min, max)   My confusion here is the extent vs the CRS. The extent shows coordinates from a UTM Zone 55S system, while the CRS reports it as longlat.   Similarly, gdalinfo reports:  Driver: GTiff/GeoTIFF Files:  DEM_Victoria.tif Size is 6007, 5444 Coordinate System is: GEOGCS["GDA94",     DATUM["unknown",         SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433]] Origin = (176615.587999997427687,6194797.138000000268221) Pixel Size = (100.000000000000000,-100.000000000000000) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   COMPRESSION=LZW   INTERLEAVE=BAND Corner Coordinates: Upper Left  (  176615.588, 6194797.138) (Invalid angle,Invalid angle) Lower Left  (  176615.588, 5650397.138) (Invalid angle,Invalid angle) Upper Right (  777315.588, 6194797.138) (Invalid angle,Invalid angle) Lower Right (  777315.588, 5650397.138) (Invalid angle,Invalid angle) Center      (  476965.588, 5922597.138) (Invalid angle,Invalid angle) Band 1 Block=6007x1 Type=Byte, ColorInterp=Red Band 2 Block=6007x1 Type=Byte, ColorInterp=Green Band 3 Block=6007x1 Type=Byte, ColorInterp=Blue   Is this real? A problem? (well it is to me, but perhaps because I don't understand something) Fixable?  I tried 'Assign projection' in QGIS, which uses this command:  gdalwarp -t_srs EPSG:28355 -srcnodata -32768  DEM_Victoria.tif DEM_Victoria.tif.tmp   but it failed with:     ERROR 1: Too many points (12100 out of 12100) failed to transform,   unable to compute output bounds. is there a way to request a new tag be created? Possible Duplicate:          I do not have sufficient reputation on any site to create new tags, but I do on occasion find myself in need of a tag that does not exists.  Is there a feature that allows for a person with sub-1500 reputation to request a new tag? Newton's cradle