I just got my first Arduino and had a question about pull-up resistors.  I was trying to connect a push-button to the Arduino at pin 2, and if it's HIGH then I write HIGH to pin 13. Now, in the tutorial I watched, it said to have a resistor from the button to ground so if pin 2 asks what the voltage is, it gets ground, so it doesn't write HIGH to pin 13.   I tested this and it did, indeed, prevent the noise from pin 2. However, when I tried replacing the 10k resistor with a normal wire, it didn't work. So, my question is why do we have to use a resistor and why can't it just be any connection to ground?  In this diagram pin 2 reads whether it gets 5V (HIGH) or 0V (LOW) and returns a boolean value. Then, if the value is HIGH, pin 13 outputs HIGH. Also, it looks like the long wire on the Arduino is blocking out the labeling on a pin. The pin that the long wire connects to says "5V".  Thanks!
There are many tutorials that use a pull-up or pull-down resistor in conjunction with a switch to avoid a floating ground, e.g.        Many of these projects use a 10K resistor, merely remarking that it is a good value.  Given a a particular circuit, how do I determine the appropriate value for a pull-down resistor?  Can it be calculated, or is it best determined by experimentation?
Plotting a 3d surface in tikz, with a limit to the infinity Is there a C++ decompiler? I have a program in which I've lost the C++ source code.  Are there any good C++ decompilers out there?  I've already ran across . Why does Hermione say she hadn't used a memory charm before? After the wedding, Hermione has to use a memory charm on two Death Eaters, where she states that she has never done it before, but she knows the theory. However, she states that before she left on her adventure, she made her parents forget her, and move to Australia. Is this a contradiction, or is there an explanation? What is the difference between a[bc]d and a{b,c}d? Why do people use a{b,c}d when there is already a[bc]d? is uniform convergent sequence leads to bounded function? Suppose there is there is uniform convergent sequence $(f_n)$ on the set $A$, and each $f_n$ is bounded on $A$, i.e., there exist $M_n&gt;0$ such that $|f_n(x)|\le M_n$ for all $x\in A$ Is it true that there exist a function $f$ that is bounded on set A? Can I prove it this way:  Since $f_n \to f$ uniformly on A, $\exists n \ge N$ such that $$|f_N(x) - f(x)| \le 1$$ and $$|f_n(x)-f_N(x)| \le 1$$  Therefore, $|f(x)| \le |f_N(x)|+1 \le M_N + 1$ and $|f_n(x)| \le |f_N(x)| + 1 \le M_N + 1$, $x \in A , n \ge N$  Let $M = \max\{M_1, M_2,\dots,M_N\} + 1$ : $|f_n(x)| \le M$, $\forall x\in A$  Therefore, $f$ is a bounded function on A. Why isn't my Gravatar image updating? Why are bash tests so picky about whitespace? As a primarily Java programmer, I find the bash if-then construct quite confusing, especially regarding whitespace. Can anyone explain why the first one works, but not the second or third?  #works if [ -n $1 ]; then echo "parameterized"; fi  #output: ./links: Zeile 1: [-n: Kommando nicht gefunden. if [-n $1 ]; then echo "parameterized"; fi  #output: ./links: Zeile 1: [: Fehlende `]' if [ -n $1]; then echo "parameterized"; fi itoa() is a really handy function to convert a number to a string. Linux does not seem to have itoa(), is there an equivalent function or do I have to use sprintf(str, "%d", num)? I am looking for a story about the future of mankind, in which most people have been enslaved in a virtual reality. It ends with the revelation that the people are just lying there imagining their lives with their heads in a trough of feed.  It explains that chemists began to create compounds that could be released into the air to manipulate citizens - causing them to live, shop, think as desired by whoever was in charge. Eventually these tools got subtle enough that they could simulate reality using just these airborne compounds.  This was clearly a prescient view of what later became computer-based virtual reality fiction. How can I edit my network profile independently? My oldest account on the network is Area 51, followed by Mi Yodeya.  I recently filled out the "about me" section on Mi Yodeya (but nowhere else) and did not choose the "update all sites" option because my blurb is pretty specific to that site.  I intended to have that blurb on exactly one site.  I was surprised tonight to discover that that blurb is now on my network profile, where I see no "edit" link.  Am I stuck with either having a site-specific blurb as my network blurb (because it's my first non-Area-51 site) or rewriting it to be more general?  Or is there some way that I can independently edit the network profile?  (Or designate a different site as the default?)   shows that someone else had this problem too, but I'm asking for support, not for a new feature, so I'm asking this separately. Prove $g$ is a generator if $g^q=1 \pmod p$ Let $p$ be an odd prime and let $q=\frac{p-1}{2}$. If $g^q=-1\pmod p$ and $q$ is a prime, show that $g$ is a primitive root mod $p$.  I want to show $\{g,g^1,...,g^{p-1}\}=\{1,2,...p-1\}$. I argue by contradiction that if there're $x,y\in \{1,2,...p-1\},x&lt;y,g^x=g^y\pmod p$. Then $g^{y-x}=1\pmod p$. I don't know how to use the fact that $q$ is prime to lead to a contradiction. How to access specific raw data on disk from java How do I calculate number of hours > 24 in Excel? I've got an excerpt of my spreadsheet below. It's a time tracking application containing a start date/day, a session ID and the duration of the session. Column A is populated by adding the duration in Column D. I'm trying to total the durations, but keep getting incorrect values in cases where the total duration is > 24 hours.  Consider        A                   B        C                D          1  2012/05/22 01:00  |  Wed  |  Session 23341  |  9:00 2  2012/05/23 10:00  |  Wed  |  Session 23342  | 22:00 3  2012/05/25 08:00  |  Fri  |                 |  0:00   As you can see, the date differential between A2 and A3 demonstrates that the value of 22:00 in D2 represents a duration of 46 hours (05/23 10:00 + 46:00 = 05/25 08:00). However, Column D is only displaying the 22:00 in excess of a full 24 hour day.  My attempts to read D2 have included int(d2) = 0.00  /  int(d2)*24 = 0.00  /  hour(d2) = 22.00  /  int(a3-a2)*24 =0.00 etc. and have been unsuccessful in pulling a value of "46".   How can I accurately represent D2 to achieve accurate summary data? Related:  (not a dupe, that's a feature request and was closed as a dupe of another one)        (old) post does indeed say that Link-only answers can be flagged as NAA, but there are a lot of posts like  which define Not An Answer is a way that it doesn't apply to link-only answers.  Can we get some up-to-date consensus on this? That link only answers are not allowed is . Screen brightness isn't taking effect on a Lenovo Z570 My Lenovo Z570 has two GPU's, nVidia and Intell. Brightness control has no effect what so ever over the screen brightness, and because I've had some major issues in the past when I was trying to fiddle with nVidia drivers and settings, and I wanna be cautious now. I haven't find similar questions referring 14.04 LTS with similar configuration as mine.   I've read that it could be fixed by adding/changing content in xorg.conf but when I run  sudo gedit /etc/X11/xorg.conf   the file comes out to be absolutely empty. What do I need to do, what do I need to add to it and not get my laptop screwed with a black screen again? Community user id interpreted by absolute value in search I have  with a bounty that will expire in a few days. It looks like nobody will get the bounty; only one answer was posted during the bounty period, and it has no upvotes.  In cases like this, the bounty is thrown away.  Why isn't it refunded instead, if no answerer has earned it? What, exactly, is transferred along supply lines? Supply routes are great when a settlement is just starting out to get things off the ground, but what is specifically transferred along them? I know anything on the  Junk, Aid and Mods tabs are transferred, and Fusion cores and Power Armor pieces aren't. Does that mean weapons, armor and ammo aren't transferred at all?  And what about Food and Water resources? Can I build a farming community with a surplus of food and use that to feed a merchant-only settlement, or are local crops always required? Ditto water. What's a word for knowing something from experience? I'm trying to figure out a word that describes subconsciously knowing something from experience. My initial attempt was "instinct", but that has more gifted and primal connotations.  The use case I had in mind was as follows:     "If we assume that the model is applicable, it tells us what we've ________ known for a while [...]"     Update:  The word that fits best for my use case seems to be intuitively.  Another good one was empirically, but it tends to imply there were some experiments carried out to glean the knowledge, which wasn't the case. What is the difference between linear regression on y with x and x with y?