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
177,084
[ "https://softwareengineering.stackexchange.com/questions/177084", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/19936/" ]
Some might argue this question is too general, but because keeping up seems especially relevant to programming, is anyone's experience that: <ul> <li>do employers expect you to stay current? what is the "industry standard" of expected time a programmer should spend keeping up-to-date? </li> <li>is it generally accept...
There's no industry standard(s) at all as far as I'm aware. There are some practices that I've seen. Some good (G), some bad (B). <ul> <li>(G) Training courses when adopting a new technology. I've seen companies, on a number of occasions, bring in an educator to give training sessions to their developers (or a select ...
Somewhat. I'd think it unrealistic to expect being up to date on everything though if one is working within a specific area, there may be an expectation to stay up to date within that realm of knowledge. This does set dangerous precedents since one could accumulate knowledge on various systems and be expected to keep...
https://softwareengineering.stackexchange.com
22,865
[ "https://mechanics.stackexchange.com/questions/22865", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/13423/" ]
I was on my way to work and car started to run rough stumble and check engine light started to flash. Immediately turned around limped home about 3 miles. Changed plugs and swapped some old coils around. Still idles low and strong gas smell from exhaust. Any ideas need my car for work.
A fuel test procedure and kit (without sending out to a lab) involves 3 steps. <ol> <li>The first involves lowering a probe to the bottom of the tank with a paste that changes color if it touches moisture. The probe almost resembles a bicycle cable in a clear sheathe. This requires the probe and the color changing pa...
If it doesn't smell kosher, drain it out and fill up with a known good gas. Don't waste your time with testing. It'cheaper and easier in the long run to just bite the bullet and go for the cure!
https://mechanics.stackexchange.com
1,443,853
[ "https://math.stackexchange.com/questions/1443853", "https://math.stackexchange.com", "https://math.stackexchange.com/users/269268/" ]
So I am curious how to correctly reason about $Th(\mathbb{N})$. Is it a set of constants 0,1 and relations on them? E.g can we say that $(1+1+1+1) * (1+1+1)$ is in $Th(\mathbb{N})$ because we take a constant $(1+1+1+1) \in \mathbb{N}$ and constant $(1+1+1) \in \mathbb{N}$ and apply relation $*$ on them that produces ...
$Th(\mathbb{N})$ is the set of sentences in the first-order language of arithmetic (usually understood to be $\{+, \times, 0, 1\}$) which are true of the natural numbers. So, for example: <ul> <li>"$\forall x(x=0)$" is not in $Th(\mathbb{N})$, because it is not true that every natural number is zero.</li> <li>"$1+1=2...
We have to start with a <em>language</em> <span class="math-container">$\mathcal L$</span>, e.g the <em>first-order</em> language for <em>arithmetic</em> (or <em>elemntary number theory</em>) : <blockquote> Constant symbols: <span class="math-container">$0$</span> One-place function symbols: <span class="math-container...
https://math.stackexchange.com
32,699
[ "https://mathoverflow.net/questions/32699", "https://mathoverflow.net", "https://mathoverflow.net/users/5789/" ]
<h2>Problem</h2> Consider two <em>d</em> x <em>d</em> complex matrices, <em>R</em> and <em>S</em>, whose entries lie in the unit disk: $\quad |R_{i,j}|&lt;1 \quad$ and $\quad |S_{i,j}|&lt;1 $. Say that <em>R</em> is constructed by randomly choosing complex numbers from the unit disk, but <em>S</em> is constructed ...
To flesh out Helge's answer a bit before I go to bed: Assume that $f(x,y)$ is a smooth function on the unit square. Define the functions $f_n(x,y) = f(\frac{\lfloor nx \rfloor}{n}, \frac{\lfloor ny\rfloor}{n})$. This is a piecewise step function. Observe that the operator $S$ of dimension $d$ is the same if you defin...
I will limit myself to the statement about $S$, see my comment above for $R$. I think the main insight into understanding this is to do the computation for the $d \times d$ matrix $$ A = \begin{pmatrix} 1 &amp; \dots &amp; 1 \\\ \vdots &amp; \ddots &amp; \vdots \\\ 1 &amp; \dots &amp; 1 \end{pmatrix}, $$ so all entrie...
https://mathoverflow.net
73,700
[ "https://electronics.stackexchange.com/questions/73700", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/22580/" ]
We're trying to build a PCB here which originally has several 1N4001 diodes but we only have 1N4007 or 1N4008 diodes. What would be the consequences of such replacement? Are 1N4001 diodes more "sensitive" than the other ones? What would it be the difference in its specs?
What you do with a current limited power supply is set to <strong>maximum</strong> properties. The power supply will regulate its output voltage in such a way that the lowest condition is met. I drew a graph for how a current limited power supply will act with varying resistance connected. Consider a 12V power supply ...
The name <em>current limited power supply</em> is a little misleading, because such a supply is also voltage limited. It delivers as much power as possible, without exceeding either the voltage limit or current limit. If it's connected to an open circuit, it will be limited by voltage, because it takes no current to d...
https://electronics.stackexchange.com
710,044
[ "https://physics.stackexchange.com/questions/710044", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/181792/" ]
Isn't the basic operational reason that the hidden variables are &quot;<em><strong>hidden</strong></em>&quot; the assumption that they can't be measured? Well in case, given that measurement is realistically speaking, nothing but <em><strong>interaction</strong></em>, by such assumption, are we postulating that the hid...
Answer to question in 1st paragraph is &quot;no&quot;. The term &quot;hidden&quot; here is not being used to signify &quot;impossible to detect&quot;; it is being used to signify &quot;a physical property whose value influences or determines an outcome which is thought (on some other theory) to come about some other wa...
A particle stream streaks a corner and the particles are deflected in such a way that a periodic intensity distribution can be observed on an observation screen. Any attempt to observe the particles directly behind the edges fails because our (not perfect) observation instrument acts on the particles with an energy tha...
https://physics.stackexchange.com
19,159
[ "https://dsp.stackexchange.com/questions/19159", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/10425/" ]
When attempting to spot activities on an EEG waveform given a stimuli, it is recommended that several trials be taken and their average is done to increase the SNR. Intuitively, since noise is not stationary or localized, averaging different trials will have a smearing effect on the noise. But how exactly does it inc...
Intuitively this is true, because averaging a zero mean noise processes approximates its expectation value - which is zero. More rigorously: If the signal $x$ that you want to observe (estimate, actually) is constant for all observations $y$ we can write the $n\text{th}$ observation as $$ y_n = x + r_n $$ where $r_n$ ...
averaging only increases S/N if the "S" component of the items being averaged is correlated and the "N" component is not correlated. when adding perfectly correlated values, then the overall <strong>"voltage"</strong> metrics are added and the values team up. so adding the same thing to itself $N$ times increases tha...
https://dsp.stackexchange.com
14,877
[ "https://mathoverflow.net/questions/14877", "https://mathoverflow.net", "https://mathoverflow.net/users/1353/" ]
We may define a topological manifold to be a second-countable Hausdorff space such that every point has an open neighborhood homeomorphic to an open subset of $\mathbb{R}^n$. We can further define a smooth manifold to be a topological manifold equipped with a structure sheaf of rings of smooth functions by transport o...
There is the book by Ramanan "Global Calculus" which develops differential geometry relying heavily on sheaf theory (you should see his definition of connection algebra...). He avoids the magic words "locally ringed space" by requiring the structure sheaf to be a subsheaf of the sheaf of continuous functions (hence max...
This is a comment, not an answer, but is too long to fit in the comment box: having read the question, answers, and comments, I don't quite follow the intent of this question: We can define a manifold to be a locally ringed space in which each point has a neighbourhood isomorphic to an open subset of ${\mathbb R}^n$ (...
https://mathoverflow.net
60,238
[ "https://electronics.stackexchange.com/questions/60238", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/18937/" ]
I've got a low power application which will be powered from a Li coin cell. I've achieved satisfactory sleeping current with my chosen MCU. The application ADC IC however is a different matter: 900µA while inactive -- way too much for a coin cell application. So I thought why not isolate the power to the ADC when i...
Powering a device through a GPIO pin is usually a bad idea. In the very low power regime, perhaps you could get away with it, but I would not recommend it unless you have very severe constraints. You've already noted that you've checked that the ADC's requirement is lower than the pin's drive capability. That is typic...
Yes, you can do that, just make sure all the constraints are met. I have done this a few times. Using a microcontroller output to actually power a small circuit instead of switcing its power can be a useful way to save space. I used this in one project, for example, to turn on a ultrasound receiver analog front end ...
https://electronics.stackexchange.com
238,725
[ "https://mathoverflow.net/questions/238725", "https://mathoverflow.net", "https://mathoverflow.net/users/91596/" ]
It seems to be true that OEIS sequences A001222 and A257091 are closely related. First one is the number of prime divisors of n counted with multiplicity. The second one is the logarithms to the base 5 of the denominators of the Dirichlet series of zeta(s)^(1/5). Actually first terms of these sequences satisfy A257091(...
Robert Israel's guess is almost correct, actually for $n=\prod p_j^{e_j}$ we have $$ A257091(n)−A001222(n)=\sum_j \nu_5(e_j!)=\sum_j \sum_{m=1}^{\infty} \lfloor e_j/5^m\rfloor $$ (where $\nu_5(N)$ denotes the largest $k$ for which $5^k$ divides $N$). Indeed, expanding as binomial each Euler multiple in $\zeta^{1/5}$ ...
The first two exceptions to your rule: $A257091(243) - A001222(243) = 6 - 5 = 1$ and $A257091(486) - A001222(486) = 7 - 6 = 1$, but $243$ and $486$ are not multiples of $32$. EDIT: Of course $243 = 3^5$. From computing the results up to $n=10000$, it looks to me like if $n = \prod_{j} p_j^{e_j}$ is the prime factor...
https://mathoverflow.net
593,761
[ "https://physics.stackexchange.com/questions/593761", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/267309/" ]
The following potential is given: <span class="math-container">$ V\left(x\right)=\begin{cases} V_{0} &amp; x&lt;-a\\ 0 &amp; -a&lt;x&lt;0\\ \infty &amp; 0&lt;x \end{cases} $</span> I have to find the general solution for Schrodinger equation for this potential with energy <span class="math-container">$ E&gt;V_{0} $</sp...
Let us label the wavefunction solutions for the two regions from left to right: <span class="math-container">$$\psi_1(x) = Ae^{ik_1x} + Be^{-ik_1x}\quad \text{for} \quad x&lt;-a$$</span> and <span class="math-container">$$\psi_2(x) = Ce^{ik_2x} + De^{-ik_2x}\quad \text{for} \quad -a&lt;x&lt;0,$$</span> where <span clas...
First, let's write the wave function <span class="math-container">$$ \psi(x) = \begin{cases} A \ e^{ik_1x} +B \ e^{-ik_1x} &amp; x\leq -a \\ C\ e^{ik_2 x}+De^{-ik_2x}&amp; -a\leq x\leq 0 \\ 0 &amp; 0&lt; x \end{cases} $$</span> where <span class="math-container">$$k_1=\frac{\sqrt{2m(E-V_0)}}{\hba...
https://physics.stackexchange.com
495,738
[ "https://physics.stackexchange.com/questions/495738", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/214472/" ]
I tried to answer the question only using the definitions and the Navier-Stokes equation: <span class="math-container">$$\rho \frac{Dv}{Dt} = -\nabla P +\rho g -\mu[\nabla \times(\nabla \times v)] $$</span> In my opinion if the vorticity is zero, then the fluid is irrotational, regardless of presence of the viscous ...
The answer to the title question is <strong>yes, it is possible for the flow to be irrotational if there are nonzero viscous forces acting on fluid</strong>. As an example, let us consider a simple yet physically meaningful example of such flow: radial, spherically symmetric flow in a viscous incompressible fluid (wi...
I'm not sure your momentum equation is correct. For the x-momentum, we should have: <span class="math-container">$$\rho\frac{Du}{Dt}=-\frac{\partial \rho}{\partial x}+\rho g_x+\frac{\partial \tau_{xx}}{\partial x}+\frac{\partial \tau_{yx}}{\partial y}+\frac{\partial \tau_{zx}}{\partial z}$$</span> For Newtonian fluid...
https://physics.stackexchange.com
407,448
[ "https://physics.stackexchange.com/questions/407448", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/98822/" ]
When a black body moves away from us at high speed the average velocity of its constituents will be higher. This means the body's temperature has increased. The whole spectrum of the wavelengths though will have been increased when arriving on earth, suggesting the body's temperature has décreased. Now my question is w...
No, the temperature of the body would not be higher. The speed of the whole body doesn't affect it's temperature. Only the internal/chaotic movement of bodies atoms affect the temperature. The mechanism of emission of electromagnetic waves by hot body is roughly like this: body's atoms oscillate (or move and collide...
lesnik's nice answer explains why the speed of the body does not affect its temperature. The second part of your question has to do with the perception of a stationary observer, who, due to the Doppler's effect, will see all the wavelengths increased. Should the observer conclude that the temperature of the body mov...
https://physics.stackexchange.com
275,644
[ "https://electronics.stackexchange.com/questions/275644", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/119985/" ]
Can I use Li.ion 7.4v 5400mah in place of built in Li.ion 7.4v 1400mah battery of a portable DVD player and use same old charger?
I agree with @vini_i as far as the pitfalls go. At the core of the question though, if you are using a cc/cv charger with a larger battery than it was designed for you will be fine, even possibly with different chemistries, but not all, as long as the voltage is the same, it will just charge slower. I would not use it...
There is theoretically and practically. Theoretically if the chemistry matches then it should be fine. Practically there are more pitfalls than one could count. Is the battery smart? If it is smart then the internal communication to the battery may not match. If the charger is smart then it may know that it exceede...
https://electronics.stackexchange.com
65,049
[ "https://electronics.stackexchange.com/questions/65049", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/22381/" ]
While studying analog circuits and conducting experiments with op-amps, I couldn't help wondering why would I need an analog circuit to add/multiply/integrate electrical signals. In modern times, computers are quite cheap, and it seems a lot easier letting a computer calculate anything you want (it's fast, versatile, r...
The moral of the story is digital electronics need an interface to the outside world. Analog electronics are necessary to get the outside world's signals into a form that can be digitized. For example, how do you get that <span class="math-container">\$\frac{50\mu V}{degree }\$</span> from a thermocouple into a signal ...
There are lots of examples that people will use that point out the "exception" to the rule where you can't use digital design approaches for signals, like: <ul> <li>dealing with RF or very high frequency signals, most digital motherboards in computers have a very "analog" design cycle.</li> <li>conversion from the ana...
https://electronics.stackexchange.com
3,685,792
[ "https://math.stackexchange.com/questions/3685792", "https://math.stackexchange.com", "https://math.stackexchange.com/users/790922/" ]
How can I solve <span class="math-container">$\displaystyle{\lim_{x \to \infty} \frac{1}{(1+\frac{k}{x})^x}}$</span> using <span class="math-container">$\displaystyle{\lim_{x \to +\infty} {(1+\frac{1}{x})^x = e}}$</span>? What should I do with the constant "<span class="math-container">$k$</span>?
Note that I'll be assuming <span class="math-container">$k &gt; 0$</span>.<br> Observe that <span class="math-container">$$\begin{align}\lim_{x\to\infty}\left(1 + \dfrac{k}{x}\right)^x &amp;= \lim_{x\to\infty}\left(1 + \dfrac{k}{x}\right)^{kx/k}\\ &amp;\overset{y=x/k}{=} \lim_{y\to\infty}\left(1 + \dfrac{1}{y}\right)^{...
The following works for <span class="math-container">$k \in \mathbb{R}$</span>, you just have to use <span class="math-container">$\ln(1+a)= a+O(a^2)$</span> for small a: <span class="math-container">$$ \displaystyle{\lim_{x \to +\infty} \frac{1}{(1+\frac{k}{x})^x}} = \lim_{x \to +\infty} (1+\frac{k}{x})^{-x} = \lim_{x...
https://math.stackexchange.com
428,266
[ "https://electronics.stackexchange.com/questions/428266", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/147192/" ]
Toshiba's SCiB 20 Ah Lithium titanate cell is said to have a nominal capacity of 20 Ah. The cutoff voltages are 1.5 V and 2.7 V. Does this mean that all 20 Ah of charge exist between those two cutoff voltages? Otherwise to get all 20 Ah of charge one would have to completely discharge and thus damage the cell.
The available capacity of a fully charged battery varies with temperature and discharge rate (and duty cycle if it's not constant). It will tend to decrease with each cycle, and previous fast charging, exposure to temperature extremes or fast discharging may have negative effects over time. If a reputable manufacture...
The available current capacity is listed in the data sheet. This is typically listed as current over time at a specific discharge rate, from fully charged to the dictated cut off voltage. If the operating voltage range is 2.7V to 1.5V, then the stated available capacity when new should be within that range.
https://electronics.stackexchange.com
423,131
[ "https://physics.stackexchange.com/questions/423131", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/204170/" ]
I am notorious for over thinking and I am having a problem with this question: <blockquote> On another planet, a marble is released from rest at the top of a high cliff. It falls 4.00 m in the first 1 s of its motion. Through what additional distance does it fall in the next 1 s? (a) 4.00 m (b) 8.00 m (c) 12.0 m (d)...
<blockquote> if the acceleration is 8.0 m/s^2, then why didn't it fall 8.00 m in the first second of its motion (since the initial velocity was 0m/s at t = 0 s)? </blockquote> Because the distance it moves in a second depends on the average speed it has during that period, not the maximum speed. <blockquote> why ...
As the marble gains the velocity of 8m/s only after 1sec, it can't cover distance of 8m in first second.
https://physics.stackexchange.com
632
[ "https://cstheory.stackexchange.com/questions/632", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/-1/" ]
I recently heard this -<br> "A non-deterministic machine is not the same as a probabilistic machine. In crude terms, a non-deterministic machine is a probabilistic machine in which probabilities for transitions are not known". I feel as if I get the point but I really don't. Could someone explain this to me (in the co...
It's important to understand that computer scientists use the term "nondeterministic" differently from how it's typically used in other sciences. A nondeterministic TM is actually deterministic in the physics sense--that is to say, an NTM always produces the same answer on a given input: it either always accepts, or a...
In the context of Turing Machines, "non-deterministic" really means "parallel". A randomized algorithm can randomly explore the branches of the computation tree of a non-deterministic Turing machine, but a non-deterministic Turing machine can explore them -all- at the same time, which is what gives it its power. In ot...
https://cstheory.stackexchange.com
56,516
[ "https://stats.stackexchange.com/questions/56516", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/17503/" ]
I am struggling to understand kernels and how to determine whether they are proper or not. For these examples can anyone explain why an example is proper and why another example is not. Given $K_1$ and $K_2$ two proper kernels, determine which of the following formulae define proper kernels: $$ K_4(x_1,x_2) = -K_1(x...
In a machine learning context (i.e. "kernel methods"), the key requirement for a kernel is that it must be symmetric and positive-definite, that is, if $K$ is a kernel matrix, then for any (column) vector $x$ of the appropriate length, $x^{T}Kx$ must be a positive real number. This restriction is in place mostly due to...
One easy way is to think of a kernel function as a positive-semidefinite (PSD) matrix. Then you can use PSD tricks. For example, if $K$ is PSD, then $-K$ is NSD and thus not PSD. On the other hand, if $K$ is PSD, $c K$ is PSD if $c$ is a scalar and $c &gt; 0$. Thus, $K_4$ and $K_3$ are not generally kernels and $K_5$...
https://stats.stackexchange.com
4,343,034
[ "https://math.stackexchange.com/questions/4343034", "https://math.stackexchange.com", "https://math.stackexchange.com/users/960203/" ]
It is a well known fact that if <span class="math-container">$a=b \pmod n$</span> then <span class="math-container">$a^k = b^k \pmod n$</span> where <span class="math-container">$ a, b, n, k $</span> are integers( <span class="math-container">$k\neq0.$</span>) But now I was thinking that is there any special case for w...
<span class="math-container">$$\int_0^{y} e^x dx = \left|e^x\right|_{0}^{y}$$</span> <span class="math-container">$$\rightarrow e^y - e^0 = e^y - 1$$</span> It is given that this expression equals <span class="math-container">$e$</span>. So lets solve it from here: <span class="math-container">$$e^y - 1 = e$$</span> <...
Here <span class="math-container">$e^y - e^0 = e$</span>, then <span class="math-container">$e^y = e+1$</span> and so <span class="math-container">$y = \ln(e+1)$</span>.
https://math.stackexchange.com
14,948
[ "https://dba.stackexchange.com/questions/14948", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2957/" ]
I have a table with a primary key which is two integer fields, each a foreign key to a different table. (Multi to Multi table) In one of the foreign tables two rows are merged and this table is updated to match the changes which can result in two rows being duplicates and cause the query to fail. <strong>There has to...
If I'm following you correctly, you can do what you need in a single <code>MERGE</code> statement, if you want to be cute about it. I suspect you'd get better performance with separate small <code>INSERT</code> and <code>DELETE</code> operations. <pre><code>CREATE TABLE #ManyMany ( FK1 INT NOT NULL, FK2 INT NOT NULL,...
Usually we just delete the record that no longer needs to exist. You are deleting both records and reinserting the keeper record.
https://dba.stackexchange.com
150,184
[ "https://security.stackexchange.com/questions/150184", "https://security.stackexchange.com", "https://security.stackexchange.com/users/108682/" ]
I'm on a temporary job so they don't give me any passwords to access the sites and resources I need. Instead, they tell me to move to another computer where a regular employee is and where every password is already set and saved on the browser. I have to be honest, I got into the router (as they are using default cre...
While there is no doubt that weak passwords are an issue for your company, I would strongly advise against telling your boss about the things that you have done. Your company decided against giving temporary workers access to sites and resources for a reason. Not only did you gain unauthorized access to the wireless L...
Unless you have received an explicit or implicit(*) mandate for doing so, trying to guess passwords to access resources that were not granted to you <strong>is</strong> a hostile action, even if the passwords are trivial or written in a place that you should not have read. If you find a leaflet with "Confidential - res...
https://security.stackexchange.com
522,210
[ "https://math.stackexchange.com/questions/522210", "https://math.stackexchange.com", "https://math.stackexchange.com/users/77789/" ]
Forgive me if this is really basic: <blockquote> Tammy is a general contractor and has submitted two bids for two projects (A and B). The probability of getting project A is 0.65. The probability of getting project B is 0.77. The probability of getting at least one of the projects is 0.90. What is the probability th...
\begin{align*} \mathbb{P}(A)=&amp;\,0.65,\\ \mathbb{P}(B)=&amp;\,0.77,\\ \mathbb{P}(A\cup B)=&amp;\,0.90,\\ \mathbb{P}(A\cap B)=&amp;\,\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\cup B)=0.52. \end{align*} Your reasoning is correct.
P(A or B) = P(A)+P(B) -P(A and B) Therefore P(A or B) - P(B) -P(A) = -P(A and B) with P(A or B) = 0.9 P(A) = 0.65 P(B) = 0.77
https://math.stackexchange.com
630,580
[ "https://physics.stackexchange.com/questions/630580", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/139303/" ]
I believe the topic of the present question fully explains the issue I would you to talk with me. It is well known that the higher the electromagnetic frequency, the more difficult is its shielding. I have seen many x-rays devices at university covered just with silver paper in order to prevent that any radiation outla...
The X-ray part of the electromagnetic spectrum covers quite a large spectrum. I assume medical imaging uses x-rays at the low-frequency end of the x-ray spectrum, and low intensity, to minimize tissue damage. (To make up for that the sensor must be <em>very</em> sensitive.) I expect medical imaging x-ray machines will ...
I personnally wrapped my phone with silver paper (aluminium foil to be precise) and the phone was shielded. However, the phone has to be completely covered in foil for it to work, a few mm hole will leak enough for the experiement to fail.
https://physics.stackexchange.com
16,859
[ "https://mechanics.stackexchange.com/questions/16859", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/10451/" ]
I was driving (well standing still actually) during rush hour, and I was suddenly wondering what would happen to a car engine when I would push the accelerator pedal all the way down while the engine is not in gear. Since most equipment these days is made pretty idiot proof I expect it wouldn't just blow up from the ex...
The RPMs would certainly increase but the mechanical components would be prevented from exceeding maximum RPMs by a rev-limiter. Rev-limiters are built into the ECU (computer) of the car. When an engine is spinning at its maximum RPM set by the manufacturer, the ECU will not send a spark to particular cylinders to pr...
While most new electronically controlled vehicles probably do have a rev-limiter built in, this doesn't mean you cannot go past the <em>red-line</em> of the engine. The red-line is the theoretical maximum you ever want your engine to run at and is the limit at which your engine is designed to work. Beyond this point ...
https://mechanics.stackexchange.com
92,344
[ "https://softwareengineering.stackexchange.com/questions/92344", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
There appears to be this notion among the project management team that stating that "it works" means it should then be deemed 100% complete. Most programmers know that isn't always the case. If I'm trying alternative approaches to get a piece of functionality working, that doesn't necessarily mean I found the best solu...
There is one overarching principle that governs the need to refactor and optimize, both in waterfall and Agile: YAGNI (You Ain't Gonna Need It). A second principle is the corollary of the first: "Premature optimization is the root of all evil", the coding equivalent of the general proverb "the enemy of excellence is pe...
<blockquote> Should this "I can do better" time actually fit somewhere within the timeline? </blockquote> Yes. Just before you start coding the <strong>next</strong> release. Don't refactor based on "intuition". Refactor based on the next sprint's actual stories.
https://softwareengineering.stackexchange.com
79,777
[ "https://mathoverflow.net/questions/79777", "https://mathoverflow.net", "https://mathoverflow.net/users/9550/" ]
I was thinking about infinite exponential representation of real numbers (like $2=e^{e^{-e^{-e^{e^{-e^{e^{e^{-e^{-e^{-e^{-e^{-e^{e^{-e^{e^{e^{-e^{e^{\cdot^{\cdot^{\cdot}}}}}}}}}}}}}}}}}}}}}$. The sequence of signs before exponents can be obtained by repeated application of $\ln|x|$ to $2$ and taking a sign of each resu...
First, even though I think this is a fun question, it's not really research mathematics and I'm not sure it belongs on mathoverflow. (You know that some really smart people answer questions on math.stackexchange, right?) As was noted in Robert's answer, one is investigating the sequence $x_{n+1} = | \log(x_n)|$, which ...
One must be careful with convergence of such "infinite representations". Almost any positive real $x_0$ is the start of a sequence $x_i$ of positive reals such that $x_i = e^{x_{i+1}}$ if $x_i &gt; 1$ or $e^{-x_{i+1}}$ if $x_i &lt; 1$; thus $x_{i+1} = |\ln x_i|$. It's only "almost any" because the sequence would end ...
https://mathoverflow.net
51,923
[ "https://dba.stackexchange.com/questions/51923", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/15708/" ]
When running SQL server on physical hardware, placing database data and log files on separate disks or RAID arrays can benefit performance, resilience, and maintenance. Partitioning the database over separate physical disks and RAID arrays is also an option. Simply put, more spindles is better. When SQL server is runn...
This is an old question, but I came across this and was appalled at one particular comment made, suggesting the original asked was "confused". The question is perfectly clear, just not strictly about database administration. It falls into the fields of server virtualization and storage provisioning in virtual environme...
Partition-elimination is an awefully good reason to still partition even in a virtual environment, if your queries are such that they can use take advantage of it.
https://dba.stackexchange.com
360,796
[ "https://physics.stackexchange.com/questions/360796", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170996/" ]
I have actually two different questions that may result in the same answer. The first one : if the Earth would have less gravity, would it result in less air density? The second one : On a different planet, let's say on Uranus which is bigger than Earth, the gravity is less than 1g but does that automatically mean t...
Remember that $\vec{\omega}$ is a vector: its direction is given by the right hand rule: curl the fingers of your right hand in the direction of the rotation and see where your thumb points. The magnitude of this vector is the rotation rate in radians per second (IOW, you'll need to convert the 5 rpm datum to radians p...
First of all, you have to define the parameters of your problem. Let's use cylindrical coordinates, using the base $(\mathbf{e}_z, \mathbf{e}_r, \mathbf{e}_\theta)$, where $\mathbf{e}_z$ is the axis of rotation.There is an inertial frame of reference $\mathcal{R}_0$, and another one $\mathcal{R}$ which rotates with and...
https://physics.stackexchange.com
511
[ "https://datascience.stackexchange.com/questions/511", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/97/" ]
I wonder which type of model cross-validation to choose for classification problem: K-fold or random sub-sampling (bootstrap sampling)? My best guess is to use 2/3 of the data set (which is ~1000 items) for training and 1/3 for validation. In this case K-fold gives only three iterations(folds), which is not enough to...
If you have an adequate number of samples and want to use all the data, then k-fold cross-validation is the way to go. Having ~1,500 seems like a lot but whether it is adequate for k-fold cross-validation also depends on the dimensionality of the data (number of attributes and number of attribute values). For example, ...
I guess you say that you want to use 3-fold cross-validation because you know something about your data (that using k=10 would cause overfitting? I'm curious to your reasoning). I am not sure that you know this, if not then you can simply use a larger k. If you still think that you cannot use standard k-fold cross-val...
https://datascience.stackexchange.com
8,180
[ "https://dba.stackexchange.com/questions/8180", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/4599/" ]
I have a MyISAM table that holds a few million Messages. I am thinking about converting it to an partition InnoDB table. Just wondering about the best partition strategy. I would like to do this without a code change, and the two indexes I think would be most relevant are <ul> <li>ID a bigint (primary key)</li> <...
Personally I'd use the date as your partition function, and partition by a hash of the year and month. Maybe splitting the data into 48 or more partitions. I've done this on some large volume databases and had good results. <pre><code>ALTER TABLE `your_table` PARTITION BY HASH(YEAR(`date_field`)*12 + MONTH(`date_fiel...
PARTITION BY HASH is probably useless for ranges. Do PARTITION BY RANGE, and write a script to prune the oldest partition (if desired) and add a new partition. Please provide SHOW CREATE TABLE and the important SELECTs -- we need details of your situation in order to give detailed advice.
https://dba.stackexchange.com
306,551
[ "https://mathoverflow.net/questions/306551", "https://mathoverflow.net", "https://mathoverflow.net/users/8628/" ]
Suppose $G=(V,E)$ is a simple, undirected graph with $|V|,|E|$ infinite. Is there $B\subseteq E$ with $|B| = |E|$ such that $(V,B)$ is bipartite?
Yes. In each component Take a vertex $v$ and for every vertex $u$ let $d(v,u)$ be the shortest distance in $G$ between $v$ and $u$, where distance is defined as the fewest number of edges. Then every edge $\{u,u'\}$ in $G$ satisfies $|d(v,u)-d(v,u')| \le 1$, and the graph formed from $G$ by removing all edges between v...
I initially thought you were asking about the sub-graph induced by the endpoints of $B.$ I suppose then one could simply ask about an infinite set of vertices which induce a subgraph which is bipartite with infinitely many edges. For that, $K_{\infty}$ is a counterexample More generally, take any finite graph and re...
https://mathoverflow.net
373,682
[ "https://mathoverflow.net/questions/373682", "https://mathoverflow.net", "https://mathoverflow.net/users/5690/" ]
Let <span class="math-container">$X$</span> be a Banach space (over <span class="math-container">$\mathbb C$</span>), and let <span class="math-container">$\mathcal L(X)$</span> be its algebra of bounded linear operators. Let <span class="math-container">$U\subset \mathbb C^N$</span> be an open subset, and <span class=...
In addition to the information given by user bathalf15320, I think that a bit more information on the Banach space case could be useful: Here is a very general theorem about vector valued functions: <strong>Theorem 1.</strong> Let <span class="math-container">$Y$</span> be a complex Banach space and let <span class="ma...
It has long been known that the result is true in the Banach space situation---even without local boundedness and under the condition of holomorphicity for the weak operator topology. In the more general context, you will have problems associated with non completeness of the operator space but it will be true with fai...
https://mathoverflow.net
11,724
[ "https://stats.stackexchange.com/questions/11724", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/333/" ]
I'm running a binary logistic regressions with 3 numerical variables. I'm suppressing the intercept in my models as the probability should be zero if all input variables are zero. What's minimal number of observations I should use?
There is one way to get at a solid starting point. Suppose there were no covariates, so that the only parameter in the model were the intercept. What is the sample size required to allow the estimate of the intercept to be precise enough so that the predicted probability is within 0.1 of the true probability with 95%...
There isn't really a minimum number of observations. Essentially the more observations you have the more the parameters of your model are constrained by the data, and the more confident the model becomes. How many observations you need depends on the nature of the problem and how confident you need to be in your mode...
https://stats.stackexchange.com
5,495
[ "https://mechanics.stackexchange.com/questions/5495", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2822/" ]
My 1993 Jeep Wrangler has about 200,000 miles, in good shape. It usually starts right up, but it's started intermittently flooding, so that I have to crank and crank with the accelerator all the way down before it roars to life. Sometimes on acceleration from a stop, or when changing gears (and applying light acceler...
Turns out it was the <strong>water pump</strong>. Jim at Watson Automotive in Thetford VT replaced it ($400) and it's not stalled or flooded since. In the question I left out one clue that Jim used &mdash; a belt was squeaking. He found that was from a leak of radiator fluid from the water pump. Jim theorizes t...
It doesn't sound like a fuel line problem ( though there's a small small chance it's a fuel pump ), it sounds like your engine isn't getting enough air on one end or the other. It might be a dirty air filter, or it might be a clogged cat or bad O2 sensor. Sometimes it's easy to tell if the cat is clogged, it will get e...
https://mechanics.stackexchange.com
462,889
[ "https://physics.stackexchange.com/questions/462889", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/208418/" ]
I am modeling a beam made of an orthotropic material. The beam's length is aligned with the x-direction, and the force is applied in the y-direction (it is a 4 point bend experiment that I am modeling), along the thickness of the beam. Intuition tells me that the elastic modulus in the y-direction would be the materia...
Since the material is orthotropic the modeling of the deflection may be complex. For an isotropic material (same properties in all directions) the elastic modulus, <span class="math-container">$E$</span>, is the same in all directions and is the material property that governs deflection according to <span class="math-...
You've asked several questions in the original question and subsequent comments, so I'll try to address the key points. <ol> <li><strong>For 4-point bending of a long beam aligned in the x direction and deflecting in the y direction, the most important elastic parameter, all else kept equal, is the Young's modulus in ...
https://physics.stackexchange.com
56,378
[ "https://electronics.stackexchange.com/questions/56378", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10345/" ]
I am designing simple logic analyzer with SN74LVC16T245DGGR bus transceiver which could be used for 1.2V to 5V logic levels I would like to control supply voltage of input port with DAC, currently TLV5624, but this DAC could deliver only 1mA current and I doubt that it's enough for transceiver so I put LM321 OPAMP but ...
Maybe you are looking for a <em>rail to rail</em> opamp. These are opamps like any other, but are designed to allow the outputs to get very close to the supply rails. I'd give you examples, but there are <em>thousands</em>. Whatever electronics distributor you prefer should have an entire category for them.
I have ended up with something like this with possibility to bypass internal logic supply.. Using LDO regulator from TI and digital pot: <img src="https://i.stack.imgur.com/YUJAY.png" alt="enter image description here">
https://electronics.stackexchange.com
87,509
[ "https://physics.stackexchange.com/questions/87509", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/28583/" ]
Why do orbital speeds decrease further away from the focus? A simple question, but I want to make sure I am understanding this correctly: Is it ONLY a function of the gravity well? As in, the gravitational field is weaker as you move away from the massive body, so the speed decreases? What if the gravitational field wa...
"Focus" is an inconvenient word if you're thinking of changing the potential, because if you do then the orbits are no longer conics and the word kind of loses its meaning. That aside, let me see if I understood your question correctly: <blockquote> Given a gravitational potential that's spherically symmetric around...
The velocity of an orbit around some central object can be easily calculated for a circular orbit. Let us assume that there is some central Force $F=c\cdot r^\alpha$, where $c$ and $\alpha$ are some constants (for gravity $c=Gm_1m_2$ and $\alpha=-2$). For a stable orbit, this central force must be equal to the necessa...
https://physics.stackexchange.com
24,331
[ "https://engineering.stackexchange.com/questions/24331", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/17994/" ]
I'm asking this question as an early computer science student who is beginning to get way more interested in really low level stuff/computer/electrical engineering. I am very unfamiliar with hardware, and even after watching numerous videos and reading numerous articles there is still something I can't seem to grasp. ...
Ultimately it is empirical. For absolution maximum traction rubber tyres tend to deliver maximum grip in a fairly narrow window in the transition between purely static friction and full sliding friction. This is very contextual and will depend on tyre construction and chemistry as well as tyre temperature and the n...
If you want to design a performance tire just for best traction, just before slippage and are not at the moment concerned with endurance, heat control, and many other factors, first you need to select quality material rubber which is soft and will leave a sacrificial black track under high acceleration when it heats up...
https://engineering.stackexchange.com
8,116
[ "https://chemistry.stackexchange.com/questions/8116", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/4157/" ]
Can two precipitates form in a precipitation reaction that starts with only two compounds in water?
The number of examples is considerably great. Consider the following: $$\ce{Ba(OH)2(aq) + MgSO4(aq) -&gt; BaSO4(s) + Mg(OH)2(s)} $$ Above reactants are reasonably soluble in water. From Wikipedia, $\ce{Ba(OH)2} $ has a solubility of 1.67 g / 100 mL at 20 °C and $\ce{MgSO4} $ a solubility of 25.5 g / 100 mL at 20 °C
Yes is the answer to your question provided that reactant two molecules are salts.Two salts can react with eact other and form two new stable salts depending on their $\mathrm{K}_{sp}$ values.
https://chemistry.stackexchange.com
2,660,284
[ "https://math.stackexchange.com/questions/2660284", "https://math.stackexchange.com", "https://math.stackexchange.com/users/441585/" ]
I'm trying to solve a problem on Prasanna Sahoo's book on Probability and Statistics. One problem assumes that $X$ is a random variable with probability density function $$f(x)=\frac{2c}{3^{x}}$$ for $x=1,2,3,...,\infty$ where $c$ is constant. According to the answer key, the value of $c$ is 1. Since $x$ is countable, ...
Your integral is $$-\int\limits_0^t 1.5\times \mu_{x+s}\,\mathrm ds = -1.5\int\limits_0^t \mu_{x+s}\,\mathrm ds.$$ Now since $\exp[u] = e^u$ for all constants $u$, then we have that $$\exp\,\left[-\int\limits_0^t 1.5\times \mu_{x+s}\,\mathrm ds\right] = \exp\,\left[-1.5\int\limits_0^t \mu_{x+s}\,\mathrm ds\right],\tag1...
$$\left (e^a\right )^b=e^{ab}$$
https://math.stackexchange.com
111,514
[ "https://mathoverflow.net/questions/111514", "https://mathoverflow.net", "https://mathoverflow.net/users/9317/" ]
Fix $0 &lt; \alpha &lt; 1$ a real. Let $S_\alpha$ the set of integers $n \geq 1$ such that be $\phi(n)&gt;\alpha n$. For $x&gt;0$, let $S_\alpha(x)$ be the number of positive integers $n$ less han $x$ such that $n \in S_\alpha$. <blockquote> Does $S_\alpha$ has a natural density (that is, does $\lim_{x \rightarrow ...
Yes -- look up the Erdos--Wintner theorem. (The special case you asked about was earlier proved by Schoenberg.) If we call the density $D(\alpha)$, then in fact $D$ is continuous and strictly decreasing on $[0,1]$, with $D(0)=1$ and $D(1)=0$.
Anonymous gave a perfect answer already. All I want to add to it is that you do not need to be Erdos or even Schoenberg to figure such things out. I'll just show how to establish the existence of density for $\alpha&gt;0$, leaving the rest to you. The starting point is that we know that for a pair of integers not exce...
https://mathoverflow.net
101,747
[ "https://softwareengineering.stackexchange.com/questions/101747", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/34488/" ]
As a young software engineer, I often hear other colleagues talk about the days of punch cards and "computers as big as the room." The earliest memories of computers that I have involve MS DOS and Windows 3.1. My question is, are there still any companies, academic centers, or government agencies that still use mainf...
NASA at the very least. The retired space shuttles ran the same computer programs and equipment from initial commission. If I remember correctly, they had about 32K of RAM. The reason they did this was that the software and hardware was known to be bug free, upgrading or changing equipment/software might have introduc...
The business of our company (a car rental company) is based on a mainframe, originally installed in 1972. There is no signs of it being replaced in the near future - it would cost an enormous sum of money and several years of effort. One of my previous employers (an airline company) also had a mainframe as the backbon...
https://softwareengineering.stackexchange.com
2,467
[ "https://scicomp.stackexchange.com/questions/2467", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/1480/" ]
Single precision floating point numbers take up half the memory and on modern machines (even on GPUs it seems) operations can be done with them at almost twice the speed compared to double precision. Many FDTD codes that I have found exclusively use single precision arithmetic and storage. Is there a rule of thumb of w...
For all non-trivial problems (i.e., for those where performance matters) almost all of the memory you have will be in the matrix, and relatively little in vectors. For example, for 3d Taylor-Hood elements for the Stokes equation, you have a few hundred elements per row in the matrix, and this vastly outweighs the amoun...
My advice would be to focus mainly on the memory consumption for the decision when to use single precision (float). So the bulk data for a FDTD computation should use float, but I would keep the problem description itself (like geometry, material parameters, excitation conditions) and all related meta data in double. ...
https://scicomp.stackexchange.com
437,858
[ "https://electronics.stackexchange.com/questions/437858", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/111841/" ]
I need to implement a mechanism by which I should be able to update the configuration data of some of the modules in a post-build fashion. To describe, consider I have the following files:<br> <code>Module.c</code>, <code>Module.h</code>, <code>Module_Cfg.c</code> and <code>Module_cfg.h</code>. All of these are bui...
To achieve "dynamic" linking in an statically linked embedded platform you need to do this yourself. What you can do is reserve some area of flash memory for this module.<br> The module may not have dependencies on anything else. Best thing to try is to compile it as library first. The mechanism you can use to do thi...
<blockquote> What is the best method to achieve this? </blockquote> I understand that you want to change only configuration parameters. In my opinion you can achieve this easily. All that you have to do is dedicate a memory segment(s) for storing those config parameters in flash. Ensure that code don't sit in tha...
https://electronics.stackexchange.com
62,749
[ "https://dba.stackexchange.com/questions/62749", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/33168/" ]
I am creating an automated build and test tool for our databases. In general there are two stages: - install databases in version A, install transactional replication - drop replication, update databases to version B, install replication The problem is that replication is dropped before previous stage finish to create...
Well, if you need a way to check if all the foreign keys in your table are valid, this might help ( it just validates all foreign keys in your schema ) <pre><code>do $$ declare r record; BEGIN FOR r IN ( SELECT FORMAT( 'ALTER TABLE %I VALIDATE CONSTRAINT %I;', tc.table_name, tc.constraint_name ) AS...
<strong>This will work on all constraints safely.</strong>, <pre><code>SELECT FORMAT( 'ALTER TABLE %I.%I.%I VALIDATE CONSTRAINT %I;', current_database(), nsp.nspname, cls.relname, con.conname ) FROM pg_constraint AS con JOIN pg_class AS cls ON con.conrelid = cls.oid...
https://dba.stackexchange.com
319,954
[ "https://stats.stackexchange.com/questions/319954", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/113777/" ]
What's the difference between Multivariate Gaussian and Mixture of Gaussians? If I have a Multivariate Gaussian and making all the data into ONE vector, is that a Mixture of Gaussians in 1 dimension? On the other hand, if I have a mixture of Gaussian (say two models and the mixing ratio is 0.3,0.7), Can I make it t...
We can write out a $k$ dimensional Multivariate Gaussian as $${\bf X}=(X_1,\cdots,X_k)\sim\textsf{MVN}(\mu,\Sigma),$$ where $\mu=(\mu_1,\cdots,\mu_k)$ is the mean vector, and $\Sigma$ is the positive definite $k\times k$ covariance matrix. We can write out a $k$ component mixture of (1 dimensional) Gaussians as $$X\...
I do not intend to be rigorous here. I just want to give you the intuition. You can go deeper on this subject by reading textbooks or googling it. If you have a random variable <span class="math-container">$X$</span>, you say that it follows a normal distribution with mean <span class="math-container">$\mu$</span> an...
https://stats.stackexchange.com
269,872
[ "https://softwareengineering.stackexchange.com/questions/269872", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/128967/" ]
What programming language introduced the word "field" to describe what we might call a member variable in C++? What modern programming languages carry on this usage as the preferred term? I've seen this word used in both a C and C++ context but it always feels a bit foreign. I don't have a copy of the C standard, but...
<em>Field</em> is used in Eiffel, Java, C#, and VB.NET. In Smalltalk and some of its descendants and languages inspired by it (e.g. Ruby), it is called <em>instance variable</em>, in Self and languages inspired by it (Newspeak, Io, Korz), it is called <em>slot</em>. Simula and Python call it <em>attribute</em> (which m...
The concept / use of field, a logical part of any data, has been with us since at least punched cards/tape. These fields were typically fixed length. All of the first languages probably used the term since they were processing punched cards / tape. I say 'probably' because I used 'All' and did not program using them...
https://softwareengineering.stackexchange.com
1,387,788
[ "https://math.stackexchange.com/questions/1387788", "https://math.stackexchange.com", "https://math.stackexchange.com/users/232156/" ]
How does $ 1 + x + x^2 + x^3 + x^4 = \frac {1-x^5}{1-x} $ ?
If you know that $\dfrac{1}{1-x} = 1 + x + x^2 + \ldots$, then you can use this fact after breaking up the fraction: $$ \begin{align} \frac{1-x^5}{1-x} &amp;= \frac{1}{1-x} - \frac{x^5}{1-x} \\ &amp;= \frac{1}{1-x} - x^5\frac{1}{1-x} \\ &amp;= (1 + x + x^2 + \ldots) - x^5(1 + x + x^2 + \ldots) \\ &amp; = 1 + x + x^2 +...
$(1 + x + x^2 + x^3 + x^4)(1-x)=(1 + x + x^2 + x^3 + x^4) - (x + x^2 + x^3 + x^4+x^5) = 1-x^5$
https://math.stackexchange.com
40,303
[ "https://cs.stackexchange.com/questions/40303", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/15627/" ]
I know that device drivers are attached to device controllers, which have their own registers and some local buffer storage. I'm wondering if I can think of device drivers as little state machines -- i.e. do they read and write to memory, or not?
Many device drivers do read/write to memory. For instance, consider a network device; it reads the packets to be sent from memory and writes the packets it receives to memory. Or think of a hard disk driver; it does something analogous. So, ultimately, it will depend on the driver. That said, device drivers often ...
In software engineering, the "state machine" is more of a design tool than anything else. But yes, many device drivers are designed as state machines. This is because many hardware devices, or the protocols by which you speak to them, have distinct states. Take the SCSI command protocol as an example. You can do SCSI ...
https://cs.stackexchange.com
625,787
[ "https://electronics.stackexchange.com/questions/625787", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/16307/" ]
I am using a shield on top of a board with headers. One of the headers of the shield needs 5V but it also makes a connection to a 3.3V GPIO pin. I am ok if that input is damaged since I am not going use it. Would applying 5V on 3.3V pin have an impact on the operation of a microcontroller? I am using an STM32F302R8 ...
The answer is twofold. You don't say what shield it is, but it is possible that the shield uses 5V supply, and has onboard 3.3V regulation, so it might use 3.3V IO. You need to check if the shield IO is 5V or 3.3V. You also don't say which specfic IO pin you are going to use on STM32F302R8. It has pins that are 5V tole...
Yes, applying 5V to an input pin rated at 3.3V can damage the device in unpredictable ways. It may not be just one pin that is damaged. Such a connection may also cause the 5V signal to be unable to reach a valid logic '1' level. Just don't do it.
https://electronics.stackexchange.com
35,592
[ "https://dba.stackexchange.com/questions/35592", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6497/" ]
I am using synchronous database mirroring with a witness and am testing the various failure scenarios and the impact on the mirroring session, such as whether failover occurs. Starting with the principal, mirror and witness all being connected I break the link between the principal and witness (using some hackery with...
The problem is that the principal became disconnected from the witness server before it went offline. In this case, the witness cannot agree that the principal is offline because it was disconnected while the principal was still connected. As far as the witness knows, the principal may still be up. In this scenario, i...
The concept of quorum means that at least a majority of the nodes need to agree on the state of "Healthy" for the group to be considered healthy. In your first example, the Witness can't talk to the Primary so it's vote is "Unhealthy". But the Primary and the Mirror both agree on "Healthy". That's 2/3 members agreeing...
https://dba.stackexchange.com
619,141
[ "https://physics.stackexchange.com/questions/619141", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/139/" ]
It is already some time ago that I was fluent in classical mechanics.<br /> I do not understand a certain detail in the formula <span class="math-container">$F_{grav.}=F_{centr.}$</span>.<br /> Probably I overlook something simple. Suppose mass <span class="math-container">$m$</span> circles around mass <span class="ma...
In continuation of the answer of Claudio Saspinksi: Choosing M as the inertial frame of reference gives <span class="math-container">$$\frac{GMm}{r^2} = m\omega^2 r \cdot \frac{M}{M+m}= m\omega^2 r \cdot (1 - \frac{m}{M+m})$$</span> where <span class="math-container">$ - \frac{m^2\omega^2 r}{M+m}$</span> is a (pseudo)...
Neither formula is exact (assuming that Newtonian gravity is the only force affecting the two masses): a reference frame in which <span class="math-container">$m$</span> moves circularly while <span class="math-container">$M$</span> is stationary is not inertial, since in an inertial frame <span class="math-container">...
https://physics.stackexchange.com
32,523
[ "https://electronics.stackexchange.com/questions/32523", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9937/" ]
I first want to say that this project is for a charity auction that happens a couple times a year and we would like to remove all paper from this process since the paper requires 7 people to handle and deal with and is way to frantic! There are around 100 electronic displays we need to make for our next auction. We wa...
Since it is an auction, I assume the displays will stay in one place more or less. Try to get rid of the wireless chip, use plain wires for communication (I2C or SPI) instead. You may even do the power distribution over the wires to get rid of the batteries. Some tricks with decoration let you hide the wires easily if ...
How about flash cards? or a big Calculator with BIG LCD numbers for the silent auction types. Hey that's wireless too. Type in the price and hold it up.. As along as you specify size, or distance of viewing. It can be obtained. $2 / 1000 pcs for A size. calc. Specs please for viewing distance? <img src="https://i.sta...
https://electronics.stackexchange.com
26,702
[ "https://stats.stackexchange.com/questions/26702", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/10721/" ]
I have a couple of questions for prediction and tolerance intervals. Let's agree on the definition of the tolerance intervals first: We are given a confidence level, say 90%, the percentage of the population to capture, say 99%, and a sample size, say 20. The probability distribution is known, say normal for convenien...
Your definitions appear to be correct. <strong>The</strong> book to consult about these matters is <em>Statistical Intervals</em> (Gerald Hahn &amp; William Meeker), 1991. I quote: <blockquote> A prediction interval for a single future observation is an interval that will, with a specified degree of confidence, con...
As I understand things, for normal tolerance limits, the value of $K(\alpha,p)$ comes from a non central t percentile. Clearly, to W Huber's point, there are some statisticians who are unfamiliar with the idea of tolerance limits versus prediction limits; the idea of tolerance seems to arise mostly in engineering desi...
https://stats.stackexchange.com
59,105
[ "https://dsp.stackexchange.com/questions/59105", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/40934/" ]
what i know is that for a system to be invertibel it should be one-one , but I am confused that if i am given a transfer function of a LTI system how can I prove or verify if it is invertible. Another query is that can a system has more than one inverse systems , sometime before I used to think that inverse pairs are ...
In general LTI System is invertible if it has neither zeros nor poles in the Fourier Domain (Its spectrum). The way to prove it is to calculate the Fourier Transform of its Impulse Response. The intuition is simple, if it has no zeros in the frequency domain one could calculate its inverse (Element wise inverse) in th...
You have to be clear what you mean by "invertible". Commonly, you want the inverse system to be causal and stable, and that puts certain restrictions on the original system. In the case of systems with rational transfer functions, you just have to look at the zeros of the transfer function, because they become the pol...
https://dsp.stackexchange.com
165,040
[ "https://physics.stackexchange.com/questions/165040", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/73154/" ]
I don't understand whether work is needed to bring a test charge from a higher potential to a lower potential. It seems that no work is needed because the positive test charge will be under the attractive electric forces and the loss of EPE is converted to the gain in KE. On the other hand it also seems that work is ne...
Let me assume for simplicity that we have some big charge(s), and we bring a positive test charge. So, there is a field between the big charge(s) and the test charge. The field encapsulates energy. (For simplicity I will also assume that the big charges are placed on massive bodies.) Now, for out test-charge there are...
If you move an object, then work $W$ is done when ever you use a force $F$ to move something over a distance $d$. $$W=F \cdot d$$ The electric field that defines the potential difference is a force (per charge) that pulls (or pushes) in the test charge you put in. A force is moving the charge, so work <em>is</em> don...
https://physics.stackexchange.com
61,733
[ "https://stats.stackexchange.com/questions/61733", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26887/" ]
I want to perform a very simple linear regression in <code>R</code>. The formula is as simple as $y = ax + b$. However I would like the slope ($a$) to be inside an interval, let's say, between 1.4 and 1.6. How can this be done?
<blockquote> I want to perform ... linear regression in R. ... I would like the slope to be inside an interval, let's say, between 1.4 and 1.6. How can this be done? </blockquote> (i) Simple way: <ul> <li>fit the regression. If it's in the bounds, you're done. </li> <li>If it's not in the bounds, set the slope to t...
Glen_b's second method, using least squares with a box constraint can be more easily implemented via ridge regression. The solution to ridge regression can be viewed as the Lagrangian for a regression with a bound on the magnitude of the norm of the weight vector (and hence its slope). So following whuber's suggestio...
https://stats.stackexchange.com
630,651
[ "https://physics.stackexchange.com/questions/630651", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/44514/" ]
Although impossible as far as we know, if we were to somehow shoot even an atom out the back of a rocket at the speed of light, would that propel the rocket forward at the speed of light? If I understand Relativity correctly, my thought is that would require an infinite amount of energy. Infinite action on the atom w...
You need to account for energy. Accelerating atom to the speed of light means infinite energy. Spaceship just collapsed into a black hole. Accelerating atom to a large percent of the speed of light means energy came from somewhere. Lets assume energy was stored in the same atom. Then as you increase the speed, you need...
The atom will not travel at the speed of light. Period. IF it travels at the speed of light, the laws of physics have been violated, in which case, why would you expect other laws to hold? So no, it cannot.
https://physics.stackexchange.com
33,454
[ "https://cs.stackexchange.com/questions/33454", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/24070/" ]
I'm having trouble understanding the definition of Turing Decidable. The definition goes something like this: <blockquote> TM M decides language L iff the strings in L put M into the Accept state and the strings NOT IN L put M into the Reject state </blockquote> My problem is.. the strings "NOT IN L"? How can the...
(I'll convert the comment into an answer) First, definitions: $L$ is a language, that is, a set of words where each word has a finite length. If all the words that ever exist are denoted as $\Sigma^*$ then any language is $L\subseteq \Sigma^*$. Words that are not in $L$ are in a different subset we denote $\overline ...
You are right that $M$ makes a decision about every string, but this does not put them in $L$. Your second definition would lead to every (decidable) language being the same (any decider <em>always</em> ends up in a Reject or Accept state, so by the second definition every decider would decide every language). To draw...
https://cs.stackexchange.com
312,692
[ "https://physics.stackexchange.com/questions/312692", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/145749/" ]
My basic problem is this: <blockquote> In a frictionless environment, I have an object traveling at a known speed that has a known maximum deceleration rate and a known distance to move before it must stop. I want to calculate how much acceleration I can apply prior to "hitting the brakes" over the time period of 1...
How about virtual particles in the Breit-frame (the frame in which no energy is transferred)? For example, consider a head on collision between 2 electrons with 4-momenta: $p^1_{\mu} = (E, {\bf \vec{p}})$ and $p^2_{\mu} = (E, {\bf -\vec{p}})$ (with, of course, $E^2 = p^2 + m^2$). So they backscatter 180 degrees i...
In special relativity, energy and momentum of a particle form the energy-momentum 4-vector, to which certain constraints apply: Massive particles come with a rest frame where their momentum is zero and their energy corresponds to their mass. Massless particles have nonzero energy and momentum in all frames, equal in ...
https://physics.stackexchange.com
1,546,870
[ "https://math.stackexchange.com/questions/1546870", "https://math.stackexchange.com", "https://math.stackexchange.com/users/45783/" ]
Let $(X_n : n \in \mathbb{N}_0)$ be a Markov chain on finite state space $S = (1,2,3,4,5)$ with the transition probability matrix $P = (p_{ij})_{i,j \in S} $ satisfying $$\sum_{i \in S}p_{ij} = 1$$ for $j \in S$ Show that $\pi = (1/5, ..., 1/5)$ is a stationary distribution of $(X_n : n \in \mathbb{N}_0)$ I know ...
<strong>HINT:</strong> The stationary distribution $\pi$ satisfies the relationship $\pi P=\pi$, which is equivalent to showing $\forall j\in S $: $$\pi_j = \sum_{i \in S}\pi_i p_{ij}$$ You can also write out $\pi$ explicitly as a row vector where every entry is $\frac{1}{5}$, and $P$ is a matrix with entries $p_{...
In general, a measure $\nu:2^S\to [0,\infty)^S$ is said to be invariant under the stochastic kernel $P$ which specifies the transition probabilities of $X$, i.e. $P_{ij} = \mathbb P(X_{n+1}=j\mid X_n=i)$ for $i,j\in S$ if $$\nu = \nu P. $$ Now, since in this case we are also assuming $$\sum_{i\in S}P_{ij} = 1, \ j\in S...
https://math.stackexchange.com
604,761
[ "https://physics.stackexchange.com/questions/604761", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/284432/" ]
I'm reading <em>Applied Dimensional Analysis and Modeling</em> by Thomas Szirtes and struggle with the transformation of dimensions. In particular, given <span class="math-container">$1\,\textrm{m} = x\,\textrm{cm}$</span>, its easy to see that <span class="math-container">$x=100$</span>. Yet, when I attempt manipulate...
It's a fact that in reality momentum is conserved in all directions even during an inelastic collision, if you could track and measure the momentum of every particle and object involved. However, these sorts of textbook problems frequently have some conventional assumptions that, IMO, aren't well stated and are mislead...
There are different possible scenarios here that can give slightly different results. Both the horizontal and vertical momentum is conserved in all scenarios One is that the pendulum is hanging with a rigid material, connected to a pivot in the ceiling. In that case the horizontal momentum will be transferred to the pe...
https://physics.stackexchange.com
430,770
[ "https://softwareengineering.stackexchange.com/questions/430770", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/136084/" ]
I happen to have a reason why I might want to dereference a nullptr. Of course when I do, my program crashes, <strong>and from what I gather,</strong> this is due to the compiler playing it safe and stopping my program, rather than risking the program <em>acting</em> upon the dereferenced <code>nullptr</code>, which is...
It is not the compiler that causes your program to crash on dereferencing a null pointer. The problem is that the pointer is pointing to memory that it is illegal to reference, and the operating system kills your program for invalid behavior. Trying to trick the compiler by obfuscating that it is a null pointer won't...
<ol> <li>No, it’s your operating system (usually). Some (debug) compilers will insert guards for you, but it’s still the generated code not the compiler directly breaking.</li> <li>Yes, undefined behavior means the compiler is free to do <em><strong>whatever</strong></em> it wants. Hypothetically, your compiler <em><st...
https://softwareengineering.stackexchange.com
115,372
[ "https://chemistry.stackexchange.com/questions/115372", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/78955/" ]
Question: <span class="math-container">$\ce{H2S}$</span> (<span class="math-container">$\pu{0.1M}$</span>; <span class="math-container">$K_\mathrm{a} = 1.2×10^{-20} $</span>) and <span class="math-container">$\ce{HCl}$</span> (<span class="math-container">$\pu{0.3M}$</span>) with same volume are mixed together. What is...
<blockquote> <strong>Question:</strong> <span class="math-container">$\ce{H2S}$</span> (<span class="math-container">$\pu{0.1M}$</span>; <span class="math-container">$K_\mathrm{a} = 1.2×10^{-20} $</span>) and <span class="math-container">$\ce{HCl}$</span> (<span class="math-container">$\pu{0.3M}$</span>) with same vo...
Paraphrasing from the excellent comments (even if the commenters might have been exasperated): The pH of a mixture of <span class="math-container">$\ce{H2S}$</span> solution with <span class="math-container">$\ce{HCl}$</span> solution is about the same as the corresponding mixture of water with <span class="math-conta...
https://chemistry.stackexchange.com
201,175
[ "https://softwareengineering.stackexchange.com/questions/201175", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/44862/" ]
Let's say I have a boolean condition <code>a AND b OR c AND d</code> and I'm using a language where <code>AND</code> has a higher order of operation precedence than <code>OR</code>. I could write this line of code: <pre><code>If (a AND b) OR (c AND d) Then ... </code></pre> But really, that's equivalent to: <pre><code>...
Good developers strive to write code that is <em>clear</em> and <em>correct</em>. Parentheses in conditionals, even if they are not strictly required, help with both. As for <strong>clarity</strong>, think of parentheses like comments in code: they aren't strictly necessary, and in theory a competent developer should...
It matters less whether <strong>you</strong> are confident in your grasp of the language. What matters more is the grasp of the language of the n00b that follows you. Write your code in the clearest most unambiguous way possible. Extra parenthesis often (but not always) help. Putting only one statement on a line of...
https://softwareengineering.stackexchange.com
83,925
[ "https://physics.stackexchange.com/questions/83925", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/23094/" ]
I don't understand the derivation of the wave equation given below - $$T \sin (\theta _1) - T \sin (\theta ) = T\tan (\theta _1 )-T\tan (\theta ) = T \left. \left(\frac{\partial f}{\partial z} \right|_{z + \Delta z} - \left. \frac{\partial f}{\partial z}\right| _z \right) = T \frac{\partial ^2 f}{\partial z^2} \Delta ...
As we can see from the previous answers, we have the following approximations: $tan(\theta) = \frac{opposite}{adjacent} = \frac {rise}{run} = gradient = \frac {∂y}{∂x}$ and we can say, still through approximation: slope(z+∆z)=slope(z)+slope_variation_tax*∆z, which mathematically means: $$\frac{\partial f(z+∆z)}{\pa...
I just realized that the reason we're using $\tan \theta = \partial _z f$ is because $\tan \theta = \frac{df}{dz}$, which makes sense if we consider this a right triangle.
https://physics.stackexchange.com
530,487
[ "https://stats.stackexchange.com/questions/530487", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/284610/" ]
Consider <span class="math-container">$x_{1}, x_{2},\ldots, x_{n} \in \mathbb{R}$</span> and independent random variables <span class="math-container">$y_{1}, y_{2},\ldots, y_{n}$</span> <br>where <span class="math-container">$ y_i = \theta_{0} + \theta_{1}x_i^2 + \theta_{2}\exp{(x_i)} + \varepsilon_i $</span> <br> and...
We have <span class="math-container">$$y_i - \theta_0 - \theta_1x_i^2 - \theta_2 \exp(x_i)=\epsilon_i \sim N(0, \sigma^2)$$</span> By independence, the joint probability density is <span class="math-container">$$f(\epsilon_1, \ldots, \epsilon_n; \sigma)=\prod_{i=1}^n \frac1{\sigma \sqrt{2\pi}}\exp\left(-\frac{\epsilon_...
Since the error terms are IID normal random variables, you have the likelihood: <span class="math-container">$$\begin{align} L_\boldsymbol{\varepsilon}(\sigma) &amp;= \prod_{i=1}^n \text{N}(\varepsilon_i| 0, \sigma^2) \\[6pt] &amp;= \prod_{i=1}^n (2 \pi \sigma^2)^{-1/2} \cdot \exp \Bigg( - \frac{1}{2 \sigma^2} \cdot \v...
https://stats.stackexchange.com
61,981
[ "https://dba.stackexchange.com/questions/61981", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/10736/" ]
I'm currently using date format: <pre><code>alter session set nls_date_format = 'DD.MM.YYYY HH24:MI'; </code></pre> The (cosmetic) problem is that this always displays time even if it's zero, for example: "27.03.2014 00:00". Is it possible to hide 00:00 with NLS_DATE_FORMAT, but display the time when it's not zero? ...
No, it can not be done, because 00:00 is a valid time. That you use it to represent "no time available" in your application is your own decision and you have to take care of the consequences yourself. You could store date and time in separate columns and show only the date if the time is NULL.
I am fairly sure this can't be done. You have to explicitly change the date format if you want it to change conditionally. There is no date format that does what you want out of the box.
https://dba.stackexchange.com
40,145
[ "https://mechanics.stackexchange.com/questions/40145", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/24679/" ]
I have a Honda CB Shine 125cc bike. When I purchased it, it was giving me mileage of 50 km/L, but now it is reduced to 40 to 45 km/L. How can I increase the mileage of my bike and increase it up to 55 km/L and above? And what precautions needed for this.
Here are some generic tips for increasing mileage: <ul> <li><strong>clean filters:</strong> air and fuel filters become restrictive when they get dirty. Clean them or replace them, depending on your engine's design.</li> <li><strong>clean fluids:</strong> a happy engine is an efficient engine. Frequent oil changes hel...
Anticipate the road more. There is no point rushing up to a light that is red, or is likely to go red real soon. Idling stopped is 0 km/l so avoid idling in traffic... pick times of the day where the traffic is not going to be stopped. (assuming your location disallows lane splitting) Contentious one, avoid engine ...
https://mechanics.stackexchange.com
318,855
[ "https://mathoverflow.net/questions/318855", "https://mathoverflow.net", "https://mathoverflow.net/users/133579/" ]
Consider a two-form <span class="math-container">$\gamma \in \Lambda^2(V)$</span> where <span class="math-container">$V$</span> is a real vector space. Now I would like to know the necessary and sufficient conditions for <span class="math-container">$\gamma$</span> to be expressible as an exterior product of two one-fo...
While Plücker relations give the general theory, a direct answer to your question is the following: a 2-form <span class="math-container">$\gamma$</span> is decomposable (is a product of two 1-forms) iff <span class="math-container">$(\iota_v \gamma) \wedge \gamma = 0$</span> for any vector <span class="math-container"...
Let <span class="math-container">$e_1$</span>, ..., <span class="math-container">$e_n$</span> be a basis of <span class="math-container">$V$</span>. Let <span class="math-container">$\gamma = \sum c_{ij} e_i \otimes e_j$</span>, so <span class="math-container">$C = (c_{ij})$</span> is a skew symmetric matrix. Then <spa...
https://mathoverflow.net
342,978
[ "https://electronics.stackexchange.com/questions/342978", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94641/" ]
I want to design a switch which commutes a single contact between 2 pins. I have drawn a schematic with 2 pins. IRL, the switch has 3 pads, one is unconnected. I can't associate the physical design to the logical one because they don't have the same number of pads/pins. How can I do this? Thanks.
There is a sortof standard for a certain class of professional audio gear. This standard is 600 &Omega;. All "line level" audio in such a setup is expected to drive 600 &Omega;. This is also the impedance of the microphones. However, many many amps don't follow this. In fact, most amps try to be "high", which mean...
Generally the input impedance to an audio amplifier is 'high'. That is, high enough to be driven comfortably by any audio source output. But of course, without a proper specification, you are taking something of a gamble. 10k to 100k is the usual sort of range we find, though some can be less. Even something as low as...
https://electronics.stackexchange.com
873,219
[ "https://math.stackexchange.com/questions/873219", "https://math.stackexchange.com", "https://math.stackexchange.com/users/86120/" ]
This problem is making my head spin: The costs of equities of symbol A and symbol B (in dollars) are two different positive integers. If $4$ equities of symbol A and $5$ equities of symbol B together costs $27$ dollars, what is the total cost of $2$ equities of symbol A and $3$ equities of symbol B in dollars? Select...
Let $2a+3b=x$. Then we have the system $4a+5b=27,2a+3b=x$. Then note that $27=4a+5b=2(2a+3b)-b=2x-b\implies b=2x-27$. So the solutions are $a=-\frac{5}{2}x+\frac{81}{2},b=2x-27$. Considering $a,b&gt;0$, we have $0&lt;-\frac{5}{2}x+\frac{81}{2}\implies x&lt;\frac{81}{5}=16.2$ and $0&lt;2x-27 \implies x&gt;27/2=13.5$...
<code>4a + 5b = 27</code> can only have <code>a = 3</code> and <code>b = 3</code> as its solution, as we know that these are positive integers. There is <strong>no</strong> other possibility (to satisfy 'two different positive integers' requirement). <hr> Do you have the source of this question? If from book, you may...
https://math.stackexchange.com
87,380
[ "https://cs.stackexchange.com/questions/87380", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/60008/" ]
Basically, you have $n$ integers. The data structure is for your choice, it is ok to do polynomial time preprocessing on them. Then you have multiple questions "Is an integer $k$ in the set?" My question is about the best way we know in terms of time/space to answer this query. Ultimately, the time should be guarantee...
As David points out in a comment, you are asking for an impossible thing because the lexiocgraphic order does not have infinite descending chains, and so you will run out of names if you keep adding points on the far left side. So forget the lexicographic order. (You may keep it if you have an upfront upper bound on th...
No way. Let's say you have n possible names. I insert the first point into the list, and you name it. However you name it, either there are only $n/2$ possible names larger or only $n/2$ possible names smaller than the name you chose. I insert the second point so that it is in the range with fewer names. You name i...
https://cs.stackexchange.com
24,778
[ "https://physics.stackexchange.com/questions/24778", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/9003/" ]
As you will see I know nothing about physics and after being asked to solve a physics problem in a recent interview wanted to ask it of professionals and see what the response would be: I have a set of domestic scales (actually just one scale) that weigh up to the maximum weight of 5kg and a large package that weighs...
You put the package horizontally across three scales and add up the weight you see. If the center scale registers more than the limit, move the box, or put some pieces of paper under the scales which are registering a small weight to redistribute the weight. A more physics-y question would be how to determine the weig...
Find a plank of wood, or something similar and put it on the scales as shown below: <img src="https://i.stack.imgur.com/I78yn.gif" alt="Weigh parcel"> The right end of the plank is on the scales and the left end is balanced on some convenient support. Now zero the scales, and put your parcel as closely as possible to...
https://physics.stackexchange.com
488,009
[ "https://physics.stackexchange.com/questions/488009", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/235342/" ]
<img src="https://i.stack.imgur.com/OYNel.jpg" alt="enter image description here"> Why do we use a cylinder as a Gaussian surface for infinitely long charged wire and not some other shape like cube?
Gauss' theorem would apply to a cube or other shape. You can write <span class="math-container">$$ \int {\bf E} \cdot d{\bf S} = \frac{Q}{\epsilon_0} $$</span> where the surface has any shape you like. However, the next step is to do the integral. How can we evaluate <span class="math-container">${\bf E} \cdot d{\bf S}...
As a matter of fact you can choose any arbitrary shape to be your gaussian surface, as long as the charges are inside it. But just because we can, should we? Gauss Law can be thought of geometric approach to coulombs law. We use the geometric symmetries of the charge distribution to make our problem simpler. Remember,...
https://physics.stackexchange.com
423,669
[ "https://softwareengineering.stackexchange.com/questions/423669", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/387566/" ]
I'm kinda new in versioning. In my scenario, for example, our main project is currently developing in 2.1.0 (develop branch), while the library version remain same as 1.5.0 since nothing change (for both 2.1.0 and 2.0.0 release). So, few questions <ol> <li>If later on, we introduce some backward compatible fix in the l...
When developing a system consisting of a main program and libraries, we have to distinguish between the version numbers of the parts as well as the version number of the system as a whole: <pre><code> [Main: V2.1.0] -&gt; [Library: V1.5.0] [------ System: Version 3000 ----] </code></pre> However, it is not uncommon...
My advice would be, &quot;Don't mix branching and versioning&quot; Code gets a version when you release it. With compiled code its easy to see the demarcation between code and a release, but with interpreted code where you are just copying to a directory people tend to give their code a version and this is where it get...
https://softwareengineering.stackexchange.com
80,923
[ "https://math.stackexchange.com/questions/80923", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5875/" ]
I have more than two vectors (these are 2D vectors) and I want to calculate the mean vector. What is the correct way to do it? All my vectors share their origins at (0,0).
The mean of a set of vectors is calculated component-wise. In other words, for 2D vectors simply find the mean of the first coordinates and the mean of the second coordinates, and those will be the coordinates of the mean vector.
Not sure about this. Let's say we have 3 equally-spaced vectors all of equal length V. They are at 10 deg, 40 deg, 70 deg to the x-axis. Sum the x components and then the y components, then divide each by 3. Then find the resultant. Resultant magnitude is 0.91V, resultant direction is 40 deg. Intuitively, the resu...
https://math.stackexchange.com
78,795
[ "https://softwareengineering.stackexchange.com/questions/78795", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/20022/" ]
I use ISO 8601 to represent dates &amp; durations and all is OK. But now I need to represent relative dates and durations like: <ul> <li>The date for first day, at midnight, of the next week </li> <li>All the last month period.</li> </ul> In fact I need to have a syntax for it, I prefer a standard one. I don't need...
Not a standard, but a convention used by FogBugz and Jira (both bugtrackers) is to enter durations in simple terms like 2d for 2 days, 3w for 3 weeks, 1m for 1 month, etc. The convention could be extended for dates and periods relative to some other date (usually the current date I presume). <ul> <li>today + 2 days: ...
If I understand what you mean correctly, you wish to have a way to say DateTime.NextSunday? If that's the case, as far as I know there isn't a standard you can use for that. The two examples you gave above are specific examples of a date you need. You would still express the date time using the ISO standard, you just ...
https://softwareengineering.stackexchange.com
564,628
[ "https://electronics.stackexchange.com/questions/564628", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/226963/" ]
Why are squirrel cage rotors used in induction motors, as opposed to just a solid conductive cylindrical shell? As far as I understand, a solid cylindrical shell (with solid metal endcaps) should work just as well. There is nothing in the operating principle of the induction machine which strictly requires the bar cons...
<blockquote> As far as I understand, a solid cylindrical shell (with solid metal endcaps) should work just as well. </blockquote> It will work, but not as well. A copper shell would not have the permeability to get a good field through it. An iron shell would not have the conductivity to allow high currents with low lo...
All-aluminum rotors have been widely used in one unique type of motor. That is the rotating-disc, watt-hour meter. In that case, the rotor only drives the clockwork mechanism that mechanically records the energy use. The rotation is also retarded by a permanent-magnet, eddy-current brake. The first linear induction mot...
https://electronics.stackexchange.com
335,849
[ "https://physics.stackexchange.com/questions/335849", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
Can someone explain in PHY101 terms: Q1. Does a spacecraft accelerating in space continue accelerating even after a burst of thrust or does it slow down? Maybe a more generic question is, "why Newtons equations explain why higher derivatives (of motion) are not maintained in space?" I know almost nothing about Physi...
Forces sum -- $\sum{F}=ma$. If your only force is a thrust, and the thrust ceases, you will stop accelerating the instant the thrust ceases, but you will <em>not</em> slow down. Slowing down requires a negative acceleration, rather than zero acceleration. In an inertial frame this process is simple. In a non-inerti...
Thrust exerts a force on the spacecraft, so, for any non-zero thrust, the spacecraft has a non zero acceleration (related to the thrust by Newton's Laws.) When the thrust is zero, the acceleration is zero, so the spacecraft continues moving with whatever velocity it has.
https://physics.stackexchange.com
356,034
[ "https://physics.stackexchange.com/questions/356034", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/75467/" ]
I'm really confused about Lorentz transformations at the moment. In most books on QFT, Special Relativity or Electrodynamics, people talk about Lorentz transformations as some kind of special coordinate transformation that leaves the metric invariant and then they define what they call the Lorentz scalars. But from my ...
A general diffeomorhpism is not an isometry. Or rather, it can be made into an isometry. Consider smooth manifolds $M$ and $N$, with metrics $g$ and $h$. Let $\phi:M\rightarrow N$ be a diffeo. We say that $\phi$ is an isometry if $g=\phi^*h$. But now, let's forget about $h$. We define it instead as $$ h=(\phi^{-1})^*g...
You are, I guess, discussing special relativity. In that case, the most natural geometrisation is to postulate that spacetime $\mathcal{S}$ is an real affine space of dimension 4 with a quadratic form of signature $(+,-,-,-)$. Everything follows, among which the two fundamental aspects to study: <ul> <li>the group $\m...
https://physics.stackexchange.com
532,038
[ "https://physics.stackexchange.com/questions/532038", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/243741/" ]
Suppose we had the following: <span class="math-container">$$\langle \psi|\hat A|\psi\rangle$$</span> but <span class="math-container">$\psi$</span> can be broken into factors <span class="math-container">$\psi_1 \psi_2$</span> so <span class="math-container">$$\langle \psi_1 \psi_2|\hat A|\psi_1 \psi_2\rangle$$</sp...
This is a good example of misuse of Dirac's <em>bra</em> and <em>ket</em> notation. Kets are not intended to be a fancy notation for wavefunctions. They should represent states in a more abstract way than using position dependent wavefunctions. According to your clarification comment, you intend <span class="math-cont...
If A is a one particle operator, such as kinetic energy or, effectively, the nuclear potential , then this reduces to <span class="math-container">$$\langle \psi_1 \psi_2|\hat A|\psi_1 \psi_2\rangle = \langle \psi_1 |\hat A|\psi_1 \rangle + \langle \psi_2|\hat A| \psi_2\rangle$$</span> If A is a two particle operato...
https://physics.stackexchange.com
3,882,097
[ "https://math.stackexchange.com/questions/3882097", "https://math.stackexchange.com", "https://math.stackexchange.com/users/87430/" ]
<blockquote> Box <span class="math-container">$1$</span> contains three cards bearing numbers <span class="math-container">$1, 2, 3$</span> ; box <span class="math-container">$2$</span> contains five cards bearing numbers <span class="math-container">$1, 2, 3, 4, 5$</span> ; and box <span class="math-container">$3$</sp...
As others have commented, <span class="math-container">$(3,2,1)$</span> is missing. Instead of listing the choices, observe that <span class="math-container">$x_1,x_2,x_3$</span> are in AP iff <span class="math-container">$x_1+x_3=2x_2$</span>. This implies either both <span class="math-container">$x_1,x_3$</span> are ...
<span class="math-container">$({3,2,1})$</span> is easy to miss :)
https://math.stackexchange.com
173,691
[ "https://electronics.stackexchange.com/questions/173691", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/39662/" ]
Can you explain me <strong>why</strong> and <strong>where</strong> I should put AC-coupling capacitors (usually around 0.1uF) on high-speed (1...5 GHz) differential serial interfaces (like SerDes for Gigabit Ethernet SFP modules)? From what I have read, the caps should be placed as close to receiver pins as possible. ...
The coupling capacitors are usually placed close to the transmitter source. Going along with Dr. Johnson, we need to figure out the distance. The propagation velocity of signals on most FR4 types of board is about c/2. This equates to around 170ps per inch for internal layers and more like 160 ps per inch for external...
Why would you add AC coupling capacitors to your high-speed signals? They add impedance discontinuities which can only hurt the signal integrity(?). The REASON that AC coupling is used in high-speed signaling (USB3/PCIe/DisplayPort/...) is so that the IC manufacturers can have different power supplies that better fit...
https://electronics.stackexchange.com
32,685
[ "https://physics.stackexchange.com/questions/32685", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7786/" ]
Spacetime of special relativity is frequently illustrated with its spatial part reduced to one or two spatial dimension (with light sector or cone, respectively). Taken literally, is it possible for $2+1$ or $1+1$ (flat) spacetime dimensions to accommodate Maxwell's equations and their particular solution - electromagn...
No, because the polarization of the electromagnetic field must be perpendicular to the direction of motion of the light, and there aren't enough directions to enforce this condition. So in 1d, a gauge theory becomes nonpropagating, there are no photons, you just get a long range Coulomb force that is constant with dist...
According to our best understanding of how Maxwell's equations would generalize to other dimensions, then yes, it is. The electromagnetic field is represented by an antisymmetric tensor, $$F^{\mu\nu} = \begin{pmatrix}0 &amp; -E_x &amp; -E_y &amp; -E_z \\ E_x &amp; 0 &amp; -B_z &amp; B_y \\ E_y &amp; B_z &amp; 0 &amp; ...
https://physics.stackexchange.com
630,175
[ "https://physics.stackexchange.com/questions/630175", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/291680/" ]
I need help with an integration problem. We have <span class="math-container">$F_d = \frac{1}{2} \rho c_d Av^2$</span> and <span class="math-container">$$W = \int F_d\cdot dx = \frac{1}{2}\rho c_dA\int v^2\cdot dx = \frac{1}{2}\rho c_dA\int(\frac{dx}{dt})^2\cdot dx.$$</span> I need to find this integral to find the dra...
'tom10s' answer is informative but says precious little about the effect of substituting air with lighter gas. I will do that here. The density of styrofoam is approx.: <span class="math-container">$$\rho\approx 50\mathrm{kg/m^3}$$</span> Using the resp. suffixes <span class="math-container">$s$</span> and <span class=...
The idea here is that for something to float in air, it must weigh less than the air it displaces. This applies to the volume as a whole, so if it is a hollow item or foam, the weight of the entire volume (item added to the weight of whatever fills it: air, or helium, or whatever) must be less than the air it displaces...
https://physics.stackexchange.com
54,721
[ "https://chemistry.stackexchange.com/questions/54721", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/-1/" ]
I'm using these rules, $^{2S+1}L_J$ with $J=L+S$ and it seems to imply that $^3P_1$ means $S=1$, $L=1$, and $J=1$ but clearly $1+1 \ne 1$ so according to me this shouldn't be an atomic term symbol but it is. Why?
You are correct in saying that the total spin for two electrons is <em>S</em> = 1 as its spin multiplicity is 3 and that <em>L</em> =1. The <em>J</em> value is found in the same way as <em>S</em> and <em>L</em> values were using the Clebsch-Gordon series, $$J= |L+S|...|L-S| $$ This means find the maximum value, then th...
<blockquote> with $J=L+S$ </blockquote> Nope. In general, it can be shown that the permitted values of the $J$ quantum number for the total angular momentum that arise from two sources characterized by quantum numbers $J_1$ and $J_2$ are given by $$ J = J_1 + J_2, J_1 + J_2 - 1, \dotsc, |J_1 - J_2| \, . $$ In th...
https://chemistry.stackexchange.com
109,293
[ "https://security.stackexchange.com/questions/109293", "https://security.stackexchange.com", "https://security.stackexchange.com/users/95628/" ]
On a POSIX system, is there a possibility for a file which is non-executable and read-only (aka with a mode 444) to run malicious code on a machine? If so, can you explain how it would do so?
Yes, something just has to execute it. The X flag hints to the shell that it can be directly executed, but that doesn't stop other programs from executing it if they know how. For example, if you have a file <code>a.sh</code> which is not executable to the shell, you can execute it by calling <code>bash a.sh</code> (w...
Let's say you have the file myscript containing the following: <pre><code> #!/bin/bash echo "Hello, World!" </code></pre> If you make this file executable and run it with ./myscript, then the kernel will see that the first two bytes are #!, which means it's a script-file. The kernel will then use the rest of the l...
https://security.stackexchange.com
74,115
[ "https://mechanics.stackexchange.com/questions/74115", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/10721/" ]
I live in an area that gets a fair amount of snow and ice, and so the winter months usually have salt on the roads. Presumably, that salt stays around as a dry crust or in puddles until the next heavy rain washes it off. And as most of us know, salt greatly accelerates rust. So, having spent almost $1000 this winter...
I wash my vehicles whenever the temperature gets high enough to be able to do so during winter. A film of dried salt on sound paintwork or the e-coating on the frame won't do much damage, but wherever it can get to metal through porosity of or damage to the coating will initiate corrosion - which then creeps under the...
Wash it, got to be better than leaving salty wet dirt in contact with metal. Also make sure metal surfaces are clean, primed and painted - both sides...
https://mechanics.stackexchange.com
381,966
[ "https://physics.stackexchange.com/questions/381966", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/159132/" ]
The problem is (as I suppose) well-known. A block is sliding down from the top of the hemisphere of radius $R$ without friction. We have to find the height $H$ at which block will be no longer connected to the hemisphere. I have to find it without using the law of conservation of energy. While moving down, block's ...
Centripetal force arises from a definite trajectory of a particle, which is a circle. In other words, if a particle undergoes circular motion, even for a moment, there will be some centripetal force acting on it. To find the centripetal force we find all the radial forces and put them into a equation using Newton's Sec...
@Mitchell 's answer summarizes the correct response to the problem. But you are asking <em>"Is it correct so far?</em> and you should realize that your argument is incorrect. As the block slides down, the required centripetal force needs to increase. But it's not that we push the block towards the hemisphere. Rather,...
https://physics.stackexchange.com
1,493,877
[ "https://math.stackexchange.com/questions/1493877", "https://math.stackexchange.com", "https://math.stackexchange.com/users/283158/" ]
A triangle $A$, $B$, $C$ has the coordinates: $A = (-1, 3)$ $B = (3, 1)$ $C = (x, y)$ $BC$ is perpendicular to $AB$. Find the coordinates of $C$ <hr> My attempt: Grad of $AB$ = $$\frac{3-1}{-1-3} = -0.5$$ Grad of $BC = 2$ ($-0.5 \times 2 = -1$ because AB and BC are perpendicular). Equation of $BC$ $(y-1) = 2(x...
The equation of $AC$ is $x-3y=-10$ as slope of any line is $-\frac{a}{b}$ where $a$ is $x$-coordinate and $b$ is $y$-coordinate so slope is $-\left(\frac{-1}{3}\right)$. $C$ is the point where $AC$ and $BC$ so meet we have two simultaneous equations $2x-y=5$ and $x-3y=-10$ solving them you get $x=5$ and $y=5$.
<strong>HINT:</strong> Length of $AC =$ $\sqrt{((x+1)^2 +(y-3)^2)} = \sqrt{(\mathrm{Length} \space \mathrm{of} \space (AB)^2+\mathrm{Length} \space \mathrm{of} \space (BC)^2)}\tag{1}$ because you have a right-angled triangle as $BC$ is perpendicular to $AB$ From $(1)$ $$(x+1)^2 +(y-3)^2=(3+1)^2+(1-3)^2+(x-3)^2+(y...
https://math.stackexchange.com
98,800
[ "https://softwareengineering.stackexchange.com/questions/98800", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/17372/" ]
Dividing a problem to smaller ones until the individual problems can be solved independently and then combining them to answer the original question is known as the <strong>divide and conquer</strong> algorithm design technique. [See: Introduction to Algorithms by CLR] Recently, this approach to solve computational pr...
If you're asking about the MapReduce architecture, then it is very much just a <strong>divide and conquer</strong> technique. However, any useful MapReduce architecture will have mountains of other infrastructure in place to efficiently "divide", "conquer", and finally "reduce" the problem set. With a large MapReduce ...
MapReduce is a framework for implementing divide-and-conquer algorithms <em>in an extremely scalable way</em>, by automatically distributing units-of-work to nodes in an arbitrarily large cluster of computers <em>and</em> automatically handling failures of individual nodes by redistributing the unit-of-work to another ...
https://softwareengineering.stackexchange.com
207,729
[ "https://physics.stackexchange.com/questions/207729", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/93143/" ]
The kinetic energy of an electron in a photoelectric tube increases with increase in the applied voltage across the plates of the tube, thus the velocity of the electrons also increases. Accordingly the time taken by the electron to reach the opposite plate should be less and so the current in the external circuit shou...
The current in any circuit is given by i= dq/dt. q being the charge of the carriers not dp/dt. Increasing the voltage will only increase the kinetic energy of the electrons coming out but not the current because the number of electrons available is the same(unless you are varying the intensity of the light which is cre...
The saturation current is the same because the RATE of charge flow per unit time is the same. Shorter time, smaller charge flow. The charge is not fixed. The amount of photoelectrons emitted is maxed. So all that are emitted are being collected
https://physics.stackexchange.com
56,887
[ "https://electronics.stackexchange.com/questions/56887", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1623/" ]
I need to get the value of an input but only need to get one specific bit. Im porting some software and can't seem to think of a way to get the value from PxIN for the microchip pic it looks like this: <pre><code>unsigned char idx; for (idx = 0; idx &lt; 8; idx++) { unsigned char byte |= RC1; } </code></pre> H...
You want to read PxIN and then use a bitwise AND that puts the result in another variable. e.g. <code>result = PxIN &amp; (1&lt;&lt;n)</code> to read the n-th bit. Besides, (at least with CCS and I think - but I have no way to test - with GCC, it might change with other compilers) instead of doing bit shifts, the <co...
Rather than trying to shift bits around to line up where you need them, it's often easier and simpler to write something like: <pre><code>if (port &amp; bitmask) byte |= 1; </code></pre>
https://electronics.stackexchange.com
12,720
[ "https://engineering.stackexchange.com/questions/12720", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/9131/" ]
I am looking for making a <strong>chip</strong> or a <strong>microchip</strong>, <em>which can be traced with the help of the satellites</em>. Means it is merely a chip and when I tune my satellite to a particular frequency I would get to know that this particular chip is present here and so. But it should be a chip on...
Firstly you seem to be under the common misunderstanding that the GPS satellites somehow calculate where a GPS receiver is. They don't. The satellites are transmit only systems (ignoring the command and control radio links with their control stations) and a GPS receiver is a receive only system. As user114749 indicate...
I second Pisda's point, but lets get hypothetical here: RFID and related chip technology already uses a chip that is powered by the radio signal send to it. So in 'theory' you could use that to located the chip. HOWEVER, you are asking about orbital detection of a chip. Over more then 100 kilometers (let me Google thi...
https://engineering.stackexchange.com
92,652
[ "https://mathoverflow.net/questions/92652", "https://mathoverflow.net", "https://mathoverflow.net/users/10035/" ]
This question may be naive. Take an infinite set of distinct algebraic numbers (hence countable). List them out in a table (randomly) by picking a choice of ordering and change the diagonal numbers. 1) Is it possible to decide if this Cantor type diagonal number is algebraic or transcendental? 2) For some choice of ...
If one uses binary representation (so that changing the digit means swapping 0 and 1), then <em>every</em> real arises as a diagonal real. If you want the diagonal to be $d$, start with any list of algebraic numbers, and first change the diagonal digits on the list to be the dual to $d$. This is a finite change to each...
To answer the third question in the affirmative, consider a list containing all algebraic numbers enumerated according to Dedekind for instance. Then the diagonal is transcendental. (Therefore we can use binaries without excluding certain periodic representations.) Each of the permutations of the list will also result ...
https://mathoverflow.net
468,292
[ "https://physics.stackexchange.com/questions/468292", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/59095/" ]
The fermion bilinears are <span class="math-container">$\bar{\Psi}\Psi$</span>, <span class="math-container">$\bar{\Psi}\gamma⁵\Psi$</span>, <span class="math-container">$\bar{\Psi}\gamma^\mu\Psi$</span>, <span class="math-container">$\bar{\Psi}\gamma^\mu\gamma^5\Psi$</span> and <span class="math-container">$\bar{\Psi}...
To maintain gauge invariance, we would need to consider something like <span class="math-container">$(D_\mu\psi)^\dagger\gamma^0\sigma^{\mu\nu}D_\nu\psi$</span> instead, where <span class="math-container">$D_\mu=\partial_\mu+iA_\mu$</span>. With or without the derivative parts, such a term has mass-dimension <span cl...
Because of anti-symmetric property of <span class="math-container">$$ \sigma^{\mu\nu} $$</span> OP's two-photon term <span class="math-container">$$ \bar{\Psi}\sigma^{\mu\nu}\Psi A_\mu A_\nu $$</span> would vanish identically. On the other hand, the gauge-invariant mass-dimension 5 term <span class="math-container"...
https://physics.stackexchange.com
23,665
[ "https://stats.stackexchange.com/questions/23665", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/5892/" ]
I have calculated the correlation between A and B for 10 different subjects. For averaging purposes, I've converted the r-values to z-values using Fisher's z-transformation. <pre><code>subj zvalue s1 -0.04 s2 -0.14 s3 -0.29 s4 -0.20 s5 -0.37 s6 -0.01 s7 -0.09 s8 0.20 s9 -0.15 s10 0.09 </code></pre> I want to test ...
The <em>r</em>-values should be Fisher's <em>z</em>-transformed, then compared to zero using a one-sample <em>t</em>-test, not a paired-sample <em>t</em>-test.
Treat r (or Z) as any effect size and calculate its mean using a standard formula: $\bar{r} = \Sigma r_iw_i$/$\Sigma w_i$ where $r_i$ is the $i$th value of r and $w_i$ is a weighting factor which is $1/s^2(r_i)$ The standard error of $\bar{r}$ is given by the square root of $1/\Sigma w_i$ and you can use this to con...
https://stats.stackexchange.com