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 |
|---|---|---|---|---|---|
350,143 | [
"https://math.stackexchange.com/questions/350143",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/65034/"
] | Let $G$ be an affine algebraic group over an algebraically closed field $k$ whose characteristic is $p>0$. Can $\mathcal{U}(G)$, the set of unipotent elements of $G$, be characterized as all elements $g\in G$ such that $g^{p^t}=1$ for some $t\in\mathbb{N}$? If not, what is $\mathcal{U}(G)$? If so, what are equiva... | More "intrinsically", although you still need an embedding, is to embed $G \to GL(k[G])$. (We assume $k$ is algebraically closed). Here $k[G]$ is the ring of regular functions on $G$, and $G$ acts on $k[G]$ by
$$(g\cdot f)(x) = f(g^{-1}x)$$
Of course, $k[G]$ is an infinite dimension vector space, but you can show that... | The set of unipotent elements are indeed the elements whose orders are some power of the characteristic of the field.
To see this, let $g\in G$ and embed $G$ in some general linear group $H$ over the field $k$. Let $p$ be the characteristic of $k$.
Since the order of the image of $g$ in $H$ is a power of $p$ if and o... | https://math.stackexchange.com |
64,653 | [
"https://mathoverflow.net/questions/64653",
"https://mathoverflow.net",
"https://mathoverflow.net/users/12961/"
] | Consider the two (inequivalent) $\mathbb{Z}$-representations $\phi,\psi$ of the symmetric group $S=S_3$ given by
$(1,2)^\phi=\left(\begin{array}{rr}0 &-1\\\ -1 & 0\end{array}\right), \qquad
(1,2,3)^\phi=\left(\begin{array}{rr}0 &1\\\ -1 & -1\end{array}\right);$
$(1,2)^\psi=\left(\begin{array}{rr}0 &am... | As Tom Goodwillie noted in his comment, $GL(2,\Bbb Z)$ can be identified with $Out(F_2)$, so the question can be rephrased in terms of lifting subgroups of $Out(F_2)$ to $Aut(F_2)$. There is a Realization Theorem for finite subgroups of $Aut(F_n)$ and $Out(F_n)$ which says that such a subgroup can always be realized a... | I have wondered about such lifts myself, and I want to give what I hope is a tantalizing hint of what such lifts may be able to tell us:
The lift you give of $S_{3}$ from $GL_{2}( \mathbb{Z} )$ to $Aut(F_{2})$ also gives an embedding of $C_{3} = A_{3}$ into $Aut(F_{2})$. Why is this useful? It gives a character-free p... | https://mathoverflow.net |
1,088 | [
"https://quant.stackexchange.com/questions/1088",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/80/"
] | Would it be considered appropriate risk-management or overkill to utilize multiple brokers to manage a given trading strategy?
A couple specifics:
<ul>
<li>I'm interested in what a reasonably-sized hedge fund might typically do, not an individual day trader.</li>
<li>Let's assume major equities and that either broke... | The shops I've worked for have had access to multiple brokers, but not for redundancy as your question implies. It's often because no one broker can handle every task.
For example, I might need a floor broker, a dark-pool broker, an algo broker, and a separate prime broker. Each agency handles a different requirement.... | Can't speak to the cash equity space, but at futures shops I think it is common to have the phone number of a give-up broker in case the power goes out or something, but it is uncommon to ever use them.
| https://quant.stackexchange.com |
207,307 | [
"https://stats.stackexchange.com/questions/207307",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/26008/"
] | I have come across this question in a textbook: I have a linear model $Y=Xb+u$ with for instance autocorrelation, in order to introduce GLS $Y^*=X^*b+u^*$ (with $Z^* = \Omega^{-1/2}Z$).
Then an additional question is to show that
<ul>
<li>$\hat{b}_{GLS} = (X^T\Omega^{-1}X)^{-1} X^T\Omega^{-1}Y$, and</li>
<li>$\hat{\... | <strong>Edit</strong> It's been a while and the OP has provided an answer, so here is a more detailed answer than was originally provided due to the homework-nature of the problem. I use a somewhat simplified notation where $Y = X\beta +u, u\sim N(0, \Omega)$.
<hr>
We first notice that since $\hat{\sigma}^2$ is a fun... | Building on the 6th point nicely given by Student001, here is what I have come to :
$cov(\widehat{b}_{MCG},\widehat{u}^*) = E\left[\left(\widehat{u}^*-E[\widehat{u}^*]\right)
\left(\widehat{b}_{MCG}-E[\widehat{b}_{MCG}]\right)^T\right] \\
= E\left[\widehat{u}^*\left(\widehat{b}_{MCG}-b\right)^T\right] \\
= E\left[... | https://stats.stackexchange.com |
459,702 | [
"https://physics.stackexchange.com/questions/459702",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/208138/"
] | How do I know whether it is a <span class="math-container">$2D$</span> or a <span class="math-container">$1D$</span> motion, just by looking at position-time, or velocity-time, or acceleration-time equations?
Maybe the question is not very clear, I’m not sure I’m getting it across properly, so I’ll try to use some ex... | In general the position vectors you are looking at take the form <span class="math-container">$$\mathbf x=f(t)\hat i+g(t)\hat j$$</span>
Now, let's think about what is first taught when learning about lines. In the x-y plane, a line can be described by
<span class="math-container">$$y=mx+b$$</span>
Now, you can probabl... | My solution:
<strong>2D case</strong>
given the position vector <span class="math-container">$\vec {R}$</span> with the parameter <span class="math-container">$t$</span>
<span class="math-container">$$\vec{R}=\left[ \begin {array}{c} x\\y\end {array} \right]=\left[ \begin {array}{c} f \left( t \right) \\ g
\left( t... | https://physics.stackexchange.com |
382,981 | [
"https://physics.stackexchange.com/questions/382981",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/183021/"
] | I just want someone to verify what I think.
I originally thought that for a reversible process to occur, no irreversibilities like friction can occur. Nevertheless, if we consider the Carnot efficiency, the equation is given as $1-\frac{T_h}{T_l}$. clearly, the efficiency is not 100%. this means that some heat was ene... | Your first two sentences are correct. But then you go astray. A Carnot cycle is indeed less than 100% efficient, yet it is an ideal (reversible) cycle without friction or any other 'dissipative' processes. Its inefficiency is a case of the Second Law of Thermodynamics: no cyclic process can take in heat at one temperat... | No, this is not the way to think about this. In the Carnot cycle some heat is, necessarily deposited in the low temperature reservoir, rather than being used to do work, but this is <em>not</em> due to friction and does <em>not</em> represent some sort of irreversibly. Your last sentence is true in the sense that it es... | https://physics.stackexchange.com |
188,026 | [
"https://physics.stackexchange.com/questions/188026",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/60395/"
] | So I'm preparing for my Thermodynamics undergrad exam, and I just can't wrap my head around the significance of reversibility vs. irreversibility of a process in relation to entropy. I mean if entropy is a state function, and a system in state A has S(A) entropy, and a system in state B has S(B), then what do we care w... | You need to consider the surroundings as well. If you go from state A to state B via a reversible process, the change in system's entropy exactly cancels out the opposite change in entropy for the surroundings; so overall there is no change in entropy. On the other hand, if it were an irreversible process, entropy chan... | <ol>
<li>In case of $ S(A)=S(B) $ there are many paths to connect $ A $ to $
B $ but only a single one that is reversible, i.e. can be traveled
both ways without increasing the total entropy in the universe. This
result is very important in cyclic processes.</li>
<li>Your proffesor talked about the total entropy i... | https://physics.stackexchange.com |
7,470 | [
"https://physics.stackexchange.com/questions/7470",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1637/"
] | This is something probably very basic but I was led back to this issue while listening to a recent seminar by Allan Adams on holographic superconductors. He seemed very worried to have a theory at hand where the chemical potential is negative. (why?)
<ul>
<li>For fermions, isn't the sign of the chemical potential a ma... | consider the grand canonical ensemble,
$$ \rho \sim \exp[-\beta (E-\mu N)] $$
In the exponent, the inverse temperature $\beta = 1/kT$ is the coefficient in front of one conserved quantity, the (minus) energy, while another coefficient, $\beta\mu$, is in front of the number of particles $N$. The chemical potential is th... | I think the above answers are good and correct. They are just too long for my taste. Here is a more "simple" answer (according to me of course). Only for non-interacting particles to keep it simple:
<ul>
<li>When we talk about chemical potential, we are talking about a system in contact with a huge reservoir of part... | https://physics.stackexchange.com |
1,114,783 | [
"https://math.stackexchange.com/questions/1114783",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/45736/"
] | The following question comes from an American Olympiad problem. The reason why I am posting it here is that, although it seems really easy, it allows for some different and really interesting solutions. Do you want to give a try?
Let $n$ be one million. Find the maximum value attained by $\binom{n}{x+1}-\binom{n}{x}$,... | Let $$f(x)=\binom{n}{x+1}-\binom{n}{x},$$
then
$$f(x)-f(x-1)=\frac{n!(4x^2-4nx+n^2-n-2)}{(x+1)!(n-x+1)!}$$
The roots of the quadratic are
$$\frac{n\pm\sqrt{n+2}}{2}$$
Hence $f(x)>f(x-1)$ up to $\frac{n-\sqrt{n+2}}{2}$.
For
$$x>\frac{n+\sqrt{n+2}}{2}$$
it is clear that $f(x)<0$.
So maximum $f(x)$ at
$$... | Note that
$$
\begin{align}
\binom{n}{x+1}-\binom{n}{x}
&=\left[\frac{n-x}{x+1}-1\right]\binom{n}{x}\\
&=\frac{n-2x-1}{x+1}\binom{n}{x}\tag{1}
\end{align}
$$
$(1)$ is positive for $x\lt\frac{n-1}2$ and negative for $x\gt\frac{n-1}2$.
Furthermore,
$$
\begin{align}
&\hphantom{}\left[\binom{n}{x+1}-\binom{n}{x... | https://math.stackexchange.com |
453,239 | [
"https://physics.stackexchange.com/questions/453239",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/194502/"
] | If a Woman weighing <span class="math-container">$600 N$</span> steps on a bathroom scale containing a stiff spring, the spring is compressed <span class="math-container">$1.0 cm$</span> under her weight, the spring constant is <span class="math-container">$60000 N/m$</span>.It turns out that the work done on the sprin... | You are correct in saying that the work done by gravity is <span class="math-container">$6\ \rm J$</span>. So where did the energy go?
Well consider the case where the woman is at rest above the uncompressed spring (magically hovering, I don't know) and then is released. Using energy conservation we find that
<span cl... | The work provided is 6 J. But only part of this work is converted into elastic potential energy. The rest is converted into kinetic energy (the mass oscillates) and finally in heat. You would need a quasistatic transformation to convert all the work into elastic potential energy.
| https://physics.stackexchange.com |
234,937 | [
"https://softwareengineering.stackexchange.com/questions/234937",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/125951/"
] | I am modeling a class diagram and have spotted an opportunity to simplify it slightly. What I want to know is, would this it be better to implement an abstract class or an interface?
The scenario is this, I have the classes:
<ul>
<li>Artist</li>
<li>Genre</li>
<li>Album</li>
<li>Song</li>
</ul>
All of which share t... | You should create an abstract class.
Generally speaking, a song can consist of a Title / Artist / Album / Genre. All of those are just a string of data which can be handled the same way.
By using an abstract class you don't have to write mentioned "getName", "setName" and "getCount" more than once, which sounds pretty... | I would use interfaces instead.
From my experience, there are 2 reasons for this:
<ul>
<li>Only use (abstract) class at the root of the diagram when you are so confident that sub-classes are very very similar</li>
<li>Unless you are very fluent in the area, will you need to make lot of modifications to not just your c... | https://softwareengineering.stackexchange.com |
3,649,090 | [
"https://math.stackexchange.com/questions/3649090",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/646103/"
] | Consider the system of equations <span class="math-container">$$x' = x^2$$</span> <span class="math-container">$$y'=-y.$$</span> Compute the index of fixed point at the origin both visually and computationally, or just write down the integral.
<span class="math-container">$\textbf{Solution:}$</span> To find the fixed ... | To get fixed points, we need <span class="math-container">$x'=0$</span> and <span class="math-container">$y'=0$</span>. So, the fixed points are <span class="math-container">$x^2 = 0$</span> and <span class="math-container">$-y=0$</span> so <span class="math-container">$x=0$</span> and <span class="math-container">$y=0... | You cant treat function as variable. Solving then this system of equations would look completely different. Treat these functions like functions dependable from paramter t.
Thus, as a simple differentional equation solving we get:
<span class="math-container">$.\\y(t)=C*e^{-t} \\ x(t)=-\frac{1}{t}+C $</span>
I don't k... | https://math.stackexchange.com |
212,206 | [
"https://mathoverflow.net/questions/212206",
"https://mathoverflow.net",
"https://mathoverflow.net/users/15242/"
] | Let $\widehat{F_2}$ be the pro-$\ell$ completion of the free group of rank 2, where $\ell$ is some prime.
Every outer automorphism of $F_2$ induces an outer automorphism of $\widehat{F_2}$, hence an injection $Out(F_2)\rightarrow Out(\widehat{F_2})$.
Let $\alpha\in Out(\widehat{F_2})$ be an outer automorphism. Consi... | Here is a coordinate-free description of the affine hull of the quotient of $G=\text{Aut}_k(V)$ by the right action of the unipotent radical $U$ of a Borel subgroup $B$. The group $B$ is the stabilizer of a flag of $k$-linear subspaces, $$\{0\} = F^0 \subsetneqq F^1 \subsetneqq \dots \subsetneqq F^r \subsetneqq F^n = ... | Questions of this type can be approached from the direction of algebraic geometry (in a suitable generality) or from the direction of invariant theory involving algebraic group actions. I'd point especially to Chapter 3 in the 1997 monograph by Frank D. Grosshans, <em>Algebraic homogeneous spaces and invariant theory... | https://mathoverflow.net |
142,475 | [
"https://softwareengineering.stackexchange.com/questions/142475",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/38616/"
] | In Item2 on page 16, (Prefer consts, enums, and inlines to #defines), Scott says:
<blockquote>
Also, though good compilers won't set aside storage for const objects of integer types...
</blockquote>
I don't understand this. If I define a const object, eg
<pre><code>const int myval = 5;
</code></pre>
then surely... | <blockquote>
Also, though good compilers won't set aside storage for const objects of integer types...
</blockquote>
A slightly more correct statement would be that compilers wouldn't set aside <em>data memory</em> for const objects of integer type: they would trade it for <em>program memory</em>. There is no differ... | Not necessarily. It can also decide to just use the raw value 5 instead of <code>myval</code> in the compiled code.
The difference between <code>#define MYVAL 5</code> and <code>const int myval = 5</code> is that in the former case, the compiler has no choice whatsoever, as the preprocessor already replaced all mentio... | https://softwareengineering.stackexchange.com |
333,190 | [
"https://softwareengineering.stackexchange.com/questions/333190",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/249147/"
] | To simplify the use case, let's say I have a mobile app available for Android and iOS, similar to Instagram, where users can upload photos that can be commented, liked or disliked by other users.
When a user comments, likes or dislikes a photo you uploaded, you would get a real time notification on your phone telling ... | So since you can not directly subscribe to an SNS topic from a device, I used Google Firebase and the way it works is devices get assigned a unique token which I map to SNS platform endpoints (meaning I need to use a database). So 1 device = 1 active endpoint (= 1 active token) at a time. My backend then decides to wha... | Actually scratch that last answer. You don't even need to do any of the above, you can store the platform endpoint ARN on your server for every user and just send notifications to that ARN when you have a notification for that user.
| https://softwareengineering.stackexchange.com |
564,087 | [
"https://stats.stackexchange.com/questions/564087",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/133615/"
] | Why not just testing alternative hypothesis? Why do we need null hypothesis?
For example, I am testing the effectiveness of a new drug. I can choose two groups: control and experimental. Based on the result I can say that whether the drug is working or not. Why do I need to state the null hypothesis in this case anyway... | Welcome to Cross Validated!
I'm sure someone could give a more canonical answer, but here's the conceptual gist of it.
Think of it this way: there is only one null hypothesis, right? The hypothesis that there is no difference between your two samples/populations.
However, how could you define your alternative hypothesi... | In a test of hypothesis, the null hypothesis provides
the distribution of the test statistic, and thus the
critical value or the P-value, either of which can be
used to decide whether to reject.
Three elementary examples:
<ul>
<li>For normal data with known <span class="math-container">$\sigma,$</span> we can test <spa... | https://stats.stackexchange.com |
193,061 | [
"https://physics.stackexchange.com/questions/193061",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/43712/"
] | I am reading a chapter about Squeezed state, and came across this word, quadrature, which I have never seen before in the book. Here is the quote from that chapter.
" A general class of minumum-uncertainty states are known as squeezed states. In general, a squeezed stat may have less noise in one quadrature than a coh... | As you've seen, the word quadrature is overladen with many, none-too-precise meanings.
Here the "quadratures" loosely refer to the position and momentum observables:
$$\hat{x} = \frac{1}{\sqrt{2}}(a + a^\dagger)$$
$$\hat{p} = \frac{i}{\sqrt{2}}\,(a - a^\dagger)$$
where $a,\,a^\dagger$ are the lowering/ raising opera... | Quadrature has a very clear and precise meaning in Quantum Mechanis. Some quantities don't commute, i.e., you cannot measure both of them with unlimeted precision. This is related to Heisenbeg unsertainty.
Let's put this two variables in the Cartesian plan and call this observables as X and Y.. if X is position then Y... | https://physics.stackexchange.com |
1,375,406 | [
"https://math.stackexchange.com/questions/1375406",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/257126/"
] | A person throws a baseball with a horizontal component velocity of <span class="math-container">$25$</span> m/s: It takes <span class="math-container">$3$</span> seconds to come back to its original height.
<ul>
<li>Calculate -friction is ignored-
<ul>
<li>its horizontal range,</li>
<li>its initial vertical component v... | The ring $$R=\mathbb{C}[x_1,x_2,\ldots]/(x_1,x_2,\ldots)^2\cong\mathbb{C}[\epsilon_1,\epsilon_2,\ldots]$$
is non-noetherian (where $\epsilon_i$ denotes the image of $x_i$ in the quotient), and the radical of the (obviously finite) zero ideal $I=(0)$ in $R$ is equal to the ideal $(\epsilon_1,\epsilon_2,\ldots)$ which is... | If <span class="math-container">$(D,M)$</span> is a one dimensional quasi-local domain, <span class="math-container">$M=\sqrt{(x)}$</span> for every
<span class="math-container">$x\in M\backslash (0).$</span> This is because for every pair <span class="math-container">$x,y\in M\backslash
\{0\}$</span> we have <span cl... | https://math.stackexchange.com |
18,917 | [
"https://stats.stackexchange.com/questions/18917",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/7600/"
] | Please first have a look at the following little problem:
<blockquote>
There are two indistinguishable light bulbs A and B. A flashes red
light with prob .8 and blue with prob .2; B red with .2 and blue .8.
Now with .5 prob you are presented with either A or B. You're supposed
to observe its flash color to mak... | You are correct: $n=2k$ does not improve upon $n=2k-1$ in this symmetric case.
Clearly the optimal strategy is to look at the number of red and blue flashes and choose A or B according to which colour appears more. If the same number appear of each, it doesn't make any difference which you guess, as your chance of be... | To answer in a rigorous way, this problem boils down to observing the number of red flashes $X$ which is either a binomial $\mathcal{B}(n,.8)$ (A) or a binomial $\mathcal{B}(n,.8)$ (B), with probability $0.5$ for each. The probability of selecting bulb A is thus given by Bayes theorem
$$
\mathbb{P}(b=A|X=x) = \dfrac{\... | https://stats.stackexchange.com |
2,698,776 | [
"https://math.stackexchange.com/questions/2698776",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424110/"
] | $4a^{2}b^{2}-(a^{2}+b^{2}-c^{2})^{2}$
There is a difference o squares but after factoring it, I can't find a way to get to the answer:
$(c-a+b)(c+a-b)(a+b-c)$
What I Did:
$(2ab)^{2}-(a^{2}+b^{2}-c^{2})^{2}$
$(2ab+a^{2}+b^{2}-c^{2})( 2ab-a^{2}-b^{2}+c^{2})$
After this step I couldn't find any idea. Could you gi... | <strong>HINT</strong>
$$(2ab+a^{2}+b^{2}-c^{2})( 2ab-a^{2}-b^{2}+c^{2})=[(a+b)^2-c^{2}][c^2-(a-b)^2]$$
| You are almost there.
Note that $$(2ab+a^{2}+b^{2}-c^{2})( 2ab-a^{2}-b^{2}+c^{2})$$
$$((a+b)^2-c^2)(c^2-(a-b)^2)$$
$$ (a+b-c)(a+b+c)(c-a+b)(c+a-b)$$
| https://math.stackexchange.com |
639,130 | [
"https://physics.stackexchange.com/questions/639130",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/300276/"
] | Can you use the SUVAT formulae of motion to draw a displacement time graph or should you integrate the graph you get from a velocity-time plot first? And why?
If i have
S = 4.4
U = 3
V = 1.4
A = -0.8
T = 2
can i therefore use the suvat equation : <span class="math-container">$s = t((u + v) /(2) )$</span> ?
this will gi... | The standard notation for suvat uses five lower-case letters: constants <span class="math-container">$a$</span> and <span class="math-container">$u$</span>, a time parameter <span class="math-container">$t$</span>, and two functions of it, <span class="math-container">$v=u+at$</span> and <span class="math-container">$s... | You have integrated the velocity-time equation wrongly. Notice that, initial velocity <span class="math-container">$u = 3$</span> and acceleration is <span class="math-container">$a=-0.8$</span>. Thus,
<span class="math-container">$v=u+at, $</span>
<span class="math-container">$ v=3-0.8t$</span>
You have written 2.6 in... | https://physics.stackexchange.com |
300,000 | [
"https://physics.stackexchange.com/questions/300000",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/139901/"
] | For a pendulum in simple harmonic motion, I understand that the period is independent of amplitude, and I know that the angular velocity is inversely proportional to the period. However, doesn't the angular velocity change as linear speed changes?
| To understand the state of the electron, it is convenient to obtain <strong>the Hilbert space</strong> it belongs to. It can be split into two parts:
<ul>
<li>The Hilbert space for the particle without spin is just $L^2\left(\mathbb{R}^3\right)$, the square-integrable functions from the three-dimensional space to the ... | My suggestion is as follows, please give feedback on this: Consider just the first term (for now) $$\sqrt{\frac{1}{3}} R_{21} Y^{0}_{1} \otimes \chi_{+}$$ we can consider this as the projection onto the position basis in the following way:
Consider a general representation of our quantum state $| \psi \rangle$ present... | https://physics.stackexchange.com |
164,051 | [
"https://electronics.stackexchange.com/questions/164051",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/45964/"
] | I am getting full scale ADC value from <code>0 to 16348</code>. I am trying to convert it to 4-20mA and then to 0-25 bar pressure, as I am ultimately measuring pressure.
I am using the <code>y = mx+c</code> equation but failing miserably. Can any one please guide so that I can learn something.
I am trying something l... | Since your microcontroller doesn't support floating point, then you need to scale the numbers up and then divide back down. To do so, you will need to use long (32-bit) arithmetic.
For the ADC, 4 ma = 0 and 20 ma = 16384. Therefore the difference 16 ma is also represented by 16384.
If we take the full scale reading... | It's not very clear what you are doing, so let's go step by step.
So, the sensor gives a current, where 0-25 Bar correspond to 4-20mA.
$$I_{sens}=16mA\cdot \frac{p}{25 Bar} +4mA$$
Now, the ADC itself has an input range, e.g. 0-5V and converts it to an integer number. I don't know how you get 16348, the next matchin... | https://electronics.stackexchange.com |
13,510 | [
"https://electronics.stackexchange.com/questions/13510",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3982/"
] | if someone is generating frequency, can receiver detect from where exactly it's emitting? If someone is emitting on illegal frequency band, how it can be caught?
| Every Government does things slightly different, but the way most organizations look for illegal wireless use is to use directional antennas. This is usually an array of antennas to cover a decently large frequency range and direction. They will then stick this array on top of a van and drive around. If an antenna show... | The standard approach is 'triangulation' - you use a directional receiving antenna, and determine the direction to the source from two different locations. Draw the lines on a map and you have a pretty good idea of where the signal originates from.
| https://electronics.stackexchange.com |
8,048 | [
"https://dsp.stackexchange.com/questions/8048",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/4037/"
] | This seems like a trivial concept but I just can't get the hold of it. I have a signal with two complex sinusoids having frequencies -25MHz and 17MHz. Currently it is being sampled at 64MHz so I get two peaks of fft at -25MHz and 17 MHz. If I throw every other sample away the component at 17MHz shifts to -30MHz and the... | Your description of the situation is faulty. A complex signal sampled at 64 MHz can represent frequencies from -32 MHz to +32 MHz, so the presence of tones at -25 MHz and +17MHz is fine. However, when you decimate by two the sample rate drops to 32 MHz, and the frequency range becomes -16 MHz to +16 MHz. In other wo... | Based on your post, you are down sampling you're signals by a factor of 2, so your new aliased frequencies should also be devided by this factor.
In general:
New Sampling rate (fs2): 32MHz
New Nyquist frequency: 16MHz.
Aliased freuencies fa: 7MHz, 15MHz
Actual frequencies fx: -25MHz, 17MHz
To keep things s... | https://dsp.stackexchange.com |
728,556 | [
"https://physics.stackexchange.com/questions/728556",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/346162/"
] | <strong>Layman alert</strong>: I am sorry if I am asking stupid questions. I'm just trying to grasp what is happening with a single photon in MZ interferometer.
Say we have a single-photon source, and let the second detector be the one with the probability zero.
Do we know how many photons were emitted and do we then d... | In the usual setup, the probabilities of detection are related to the transmitivity and reflectivity of the beam splitter (ignoring phases for this discussion) so you cannot get 0 probability at one detector unless you remove the beam splitter or place a full mirror in your interferometer (reflectivity <span class="mat... | Consider Feynman path integral ... every photon travels its own path, if the path is not ideal (per Feynman path integral) it is not travelled. Areas of non-travel are dark, all the photons go to the bright areas. The word 'interference" is out of date and historical and it violates conservation of energy! Photons... | https://physics.stackexchange.com |
233,623 | [
"https://softwareengineering.stackexchange.com/questions/233623",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/100230/"
] | <h1>The problem</h1>
I write a lot of exploratory code in my research. As I go along, I put functionality that I'd like to reuse in a central location. A project might look like this:
<pre><code>./mylib
./exploration
/experiment_1
/experiment_2
/experiment_3
</code></pre>
Where each experiment uses some ... | After spending the afternoon reading, it looks like <code>git subtree</code> is what I'm after. In this approach, I keep my library in version control with git, and each experiment goes into a separate repository. When I start an experiment, I pull the latest version of the library in in with a <code>git subtree add</c... | This is not so much a question of the version control system you are using, but more of your general configuration management strategy. First think about your strategy, <em>then</em> check how you map this to your VCS.
Each version of your library you release into "production" should have a unique version number. You ... | https://softwareengineering.stackexchange.com |
160,845 | [
"https://electronics.stackexchange.com/questions/160845",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/70481/"
] | Someone gave me this rotary encoder breakout, but they unsoldered the SMT resistors for some other project. Now I don't have any SMT resistors on hand and can't justify buying a roll of them. So would it be all right if I just shorted those pads together?
<img src="https://i.stack.imgur.com/5JY0N.jpg" alt="The Breakou... | What a terrible photo!
It's likely that the resistors were being used as pullups against the contact closures of the encoder. If that's the case, you need to replace them. Shorting them out would connect all of the contacts directly to the supply (and to each other).
Or you could simply leave them off, and provide th... | If the pads are large enough you may be able to solder some 1/4 watt resistors to them. Otherwise you can purchase surface mount resistor in small quantities on ebay at a very reasonable price. Shorting the components could have an adverse effect, depending on how you use the device.
| https://electronics.stackexchange.com |
1,730,616 | [
"https://math.stackexchange.com/questions/1730616",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/298588/"
] | $\sum_{n=1}^{\infty} \sin(\sqrt{n+1} - \sqrt{n})(x-2)^n$
There are two ways to determine the radius of convergence of the series:
$1. \lim_{n \rightarrow \infty}|\frac{a_n}{a_{n+1}}| $ and
$2. \lim_{n \rightarrow \infty}\sqrt[n]{a_n}$
But none of these work out easily, when i tried first one i ended up with $\frac{... | $$
\sqrt{n+1}-\sqrt{n}=\frac{1}{\sqrt{n+1}+\sqrt{n}}\sim\frac1{2\sqrt n}\quad\text{as }n\to\infty.
$$
Then
$$
\sin\bigl(\sqrt{n+1}-\sqrt{n}\bigr)\sim\sin\frac1{2\sqrt n}\sim\frac1{2\sqrt n}\quad\text{as }n\to\infty.
$$
| Here's a different way to tackle the problem.
At $x=-1$ the power series trivially diverges so $r\leq 1$.
At $x=1$, $$\displaystyle \sin(\sqrt{n+1} - \sqrt{n})(-1)^n=\frac{(-1)^n}{2\sqrt{n}}-\frac 18 \frac{(-1)^n}{n^{3/2}}+o\left( \frac{1}{n^{3/2}}\right)$$
Let $\displaystyle u_n=\frac{(-1)^n}{2\sqrt{n}}$ and $\disp... | https://math.stackexchange.com |
9,950 | [
"https://datascience.stackexchange.com/questions/9950",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/15735/"
] | In NLP, there is the concept of <code>Gazetteer</code> which can be quite useful for creating annotations. As far as I understand:
<blockquote>
A gazetteer consists of a set of lists containing names of entities
such as cities, organisations, days of the week, etc. These lists are
used to find occurrences of the... | Gazetteer or any other option of intentionally fixed size feature seems a very popular approach in <em>academic</em> papers, when you have a problem of finite size, for example NER in a fixed corpora, or POS tagging or anything else. I would not consider it cheating unless the only feature you will be using is Gazettee... | Using a list of entities has few disadvantages:
<ul>
<li>The list is closed</li>
<li>The list is not context sensitive. You need context in order to differ between "a white house" and "the white house".</li>
<li>List building require a lot of labor</li>
<li>List might also contain errors.</li>
<li>It does feel like ch... | https://datascience.stackexchange.com |
2,759,720 | [
"https://math.stackexchange.com/questions/2759720",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/346939/"
] | I have found this following problem on sequence:
<blockquote>
Show that for any positive rational number $r$, the sequence $\{\frac{\log n}{n^r}\}$ is bounded.
</blockquote>
<em>My Solution.</em> let us consider $f(x)=\frac{\log x}{x^r}$. Then $~f'(x)=x^{-(1+r)}(1-r\log x)$. Then $f$ is monotone decreasing for $x&g... | You have $s^2-2s+5=(s-1)^2+4$. So the first term looks like
$$
\frac {3s+5}{(s-1)^2+4}
=\frac {3(s-1)+8}{(s-1)^2+4}
=\frac {3(s-1)}{(s-1)^2+4}
+\frac {8}{(s-1)^2+4}.
$$
Since $\frac{s}{s^2+4}$ is the transform of $\cos 2t$ and $\frac2{s^2+4}$ of $\sin 2t$, with the shifting rule you get
$$
\mathcal L^{-1}\left[\frac... | $$\frac {3s+5}{s^2-2s+5}=$$
$$\frac {3s+5}{(s-1)^2+4}=$$
$$\frac {3(s-1)}{(s-1)^2+4} +\frac {8}{(s-1)^2+4}$$
The inverse laplace transform is
$$3e^t\cos 2t +4e^t\sin 2t $$
| https://math.stackexchange.com |
530,657 | [
"https://electronics.stackexchange.com/questions/530657",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/2713/"
] | PCIe spec defines 3 address spaces:
<ul>
<li>Memory</li>
<li>IO</li>
<li>Configuration</li>
</ul>
I can configure the <code>BAR</code> register to specify the memory address range that a PCIe device will claim.
How does a PCIe device know that its configuration space can be accessed through the memory address as well, ... | The memory mapping is an implementation detail inside the root complex, the card is sent CfgRd and CfgWr TLPs. The destination address information inside the TLP is filled out from the address used in the ECAM access, and the completion reply is translated back into a memory access result when it is received, by matchi... | Taking the Base Address Registers as an example, these are either 32bit or 64bit (combined BAR0/BAR1, etc.) registers which as the name suggests are initialised with an address which points to the start (base) of a memory, set by root complex (RC) during initialisation.
How do you set the length though? There is no len... | https://electronics.stackexchange.com |
8,895 | [
"https://datascience.stackexchange.com/questions/8895",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/14200/"
] | I’m a beginner in machine learning and I’m facing a situation. I’m working on a Real Time Bidding problem, with the IPinYou dataset and I’m trying to do a click prediction.
The thing is that, as you may know, the dataset is very unbalanced : Around 1300 negative examples (non click) for 1 positive example (click).
Th... | Great question... Here are some specific answers to your numbered questions:
<code>1)</code> You should cross validate on B not B`. Otherwise, you won't know how well your class balancing is working. It couldn't hurt to cross validate on both B <strong>and</strong> B` and will be useful based on the answer to 4 bel... | For <code>1)</code> and <code>2)</code>, you want to
<pre><code>1) choose a model that performs well on data distributed as you
expect the real data will be
2) evaluate the model on data distributed the same way
</code></pre>
So for those datasets, you shouldn't need to balance the classes.
You might also try ... | https://datascience.stackexchange.com |
259,120 | [
"https://electronics.stackexchange.com/questions/259120",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/123980/"
] | I'm using a 48v 1500w BLDC motor. Can I run the motor controller using pulses obtained from an ultracapacitor? I talked to a person who said that you can't as he tried it and he blew up his motor controller. Something along the lines of the motor controller using pwm to run the motor and if we supply it with pulses it... | <blockquote>
To oversimplify - I'm thinking of taking the 5V 4A PSU and using a Y connector splitting it into two. 1. goes to Power the Pi. 2. goes to power the HDDs.
</blockquote>
You could do that and it would work. However, you would bypass the fuse between the Pi's USB-B jack and its 5V power rail. So if a compo... | Raspberry Pi (all variants) are not well-engineered for correct power delivery on USB ports. Your best bet is to use a good quality self-powered (via a wall adapter) hub, preferably USB-IF certified, and USB 3.0 type (for higher supply capability).
| https://electronics.stackexchange.com |
5,905 | [
"https://mechanics.stackexchange.com/questions/5905",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/3051/"
] | I have a taken the front wheel out of my motorcycle to replace the tyre. When I put the axle back in is it a good idea to grease it? If so what type of grease should I use?
| I would apply a light coating of white lithium grease. It is thin enough that it it won't be wiped off the shaft sliding through the bearings. It also is resistant to getting washed off by rain or routine washing. The light coating of grease should keep the shaft from seizing in the bearings.
| By all means yes. It is a good practice to grease the axle prior installation.
| https://mechanics.stackexchange.com |
366,945 | [
"https://math.stackexchange.com/questions/366945",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/70041/"
] | I have the line
$$D: \frac{x-7}{12} = \frac{y + 1}{-6} = \frac{z-2}{-2}$$
that crosses the plane
$$P : -4x - 5y - z -3 = 0$$
on point $A=(47/4, -67/8, 41/8)$.
I must find a line from point $A$ that is perpendicular to $D$ inside $P$.
How?
| There are only two ways this is possible.
<ol>
<li>The line is not perpendicular to the plane. In this case, there is a unique answer. Take the cross product of the direction vector of the line and the normal vector of the plane. That will give you a direction perpendicular to the original line, and also perpendicular... | Note that the direction vector of line $D$ is $\,\vec v = \langle 12, -6, -2 \rangle$.
Use this vector to find the equation of plane of vectors, let's call it $Q$, which is <em>orthogonal to line</em> $D$ at the point $A =(47/4, -67/8, 41/8)$. The line you are seeking is the line at which the planes $Q$ and $P: -4x ... | https://math.stackexchange.com |
9,724 | [
"https://stats.stackexchange.com/questions/9724",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/4226/"
] | I'm hoping to hear from someone who has worked on mouse models or similar biological analyses where there is a tendency to run 'replicates' of an experiment. I know multiple testing is a sizeable kettle of fish which is definitely relevant to this discussion. I have some applications for projects where they talk about ... | First of all, I'm not sure whether the replicates are really what a statistician would call replicates (statisticians please comment). Mice that are grown together (same supplier, same cage, or even same litter) are often more similar to each other than mice from different cages, suppliers, litters. So the "cage" is a ... | The first thing that comes to my mind when I read of the approach that you describe is that there is a miss-match between the idea of replicating an experiment and the use of "success" and "failure" as descriptors of the outcomes. Presumably a success would be a result that is significant in the Neyman-Pearson paradigm... | https://stats.stackexchange.com |
169,336 | [
"https://dba.stackexchange.com/questions/169336",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/14865/"
] | Was wondering, is it better to split a table into three tables with approximately 6 columns each and using foreign keys, or using one table and have it have 15 columns ?
Most of the fields are varchars, with a few numbers here and there.
Database is MySQL.
By better I'm mostly interested in insert and select speed... | Is there a reason this simple update doesn't work for you?
<pre><code>update part set partname = replace(partname,'functional-','')
select * from part
</code></pre>
| Using a <code>REPLACE</code> in an <code>UPDATE</code> is fairly straightforward. In your case, you would do something like this:
<pre><code>UPDATE p
SET Partname = REPLACE(Partname,'-Functional','')
FROM #part p;
</code></pre>
However, there are always different ways to solve the same problem. You could also handle ... | https://dba.stackexchange.com |
220,134 | [
"https://mathoverflow.net/questions/220134",
"https://mathoverflow.net",
"https://mathoverflow.net/users/8628/"
] | Given an infinite distributive lattice <span class="math-container">$L$</span>, does <span class="math-container">$L$</span> contain a non-principal prime ideal <span class="math-container">$I$</span>, or a non-principal prime filter <span class="math-container">$F$</span>? (<span class="math-container">$I$</span> is s... | It’s not clear to me what exactly is the intended definition of prime ideals and filters in distributive lattices. Based on an analogy with other classes of structures, it seems to me that conceptually the best choice should be to make the definition correspond to subdirectly irreducible factors in subdirect products, ... | A counterexample is <span class="math-container">$\omega+1$</span>, turned upside down. However, it is true that every infinite distributive lattice contains either a <em>non-principal prime ideal</em> or a <em>non-principal prime filter</em>. This is due to the following argument:
Any infinite distributive lattice co... | https://mathoverflow.net |
57,430 | [
"https://chemistry.stackexchange.com/questions/57430",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/33797/"
] | I am looking for a simple way to distinguish between glucose and fructose samples. Currently, I am doing that by melting temperature method. Can anybody suggest me some easy way to do that?
| One of the simplest ways would be bromine-water test. Bromine water oxidizes glucose to gluconic acid, hence decolorize the solution. Being a mild oxidizing agent, Bromine water is not capable of oxidizing fructose (ketone).
| Go for Seliwanoff's Test. It is based on the simple fact that when heated, ketose sugars are more rapidly dehydrated than aldoses. After acidic hydrolysis of both, we add a pinch of resorcinol(0.5%) and concentrated HCl(3N). Fructose reacts to give a deep red cherry colour whereas Glucose reacts slightly to produce a f... | https://chemistry.stackexchange.com |
36,296 | [
"https://mathoverflow.net/questions/36296",
"https://mathoverflow.net",
"https://mathoverflow.net/users/238/"
] | Let $M$ be a compact subset of $\mathbb R^2$ with smooth boundary, and let $g$ be a Riemannian metric on $M$. If $g'$ is another Riemannian metric which is "close" to $g$, then they should have almost identical curvature profiles. I would like to prove a concrete estimate on the total difference of their curvatures i... | This is a straightforward consequence of the fact that $K(x)$ is a continuous function of $g(x)$, $\partial g(x)$, and $\partial^2(g)$.
| It is a fact (due to Riemann I believe) that in normal coordinates, the Taylor expansion of $g_{ij}$ is $\delta_{ij}+\frac{1}{3}R_{ikjl}x^k x^l+O(||x||^3)$, where $R_{ikjl}$ are components of the $(4,0)$ curvature tensor. In dimension $2$ the tensor reduces to scalar curvature. Thus
curvature is the second derivative ... | https://mathoverflow.net |
1,356,206 | [
"https://math.stackexchange.com/questions/1356206",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/7289/"
] | I want to generate a random matrix whose all eigenvalues are equal to one. How can I do it?<br>
I know one method to generate matrices with given eigenvalues is to generate a random orthogonal matrix $Q$ and then construct some diagonal matrix $A$ with desired eigenvalues on the diagonal, then $Q^T A Q$ will be a rando... | Let $A$ be an upper triangular matrix with $1$s along the diagonal.<br>
If you have a complete set of eigenvectors, then $A$ must be the identity matrix. But an upper triangular matrix with $1$s along the diagonal doesn't have a complete set of eigenvectors.<br>
The eigenvalues are all $1$, and that will still be true... | The orthogonal matrices have nothing to do here.
Let $N$ be the set of nilpotent $n\times n$ matrices. It is not difficult to show that a generic matrix in $N$ (for instance, a randomly chosen nilpotent matrix is almost surely ...) is similar to $J_n$, the nilpotent Jordan matrix of dimension $n$. Thus we can proceed... | https://math.stackexchange.com |
8,146 | [
"https://dsp.stackexchange.com/questions/8146",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/4008/"
] | I'm doing autocorrelation (via fft) on pure, synthetic generated sinusoids and getting unexpected jitter in the results. The jitter depend on where in the sine the signal buffer is started. I get the correct results if I start the buffer at 0 and 180 degrees of a sine wave, and get the most error at 90 and 270 degree... | The (periodic) autocorrelation function of a sinusoid $A\cos(2\pi f_0 t + \theta)$
is
$$\begin{align}
R(\tau) &= \int_0^{f_0^{-1}} A\cos(2\pi f_0 t + \theta)
A\cos(2\pi f_0 (t +\tau)+ \theta)\,\mathrm dt\\
&= \frac{A^2}{2}\int_0^{f_0^{-1}} \cos(2\pi f_0\tau)+\cos(2\pi f_0 (2t +\tau)+ \theta)\,\mathrm dt\\
&am... | FFT-based autocorrelation gives you a circular autocorrelation, which will be phase dependent for any waveform not perfectly periodic in the FFT aperture width, due to the discontinuity at the wrap-around points.
What you could try instead is a (FFT fast) cross-correlation between a zero-padded copy of the data agains... | https://dsp.stackexchange.com |
34,743 | [
"https://electronics.stackexchange.com/questions/34743",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/8713/"
] | I've been making some coils with wires and I find out that sometimes they work and sometimes they don't work at all, the inside of those that don't work are some what more "silver-ish", more "metal-ish" like iron. While the coils that do work do look more thin like copper. Does the conductive material used for the coil... | The core is very important in making a successful inductor, as a good core massively increases permeability (the ability for magnetic currents to flow effectively in the core - a lot like inverse electrical resistance (conductance.)) However, adding a core introduces a saturation characteristic; if the current approac... | Definitely the conductive material itself will matter - different materials will have different resistance and so for the electrically equivalent circuits you will need different wire cross-sections and that will significantly affect winding size.
Now to "silverish" vs "copperish". The deal is you need the winding tur... | https://electronics.stackexchange.com |
484,026 | [
"https://physics.stackexchange.com/questions/484026",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/233638/"
] | In the 2019 miniseries "Chernobyl", ordinary objects are depicted as being capable of becoming radioactive, such as clothes, water, stones.
How exactly does something composed of a non-radioactive mass, become radioactive?
I'm aware of the differences between alpha, beta, and gamma radiation, and I know how ionizing ... | There are <strong>three</strong> main effects:
The <strong>first</strong>, and simplest, is particulate contamination. The uranium fuel rods were pulverized in the explosion and so dust particles contaminated with uranium and other isotopes (fission products in the fuel rods) were scattered to the wind. Don't underest... | I ran a measurement lab in Surrey during the Chernobyl crisis and carried out whole-body measurements of many people, including bus-loads of school children returning from the general area.
What I detected was primarily "U235 fission fragments" (Google the quotes) which are the unequal sized 'halves' of 235 - lots of ... | https://physics.stackexchange.com |
3,373,874 | [
"https://math.stackexchange.com/questions/3373874",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/244966/"
] | I am trying to prove that conditional independence does not imply independence, ie that <span class="math-container">$P(A|C)P(B|C)=P(A \cap B|C) \nRightarrow P(A \cap B)=P(A)P(B)$</span>
I guess I need a counter-example but I am struggling to find a way of homing in onto one.
So far I have tried drawing Venn diagra... | Recall that the cross product <span class="math-container">$a\times b$</span> is characterized by the property that
<span class="math-container">$$
\det(x,a,b)=\langle x,a\times b\rangle, \qquad \forall x\in\mathbb{R}^3.
$$</span>
Now let <span class="math-container">$R\in\mathcal{SO}(3)$</span>. Then by using the f... | The simplest approach I see is the following,
<span class="math-container">$$\langle R(a\times b), Ra\rangle = (Ra)^TR(a\times b)$$</span>
<span class="math-container">$$=a^T(a\times b)=\langle a\times b, a\rangle =0$$</span>
Similarly,
<span class="math-container">$$\langle R(a\times b), Rb\rangle = 0$$</span>
Hence,... | https://math.stackexchange.com |
365,940 | [
"https://softwareengineering.stackexchange.com/questions/365940",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/36526/"
] | Once in a while, I leave comments like
<pre><code># We only need to use the following for V4 of the computation.
# See APIPROJ-14 for details.
</code></pre>
or
<pre><code># We only need to use the following for V4 of the computation.
# See https://theboringcompany.atlassian.net/browse/DIGIT-827 for details.
</code>... | I would try to avoid such comments. Although I think there is a place for them where you have a particularly annoying requirement. Which without, anyone might want to refactor the code. eg.
<pre><code>//must log to the database instead of standard logging,
//stupid requirement from those crazy DBAs!! see TKCT-1234
</... | For Code Comments, there is very little usefulness. For version control comments, they are very useful for reasons outlined below.
Code comments really should be used to help understand the <em>intent</em> of complicated things.
Bad types of code comments:
<ul>
<li><code>Updated EHS 10/24/2015</code> -- if I wanted... | https://softwareengineering.stackexchange.com |
2,664,988 | [
"https://math.stackexchange.com/questions/2664988",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/238156/"
] | I know that the $p$-adic integral defined by
$$
\log_p(1 + x) = \sum_{n=1}^{\infty} \frac{(-1)^{n+1} x^n}{n}
$$
is well defined for $x \in \mathbb{C}_p$, the completion of the algebraic closure of $\mathbb{Q}_p$, with $|x|_p < 1$.
I am wondering how does one see that
$\log_p(1 + x) \in \mathbb{Z}_p$ given $x \i... | This is easier than it looks:<br>
Using additive valuation, for which $v_pp=1$, so that $\vert z\vert_p=p^{-v_pz}$, we have $v_p(x^n)\ge n$, while $v_p(n)\le\log_p(n)$. Thus $v_p(x^n/n)\ge1$, so the sum is in $p\Bbb Z_p$.
| You first need the following fact on series in the $p$-adics:
The series $\sum_{n=1}^\infty a_n$ converges if and only if $|a_n|_p \to 0$ as $n \to \infty$.
The sufficient part is of course incorrect if we take the normal norm on $\mathbb R$, but this is true for non-archimedean norms, like the $p$-adic norm.
Let $a... | https://math.stackexchange.com |
2,584,781 | [
"https://math.stackexchange.com/questions/2584781",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/517233/"
] | Attempt no 2.
Well, it is my first question here, so you may expect some errors, even in grammar, because english is not my mother language. So, I was asked to 'verify' the Stokes Theorem in these questions, and I would like to use differential forms, because it is the content that we are discussing now (and by verify ... | Stokes' theorem says $\int_\Sigma d\omega=\int_{\partial\Sigma}\omega.$
For part a), on the left-hand side integrand $d\omega=3dy\wedge dx+2dx\wedge dy=-dx\wedge dy.$ So our integral is
$$
\int_\Sigma d\omega=-\iint_\Sigma dx\,dy=-\int_{-1}^{+1}\int_{-\sqrt{2-2y^2}}^{+\sqrt{2-2y^2}}dx\,dy=-2\int_{-1}^{+1}\sqrt{2-2y^2... | a) By Greens / Stokes theorem:
$\oint (x+3y)\ dx + (2x-y)\ dy = \iint \frac {\partial}{\partial x} (2x-y) - \frac {\partial}{\partial y}(x+3y) \ dA$
Left side first:
$x = \sqrt 2 \cos t\\
dx = -\sqrt 2\sin t\\
y = \sin t\\
dy = \cos t$
$\int_0^{2\pi} -2 \cos t\sin t - 3\sqrt{2}\sin^2 t + 2\sqrt 2\cos^2 t - \sin t\c... | https://math.stackexchange.com |
59,609 | [
"https://stats.stackexchange.com/questions/59609",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/25918/"
] | I'm working on my BSc dissertation currently. One of my variables is created using the ratio of one continuous (mostly) normally distributed variable to another.
The distribution of ratio is very highly leptokurtic with outliers (kurtosis/s.e. = 183) and I was wondering if there was any transformation that I could use ... | It is a mistake to suppose that there is a good statistical solution that can be identified regardless of what the science (or economics, or whatever) is here. Why are you calculating a ratio in the first place? Is that essential, standard, conventional, or just a way of combining variables that seemed possible? Would ... | Is this variable going to be an independent variable in some sort of regression? A dependent variable? Or what? Transforming it to normality may not be necessary, depending on how you plan to use the variable.
BUT.....
If you <em>do</em> need to use the two variables as one variable <em>and</em> you need it to be no... | https://stats.stackexchange.com |
3,455,022 | [
"https://math.stackexchange.com/questions/3455022",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/729691/"
] | How do I formally prove that <span class="math-container">$p \lor q$</span> can be written as <span class="math-container">$q \lor p$</span> using natural deduction? I realize this may very well be trivial but still can't properly prove it.
| <span class="math-container">$X = \Bbb{R} \smallsetminus \{0\}$</span>. Here <span class="math-container">$\partial X = \{0\}$</span>, but <span class="math-container">$0 \not \in X$</span>. Notice that <span class="math-container">$X = \mathrm{int}\,X$</span> here.
| <span class="math-container">$M=\Bbb R$</span> and <span class="math-container">$X=\Bbb Q$</span> (usual metric).
<span class="math-container">$\partial X=\Bbb R$</span> which is not a subset of <span class="math-container">$X-\emptyset=\Bbb Q$</span>.
| https://math.stackexchange.com |
205,416 | [
"https://security.stackexchange.com/questions/205416",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/94422/"
] | I have noticed that Firefox and Chrome have opened ports for unsolicited inbound traffic in the Windows firewall. This happened with Windows 7 x64 and Windows 10. (Here, I am talking about the standard firewall integrated in recent Windows versions, not some third-party product).
Normally, when a program tries to chan... | One option would be to use Windows access controls to prevent changes to the firewall rules. If you first set the rule to Disabled (or simply deleted it), and then changed the ACLs on the firewall rule storage, it should be possible to avoid the rules re-appearing. While any administrator account <em>could</em> overwri... | You have reached one limit on <em>computer security</em>. Best practices ask to only allow elevated priviledges for so called <em>trusted</em> programs. But we all know that for common usage, we have to trust the OS and the browser<sup>(*)</sup>. The problem that your are facing is that is one of this products does som... | https://security.stackexchange.com |
27,096 | [
"https://softwareengineering.stackexchange.com/questions/27096",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/8810/"
] | Note: I'm not sure if this question is more suitable for Stack Overflow or Programmers. The thought process behind putting it here was that it doesn't actually relate to coding itself.
I noticed a small freeware utility I have on my computer uses a couple of DLLs. From their names ("RenderAllChunks" and "RenderSlice... | Dynamic libraries are good for drivers, because they use a standardized interface where the OS can hook right into the code and not bother with command line arguments and crazyness if it were an application instead. For the same reason they're good for providing a common functionality to any program that wants to use ... | My rule is if it is a logical chunk of code that can perform a function or groups of functions that has a possibility of reuse it should be in a dll. dll Should not contain only one function or functions that can only work dependent on other functions in another dll.
| https://softwareengineering.stackexchange.com |
51,808 | [
"https://astronomy.stackexchange.com/questions/51808",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/48970/"
] | <ul>
<li>Also, is proxigean spring tide a special case of perigean spring tide
?</li>
<li>Are there other kinds of tides other than spring, neap, proxigean
spring, and perigean spring tide ?</li>
</ul>
| A perigean spring tide is a spring tide (one which occurs at new or full moon) that is co-incident with the moon's perigee.
But the moon's motion is not simple. The eccentricity of the moon's orbit varies (between 0.026 and 0.077) due to the effect of the sun's gravity. When the moon's orbit is more eccentric it's per... | A quick Google search reveals that a perigean spring tide occurs when the Moon is at its perigee, while a proxigean spring tide occurs when the Moon is at its perigee <strong>and</strong> new at the same time (or very nearly so).
| https://astronomy.stackexchange.com |
187,696 | [
"https://security.stackexchange.com/questions/187696",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/2075/"
] | I'm studying for the CCSP exam and I'm a little confused on the difference between "Risk Appetite" and "Risk Tolerance". Is there a clear and discernible difference? Can the terms be used interchangeably?
To me, both terms are referring to the amount of risk that an organization (or more accurately, the governance a... | Security through obscurity is <em>Always</em> worse than an alternative which would be compliant with Kerckhoff's principal.
However, sometimes this is simply not possible. One good example of this is DRMs. With DRM, the content distributor wants to protect a content which he gives to the user. It is not possible in t... | There is an evolutionary arms race between those who want to stop spam and those who want to profit off spam. Tactics that only work for a while are valuable if they are cheap to implement, as spam tactics change rapidly.
In addition, because spammers gain value from deploying cheap attacks in addition to sophistica... | https://security.stackexchange.com |
9,724 | [
"https://dsp.stackexchange.com/questions/9724",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/3607/"
] | I would like to estimate the peak-to-peak amplitude of a periodic signal whose frequency components are known. This is, I have the frequency spectrum (a peak in the fundamental frequency and other peaks in its harmonics) and I would like to compute the peak-to-peak amplitude. Is that possible without reconstructing the... | Suppose that we have a continuous-time periodic signal
$\displaystyle s(t) = a_0 + \sum_{n=1}^N a_n \cos(n\omega_0 t + \theta_n)$.
What does this mean? Do we have a trace of $s(t)$ on some recorder chart
and the trace looks periodic? If we did, the question to be solved would be
trivial since we could simply <em>mea... | For periodic signals, the maximum peak-to-peak amplitude is dependent in the relative phase of each harmonic, as well as their magnitudes. Do you have that information? If so, you can numerically evaluate all the local maxima and minima and sort.
| https://dsp.stackexchange.com |
161,892 | [
"https://physics.stackexchange.com/questions/161892",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/71755/"
] | I'd like to apologise if this question is stupid or if it was asked ten thousand times - I haven't found an answer to it. Quite possibly due to mediocre English or abominable knowledge of physics.
So, let's say that we're able to convert 100% of energy that falls on photovoltaic cell to electricity. This means that NO... | Just for your self verification, you could though do the calculus in the $x$ representation,
$$
{(1) \ \langle p^2 \rangle = -\hbar^2\int_{-a}^a\psi^*\frac{d^2}{dx^2}\psi} \,dx .
$$
where I understand that you assume units in which $2m = 1$.
Now, the derivative of the step ascending function is which goes up at $x=... | You can also look at this problem from a practical point of view. If you even take a smoothed (allowed) version of a rectangular window $\psi$ function, you will end up with very steep "edges" of your function. And now from mathematical point of view you will have very big values of derivative around $-a$ and $a$ (whic... | https://physics.stackexchange.com |
122,175 | [
"https://softwareengineering.stackexchange.com/questions/122175",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/39255/"
] | So, I've sort of reached a point where I want to start developing a website. Originally, I planned to build said website using PHP and CodeIgniter, I'm familiar with both, but, truth be told, I'm not too fond of either. I find they just get rather messy, CodeIgniter helps somewhat, but no matter what, it seems that mos... | You answered it yourself: you prefer to code in Python and in Ruby rather than in PHP, and you are more familiar with Python out of the two.
So Python it is, and Django as the framework, as it's the most popular one (meaning you'll find more information/tutorials for it).
| I think Ruby on Rails is your answer. It is designed for web applications. It supports clean code and agile development.
| https://softwareengineering.stackexchange.com |
203,255 | [
"https://mathoverflow.net/questions/203255",
"https://mathoverflow.net",
"https://mathoverflow.net/users/70686/"
] | Suppose $X, Y$ are two positive random variables such that $\mathbb{E}[X^\alpha] = \mathbb{E}[Y^\alpha]$ for all $\alpha \in (0, 1/2)$.
It is also known that the first moment exists for each of them, but a priori one does not know if the first moments are equal.
(It is also known that all negative moments exist, but i... | The argument from the paper Carlo linked to (which, by the way, is essentially a classical result of Cramer's) can be adapted to your situation.
Consider the moment generating function $f(z) = Ee^{z\ln X}$ of the random variable $\ln X$. By your assumption, this is well defined for $0\le \textrm{Re}\, z<1/2$. Moreo... | The answer to your question is "Yes", as was shown in <A HREF="http://www.cma.fct.unl.pt/sites/www.cma.fct.unl.pt/files/documentos/publicacoes/pdf_2005/CMA%2013-2005.pdf" rel="nofollow">When Do the Moments Uniquely Identify a Distribution,
</A> by Carlos A. Coelho, Rui P. Alberto and Luis M. Grilo:
<blockquote>
In t... | https://mathoverflow.net |
2,450,007 | [
"https://math.stackexchange.com/questions/2450007",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/479106/"
] | Show that if $x\in Q^p$, then there exists $-x\in Q^p$ where $$Q^p=\{a_{-l}p^{-l}+a_{-l+1}p^{-l+1}+...|l\in Z,a_i\in\{0,1,...,p-1\}\}$$ and p is a prime number.
Actually I don't quite understand p-adic numbers and how addition and multiplication work in this number system. For this question, I think I need to find a ... | For instance, the discrete topology on the set $\Bbb Z$ or $\Bbb R$ can be generated by a discrete uniformity with a base $\{\Delta\}$ or by a uniformity with a base $\{U_n:n\in\Bbb N\}$, where $U_n=\{(x,y): x=y$ or $x,y\ge n\}$.
| In fact almost any uniform space is an example: a Tychonoff (so uniformisable) space $X$ is called "almost compact" if there is a unique uniformity that induces its topology. It turns out the there are the spaces $X$ where $\beta(X)\setminus X$ has at most one point. It includes the compact (Hausdorff) spaces, and als... | https://math.stackexchange.com |
28,912 | [
"https://physics.stackexchange.com/questions/28912",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/9409/"
] | I have this general wave equation:
\begin{equation}
\dfrac{\partial^2 \psi}{\partial x^2}+\dfrac{\partial^2 \psi}{\partial y^2}-\dfrac{1}{c^2}\dfrac{\partial^2 \psi}{\partial t^2}=0
\end{equation}
And the following transformation : $t'=t$ ; $x'=x-Vt$ and $y'=y$
The solution to this has to be :
$$\dfrac{\partial^2 \p... | You must first rewrite the old partial derivatives in terms of the new ones. A priori, they're some linear combinations with coefficients that could depend on the spacetime coordinates in general but here they don't depend because the transformation is linear. The rules
$$ t'=t, \quad x'=x-Vt,\quad y'=y $$
get translat... | transformation rule for partial derivatives:
$$ \frac{\partial}{\partial x_{\mu}} = \sum_{\nu} \frac{\partial x'_{\nu}}{\partial x_\mu} \frac{\partial}{\partial x'_{\nu}}$$
| https://physics.stackexchange.com |
698,342 | [
"https://physics.stackexchange.com/questions/698342",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/330137/"
] | <ol>
<li>If an object is moving upwards with constant velocity in which upward force is supplying energy and gravity is extracting energy till height (<span class="math-container">$h$</span>), so from where it gained potential energy?
</li>
<li>Please also answer why gravitational potential energy increases with increa... | You can think of the Fock space vacuum state as being a tensor product like
<span class="math-container">\begin{equation}
|{\rm vac}\rangle = |0\rangle_1 |0\rangle_2 |0\rangle_3 \cdots |0\rangle_n \cdots = \prod_{k=1}^\infty |0\rangle_k
\end{equation}</span>
(no one actually ever writes this explicitly but I am just tr... | The index <span class="math-container">$j$</span> in <span class="math-container">$\hat{a}_j$</span> refers to a mode from which a particle is annihilated.
If you say there is one photon, that doesn't completely specify the quantum state of this photon. The photon might be a standing wave in a box-shaped cavity, for ex... | https://physics.stackexchange.com |
479,455 | [
"https://electronics.stackexchange.com/questions/479455",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/54282/"
] | I am using an ESP32, which has two i2c buses.
I am thinking of adding multiple devices to each bus (a total of 20 devices, 10 devices per bus).
The maximum length of any device on a bus from esp32 will be less than 1 metre.
The connected devices are of two kinds:
1. Sensors - they return data
2. Motor drivers (drv26... | <blockquote>
The BTA54WS is a Schottky diode, but still in the parameter range.
</blockquote>
Schottky diodes are the fastest and good as well. It will be helpful in rapidly switching load but rather costlier than the cheap 1N400x series.
Chosen breakdown voltage of the diode shall be 8 to 10 times the supply. The... | Standard 1N4148 and compatible should work just fine, as it is a relatively fast small signal diode. 1N400x should also work but it is mainly meant for rectifying of mains voltage frequencies so it is not so fast, and otherwise overkill specs-wise. Since the current via relay is max 60mA, initial surge current via diod... | https://electronics.stackexchange.com |
30,234 | [
"https://dba.stackexchange.com/questions/30234",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3787/"
] | I have a system to assign score for each sentence stored in a column:
<strong>TABLE 1: word_scores</strong>
<pre><code>word score
this 3
is 4
a 5
test 1
another 0
sentence 8
</code></pre>
<strong>TABLE 2: sentences</strong> (score column is calculated from TABLE 1)
<pre><code... | Bascially yes, there's a way to do that.
Here's a select statement that gets you each sentence with it's score
<pre><code>SELECT
PARSED_SENTENCES.sentence, SUM(COALESCE(WordScores.score, 0)) score
FROM (
SELECT sentence,
SUBSTRING(
sentence
FROM CASE
WHEN INDEX_TABLE.POS =... | Under some reasonable assumptions:
<pre><code>select sentence, SUM(score) score
from sentences join word_scores
on sentence like concat('% ',word,' %')
or sentence like concat(word,' %')
or sentence like concat('% ',word)
group by sentence;
</code></pre>
| https://dba.stackexchange.com |
396,738 | [
"https://electronics.stackexchange.com/questions/396738",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/159890/"
] | Suppose that you have a design that has had an error after running 14, 18, and 20 hours. You're not exactly sure what is causing the error, but you make a change to the design that MIGHT fix it.
How long do you have to run without seeing an error until you can be 99% sure that you've fixed the problem?
Note that th... | Back in the 1980s, when I was designing motherboards for engineering workstations, we did two kinds of testing:
<ul>
<li>DVT - Design Verification Testing - run a small number of systems at the limits of their ranges for voltage, frequency and temperature (8 corners), looking for any problems with the design margins.<... | Part of the way I did DVT's different from everyone else was to verify the all the design specs including HALT/HASS with margin measurements, not just pass-fail.
The objective is not unique to raise stress levels to a non-destructive fault level but rather find a way to find how to measure the margin to error or fun... | https://electronics.stackexchange.com |
21,977 | [
"https://mathoverflow.net/questions/21977",
"https://mathoverflow.net",
"https://mathoverflow.net/users/5259/"
] | Can any one give an example of a 3-fold X which contains an embedded ample divisor $D \cong CP^2$
with normal bundle $O(3)$ in X?
| Let me give an attempt of a proof of the fact that such example does not exist.
Proof. Suppose $X$ is such a $3$-fold and let $L$ be the line bundle corresponding to the divisor $\mathbb CP^2$. First we will prove that $Pic(X)=\mathbb Z$ and then will get a contradiction.
Notice that $L$ has a lot of sections. In ... | There exists such variety which is singular with Gorenstien singularities.
Let $S$ be a del Pezzo surface of degree $d$ and let ${\mathcal L} = O_S(−K_S)$.
Consider the $\mathbb P^1$ -bundle
$\mathbb{P} = \mathbb{P}_S (\mathcal{O}_S \bigoplus \mathcal{L})$.
Now the variety $X$ can be constructed as a contruction o... | https://mathoverflow.net |
28,391 | [
"https://mechanics.stackexchange.com/questions/28391",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/16468/"
] | Not sure where to ask this, so feel free to move it if necessary.
Suppose I want to buy a car from my friend for $8,000. To avoid registration costs, I pay him a measly $500 for the car and $7,500 for helping me brush my dogs (or something else insignificant... you get the idea).
Would this minimize the cost of regis... | The rules depend on the state, but if you're telling the state you paid less than you did, that's Tax Fraud.
In Texas, they don't even let you do this, however. The state maintains what is basically a "Blue Book" database of car prices, and you have to pay tax on whatever they value the car at for a minimum. I'm sur... | It entirely depends on your jurisdiction, and possibly on the vehicle itself. In my county in Texas, they recently changed the law to put a stop to just the kind of thing you're talking about. Instead of charging sales tax or registration as a percentage of the price (which someone might report as being $100, even thou... | https://mechanics.stackexchange.com |
4,344,109 | [
"https://math.stackexchange.com/questions/4344109",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1009858/"
] | Is there a possible way to integrate <span class="math-container">$\exp(-x^2)$</span> in a <strong>bounded</strong> 2D triangular region numerically with minimal number of Gauss points? The Gauss-Hermite quadrature scheme is suitable for unbounded regions. I have tried Gauss-Legendre scheme but with 3~5 points the res... | The linearity of the integral, that of the inner product and the Schwarz inequality imply, for any <span class="math-container">$\vec v\in \mathbb R^n,$</span>
<span class="math-container">$\tag 1\left \langle \int_a^bF(t)dt,\vec v\right \rangle=\int_a^b\langle F(t),\vec v\rangle dt\le \int_a^b|\langle F(t),\vec v\rang... | The exact proof depends a little on what definition of integral you are using, but the following observation is the key...
<span class="math-container">$$\vert \sum_i \vec{F}_i \Delta t \vert \leq \sum_i \vert \vec{F}_i \vert \Delta t $$</span>
This holds for any choice of vectors <span class="math-container">$F_i$</sp... | https://math.stackexchange.com |
125,544 | [
"https://mathoverflow.net/questions/125544",
"https://mathoverflow.net",
"https://mathoverflow.net/users/32416/"
] | Given a connected finite graph G with degree at least 2 at each vertex, what are the conditions G needs to assume in order to attach 2-cells so that the CW- complex is a closed compact surface(2 - manifold).
| It suffices to consider a connected graph. Start from a point, which is the 1-skeleton of a sphere. By induction, consider a connected graph $G$ and an edge $E$, and let $S$ be the surface in which the complementary graph $G \setminus E$ is embedded as the 1-skeleton of a CW structure.
If $E$ disconnects $G$ into two ... | As Lee Mosher says, any graph is the 1-skeleton of an (oriented) surface with boundary. Here's a different proof. Take a generic (in the differential topology sense) map of the graph to the plane. This will be an embedding except for under/over-crossings in the interior of the edges of the graph. Now consider a thi... | https://mathoverflow.net |
27,087 | [
"https://dsp.stackexchange.com/questions/27087",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/16989/"
] | For example, let's assume a system given as
<pre><code>y[n]-9y[n+2]=x[n]
</code></pre>
I convert the difference equation to
<pre><code>y[n]=(y[n-2]-x[n-2])/9
</code></pre>
and say that "the system is causal" and "not-memoryless" since it depends on past values of its output. But could it be possible to define a sys... | By definition, the output of a causal system cannot depend on any future input or output values. However, I think there is a misunderstanding in your question. Suppose you are given the following difference equation:
$$a_0y[n+1]+a_1y[n]+a_2y[n-1]=b_0x[n]\tag{1}$$
The important point is that it is not possible to say ... | Every time you have something like $y(n) = y(n+1) + x(n)$, you can convert it to something like $y(n) = y(n-1) - x(n-1)$, by substituting $n \rightarrow n-1$. So, depending on future values of the output is equivalent to depending on past values.
| https://dsp.stackexchange.com |
26,987 | [
"https://electronics.stackexchange.com/questions/26987",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/7672/"
] | I have a USB cable connected to a USB modem.
On a specific time of day (say, at midnight - but it should be configurable) I would like to open the circuit for a few seconds.
The result should be equal to me unplugging the device, waiting a few seconds, and plugging it again.
What would I need to make such a circuit?... | If you want a solution that is easily enough implemented [tm} without too much expert knowledge or experience you could use an off the shelf domestic event timer and a relay.
(1) Time period generator
You can buy timers which are user settable and which count down to zero, sound an alarm for typically one minute the... | Do you really want to open all the wires? Cutting the +5V should be enough, and that could be done with a solid-state relay controlled by a PIC or AVR, and that's practically all the components you need (except some resistors and capacitors, of course). The timing logic could be programmed in the uC with a lot of flexi... | https://electronics.stackexchange.com |
194,914 | [
"https://electronics.stackexchange.com/questions/194914",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/57437/"
] | I am planning on carrying out a design using the CP2102 Interface IC. The cheapest price I can source (for bulk purchase of 1500 parts) is from Digikey at 2.34$/piece. A price of 2.34$ is approximately 151 Indian rupees.
However, CP2102 modules (with usb connectors etc.) are available on ebay India for prices as low ... | The cheapest you can find at digikey is still pretty far from the cheapest you can actually buy it because you are still going through a distributor.
If you want to actually buy it cheaply, you go to silicon labs or the fabrication plant directly. For instance, they can be ordered for about 85 cents each in quantities... | So you want to make an Interface Module, using an Interface IC, but you find that buying the IC from Distributors Inc costs the same as an entire module (including connectors) from Shenzen Inc via well known auction site, FortyThieves.com.
Assuming the question is not <em>"Where should I buy to get the best prices?"</... | https://electronics.stackexchange.com |
50,867 | [
"https://biology.stackexchange.com/questions/50867",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/21277/"
] | I am currently trying to see if 2 bacteria contains plasmids or not. I had used promega plasmid extraction kit on the bacteria. I ran a gel electrophoresis (.8% gel) with the extract product, however its not showing the presents of any DNA. I also ran the product through Nanodrop (2000) and these where the concentratio... | I don't know how much culture volume you used, but the amounts you have look more like a medium/high copy plasmid. I don't know if that's what you'd expect for a natural plasmid.
In addition to the other answer, it could also be sheared genomic DNA, cosmid (that would run too high on your gel to see), or maybe just n... | Having a positive reading on the Nanodrop but no band on the gel can be due to a number of different issues (not exhaustive):
<ol>
<li>An incorrectly zeroed sample</li>
<li>Incomplete staining of the gel</li>
<li>Contamination of the sample</li>
<li>Human errors in loading of samples</li>
</ol>
You should try to excl... | https://biology.stackexchange.com |
167,571 | [
"https://chemistry.stackexchange.com/questions/167571",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/126941/"
] | In the classic description of how greenhouses gases are increasing the temperature of Earth's surface, shorter wavelengths of light like visible and ultraviolet (UV) penetrate the atmosphere, hit the ground, and come back as infrared light that cannot pass through the carbon dioxide in the atmosphere. According to my r... | <span class="math-container">$\ce{CO2}$</span>, like all other matter, can only absorb photons of energies corresponding to some kind of quantum transition with a high transition probability, whether that is a rotational, vibrational, electronic, or nuclear transition. These possible transitions are not continuously di... | Your first question. A CO2 molecule can absorb many quanta one after the other provided the wavelength is correct and there are sufficient number of photons /second. This can happen if you excite with a v powerful ir. laser. Normally, in the atmosphere, the number of photons is so small that the CO2 has radiated the ex... | https://chemistry.stackexchange.com |
4,061 | [
"https://physics.stackexchange.com/questions/4061",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1375/"
] | Question goes: "An anvil hanging vertically from a long rope in a barn is pulled to the side and raised like a pendulum 1.6 m above its equilibrium position. It then swings to its lowermost point where the rope is cut by a sharp blade. The anvil then has a horizontal velocity with which it sails across the barn and hit... | For any nonzero gravitational acceleration we know:
(1) Horizontal kinetic energy at impact = .16 time vertical KE at impact 1.6/10
(2) Thus horizontal velocity at impact is .4 times vertical velocity at impact.
(3) The time averaged vertical velocity is half of the end velocity.
So the average horizontal vel is .8 ... | Just a quick comment:
It is always best to give every quantity a symbol and perform all algebraic manipulations on the symbols; you then substitute in numerical factors at the very end.
In this particular case, you can call $h=1.6\textrm{ m}$ and $H=10\textrm{ m}$, which makes your calculation look like:
$$mgh=\frac{... | https://physics.stackexchange.com |
29,848 | [
"https://biology.stackexchange.com/questions/29848",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/-1/"
] | This question is about substances such as insulin and some vitamins that the human body is able to produce on its own.
Some substances that are produced by the body are also present in various body building supplements.
What I wanted to ask is, is there evidence that ingesting these types of substances for prolonged ... | Yes it is possible but in most cases it will not occur as the body simply halts production. The most infamous manifestation of this is in adrenal insufficiency. That's where when we take glucocorticoids (e.g. prednisolone used in management of lots of inflammatory diseases like asthma and autoimmune diseases) for a pro... | Mostly no. For example, if a non-diabetic person were to be injected with a small amount of insulin, the pancreas would halt its own production of insulin and, if the dose was too large, begin producing glucagon, which stimulates the liver to produce more glucose to match the dose of insulin. If these periodic doses co... | https://biology.stackexchange.com |
3,413,958 | [
"https://math.stackexchange.com/questions/3413958",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/640047/"
] | Given the problem:
<span class="math-container">$y’’+16y=\cos(4x)$</span>
It’s particular <span class="math-container">$y$</span> is equal to zero. I know how to get the complementary <span class="math-container">$y$</span> but I had problem with the particular <span class="math-container">$y. $</span>
<span class="m... | The central problem here is that the RHS of your original DE contains only terms that are also in the homogeneous solution
<span class="math-container">$$y_h(x)=A\cos(4x)+B\sin(4x). $$</span>
Thus, the LHS is going to annihilate your choice of a particular solution. What to do? This is precisely the situation in which ... | <span class="math-container">$y_1 = \sin(4x)$</span> and <span class="math-container">$y_2 = \cos(4x)$</span> are solutions to the homogeneous equation. So by definition they are expected to cancel out. You need to try for a particular <span class="math-container">$y$</span> in the form of <span class="math-container">... | https://math.stackexchange.com |
225,551 | [
"https://mathoverflow.net/questions/225551",
"https://mathoverflow.net",
"https://mathoverflow.net/users/8385/"
] | Let $\ p_1\ < p_2 < \ldots\ $ be the sequence of all primes $\ (2\ 3\ 5\ \ldots)$.
Let $\ x_1 < x_2 < \ldots\ $ be an arbitrary increasing sequence of positive integers such that $\ x_n\le p_n\ $ for every $\ n=1\ 2\ldots\,$.
<strong>QUESTION:</strong> Does sequence $\ (x_1 < x_2 < \ldots)\ $ contai... | It is open. Best current results in the quantitative version of Roth's theorem belong to Sanders and allow to find 3-term arithmetic progression between something like $O(n/\log^{1-\varepsilon} n)$ numbers not exceeding $n$, for any given $\varepsilon>0$.
UPD: already not to Sanders, but to Bloom (see quid's commen... | Your condition seems to be more easily stated as $x_n \le p_n$, where $p_n$ is the $n$th prime. By König's Lemma, your first question is equivalent to asking whether there are arbitrarily long sequences which avoid a 3-AP, and if (as one ought to suspect) there aren't, we will be able to confirm this with a finite case... | https://mathoverflow.net |
318,544 | [
"https://softwareengineering.stackexchange.com/questions/318544",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/202412/"
] | So, I've written some fairly big code for cent OS 7.1. The code essentially makes use of different command line tools by parsing the text output and shoving it in a database... pretty straight forward.
Now I'm tasked with making this code run on Ubuntu, cent OS 6, and potentially other flavors. The code of concern is ... | From a speed point of view, <strong>your Computer is most likely much faster than the server</strong> you have for your website/web-application, so <strong>it would make more sense to resize on the client,</strong> than on the server.
I have a Java application where I change certain color pixels to another color, and ... | If disc space is the only constraint then it doesn't matter which end resizes the image. The client might do it slightly slower than the server or the server may be overloaded with clients sending many images so its a judgement call for you to make based on expected usage patterns.
However, there is one good reason fo... | https://softwareengineering.stackexchange.com |
94,685 | [
"https://stats.stackexchange.com/questions/94685",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/37976/"
] | I was making an attempt to solve the following problem sets, however, my answer <strong>15.913</strong> seemed quite different from that in the answer key <strong>16.84</strong>. I have checked my answer a few times and re-doing the question as well, but I was consistently pulled back to the same outcome of <strong>15.... | There is an error in the sum of xi² for the old sample. I think you mix the sum of squares and the square of sum.
<strong>Old Sample</strong>
n=30, sample mean = 42, s= 6.4, Sum(xi) = (30)( <strong>42</strong> ) = 1260, <strong>(Sum(xi) )^2 /30</strong> = (30)(<strong>42</strong>^2) = 52920
You should try to demons... | I believe that your concept is alright. However, you should explore how you obtained the sum of $x_i^2$. Your method of calculation may be incorrect. So I would advise you to explore how you should use standard deviation to obtain the desired result.
$s^2 = \frac{\sum{[x_i- \frac{\sum x_i}{n}}]^2}{n-1} $
| https://stats.stackexchange.com |
431,482 | [
"https://physics.stackexchange.com/questions/431482",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/194807/"
] | I know that at home the electric circuits are parallel, and this explains why if one appliance (eg bulb) fails, everything else continues to work, but if more devices are added in parallel to each other, their combined resistance should decrease, and thus the total power supplied by them should increase, as <span clas... | To minimize your power consumption and save on electricity bills, you actually want to <em>maximize</em> your home's equivalent resistance, for the reason you mention. This is done when every appliance is turned off, because each turned-off appliance has (approximately) infinite resistance (up to some current leakage).... | The power will increase .See the formula given carefully <span class="math-container">$V^2/R$</span>. For constant voltage power is inversly propotional to resistance.As we add one more resistance in parallel overall resistance decreases and hence power increases.Or you can also think in the way if overall resistance d... | https://physics.stackexchange.com |
677,197 | [
"https://physics.stackexchange.com/questions/677197",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/316717/"
] | I've learnt that <span class="math-container">$W=Fs$</span> (or <span class="math-container">$dW= \mathbf{F}\cdot d\mathbf{s}$</span>). If I apply that here, <span class="math-container">$W$</span> by the force I apply=0.
However, frictional force also acts on the body, and I thought that some work needs to be done to ... | <blockquote>
found mathematical explanations speaking of orthogonal vectors and Maxwell's equations and vector products
</blockquote>
This is true and these mathematical explanations are also consistent with what we find physically. If you accept that Maxwell's equations consistently describe electromagnetism and lead ... | The electric and magnetic fields are generally <em>not</em> perpendicular. Presumably you're thinking of electromagnetic waves propagating in vacuum, in which case the electric and magnetic fields are perpendicular to each other and to the direction of propagation of the wave. But of course, this is not <em>always</e... | https://physics.stackexchange.com |
170,181 | [
"https://electronics.stackexchange.com/questions/170181",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/24564/"
] | Given a standard LDO with no soft start, that provides power to a bunch of decoupling capacitors, and a single chip. How do you calculate the rise time of the output rail ahead of time? Is it based on the time constant of the Rds of the internal FET into the decoupling capacitors and somehow minus the current draw o... | One reasonable guess would be to multiply the decoupling capacitance times the output voltage and divide by the output current limit. In most cases the current limit will probably be high enough that you can ignore the load current.
Expect it to be on the optimistic side if the load capacitance is very low and it thu... | If I recall correctly from my university days ( a long time ago), it takes about 4 (four) time constants for the voltage to rise to the maximum value.
It's exponential, asymptotic if I recall, so it never actually gets to the maximum.
Something like 3 or 4 time constants is about close enough.
So you'd need to calcul... | https://electronics.stackexchange.com |
425,496 | [
"https://physics.stackexchange.com/questions/425496",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/203232/"
] | I just learnt the formula for calculating Electric Potential Energy
$W=\frac{1}{C}\int_0^Qqdq = \frac{1}{C}[\frac{1}{2}q^2]_0^Q=\frac{Q^2}{2C}$
I understand the methodology, but what I do not understand is how one can extract the $\frac{1}{C}$ as if it were a constant, when C itself actually depends on q and Q (as $C... | This is an important misconception. When considering a capacitor with capacitance C, the capacitance is a geometric quantity. It only depends on the structure of the capacitor, so it does not depend on the charge or potential. Your formula just tells you how much charge Q you can store given a potential V and a capacit... | For adding more q it will consequently increase the V so the ratio of q/V remains constant if I thought your way.
| https://physics.stackexchange.com |
20,249 | [
"https://cs.stackexchange.com/questions/20249",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/11837/"
] | Language:
$ L = a^{n+m}b^{n}c^{m} $
As per a recent test I gave, this language is not context free.
However, I think it is.
<strong>Corresponding Grammar:</strong>
$ X \rightarrow aXY \space |\space \epsilon $
$ Y \rightarrow b \space | \space c $
<strong>Pushdown Automata:</strong>
Keeping pushing all $a$ to t... | the corresponding grammar you gave would accept aaaabcbc. A better grammar for this problem would be
$X \rightarrow aXc$
$X \rightarrow aYb$
$X \rightarrow \lambda$
$Y \rightarrow aYb$
$Y \rightarrow \lambda$
where $\lambda$ is empty string.
| Hint for constructing a grammar: $a^{n+m} b^n c^m = a^m (a^n b^n) c^m$.
Hint for constructing a PDA: start with a PDA for $a^{n+m} b^{n+m}$.
As a bonus, you can try to solve both parts for the language $\{ a^{n+m+k} b^n c^m d^k : n,m,k \geq 0 \}$.
| https://cs.stackexchange.com |
73,675 | [
"https://mechanics.stackexchange.com/questions/73675",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/54451/"
] | Does anyone know the tool that helps stop the power steering from moving while tightening the nut??<img src="https://i.stack.imgur.com/EYl7b.jpg" alt="enter image description here">
| Does your model comes with seat belt pretensioners? Thiese would also deploy in case you have airbag deployed and must be changed.
Once both fixed you need to reset the error via diagnostic tool.
| Luckily unlike most makes, BMW airbag modules are allowed 3 "hard" resets by OBD2 (codes stored from accident).
You will need a proper scan tool or a j2534 tool to use ISTA from bmw to perform the reset.
If the module has had 3 hard resets already then the only options left are to either manually clear the codes in t... | https://mechanics.stackexchange.com |
276,636 | [
"https://physics.stackexchange.com/questions/276636",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/128421/"
] | I was taught in school that
$g=\frac{GM}{r^2}$
Integrating, I obtain
$\phi=-\frac{GM}{r}$
Mathematically, I can see that $\phi=-gr$, but why is this relationship considered wrong by my teacher? She mentioned something about $g$ not being a constant. Can someone help explain to me why it is wrong?
Thanks in advance... | There is some amount of choice involved here, so you're not stating an invariant physical fact.
<strong>First set of definitions.</strong> If you define the force of gravity as a scalar (not a vector) $g=\frac{G M}{r^2}$, and if you define $\phi=-\frac{G M}{r}$, then you do indeed have $g=\frac{d\phi}{dr}$ and $\phi=-... | You are not wrong mathematically, but you are hiding powers of $r$ inside of $g$, which could be confusing. If $g$ is a constant, then everything is fine. If $g$ is a function of $r$, don't obscure the physics; just write $\phi=-GM/r$.
@NeuroFuzzy brought up true point about $\phi$ only being defined up to a constant... | https://physics.stackexchange.com |
240,552 | [
"https://softwareengineering.stackexchange.com/questions/240552",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/-1/"
] | I'm a web developer. I feel like I develop less resource-intensive functionality often times, because I have this feeling that if I ask too much of the web app (animation, calculation, connections, etc), it will get lagged for users with slower computers.
I've been curious for a while now about just how much differen... | <blockquote>
Is there a difference in available CPU & RAM between a web app and a compiled one?
</blockquote>
You web app is running in the context of the browser and it's extensions, the browser requires some memory and CPU cycles for its housekeeping chores. That memory and those cycles are therefore unavailab... | Perhaps the easiest way to describe the difference ot a web developer is to highlight asm.js and Google's Native client.
If javascript web apps were almost as fast as compiled languages like C++ then nobody would be working on making web apps attempt to be as fast, the fact they are shows that there is a performance a... | https://softwareengineering.stackexchange.com |
36,815 | [
"https://astronomy.stackexchange.com/questions/36815",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/34354/"
] | As far as I understand, the Ptolemaic model explains day and night by postulating that the whole celestial system revolves around the Earth once every day. Since we observe the sun to move from East to West over a day, the whole system would have to move in an East to West direction once a day. But over the year, the p... | You are in a train that is moving down a railway line at high speed (100km/h).
Next to the railway line is a trail. And on the trail are some people and some bikes. Some people are walking in the same direction as the train, some people are walking in the opposite direction. There are also trees (which are stationar... | As I remember, the Ptolemaic model involved a series of concentric transparent spherical shells around the Earth.
The stars were attached to the outermost shell or sphere which revolved about once a day, but not exactly once a day since there was also a yearly cycle to which stars were visible at night.
The innermost s... | https://astronomy.stackexchange.com |
422,867 | [
"https://mathoverflow.net/questions/422867",
"https://mathoverflow.net",
"https://mathoverflow.net/users/211682/"
] | Does there exists a non-trivial free group <span class="math-container">$F$</span> and a finite group <span class="math-container">$L$</span> acting on <span class="math-container">$F$</span> such that the semidirect product <span class="math-container">$F\rtimes L$</span> is perfect?
Thanks @YCor for reformulating the... | <s>The question should be clarified.</s> <i>(done)</i>
Let me assume the question is as follows (I couldn't think of another nontrivial interpretation):
<blockquote>
Does there exist a free group <span class="math-container">$F\neq 1$</span> and a finite group <span class="math-container">$L$</span> acting on <span cla... | An alternative construction of such a group: let <span class="math-container">$G$</span> be the free product of two copies of <span class="math-container">$A_5$</span>, i.e., <span class="math-container">$G=A_5*A_5$</span>. This group <span class="math-container">$G$</span> is perfect and it is also virtually free, so... | https://mathoverflow.net |
331,455 | [
"https://physics.stackexchange.com/questions/331455",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/155298/"
] | I was thinking that since atmospheric pressure is 760mmHg what would happen if I shrink a mercury barometer until it's shorter that 760mm in height. What would happen? Would the barometer retain it's ratio of mercury height? Will the mercury fully fill the barometer? Is 760mmHg a constant and not affected by the size o... | A mercury barometer is designed to measure the difference in pressure between the surface of the mercury outside the tube and the surface of the mercury inside the tube.<br>
The space inside the tube is filled with mercury vapour and hopefully nothing else.<br>
The column of mercury is kept in position because the pres... | A vacuum must exist above the meniscus of the column so that the mercury
can rise above 760mm (or 30 in.) which is what a mercury barometer reads
at sea level. In other words, the mercury column needs headroom to rise
with increasing ambient atmospheric pressure.
A barometer capillary tube with a ball pediment cistern... | https://physics.stackexchange.com |
369,525 | [
"https://softwareengineering.stackexchange.com/questions/369525",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/303415/"
] | As I was working on upgrading deprecated ereg_replace() statements in an e-cart sollution I was suddenly puzzled by questions regarding how to handle the submitted data I was working with.
I was working with the add to card function, which from the backend perspective recieves an integer for how many products to add t... | The right answer depends on your client's policies. It could be a mission critical app where if anything goes wrong people die (i.e. medical systems, flight control, etc.). It could be something a little less grave, but still quite serious (i.e. where lots of money is involved). Finally, your app might be something ... | <blockquote>
We are all good people and wish no harm upon others. I am the creator of this e-commerce website so I have delivered the HTML for the form which will always return a number, this means that I should not need to sanitize the number at all I could infact drop timming the value aswell - something I have a b... | https://softwareengineering.stackexchange.com |
13,097 | [
"https://quantumcomputing.stackexchange.com/questions/13097",
"https://quantumcomputing.stackexchange.com",
"https://quantumcomputing.stackexchange.com/users/12811/"
] | I'm trying to construct a general circuit for Shor's algorithm in Qiskit. I understood the later parts of the circuit (inverse QFT and QPE), but can't really understand the order finding.
For example, if we consider <span class="math-container">$N=15$</span>, we have all the <span class="math-container">$\text{gcd}$</s... | Just to add, I sometime come accros notion of negative probability in quantum mechanics. However, this misunderstanding. As you mentioned, each qubit can be writen as
<span class="math-container">$$
|q\rangle = \alpha|0\rangle + \beta|1\rangle,
$$</span>
where <span class="math-container">$\alpha, \beta \in \mathbb{C}$... | The probability is <span class="math-container">$|\alpha|^2$</span>, not <span class="math-container">$\alpha^2$</span>, and thus always non-negative.
| https://quantumcomputing.stackexchange.com |
110,661 | [
"https://dba.stackexchange.com/questions/110661",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/72550/"
] | I use MySQL version 5.6.25-0ubuntu0.15.04.1 on 64-bit Ubuntu 15.04. I have 2GB RAM and the disk is SSD (so, in my mind, writing to disk isn't that costly). I currently have databases for just two small Wordpress blogs. I wasn't trying to get too deep into optimizing this but I encountered what I consider to be strange ... | What powershell syntax are you using?
If you do not enclose the select between single quotes, Powershell will treat it like a variable. If that's the problem, please try:
<pre><code>$command.CommandText = 'SELECT COUNT (*) AS COUNT FROM v$session'
</code></pre>
| You need to grant the <code>DBA</code> role to the user. <code>SYSDBA</code> does not give you the right to these objects.
| https://dba.stackexchange.com |
7,068 | [
"https://mechanics.stackexchange.com/questions/7068",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/3663/"
] | I have a 1995 Toyota Corolla and last night while driving on the freeway, every time I pressed the gas pedal, the car would make a very noticeable sound. I pulled over and, as soon as I did, steam started coming from under the hood. After opening the hood it appeared the steam was coming from the radiator cap. Unfort... | Definitely replace your radiator cap. When mine gave me trouble it wasn't closing when it should which made fluid steam out which made the car overheat. If you're lucky it's all that's wrong and you can refill your radiator and move on. Mine didn't give me any more trouble after I replaced the radiator cap.
I'm sur... | Assuming your radiator cap is of the correct p.s.i. your radiator given age may be full
of scale and could be overdue for rodding out/replacing core/or replacing entirely.A
pressure test will obviate leaks not the condition of your radiator internal condition.
| https://mechanics.stackexchange.com |
35,855 | [
"https://cs.stackexchange.com/questions/35855",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/9343/"
] | L ={ $a^{m^n}$ | $m$>$n$ }<br>
I am bit confuse whether to consider this language as L = $(a^{m})^{n}$ OR L = $a^{\left(m^n\right)}$.
If it is considered as L = $(a^m)^{n}$ then want to check it is Regular or not by Pumping Lemma.<br>
I tried by following way.
$m$ > $n$ so we can take $m's$ value as $n+1... | Historical reasons, for the most part. Automotive systems started using CAN because nothing else was good, and now they've all standardised on it. Having said that, CAN has one particular feature which makes it ideal for this class of applications.
CAN dates from around the same time as Ethernet (Ethernet was commerci... | A few reasons :
<ul>
<li>CAN was developed by BOSCH, which have a lot of influence in automotive equipment (engine control, braking, body, gearbox control...). BOSCH ensured that CAN killed competitors like the VAN protocol. (CAN was patented, and BOSCH sells CAN controller IPs)</li>
<li>CAN is much cheaper than Ether... | https://cs.stackexchange.com |
160,809 | [
"https://softwareengineering.stackexchange.com/questions/160809",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/61820/"
] | I've just started at a new job this past month and looks like they have NO source control for their code. They are relying on the backups their hosting provider takes for them.
After talking a bit I convinced my boss that we should definitely be using source control and after I gave a short seminar on it, the entire t... | This is certainly a good idea and it is a common method to use for deployment. You might want to use a stable branch for deployment purposes whilst keeping trunk for ongoing development so that you can test the stable branch before you deploy it into production.
The only problem can come when you have sensitive inform... | Mind that this deployment strategy is not atomic. It might happen that some files are already updated while other files might still be in the old state while the application is being hit. This can cause unexpected side effects.
A way to do atomic deployments is by i.e. using symlinks. Create a directory containing the... | https://softwareengineering.stackexchange.com |
553,954 | [
"https://physics.stackexchange.com/questions/553954",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/261417/"
] | When we provide a potential difference in a circuit it does nothing more than provide an electric field to the conductor,When an electric field is provided in a conductor the free electrons move to the opposite direction of the field and hence there is an accumulation of charge on the ends of the conductor.Due to the a... | Your description is correct, and this is exactly why <strong>open circuits</strong> don't work.
<ul>
<li>If you connect a conductor to one end of a battery but keep the other end free, then charges will accumulate at the far end setting up an opposing electric field. Soon, no charges will move anymore.</li>
<li>In ord... | What you are describing sounds like a battery connected to a wire where the other end of the wire is not connected to the other battery terminal. Or it could also describe the charging of a capacitor by a voltage source (e.g., battery). The battery voltage removes electrons from one plate of the capacitor and deposits ... | https://physics.stackexchange.com |
203,461 | [
"https://softwareengineering.stackexchange.com/questions/203461",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/81943/"
] | I have heard that a desirable quality of unit tests is that they test for each scenario independently. I realised whilst writing tests today that when you compare a variable with another value in a statement like:
<pre><code>assertEquals("foo", otherObject.stringFoo);
</code></pre>
You are really testing three things... | The straight answer is YES, you may still have to. Also, for <code>assertEquals</code> you are essentially checking for two things - types and values, not if they exist. The reason is that the function will show error in an IDE (red line) if one of them is not in the scope. HMMMM.... You can still say that using text e... | It depends.
Quite probably you shouldn't use three tests for something as small as that, and rather use a debugger if it fails.
However, if you have reason to believe one of the 1st two cases would be a probable bug, by all means, put them in, if just as a remainder to check for all of them.
| https://softwareengineering.stackexchange.com |
433,162 | [
"https://softwareengineering.stackexchange.com/questions/433162",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/164475/"
] | So, a situation's come up at work today while refactoring my codebase. I have two classes that each derive from the same base class. The only significant difference between them is what they do at the beginning - one plays an array of audio files, while another plays just a single file. Each has a different set of audi... | <ul>
<li>Start with a common <em>interface.</em> The interface allows the caller to treat your class as an abstraction, meaning that you can change it without impacting the caller.</li>
<li>Implement the interface in the simplest way possible that will work for you for now. Probably single class.</li>
<li>If your needs... | The spontaneous answer would be that "one audio file" is just a special case of "many audio files", and that the simplest solution would be to merge both classes with a collection, and perhaps an additional constructor to account for the case where there is only one file. So one and only one class.
... | https://softwareengineering.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.