Explanation for decoupling capacitors For the longest time I have been instructed to put on 100nF decoupling capacitors between the VCC and GND pins whenever I lay out a board involving an MCU. I could not find the exact reason as to why they are needed. However, after some research online I did find a few reasons for their use. Below I explain the main reason, as I understand it, why decoupling capacitors are needed. I would like some feedback and would also like to know if this explaination is satisfactory or not.   Consider a pin of an MCU which has a single LED connected to it through a resistor. Lets say that the pin toggles from low to high, that is it turns the LED on. Now with the LED on, it will draw current which the MCU will have to provide. In return, the MCU draws more current (i.e power) from the power supply i.e. its VCC and GND pins. However, a sudden current draw by the power pins causes a voltage drop across the resistance of the power traces. Since the power supply is slow as compared to the microcontroller, it senses the drop in voltage after a little time and then changes the voltage back to its constant value again ( since it is to behave as a constant voltage source). That is where the decoupling capacitors come in. Whenever the MCU draws in a current pulse, the capacitor makes sure that the voltage across the power pins remain essentially constant till the power supply voltage stabilizes again.  That is all I have understood. Now I do not know how to calculate the exact value of the decoupling capacitor but have been told that 100nF or any value in that neighbourhood is pretty safe to use.  I am waiting for your comments.
How to choose capacitor for an IC I'm a beginner in electronics from the software industry. With some self-taught things, I'm trying to implement some basic Arduino circuits. My confusion is about capacitors mainly. My understanding about capacitors is that they act as power storage for few seconds or milliseconds.  I found that most IC's must have capacitors connected to their pins.  My confusion is how to find out which pins need a capacitor, and how to find the correct capacitor for a circuit or a capacitor for an IC.  Finally, why are capacitors necessary in a circuit in such situations?
I know how to compute modular multiplicative inverses for co-prime variables $a$ and $b$, but is there an efficient method for computing variable $x$ where $x &lt; b$ and $a$ and $b$ are not co-prime, given variables $a$, $b$ and $c$, as described by the equation below?   $ a x \equiv c \mod b $   For example, given  $ 154x \equiv 14 \mod 182 $, is there an efficient method for computing all the possibilities of $x$, without pure bruteforce?  Please note that I'm not necessarily asking for a direct solution, just a more optimized one.    I do not believe that the Extended Euclidean Algorithm will work here, because $a$ and $b$ are not co-prime.   Edit:  Follow up question, since the first one had a shortcut:  Could the be computed efficiently as well?  $12260x \equiv 24560 \mod 24755$.  $107$ needs to be one of the computed answers. Define the sequence $aₙ=20+n²$ and $dₙ=\gcd(aₙ , aₙ₊₁)$ Find with proof the values dₙ takes. Story about a future with races Operator font in beamer/metropolis When using the metropolis theme for beamer, I get text and math in Fira Sans, except for math operators. I compile the following MWE using LuaTeX.  \documentclass{beamer}  \usetheme{metropolis}  \begin{document}    \begin{frame}     Ordinary text.     \[ a^2 + b^2 = \sin^2(x) - \mathsf{y} + \mathrm{z}  \]   \end{frame}  \end{document}   The outcome for me is that a, b, 2 and x are set in Fira Sans Light Italic, and y is set in Fira Sans Light, but sin is set in the sans font of (I guess) Latin Modern. (The z is also in Latin Modern, but this is expected behaviour from beamer.)  Unsurprisingly, I get the same result if I replace \usetheme{metropolis} with  \usepackage[no-math]{fontspec} \setsansfont[ItalicFont={Fira Sans Light Italic},   BoldFont={Fira Sans},   BoldItalicFont={Fira Sans Italic}]%   {Fira Sans Light}   I guess that this is to do with beamer's patching parts of the math fonts to match the text font (see ). However, I don't understand the font system well enough to modify this.  There was , but I've no idea how to apply that answer when using fontspec, or if this is even possible.  Is there a way to change the operator font to match the upright/sans math font (i.e., Fira Sans Light)? We put all of our unit tests in their own projects.  We find that we have to make certain classes public instead of internal just for the unit tests.  Is there anyway to avoid having to do this.  What are the memory implication by making classes public instead of sealed? Proving the so-called "Well Ordering Principle" How do I iterate over a range of numbers defined by variables in Bash? How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5} Mapping JSF .xhtml files to no extension The problem of counting the solutions $(a_1,a_2,\ldots,a_n)$ with integer $a_i\geq0$ for $i\in\{1,2,\ldots,n\}$ such that $$a_1+a_2+a_3+....a_n=N$$ can be solved with a stars-and-bars argument. What is the solution if one adds the constraint that $a_i\leq r_i$ for certain integers $r_1,\ldots,r_n$?  e.g. for $n=3$, $N=6$ and $(r_1,r_2,r_3)=(3,3,2)$, the tuple $(a_1,a_2,a_3)=(2,3,1)$ is a solution, but $(2,1,3)$ is not a solution because $a_3=3&gt;2=r_3$. asp.net mvc put controllers into a separate project A good approximation of $(1+x)^n$ is $1+xn$ when $|x|n &lt;&lt; 1$.  Does this approximation have a name?  Any leads on estimating the error of the approximation? Proof of $\int_{[0,\infty)}pt^{p-1}\mu(\{x:|f(x)|\geq t\})d\mu(t)=\int_{[0,\infty)}\mu(\{x:|f(x)|^p\geq s\})d\mu(s)$ Let $({\Bbb R},{\mathcal A},\mu)$ be the measure space where ${\mu}$ is the Lebesgue measure.  Assume that $\int_{\Bbb R}|f|^pd\mu&lt;\infty$ ($p\geq1$). There is an exercise for proving that       $$\int_{[0,\infty)}pt^{p-1}\mu(\{x:|f(x)|\geq t\})d\mu(t)=\int_{[0,\infty)}\mu(\{x:|f(x)|^p\geq s\})d\mu(s).$$   If one formally let $s=t^p$, then $ds=pt^{p-1}dt$ and one would immediately get the equality above. However, how can I justify it rigorously in the sense of Lebesgue integration?    [Edited] What puzzles me is that I have the "change of variable" theorem for Riemann integration, but all the integrations here are in the Lebesgue sense. Unless one has shown that the integrands are also Riemann integrable, how can I directly use "change of variable"? write some AMPscript to skip a record if its empty I have a data extension with a CustomerId(PK) that has multiple Productid's as Productid1, ProductId2, ProductId3...ProductId10.   Some of the Productid's are empty for some Customers and I'm trying to write some AMPscript if the productIdx is empty to show the next one.  I'm trying to display 6 products in an email and at the moment when I preview the email, if from the first six Products one doesn't have a value(is empty) I get the error "The subscriber preview failed to generate. Review the details, correct all issues, and try again. Product1 not found"  I want to skip the product that is NULL and go to the next one available.  %%[ SET @customerId = [customerId]  SET @customer_rows = LookupRows("PRL","customerId",@customerId) IF Rowcount(@customer_rows) &gt; 0 THEN SET @customer_row = ROW(@customer_rows, 1)  SET @product_count = 0  SET @productId1 = FIELD(@customer_row, "productId1")  IF NOT EMPTY(@productId1) THEN SET @product_rows = LookupOrderedRows("PI_UK", 1,"Normal_SalePrice Desc", "ProductCode", @productId1)  IF RowCount(@product_rows) &gt; 0 THEN  SET @product_count = ADD(@product_count,1) ELSE  SET @product_count = ADD(@product_count,0) ENDIF ELSE SET @product_count = ADD(@product_count,0) ENDIF    SET @productId2 = FIELD(@customer_row, "productId2") IF NOT EMPTY(@productId2) THEN SET @product_rows = LookupOrderedRows("PI_UK", 1,"Normal_SalePrice Desc", "ProductCode", @productId2) IF RowCount(@product_rows) &gt; 0 THEN SET @product_count = ADD(@product_count,1) ELSE SET @product_count = ADD(@product_count,0) ENDIF ELSE SET @product_count = ADD(@product_count,0) ENDIF  SET @productId3 = FIELD(@customer_row, "productId3") IF NOT EMPTY(@productId3) THEN SET @product_rows = LookupOrderedRows("PI_UK", 1,"Normal_SalePrice Desc", "ProductCode", @productId3) IF RowCount(@product_rows) &gt; 0 THEN SET @product_count = ADD(@product_count,1) ELSE SET @product_count = ADD(@product_count,0) ENDIF ELSE SET @product_count = ADD(@product_count,0) ENDIF  and so on till ProducId10...   I have uploaded a photo with the PRL Data extension How do I duplicate a whole line in Emacs? Why is energy in a wave proportional to amplitude squared? problems using apa6e with biblatex-apa As in  I'm trying to use apa6e and biblatex-apa together and having problems.  Before I arrived at these problems, over the course of many hours of much reading, I first managed to get BibTeX working as expected in a simple input file (by modifying sample2e.tex). Then I managed to get apa6e working as expected based on the author's example in apa6e.pdf (which uses apacite). But when I try to get apa6e working with biblatex-apa, I end up with problems.  Here's my input file:  \documentclass{apa6e}  \usepackage[american]{babel} \usepackage{csquotes}  % biblatex \usepackage[style=apa]{biblatex} \bibliography{biblatex-apa-test-references}  \title{An Example Document} \shorttitle{Psychology: the end} \author{Silly Name}  \authornote{\dots} \abstract{\dots}  \begin{document}  \maketitle  This is an example input\cite{7.01:2} file.  Comparing it with the output it generates can show you\cite{7.01:3a} how to produce a simple document of your own.  \printbibliography  \end{document}   Attempting to typeset this in TeXShop by running LaTeX, then BiBTeX (which based on console messages, does seem to correctly call biblatex rather than BiBTeX), then LaTeX again, I get the following error message which I am having great difficulty (no doubt due to my lack of experience with TeX and co.) decoding.  (./test6.aux) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ptm.fd) *geometry* driver: auto-detecting *geometry* detected driver: pdftex (./test6.bbl) Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment   Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Silly Name   Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Author Note  [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Abstract  [2] Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment   Underfull \hbox (badness 10000) in paragraph at lines 25--25  []\OT1/ptm/b/n/12 References  ./test6.tex:25: Undefined control sequence. &lt;argument&gt; \mkbibdateapalongextra  (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1pcr.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omlztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omsztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omxztmcm.fd) Overfull \hbox (8.03372pt too wide) in paragraph at lines 25--25 [][]  \OT1/ptm/m/n/12 Gilbert, D. G., Mc-Cler-non, J. F., Ra-bi-novich, N. E.,  Sugai, C., Plath, L. C., As-gaard, G., ... Botros,  ./test6.tex:25: Undefined control sequence. &lt;argument&gt; \mkbibdateapalongextra                                    {year}{month}{day}\iffieldundef {endyear}{... l.25   I tried many different sources in several different *.bib files before eventually trying the .bib database shown above and included with biblatex-apa. All trials gave a similar error.  Can someone help? I'm impressed that the poster above was able to do anything with apa6e and biblatex-apa, and if I only had her problem of having the reference page title show up in bold, I'd be really happy.  If you need to know, my tools are from a fresh installation of MacTeX that I immediately updated using the TeX Live Utility. I've checked my versions for apa6e (v0.3) and biblatex-apa (v4.2), and I think these are current. Which graphics formats can be included in documents processed by latex or pdflatex? Surface of genus $g$ does not retract to circle (Hatcher exercise) Show that there exists a unique $v_0 \in H^1(0,1)$ such that $u(0)=\int_0^1(u'v_0'+uv_0), \forall u \in H^1(0,1)$ Show that there exists a unique $v_0 \in H^1(0,1)$ such that $u(0)=\int_0^1(u'v_0'+uv_0), \forall u \in H^1(0,1)$. Further Show that $v_0$ is the solution of some differential equation with appropriate boundary conditions. Compute $v_0$ explicitly.   Let $f: H^1(0,1) \to \mathbb{R}$ be defined by $f(u)=u(0)$. Then I showed that $f$ is linear and continuous. Hence there exists $v_0 \in H^1(0,1)$ such that $u(0)=\int_{0}^1u'v_0'+\int_{0}^1uv_0$  The differential equation is given by $f=-u''+u$ with the conditions $u'(0)=u'(1)=0$.   How do I compute $v_0$ explicitly?? How do I make a textbox that only accepts numbers?