I'd like to build an error handler which will make an empty file marked with the error_occur time.  The core idea is to use the result of date command as a parameter.  I did:  time_stamp=$(date) touch $time_stamp   But this turns out to create a series of empty file like 2014, Wed, 11:15:20.  How to convert time_stamp to a whole string here?
Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?
$TT^*=T^2$, show that $T$ is self-adjoint Let $V$ be an inner product space, finitely generated over $\mathbb{C}$, $T\in \operatorname{End}(V)$ that satisfies $TT^*=T^2$, show that $T$ is self-adjoint.    I know that $TT^*$ is positive so has positive square-root, thus the square root is positive definite. But I don't feel like this is a proof. Can anyone prove it without considering square root? How to read exponential expressions, e.g., "2^16"? How do you say the mathematical function in English:     x^y (or xy)   For example, how do you say      2^16  (or 216)   I know ^ means 'power' or 'exponentiate', but that is the name of the operation, not how you pronounce its use.  If y = 2, it is 'x squared', y=3 then 'x cubed'. What if y is some other arbitrary number? Number theory proof mod p For a given prime $p$ and integer $k$,  $k∈&lt;1, p-1&gt;$ $S(k)$ is defined as a sum of remainders of $k, k^2, k^3, ..., k^{p-1}$ when divided by $p$. Prove that $S(k)=\frac{1}{2}p(p-1)$ is true for an odd number of different k. I managed to prove that $S(p-1)=\frac{1}{2}p(p-1)$ but can't see how to do it further. I usually disconnect my cellphone from the charger some time after it's fully charged because I'm afraid the battery could lose capacity over time if I don't. However, I believe modern electronics should be able to handle this kind of scenario and automatically stop charging the battery once it's full. Does this apply to modern Android phones? Or do I need to continue disconnecting it all the time? TikZ Angle Label - Help it "fit" better? I have the following drawn with TikZ    using the code  \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture} \coordinate (O) at (0,0); \draw (O) circle (3); \coordinate[label = above left:$M$] (M) at (130:3); \coordinate[label = above:$N$] (N) at (80:3); \coordinate[label = below:$A$] (A) at (240:3); \coordinate[label =below right:$B$] (B) at (300:3); \draw (A) -- (M) -- (B); \draw (A) -- (N) -- (B); \tkzMarkAngle[draw = black, fill = white, opacity=1](A,M,B) \tkzLabelAngle[pos = 0.8](A,M,B){$x$} \tkzMarkAngle[pos = 0.2,draw = black, fill = white, opacity=1](A,N,B) \tkzLabelAngle [pos=0.8](A,N,B){$27 ^{\circ}$} \end{tikzpicture} \end{document}   Notice however, tht the 27 degrees does not fit in very nicely. How can I adapt the code to try and move the 27 a bit "lower" so that it fits in better, as well as the angle mark?  Also, how can I get two "double arrows" in the middle of lines AM and BN, to indicate that they are 'parallel'? Prove $$\int _0^\infty f^2(x) dx \leq \frac{2}{3}\cdot  \max_{x \in \mathbb R^+} f(x) \cdot  \int _0^\infty f(x) dx$$ for $f(x) \geq 0$ and convex.   I know via Holder's we can get without the constant $\frac{2}{3}$ but that should also be true for $f$ not convex. I tried some approaches using convexity but didn't get the desired result.   A hint or reference would also help. Also, it would be interesting to know when equality holds. Is it possible to install an old version of Mac OS on a new Mac? I know that Apple doesn't want me to run a version of Mac OS older than the one my Mac came with, but is there a way around this?  For example: if I buy a new Retina MacBook Pro, is there a way to run OS 10.6 on it without a VM? Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to correspond to an environment variable.  For example, if there is a file called C:\blah\%temp%.txt or a folder called C:\Program Files\%temp%\, none of the following will work because the variable gets expanded:  &gt; dir "c:\blah\%temp%.txt" &gt; dir "c:\blah\^%temp^%.txt" &gt; dir "c:\blah\%%temp%%.txt" &gt; dir "c:\blah\\%temp\%.txt"  &gt; dir "c:\program files\%temp%" &gt; dir "c:\program files\^%temp^%" &gt; dir "c:\program files\%%temp%%" &gt; dir "c:\program files\\%temp\%"    Using wildcards will work, but does not uniquely select the file/folder and may include others:  &gt; dir "c:\blah\?temp?.txt"        (also shows ztempz.temp, 1tempa.txt, etc.) &gt; dir "c:\program files\?temp?"   (likewise)    (This is frustrating because every now and then—usually when Explorer is restarted for whatever reason—the environment variables stop expanding and some places where they are used end up creating files or directories with the environment variable in it. For example, because I configured Chromium to store its cache in a subdirectory of %temp%, if the variable expands, it is fine, but when it doesn’t, Chromium creates a directory called %temp% under its own directory and stores the cache—which can get large—there. I want to add a line to my temp-/junk-file cleaning script to automatically delete that folder if it exists, but I cannot figure out how to access it from the command-line without resorting to wildcards.) What happens when a caster targets an object that looks like a creature with a spell that targets only creatures? Can the system leave a deletion reason when it deletes a question? they were question banned; it turned out it (in part) it was because of deleted questions.   was deleted by the Community user.  I'm aware it will delete old posts that have a negative score, but for a minute or two, I was really puzzled as to why it was unilaterally deleted without some notation left.  Can we have the Community user leave a notation in a post's history as to why the post was deleted?    Something like the following would suffice:     Post deleted automatically due to having negative votes and no activity for three months Yu Yuphoria bricked after installing custom recovery and boot file My YU YUPHORIA got bricked while I was working with it. I want to install custom ROM into it for that I am installing custom recovery and boot file but the file that is found on Internet was not working and that's why I am stuck with company logo. I can't go into recovery mod, neither it boot, and USB debugging mode is turned off. I tried to install fresh ROM from fastboot but after installing every driver properly command prompt is showing "waiting for the device". Please sugest some way to get rid of this problem. I keep going around in circles with this problem:  Given the functions $f:X\to Y$ and $g:Y\to Z$, if $g\circ f:X\to Z$ is bijective, then prove $f$ must be one-to-one and $g$ must be onto. I was able to prove this without difficulty. However the second part of the problem has me stumped:  a) Find functions $f,g$ where $g\circ f$ is bijective but $f$ fails to be onto.  b) Find functions $f,g$ where $g\circ f$ is bijective but $g$ fails to be one-to-one.  My attempt for (a): Let $f:\mathbb{R}\to \mathbb{R}^+$ be defined by $f(x)=e^x$ and $g:\mathbb{R}^+\to \mathbb{R}$ be defined by $g(x)=\ln(x)$. Then $g\circ f(x)=g(f(x))=g(e^x)=\ln(e^x)=x$ which is bijective, $g$ is onto and $f$ fails to be onto... or so I thought. Upon closer inspection $f$ $\underline{is}$ onto for the given codomain $\mathbb{R}^+$.  And now I'm stuck in a rut. Anyone out there have any hints? How to perform a full system dump/backup with a broken screen? So, yesterday my phone took a serious tumble.  It is now essentially useless, as the screen either fails to turn on, or when it does, there is nothing useful to see (just lines of primary colors, mostly).  I believe (from the fact that it still chirps at me when emails come in, etc), that the phone is still functional, otherwise.  I would like to perform a full system dump, so that I can get off any files from the phone (a TMobile SGS2 (hercules) running slimrom 4.3 build 1).  The sdcard probably isn't important, as I can just pull it, but the phone's own internal storage I should like to get a copy of.  When I plug the phone into a usb port, it 'mounts' the usb via MTP, and I can see all the files.  Unfortunately, when I do a select all | copy | paste operation, the paste op dies before transferring all files.  I've tried a couple other ADB shell operations, in hope of flipping regular USB mounting on, but nothing has worked.  Any ideas how I can get a full dump of my poor phone's contents?  Edit  Currently running a adb pull /sdcard/ ... Its copying files presently, but its too early to tell if its going to get evertying I'm expecting.  Edit #2  looks like its going to work...its taking a rather long time, but it appears to be grabbing everything I was expecting it to. Let $X$ be a normed linear space, $x\in X$ and $r&gt;0$. Define the open and closed ball centered at $x$ as  $$ B(x, r) = \{y \in X : \Vert x − y\Vert &lt; r\} $$  $$ \overline{B}(x, r) = \{y \in X : \Vert x − y\Vert \leq r\}. $$ Then $B(x, r)$ and $\overline{B}(x, r)$ are convex.  I tried to prove this, but either my calculation is incorrect, or I am on the wrong path:  I aim to show for the closed ball $\overline{B}(x,r)$ (for open ball I assume the proof is similar). Suppose $y,z \in \overline{B}(x, r)$. Then $\Vert x − y\Vert \leq r$ and $\Vert x − z\Vert \leq r$. We must show that $t \in [0,1]$ implies $ty + (1-t)z \in \overline{B}(x,r)$. But $t \in [0,1]$ implies $$ \Vert ty + (1-t)z - x\Vert = \Vert t(y-z) + z - x\Vert \leq |t| \Vert y-z\Vert + \Vert z-x\Vert \leq |t|(\Vert y-x\Vert + \Vert x-z\Vert) + \Vert z-x\Vert &lt; |t|(2r) + r = r(2|t| + 1), $$ which is not necessarily $\leq r$. We probably wanted to end up with $&lt; |t|r$ or $\leq |t|r$ as our final inequality.  Thanks in advance. Finding $\frac {d(\tan \theta)}{d\theta}$ So, I'm using a script I've made to convert videos to the webm format. A certain program calls the script, sending %f which is the full, absolute file name of the video, like this:  converter.sh %f   where %f has two possible extensions, .avi or .mpg.  # /bin/bash ffmpeg -i $1 `dirname $1``basename $1 avi`webm &amp;&amp; rm $1   It currently works perfectly when $1 contains a .avi file, because basename removes the .avi extension. When $1 ends with .mpg instead, the result is .mpgwebm.  How can I modify that script to be able to receive those two possible different formats?    Resuming: If $1 is /somedir/video.avi, the script should do:  ffmpeg -i /somedir/video.avi /somedir/video.webm   And if $1 is /somedir/video.mpg, the script should do:  ffmpeg -i /somedir/video.mpg /somedir/video.webm   I know this might be fool for some people, but I'm kind of new with the bash. Do reroll and dice-adding abilities work on critical hits and critical failures? Why is it "come" rather than "go" ? Overflow to left instead of right I have a div with overflow:hidden, inside which I show a phone number as the user types it. The text inside the div is aligned to right and incoming characters are added to right as the text grows to left.  But once the text is big enough not to fit in the div, last characters of the number is automatically cropped and the user cannot see the new characters she types.  What I want to do is crop the left characters, like the div is showing the rightmost of its content and overflowing to the left side. How can I create this effect? Creating Workflow -> Error