For the close everything crowd: This is not a duplicate of the question  because there may be multiple java.exe processes running (as they are in my case) and I need only to check for the specific jar. That's why I have written jar java application in the title.    I have a "Minecraft server" icon on my desktop that starts Spigot minecraft server. I use such run.bat file to do the job:  :start java -Xmx1024M -Xms1024M -jar spigot-1.8.7.jar pause goto start   It's infinite loop to make server restarting simpler. Now it sometimes happens that I, or somebody else who's using the computer, try to start the server while it's already running. I would like to prevent this from happening. Something along:  IF spigot_server_running (     echo The server is already running. If you can't connect, try to check the console window for errors.     echo if all else fails, terminate the java process from task manager.     pause     exit 1 )   What can I do to detect it? I guess list of running processes can be parsed similarly to what Linux's grep does. But isn't there some command line tool for this distributed along with java JRE or JDK? I wouldn't install extra program for this task but I would prefer official Java API. But remember it must work with batch or Windows CScript files.
How can I check if an application is running from a batch (well cmd) file?  I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.)  Also the application could be running as any user.
What language should I speak to my daughter? I am a Greek, born, living and working in France, married to an Albanian woman, working all day in English.  I have a 2,5 year old daughter, who lived from:    September 2014 to April 2015 and February 2014 to April 2014   in Albania (11 months, approx. 36% of her lifespan), where people only talked albanian to her.  I speak only French with my child, BUT I only speak Greek with my wife, because she refuses to speak French with me, because she is insecure in French. Yet, my wife speaks Albanian to my child.  These facts lead to the circumstance, that the language development of my child seems a bit delayed, because she doesn't yet make three word sentences.  Though I am a little worried about her language development, I want to know, if there is a problem if I also start speaking English to her on a regular basis, since I heard that children are capable growing up learning different languages.  Is there something like a burnout/depression danger in children? Since I can see it in her eyes that she wants to communicate but is not able to and I can see it bothering her a lot.  Should I cut my communication with my daughter down to only French? Should I cut it down to speaking Greek with her, since this is the language I speak with her mother every day? Or should I just continue mixing everything up? Or can I even start speaking English with her?  I don't want her to struggle to the point of extreme frustration, but if this means that in the end, her language development will catch up to normal kids, I am inclined to let her struggle a bit. So are there any longterm deficits for her, if I introduce English?  Please advice.  George How do I vertically center a single cell within a table? How can I programmatically change the active theme? How can I programmatically change the active Drupal 8 theme?  In Drupal 6, we used the following code.  global $custom_theme; $custom_theme = 'garland';   In Drupal 7, we used hook_custom_theme().  In Drupal 8, what's the correct way to do this? Preserve blend mode effect when underneath layers are disabled? (Photoshop) Best way to migrate a huge SQL Server database with low downtime over network Problem definition  Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB.  Having little to no downtime for this would be ideal.  Workload  Those databases are used for a .NET website and are constantly getting updated.   Having it not available over the weekend would be acceptable though. The currently in use DB would remain the only one in use until the switch over to the new one.  That switch would ideally be made just by changing DNS entries to point to the new DB server while making sure the DB is not being updated.  Also, time taken by this operation does not really matter as long as the switch from one server to the other (downtime) is kept low.  Approaches considered   Backup and restore  This has been done in the past but involved a high downtime even though it was done through an internal network, so more efficiently than through Internet Log shipping  As far as I understand, this approach would minimize downtime by configuring a master/slave and transferring  an exact copy of the master DB to its slave being read only. As mentioned above, no access to the slave would be necessary and we just need a way to have a replica of the master DB without data corruption.   It also seems to be quite efficient in terms of resources utilization and wouldn't impact to much the master performance.   I might be wrong about this approach so feel free to correct me. Database mirroring  I'm not too aware of that approach but it seems like a valid option. No need to have real time sync and performance of the master is quite important so asynchronous would be the way to go if this approach were to be chosen. Other options?  That server runs directly on bare metal hardware so lower level solutions are unfortunately not an option. Maybe there is a better way to get this done?   Constraints  As described, those databases are quite big to the point they are hard to maintain but that's an other problem.  The versions of SQL Server will be the same (Microsoft SQL Server 2012 Enterprise 64-bit).  It will have to be transferred over network between two datacenters so most probably over Internet. Having disks sent from one site to the other for an initial sync is unfortunately not an option. Having some sort of security for the transfer would be ideal but we will do the best of this situation.  That should give a quite good overview of our needs for this task and hopefully some of you had to face that situation before. Fibonacci Sequence and series limits 1) Let $F_1 = 1$, $F_2 = 1$, and $F_n = F_{n-1} + F_{n-2}$ for $n \geq 3$.   How do you prove that  $$\sum_{n=2}^\infty \frac1{F_{n-1} F_{n+1}} = 1$$   $$\sum_{n=2}^\infty \frac{F_n}{F_{n-1} F_{n+1}} = 1$$   Do you even use the formula $n(n+1)/2$?   I tried using $F_{n-1} = F_n - F_{n-2}$ and $F_{n+1} = F_n + F_{n-1}$ and then trying to figure out how to substitute those, but I've been going around in circles. How would you solve this? What tips can you give me to solve this? Is there any website that teaches this? I tried searching google and youtube but none were helpful.   2) Let $s_x = \tan(2/x)$. Where does this become nonincreasing? While using monotonic limits to establish there is a limit.   I was guessing you need to use upperbound and lowerbound but doesn't it go to infinity? Okay, maybe I'm missing something obvious but consider $h_n(x) = x^{ 1+ \frac{1}{2n-1}}$ on the set $[-1,1]$. Now consider a fixed $x \in [-1,1]$, we have:  $$\lim_{n\rightarrow \infty} h_n(x) = x \lim_{n \rightarrow \infty} x^\frac{1}{2n-1} = x$$  But my book says it's $|x|$? Why? Headers of \chapters* take the headers of their previous \chapter When using book.cls and using \chapter* after a \chapter, the header used in \chapter* is wrong. An example is pasted below.   Is there any known workaround for that? I have tried quite some tricks without success.   \documentclass[]{book}  \begin{document}  \chapter{First Chapter} aslkjdf  \chapter*{Unnumbered Chapter} The GNU General Public License is a free, copyleft license for software and other kinds of works.  The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.  When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.  To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.  For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.  Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.  For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.  Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.  Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.  The precise terms and conditions for copying, distribution and modification follow.  \end{document} Are Constitution changes retroactive when calculating max HP? Lets say I'm a fighter that just leveled up to level 4, and decide to bring my Constitution up from 16 to 18. How many hit points do I have?  Level 1 = 10 (base) + 3 (Con mod) = 13.  Level 2 = 10 + 6 (average HP per fighter level) + 3 (Con mod) x 2 = 22  Level 3 = 10 + 6 (average) x 2 + 3 (Con mod) x 3 = 31  Level 4 = 10 + 6 (avg) x 3 + 3 (Con mod) x 3 (3 level-ups) + 4 (increased Con mod, which is now 4) x 1 = 41?  OR  Level 4 = 10 + 6 (avg) x 3 + 4 x 4 (4 times current Con mod) = 44?  If it's the first option, it's simply better to level Constitution up at earlier levels. How Special Relativity causes magnetism While playing Phase Ten, is it legal to pick up the top card of the discard pile and then immediately discard that exact card? How can you enumerate an enum in C#?  E.g. the following code does not compile:  public enum Suit {     Spades,     Hearts,     Clubs,     Diamonds }  public void EnumerateAllSuitsDemoMethod() {     foreach (Suit suit in Suit)     {         DoSomething(suit);     } }   And it gives the following compile-time error:     'Suit' is a 'type' but is used like a 'variable'   It fails on the Suit keyword, the second one. Consider:  I need to do this. I need do this.  My English grammar knowledge tells me that &quot;need&quot; doesn't have the same status as the modal verbs &quot;may&quot;, &quot;can&quot;, &quot;should&quot; and what not. Hence the second usage where two verbs appear consecutively is incorrect. But yesterday, my native English speaking friends (Americans) told me that &quot;I need compute this.&quot; is a perfectly grammatical sentence, and one is simply omitting the &quot;to&quot;. How can this be? Is it a colloquial usage but grammatically incorrect, or is it grammatically correct? If it is grammatically correct, is it because &quot;need&quot; is a semi-modal verb? EDIT: in particular, is it okay to use &quot;need compute&quot; in a scientific paper? EDIT2: the exact phrase that raised the question was &quot;The advantage of this representation is that we need only compute sums and products&quot; If $-1&lt;x&lt;1$ show that $\lim\limits_{n \to \infty}{n\,x^n} = 0$. I don't have idea. I only prove that $n\,x^n$ is decreasing. Forms Data Manipulation In Google Sheets I'm trying to develop a solution using Google Forms with Google Sheets that will collect Google Forms data and then automatically divide that one form submission's data into multiple rows of data in another sheet.   I've learned how to QUERY data (thanks to many of you on here) from one sheet to another, but I don't know how to automatically divide 1 row of data into multiple rows.  Here is a  in a visual manner (I will not delete it).   Basically, I have one Google form that collects the following.    Teacher Information (header data) Report Name (header data) Class Information (header data) Student#1 Data (record data: Multiple Form Fields) Student#2 Data (record data: Multiple Form Fields) Student#3 Data (record data: Multiple Form Fields) Student#4 Data (record data: Multiple Form Fields) Student#5 Data (record data: Multiple Form Fields)   I need an automated way to convert that single form response (1 row) into multiple rows (5 rows) each with the same 'header data' but with unique record date.   EXAMPLE Form Data  Header Data  -  Record Date (Student #1)  -  Record Date (Student #2)  -  Record Date (Student #3)  -  Record Date (Student #4)  -  Record Date (Student #5)   EXAMPLE Desired Manipulated Data      Header Data  -  Record Date (Student #1)     Header Data  -  Record Date (Student #2)     Header Data  -  Record Date (Student #3)     Header Data  -  Record Date (Student #4)     Header Data  -  Record Date (Student #5) Split Excel table over multiple PowerPoint slides I have a table in Excel which is too long for one PowerPoint slide. So I would like to split it over 2 or 3 slides, but have the header on each of the slides. What is the easiest way to accomplish that? I am using Excel and PowerPoint 2007. How to combine measurement error with statistic error NSString question - rangeOfString method What causes these inconsistent dark bands in some of my photos from an indoor event? Yesterday I took photos of an event at school.  The lighting was poor so I increased the iso to 3200, shutter speed was between 80 and 250 and the aperture between 2.8 and 4.0.  Canon EOS500  about 10% of the photos got this weird horizontal black area. The position of the black area is not the same,  Sometimes it is in the middle, sometimes it is in the upper or lower part of the frame  Is this an artifact from the lighting frequency? or can it be a shutter problem? What are the rules about using an underscore in a C++ identifier? It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use m_foo. I've also seen myFoo occasionally.  C# (or possibly just .NET) seems to recommend using just an underscore, as in _foo. Is this allowed by the C++ standard?