How to shutdown the computer when a USB is attached?
Starting scheduled task by detecting connection of USB device
Can I start and stop a tile floor job? I am tiling my bathroom floor and don't soon have a full day to dedicate to the job. Is it ok to lay down a few tiles each day and come back to the job when I have time? I would only lay mortar for the tiles I have time to lay each day.    My concern is that the mortar wouldn't properly "join" to the previously laid sections of tile and cause an inferior result, but I'm not really basing this concern on any facts. That is what I'm hoping to learn with this question. The well-known fable of an astronaut sending signals out to an external observer while falling toward an event horizon states that the time lapse between such signals becomes greater even if in the astronaut sends them out periodically (as judged in his inertial frame). When viewed from earth and weighing time-dilation due to the gravitational field of the collapsing star, how is it possible that a black hole can form in finite time (for any external observer) if it takes an infinite amount of time to "see" events occurring at the event horizon? I just wanted to ask whether there is any command which would work on common shells (bash, dash, kornshell)? It is supposed to check if the line variable contains any part of the path.  if [[ $line =~ "$PWD"$ ]] ;then Why must the eigenvalue of the number operator be an integer? My apologies if this question has already been answered. Using the notation of Sakurai, we have an energy eigenket N and an eigenvalue n.  $$N | n \rangle = n | n \rangle$$  For the number operator $N = a^\dagger a $. My question is precisely why does n have to be an integer. I do understand that it must be positive definite due to the norm condition on $ a | n \rangle $:  $$\langle n | a^\dagger a | n \rangle \geq 0$$  I can see that we can show:  $$ a | n \rangle = \sqrt{n-1} | n-1 \rangle $$ and similarly for $a^\dagger | n \rangle$  Sakurai argues that the sequential operation of $a$ operators leads to the form which he does not write, but I will write here for clarity:  $$ a^k | n \rangle = \left(\sqrt{n}\sqrt{n-1}...\sqrt{n-k+1}\right) | n - k + 1 \rangle $$   Since  $$ a|0 \rangle = 0 $$  the sequence must terminate, but can only terminate if n is an integer. How can we make that jump? Is there a formal mathematical proof that the sequence $\left(\sqrt{n}\sqrt{n-1}...\sqrt{n-k+1}\right)$ will terminate if and only if n is an integer? Are there any tools for merging CSS? I have a couple CSS files with overlapping CSS selectors that I'd like to programmatically merge (as in not just appending one file to the end of the other). Is there any tool to do this online? or a Firefox extension perhaps? Finding the nth non square free number We all know what  numbers are. I was more interested in checking an efficient way to find nth non square free number. Historical reason behind different line ending at different platforms Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix?  And now that Mac OS X is Unix (-like), did Apple switch to \n from \r? ERROR 000212: Cannot create XY event source Failed to execute (MakeXYEventLayer)? I have a csv file that is 133mb in size and has over 1.3 million lines of data.  Each line of data has its own lat/long and I was wondering what would be the best way to display those points based off the lat/longs in ArcGIS Desktop 10 and ultimately turn it into a point shapefile?  So far I have tried the "Make XY Event Layer" tool but that keeps failing...  ERROR 000212: Cannot create XY event source Failed to execute (MakeXYEventLayer).  The csv file is properly formatted and the lat/long fields are numeric so I have no idea why it keeps crashing.  Here is what the first 2 lines of my CSV look like, the first line is what should be the header:  "LAT","LONG","CUSTOMER_MASTER_ID","STORE_NBR","TRANSACTION_DT","SKU_DIVISION_ID","SKU_DEPARTMENT_ID","SKU_CLASS_ID","SKU_CATEGORY_ID","SKU_NBR","SALES_AMT" "32.363544","-110.969778","2000000792627","2940","8/11/2010","2060","3920","5120","84021","5127866","13.99"   Any ideas? Similar matrices and minimal polynomial I am using cURL to insert data into salesforce. It works with single record but I need to insert multiple records at a time. Is it possible to do so and is it possible via a REST interface? Autosegmental Representation in tikz-qtree This is what I want to achieve    and this:    But all I've been able to make with tikz-qtree is the following:  \documentclass[12pt,a4]{article} \usepackage[utf8]{inputenc} \usepackage{tipa,tikz,tikz-qtree} \begin{document}  \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ] [.$\mu$ : ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ]  ] ] \end{tikzpicture}   And this:  \begin{tikzpicture}[baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ l ] ] [.R [.$\mu$ a ] [.$\mu$ l ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ : ] ] [.R [.$\mu$ a ] [ l ] ] ] \end{tikzpicture} \end{document}   Which renders:    and    The important part here is the linking from the leaves to more than one parent (it would be nice if I had the option of making the line dashed too). Now, pst-asr doesn't quite achieve what I want it to. It's important that I have the moras ('mu's). (Also it's a pstricks package, which means I must typeset it in DVIPSPDF.) I have tried a bit of the forest-package (especially forest-GP1), but I can't make that work as I want either. Lastly, some have recommended xyling, but I find that package very difficult to use.  Any recommendations?  Thanks. Remove linux version 3.19.31 Unitl now I haven't found the option to enable the curved representation of connectors between nodes. The  doesn't mention such an  option. Is there a keyboard shortcut? Counting integer partitions of n into exactly k distinct parts size at most M How can I find the number of partitions of $n$ into exactly $k$ distinct parts, where each part is at most $M$?  The number of partitions $p_k(\leq M,n)$ of $n$ into at most $k$ parts, each of size at most $M$, is given by the generating function: $$  \binom{M+k}{k}_{x} = \prod_{j=1}^{k}\frac{1-x^{M+k-j+1}}{1-x^j}= \sum_{n=0}^{kM} p_{k}(\leq M,n) x^n $$  For the number of the partitions $p_k(\mathcal{D},n)$ of $n$ into at most $k$ parts there is the recurrence relationship: $$   p_{k}(\mathcal{D},n) = p_{k}(\mathcal{D},n-k) + p_{k-1}(\mathcal{D},n) $$  But what, if I want to count only the partitions with distinct parts and restricted number of parts and restricted part size?  Update: Now I know the generating function for the number of distinct restricted partitions $p_k(\leq M, \mathcal{D},n)$ of $n$ into exactly $k$ distinct parts, all at most $M$ is $$    \prod_{j=1}^{M} (1+xq^{j}) = \sum_{k,n=0}^{\infty}p_k(\leq M, \mathcal{D},n)x^{k}q^{n} $$ and there is also a recurrence relation $$    p_k(\leq M, \mathcal{D},n) =         p_{k-1}(\leq M-1, \mathcal{D},n-k) +         p_k(\leq M-1, \mathcal{D},n-k) $$ How can I prove this? Could you recommend a book, where I could read about this? In school, we just started learning about trigonometry, and I was wondering: is there a way to find the sine, cosine, tangent, cosecant, secant, and cotangent of a single angle without using a calculator?  Sometimes I don't feel right when I can't do things out myself and let a machine do it when I can't.  Or, if you could redirect me to a place that explains how to do it, please do so.  My dad said there isn't, but I just had to make sure.  Thanks. How can I enable Hardmode? How can brackets be escaped in using string.Format? For example: String val = &quot;1,2,3&quot; String.Format(&quot; foo {{0}}&quot;, val);  This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets? I am having trouble loading csv files into layers using QgsVectorLayer().  I know this looks like a repeat, but I have carefully read     and    but still cannot get it work.  An example of my data file, test.csv:  Index,y,x 0,37.7646618,-122.4960858 1,37.777494,-122.416311 2,37.717707,-122.3997056 3,37.732284,-122.498118 4,37.749998,-122.392333   My code:  import os import urllib  import pathlib from qgis.core import QgsVectorLayer  local_path = 'C:\dev\FCMS_conflation\data\TMC_nodes.csv' node_layer = 'test'  abspath = os.path.abspath(local_path) params = {'delimiter': ',',           'decimalPoint': '.',           'xField': longitude,           'yField': latitude}  uri = "%s?%s" %(pathlib.Path(abspath).as_uri(), urllib.unquote(urllib.urlencode(params)))  layer = QgsVectorLayer(uri, node_layer, "delimitedtext")   The formatted URI looks like:  [] uri &gt;&gt;&gt; 'file:///C:/dev/FCMS_conflation/data/TMC_nodes.csv?decimalPoint=.&amp;delimiter=,&amp;xField=longitude&amp;yField=latitude'   I have tried many variations of the parameters, including the crs and type. But no matter what I try, I cannot create a valid layer.  [] layer.isValid() &gt;&gt;&gt; False   I have verified that I can add the file using the QGIS gui. I even tried using the uri provided by layer.metadata from within the Python plugin.   I am using QGIS 2.10.1 on Windows 7 64-bit machine. According to the , when a Shinigami dies, their remaining lifespan is given to the human they saved.     Shinigami who die are reduced to dust, and their remaining lifespan is given to the human they saved.   Since Rem killed L and Watari, she gained their remaining lifespans. Additionally she probably still had some lifespan left. On top of that Misa was already given a lot of lifespan from Gelus (from which she lost 75% again). So does this mean all of this lifespan is transferred to Misa Amane?!  Yet according to her , she dies in 2011 at the age of 26, only seven years after Rem died.  Does this mean that humans are also capable of reducing their own lifespans? Or would the author have made a mistake by letting Misa die as early as she has? I know she lost 75% of her remaining lifespan through the two eye deals, but you'd think that the cumulation of L, Watari and Rem's remaining lifespans would be greater than just one year, wouldn't you? What would happen if the earth would stop spinning? How much heavier would we be? I mean absolutely stop spinning. How much does the centrifugal force affect us?  If you give technical answers (please do), please explain them in laymen's terms, thanks.  Edit: I am asking what would be different if the earth were not spinning. Nevermind the part about it stopping.