I need to check whether my window service is running or not every 15 minutes or so.   If it is not running, then how can I restart the windows service again?
I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if the service is running. How can I accomplish this?
What is the status of TTF support in Internet Explorer? Execute a program at login How can I hide the jqgrid completely when no data returned? Negative R squared contradicts ssa/sst? I understand from this question -    that the R squared value of a linear regression model can be negative if the intercept is constrained. And this makes sense if you define R squared as -   $$R^2 = 1-\frac{SSE}{SST}$$  One says $SSE&gt;SST$. But then,  $$SST = SSA + SSE $$ Total Sum of squares  = Sum of squared errors + Sum of squared residual. And with this we get -  $$R^2 = \frac{SSA}{SST}$$ And now it is hard to imagine how $R^2$ can be negative. Aren't SSA and SST >0 always? Once upon a time,  DISPLAY=:0.0 totem /path/to/movie.avi   after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop.  Now it gives the error:   No protocol specified Cannot open display:    I reinstalled Debian squeeze when it went stable on both computers, and I guess I broke the config.   I've googled on this, and cannot for the life of me figure out what I'm supposed to be doing.   (VLC has an HTTP interface that works, but it isn't as convenient as ssh.)  The same problem arises when I try to run this from a cron job. I have a script that needs to do some stuff based on file creation &amp; modification dates but has to run on Linux &amp; Windows.  What's the best cross-platform way to get file creation &amp; modification date/times in Python? Partition of N into infinite number of infinite disjoint sets? Is it possible to have a countable infinite number of countable infinite sets such that no two sets share an element and their union is the positive integers? Zooming to WMS layer after CQL filter in OpenLayers? I created a layer that contains points and I added it to a map as WMS layer in OpenLayers. I did a CQL filter and it works but I'd like to zoom to the selected point when I worked with getextent or getdataextent it doesn't zoom to the right place. It missed with a few Km. Here is my the code of filter:   function filterNom(){             var filterType ="cql";             var filter = document.getElementById('batima').value;             // by default, reset all filters             var filterParams = {cql_filter: null};             if (OpenLayers.String.trim(filter) != "") {                 if (filterType == "cql")                      filterParams["cql_filter"] = "batiment='"+filter+"'";              }             // merge the new filter definitions             wfs_layer.mergeNewParams(filterParams);             var bounds =  new OpenLayers.Bounds             bounds = wfs_layer.getExtent()             map.setCenter(wfs_layer.getExtent(),18);             var center = map.getCenter();             center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));             alert(center.toString()); }   and here is the code to add the WMS layer:    wfs_layer = new OpenLayers.Layer.WMS("Patrimoines",         "http:// localhost/geoserver/cite/wms",          {layers: 'cite:patrimoine' , transparent: true },         {isBaseLayer: false, opacity: 1, singleTile: true, visibility: true,          projection: 'EPSG:900913'}); I have a list of items   John ID Matt ID John ID Scott ID Matt ID John ID Lucas ID   I want to shove them back into a list like so which also means I want to sort by the highest number of duplicates.   John ID 3 Matt ID 2 Scott ID 1 Lucas ID 1   Let me know how I can do this with LINQ and C#.  Thanks All  EDIT 2 Showing Code:      List&lt;game&gt; inventory = new List&lt;game&gt;();     drinkingforDataContext db = new drinkingforDataContext();     foreach (string item in tbTitle.Text.Split(' '))     {          List&lt;game&gt; getItems = (from dfg in db.drinkingfor_Games                                where dfg.game_Name.Contains(tbTitle.Text)                                select new game                                {                                    gameName = dfg.game_Name,                                    gameID = Boomers.Utilities.Guids.Encoder.EncodeURLs(dfg.uid)                                }).ToList&lt;game&gt;();          for (int i = 0; i &lt; getItems.Count(); i++)         {             inventory.Add(getItems[i]);         }     }      var items = (from xx in inventory                  group xx by xx into g                  let count = g.Count()                  orderby count descending                  select new                     {                         Count = count,                         gameName = g.Key.gameName,                         gameID = g.Key.gameID                     });      lvRelatedGames.DataSource = items;     lvRelatedGames.DataBind();   This query displays these results:   1 hello world times 1 hello world times 1 Hello World. 1 hello world times 1 hello world times 1 hello world times 1 Hello World. 1 hello world times   It gives me the count and name, but it doesn't give me the ID of the game....  It should display:   6 hello world times   234234 2 Hello World.  23432432 Show that $n-m$ is a multiple of 9 when $n$ and $m$ have same digits I have just proved the divisibility rule for 3 and 9.  Let $n\in\mathbb{N}$. Let $m$ be a number that appears when you shuffle the digits in $n$. Show that $n-m$ is a multiple of 9.  Can anyone offer some help? How do I permanently allow a website to access my location? In iOS, I only need to be asked once whether I want to allow a website to share my location data. Is it possible to permanently do this in OS X version of Safari as well? How to give name to topics created using LDA? Selecting attribute values with html Agility Pack I'm trying to retrieve a specific image from a html document, using html agility pack and this xpath:  //div[@id='topslot']/a/img/@src   As far as I can see, it finds the src-attribute, but it returns the img-tag. Why is that?  I would expect the InnerHtml/InnerText or something to be set, but both are empty strings. OuterHtml is set to the complete img-tag.  Are there any documentation for Html Agility Pack? Consistency of an order statistic in exponential distribution I have two questions.   1) If $X_1,X_2,X_3,...,X_n$ constitute a random sample of size $n$ from an exponential distribution, show that $\bar X$ is a consistent estimator of the parameter $\lambda$.    This is my attempt: Mean of exponential distribution is $\lambda^{-1}$. Thus by central Limit theorem $E(\bar X)=\lambda^{-1}$. Using mean square consistency, if  $\lim_{n\to \infty} E[(\bar X -\lambda )^2]=0$ then $\bar X $ is consistent for $\lambda$. Since $$ E[(\bar X -\lambda )^2]= E[(\bar X)^2]+E(\lambda)^2-2\lambda E(\bar X) , $$  I get $$ \lim_{n\to \infty} E[(\bar X -\lambda )^2] =    \lim_{n\to \infty} {2 \over \lambda ^2 }+\lambda^2-2 . $$ Clearly this is not equal to $0$. How can I show this is consistent? I tried using Chebechev inequality as well. But even using that I couldn't.    2) Is $X_{(n)}$ a consistent estimator for $\lambda$? If $P[|X_{(n)}-\lambda|&lt;\epsilon]$ approaches $1$ as $n$ goes to infinity for all $\epsilon &gt; 0$ then $X_n$ is a consistent estimator for $\lambda$.    The probability density function of $X_{(n)}$ is $f_n(x) = n \lambda e^{-\lambda x}(1-e^{-\lambda x})^{n-1}$,  for $X&gt;0$.  Thus \begin{align*} P[|X_{(n)}-\lambda|&lt;\epsilon]  &amp;= P[\lambda -\epsilon&lt;X_{n}&lt;\lambda+\epsilon] \\  &amp;=P[0&lt;X_{n}&lt;\lambda+\epsilon] \\  &amp;=\int_0^{\lambda+\epsilon} n \lambda e^{-\lambda x}(1-e^{-\lambda x})^{n-1}\\  &amp;= (1-e^{- \lambda X_{(n)} }), \end{align*} where $X{(n)}$ takes values in $[0 , \lambda+ \epsilon]$.  Thus, can I say $\lim_{n\to \infty}[1-e^{-\lambda(\lambda+\epsilon)}]^n=1$? Can XeLaTeX generate bold and italic font styles for typefaces that lack them? I use XeLaTeX in order to have easy access to fonts installed on my operating system, and Chinese in particular. Some of the Latin typefaces most pleasing to my eye do not have bold or italic font styles, and I wonder if XeLaTeX can remedy that.  I'm aware of the FakeBold and FakeSlant transformations within the fontspec package, but I'd be glad to know of a more attractive process, if there is one. (The specification, v2.1f, says, "Please don’t overuse these features; they are not a good alternative to having the real shapes.") How do I install and manage RPMs? Conditional Number Formatting In Java I installed Ubuntu 14.04 onto my Acer Aspire E15. The PC has a 500 Gigabyte HDD.   During the installation it divided the HDD into separate partitions. However every time I turn on the PC it goes directly into Windows 8.1. It doesn't allow you the opportunity to select which OS you want to use.   Question 1: How do I set the PC so it will allow me to select the OS?  Question 2: And if #1 isn't possible. How to I remove Ubuntu from the PC and recover the partition for Windows Let $K/F$ be a finite field extension and suppose that $F$ is infinite. Is it possible to have a nonzero polynomial $p \in K[x_1,...,x_n]$ that vanishes in $F^n$? Distribution of range of Uniform $(0,1)$ distribution