qid
int64
1
4.65M
metadata
listlengths
3
3
prompt
stringlengths
31
25.8k
chosen
stringlengths
17
28.2k
rejected
stringlengths
19
40.5k
domain
stringclasses
28 values
5,249
[ "https://biology.stackexchange.com/questions/5249", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/1474/" ]
In the normal function of the kidney, the bloodstream is near emptied of fluids as it moves through the glomerulus, in which glomerular filtrate is formed. As it proceeds through the Nephron, a significant amount of this material is returned to the bloodstream, and only a comparatively timy amount goes into the urine....
Probably because it's easier to retain what the body <em>wants</em> than get rid of what the body <em>doesn't want</em>. What does your body want to <strong>keep</strong> from your Urine? Pretty much water and selective ions (Cl-, K+, Na+, Ca+2, etc.). Maybe a few other things, depending on how healthy you are. Now,...
I would argue from an evolutionary perspective: not all kidneys are created equal. The mammalian kidney has a long evolutionary history and potentially a lot of phylogenetic inertia. Mammals do what they can with what they inherited from their ancestors. The metanephric kidney, which is what mammals have, is thought t...
https://biology.stackexchange.com
191,456
[ "https://stats.stackexchange.com/questions/191456", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/101199/" ]
To be more specific, assume the following scenario: A customer advertising for a job on your site wants to know whether buying an extra ad-product or not will increase the number of applicants. You have access to data of previous customers who bought the product, and the resulting number of job applicants their advert...
Your data seems slightly S-shaped, so you could try a cubic (higher order polynomial than cubic runs the risk of overfitting).
What does the science behind the data suggest? Yes, you can fit many different models including polynomials, splines, trigonometric functions, non-parametric smoothers, etc. But what is most important is what make sense based on the science behind the data (having fancy computers does not excuse us from understanding...
https://stats.stackexchange.com
106,856
[ "https://datascience.stackexchange.com/questions/106856", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/125747/" ]
I know what Probability &amp; Odds ratio is, but I want to know under what circumstances each is used. When is Odds preferred over Probability?
Assuming you were aware of <strong>Probability &amp; Odds</strong>, <ul> <li>Use <strong>odds</strong> to describe that if there are any chances of the occurrence of an event or not.</li> <li>Use <strong>probability</strong> to determine the likelihood of the happening of an event, i.e. how often the event will take pl...
Odds describe association between two events. You can't have an odds without a reference event. Probability, on the other hand, simply describe the likelihood of a particular event.
https://datascience.stackexchange.com
39,330
[ "https://engineering.stackexchange.com/questions/39330", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/29986/" ]
My house is heated by a condensing natural gas furnace that is rated as 92% efficient. It has the option to draw combustion air directly from outside. I know the main advantage of this is avoiding negative pressure within the house to reduce drafts. However, I thought of a few questions: <ol> <li>Outside air is colder....
the outside air is colder, but the flame temperature is still much much hotter than that so the difference cold inlet air makes on the outlet temperature of the furnace will be small. The same commentary applies to the density argument: yes, but the effect is small. The fact that the outlet air is at 43 C represents th...
<blockquote> Outside air is colder. Does this decrease the maximum temperature of the flames? </blockquote> <ol> <li>Your furnace will always need air for combustion. This combustion air must ultimately come from the outside. Combustion air can either come directly from outside (say it's 30F outside) or it can leak int...
https://engineering.stackexchange.com
134,623
[ "https://physics.stackexchange.com/questions/134623", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/37677/" ]
The square of any of the three Pauli Spin matrices is equal to the identity. Is there any physical meaning to this? Would you expect it? Maybe in the context of the $SU(2)$ group?
OP asks: <blockquote> <em>Is there any physical meaning to this?</em> </blockquote> <em>Yes,</em> the Pauli matrix $\sigma_j$ represents (up to a proportionality factor) the spin in the $j$th direction of a spin $\frac{1}{2}$ system. Such system has only two spin states: $\uparrow$ and $\downarrow$, with opposite e...
This is because there are just two possible values to the spin in any direction, $-\frac{\hbar}{2}$ and $\frac{\hbar}{2}$, they just differ in a sign, so when you square it you get a single value $\frac{\hbar^2}{4}$. Think about this, the only possible value when you measure the square of $S_z$ is $\frac{\hbar^2}{4}$ f...
https://physics.stackexchange.com
482,374
[ "https://physics.stackexchange.com/questions/482374", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/227447/" ]
If it takes energy to slow an object down, and then the object also loses KE, then how is energy conserved? Don't you have a net loss of energy?
<strong><em>If it takes energy to slow an object down, and then the object also loses KE, then how is energy conserved? Don't you have a net loss of energy?</em></strong> You never have a "loss" of energy. It is always conserved. It may just change its form. In order to slow the object down it takes negative work that...
Energy conservation means the total energy of the system, which includes the object and the person who does the slowing down. If the object has mass <span class="math-container">$m$</span> and moves with speed <span class="math-container">$v$</span> the kinetic energy is <span class="math-container">$\frac{1}{2} m v^2...
https://physics.stackexchange.com
1,663,599
[ "https://math.stackexchange.com/questions/1663599", "https://math.stackexchange.com", "https://math.stackexchange.com/users/126344/" ]
I want to calculate the following integral $$\int_{0}^{20}\{x\}^{2}+\left \lfloor{x}\right \rfloor^{2}dx $$ We have that $x=\{x\}+\left \lfloor{x}\right \rfloor$, then $x^2-2\{x\}\left \lfloor{x}\right \rfloor =\{x\}^{2}+\left \lfloor{x}\right \rfloor^{2}$ $$\int_{0}^{20}\{x\}^{2}+\left \lfloor{x}\right \rfloor^{2}dx...
<strong>Hint</strong> The main idea here is that in each interval of length $1$, the fractional part of $x$ behaves exactly like $x$ (without the integer increase). The greatest integer part over each interval is a constant and is equal to the lower bound of that interval. Now integrating a constant from $5$ to $6$ ...
I think it is easier to proceed in the following way: \begin{align} \int_0^{20}\{x\}^2+\lfloor x\rfloor^2dx &amp; = \sum_{k=0}^{19}\int_k^{k+1}\{x\}^2+\lfloor x\rfloor^2dx\\ &amp; = \sum_{k=0}^{19}k^2 + \int_0^1x^2dx\\ &amp; = \frac{19\cdot20\cdot39}{6} +\frac{20}{3}\\ &amp; = \frac{14840}{3}. \end{align} Of course, fr...
https://math.stackexchange.com
195,352
[ "https://math.stackexchange.com/questions/195352", "https://math.stackexchange.com", "https://math.stackexchange.com/users/18540/" ]
Let $G$ be an abelian group which is killed by multiplication with the integer $n\geq 1$. Let $n=a\cdot b$ with $a,b \geq 1$ and relatively prime. Denote by $G[a]$ resp. $G[b]$ the $a$-resp. $b$-torsion subgroups of $G$. Then why are the following maps isomorphisms: (1) $G[a] \times G[b] \rightarrow G$ (addition ma...
Find $u,v\in\mathbb Z$ such that $u a + v b=1$. (1) For $g\in G$, let $x=ua\cdot g$, $y=vb\cdot g$. Then $x+y=g$ and $bx=un\cdot g=0$, $ay=vn\cdot g$. Hence $(y,x)\mapsto g$. (2) For $(x,y)\in G[a]\times G[b]$, let $g=vx+uy$. Then $b\cdot g = vbx+0=(vb+ua)x=x$ and similary $a\cdot g=y$.
Surjectivity of the first map may be seen via Bezout's Lemma: Since $a,b$ are coprime, there are integers $m,n$ such that $as+bt=1 (=gcd(a,b))$. So for an element $g \in G$, $g = 1g = (as+bt)g = asg+btg$ and you see that $asg$ has $b$-torsion and $btg$ has $a$-torsion, so $(asg,btg)$ is a suitable preimage. Essentia...
https://math.stackexchange.com
305,194
[ "https://softwareengineering.stackexchange.com/questions/305194", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/207788/" ]
Is it best practices to never alter the contents of a <code>Collection</code> that is passed as a parameter? I want <code>orgSet</code> to only have words. But, sometimes there are one char strings (like question marks, commas, etc.) that I want to remove from the set of words. These are not the full methods, but it m...
The <code>_Foo()</code> variant, treating the input as read-only, is more thread-safe. For example, a parallel thread could do something else with <code>origSet</code> (again, in a read-only manner) while your code is trimming punctuation. The <code>_Foo()</code> variant will cause fewer surprises and probably less b...
The answer is mostly six of one, half a dozen of the other.<br> For my simple need of cleansing html mark-up, numbers, syntax, etc. out of a tokenized doc, <code>removeSyntax_bar()</code> makes sense; those are simple utility methods. But, for interface design intended for public consumption, <code>removeSyntax_foo()</...
https://softwareengineering.stackexchange.com
83,949
[ "https://mathoverflow.net/questions/83949", "https://mathoverflow.net", "https://mathoverflow.net/users/2095/" ]
Hello, When we have left exact functors $F: A \to B , G: B \to C$ (between abelian categories), we would like sometimes to state that $D(GF)=D(G)D(F)$ (functors between bounded below derived categories). It holds when $F$ sends some adopted to $F$ class into an adopted to $G$ class. My question is whether this is onl...
This is far from being a technical issue, there are many examples when it fails. Suppose that A is the category of $\mathbb F_p$-vector spaces, $B = C$ the category of abelian groups, $F$ the embedding, $G = \mathrm{Hom}(\mathbb Z/p\mathbb Z, -)$. Then it is easy to see that $DF = F$, $D(GF) = GF$, but $DG\circ F \neq ...
My favorite (counter)example is this: let $A$, $B$, $C$ be the categories of left modules over some rings $R$, $S$, $T$ (respectively), and let $F$ and $G$ be the functors of tensor product with some bimodules, that is $F(M)=K\otimes_RM$ and $G(N)=L\otimes_SN$, where $K$ is an $S$-$R$-bimodule and $L$ is a $T$-$S$-bimo...
https://mathoverflow.net
1,017
[ "https://cs.stackexchange.com/questions/1017", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/268/" ]
I am trying to figure out the simplest way to do this using a regular expression. <ul> <li>Three symbols a, b, c.</li> <li>The sequence length is unlimited, i.e. *.</li> <li>The symbol a must be somewhere in the sequence at least once, but can appear more than once. </li> <li>The sequence may have only a.</li> </ul> ...
The simplest regular expression I can think of for this is $\left(a \mid b \mid c\right)^* a \left(a \mid b \mid c\right)^*$. This is simpler than yours by the following measures of complexity: <ul> <li>It contains less nesting (and fewer parentheses in general)</li> <li>It contains fewer quantifiers</li> </ul>
As the expression is to be part of a parser (i.e. should be efficiently checkable), it might be a good idea to make the regular expression unambiguous: $\qquad \displaystyle (b \mid c)^*\, a\, (a \mid b \mid c)^*$ describes the same language but avoids ambiguity by distinguishing the <em>first</em> $a$ in a matching ...
https://cs.stackexchange.com
166,515
[ "https://physics.stackexchange.com/questions/166515", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/71854/" ]
According to multiple websites, any object in free-fall (no air resistance) on earth will accelerate towards the Earth at 9.8 m/s. If all objects fall towards the Earth at the same rate, regardless of their mass, then why is it harder to push a heavier object away from the Earth, than a lighter object?
When you are lifting an object, you are exerting a force that balances the force of gravity on the object. By $$ F = m g$$ where g is the acceleration due to gravity, you see that a greater mass causes a greater gravitational force that has to be balanced by the force you apply to the object by holding it or lifting it...
The acceleration of any object due to gravity is $g = 9.8m/s$ and this <em>constant</em> does not depend on the mass of the object (or the speed of the object or anything else for that matter, as long as you're on/near earth). Pushing an object away from the earth is another story. While the <em>acceleration</em> of ob...
https://physics.stackexchange.com
340,417
[ "https://softwareengineering.stackexchange.com/questions/340417", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/132092/" ]
I have added this method to a C# class: <pre><code>public bool CanAddLeave(Leave newLeave, out AddLeaveResult result) { result = _repository.CreateSqlQuery("CanSendLeaveRequest ") .SetParameter("employeePositionId", newLeave.EmployeePosition.EmployeePositionId) .UniqueResult&lt;AddLeaveResu...
Return the <code>AddLeaveResult</code> directly and drop the out parameter. <pre><code>public AddLeaveResult CanAddLeave(Leave newLeave) { AddLeaveResult result = _repository.CreateSqlQuery("CanSendLeaveRequest") .SetParameter("employeePositionId", newLeave.EmployeePosition.EmployeePositionId) ...
Return the result: <pre><code>public AddLeaveResult CanAddLeave(Leave newLeave) { } </code></pre> What is the real reason why a boolean needs to be returned to the GUI? Another <code>result == AddLeaveResult.Success</code> check in the GUI is enough to determine if an email can be sent. It sounds like the boolean ret...
https://softwareengineering.stackexchange.com
130,945
[ "https://physics.stackexchange.com/questions/130945", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/57222/" ]
As we know that particles having structure (quarks) decays to lighter products. We can show the decay of them by quark level Feynman diagram. But what about muon decays to electron, neutrino (muon type) and anti neutrino (electron type). Is there a way to make Feynman diagram of it?
The Feynman diagram is completely analogous to the Feynman diagram of the decay of neutron (beta-decay): <img src="https://i.stack.imgur.com/EJXh8.png" alt="enter image description here"> The muon $\mu^-$ splits to a muon neutrino (there is a mistake on top, it should say $\nu\mu$, not $\nu_e$, sorry) and the $W^-$-b...
Sorry, but I don't understand what you mean when you say that quarks have a structure. What we know is that quarks are point-like particle, like was confirmed from SLAC years ago. Quarks aren't so much different from Leptons, unless they are "colored".
https://physics.stackexchange.com
453
[ "https://scicomp.stackexchange.com/questions/453", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/81/" ]
I'm working on a machine with a version of PETSc compiled by someone else. Is there a straightforward way to find out which options were used at compile time from the installation itself? For example, is there a file that has all of the compile time options that is generated by <code>make</code>?
There are a few ways to do this: <ul> <li>Check <code>$PETSC_ARCH/conf/reconfigure-$PETSC_ARCH.py</code> (where <code>$PETSC_ARCH</code> is expanded, i.e. for me that is 'arch-c')</li> <li>Depending on which information you want, you could use <code>make getlinklibs</code> or <code>make getincludedirs</code></li> <li>...
In the source directory, there is a log file to record every output of the screen including the commands has been input.
https://scicomp.stackexchange.com
46,894
[ "https://softwareengineering.stackexchange.com/questions/46894", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13825/" ]
Is there nowadays any case for brevity over clarity with method names? Tonight I came across the Python method <code>repr()</code> which seems like a bad name for a method to me. It's not an English word. It apparently is an abbreviation of 'representation' and even if you can deduce that, it still doesn't tell you wh...
I heard a great quote on this once, something along the lines of: <blockquote> Code is written to be read by humans, not computers </blockquote> If computers were all we cared about we would still be writing assembler, or 1s and 0s for that matter. We have to consider the people who will be using our code, as an API fo...
I would really love for the guys at the top to get massive amounts of upvotes. That way, at least, I get some assurance that the global community will, in general, appreciate when I write a 35 character method name that documents its meaning and intention, without necessarily ever having to look up the docs or other co...
https://softwareengineering.stackexchange.com
293,516
[ "https://mathoverflow.net/questions/293516", "https://mathoverflow.net", "https://mathoverflow.net/users/25511/" ]
I have three questions. <ol> <li>I consider a sequence of metrics $h_n$ on a two-dimensional torus which all induce the same conformal structure. Suppose that the volume of $h_n$ is always $1$. Is it possible that the diameter of $h_n$ tends to infinity? </li> <li>Consider such a sequence of metrics along which the di...
Question 2: Yes, there are conformal metrics on a divergent sequence of tori with Area=1 and bounded diameter: Cutting the torus open along an embedded essential curve, you obtain a cylinder, conformally equivalent to $[0,R] \times S^1$. The fact that the sequence of conformal structures diverges, means that we can <...
For question 1: Write $g_0$ for your base unit volume flat metric on $\mathbb{T}^2$. Fix a point $p\in\mathbb{T}^2$. Let $u_i$ be a sequence of functions on $\mathbb{T}^2$ such that : <ul> <li>$\int_{\mathbb{T}^2}u_i^2dv_{g_0}=1$</li> <li>$u_i$ is constant equal to $1/i$ outside a ball (for $g_0$) of radius $\tfrac{1}...
https://mathoverflow.net
142,915
[ "https://softwareengineering.stackexchange.com/questions/142915", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13033/" ]
Whenever I'm writing a typical if-else-construct in any language I wonder what would be the best way (in terms of readability and overview) to add comments to it. Especially when commenting the else clause the comments always feel out-of-place for me. Say we have a construct like this (examples are written down in PHP)...
I prefer either: <pre><code>if ($magic == big) { bigMagic(); } else { smallMagic(); } </code></pre> or: <pre><code>if ($magic == big) { // big magic requires a big surprise, so I'm telling you about it here surprisingThing(); } else { // give a magical feeling even if $magic is noMagicAtAll s...
<h1>Try explanatory variable names</h1> Comments can be great, but when possible, make the code self-documenting. One way of doing this is with explanatory variable names. For example, rather than this: <pre><code>if (user.has_sideburns &amp;&amp; user.can_gyrate) { // This user is a potential Elvis impersonator }...
https://softwareengineering.stackexchange.com
447,582
[ "https://stats.stackexchange.com/questions/447582", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/120443/" ]
L2 norm regularization penalizes large weights to avoid overfitting, basically by subtracting the magnitude of the weight vector (times a regularization parameter) from each weight during each update. However, if the weights are negative, the weight vector (and therefore the L2 norm) could have a really large magnitu...
This is our objective function, composed of a loss function and a regularizer. <span class="math-container">$$\mathcal O(w,x,y) = \mathcal L(w,x,y)+\mathcal R(w)$$</span> So <span class="math-container">$\mathcal R(w)=\|w\|_2^2=\sum{w_i^2}$</span> in the case of <span class="math-container">$\ell_2$</span> regulariza...
L2 regularization adds <span class="math-container">$w_i^2$</span> term to the loss function. In iterative approaches using gradients, we subtract the gradient of the loss function not the magnitude of the weight itself. And in the loss function, the regularization part's derivative with respect to <span class="math-co...
https://stats.stackexchange.com
867,143
[ "https://math.stackexchange.com/questions/867143", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151675/" ]
In watching <em>The Fault in Our Stars</em> I could not help but cringe at a line that flew in the face of mathematics and subsequently ruined the movie for me: <blockquote> "There are infinite numbers between 0 and 1. There's .1 and .12 and .112 and an infinite collection of others. Of course, there is a bigger inf...
Assume Alice has a basket with balls in it, one for each real number between $0$ and $1$, which is written on the ball. OK, it is hard to imagine so many balls - or even how one would manage to write down an arbitrary real number on such a ball, but that is not the point here. Bob also has such a basket, also with one...
Look, don't worry about it. The author is absolutely correct if by "bigger" he means bigger Lebesgue measure rather than bigger cardinality. Cardinality is just one way to abstract our intuitions about size and it isn't obviously the best one to use in all situations (especially in this kind of situation where it retur...
https://math.stackexchange.com
820
[ "https://mechanics.stackexchange.com/questions/820", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/534/" ]
I ride a Honda Rebel 250 motorcycle and over the past few days I find that the bike is losing power when accelerating fast. When I twist the throttle to accelerate quickly (in any gear) I hear the engine sound increasing in pitch by a lot more than I'm used to hearing, but the motorcycle doesn't seem to respond and pe...
My knowledge of motorcycles is limited so I could be wrong, but it sounds like the clutch is slipping.
I realize this question has been answered, but keep in mind that any carbureted engine can bog down under throttle and cause a lack of acceleration. If it can be backed off and regain acceleration, then I'd suggest carb tuning. If the engine revs, but no acceleration then it's a slipping clutch.
https://mechanics.stackexchange.com
978,775
[ "https://math.stackexchange.com/questions/978775", "https://math.stackexchange.com", "https://math.stackexchange.com/users/14366/" ]
The rewriting of $\varphi\to \psi$ into the logically equivalent $\neg \psi\to\neg \varphi$ is called <em>contraposition</em>. Is there a similar word for rewriting $\forall x.\varphi$ into $\neg\exists x.\neg \varphi$? The two operations are similar in that they replace one logical construction with one in which the...
<blockquote> Is there a similar word for rewriting ∀x.φ into ¬∃x.¬φ? </blockquote> Short answer: No. Or at least there surely isn't one in common usage. Making that kind of move in a proof in a lecture, I would probably have just said "By [the familiar] quantifier equivalence, ..." By the way, the observation th...
<em>Contraposition</em> in <em>classical</em> logic can be &quot;reduced&quot; to the <em>equivalence</em> between : <blockquote> <span class="math-container">$p \rightarrow q$</span> and <span class="math-container">$\lnot p \lor q$</span>. </blockquote> Thus, from : <blockquote> <span class="math-container">$\varphi ...
https://math.stackexchange.com
2,870,828
[ "https://math.stackexchange.com/questions/2870828", "https://math.stackexchange.com", "https://math.stackexchange.com/users/470072/" ]
Let's say we've got the following model: <br> There is a set of people $A_1,...,A_n$ That is split into two groups: Those who always say the truth, and those who always lie.<br> Now, every person in this set makes a statement about some other people of the set, e.g. $A_1$ might say "$A_3$ and $A_4$ are liars, and $A_5...
In your model where nobody can make (meaningful) compound statements, what you observe is: <ul> <li>$A$ will say "$B$ is a liar" if and only if $A$ and $B$ belong to <em>different groups</em>.</li> <li>$A$ will say "$B$ is a truth teller" if and only if $A$ and $B$ belong to the <em>same</em> group.</li> </ul> Then n...
I think you are right to say that it can't be that all this information comes to nothing. So you do seem to be disallowing self reference as you say that every person makes statements about other people. So how about this? A says that B always tells the truth. This means that they are either both truth tellers or bot...
https://math.stackexchange.com
1,049,065
[ "https://math.stackexchange.com/questions/1049065", "https://math.stackexchange.com", "https://math.stackexchange.com/users/197070/" ]
Find all complex numbers that solve this equation: $|z + 2| = |z − 3i|$ How would I go on about solving this one? 4 times? Like this? $I. z+2=z-3i$ $II. z+2 = -(z-3i)$ $III. -(z+2) = z-3i$ $IV. -(z+2) = -(z-3i)$
We have: $\left|\dfrac{z+2}{z-3i}\right| = 1 \Rightarrow \dfrac{z+2}{z-3i} = e^{j\theta}$. You can take it from here.
Another way to do this is by thinking of it geometrically. The equation $$|z + 2| = |z − 3i|$$ says that the distance of $z$ from $-2$ is equal to the distance of $z$ from $3i$. This is true if and only if $z$ lies on the line which is the perpendicular bisector of the interval joining $-2$ and $3i$. This line passe...
https://math.stackexchange.com
5,222
[ "https://quantumcomputing.stackexchange.com/questions/5222", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/5174/" ]
In implementing a quantum subroutine it is important to uncompute temporary registers after use, to ensure the output state of the subroutine is not entangled with them (which would affect its behaviour). Why is it necessary to perform this through uncomputation rather than simply setting temporary registers to zero a...
Because all operations you carry out (besides measurement) need to be unitary and this one would not.
Uncomputing temporary registers seem to me to be the most efficient way to set temporary registers back to zero. You can't measure these and classically flip them <ol> <li>because a measurement of <span class="math-container">$1$</span> doesn't necessarily mean the state of the temporary register is <span class="ma...
https://quantumcomputing.stackexchange.com
81,355
[ "https://softwareengineering.stackexchange.com/questions/81355", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/14969/" ]
Sony was recently hacked with a SQL injection and the passwords of their user's was stored in plain text. These are rookie mistakes. In such a large company, how does this pass QA? How do they not have better teams than to know better than this? The sheer size of the company that was hacked makes this different. It af...
First thing that comes to mind is, because they're big enough to grow a few layers of bureaucracy. This means, among other things, that you no longer have really smart coders in charge of the hiring process, which means they lose their ability to weed out potential programmers and QA people who are incompetent. Which...
The bigger the corporation, farther away the decision makers are from any real-life responsibility. Knowing how corporations work, the site design was probably outsourced to some consulting company chosen based on the lowest price per developer. That company would in turn hire bunch of random people on similar criter...
https://softwareengineering.stackexchange.com
193,555
[ "https://stats.stackexchange.com/questions/193555", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/85551/" ]
I know i'm missing something here, please help me understand the cox proportion assumption. What is the point of having a hazard rate function over time if it first has to meet the cox proportion assumption. i.e. surgery risk is higher immediately after surgery and declines over time, and therefore this scenario will n...
Fomite does not really answer your question and is partially false. First, what is proportional between the exposure groups is NOT the survival probability (as Fomite mentioned) but the hazard rate. It is important to distinguish the two. If you plot two survival probabilities with a proportional rate, you will immed...
The Proportional Hazards Assumption is an assumption that the hazard function is <em>proportional</em> between two (or more) groups. So, for example, if you have "High Risk" and "Low Risk" patients, their survival functions can change over time, but as long as they change in a way where they are still <em>proportional...
https://stats.stackexchange.com
167,700
[ "https://dba.stackexchange.com/questions/167700", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/120110/" ]
MySQL server having following specifications: <ol> <li>8GB RAM </li> <li>Data &amp; Index of size 49.64GB</li> <li>Dump file size is 17.24GB(18512936320 Bytes)</li> <li>CPU: <ol> <li>Processor: Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz</li> <li>Architecture: x86_64</li> <li>vendor: Intel Corp.</li> <li>size: 2400MHz<...
At least the inner countings are not necessary. You can easily use an <code>EXISTS</code> query, in negative: <pre><code>SELECT name, continent, population FROM world x WHERE NOT EXISTS ( SELECT 1 FROM world y WHERE y.population &gt; 25000000 AND x.continent = y.continent ) ORDER BY continent, population DESC ...
You can also use window aggregates for this. Find the maximum country population for each continent and keep only those that are not over 25 million.<br> This will work in Postgres (and MariaDB 10.2+ that has added window functions and CTEs) but not in current MySQL versions: <pre><code>WITH ct AS ( SELECT name, con...
https://dba.stackexchange.com
342,309
[ "https://math.stackexchange.com/questions/342309", "https://math.stackexchange.com", "https://math.stackexchange.com/users/67737/" ]
Find the point on $y = \sqrt x$ closest to $(1,0)$. I tried setting it $-x=x^{1/2}$ and then solve but I really am confused. please help.
In calculus, you have a strong method optimizing functions, i.e. finding minima and maxima (Do you know what method I'm talking about?). here, you have a curve $y = \sqrt x$. But this is not the function you are optimizing. You are looking for the <em>closest</em> point on the curve to $(1,0)$. This means you want to ...
Hints: Take a point $\,(x,\sqrt x)\, $ on $\,y=\sqrt x\,$ , so its distance from $\,(1,0)\,$ is $$d(x):=\sqrt{(x-1)^2+x}$$ Now you have to find the maximal value of the above. You can take $\,d(x)^2\,$ since it's easier and yields the same maximal point (why?) , so differentiating: $$(d(x)^2)'=\left((x-1)^2+x\right...
https://math.stackexchange.com
9,001
[ "https://cardano.stackexchange.com/questions/9001", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/6719/" ]
minting script <pre><code> &quot;type&quot;: &quot;all&quot;, &quot;scripts&quot;: [ { &quot;type&quot;: &quot;after&quot;, &quot;slot&quot;: 155761 }, { &quot;type&quot;: &quot;sig&quot;, &quot;keyHash&quot;: &quot;e9ce8633aef95b632b...
<blockquote> No, transactions where the destination address is a Byron era address are no longer valid. I <em>think</em> you can send funds in Byron era addresses to Shelley addresses. If you still have a Byron era wallet I highly recommend that you upgrade it to Shelley sooner rather than later. At least in the Daedal...
Yes, you can send funds to Byron address from Shelley address and vice-versa. You can spend ADA and native assets like that. Nothing special is required.
https://cardano.stackexchange.com
419
[ "https://cstheory.stackexchange.com/questions/419", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/102/" ]
Is it possible (slash can you provide an example) to reduce computational complexity of a problem by using a parallel algorithm which does not require a number of processors relative to the input size?
If you mean O(1) processors, then no, computation complexity cannot be reduced. Simply line up the work done by each processor and do it on a single one. If you are worried about synchronization, then one processor can easily emulate that.
There is an emerging field of coarse-grained parallel algorithms, where the running time (and other computational resource consumption) is regarded as a function of independent parameters <em>n</em> (input size) and <em>p</em> (number of processors), often under a natural assumption <em>n >> p</em>. A good starting po...
https://cstheory.stackexchange.com
373,007
[ "https://mathoverflow.net/questions/373007", "https://mathoverflow.net", "https://mathoverflow.net/users/156792/" ]
I heard that the Rips complexes associated to the Cayley graphs of hyperbolic groups are contractible for a sufficiently large radius. Is the converse true? Namely, if a group is non-hyperbolic, then is its Rips complex never ``asymptotically&quot; contractible? For example, we can ask if the non-hyperbolic group <span...
Your suspicion is correct. The following hypergraph <span class="math-container">$H$</span> provides a negative answer to your question. Let <span class="math-container">$V=\{0,1,\dots, 11\}$</span>. Then <span class="math-container">$V=V_0\cup V_1\cup V_2$</span>, where <span class="math-container">$V_0=\{0,1,2,3\}$</...
Thinking about Alex Ravsky's example reminded me of a construction I saw here arxiv.org/abs/1902.05055 (top of page 18) which was used in a related, but different context. I just checked that their construction with r=s=3 also provides a negative answer to my question. By modifying a different construction from arxiv.o...
https://mathoverflow.net
1,550
[ "https://physics.stackexchange.com/questions/1550", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/253/" ]
A few questions about a magnet and a paperclip: <ol> <li>What do you call a material that attracts another material via magnetism? (i.e. the magnet)</li> <li>What do you call the material that is attracted in #1? (i.e. the paperclip)</li> <li>What properties make #1 (the magnet) and #2 (the paperclip) get along so wel...
The heat equation is a macroscopic equation. It describes the flow of heat from hot objects to cold ones. Of course it can not be time-reversible, since the opposite movement never happens. Well, I say 'of course' but you actually have stumbled on something important. As you say, the fundamental laws of nature should ...
CPT theorem is not a theorem for all of physics but only for a quantum field theory (QFT). Also CPT invariance doesn't mean that QFT is necessarily invariant with respect to any of C, P and T (or PT, TC and CP, which is the same by CPT theorem) transform. Indeed, all of these symmetries are violated by weak interaction...
https://physics.stackexchange.com
382,276
[ "https://softwareengineering.stackexchange.com/questions/382276", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/136560/" ]
I'm trying my hand at multi-thread C programming and decided to start with a simple ncurses program to move a character across the terminal screen and change direction based on user input (think classic snake game). I decided that I needed to create a separate thread to handle moving the character across the screen, w...
In my blunt opinion this is like a ridiculous way to use threads because what does user input involve? It involves checking to see if the user pressed/release some key on the keyboard or pushed/release some button on a mouse or joystick (and normally I wouldn't use a blocking function like <code>getch</code> for this)....
From a purely conceptual standpoint, <code>main()</code> is no different than any other thread in the same process. It just happens to be the one that was started first but still shares code and data with every other thread within the process. Under the hood, there may be differences in how threads are implemented. ...
https://softwareengineering.stackexchange.com
608,115
[ "https://stats.stackexchange.com/questions/608115", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/382189/" ]
I am trying to answer the following question from my quantum mechanics textbook and my probability theory is admittedly rusty (this is not schoolwork as should be clear from my post history on Phys and Math SE): <blockquote> The probability density for the decay of a radioactive nucleus is <span class="math-container">...
It's surprising but correct. The exponential distribution is <em>memoryless</em>, meaning that the distribution of time until a decay is the same whenever you start. It's easy to show it's the same if you pick any <em>fixed</em> time to start, and you've shown it's also the same if you pick a random time to start. In...
I would handle with a different approach which, imo, is more insightful: Consider <span class="math-container">$T_i\overset{\textrm{iid}}{\sim}\mathrm{Exp}(\alpha), ~i\in\{1, 2\}; Z:=|T_1-T_2|.$</span> Now <span class="math-container">\begin{align}\mathbb P(Z\leq z) &amp;= \mathbb P(|T_1-T_2|\leq z) \\&amp;= \mathbb P(...
https://stats.stackexchange.com
1,127,358
[ "https://math.stackexchange.com/questions/1127358", "https://math.stackexchange.com", "https://math.stackexchange.com/users/86120/" ]
I think the integrating factor is $r(x)=e^{\int \frac{1}{t}dt} = e^{ln|t|}=t$. Multiplying the DE by the integrating factor to get $$ty' - \frac{y}= bt$. Here $x(t)=t$, so $(x(t)y)'=(ty)'=bt$. So $\int \frac{\mathrm{d} }{\mathrm{d} t}(ty) dt= \int bt dt$. By integrating, I get $y=\frac{bt}{2}$. However once I chec...
You cannot ... It is not ture that $Px \vdash Py$, simply because : $Px \nvDash Py$. As you can see from the answer above, you cannot prove : $¬[Px→∀xPx]⊢∀xPx$ because it is not <em>valid</em>. Cosnider the interpretation sugegste by Rob, with $\mathbb N$ as the <em>domain</em> of the interpretation and $(x=1)$ in p...
You haven't said exactly what logic you are working in, but the deduction you are trying to make is not correct in the usual formulations of first order logic. To see this, note that $\lnot(A \rightarrow B)$ is equivalent to $A \land \lnot B$. If you interpret $Px$ as $x = 1$ in the theory of the natural numbers, then ...
https://math.stackexchange.com
3,925,433
[ "https://math.stackexchange.com/questions/3925433", "https://math.stackexchange.com", "https://math.stackexchange.com/users/716866/" ]
I was solving some basic Math Coding Problem and found that For any number <span class="math-container">$N$</span>, the number of ways to express <span class="math-container">$N$</span> as sum of Odd Numbers is <span class="math-container">$Fib[N]$</span> where <span class="math-container">$Fib$</span> is Fibonnaci , I...
Let's say <span class="math-container">$S(n)$</span> is the set of ways to write <span class="math-container">$n$</span> as a sum of odd numbers. We can partition this set into two subsets: <span class="math-container">$A(n)$</span> and <span class="math-container">$B(n)$</span>, where <span class="math-container">$A(n...
We have from first principles that the number of compositions into odd parts is given by <span class="math-container">$$[z^N] \sum_{q\ge 1} \left(\frac{z}{1-z^2}\right)^q.$$</span> This simplifies to <span class="math-container">$$[z^N] \frac{z/(1-z^2)}{1-z/(1-z^2)} = [z^N] \frac{z}{1-z-z^2}.$$</span> Now <span class="...
https://math.stackexchange.com
2,961,307
[ "https://math.stackexchange.com/questions/2961307", "https://math.stackexchange.com", "https://math.stackexchange.com/users/570120/" ]
It's clear to me that this limit does not exist, because you can go to zero using the identity line and you get <span class="math-container">$1$</span>, but if you go to zero in direction getting close to the imaginary line then you get <span class="math-container">$0$</span>. How can i formalize that idea, especially...
You could write it as <span class="math-container">$$ \lim_{r\rightarrow 0} \frac{\mathrm{Re}(re^{i\theta})}{\mathrm{Im}(re^{i\theta})} $$</span> in which <span class="math-container">$\theta$</span> specifies the direction you approach 0. This particular limit is equal to <span class="math-container">$\cot \theta$</s...
"go to zero using" is a bit flaky and informal, but you have the general idea. The definition of <span class="math-container">$\lim_{z\to a}f(z) = K$</span> means that for any <span class="math-container">$\epsilon &gt; 0; \epsilon \in \mathbb R$</span> you can find a <span class="math-container">$\delta &gt; 0$</span...
https://math.stackexchange.com
605,702
[ "https://physics.stackexchange.com/questions/605702", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/174615/" ]
Why is the Poynting vector <span class="math-container">$\vec S=\frac{1}{\mu_0}(\vec E\times \vec B)$</span> not able to produce radiation when fields are static?
If the one way speed of light in vacuum varies in such a way that the 2 way speed of light is c, then the one way speed of light in a medium will necessarily vary in such a way that this measurement will get a null result. The one way speed of light is not a physical fact. It is a convention. We choose the one way spee...
To expand the explanation of Dale's answer a little: To measure a one-directional speed of anything you need to be able to define what 'at the same time' means between two locations because you need to agree what the start time was in order to measure a duration. Unfortunately, in a relativistic universe, there is no...
https://physics.stackexchange.com
53,822
[ "https://dsp.stackexchange.com/questions/53822", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/35851/" ]
I have a question regarding the data representation in different modulations. Assuming we are using MIMO system whith <span class="math-container">$4$</span> <span class="math-container">$T_x$</span> x <span class="math-container">$4$</span> <span class="math-container">$R_x$</span> which means four transmission anten...
I think that is possible. As you said, the three first antenna will be using QAM where the other antenna will be using BPSK. In that case, I advise you to read about Spatial modulation (SM), and Generalized Spatial modulation (GSM), Quadrature Spatial modulation (QSM) and finally the newest paper I've ever seen is F-QS...
Let's us take the simple case <span class="math-container">$2\times 2$</span> MIMO. Let <span class="math-container">$y_1$</span>, and <span class="math-container">$y_2$</span> be the received signal at the first and second receive antennas, respectively. Then we have <span class="math-container">$$y_1 = h_{11}x_1 + h...
https://dsp.stackexchange.com
665,618
[ "https://physics.stackexchange.com/questions/665618", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/310158/" ]
According to Halliday-Resnick, a free expansion of a gas is an <em>irreversible</em> process. However, the text continues that in a system of particles in a box, it is possible (though very unlikely) for a system of uniformly distributed particles to all cluster in one portion of the box, which is, in essence, the reve...
Let's consider an example case. Take one sixth of a mole of gas particles; that's <span class="math-container">$10^{23}$</span> particles. The probability that all happen to be in one half of a box (assuming equal probabilities for the two halves for each particle) is <span class="math-container">$$ 2^{-10^{23}}. $$</s...
Not wrong. You're just correctly observing that the arrow of time in thermodynamics is statistical and that any sufficiently up-close view of a system will see occasional local decreases in entropy.
https://physics.stackexchange.com
2,690
[ "https://engineering.stackexchange.com/questions/2690", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/1301/" ]
I have been wondering about this question for quite some time. Assuming an ideal case, the energy from photons hitting solar cells is converted into electric energy as described by the equation: $RI^2t=W\equiv E=\hbar\nu$ where $\nu$ is the frequency of photons. Using a lens won't increase the frequency of photons, t...
Your equation is partly correct. You've calculated the energy per photon ($\hbar \nu$), but you've neglected the <strong>number</strong> of photons. That's why the units don't match (power is energy per unit time, while you've only got energy for each photon). The ideal power (energy per unit time) depends on the area...
Yes, increasing the illumination on a solar cell by using lenses or mirrors increases the electric power output. However, there are limiting factors. The efficiency of a solar cell goes down with temperature. The current stays roughly proportional to the photon flux, but the open circuit voltage goes down as the sem...
https://engineering.stackexchange.com
158,086
[ "https://electronics.stackexchange.com/questions/158086", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/68959/" ]
My thesis group is building a project involving the Raspberry Pi. It is known that the RPi runs around an average of 700mA of current and my project would probably need a little over 1A of current due to attached components. I am looking into cellphone batteries for the supply because they are already compact and lig...
I suggest taking a look at RC batteries used by RC planes, boats, cars and drones. They're the same thing as cell phone batteries only cheaper, smaller and lighter. And are available up to sizes that wouldn't fit even a laptop much less mobile phones (and down to sizes as small as you little finger). Google "lipo batt...
I would recommend against using cell phone batteries for your project. You simply require too much current. For example the iPhone 5 battery has a capacity of 1510 mAh, and would only last 1.5 hours max in your device. In fact the 1510 is at the 3.7 nominal volts that lithium batteries run at. You will get less time ...
https://electronics.stackexchange.com
212,308
[ "https://mathoverflow.net/questions/212308", "https://mathoverflow.net", "https://mathoverflow.net/users/16639/" ]
The version of the Baire Category Theorem I have in mind is the statement that a countable intersection of dense open subsets of a complete metric space is dense. The question is: is it likewise true that the countable intersection of dense open subsets of a complete <em>uniform</em> space is dense? A look at the pr...
Functional analysis abounds with such examples. There are many complete locally convex spaces which are countable unions of closed subspaces with empty interior. One such is the space of smooth functions on the line which have compact support, the test functions of L. Schwartz. An even simpler one is the space of fin...
It is very common for a topological space to be a complete uniform space in some uniformity, but it is less common for a topological space to satisfy the Baire category theorem since the proof of the Baire category theorem makes an essential use of countability of the metric rather than the uniformity.. Every paracomp...
https://mathoverflow.net
5,211
[ "https://mathoverflow.net/questions/5211", "https://mathoverflow.net", "https://mathoverflow.net/users/1724/" ]
Is there any geometric way to understand the exact sequence in Example 8.20.1 in Ch II of Hartshorne (p. 182), or its dual from theorem 8.13? Here is the sequence: $0\to O_{\mathbb{P}^n}\to O_{\mathbb{P}^n}(1)^{n+1}\to T_{\mathbb{P}^n}\to 0$
Yes! The geometric picture is very nice and very easy. It is explained on pages 408-409 of Griffiths-Harris. Here is roughly how it works: Let's work over $\mathbb{C}$ for simplicity. Think of $\mathbb{P}^n$ as being the quotient of $X := \mathbb{C}^{n+1} - 0$ by the action of $\mathbb{C}^\ast$. On $X$ we have the ve...
To me, at least, this is a manifestation of the fact that for homogeneous polynomials, we have $\frac{1}{d}\sum_{i=0}^n x_i\partial_i f=f$. The map $O(1)^{n+1}\to T$ tells you that every vector field is a linear combination of the $\partial_i$ with linear coefficients. The map $O\to O(1)^{n+1}$ sends the section 1 to...
https://mathoverflow.net
24,280
[ "https://security.stackexchange.com/questions/24280", "https://security.stackexchange.com", "https://security.stackexchange.com/users/12776/" ]
My assumption is that resetting password is only a security issue if an attacker gained access to the user's email. But I was wondering, what if someone simply abuses it (e.g. sends a "reset password" request every 5 second to an ex girlfriend/boyfriend email or a hated boss etc) <ul> <li>Is there a common practice ...
Yes, it is very likely that the same "excessive attempts" detection that is applied to login attempts is also applied to "password reset requests". Many systems also involve a captcha step, that makes spamming the reset attempts more difficult. The example below is the outlook.com password reset page: <img src="https...
I am going to start with saying I have no idea if a best practice exists on this, but I will go ahead and answer with two points of view in mind; the security view and the user view... First off, when a password request is made, the password should not be removed. What if you user all of a sudden remembered their pass...
https://security.stackexchange.com
391,028
[ "https://softwareengineering.stackexchange.com/questions/391028", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/18748/" ]
To the best of my understanding Monads were created to allow for composing functions with those that had potential side-effects - loosely speaking. For me composition implies code like so: <pre><code>f(g(h(x))) </code></pre> In order to achieve this in a programming language one has to "line up the types" correctly,...
Although mathematicians may define the term differently, functional programmers tend to think of "composition" as any means of feeding the output from one function into the input of the next. <code>maps</code> and <code>flatMaps</code> are some of the most useful ways to do so. I don't know if it was unintentional, bu...
The method used is the one most appropriate for the task at hand. To put some of this into perspective, I recognize both <code>map</code> and <code>flatmap</code> as well-known, well-understood functional programming mechanisms for operating on <em>collections,</em> even though I'm not a functional programming expert...
https://softwareengineering.stackexchange.com
3,602,379
[ "https://math.stackexchange.com/questions/3602379", "https://math.stackexchange.com", "https://math.stackexchange.com/users/765582/" ]
I've found many ways of proving <span class="math-container">$\binom{n}{r} = \binom{n-1}{r} +\binom{n-1}{r-1}$</span> However I can't find any for proving that: <span class="math-container">$$\binom{n+1}{r} = \binom{n}{r} +\binom{n}{r-1}\;\text{ for }1 ≤ r ≤ n.$$</span> When I expand the equation it comes out to this...
<span class="math-container">$$C(n, r) + C(n, r − 1)=\frac{n!}{(n-r)!r!}+\frac{n!}{(n-r+1)!(r-1)!}=\frac{n!(n-r+1)+n!r}{(n-r+1)!r!}=\frac{(n+1)!}{(n-r+1)!r!}=C(n + 1, r) $$</span>
Just make the mapping <span class="math-container">$n \mapsto n+1$</span> in your original identity. Or, if that's a bit too hard to understand, simply let <span class="math-container">$n=k+1$</span>. The desired form appears immediately. Put another way, the two identities are equivalent.
https://math.stackexchange.com
282,663
[ "https://stats.stackexchange.com/questions/282663", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/151862/" ]
I realize I can't invert the $X'X$ matrix but I can use gradient descent on the quadratic loss function and get a solution. I can then use those estimates to calculate standard errors and residuals. Am I going to encounter any problems doing this?
<blockquote> I can use gradient descent on the quadratic loss function and get a solution… </blockquote> Sure, but you have fewer constraints than unknowns, so your loss function is something like a parabola in three-space: $L =(w_1+w_2-1)^2$. There is a whole space of solutions. In this example, the solutions l...
Here is a little specific example to illustrate the issue: Suppose you want to fit a regression of $y_i$ on $x_i$, $x_i^2$ and a constant, i.e. $$ y_i = a x_i + b x_i^2 + c + u_i $$ or, in matrix notation, \begin{align*} \mathbf{y} = \begin{pmatrix} y_1 \\ \vdots \\ y_n \end{pmatrix}, \quad \mathbf{X} = \...
https://stats.stackexchange.com
196,796
[ "https://softwareengineering.stackexchange.com/questions/196796", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/44413/" ]
I am maintaining a small code base that I am considering selling– but I want to allow developers that use it to submit code for addition to the trunk. This way they can extend the framework and the community can benefit. I want them to retain copyright to their code, but to allow me to use it however I desire, for co...
Not quite. Here's the basic idea. As you pointed out, "you can incorporate the software into your proprietary project, but <strong>that portion</strong> must remain open" under the MIT license. If you have 100 features in your proprietary product, and one of them is based on MIT-licensed code, that's fine. However, ...
The GPL is considered viral because, if you combine software that is licensed under it with proprietary code, you must also open-source your proprietary code under the GPL in order to remain compliant with the GPL. The MIT license doesn't say that at all. I think you might be interpreting the term "The Software" to i...
https://softwareengineering.stackexchange.com
591,744
[ "https://electronics.stackexchange.com/questions/591744", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/298396/" ]
We are looking at implementing an architecture that makes use of eXecute In Place (XIP) over QSPI in order to overcome storage constraints; our firmware has grown too large to live in the on-chip storage. There is some belief that being able to use XIP is dependent on the flash chip itself but I can't find anything tha...
XIP is not a feature of the flash, the MCU just does reads to flash to fetch code into cache for execution, but of course the flash needs to use the same protocol what the MCU wants to use when using XIP. If the QSPI protocol matches what the MCU expects to implement XIP and the flash is fast enough so it won't be a bo...
XIP is based on a cache memory that coherently fetches in advance a certain number of instructions from the external flash memory and then presents them to the CPU for execution. There's also look-ahead hardware predictor that empties the cache memory whenever the assembly program contains a jump to an address that is ...
https://electronics.stackexchange.com
126,290
[ "https://mathoverflow.net/questions/126290", "https://mathoverflow.net", "https://mathoverflow.net/users/32151/" ]
Let $C$ be a curve in $\mathbb{P}^3$, possibly non-reduced. Assume, there exists a smooth surface in $\mathbb{P}^3$ containing $C$. Is it true that for $d \gg 0$, a generic element of $I_d(C)$ defines a smooth surface in $\mathbb{P}^3$?
I hope this is not a homework exercise, but I do not recall this from the standard textbooks. This is already false for planar double lines. Let $\mathbb{P}^3$ have homogeneous coordinates $[T_0,T_1,T_2,T_3]$. Let $S$ be the plane $Z(T_3)$. Let $C$ be the curve $Z(T_2^2,T_3)$ with induced reduced curve $L=Z(T_2,T_3...
<strong>EDIT.</strong> The first version of this answer claimed that the result was true for any $C$, but it was uncorrect as remarked by J. Starr. In fact, Jason's answer shows that the result may be false for a non-reduced $C$. However, the claim is true when $C$ is reduced; let me give a sketch of the proof. Since...
https://mathoverflow.net
620,691
[ "https://electronics.stackexchange.com/questions/620691", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/268699/" ]
The audio source is an active mixer with an output impedance of 100 ohm, 25 mA output current and 3 V-pp max. The inputs that would receive this source are (1) an ADC with an input impedance of 20 kohm and (2) another device with a &quot;variable&quot; input impedance of 2 kohm approx. I mean variable because it could ...
For a 100 Ω source a 20 KΩ load will give you 99.5% of the original voltage. <span class="math-container">$$ 1\mathit{V}~\cdot~\frac{20000\Omega}{20000\Omega + 100\Omega}~=~0.9950\mathit{V} $$</span> <br> Adding 2 KΩ in parallel with the 20 K will give you 94.79%, so almost a 5% difference. <span class="math-container"...
<blockquote> It is <strong>very important</strong> for this application that the ADC reading is not sensitive to plugging or unplugging the second device... </blockquote> The output impedance of the mixer is certainly low enough to drive both loads, but the signal voltage will vary slightly depending on the load. Furth...
https://electronics.stackexchange.com
365,262
[ "https://physics.stackexchange.com/questions/365262", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/173482/" ]
I understand how capacitors charge and i know they discharge but i am so confused <strong><em>why</em></strong> they discharge. How do they suddenly know when they are full to discharge. I am doing a school report and really need to be able to explain why rather than just saying they do.
I assume you are already familiar with Coulomb force/potential. As you should know the force is attractive between charges with different sign and repellent between charges with the same sign.<br> When you apply a voltage to a capacitor, i.e. creating an electrical field $E$ (which is equal to the the negative gradient...
They discharge because there is something else (for example, a resistor or network of resistors) connected between their terminals, and the potential difference across the capacitor causes a current to flow through that something else. If you're asking about self-discharge (when nothing is connected to the capacitor),...
https://physics.stackexchange.com
212,823
[ "https://electronics.stackexchange.com/questions/212823", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81163/" ]
Do we use cache memory in microcontrollers, if not, why not? If yes, what is its application in embedded systems or it is enough just to have RAM?
Cache memory adds a level of latency unpredictability that may be unwanted. A lot (most?) of microcontrollers are used in a realtime setting where you have to budget for worst-case timing. It does not matter if your code is fast <em>on average</em>, if there is a chance that it won't meet the deadline in <em>worst case...
Above a certain speed, fast memory costs more per byte than slow memory (below that speed, making memory slower won't make it any cheaper). If a system has a large amount of memory, having most of it be slow but then including a cache of fast memory and the logic to run it will be cheaper than making all of the memory...
https://electronics.stackexchange.com
161,772
[ "https://electronics.stackexchange.com/questions/161772", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/70905/" ]
I have been working on a project for the past two weeks now and debugging this one issue has taken up this entire week. Wondering if anyone can help, I will try to be as explicit and clear as possible. I am trying to implement a USB Virtual Comm Port on a MicroController based on the STM32F302K8 (Cortex M4). I have u...
To answer my own question, the problem is that my code didn't wait for the USB to finish initialization and immediately began sending data. Inserting an active wait on a boolean or adding a delay (as pointed out by @ramez) solves the problem. <strong>UPDATE</strong> This bug has been fixed in subsequent USB CDC driver...
I used CubeMX for generating code for STM32F4 discovery. I used it as virtual COM port as you. I did not use <strong>USBD_CDC_SetTxBuffer()</strong> function directly. In <em>usbd_cdc_if.c</em> file there is a function named <strong>CDC_Transmit_FS()</strong>. There was a bug in the generated code, the function took a ...
https://electronics.stackexchange.com
57,082
[ "https://mathoverflow.net/questions/57082", "https://mathoverflow.net", "https://mathoverflow.net/users/303/" ]
The proof of this statement seems to break into two really different arguments. So, I'm wondering if there is a better argument that can explain them both, or whether it's really just two theorems that happen to be easy to say at the same time. Both rely on a bit of Morse theory, namely that (assuming $p$ and $q$ are...
It seems to me that the OP's last remarks about the difference of the cases when <span class="math-container">$\pi_1(M)$</span> is finite or infinite already give the answer to the question. Namely, the two cases are not that different, in that you either use that the universal covering <span class="math-container">$\t...
It seems to me that one could design a dynamical unified argument. The following might be turned into a proof, but there are some points to check. Let $x,y$ be your two non-conjugate points, and let $v$ be the unit tangent vector at $x$ that defines the shortest geodesic from $x$ to $y$. Using compactness, and denoti...
https://mathoverflow.net
12,409
[ "https://electronics.stackexchange.com/questions/12409", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2968/" ]
So I need design a prototype PCB circuit and need to decide on using what kind of surface mount resistors and capacitors to use. But looking at digikey, there are so many types with many variations in size, manufacturers, etc.! Since there is not really any strict requirements for my project, I'm assuming most of the...
For assembling by hand I offer the following suggestions: <ul> <li>Capacitors: For the ubiquitous 0.1uF ceramic decoupling caps go with 0603. They're nonpolar and unlabelled so the small size is not that much of an issue. You could buy a whole reel and be set for life. Every tantalum and electrolytic SMT cap is bi...
In the past I've often used parts from Yageo and AVX. There was not really a preference, most of the time the choice was determined by lead time.<br> As for size, last time I ordered parts 0603 were the cheapest, but you say that price is not an issue. If space is a premium it's obvious that you'd rather choose 0402 pa...
https://electronics.stackexchange.com
2,521,576
[ "https://math.stackexchange.com/questions/2521576", "https://math.stackexchange.com", "https://math.stackexchange.com/users/488416/" ]
$\beta\subset A^2$ is reflexive and transitive relation.$\alpha$ is an equivalence relation defined on A by $x\alpha y \iff x\beta y$ and $y\beta x$. A factor set (no idea what the english term is for this) $A/_\alpha$ is defined such that it contains all the classes of set A. Prove that the relation $\le$ defined by ...
For large values of $n$, you have that $0&lt;x_n&lt;c$ where $c$ is some fixed number such that $r&lt;c&lt;1$ (for example, $c=r + \frac{1-r}{2} = \frac{1+r}2$, i.e. the halfway point between $r$ and $1$). Then, $$0&lt;x_n^n &lt; c^n$$ and then use the squeeze principle.
Hint: $0&lt;x_n&lt;\frac{r+1}2$ for large enough $n$.
https://math.stackexchange.com
1,715,217
[ "https://math.stackexchange.com/questions/1715217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/240480/" ]
<blockquote> Does there exist a non zero linear map $T: \mathbb {R}^5 \to \mathbb{R}^5$ such that ker$(T) \cap W \neq \{0\}$ for every $4$ dimesional subspace $W$ of $V$? </blockquote> I think that such map exist but don't know how to construct. Please help
The key of the answer is this identity $$\dim(U+W)=\dim U+\dim W-\dim(U\cap W)$$ so with $U=\ker T$ so we see that if we construct $T$ such that $\dim\ker T\ge2$ and since $\dim(\ker T+W)\le \dim V=5$ then we get $\dim(\ker T\cap W)&gt;0$ hence $\ker T\cap W\ne\{0\}$.
Let $T[x_0,x_1,x_2,x_3,x_4] = x_0$. Then $\dim\ker T = 4$. If for some $W$, $W \cap \ker T = \{\mathbf 0\}$, then the direct sum $W \oplus \ker T$ must have dimension $8$, but it is contained in a $5$-dimensional space. Thus such $W$ cannot exist.
https://math.stackexchange.com
2,422,757
[ "https://math.stackexchange.com/questions/2422757", "https://math.stackexchange.com", "https://math.stackexchange.com/users/379666/" ]
$g(x)= x+3$, therefore $g^{-1}(x) = x-3$ $h(x)= 2x-4$, therefore $h^{-1}(x) = (x+4)/2$ I thought of $g^{-1} \circ h^{-1}$ as $(g^{-1} \circ h^{-1})(x)$ and got $0.5x-1$, but the correct answer (from the book) is $0.5x-3$ What is the difference in the notation and how to use it?
There isn't anything different about the notation $$ (g^{-1}\circ h^{-1})(x) = g^{-1}(h^{-1}(x)) = g^{-1}\left(\frac x2 + 2\right)= \frac x2+2 - 3 = \frac x2 -1. $$ Likewise $$ (h^{-1}\circ g^{-1})(x) = h^{-1}(g^{-1}(x)) = h^{-1}(x-3)= \frac{(x-3)}{2} +2 = \frac x2 +\frac 12. $$
$$\frac{x+4}{2}-3=\frac{x+4-6}{2}=\frac{x}{2}-1$$
https://math.stackexchange.com
355,483
[ "https://mathoverflow.net/questions/355483", "https://mathoverflow.net", "https://mathoverflow.net/users/127260/" ]
We are in first order logic world. Let <span class="math-container">$\sigma$</span> be a finite signature and <span class="math-container">$T$</span> a consistent theory of <span class="math-container">$\sigma$</span>. Due to Löwenheim–Skolem theorem, we can consider the <span class="math-container">$\underline{set}$...
In this answer, I will basically repeat things that zeb said in their nice answer, but arranged differently (in a way that might or might not be more clear). Let <span class="math-container">$\text{Mod}_{\leq \aleph_0}(T)$</span> be the "set" of all at most countable models of <span class="math-container">$T$</span>....
The theory of <span class="math-container">$\Omega_{\mu}^T$</span> will automatically be a complete theory which extends the original theory <span class="math-container">$T$</span>, just because it is the theory of a particular model, and every statement is either true or false in any particular model. It will usually ...
https://mathoverflow.net
235,632
[ "https://stats.stackexchange.com/questions/235632", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/130560/" ]
In what situations would it be more favorable to use random projection to reduce the dimensionality of a dataset as opposed to PCA? By more favorable, I mean preserve the distances between points of the dataset.
PCA maintains the best possible projection. Some reasons you would use random projections are: <ul> <li>With very high dimensions, if speed is an issue, then consider that on a matrix of size <span class="math-container">$n \times k$</span>, PCA takes <span class="math-container">$O(k^2 \times n+k^3)$</span> time, wh...
I would add another reason which is valid for an online setting: PCA might give you the best projection for some initial training data but it might become arbitrarily worse as time goes by and new data arrives with an &quot;evolved&quot; distribution. Random projections gives you a kind of probabilistic warranty agains...
https://stats.stackexchange.com
385,754
[ "https://physics.stackexchange.com/questions/385754", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/184521/" ]
Does a single crystal of pure iron have an electromagnetic field, and if so, what is the orientation of the field?
A pure iron single crystal is ferromagnetic. In the crystal, there are usually many different domains with different spontaneous magnetization orientations which on the average give a zero macroscopic magnetization unless the iron has been magnetized before and displays remanence. When you apply an increasing external ...
Iron, like everything else, emits thermal radiation, whose spectrum depends on the temperature.
https://physics.stackexchange.com
665,159
[ "https://physics.stackexchange.com/questions/665159", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/288624/" ]
Before I explain my query, I would like to clarify that I am a ninth-grader who got this question while studying the formula <span class="math-container">$R \propto \frac{1}{A}$</span> where <span class="math-container">$A$</span> is the area of cross-section. I have often asked this question to my teachers and they al...
The following model is not entirely true, but it's a much truer model than people walking down a corridor. I hope it helps. Start by considering a resistor that just one atom wide, but many atoms long, in a long string. Each atom has an electron cloud. In a semiconductor, the outermost electrons in the electron cloud a...
Sorry for my poor english. My native language is french. We can also ask the question about the conductance: why is it proportional to the surface. The reason is that we are working with a model in which the current density is distributed <strong>uniformly over the cross section</strong> of the conductor. It is as if w...
https://physics.stackexchange.com
244,955
[ "https://dba.stackexchange.com/questions/244955", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/127637/" ]
Recently I was informed that since enabling <code>pg_stat_statements</code>, the available disk space is dropping fast. I don't think it's caused by that, but I wonder: Does enabling <code>pg_stat_statements</code> reduce disk space? And by how much?
<code>pg_stat_statements</code> shouldn't use much disk space. It uses two files: <ul> <li><code>pg_stat_statements.stat</code> persists <code>pg_stat_statement</code>'s data across server restarts. It is written upon shutdown and read on server startup. The file is deleted as soon as it has been read, so it should ...
<blockquote> ... since enabling pg_stat_statements, the available disk space is dropping. </blockquote> So pg_stat_statements is consuming disk space.<br> <em>This is to be expected</em>, since it's purpose is to collect (and store) statistics about every single query that passes through your Postgres cluster. All...
https://dba.stackexchange.com
3,975
[ "https://chemistry.stackexchange.com/questions/3975", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/402/" ]
I'm new to Chemistry and in my textbook, it describes the <em>Law of Definite Proportions</em> (aka Proust's Law) and then goes on to describe the Law of Multiple Proportions. The example they give is carbon monoxide and carbon dioxide, where the mass ratio of oxygen to carbon in carbon dioxide is $2.67:1$ and the mas...
There's no universally accepted hard cut-off, as far as I'm aware, which determines the range of numbers that would constitute "small" mass ratios. Generally, all textbook examples select compounds that yield single-digit mass ratios. The significance of the ratios being small (as well as their constancy and the limit...
The law of multiple proportions is largely obsolete these days because we all believe that atoms exist. Prior to about 1900 this and similar laws were used to show that, for example, the ratio of oxygen in $\ce{CO}$ to oxygen in $\ce{CO2}$ is 2:1. Of course, that's trivially obvious when we write the formulas, but be...
https://chemistry.stackexchange.com
321,656
[ "https://softwareengineering.stackexchange.com/questions/321656", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/229933/" ]
I would like to create a front-end interface in HTML that interacts with a Java program via an HTML <code>form</code>. I would like to be able to publish this project on the Internet. In other words, the text entered in the <code>input</code> fields of the form would be sent to the Java program as arguments once the u...
I think the answer is you both should be thinking about your own set of edge cases. He as the dev should handle edge cases that are data specific such as does the app crash from any given user input, 5 / 0 certainly falls into this part of the spectrum. The dev should ask about you what you think would be an appropriat...
<em>The team needs to work together as opposed to having a "Not my job, not my responsibility" type of attitude/mantra.</em> Acceptance criteria comes in the form of: <ul> <li>Business Acceptance</li> <li>Quality Assurance Acceptance</li> </ul> Typically the business acceptance is usually answering the question: <u...
https://softwareengineering.stackexchange.com
1,870,017
[ "https://math.stackexchange.com/questions/1870017", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
I have seen that the length of each side of the biggest square that can be inscribed in a right triangle is half the harmonic mean of the legs of the triangle. I have not seen a rigorous explanation for it, though. I would appreciate such an explanation. (This is intriguing - it is an optimization problem that does ...
Let we assume that the legs $CB$ and $CA$ of our right triangle $ACB$ have lengths $a$ and $b$. First case: we consider the largest inscribed with a vertex at $C$. Assuming that its side length is $l$,<br> by triangle similarities we have $$ c = \sqrt{a^2+b^2} = l\cdot\left(\frac{c}{b}+\frac{c}{a}\right), $$ from whic...
Here is an explanation that is based on Jack D'Aurizio's explanation. I include some details and two diagrams using <code>TikZ</code>. To view the diagrams, add <code>\usepackage{tikz}</code> <code>\usetikzlibrary{calc,intersections}</code> to the preamble of a <code>LaTeX</code> file. <strong>Theorem</strong> $...
https://math.stackexchange.com
124,316
[ "https://chemistry.stackexchange.com/questions/124316", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/54214/" ]
I'm studying about the s-block elements in my course of Inorganic Chemistry and I happened to come across the following text. <blockquote> Electrons may be quite readily excited to a higher energy level, for example in the flame test. To perform this test, a sample of <strong>Metal Chloride</strong> or any salt of m...
Metal chlorides are usually much easier volatilized than oxides or sulfates. They melt or sublime at temperatures much lower than 800°C. So they are volatilized in any flame like Bunsen burners. Platinum is not attacked by hot chlorides or acids, and is not oxidized in hot air. So it can be used for a great number of...
Adding to the first answer: NiCr wires are used because they are cheaper as platinum wires and still have a good chemical resistance and high melting point. Even tough platinum is much superior to NiCr.
https://chemistry.stackexchange.com
32,777
[ "https://engineering.stackexchange.com/questions/32777", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/24268/" ]
Do grey cast iron expand from freezing point to room temperature (cooling process)?
I'm going to answer this for a LWR, since I guess that's what you're thinking of. First of all, the premise of the question is not quite correct. The power distribution of an LWR is generally sinusoidal, with a peak towards the middle of the fuel. This is true with or without control rods inserted. The most common pow...
Your understanding is correct. In a PWR reactor, the core usually operates with the control blades fully withdrawn, but some reactors operate with the rods slightly inserted into the top of the core. In both cases, the tips of the control rods will burn out faster than the rest of the control rod. Even when the rods...
https://engineering.stackexchange.com
3,757
[ "https://mechanics.stackexchange.com/questions/3757", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/1817/" ]
I have a 2006 Mercedes E-350 with an automatic rear sunshade; until a week ago the sunshade worked fine, but now it's stuck up and I can't get it to come down by any means. The button to move the shade doesn't respond; I can hear a click in the back of the car but that's it; none of the other mechanical noises it make...
Took her in to s Mercedes licensed mechanic, they took apart the assembly. Turns out the Up motor worked fine, but the Down motor was burt out. It's <em>possible</em> a similar situation could be caused by something as simple as a blown fuse or a misalignment of the "scissor" bars that raise/lower the shade, but that ...
People with rear shade stuck in the up position: I have a 2004 E320 with the same issue. I was looking through all the blogs and $1100 - $1700 US is way too much to pay for a cheap part on an expensive car. Pull on the shade away from the window and the whole mechanism is visible. The motor is dead center. The sh...
https://mechanics.stackexchange.com
951,729
[ "https://math.stackexchange.com/questions/951729", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Trying to show that $$\lim_{(x, y) \to (0, 0)}\dfrac{\sin(x) - \sin(y)}{x+y}$$ does not exist, but I'm having a lot of trouble. So far I've tried splitting the expression into two parts, but couldn't see that being conclusive. I've also tried L'Hospital's, but I'm not very experienced with derivatives yet. Could som...
Hint: If you take the limit along the line $x=0$ what do you get? How about along the line $y=0$?
<strong>Hint:</strong> Check that the limit give different answers using different paths. Try making $x = y$ for one path, and $y=0$ for another.
https://math.stackexchange.com
138,284
[ "https://electronics.stackexchange.com/questions/138284", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/57969/" ]
I'm trying to simulate the behavior of a BJT on Proteus. The image below shows the graph that I got when I plotted \$I_c\$ on the vertical axis vs. \$V_{BE}\$ on the horizontal axis. <img src="https://i.stack.imgur.com/HnTsK.png" alt="Proteus DC Sweep results"> But according to the equation $$ I_c = I_s \cdot e^{...
Well, I guess if the base voltage exceeds the collector voltage the transistor is sort of in saturation, so you'd expect the collector current to level off. However, putting +100V (or even +10V) on the Vbe junction of a transistor is so far outside of normal operation that you can't expect the models to do anything s...
Remember that the B-E path is nothing else than a pn junction (like a diode) that normally is forward biased with voltages up to 0.75 volts only.
https://electronics.stackexchange.com
18,438
[ "https://mathoverflow.net/questions/18438", "https://mathoverflow.net", "https://mathoverflow.net/users/1214/" ]
Given a set of distances S, choose N unique points P on a number line such that the distances between the N points occur in S as much as possible. That is, maximize the occurence in S of the distances between the N points. For example: S = {2, 4}, N = 4 One answer would be P = {2, 4, 6, 8}, since the distances betw...
Some comments expanding on gowers' hunch: we may as well assume that the elements of S have gcd 1. If the size of the set is |S| = m and the sum of the elements of S is k then taking a block of N consecutive integers for $N \geq m$ gives (mN - k) pairs. There's also a theoretical maximum of $mN - \binom{m + 1}{2}$: ...
This feels to me more like additive combinatorics than additive geometry, though the flavour of the problem may change when N gets large. If f is the characteristic function of A, g is the characteristic function of -A, and h is the characteristic function of the set you want the differences to lie in, then you seem to...
https://mathoverflow.net
405,436
[ "https://mathoverflow.net/questions/405436", "https://mathoverflow.net", "https://mathoverflow.net/users/50438/" ]
Let <span class="math-container">$D_1$</span> be a domain with smooth boundary and assume that <span class="math-container">$D_1$</span> is a proper subset of <span class="math-container">$D_2$</span> which is itself a bounded domain in <span class="math-container">$\mathbb R^n$</span> with a smooth boundary. Assume al...
The answer is yes: take any smooth function <span class="math-container">$g_0$</span> on <span class="math-container">$\partial D_1$</span> and solve the Dirichlet problem <span class="math-container">$$ \begin{cases} \Delta g = 0 &amp; \text{ on } D_1\\ g = g_0 &amp; \text{ on } \partial D_1. \end{cases} $$</span> Now...
The answer is yes. Suppose <span class="math-container">$g$</span> is orthogonal to the image of <span class="math-container">$S$</span>, and let <span class="math-container">$v$</span> be the solution of the Dirichlet problem <span class="math-container">$\Delta v=g\delta(\partial D_1)$</span> on <span class="math-con...
https://mathoverflow.net
128,550
[ "https://electronics.stackexchange.com/questions/128550", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/52927/" ]
I want to make small (~cigarette pack size) oscillometric blood pressure monitor (with arm cuff). The device will be powered by single cell 3.7V LiPo battery with USB charger circuit, without LCD display or physical buttons. Main components: <ul> <li>ATmega32u4 microcontroller with Arduino bootloader, </li> <li>singl...
I don't see an overly-compelling reason to boost up the voltage to 5V. Unless you're doing some intense time-critical math heavy calculations, I doubt 16MHz will buy you any advantage over 8MHz for the application you're describing. Single-purpose hardware can get a lot done at 8MHz. A 3.3V linear regulator with a dro...
<blockquote> ... I would prefer 5V, becouse uC will run faster ... </blockquote> And it will drain your battery faster. Use a LDO linear regulator to bring the voltage of the cell to 3.3V.
https://electronics.stackexchange.com
75,799
[ "https://security.stackexchange.com/questions/75799", "https://security.stackexchange.com", "https://security.stackexchange.com/users/63356/" ]
It's often recommended that you should use a VPN when using unsecured or untrusted networks, such as open public wifi or secured wifi that you don't control. What are the advantages to using a VPN on any network (wifi or wired), even a network you own/control?
If you control the network, there really <em>isn't</em> an advantage (under almost any circumstances). What a VPN does is simulate having a leased line from your computer to the network the VPN server is on. If you are already <em>on</em> that network, there is literally no advantage (unless you enjoy encryption overhe...
The advantages of using a VPN is that content you access on the internet and anything sent to a website is encrypted and routed through vpn. When a connection is encrypted it stops people from monitoring your connection. So all data send to website can't be read by anyone except the VPN provider. When a connection is ...
https://security.stackexchange.com
630,487
[ "https://physics.stackexchange.com/questions/630487", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/278812/" ]
So as we know, Gibb's free energy for a constant pressure reaction is given as <span class="math-container">$ \Delta G = \Delta H - T\Delta S$</span> The enthalpy term represents the change in the internal energy of the system. What does the entropy term represent? Does it act as some extra &quot;reservoir&quot; of ene...
The <em>Gibbs</em> free energy is defined (in difference form) as <span class="math-container">$$\Delta G\equiv\Delta H-T\Delta S=\Delta U+P\Delta V-T\Delta S,$$</span> where <span class="math-container">$H$</span> is the enthalpy, <span class="math-container">$T$</span> is the temperature, <span class="math-container"...
Most of transformations that we observe in nature do not involve isolated systems, but systems in thermal contact with the environment. In such cases we can consider the environment as a thermostat at <span class="math-container">$T$</span>. For a system exchanging heat with the environment we can state: <span class="m...
https://physics.stackexchange.com
396
[ "https://cs.stackexchange.com/questions/396", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/51/" ]
The following DFA is a lexical analyzer which is supposed to recognize comments. The lexical analyzer will ignore the comment and goes back to the state one. I'm told that there's something wrong with it but I can't figure it out. What's the problem? <img src="https://i.stack.imgur.com/EeIdO.png" alt="enter image desc...
<ul> <li>There is no initial state, so there's no automaton. I suppose $1$ is the initial state.</li> <li>From state 4 you can still read several times the symbol $*$ and accept the comment. For example, the coment <code>/*hello*/</code> is being accepted, but the comment <code>/*hello**/</code> is not. So you need $\d...
In state 2 there is no transition for when you encounter a character other than <code>*</code>. The same is true in state 4 with <code>/</code>. Also it's not entirely clear what happens in state 1 if you encounter something other than <code>/</code>, but it looks like that's because that part's intentionally cut off....
https://cs.stackexchange.com
1,253,475
[ "https://math.stackexchange.com/questions/1253475", "https://math.stackexchange.com", "https://math.stackexchange.com/users/209986/" ]
I'm trying to prove the following statement: if E is a subspace of V, then dim E + dim $E^{\perp}$ = dim V. I know this is true because when these two subspaces are added, they are equal to V, but I'm not sure how to rigorously say this, could I get a little help?
First understand the following $\mathbf{Thereom:}$ Let $\{v_1,…,v_n\}$ be any basis of an inner product space V. Then there exists an orthonormal basis $\{u_1,…,u_n\}$ of V such that the change of basis matrix from $\{v_i\} to \{u_i\}$ is triangular i.e. for $k=1,2.., n$, $u_k= a_{k1}v_1+a_{k2}v_2+..+a_{kk}v_{k}$ Th...
You need to prove that $$ V = E + E^\perp $$ and $$ E \cap E^\perp = \{0\} $$ then it follows from an elementary theorem.
https://math.stackexchange.com
339,572
[ "https://softwareengineering.stackexchange.com/questions/339572", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/258744/" ]
I recently asked a question about design and got suggestion about how to structure my code. I'm still working on design so I only have pseudo code, but this is what I had in mind. <pre><code>class TableManager() { int init(DBManager manager, String name) { this.name = name this.manager = manag...
<blockquote> ... I'm still working on design so I only have pseudo code ... </blockquote> Your code is your primary design document as it's the only one that informs the compiler on how to create your app for you. Never feel you have to justify writing code to help clarify high-level designs. <blockquote> <code>m...
An unit test tests whether a component works as expected, in isolation. The focus is on the behaviour of the component. An integration test tests whether multiple components cooperate successfully. The focus is on their interaction. A good mental framework for unit tests is the concept of the <em>value added test</em...
https://softwareengineering.stackexchange.com
31,603
[ "https://mathoverflow.net/questions/31603", "https://mathoverflow.net", "https://mathoverflow.net/users/7392/" ]
I've been studying a bit of probability theory lately and noticed that there seems to be a universal agreement that random variables should be defined as Borel measurable functions on the probability space rather than Lebesgue measurable functions. This is so in every textbook on probability theory which I consulted. I...
One should be careful with the definitions here. Notation: Given measurable spaces $(X, \mathcal{B}_X), (Y, \mathcal{B}_Y)$, a measurable map $f : X \to Y$ is one such that $f^{-1}(A) \in \mathcal{B}_X$ for $A \in \mathcal{B}_Y$. To be explicit, I'll say $f$ is $(\mathcal{B}_X, \mathcal{B}_Y)$-measurable. Let $\math...
One reason is that probabilists often consider more than one measure on the same space, and then a negligible set for one measure (added in a completion) might be not negligible for the other. The situation becomes more acute when you consider uncountably many different measures (such as the distributions of a Markov p...
https://mathoverflow.net
633,603
[ "https://physics.stackexchange.com/questions/633603", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/297926/" ]
This question has a lot of &quot;what if&quot;s, so let's simplify this: <ul> <li>Assume Earth is perfectly spherical </li> <li>Assume no wind or anything, just plain atmosphere that is generally uniform (but will change density as the ball falls through the atmosphere, but lets pretend there's no clouds or air current...
<blockquote> We decide to drop a lead ball out of the bottom of our ship. </blockquote> It is one of these persistent <strong>urban myths</strong> that you can 'drop' an object from a satellite and that the object will then neatly fall to Earth (presumably at great speed!) But you can't. Assume you achieve separation b...
<blockquote> We decide to drop a lead ball out of the bottom of our ship. Would the planet pull it down towards it, or would it stay in orbit? We can assume we didn't push it out of the hatch or anything towards the planet, but rather 'let it go'. </blockquote> If you just dropped a lead ball out of the bottom of ship ...
https://physics.stackexchange.com
71,758
[ "https://softwareengineering.stackexchange.com/questions/71758", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/12750/" ]
Some people have the view of programming that it is just repetitive typing on a keyboard. None of this is true. First of all, there is so much more you have to do than actually typing down the code, such as design architecture and so on. Secondly, it could be a greatly varying, non-repetitive task, with new challenges ...
Give them examples they can relate to. Tennis is repetitive. You just keep hitting the ball all the time over to the other side of the net. Soccer is repetitive. You just keep kicking the ball every time until you find a goal post. Playing the piano is repetitive. You keep on moving your fingers on the board. Damn,...
You can always say that programming is repetitive typing to exactly the same extent as writing prose is repetitive typing. Will one write a great (or even mediocre) novel by sitting and carefully putting letters together?
https://softwareengineering.stackexchange.com
372,976
[ "https://softwareengineering.stackexchange.com/questions/372976", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/290906/" ]
Until now for each of our applications we store application configuration in the same repository as the code that uses the configuration. We have environment specific yml files (dev, test, .., prod) that contain plain text as well as encrypted configuration values. Those get deployed for example as "Application Setting...
<blockquote> The configuration values are fetched at runtime from environment variables or configuration files directly. </blockquote> It sounds like you already have the possibility of decoupled deployments because you say that you pass in configuration at runtime. It sounds like your process is the thing that's getti...
A change to a config file shouldn't require a big process. It shouldn't be super easy either, because a bad change could lock users out or cause other malfunctions. Storing configs in a web service just moves the problem around, and then doubles your maintenance effort. You have a process to work in, so the challenge...
https://softwareengineering.stackexchange.com
396,263
[ "https://softwareengineering.stackexchange.com/questions/396263", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/343777/" ]
I want to make three layers of application all served through Rest API. For a user case we can say it's school management system where there could be multiple schools where the teachers are administrators of different classes. <ul> <li>Super super admin: Is the service provider (me) creating the account for the schoo...
If at all possible, put everything in a single database. One database per anything (in your case, per school) is always more difficult to manage. You start by creating a table that holds the roles. Then you create a table that associates roles with users. It would contain UserID and RoleID. Roles can be cached, so...
From experience, I would avoid using layers in a role system. A layered system like you're describing has an obvious drawback: Every role in the pyramid has all of the permissions of roles below it. For example, does it make sense that the Super Super admin which has permission to create the school accounts also has p...
https://softwareengineering.stackexchange.com
126,918
[ "https://security.stackexchange.com/questions/126918", "https://security.stackexchange.com", "https://security.stackexchange.com/users/91316/" ]
I found a vulnerability, and I'm not sure how to patch it. I currently accept input from the user and use it to create a terminal command which I run on the server. Here's the code simplified. <pre><code>// Get user input $monochromeThreshold = $_POST['monochromeThreshold']; $originalFile = $_POST['originalFile']; $mo...
Browsers do not accept verification from just any third party; if they did the whole exercise would indeed be pointless. In order to be accepted as valid, the certificate presented by the website must be digitally signed by a <strong>trusted</strong> certificate authority. The default list of trusted certificate author...
You are correct on your first statement. Unless s/he is a trusted CA, your browser will still bitch that the cert is not trusted. And you'll know you're being MiTM'd. For the second paragraph, you're reaching a bit.The hacker would have to compromise DNS for ALL CAs and have a way to validate the bogus certs. Highly ...
https://security.stackexchange.com
419,182
[ "https://electronics.stackexchange.com/questions/419182", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/183348/" ]
When we describe a AC signal (voltage is this case) in time domain we use an equation something like this below: <span class="math-container">\$v(t) = V_m \mathrm{sin}(\omega + \phi)\$</span>, where is the angular frequency of the voltage. I know is the symbol for angular frequency which is equal to <span class="...
No, <span class="math-container">\$\omega\$</span> and <span class="math-container">\$\omega t\$</span> and are not the same, and they don't have the same units. <span class="math-container">\$\omega t\$</span> has units of radians, which makes it possible to add the phase angle <span class="math-container">\$\phi\$</s...
and are the same units (phase in Rads) except is constant and expresses the exact phase as a function of time, t for v(t) at freq=
https://electronics.stackexchange.com
138,786
[ "https://softwareengineering.stackexchange.com/questions/138786", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/10505/" ]
So we're having an internal debate on whether the time restriction that we have in place for our technical test a good thing. I thought I would open it out to the community. So what are your thoughts on this restriction, do people accept it as standard practice or is it an artificial restriction? A little background, ...
One way you might evaluate the legitimacy of the time limit and the questions involved is to give the same exercise to a sampling of staff that are already employees. Otherwise you're literally guessing based on a preconceived idea about what someone "should" be able to do. By doing small technical exercises in a sho...
When it comes to interviews it makes sense to have time limits - otherwise you can end up interviewing all the time... For coding exercises, the time limit should reflect expectations from the candidate - if you believe the exercise can't be finished in the allotted time you should communicate this to the candidate (o...
https://softwareengineering.stackexchange.com
594,482
[ "https://physics.stackexchange.com/questions/594482", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/120723/" ]
I understand that an RGB LED produces light in three constrained wavelength ranges and that any color beyond R, G, or B (orange, say) is due to the interaction of the cells in our eyes with the various wavelengths of light from the LED. I am interested in building a spectrophotometer. It does not have to be highly pre...
Simple answer yes, Think about taking two extreme cases : How much does a slinky extend in a gravity-free space? None at all How much would it extend if it was on perhaps Jupiter or even a black hole ?It should extend by a large amount. Gravity does play a role.
If a slinky is hanging vertically in a gravitational field, the amount of stretch in any short section depends on the weight of the coil hanging below that section. Less gravity will produce less stretch.
https://physics.stackexchange.com
308,065
[ "https://physics.stackexchange.com/questions/308065", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/21068/" ]
I just got introduced to the Dirac delta function and one of the questions was to express volume charge density $\rho({\bf r})$ of a point charge $q$ at origin. I saw that the answer is related to Dirac delta function as: $$\rho({\bf r}) = q \delta^3({\bf r})$$ where $\delta^3({\bf r})$ is the 3-dimensional Dirac Delta...
A point charge is confined to a single point in space. Let's call it as $q\left(\vec{r}\right)$. This means that the charge has a magnitude only at $\vec{r}$, and at all other points it is zero. The charge density for a point charge is given by charge per unit volume. Since the there is no charge except at the posit...
If you integrate $\rho$ over the volume, the $\delta$ will be zero everywhere except where its argument is $0$. Since the area under this function is normalized to $1$, the result of the integration will be that the charge will be $0$ everywhere except at $r=0$ where it will be $q$. This follows because you want $\rh...
https://physics.stackexchange.com
223,288
[ "https://physics.stackexchange.com/questions/223288", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/44711/" ]
If an electron has de Broglie wavelength $\lambda$, can I write it's kinetic energy $E = \frac{hc}{\lambda}$? If not then what energy does the equation represent and when can the equation be used ?
The problem is that for an electron $\nu \ne c/\lambda$. You need to replace $c$ by the phase velocity, which is somewhat involved to calculate. However you can get an approximate equation for the energy and wavelength by noting that the de Broglie wavelength is given by: $$ \lambda = \frac{h}{p} $$ For a non relativ...
the energy of a debroglie wave can be gotten from the equation below E=hv/2l where l=wavelength it is obvious that a change in velocity will lead to a change in wavelength and energy. Therefore E=f(v,l) Using partial derivatives, the change in energy, dE is expressed through the following equati...
https://physics.stackexchange.com
6,296
[ "https://mechanics.stackexchange.com/questions/6296", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/3261/" ]
The car (Renault Megane 1998 1.6e hatchback) lost power (about 500rpm in a bursty rhythm) after I re-ignited on a traffic light, the engine started shaking, and I could smell liquid fuel. There was no obvious place where the fuel could have dripped from. I left the car and checked for any marks on the ground later. Abo...
Firstly, what car is it? (Make, model, year). Is the fuel smell more pronounced around the engine bay (suggesting a leak) or around the exhaust (suggesting unburnt fuel)? Shaking and low power suggests, as you suspect, that it isn't running on all cylinders (which would result in unburnt fuel coming out the exhaust)....
The Megane Mk1 has a coil pack per spark plug - they sit in the engine block just above the plugs themselves. One of the coil packs may be faulty causing intermittent spark at the plug.
https://mechanics.stackexchange.com
193,169
[ "https://physics.stackexchange.com/questions/193169", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/80827/" ]
In Q.M. the beam splitter is represented by the Hadamard transform (at least if the particle is in a state $|\Psi \rangle = \left( \frac{1}{\sqrt2} \right )(|0\rangle + |1\rangle)$ ) The Hadamard Matrix is $H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 &amp; 1\\ 1 &amp; -1\end{pmatrix}$ In the classical Jones-Formalism th...
In QM a phase shift has no effect on the physical state represented by the ket. That is, $\mid \Psi \rangle$ corresponds to the same state as $\mid \Psi \rangle e^{i\phi}$. Also note that any unitary matrix is a valid quantum logic gate (operation). And every operation on a qubit can be represented by a rotation or ref...
Both are valid representations for a lossless beam splitter, and it makes no difference which one you use as long as you are consistent and using just one of them.
https://physics.stackexchange.com
441,568
[ "https://electronics.stackexchange.com/questions/441568", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/222428/" ]
Ohm's law states V=I*R. That means when we increase voltage we must also increase the current(I.) But transformer increases the current while decreasing the voltage or decreasing the current while increasing the voltage. How does this happen?
<blockquote> Ohmls Law states V = IR. That means when we increase voltage we must also increase the current (I). </blockquote> That is true when feeding a resistor. <blockquote> But transformer increases the current while decreasing the voltage or decreasing the current while increasing the voltage. </blockquote>...
"when we increase voltage we must also increase the current(I)" while R is constant. You should look at the transformer from a power perspective: P=I*V and Power In = Power Out, Now, if you have 10V in and 1 A then that is 10W, so then power out is 10W If you have 10 times the number of turns on the output compared...
https://electronics.stackexchange.com
102,258
[ "https://mathoverflow.net/questions/102258", "https://mathoverflow.net", "https://mathoverflow.net/users/18263/" ]
Let $(X,\Sigma,\mu)$ be a measure space and consider a family of $\mu$-measurable functions $f_i:X \to \mathbb{R}$ for $i$ lying in some index set $I$. Define $$f(x) = \inf_{i \in I} f_i(x)$$ I think every good analysis book mentions or proves that if $I$ is countable, then $f$ is also $\mu$-measurable. What is not so...
As you expected, the infimum of continuum many measurable functions need not be measurable, even in the case where $X$ is the real line with Lebesgue measure. In fact, if $A$ is any subset of $\mathbb R$ (in particular not necessarily measurable), its characteristic function is the infimum of at most continuum many me...
If you want a (sometimes useful) positive result: suppose $f_i : \mathbb R \to \mathbb R$ are continuous. Then $g(x) := \inf_{i \in I} f_i(x)$ is upper semicontinuous, and therefore (Borel) measurable. More general domains are possible, of course.
https://mathoverflow.net
188,227
[ "https://softwareengineering.stackexchange.com/questions/188227", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/63220/" ]
In my JavaEE project I have an interface like this: <pre><code>@Local public interface DataAccess { ... } </code></pre> And two stateless beans implementing it: <pre><code>@Stateless public class DataAccess_Online implements DataAccess { ... } @Stateless public class DataAccess_Offline implements DataAccess { ... }...
You can use: <pre><code>@Stateless(name="online") public class DataAccess_Online implements DataAccess { ... } @EJB(beanName="online") DataAccess da; </code></pre>
Well the solution was simple, I just had to introduce a new interface: <pre><code>public interface DataAccessOffline extends DataAccess </code></pre> The error is gone and I can inject into DataAccess with @EJB, but I can still switch between the online and offline implementations.
https://softwareengineering.stackexchange.com
40,656
[ "https://dba.stackexchange.com/questions/40656", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/10356/" ]
If I go to <code>mysql shell</code> and type <code>SELECT * FROM users</code> I get - <pre><code>+--------+----------------+---------------------------------+----------+-----------+--------------------+--------------------+ | USERID | NAME | EMAILID | PASSWORD | USER_TYPE | CONTACT_ID...
For "human readable" output, you can use <code>column</code> mode, and turn header output on. That will get you something similar to the <code>sqlplus</code> output in your examples: <pre><code>sqlite&gt; select * from foo; 234|kshitiz|dba.se </code></pre> <pre><code>sqlite&gt; .mode column sqlite&gt; select * from...
All of the answers provide settings you can type at the SQLite console or via CLI, but nobody mentions that these settings can be put into an RC file to avoid having to type them all the time. Save this as <code>~/.sqliterc</code>: <pre><code>.mode column .headers on .separator ROW "\n" .nullvalue NULL </code></pre> ...
https://dba.stackexchange.com
480,907
[ "https://physics.stackexchange.com/questions/480907", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/135024/" ]
I've heard the terms "damping constant" and "damping coefficient" used to describe both the <span class="math-container">$c$</span> from the viscous damping force equation <span class="math-container">$F = -c\dot{x}$</span> and the <span class="math-container">$\gamma$</span> from the definition <span class="math-conta...
The answer is yes. Talk to <em>any</em> engineer and if say the terms "damping constant" and "damping ratio" they know exactly what you mean without any further explanations. <ul> <li>Damping coefficient <span class="math-container">$c$</span> signifies the contribution of velocity to force, as in <span class="math-co...
Lets see where the damping ratio <span class="math-container">$\gamma$</span> come from ? Start with: <span class="math-container">$$m\,\ddot{x}+c\,\dot{x}+k\,x=0\tag 1$$</span> where <span class="math-container">$c$</span> is the damping constant with the unit <span class="math-container">$[N\,s/m]$</span> and <s...
https://physics.stackexchange.com