Why `type(x) == int or float` doesn't work?
Python "if X == Y and Z" syntax
Get specific GPS location somehow on windows 8 Real world uses of hyperbolic trigonometric functions I covered hyperbolic trigonometric functions in a recent maths course. However I was never presented with any reasons as to why (or even if) they are useful.  Is there any good examples of their uses outside academia? Black screen after suspend-after moving to the nvidia official drivers (not priority) How do you make a script or app to run or stop running automatically when the system is booted, a user logs on, at a specific time, when a disk is attached, etc.? Calculating the Fourier transform of $f(t)=Ae^{-i\omega_0 t}$ I am trying to calculate the Fourier transform of $f(t)=Ae^{-i\omega_0 t}$  I'm getting an infinity which is giving me problems. Here are my steps:  $$F(\omega)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty f(t)e^{i\omega t}dt$$ $$=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty Ae^{-i\omega_0 t}e^{i\omega t}dt$$  $$=\frac{A}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{t(i\omega - i\omega_0)}dt$$ $$=\frac{A}{\sqrt{2\pi}(i\omega - i\omega_0)} |e^{t(i\omega - i\omega_0)}|_{-\infty}^{\infty}$$ $$=\frac{A}{\sqrt{2\pi}(i\omega - i\omega_0)}(\infty - 0)$$  Where am I going wrong? Thanks. Let $a$ be a non-zero real number. Is it true that the value of $$\int\limits_0^\infty \frac{\mathrm{d} x}{(1+x^2)(1+x^a)}$$  is independent on $a$? I want OSM administrative boundaries from . I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I want them both in just one file, or to be able to merge the information.   I haven't found a solution to merge the GeoJSON.   What's the workflow to get the two files joined and saved as a shapefile, for example? Why does a find field value in one application show up in a the find field of another application? On my MacBook Pro I have found that several applications seem to share the value for a find.  For example, I searched 'applestackexchange' in Safari's unified address bar, then I switch to Xcode and click into a Find field.  The first word of my search in Safari then appears there.  iTerm2 and Sublime Text 2 also seem to participate in this sharing.  Running latest Mountain Lion on  a 2012 MBP. Why does shell Command Substitution gobble up a trailing newline char? What is the difference between metonymy and synecdoche? Adding user to a group - Why had to reboot? I was not able to access the VirtualBox shared folder, so I made the user part of the vboxsf group. But, still not able to access it. Rebooting the guest resolved the problem. Is it a bug? A reboot is not required to add a user to a group.   sudo usermod -a -G vboxsf praveensripati   There was similar query .  I am using 11.10 and don't remember seeing similar behavior in 11.04. Mount cifs Network Drive: write permissions and chown I have access to a cifs network drive. When I mount it under my OSX machine, I can read and write from and to it.   When I mount the drive in ubuntu, using:  sudo mount -t cifs -o username=${USER},password=${PASSWORD} //server-address/folder /mount/path/on/ubuntu   I am not able to write to the network drive, but I can read from it. I have checked the permissions and owner of the mount folder, they look like:  4.0K drwxr-xr-x  4 root root    0 Nov 12  2010 Mounted_folder   I cannot change the owner, because I get the error:  chown: changing ownership of `/Volumes/Mounted_folder': Not a directory   When I descend deeper into the network drive, and change the ownership there, I get the error that I have no permission to change the folder´s owner.  What should I do to activate my write permission? Where does "pay through the nose" originate? Postfix SMTP banner show multiple hostnames There appears to be a giant security vulnerability with Android that seems to basically affect all phones.  wrote:  The vast majority of Android phones can be hacked by sending them a specially crafted multimedia message (MMS), a security researcher [Joshua Drake] has found. ... Drake found multiple vulnerabilities in a core Android component called Stagefright that’s used to process, play and record multimedia files. Some of the flaws allow for remote code execution and can be triggered when receiving an MMS message, downloading a specially crafted video file through the browser or opening a Web page with embedded multimedia content. ... The MMS attack vector is the scariest of all because it doesn’t require any interaction from the user; the phone just needs to receive a malicious message. For example, the attacker could send the malicious MMS when the victim is sleeping and the phone’s ringer is silenced, Drake said. After exploitation the message can be deleted, so the victim will never even know that his phone was hacked, he said.  What can a regular user do to mitigate the issue? Disable Google Hangouts? Prove or find a counterexample: For all real numbers x and y it holds that x + y is irrational if, and only if, both x and y are irrational. The following is a Homework Question that I've been working on and I would like some feedback on my answer: Prove or find a counterexample: For all real numbers $x$ and $y$ it holds that $x + y$ is irrational if, and only if, both $x$ and $y$ are irrational.  So I've got (or at least like to think I've got) a counter example.  Let $x = 1$ and $y = \sqrt{2}$.   Thus $x$ is rational and $y$ is irrational. Adding $x$ and $y$ gives us $1 + \sqrt{2}$ which cannot be simplified any further (right?) and is an irrational number.  Thereby proving that $x + y$ can be irrational without both x and y being irrational.   Is this okay? Any feedback is greatly appreciated thank you! Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? $I_m - AB$ is invertible if and only if $I_n - BA$ is invertible. The problem is from  Algebra by Artin, Chapter 1, Miscellaneous Problems, Exercise 8. I have been trying for a long time now to solve it but I am unsuccessful.      Let $A,B$ be $m \times n$ and $n \times m$ matrices. Prove that $I_m - AB$ is invertible if and only if $I_n - BA$ is invertible.    Please provide with only a hint. Assume $\{a_n\}$is a sequence which  satisfies the following recursion formula: $$a_{n+1}=a_n+\frac{2a_{n-1}}{n+1}~(n\geqslant 1).$$ and $a_0=\pi,a_1=\pi^2 $. How to compute $\displaystyle\lim_{n\to \infty}\frac{a_n}{n^2}$? Drawing text on an image background that has dark and bright parts Often, I want to write text over a background image. If the background image is bright, I use a dark color for the text, and vice versa. But, often the image has both dark and bright parts. So a dark text is unreadable on the dark parts, and a bright text is unreadable on the bright parts.  I currently use one of several solutions, all of them are imperfect:   Brighten the image and use a dark font, or darken the image and use a white font; the problem is that it reduces the beauty of the background image. Use grey text (as in this question:  ). But grey text often looks unappealing, and is still only barely readable. Use dark text, and try to position it on the bright spots of the image (or vice versa). This takes a lot of time because it requires me to position each word separately.   Are there better solutions to this problem?   In particular: is there an automatic tool that takes an image and a text, and positions the text only on the dark/bright parts of the image?