I wonder if anyone can help me, a complete beginner, with a very basic question? I currently have a red LED connected to a GPIO pin on a Raspberry Pi, and a green LED attached to a different GPIO pin. Both pins output 3.3v, and I have a 330 resistor on the anode of each LED. Ground is shared, as in the diagram below:    I want to fit this onto as as small a PCB as possible. From my (very) basic understanding, I think I can get away with a single 330 resistor on the between the two LEDs and ground, as in this diagram:    Am I correct in this? Many thanks.   Edit: It seems that I have asked a question that has been raised multiple times. As a complete novice, I wasn't aware that this is regarded as the LEDs being in parallel (I thought that two power sources differentiated this from the other parallel LED questions I saw posted). Anyway, I thank those who took the time to help, and I will attempt to digest the responses.
Why can't you use a single resistor for a number of LEDs in parallel instead of one each?
(PHP) Is handling a form submission on the same page more/less/equally good as handling on a separate page? So I was reading this:  and while the answers for the first question are good, nobody gave much attention to the second one. In fact, people only said that it can be proved without giving any proof or any.  So, if I have a Lagrangian and ADD an arbitrary function of $\dot{q}$, $q$ and $t$ in such a way that the equations of motion are the same, does this extra function MUST be a total time derivative?   EDIT Ok, I changed my question a little bit:  Question: If I have a function that obeys the Euler-Lagrange equation off-shell, this implies that my function is a time derivative? (This was used in Qmechanic's answer of this other question: , equation 14.)  Also, why people only talk about things that change the Lagrangian only by a total derivative? If this is not always the case that keeps the equation of motion the same, so why is it so important? And why in the two questions I posted about the same statement on Landau&amp;Lifshitz's mechanics book only consider this kind of change in the Lagrangian? Is there an official Marvel Cinematic Universe viewing order? Is there any way in unix to find out who accessed certain file in last 1 week? It may be user or some script ftp it to some other place. Can I get a list of user name who accessed certain file? How can I find out who is accessing particular file?? Am I Running as a Service I am currently writing a little bootstrap code for a service that can be run in the console. It essentially boils down to calling the OnStart() method instead of using the ServiceBase to start and stop the service (because it doesn't run the application if it isn't installed as a service and makes debugging a nightmare).  Right now I am using Debugger.IsAttached to determine if I should use ServiceBase.Run or [service].OnStart, but I know that isn't the best idea because some times end users want to run the service in a console (to see the output etc. realtime).  Any ideas on how I could determine if the Windows service controller started 'me', or if the user started 'me' in the console? Apparantly  is not the answer. I thought about using commandline args, but that seems 'dirty'.  I could always see about a try-catch statement around ServiceBase.Run, but that seems dirty. Edit: Try catch doesn't work.  I have a solution: putting it up here for all the other interested stackers:      public void Run()     {         if (Debugger.IsAttached || Environment.GetCommandLineArgs().Contains&lt;string&gt;("-console"))         {             RunAllServices();         }         else         {             try             {                 string temp = Console.Title;                 ServiceBase.Run((ServiceBase[])ComponentsToRun);             }             catch             {                 RunAllServices();             }         }     } // void Run      private void RunAllServices()     {         foreach (ConsoleService component in ComponentsToRun)         {             component.Start();         }         WaitForCTRLC();         foreach (ConsoleService component in ComponentsToRun)         {             component.Stop();         }     }   EDIT: There was another question on StackOverflow where the guy had problems with the Environment.CurrentDirectory being "C:\Windows\System32" looks like that may be the answer. I will test today. Intuitive reason why the Fisher Information of Binomial is inversely proportional to $p(1-p)$ It confuses/blows my mind that the Binomial has variance proportional to $p(1-p)$. Equivalently, the Fisher information is proportional to $\frac{1}{p(1-p)}$. What is the reason for this? Why is the Fisher Information minimized at $p=0.5$? That is, why is inference most difficult at $p=0.5$?  Context:  I'm working on a sample size calculator, and the formula for $N$, the sample size needed, is an increasing factor of $p(1-p)$, the result of a variance estimation in the derivation. I am currently facing a "performance problem" while using grep. I am trying to locate the occurrences of many (10,000+) keywords in many (think Linux kernel repository size) files. The objective is to generate a kind of index for each keyword:   keyword: my_keyword filepath 1 filepath 2 ------ keyword: my_keyword2 ...   Being fairly new to shell scripting, I have tried a few naive approaches:  while read LINE; do     echo "keyword: "$LINE &gt;&gt; $OUTPUT_FILE     grep -E -r --include='Makefile*' "($LINE)" . &gt;&gt; "$OUTPUT_FILE"     echo "-----" done &lt; $KEYWORD_FILE   This takes about 45 minutes to complete, with the expected results.  Note: all they keywords I search for are located in a file ("KEYWORD_FILE", so fixed before anything starts), and the files in which to search can be determined before the search starts. I tried to stored the list of files to search in before the search like that:  file_set=( $(find . -name "Kbuild*" -o -name "Makefile*") )   and then replace the grep call by  echo {$file_set[*]} | parallel -k -j+0 -n 1000 -m grep -H -l -w "\($LINE\)" &gt;&gt; "$OUTPUT_FILE"   It takes about an hour to complete&hellip;  Question: considering I can use whatever technique I want, provided it's sh compliant, how can this be done "faster" and/or more efficiently ?  Perhaps grep is not the tool to use, and my use of parallel is wrong&hellip; any ideas are welcome! Obviously, this suggested edit should never have been approved. Because it's very, very minor.  Is it acceptable for me to "rollback" this edit? Does the suggested editor lose the +2 rep when I roll it back? Should I comment on one of his questions, explaining not to make too minor edits like this?  Is there anything I should do to notify the reviewers that approved  too minor suggested edit? I bet the automatic response to my question would be "Bell's theorem" and of course I am not disputing Bell's proof. I am however uncertain of one of his assumptions.  The so called "no conspiracy" assumption states that we somehow posses this magical thing called free will which makes us able to break free from the causal chain of events that make us measure the $y$-axis instead of the $x$-axis and so on in experiments. Obviously this makes little sense once reviewed under the light of logic. What this naturally implies is that, if a theory is fully deterministic, it is instantly super-deterministic.  Simon Kochen and John Conway published a theorem in 2009, , which simply-put states: either everything is deterministic (super-deterministic) or every particle has free will.  Among the few who accept this to the fullest extent is Gerard 't Hooft. He has proposed that what we call sub-atomic particles are really just templates and that there is a realm beneath the quantum where the true fabric of reality is "hidden". By accepting determinism he escapes Bell's theorem (due to not having to accept the "no conspiracy" assumption) and can construct a local, deterministic and realist hypothesis of reality. In Gerard 't Hooft's model there is cellular automata somewhere near the Planck scale which gives rise to the "emergent quantum mechanics".  This means that there exist no superpositions in objective reality, the cat is always either dead or alive, no collapse of wave functions, no branching universes, non-locality or retro-causality.  The big question for me is basically: Why do people have such a hard time accepting determinism? Some will object and say "oh but it's SUPER-determinism", but that makes no sense whatsoever, either everything is determined (determinism) or only somethings are (quasi-determinism). By accepting it we escape Bell's theorem. Bell himself was well aware of this and mentioned it a few times in interviews in the 80's.  I know some are concerned that if we accept complete determinism we can no longer do science because it's all a HUGE CONSPIRACY. Gerard 't Hooft has answered critics who bring up this here: , section 6.  Additionally, another author who has taken a deeper look into the worries of "conspiracies" in QM interpretations is Peter J. Lewis in his paper  (also ).  So to all of you who dismiss local hidden variables I ask: Why? I have been attending a number of academic / professional conferences recently and one thing that really awed me was the flawless and natural way in which the speakers presented on their topics.  Sure, they had the occasional mispronunciations or awkward pauses but they spoke with authority and confidence.   Some of them used powerpoint slides but were not reading from the slides; they were just talking on the points and they had so much to say on each point that I felt they could not do it without notes, but they were not even looking at their notes most of the time.  (The advantages of not looking at their notes too much was that they could maintain eye contact and could use very interesting slides that were not crammed with the dot points of their speeches.)  I hate to think that they had memorised their speech notes but some of the presentations went for more than an hour.  I know rehearsal is important but I wonder how could anyone remember so much in a nervous situation. (Its one thing to know everything on your topic; its another thing to present that 'everything'!)  Question:  What background / foreground things do presenters do that make their presentations flawless and natural? A very basic ring theory question, which I am not able to solve. How does one show that    $\mathbb{Z}[i]/(3-i) \cong \mathbb{Z}/10\mathbb{Z}$. Extending the result: $\mathbb{Z}[i]/(a-ib) \cong \mathbb{Z}/(a^{2}+b^{2})\mathbb{Z}$, if $a,b$ are relatively prime.   My attempt was to define a map, $\varphi:\mathbb{Z}[i] \to \mathbb{Z}/10\mathbb{Z}$ and show that the kernel is the ideal generated by $\langle{3-i\rangle}$. But I couldn't think of such a map. Anyhow, any ideas would be helpful. If $p$ is a prime such that $p≡1\pmod 7$ then $p ≡1\pmod{14}$ Prove or disprove the following:  1)  if $p$ is odd prime such that $p≡1\pmod 7$ then $p ≡1\pmod{14}$  2)  if $p$ is odd prime such that $p≡4 \pmod 7$ then $p ≡4\pmod{14}$  I think that both statement are true and have a similar proof  1) $p≡1\pmod 7$ so $p≡8\pmod 7$ then $7|p-8$ so $p-8= 7 k$ where $k$ is an integer so $p=8+7k$, so $p ≡1\pmod {14}$  It is that a correct proof? Thank you. I am trying to create a flowchart with Tikz. Since it is a long one, it spans three pages. So after creating a node to stop, I am continuing to the next page using \newpage command. Unfortunately some elements in page 1 are connected to page 2, 3 and vice versa. So when I try to create the arrow connection, it is not possible since the \newpage command comes in between. I am sharing the code with you for info. Could  anyone help me to improve the flowchart so that I could direct the arrows among multiple pages. My sample code is below:  \begin{tikzpicture} \node 1 \node 2 ........ \draw[arrow] (node1)--(node2) \draw[arrow] (node2)--(node3) ---- \end tikzpicture} \newpage \begin{tikzpicture} \node 1 \node 2 ........ \draw[arrow] (node1)--(node2) \draw[arrow] (node2)--(node3) ---- \end tikzpicture} \newpage  \begin{tikzpicture} \node 1 \node 2 ........ \draw[arrow] (node1)--(node2) \draw[arrow] (node2)--(node3) ---- \end tikzpicture} Uniform Continuity implies Continuity Let $f$ be a function from a metric space $X$ to a metric space $Y$. Show that if $f$ is uniformly continuous on $X$ then $f$ is continuous on $X$. Show that the converse is not true.  Uniform continuity definition:  $∀ε&gt;0:∃δ&gt;0:∀p,q∈X:d_{X}(p,q)&lt;δ⟹d_{Y}(f(p),f(q))&lt;ε$  Continuity definition:  $∀ε&gt;0:∀p∈X:∃δ&gt;0:∀q∈X:d_{X}(p,q)&lt;δ⟹d_{Y}(f(p),f(q))&lt;ε$  I wonder if these proofs are correct and if they are formal enough?    Uniform continuity ⟹ Continuity   Let $f$ be uniformly continuous. Fix $ε_{0}$, obtain $δ_{0}(ε_{0})$ (as a function of $ε_{0}$), fix any $p_{0}$ and $q_{0}$ and we know that:   $d_{X}(p_{0},q_{0})&lt;δ_{0}⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$   If we want to prove that $f$ is continuous at $p_{0}$, we fix $ε_{0}$ and we pick the same $δ_{0}$ as above and fix any $q_{0}$ and we are assured by 1. that   $d_{X}(p_{0},q_{0})&lt;δ_{0}⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$   Since $p_{0}$ was arbitrary, $f$ is continuous at $X$.     Continuity $\color{red}{\implies}$ Uniform continuity   Let $f$ be continuous. Fix $ε_{0}$, fix any obtain $p_{0}$ and $p_{1}$, obtain both $δ_{0}(ε_{0},p_{0})$ and $δ_{1}(ε_{0},p_{1})$ (not necessarily equal), fix any $q_{0}$ and $q_{1}$ and we know that:   $d_{X}(p_{0},q_{0})&lt;δ_{0}⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$  $d_{X}(p_{1},q_{1})&lt;δ_{1}⟹d_{Y}(f(p_{1}),f(q_{1}))&lt;ε_{0}$   For $f$ to be uniformly continuous, if we fix $ε_{0}$, obtain $δ$, fix any $p_{0}$, $p_{1}$, $q_{0}$ and $q_{0}$ we must have that:   $d_{X}(p_{0},q_{0})&lt;δ⟹d_{Y}(f(p_{0}),f(q_{0}))&lt;ε_{0}$  $d_{X}(p_{1},q_{1})&lt;δ⟹d_{Y}(f(p_{1}),f(q_{1}))&lt;ε_{0}$   But those two implications need not hold for the same $δ$ as shown above. Suppose we pick $δ_{0}$ and w.l.o.g. we suppose $δ_{0}&gt;δ_{1}$. Then it could be the case that   $δ_{1}&lt;d_{X}(p_{1},q_{1})&lt;δ_{0}$  but we cannot conclude ⟹$d_{Y}(f(p_{1}),f(q_{1}))&lt;ε_{0}$.  Therefore, continuity does not imply uniform continuity. I remember reading a story about an alien who came to earth and gave/sold a human a little device.  It was the size of a pen, and when you aimed it at something metal, the metal became malleable, like clay.  A second time, and the metal resolidified.  When the alien came back not long after, human civilization had completely fallen to pieces because of it.  Does anyone know the name and author of the story? What processing is done on RAW files in the camera? Recently I came across a debate about whether it's fair to call RAW 'unprocessed' or 'unaltered' sensor data of a DSLR. As far as I know, the analog sensor data is processed into a digital RAW file using the ISO setting, a process during which the Bayer-sensor data is demosaiced as well. However, those are just the necessary steps for saving a digital file while maintaining maximum quality.  Are those assumptions correct? If so, are there any additional steps that need to be performed between the sensor receiving light and the saving of the RAW file? And can those be reasonably be described as an 'alteration' of the sensor data, or is it fair to say that a RAW file holds the unaltered sensor data? "Scaled $L^p$ norm" and geometric mean Deleted object would be re-saved by cascade (remove deleted object from associations) "Improve" treated as improper response to proper response to audit What is a combo update and how is it different than the regular update? What is a combo update and how is it different from a normal update?