I need to detect when the switch SW1 is on and when it is off, and this input has to be sent to a GPIO of a microcontroller. I have no idea how to implement the circuit required to achieve this goal, so I would really appreciate somebody else's help.         &ndash; Schematic created using
I want to be able to tell if the mains voltage is on or off with an Arduino.   How could I do this safely with minimal components (or components from Radio Shack)?
Math contest integer triplet problem: $x + y + z + xy + yz + xz = xyz − 1$ In Windows 7, How to query times, when the computer was locked? Is there a way to get a list of the following times:  whenever windows is locked (using windows+l combo)  whenever windows is unlocked in the past week?   I've tried poking in the event log, to no avail. Many thanks! I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it? When I try to delete the file, using the GUI it says      The action cannot be completed because the file is open in another   program   And using the del /f /q command line it says     Access is denied   I have tried unlocking the file with Unlocker, as well as trying to locate which process is using the file with the Resource Monitor or the Process Explorer, but no locking handle was found in either case.  I am able to rename or move the file, but not to delete it or change its content. Why is the Apps flash storage so high and how can it be reduced? This is the disk storage info:    This is the Applications folder info:    Why is the storage usage so high and how can it be reduced? This is on a MacBook Pro Retina 13" with OSX 10.9.5.  Edit: I had tried all the suggestions made by @user3439894 in his answer but didn't mention it before posting. Printing out Prime Numbers from 2 to 1000 Quite often, the phrase "x for x's sake" is used in English, and so one could describe someone as being "argumentative for argument's sake" to describe someone who is arguing for the sake of arguing.  However, is there an adjective that means the same thing?  For example, it could be used in the context:     I don't want to be [X], but [argument...]   ... indicating that your argument is necessary and not intended to irritate. There's another question on physics.SE whose , if I have understood it correctly, explains that the farther the points are in space the faster they are moving away from each other.     Actually, the apparent speed with which two of the points on the   circle in a distance $D$ of each other would move relative to each   other will be $v = H_0 D$ where $H_0$ is the speed the balloon itself   is expanding.   This means that even the ruler sitting on my desk is expanding, just that the expansion is very very slow owing to the ruler's small size relative to the cosmic scales. However, if everything is scaling then everything should apparently be of the same size to an observer in such an expanding space. The  quote from the show "The Big Bang Theory" comes to mind.   To be able to counter that, there're some phenomena that we can observe which are scale invariant. Red-shift would be one such phenomenon. But is red-shift the only way we can tell that the space is expanding? Is there a logical flaw in my thinking? I know that red-shift is a result of the Doppler effect - there's bound to be a decrease in the frequency of a signal, as perceived by an observer, emitted by a source which is moving away relative to the observer. Product of quotient maps and quotient space that is not Hausdorff I am looking for easy(!) counterexamples that the product of two quotient maps is not necessarily a quotient map and that the quotient space of a Hausdorff space is not necessarily Hausdorff. The square of an integer is congruent to 0 or 1 mod 4 ffmpeg - Create a video from image frame with a start and a count I'm a complete layperson. As I understand, dark matter theoretically only interacts with the gravitational force, and doesn't interact with the other three fundamental forces: weak nuclear force, strong nuclear force, and electromagnetism.  Those are my understandings going in. If I'm wrong, please correct me. I've done some googling, and I haven't found anything confirming or denying that dark matter is affected by either of the fundamental nuclear forces.  So since dark matter only interacts with gravity, what causes any dark matter particle to be repelled from another? If they can pass freely through each other, and they are gravitationaly attracted to each other, why don't such particles clump together in a single 'point' in space?   It seems to me that particles occupying a single 'space' are philosophically not distinct particles, but I don't know how actual physics would play into this.  Edit , author's credentials unknown, but implicitly claims to be a physicist or astronomer, says "...[P]hysicists generally take all dark matter to be composed of a single type of particle that essentially interacts only through gravity."  Edit 2 The author is this , "Professor of Science on the physics faculty of Harvard University." In the 1960s I read book--an older children's book, I think--which I loved, and still remember, roughly.  I have no idea what the title is or who the author is, and I'm wondering if anyone knows this one:  Scientists had invented a device which they didn't fully understand, and which had puzzling effects.  For example, when a pencil was put into the machine, it disappeared, and then reappeared inside out: The lead was on the outside.  When people went into the machine, they came back dead, having died from fright.  Finally they sent a very open-minded person into the machine.  She was an artist, I think.  She was able to return alive, and described an alternate universe in which geometry was very different.  I distinctly remember that there were supposedly square triangles or four-sided triangles--or was it three-sided squares?  (This is, of course, a literally contradictory claim, but I didn't see the matter as clearly then.)  Thanks! Is it safe to delete the file Caches, in the Library of the Mac OS X Hard Drive?  It's a pretty big file, 3.56 GB, Caches reminds me of logs i don't need or browser cookies.   Is it safe to delete the folder "Caches"? What is currently the best way to get a favicon to display in all browsers that support Favicons? How to compute the following integral?  $$\int\log(\sin x)\,dx$$    Motivation: Since $\log(\sin x)'=\cot x$, the antiderivative $\int\log(\sin x)\,dx$ has the nice property $F''(x)=\cot x$. Can we find $F$ explicitly? Failing that, can we find the definite integral over one of intervals where $\log (\sin x)$ is defined? Is any explanation offered for "hyper-sleep"? In Big Hero Six,      Callahan's daughter was found to be alive in the space between portals in what Baymax describes as "hyper-sleep".   I don't believe the movie offers any further explanation for this, or why Hiro isn't affected.  Are there any other sources that explain this? How to draw a border around character in a formula? So far everything I found on the matter of borders only applies to the text mode.  I want to be able to do something like  $x_i = y$   so the result will be like the ordinary "xi = z" formula with the border around "i"?  The common answers seems to be the fbox or boxed commands. Yet they render their argument in the standart mode, unless specified to do otherwise with the specific mode. For example, the following code  \[ x_i, \boxed{x}_i, x_{\boxed{i}}, \boxed{x}_{\boxed{i}} \]   produces two normal xi figures, and another two with an oversized i. Does moving variable declaration outside of a loop actually increase performance? Quantum computers are known to be able to crack  a broad range of cryptographic algorithms which were previously thought to be solvable only by resources increasing exponentially with the bit size of the key. An example for that is .  But, as far I know, not all problems fall into this category. On , we can read     Researchers have developed a computer algorithm that doesn’t solve problems but instead creates them for the purpose of evaluating quantum computers.   Can we still expect a new cryptographic algorithm which will be hard to crack using even a quantum computer? For clarity: the question refers to specifically to the design of new algorithms.