I'm looking for the equivalent to this JS assignment: FOO = FOO || &quot;I must have been falsey!&quot;;  Thanks!
I have been looking at a few scripts other people wrote (specifically Red Hat), and a lot of their variables are assigned using the following notation VARIABLE1="${VARIABLE1:-some_val}" or some expand other variables VARIABLE2="${VARIABLE2:-`echo $VARIABLE1`}"  What is the point of using this notation instead of just declaring the values directly (e.g., VARIABLE1=some_val)?  Are there benefits to this notation or possible errors that would be prevented?  Does the :- have specific meaning in this context?
I would like to work out the Fourier transform of the Gaussian function   $$f(x) = \exp \left(-n^2(x-m)^2 \right)$$  It seems likely that I will need to use differentiation and the shift rule at some point, but I can't seem to get the calculation to work. Does anyone have any advice?  By the way, I am using   $$\mbox{FT}(f)(k)=\int_{-\infty}^\infty f(x)e^{-ikx}\,\mathrm d x$$  as my definition of a Fourier transform. Many thanks. I am using App Backup &amp; Restore for creating backup of my apps but with KitKat its using the internal SdCard as Storage.  When I explicitly set the external SdCard path it gives the error that it is unable to create folder,  I have also tried with creating folder under android/data/[packagename]/files/ but it is still not able to do the same.  Is there any solution so that apps can use external storage for writing files.  Note : I don't want to ROOT my Phone. Resizing an iframe based on content I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes.   How do I resize the iframes to fit the height of the iframes' content?  I've tried to decipher the javascript Google uses but it's obfuscated, and searching the web has been fruitless so far.  Update: Please note that content is loaded from other domains, so the  applies. Is it safe to change the lens on my new DSLR? I recently bought myself a shiny new DSLR camera. Before I can use it, I had to do something kind of terrifying: mount the lens.  Now of course, half the advantage of SLR cameras is that the lenses are interchangeable. But sitting there holding an extremely expensive brand new camera and staring into its bare innards, I'm just terrified that if I make one wrong move, a hair or a piece of dust could fall in there, and then the camera will be irreparably damaged and I'll never be able to use it again.  This might sound like a stupid question, but&hellip; is it actually &ldquo;safe&rdquo; to change the lens on the camera? Is this likely to destroy it?  (Obviously it goes without saying that you should limit the time spent with no lens attached to the minimum number of seconds possible. But even if you have lightning fingers, the camera will still be lenseless for some number of seconds. And it's not like I'm standing in a class 100 cleanroom here! Besides, you don't want to be too rough with the delicate lens mounting either&hellip;) It would be nice to see what users have recently been active. This is somewhat standard with many forum-style websites, showing how active the site has been in the last n-minutes or so. As a functional advantage, this also serves to let you know when is a good time to get a question in. How to install MySQL workbench? Installing MySQL workbench on 10.04 or 10.10 is not a problem, as the deb packages are available on MySQL's website.  But there is no 11.04 deb package available.  So, how do I install MySQL workbench on 11.04 and keep it updated automatically when updates become available to ubuntu via apt-get update. What really causes light/photons to appear slower in media? Can't move files to trash without any permission issues This is not like one of the cases addressed before - I've checked them all.  I've suddenly begun getting that message "... can't be put in the trash. Do you want to delete it immediately?" this morning in my Home directory only.  I have a Home partition (ext4, mounted properly) with symlinks for user folders like Downloads, Documents, etc. to folders with the same names in a Data partition (ntfs, mounted properly).  For example, I cannot move a file in Downloads folder to Trash when I try via Home, but no problem if I try via Data partition, although the file in question has the same ownership and permissions at both locations.  Also no problem at all with files in my Home folder, including sub-folders like Public that are not symlinked to my Data partition.  Interesting puzzle for me...  PS: Just upgraded to 15.04 but I don't think it matters... On second thought, it might perhaps be something to do with upgrading from Nautilus 3.10 to 3.14?  PPS: This bug has been finally resolved some time later in version 16.10, and no longer exists under Ubuntu 17.04. Does the rank-nullity theorem hold for infinite dimensional $V$? Can the category of chain complexes be realized as a functor category? As the title says, is there some sort of category $\mathsf{C}$ which can be thought of as the "walking chain complex", so that the category of chain complexes in some other category $\mathsf{A}$ can be realized as $\mathsf{A}^\mathsf{C}$ (or perhaps some subcategory thereof)? What do I call someone who marries or has a sexual relationship with someone much younger than themselves? Their partner is someone who is at least 18 years old.    The term paedophile is not the correct word, because it refers to minors. $x^2$ is congruent to $-1 \bmod p$ In general, how do you solve $x^2$ is congruent to $-1 \bmod p$, where $p$ is an odd prime and $x$ is an integer.  Specifically, I need to solve $x^2\equiv-1 \pmod{29}$ Find the derived subgroup of $A_4$ Find the derived subgroup of $A_4$.   Since it is $A_4$, for a permutation $\sigma$ to be in $A_4$, $\sigma$ must have a cycle structure of $2$ cycles. Therefore, $\sigma=(ab)(cd)$.  The commutator of such elements, would be obviously another permutation of $2$-cycle (of length $2$).  Does it mean that $A'_4=A_4$? Help with math symbols in BibTeX Frequency of the sound when blowing in a bottle I'm sure you have tried sometime to make a sound by blowing in an empty bottle. Of course, the tone/frequency of the sound modifies if the bottle changes its shape, volume, etc.   I am interested in understanding how the tone/frequency of this sound can be (approximately) calculated from the shape of the bottle. Is there some formula?  If you have any references about this please post them in your answers.  Being a mathematician I keep hearing that the principal tone is given by the first eigenvalue of the Laplace operator, and I'd like to understand the physical explanation. It seems that most people who use the ignored tags feature end up with a fairly long list of those tags.  Although , it is sometimes necessary to add new ignored tags manually (typically when adding some-tag*).  It would be a lot easier if the add box was above the long list of ignored tags rather than below. I suppose the same would apply to the favorites tags for consistency's sake. Take the square $[0,1]^2$ we take $n$ random lines through the square. You can choose random lines by choosing a point on one of the sides of the squares and randomly choosing a different point on any of the other three sides and then drawing a line connecting them.   What is the probability that after $n$ of these random lines the largest region is greater than or equal to $0.5$?  Any tips or cases help, thanks. I've stumbled upon a strange behaviour with Windows machines, which seems to be fairly consistent between all Windows versions from Vista/2008 to 8.1/2012 R2; it doesn't happen instead when using Windows XP or Windows Server 2003.  The problem is this: when the network adapter is configured for DHCP and the DHCP server doesn't register DNS records on behalf of its clients (because it can't, or because it's not configured to do so), then the forward A record gets registered, but the reverse PTR record doesn't.  Some more details:   Both the forward and the reverse DNS zones are AD-integrated and accept dynamic updates. All computers are joined to the domain. All computers use the correct internal DNS servers, both when configured statically and when getting their configuration from DHCP. "Register this connection's addresses in DNS" is enabled in the network adapters. Everything is fine when a computer has a static IP address; both the forward and the reverse records get automatically registered. When the same computer is configured for DHCP, the forward record is registered, but the reverse record isn't. This happens for all computers with an OS version >= 6.0, and it's definitely not related to a single machine. No amount of ipconfig /registerdns will change anything. No errors are logged anywhere.   Why does this happen, and how can it be fixed?  And no, configuring the DHCP server to perform DNS registration is not an option here. Minecraft item right/left click detection I have a lot of svg images I want to include in a TeX-File.   So far I didn't have problems using the \usepackage{svg} with \includesvg.  However recently I've added a few more layers to the svg-files and now a lot of stuff is missing.   The resulting svg-tex.pdf files now have up to 61 pages and if I look into the svg-tex.pdf_tex files with texmaker I found the culprit: it only goes up to 50 pages:  \put(0,0){\includegraphics[width=\unitlength,page=50]{Sym_9999_svg-tex.pdf}}%   Putting the pages in manually like:   \put(0,0){\includegraphics[width=\unitlength,**page=51**]{Sym_9999_svg-tex.pdf}}%   does work, but would be very time inefficient (I have 100+ svg images) additionally the layers don't have the correct sequence and cover up text sometimes.   Does anyone have a solution for this problem?   If I open up the svg-image it shows up just fine.   One possibility would be to just export the svgs in one pdf file without the text as extra latex file, but this way I can't add formulas in Tex-Form.