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
4,130
[ "https://mechanics.stackexchange.com/questions/4130", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2095/" ]
I have a 2000 model Honda VTR 250. Up until now the bike has been super reliable. However, recently it has been struggling to start in the morning. The engine turns over many times before catching and sometimes wont start at all - I flatten the battery just trying to start it. Once sufficiently warm though, every thing...
At 15C you should almost be able to start the bike without the choke if it still has carbs and the carbs are working OK. Check the health of the battery. A fully charged battery should have around 13.2V when doing nothing, so 12V is a little low. Did you by any chance measure the voltage when cranking the engine? That...
I am making the assumption you have a manual choke and are using it for coldstarts. Remove the airfilter and verify that the choke is working. Look into the throat (opening in the carb) and activate the choke. You should be able to see if the choke plate is blocking the air passage. In the fully closed position it shou...
https://mechanics.stackexchange.com
106,169
[ "https://physics.stackexchange.com/questions/106169", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/27384/" ]
I know that if we are given a stress tensor that is diagonal, the sign on the diagonal entries tell us whether we have traction or compression. Now, imagine that we are given a non diagonal stress tensor, and we wanna know the only traction and only compression directions. Those are of course the principal directions...
It is also matter of convention. Consider a portion $V$ (of a continuous body $B$) bounded by a closed surface $\partial V$ and a point $p$ on $\partial V$. If $n$ is the <strong>outward</strong> unit normal to $\partial V$ at $p$: $$f(p, n)_i = \sum_{j=1}^3\sigma(p)_{ij}n^j$$<br> is the surface density of force acti...
The tensor, written in the basis of the eigen vectors will be diagonal. So you can use the positivi/negativity of its diagonal elements to infer your traction/compression. In other words, I'd use the eigenvalue to know if in a given direction (dictated by the eigen vector) you have traction or compression.
https://physics.stackexchange.com
449,282
[ "https://physics.stackexchange.com/questions/449282", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212180/" ]
Molar Heat capacity is defined as the amount of heat required to raise the temperature of one mole of a substance by unit amount. As my textbook mentions the molar heat capacity of an ideal gas depends only upon temperature.(that too can also be neglected being almost negligible). So, it is a property of the material t...
You should only consider the displacement of the end of the spring, since this is where the force is applied (the force that compresses/elongates the spring, which is the force that does the work which is stored as potential energy). If you wish to consider each individual particle of the spring, which will lead you t...
Well, it ultimately depends. Displacement is the distance from your current point to your point of origin. Extension/Compression refers to the displacement from the equilibrium of the spring. In your case, let’s say we have a horizontal spring stuck to a wall oscillating horizontally, and you are to take your origi...
https://physics.stackexchange.com
37,532
[ "https://math.stackexchange.com/questions/37532", "https://math.stackexchange.com", "https://math.stackexchange.com/users/953/" ]
If I have two dependent continuous random variables $X$ and $Y$ with known pdf's $f(x)$ and $f(y)$. How to calculate their join probability distribution $f(x, y)$? For example if $Y = \sin{X}$ and I want to calculate the pdf of $Z$ where $Z = \frac{X}{Y}$ or $Z = X - Y$. So, how to find out $f(x, y)$ first?
If $Y$ is a regular function of $X$, $(X,Y)$ cannot have a density since $(X,Y)$ is always on the graph of the function, which has measure zero. But you should not use this to compute the distribution of $Z$ a function of $X$. Rather, you could use the fact that $Z$ has density $f_Z$ if and only if, for every measura...
You can't. You need to know how they are dependent.
https://math.stackexchange.com
34,251
[ "https://mathoverflow.net/questions/34251", "https://mathoverflow.net", "https://mathoverflow.net/users/7886/" ]
What is the dual group of the additive group of rational numbers equipped with the standard topology inherited from $\mathbb R$? As a group, this dual group is isomorphic to $\mathbb R$ (see the answer of Ekedahl given below), but it should be equipped with the topology of uniform convergence on compact subsets of $\ma...
In fact, uniform convergence on compact subsets of $\mathbb{Q}\subset\mathbb{R}$ induces the usual topology on its group of (continuous) characters $\mathbb{R}\simeq\{t\mapsto\exp(ixt)\}_{x\in\mathbb{R}}$. Namely, consider $K=\{0\}\cup\{1/n,n\geq 1\}$. For $x\in\mathbb{R}$, the corresponding character is uniformly $\e...
Every continuous group homomorphism $\mathbb Q \rightarrow S^1$ extends to the completion of $\mathbb Q$ (cf., Bourbaki: General topology, Prop. III:4.8) which is $\mathbb R$ so the dual group of $\mathbb Q$ is the same as that of $\mathbb R$ which is $\mathbb R$. (There may be some question as to whether the topologie...
https://mathoverflow.net
226,555
[ "https://mathoverflow.net/questions/226555", "https://mathoverflow.net", "https://mathoverflow.net/users/29887/" ]
The matrix $\begin{bmatrix}1 &amp; 0 \\ 0 &amp; -1\end{bmatrix}$ is orthogonal and indefinite. $\begin{bmatrix}1 &amp; 0 \\ 0 &amp; 2\end{bmatrix}$ is positive definite and not orthonormal. and the Identity matrix $I$ is of course both orthogonal and positive definite. Let $S$ be the intersection of orthogonal matric...
You may find the Cayley transform to be useful here: As is well-known and easy to prove, every orthogonal <span class="math-container">$n$</span>-by-<span class="math-container">$n$</span> matrix <span class="math-container">$R$</span> that does not have <span class="math-container">$-1$</span> as an eigenvalue can be ...
A (real) orthogonal matrix $A$ is positive definite if and only the symmetric matrix $M = A + A^T$ is positive definite. There are many equivalent characterizations of this: one is that all leading principal minors of $M$ are positive.
https://mathoverflow.net
2,357,406
[ "https://math.stackexchange.com/questions/2357406", "https://math.stackexchange.com", "https://math.stackexchange.com/users/463239/" ]
I'm stuck in proving $(A+B+C+D)(A’+B’+C’+D’) = AD'+A'B+C'D+B'C$ using algebraic manipulation. I tried to solve it. I expanded $(A+B+C+D)(A’+B’+C’+D’)$, and I got: $$AD’+BD’+CD’+BA’+CA’+DA’+AC’+BC’+DC’+AB’+CB’+DB’$$ But I don't know how to proceed. How can I solve this problem?
This looks like a perfect job for the Consensus theorem: <strong>Consensus</strong> $PQ + Q'R + PR = PQ + Q'R$ Proof: $$PQ + Q'R +PR = (Adjacency) $$ $$PQ +Q'R +PQR + PQ'R = (Absorption) $$ $$PQ + Q'R$$ So, notice that you have all terms of the expected answer, and so try to get rid of the others using the Cons...
Stepping aside from algebraic manipulation, already covered by @Bram28, let's reorder the right-hand side as $$ A'B + B'C + C'D + D'A \enspace. $$ Note the circular structure that emerges and think of $A$, $B$, $C$, and $D$ as labeling the corners of a square clockwise. The left-hand side $$ (A+B+C+D)(A'+B'+C'+D')...
https://math.stackexchange.com
417,725
[ "https://stats.stackexchange.com/questions/417725", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
I know sometimes I want to know the population-level estimates, but the problem with GEEs is I can't calculate the likelihood, and therefore all models I make with it aren't comparable, and I don't know which model is right. For all I know what I am fitting with GEEs could be the noise rather than the true value. If mo...
Why use GEE (instead of Maximum Likelihood, ML)? Because the likelihood could be wrong. In fact, since we never know if it's right or not, GEEs safeguard against biases. We want results that require few assumptions. GEE's assumptions are some of the most general, hence the Generalized "G" of GEE. <blockquote> ... th...
The GEEs have been originally proposed for clustered/grouped categorical data. Namely, when we have clustered/grouped data, it is expected that measurements within the same clusters/groups are correlated. In the case of normal data, we can go from the univariate normal distribution to the multivariate one to account fo...
https://stats.stackexchange.com
241,076
[ "https://dba.stackexchange.com/questions/241076", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/162349/" ]
So I've run into this issue with a slow Postgres query. I've added an index but it doesn't seem to help. It takes 8 minutes to get 100 records from a table with 2822968 records. Here's the query that I run: <pre><code>SELECT "organisations"."id", "organisations"."url" FROM "organisations" WHERE "organisations"."ur...
It seems that the statistics for that index are way off, and PostgreSQL may be faster performing a sequential scan. Try to <pre><code>ANALYZE organizations; </code></pre> and see if that improves matters. Another idea may be an index on <code>organizations.id</code> (if you don't already have that) with the idea to...
a better index would be CREATE INDEX ON organizations (domain,url); as that index will group all the null domains together and under that all the not-null urls will also be in one block.
https://dba.stackexchange.com
2,588,942
[ "https://math.stackexchange.com/questions/2588942", "https://math.stackexchange.com", "https://math.stackexchange.com/users/103441/" ]
<blockquote> Let $$U=\operatorname{Span}\{v_1,v_2,v_3\}, V=\operatorname{Span}\{v_4,v_5,v_6\}$$ Where $$v_1=(1,28,2,39),v_2=(2,28,2,39),v_3=(-1,28,2,39)\\v_4=(0,8,0,11),v_5=(0,31,1,43),v_6=(0,-3,0,-4)$$ Find a basis for $U\cap V$ </blockquote> I have forgot the algorithm for finding intersection of subspa...
You have written $U$ and $V$ explicitly as: $$U = \left\{(x_1, x_2, x_3, x_4) \in \mathbb{R}^4 : -\frac{1}{28}x_2 + \frac12 x_3 = 0, -\frac{1}{28}x_2 + \frac1{39} x_4 = 0\right\}$$ $$V = \left\{(x_1, x_2, x_3, x_4) \in \mathbb{R}^4 : x_1 = 0\right\}$$ so $$ U \cap V = \left\{(x_1, x_2, x_3, x_4) \in \mathbb{R}^4 :...
For the point b, remember that the Null Space of the matrix V = empty set, because they are independent. What you found is the Null Space of the Transpose(V). Same thing about U. But for the intersection you must to swap rows and columns.
https://math.stackexchange.com
15,956
[ "https://softwareengineering.stackexchange.com/questions/15956", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/6806/" ]
I found that this was the case with Eclipse. When I first started learning Java a lot of people told me to start with NetBeans because it's easier, comes with a lot of predefined functionality and most of the configuration is done by default. Indeed it seemed like an easy IDE but I just hated the way it looked. The UI...
<h1>Yes</h1> I use VIM because it's beautiful. Aesthetics mean a lot. If the UI is cluttered and ugly it will impact how you use the tool. NetBeans might do everything, but it looks awful and runs slow. I don't see many people using it.
Yes. It may be a biased point of view, but I like working with pretty user interfaces, and if the developer has gone to the time and trouble to make his user interface pretty (<em>and</em> intuitive), I assume that he has taken the same care with the rest of his program as well. As a developer writing programs for ot...
https://softwareengineering.stackexchange.com
308,736
[ "https://electronics.stackexchange.com/questions/308736", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/150932/" ]
Assume our signal source has a white background noise. The output of this source is connected to our system. We know that increasing the input bandwidth of the system leads to more noise flowing into the system and hence higher noise power. Is there any way to somehow decouple the <em>input bandwidth</em> of the syst...
It is an electrochemical hour meter, historically a thin tube filled with mercury with a drop of an electrolyte, current flowing causes ions of mercury to be transported across the electrolyte moving the bubble of electrolyte along the scale. It almost certainly still works just fine, but will gradually move back the...
The text beside the mounting clips says "X 200 Hour", so I'd guess that it records operating time of the tape player.
https://electronics.stackexchange.com
1,452,937
[ "https://math.stackexchange.com/questions/1452937", "https://math.stackexchange.com", "https://math.stackexchange.com/users/59343/" ]
I would appreciate if somebody could help me with the following problem I tried, such as differentiation, but failed. Q: Given $x,y&gt;0$ and $x+y=1$. Find the minimum of $$\frac{1}{x+1}+\frac{x}{y+1}$$
<strong>Hint:</strong> Since $x+y=1$, then try with $f:(0,1)\to\mathbb{R}$ defined by $$f(x)=\frac{1}{x+1}+\frac{x}{2-x}=\frac{1}{x+1}+\frac{2}{2-x}-1$$
HINT: Notice, substituting $y=1-x$, we get $$\frac{1}{x+1}+\frac{x}{y+1}=\frac{1}{x+1}+\frac{x}{1-x+1}=\frac{2-x+x^2+x}{(x+1)(2-x)}$$ $$=\frac{x^2+2}{x+2-x^2}$$ Now, differentiating w.r.t. $x$, we get $$\frac{d}{dx}\left(\frac{x^2+2}{x+2-x^2}\right)=\frac{(x+2-x^2)(2x)-(x^2+2)(1-2x)}{(x+2-x^2)^2}=\frac{x^2+8x-2}{(x+...
https://math.stackexchange.com
442,441
[ "https://physics.stackexchange.com/questions/442441", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/199541/" ]
Suppose we had two black bodies at distinct heights in an uniform gravitational field. They are connected by an insulating tube that only allows the exchange of electromagnetic radiation. Since radiation from the body at the bottom gets redshifted when it reaches the top, it loses energy. Similarly, radiation from the ...
This is really similar to a waterfall. You're exploiting the energy available by lowering the item (EM radiation in this case) down the gravitational field. So the question becomes, how did that item get to that height in the first place? You had to raise it up there. In other words, the upper object after temper...
See gravitational redshift &amp; thermodynamics applied (gives a fine structure constant inside structure by the way but ) it is the (new) result if you combine Einsteins Principles from GR with those from Thermodynamics which we have in a (older) textbooks already.
https://physics.stackexchange.com
278,934
[ "https://physics.stackexchange.com/questions/278934", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/103630/" ]
Two balls 'A' and 'B' are thrown vertically upwards with the same velocity. The mass of A is greater than that of B. We need to find which of the balls reaches a greater height (assuming the effect of air resistence is negligible). I personally feel that A would travel further since its momentum is higher than that of...
If the objects have same initial velocity, they should travel the same distance. Momentum has no picture there. But when they reach the peak height, they stop for a fraction of second (or lesser), that's where your mass comes into picture as their potential energies come into picture. Momentum comes into picture whe...
If the mass of an object is $m$ then its weight is $mg$ where $g$ is the gravitational field strength. Assuming that no other forces act on the mass and apply Newton's second law $F = ma \Rightarrow mg = ma \Rightarrow a = g$ where $a$ is the acceleration of the mass shows that the acceleration of a mass is indepe...
https://physics.stackexchange.com
27,261
[ "https://mathoverflow.net/questions/27261", "https://mathoverflow.net", "https://mathoverflow.net/users/2024/" ]
I will begin by saying that $k=3$ might be a very specific case and this question is useless. Even if that is the case, I would like to know... The sum of squares function $r_k(n)$ is very famous. It counts the number of ways $n$ can be written as a sum of $k$ squares. In the case of $k=3$, when $n$ is squarefree and ...
In my view, it depends a little what you mean by "related," but I don't see at first glance any natural group whose order is r_k(n) for any k other than 3. Loosely speaking, representations of a form of rank m by the genus of a form of rank n are related to the set of double cosets H(Q) \ H(A_f) / H(Zhat) where H is...
Steve Milne sent me a copy, and a pdf, of his "Infinite Families of Exact Sums of Squares Formulas, Jacobi Elliptic Functions, Continued Fractions, and Schur Functions" which is an entire issue of The Ramanujan Journal: vol. 6, no. 1, March 2002. There is also a two-page preface by George Andrews. I admit, the main foc...
https://mathoverflow.net
225,924
[ "https://softwareengineering.stackexchange.com/questions/225924", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/110405/" ]
Fail-fast seems like a right way since it simplifies bug detection. But it's a harm for performance cause of multiple checking the same thing at several levels of the system. Simple example. There is a function that input parameters must be not null. And there is function wrapping it, that also await the same paramete...
You're missing a vital point - it's not an either or scenario. You only need to check "untrusted" parameters. In general, this means the borders of your public interface. If you have a chain of public functions that call other public functions and so on, yes, you'll need to check the input multiple times. You also may...
Early checking of preconditions will be as fast or faster than <em>doing the same checks in the middle of your calculation</em>. The italic part is where your reasoning goes astray. Fail-fast/early checking does not mean you check more things or check them more often, it means that you perform <em>the same checks</em> ...
https://softwareengineering.stackexchange.com
200,318
[ "https://softwareengineering.stackexchange.com/questions/200318", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/75344/" ]
Is there a best practice for calling language-native functions when writing testable code? I have experimented a little with php code and have come up with two methodologies: <ul> <li>create a wrapper class for all native functions and mocking this wrapper when writing tests</li> <li>using "namespace magic": calling ...
You don't unit-test language native functions. You test <em>your</em> code. You rely on the language you're using as well as on any third party library. <h2>Library / Language Code</h2> If you want the external code to be tested, that's ok, but not within your project. Fork the third party software, and do the tests ...
Generally you don't want to mock the native functions. You should rely on them to do their thing. Though there are the exceptions like (in php: <code>ftp_connect</code>, <code>time</code>, etc) You have a couple of options. 1) You create a wrapper class that wraps the native function calls so that you are able to c...
https://softwareengineering.stackexchange.com
211,868
[ "https://mathoverflow.net/questions/211868", "https://mathoverflow.net", "https://mathoverflow.net/users/56920/" ]
I am looking for natural families of Hausdorff topologies (metrics, norms, if possible) for the space of rational functions of a single complex variable of arbitrary, unbounded denominator degree (and, if needed, a finite, or zero, limit for $z\to\infty$). Or spaces of meromorphic functions containing these functions. ...
Karl-Goswin Grosse-Erdmann, The locally convex topology on the space of meromorphic functions, J. Austr. Math. Soc., 59 (1995) 287-303
What happens with this way of doing it? A rational function is a map from the Riemann sphere $\mathbb C \cup \{\infty\}$ to itself. The Riemann sphere is compact, so has a unique uniform structure. (So choose a nice metric for it, say the one from an actual sphere.) Use "uniform convergence". This topology is...
https://mathoverflow.net
125,397
[ "https://electronics.stackexchange.com/questions/125397", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/-1/" ]
I need to simplify the following logic expression: $$\begin{array}{|c|c|c|c|c|} \hline A &amp; B &amp; C &amp; X &amp; SOP \\ \hline 0 &amp; 0 &amp; 0 &amp; 0 &amp; \\ \hline 0 &amp; 0 &amp; 1 &amp; 1 &amp; \overline{A}\ \overline{B}C \\ \hline 0 &amp; 1 &amp; 0 &amp; 1 &amp; \overline AB\overline C\\ \hline 0 &amp; 1...
The point where you arrived is almost right: $$ C+\overline{A}B\overline{C}=C(1+\overline{A}B)+\overline{A}B\overline{C}=\\= C+\overline{A}BC+\overline{A}B\overline{C}=C+\overline{A}B(C+\overline{C})=\\= C+\overline{A}B $$ That should be the same answer the K-map and whatever reduction software should give you.
If you are getting two different answer don't worry Just make the truth table for both the expressions and compare if both give the same answer then you are correct.
https://electronics.stackexchange.com
20,395
[ "https://security.stackexchange.com/questions/20395", "https://security.stackexchange.com", "https://security.stackexchange.com/users/11003/" ]
Unfortunately I cant link to the page (it internal). But I can describe it! This is a lightspeed systems policy enforcement login page (content filter). The page is http and there is no iframe with ssl. The login form posts to a javascript function. So here is my question: Could this page be secure and if so how?
No. If the page and scripts were not delivered securely in the first place then there is always the possibility that a third party has modified the content. Securing the iframe is not sufficient, since the non-secured content could still contain malicious scripts. Note that this doesn't mean that your information WILL...
Short answer: no, you can replace the javascript using a MITM attack with whatever code you want.
https://security.stackexchange.com
195,542
[ "https://electronics.stackexchange.com/questions/195542", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/69401/" ]
I am planning a movie set which will contain old circuit boards from TVs, VCR's and other old electronics. The plan is to go to several Goodwill stores and buy up all of the TV's and such that they have, open them up and integrate them into the set. There is an electrical danger here due to charges still present on l...
I feel that giving all of the items a salt water bath is probably the best option for your circumstances. However. Do not dispose of the water carelessly afterwards. There may be traces of lead and other nasties in it. Find some sort of hazardous waste disposal company and get them to get rid of it (it may cost you a ...
They sell "wands" to do this sort of thing (Google for "electric discharge wand") but you can make your own. It's just a wire with a clip on one end that you can touch to one end of the capacitor. The wire goes through a resistor to a clip on the other end for hooking up to the other side of the capacitor. The trick i...
https://electronics.stackexchange.com
1,491,417
[ "https://math.stackexchange.com/questions/1491417", "https://math.stackexchange.com", "https://math.stackexchange.com/users/177912/" ]
My goal is to prove that $\mathcal{T} = \{$ R|R is a total order on $\mathbb{Z}^+ \}$ is equinumerous with $\mathscr{P}(\mathbb{Z}^+)$ by applying Cantor-Bernstein. Since $\mathcal{T} \subseteq \mathscr{P}(\mathbb{Z}^+\times \mathbb{Z}^+)\sim \mathscr{P}(\mathbb{Z}^+)$, $\mathcal{T} \precsim \mathscr{P}(\mathbb{Z}^+)$,...
Given a subset $A$ of $\Bbb Z^+$ and its complement $B$, consider the linear order obtained by placing all the elements of $B$ on top of the elements of $A$. (This is not injective, but there is exactly one problem to be solved.) (As a challenge, find a way where this one problem is mitigated without using special ca...
I used $f: \mathscr{P}(A) \rightarrow \mathcal{T}$ defined by $f(X) = (Y \times W) \cup L_{Y} \cup L_{W}$, where $A = \mathbb{Z}^+ \setminus \{1,2\}$, $Y = X \cup \{1\}$, $W = (A \setminus X) \cup \{2\}$, $L_{Y} = \{(x,y) \in Y \times Y \mid x \leq y\}$, and $L_{W} = \{(x,y) \in W \times W \mid x \leq y\}$.
https://math.stackexchange.com
170,202
[ "https://softwareengineering.stackexchange.com/questions/170202", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/62775/" ]
My team follows the Scrum development cycle. We have received feedback that our unit testing coverage is not very good. A team member is suggesting the addition of an external testing team to assist the core team, but I feel this will backfire in a bad way. I am thinking of suggesting pair programming approach. I hav...
Your question is orthogonal to your problem. Sticking two programmers that don't want to or can't write good unit tests together isn't going to get you more/better unit tests. Sticking a programmer who is poor at writing unit tests with one that is good might propogate good habits, but might not be a good pair for oth...
From my personal experience as a team member which has gone through a similar process, the choice of pair-programming and TDD was very successful and useful. Our coverage has increased significantly. What we did was: <ul> <li>force pairs for production code. No code was allowed to be committed if not created in pairs...
https://softwareengineering.stackexchange.com
3,632,051
[ "https://math.stackexchange.com/questions/3632051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/728005/" ]
I have been given the matrix <span class="math-container">$$A = \begin{pmatrix} 1 &amp; 8 &amp; -17 \\ 3 &amp; 2 &amp; -2 \\ -3 &amp; -6 &amp; 9 \\ 1 &amp; -4 &amp; 7 \\ \end{pmatrix} $$</span> which is the matrix of the linear transformation T. I have also been given the vector <span clas...
The product <span class="math-container">$A\cdot v$</span> is a new vector the coordinates thereof are the dot products of the rows of <span class="math-container">$A$</span> by the vector <span class="math-container">$v$</span>. For instance, the first coordinate of <span class="math-container">$A\cdot v$</span> i...
You don't need to transpose A in order to compute it, the dimensions are fine. By definition, the product AB is defined for <span class="math-container">$A_{n\times k},B_{k\times l}$</span>, and in your case, the dimensions of A are <span class="math-container">$4\times 3$</span> and the vector is <span class="math-co...
https://math.stackexchange.com
21,014
[ "https://cstheory.stackexchange.com/questions/21014", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/21571/" ]
Consider the following problem: <strong>Input:</strong> (G1, G2) where G1 and G2 are undirected graphs <strong>Question:</strong> Is the size of the max independent set of G1 at least as large as the size of the max independent set of G2? This seems like a fairly natural question to ask, and yet I have been unable ...
This problem is indeed complete for the class of polynomial time Turing machines with access to an NP oracle with log many queries (also known as $\Theta_2^p$). The result appears in a 2000 FST TCS paper by Spakowski and Vogel titled "$\Theta_2^p$-Completeness: A Classical Approach for New Results." The proof present...
I seems, your problem is Turing-complete for the class ${\mathsf{P}}^{\mathsf{NP}[O(\log n])]}$. As mentioned in the question, you already know that it falls in this class. To show Turing-completeness, one can notice that taking an independent set of size $l$ for $G_1$ allows us to determine (using the task as an orac...
https://cstheory.stackexchange.com
340
[ "https://mechanics.stackexchange.com/questions/340", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/181/" ]
I recently bought a 1989 Mercedes 300E that didn't run. Has a straight-six gas engine. Thanks to the miracle of Seafoam and a lot of luck, I was able to get fuel delivery happening again. I then switched out some incorrectly-gapped plugs and pretty much every other fluid. Fired her up, coaxed her through the first ...
For a pre OBD-II vehicle such as this one, the best thing to do is get it running as smoothly as possible, using normal maintenance and repair procedures. This means no misfiring, smooth idle, smooth acceleration, not overheating, etc. The same stuff you'd expect to work well in every day driving. There should also be ...
In the past, I've owned a lot of cars that were... iffy... when smogged. Here is the list of what I've done in the past. A lot of these steps are only marginally effective, but there are times I've squeaked by with a margin of 1%, so I think every bit counts. <ol> <li>Make sure no error codes were stored in the ECU. ...
https://mechanics.stackexchange.com
49,216
[ "https://electronics.stackexchange.com/questions/49216", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1688/" ]
A x16 PCI Express slot can deliver 75W for PCI Express Graphics Card. Some graphics card today also use external PCI Express power to increase above this limit, the most basic of these is the 6-pin PCI Express graphics power connector. This is specified to deliver 75W, bringing the total allowable power of the graphics...
Most of this, as you've probably seen from the comments, isn't actually electronic trickery. They run multiple power districts across the board and drive them from the PCI-e slot and the cables separately. They're all running on a common ground from the same PSU, so it works quite nicely. Usually you'll see the VRAM an...
It might be simpler than that given that both 12V rails emanate from the same source - the power supply. In which case it's a matter of parallel rails to take the current. However, yes, I'd also expect current limiting on both sources. Edit: AnindoGhosh's comment is a better answer than this! I had just wondered if di...
https://electronics.stackexchange.com
369,217
[ "https://electronics.stackexchange.com/questions/369217", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/138831/" ]
Let's say I want to detect a voltage signal that's guaranteed to be between 0V and 1V through an ADC whose upper range is 5V. I can hook the signal up to the ADC directly, but then I'll only be using 1/5th of the ADC range. Or, I can multiply the signal by 5 through an amplifier to have the signal extend to the entire ...
From a bit more information in the comments, you are using an ATMega168. This microcontroller has three options for the ADC reference voltage: <ol> <li>\$V_\mathrm{CC}\$ - usually 5 or 3.3 V.</li> <li>Internal 1.1 V bandgap reference</li> <li>External reference (&lt; \$V_\mathrm{CC}\$)</li> </ol> With the 10bit ADC, ...
It is a valid operation and often must be done (e.g. what if you want to measure a signal which is 0-1mv) There are ADC with built-in Op-amps just for this reason. As always: beware of adding noise by amplification.
https://electronics.stackexchange.com
1,849,420
[ "https://math.stackexchange.com/questions/1849420", "https://math.stackexchange.com", "https://math.stackexchange.com/users/315064/" ]
Let $A = 1+5+5^2+\dots+5^{99}$, then $A$ is: <ol> <li>A prime number</li> <li>not divisible by 3</li> <li>divisible by 13</li> <li>divisible by 125</li> </ol> I know this is a sum of a Geometric Progression, so $ A = (5^{100}-1)/4$ but I cannot find $5^{100}$ So I thought of finding a pattern between the progression ...
I will assume that you mean $1+5+5^2+\cdots +5^{99}$. Let's deal with the choices one at a time. Of course 4.) is false, all the terms except one are multiples of $5$. So the sum cannot be a multiple of $5$. 1.) is clearly false, we have an even number of odd numbers. The sum is therefore even, and thus not prime. ...
Since the question concerns divisibility, consider reducing modulo $3$, $13$, etc. In particular, note $$5^{100}\equiv(-1)^{100}\equiv 1 \mod 3$$ and $$5^{100}\equiv 25^{50}\equiv (-1)^{50}\equiv 1\mod 13$$ What does this tell you about the divisibility of $\frac{1}{4}(5^{100}-1)$ by $3$ and $13$?
https://math.stackexchange.com
1,155,955
[ "https://math.stackexchange.com/questions/1155955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/217639/" ]
<blockquote> Let <span class="math-container">$a$</span>, <span class="math-container">$b$</span> and <span class="math-container">$c$</span> be the three sides of a triangle. Show that <span class="math-container">$$\frac{a}{b+c-a}+\frac{b}{c+a-b} + \frac{c}{a+b-c}\geqslant3\,.$$</span> </blockquote> A full expanding ...
$a, b, c$ are sides of a triangle iff there exists positive reals $x, y, z$ s.t. $a=x+y, b=y+z, c = z+x$. In terms of these variables, the inequality is $$\sum_{cyc} \frac{a}{b+c-a} = \sum_{cyc} \frac{x+y}{2z} \ge 3$$ Now the last is easy to show with AM-GM of all $6$ terms. $$\sum_{cyc} \frac{x+y}{2z} = \frac12\left...
Set $b+c-a=x, a+c-b=y$ and $a+b-c=z$<br> Due to triangular inequality, $x,y,z$ are positive. Hence we can apply the AM-GM inequality. We have $x+y=b+c-a+a+c-b=2c \implies c = \frac{x+y}{2}$<br> Similarly $a = \frac{y+z}{2}$ and $b = \frac{z+x}{2}$<br> Now we have, $$\frac{a}{b+c-a}+\frac{b}{a+c-b}+\frac{c}{a+b-c}=\frac...
https://math.stackexchange.com
978,124
[ "https://math.stackexchange.com/questions/978124", "https://math.stackexchange.com", "https://math.stackexchange.com/users/155664/" ]
My question is from Apostol's Vol. 1 One-variable calculus with introduction to linear algebra textbook. <em>Page 40. Exercise 10.</em> Prove by induction, that for $n\ge1$ we have $$\sum_{k=n+1}^{2n}\frac{1}{k}=\sum_{m=1}^{2n}\frac{(-1)^{m+1}}{m}.$$ <em>The attempt at a solution</em>: To prove by induction, I underst...
Note that for $n=1$, $$\sum_{m=1}^{2n}\frac{(-1)^{m+1}}{m}=\sum_{m=1}^{\color{red}{2}}\frac{(-1)^{m+1}}{m}=\frac{(-1)^{1+1}}{1}+\frac{(-1)^{2+1}}{2}=\frac 12.$$
The second sum has two summands.
https://math.stackexchange.com
87,189
[ "https://cs.stackexchange.com/questions/87189", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/51763/" ]
When converting NFA to DFA, do I always get the minimal DFA or not?
No, it is not in general minimal. The standard determinization procedure, the subset construction, always converts an NFA with $n$&nbsp;states to a DFA with $2^n$&nbsp;states and there is no reason that this should be minimal. In practical terms, if you convert an NFA, you'll often find that there are unreachable stat...
If we take NFA with n states and convert into DFA with 2^n states then there are unreachable states in resulting DFA which gives the result as not a minimal DFA.so the NFA to DFA conversion thus not give the result ad minimal DFA.
https://cs.stackexchange.com
228,287
[ "https://mathoverflow.net/questions/228287", "https://mathoverflow.net", "https://mathoverflow.net/users/41075/" ]
Let $\pi$ be a group and $K(\pi,1)$ the Eilenberg-MacLane space. Let $G$ be a finite group acting on $K(\pi,1)$ such that the following is a covering map $$ K(\pi,1)\longrightarrow K(\pi,1)/G. $$ <strong>Question.</strong> Is $K(\pi,1)/G$ an Eilenberg-MacLane space? Does $$ K(\pi,1)/G=K(\pi \times G,1)? $$
Suppose a group $H$, not necessarily finite, acts on an Eilenberg-MacLane space $BN$. The homotopy quotient $BN/H$ (which agrees with the ordinary quotient if the action of $H$ is free) fits into a fiber sequence $$BN \to BN/H \to BH$$ and the long exact sequence in homotopy shows that $BN/H$ has vanishing higher hom...
$K(\pi,1)/G$ is not necessarily $K(\pi\times G,1)$ for example take $G=Z$, $K(Z,1)=S^1$. $S^1=R/(t_1=x\rightarrow x+1)$ the quotient of $S^1$ by the group $Z/n$ generated by the transformation induced by $x\rightarrow x+1/n$ is $S^1$.
https://mathoverflow.net
6,033
[ "https://mathoverflow.net/questions/6033", "https://mathoverflow.net", "https://mathoverflow.net/users/379/" ]
Let $G$ be a locally compact totally disconnected group, and to make life easy let's suppose its Haar measure is bi-invariant. Let $C_c(G)$ be the space of locally constant complex functions on $G$ with compact support, which forms an algebra under convolution. Suppose $e \in C_c(G)$ is an idempotent, so that $H = eC...
I don't have a solution, but here are some thoughts which might be of use or interest. You may have seen this already, but if your group is <em>discrete</em> then its group von Neumann algebra $VN(G)$ is "directly finite" - that is, every left invertible element is invertible. I think this property is inherited by the...
I think the general problem with infinite matrices (that are row-column-finite) arises from the fact that the shift matrix e<sub>i</sub> -> e<sub>i+1</sub> (for i ranging over positive integers) only has a left inverse.
https://mathoverflow.net
843,603
[ "https://math.stackexchange.com/questions/843603", "https://math.stackexchange.com", "https://math.stackexchange.com/users/74167/" ]
What are singularities of $$f(z)=\frac{1}{\sin(\frac{\pi}{z})}$$ I can show that the singularities are given by $$\sin(\frac{1}{z})=0=\sin(n\pi)$$ This gives $z=\frac{1}{n},n=0,1,2,3,4....$ Now, how can i say what kind of singularities are these ? like poles, essential singularity or removable singularity ?
$n=0$ doesn't quite work :) You're also missing $n=-1,-2,-3,\dots$. What does the Laurent series of $f(z)$ look like at $z=\pm 1/n$? (Hint: What kind of zero does $\sin$ have at $\pm \pi n$?) Be warned, however: $z=0$ is not an isolated singularity of this function.
$f(z)$ has simple poles at $z_n=±1/n, (n \not = 0)$. $n=0$ is an intrinsic singularity because infinity number of poles $z_n=±1/n,n \to ±\infty$ will all pile on $n=\infty$ or $z=0$.
https://math.stackexchange.com
126,212
[ "https://electronics.stackexchange.com/questions/126212", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/51841/" ]
From a quick survey of wall-mounted USB chargers with more than one USB port, it seems that the total amperage provided, for a given number of ports can vary significantly. For instance, I saw 2-port chargers producing either 2.4A or 1.2A in total. What is the difference, in terms of build quality and components, betw...
<blockquote> What is the difference, in terms of build quality and components, between chargers with the same number of ports but with different power? </blockquote> Build quality is independent of power output in the range you are discussing. The double-the-current power supply will deliver double the power as Po...
Cost and quality of components. A 2.4A supply <em>should</em> cost more than a 1.2A supply. However, the 2.4A supply <em>might</em> be less expensive or the same cost, if the 1.2A supply was made in fewer numbers, due to economy of scale. Also, a 2.4A supply might cost less because it is made without regard to safety o...
https://electronics.stackexchange.com
140,099
[ "https://security.stackexchange.com/questions/140099", "https://security.stackexchange.com", "https://security.stackexchange.com/users/127879/" ]
Last week, my cable modem went dead, and the ISP guys came over to my house and replaced the modem, but they came while I was away. I was told that they spent a very long time configuring my cisco linksys wireless router and TPLink wireless repeater. For some reason paranoia kicked in and alarm bells started ringing i...
If the installers were a higher skill level than you, then they could do something entirely undetectable by you. That said, unless you have very good reasons for expecting someone to try and bug your network, it is a fairly irrational worry. These guys came from your ISP - and ISP's generally try to avoid committing c...
Successfully detecting high quality surveillance is much harder than simply starting afresh; and you might never be certain that you spotted it. To allay your suspicions, re-flash your devices. First, do some research to learn how to restore factory defaults on your router without using the current admin password. ...
https://security.stackexchange.com
55,497
[ "https://security.stackexchange.com/questions/55497", "https://security.stackexchange.com", "https://security.stackexchange.com/users/3498/" ]
Everywhere I go, people tell me the private keys need to be kept away, possibly even locked into a safe. Then how come Firefox and other keystores expect you to give them a private key?<br> Firefox is a client, it shouldn't need this right?
The private key is need by Firefox for <em>client</em> authentication, i.e. when the client demonstrates to the server ownership of a certificate. By definition, this requires knowledge of the private key on the client side. This does not happen often, because most Web servers authenticate clients with passwords, not w...
.p12/pfx doesnt neccesarily mean it contains a private key, import it to your keystore to see if you can verify if you have access to the private key.
https://security.stackexchange.com
449,620
[ "https://electronics.stackexchange.com/questions/449620", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/227170/" ]
I want to join a company. They asked me to design a TV UHF booster so I chose <em>C3355</em>, but could not find its common base parameter in the UHF range. Your help promotes me, thanks.
The catch diode insures a proper return path for the inductors current. Without the diode there is risk of damage to the MOSFET switch and a greatly reduced output. There is also a possibility of incorrect polarity at the output, possibly causing damage or drawing excessive current from the source. The diode solves ma...
As you say the inductor cannot allow current flowing through it, to change instantaneously. When you turn off your switch it is equivalent to raising the series resistance for the switch and hence the inductor in series. If the current is not to change instantaneously when you change the resistance then the <strong>v...
https://electronics.stackexchange.com
1,167,769
[ "https://math.stackexchange.com/questions/1167769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/177463/" ]
Differentiate $f(x) = exp_{a}(x) $ from first principles, for $ a &gt; 0 $ (Recall that $ exp_{a}(x) = exp(x.ln(a)) $ Here is where I am so far: $ f'(x) = \lim\limits_{h \rightarrow 0} \frac{exp((x+h) \cdot ln(a)) - exp(x \cdot ln(a))}{h}$ $ = \lim\limits_{h \rightarrow 0} \frac{exp(x \cdot ln(a)) \cdot exp(h \cd...
You have $$\begin{align} \exp(x\ln(a)) \lim_{h \to 0} \frac{\exp(h\ln(a)) - 1}{h} &amp;= a^{x} \lim_{h \to 0} \frac{\exp(h\ln(a)) - 1}{h} \end{align}$$ Set $$y = h\ln(a) \implies h = \frac{y}{\ln(a)}$$ and notice that $y \to 0$ as $h \to 0$ Hence $$\begin{align} a^{x} \lim_{h \to 0} \frac{\exp(h\ln(a)) - 1}{h} &...
$f(x)=exp(x\cdot ln(a))=exp(u)$ where $u=x\cdot ln(a)$ Using the chain rule, we get $f'(x)=exp(u)\cdot u'=exp_a(x)\cdot ln(a)$ Edit: We can use this, but eventually, you're going to have to use the definitions and properties. $f(x)=exp(x\cdot ln(a))$ $f'(x)=\lim_{h\to 0}\frac{exp((x+h)\cdot ln(a))-exp(xln(a))}{h}...
https://math.stackexchange.com
202,922
[ "https://softwareengineering.stackexchange.com/questions/202922", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/52728/" ]
Sometimes, although not often, I have to include math logic in my code. The concepts used are mostly very simple, but the resulting code is not - a lot of variables with unclear purpose, and some operations with not so obvious intent. I don't mean that the code is unreadable or unmaintainable, just that it's <em>waaaay...
The right thing to do in such circumstances is to implement the algorithm, formula or whatever with <em>exactly</em> the same variable names as in the primary real-world source (as far as the programming language allows this), and have a succinct comment above it saying something like "Levenshtein distance computation ...
When I have had to implement algorithms like that, there are a couple of things I do. <ol> <li>As much as possible, isolate the algorithm to its own method or preferably class. My current project has it's own equivalent <code>Math</code> class to add complex algorithms to.</li> <li>Provide a summary of what the algor...
https://softwareengineering.stackexchange.com
1,165,967
[ "https://math.stackexchange.com/questions/1165967", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
I'm considering a proof of the convergence of the Fourier series. It begins by considering the full Fourier series of the periodic extension of $\phi$ defined on $[-\ell, \ell]$. The full Fourier series is $$ \sum_{n=-\infty}^\infty C_ne^{\frac{in\pi x}\ell}, \quad C_n = \frac{1}{2\ell}\int_{-\ell}^\ell \phi(x)e^{\fr...
For a real number $y$, $|e^{iy}| = 1$ since $$|e^{iy}| = \sqrt{e^{iy}\overline{e^{iy}}} = \sqrt{e^{iy}e^{-iy}} = \sqrt{e^{i(y-y)}} = \sqrt{e^0} = \sqrt{1} = 1.$$
$|e^{it}| = 1$ if $t$ is real.
https://math.stackexchange.com
427,620
[ "https://mathoverflow.net/questions/427620", "https://mathoverflow.net", "https://mathoverflow.net/users/53155/" ]
Let <span class="math-container">$X$</span> be a compact Hausdorff topological space such that for every continuous <span class="math-container">$f,g:X\to\mathbb{R}$</span> with <span class="math-container">$0\le f\le g$</span> there is a continuous <span class="math-container">$h:X\to\mathbb{R}$</span> such that <span...
The kind of completely regular space you are looking for is an <span class="math-container">$F$</span>-space. Suppose that <span class="math-container">$X$</span> is a completely regular space. Then we say that a subset <span class="math-container">$A\subseteq X$</span> is <span class="math-container">$C^*$</span>-embe...
<blockquote> What can be said about <span class="math-container">$X$</span>? </blockquote> One thing we can say that <span class="math-container">$X$</span> does not have any nonconstant sequences that converge. If <span class="math-container">$x_n \to x$</span> (all distinct), define <span class="math-container">$g(x_...
https://mathoverflow.net
25,735
[ "https://dba.stackexchange.com/questions/25735", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/13329/" ]
I have a little problem with the performance of a mysql-query which uses a fulltext index. The following query <pre><code>SELECT Mention.id FROM mentions AS Mention WHERE (MATCH (`Mention`.`title_text`, `Mention`.`content_text`, `Mention`.`author_text`) AGAINST ('"hannover 96"' IN BOOLEAN MODE)) </code></pre> tak...
You simply need to think about the date range slightly differently. An event falls in your given range if the start date is prior to the end of your reporting period, and the end date is after the beginning of your reporting period: <pre><code>Select * from tbl_Events where StartDate &lt;= @end AND EndDate &gt;= ...
Using datetime data types with between can be tricky, you can get caught out by the time part of the date. To confirm this, try: <pre><code>Select * from tbl_Events where ((startDate &gt;= @start AND startDate &lt;= @end) OR (EndDate &gt;= @start AND EndDate &lt;= @end)) </code></pre>
https://dba.stackexchange.com
65,200
[ "https://security.stackexchange.com/questions/65200", "https://security.stackexchange.com", "https://security.stackexchange.com/users/53681/" ]
In the past I have seen having a Google drive document and have FTP username/passwords there. Is storing passwords in Google drive a good practice?
<strong>Is Google Drive safe?</strong> I wouldn't say that Google drive is not a safe place to store sensitive information. But I bet you cannot rely on it. When it comes to protecting your sensitive data/privacy, it is always good to be sure, and just trusting drive is not being "sure". <strong>Solution:</strong> ...
Only if you trust Google with that information. This is because in all likelihood Google has access to everything in your Google drive and can extend that access to anybody given a court order to do so. As for if this is good practice...no, it's not.
https://security.stackexchange.com
161,798
[ "https://softwareengineering.stackexchange.com/questions/161798", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/61852/" ]
I'd like to read the opinion of experts on whether compiled, strictly-typed languages help programmers write robust code easier, having their backs, checking for type mismatches, and in general, catching flaws in compile time that otherwise would be discovered in runtime ? Has unit testing in loosely typed, interprete...
<blockquote> I'd like to read the opinion of experts on whether compiled, strictly-typed languages help programmers write robust code easier, having their backs, checking for type mismatches, and in general, catching flaws in compile time that otherwise would be discovered in runtime ? </blockquote> For some program...
Yes, type-safety leads to more robust code. But at what cost? You never find every bug in testing. The earlier you find a bug, the cheaper it is to fix (fewer people involved, less communication, etc). The cheapest way to fix a bug is to have your language or compiler prevent it from happening. I had a client who ...
https://softwareengineering.stackexchange.com
2,570
[ "https://earthscience.stackexchange.com/questions/2570", "https://earthscience.stackexchange.com", "https://earthscience.stackexchange.com/users/4625/" ]
In "Deep Impact", the president says that "New York City, Boston, Atlanta, Philadelphia, all will be destroyed". New York and Boston are on the water and would be in danger from a tsunami of any size, Philadelphia is 39 feet above sea level and 50 miles inland. Atlanta is over 200 miles inland and between 750 and 1100 ...
Tsunamis form as a series of moderate amplitude, long interval waves that travel away from the initial impact. The first of these waves has the highest amplitude of the initial waves, and becomes the 'big one' later. Subsequent waves are caused by water rushing into the void created by the initial impact, bouncing off...
The bolide depicted in the film seems to have been modeled upon the Chixculub meteor that impacted Yukatan, and created the K-T extinction event. Both the film and Chixculub were about 11 kilometers in diameter. This would result in a roughly $10^5$ Gtonne impact explosion - with some variation depending upon the densi...
https://earthscience.stackexchange.com
25,985
[ "https://dsp.stackexchange.com/questions/25985", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5206/" ]
So, my understanding of stereovision is that you essentially have two cameras. Then, <em>offline</em>, you perform camera calibration with checkerboards to get intrinsic camera properties as well as the geometric transformation between cameras. Then, you can take a stereo pair of images, find the disparity map, and usi...
If all you want is to reconstruct a scene from a pair of images from a pair of calibrated stereo cameras, and your calibration is sufficiently accurate, then you do not need bundle adjustment. You do need bundle adjustment if you want to reconstruct a scene from a sequence of images or for a sequence of stereo pairs,...
Bundle adjustment is generally required for a multiview setting, where the number of cameras is large. In such regime, it is hard to exactly calibrate all the cameras extrinsically. Therefore, we instead look for an automatic procedure that could simultaneously refine the parameters of all the cameras towards the optim...
https://dsp.stackexchange.com
30,586
[ "https://dba.stackexchange.com/questions/30586", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/16314/" ]
Can any body tell me how to accomplish this? I have a remote table from which I need to import part of the data and put it into a table on my computer(local). I know <strong><code>select into</code></strong> command and its use but I don't know how to use it for this kind of situation.
Try this from your local machine: <pre><code>mysqldump -u username -p password -h remote_host --databases remote_database --tables remote_table --where="id=757575" | mysql local_database -u username -p password </code></pre>
To export the data from a remote table use below command you can also use where clause in it if u need specific data. select * from tablename into outfile '/etc/tablename.csv'; use mysql>show create table tablename; copy the create table statement and create a table in your local PC then Copy that 'tablename.csv' ...
https://dba.stackexchange.com
746,456
[ "https://physics.stackexchange.com/questions/746456", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/94398/" ]
An accelerated electric charge creates a transverse em wave radiated at the speed of light. But a dc current negotiating any bend in the conductor must undergo accelerating forces to change spatial direction. This must surely generate some, albeit extremely weak, em radiation?
No, a radiated field requires a changing current density, <span class="math-container">$\vec J$</span>, and a DC current implies <span class="math-container">$\frac{\partial}{\partial t}\vec J=0$</span>. If you think about a single charges accelerating around the bend then yes, there are some radiative terms to the Lie...
The power radiated by a charge with constant acceleration is <span class="math-container">$$P=\frac{q^2}{4\pi\epsilon_0}\frac{a^2}{c^3}.$$</span> For an electron going around a circular bend of radius (let's say) one centimeter the acceleration is <span class="math-container">$$a=\frac{v_d^2}{r}$$</span> where <span cl...
https://physics.stackexchange.com
12,546
[ "https://dba.stackexchange.com/questions/12546", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/4017/" ]
I am currently rearchitecting an application so that each of seven businesses will have there own "live" SQL Server 2008 database and at scheduled times during the data the data from all seven databases will be replicated to a master reporting database. The question I have is do I need to do anything within the replic...
SQL Replication isn't going to handle that for you. You'll have to setup a very custom replication type system, possibly using SQL Service Broker to handle the merging of data into a single system for reporting.
I would recommend you keep staging databases for the data that's coming over, and then use an ETL process (SSIS or just stored procedures) to migrate that data into the reporting database. That way you'd be able to preserve all existing relationships without worrying about bits of data stepping all over each other.
https://dba.stackexchange.com
4,383,379
[ "https://math.stackexchange.com/questions/4383379", "https://math.stackexchange.com", "https://math.stackexchange.com/users/964104/" ]
<span class="math-container">$\operatorname{Arg}(1+z) = \frac{\theta}{2}$</span>, given that <span class="math-container">$z = \cos(\theta)+i\sin(\theta)$</span>. Here is what I have attempted: <ul> <li>If <span class="math-container">$z = \operatorname{cis}(\theta)$</span>, then <span class="math-container">$z+1 = \co...
<span class="math-container">$\frac{\sin(\theta)}{\cos(\theta)+1}=\frac { 2\sin (\theta /2)\cos (\theta /2)} {2\cos^{2}(\theta/2)}=\tan (\theta /2)$</span>.
Observe that <span class="math-container">$\cos(2x) = 2 \cos^2(x)-1$</span> to get <span class="math-container">$1+\cos(\theta) = 2 \cos^2(\theta)$</span> and use <span class="math-container">$\sin(x) = 2\sin(x/2)\cos(x/2)$</span> to conclude <span class="math-container">$$ \tan(\arg(1+z)) = \dfrac{2\sin(\theta/2)\cos(...
https://math.stackexchange.com
597,372
[ "https://physics.stackexchange.com/questions/597372", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/124883/" ]
I was riding my bicycle downhill. When the street leveled I realized I had forgotten something so I started turning around without pedaling, pretty much using the momentum I had acquired. Soon I was moving in the complete opposite direction, still without having to pedal. I couldn't help but thinking how that was possi...
The change in the linear momentum of an object requires a net force to act on the object. A change in the angular momentum of an object requires a net torque to act on the object. So the answer to your question <em>&quot;What's the physics and math behind the momentum change to the opposite or perpendicular direction ...
With no forces, the bicycle will travel in a straight line at constant speed. If a forces is applied forward, it will follow the same direction but speed up. If backward, it will slow down. A sideways force is neither forward nor backward. It will neither speed the bike up, nor slow it down. It will change the directio...
https://physics.stackexchange.com
405,234
[ "https://stats.stackexchange.com/questions/405234", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/184772/" ]
Hi I am fairly new to Random Forest estimation, but I could not find a questions similiar to mine. I was surprised that the predictions are different using the same predictors. I would have expected the same. I understand, that the model would be different with each estimation, but getting different predictions for the...
If you supply the argument <code>newdata</code> the discrepancy disappears: <code>predict(rt.est, newdata=df)</code> gives <pre><code>Volvo 142E 22.15557 Volvo 142E1 22.15557 </code></pre> When you do not supply <code>newdata</code>, it's probably reporting the out-of-bag results, but I haven't found an explicit ...
I got a similar problem using the package randomForest for a binary classification. In my case, executing predict() on the same rf and the same validation set consisting of a single record I got different predictions, sometimes 0 and sometimes 1. I discovered that such issue is present when both output classes have the...
https://stats.stackexchange.com
58,659
[ "https://dba.stackexchange.com/questions/58659", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/30661/" ]
I read the derived tables have better performance than temporary tables, but anyway many SQL Server developers prefer the second ones. Why? I must do queries with large data (millions records) and I want to be sure I am using the best choice. <pre><code>CREATE TABLE A( id BIGINT IDENTITY(1,1) NOT NULL, field1 ...
i Solve it <pre><code> DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `spr_GetInformation`(IN cos_ID INT) BEGIN SELECT students.ID as 'StudentID', course.course_ID as 'CourseID', students.name, course.course_name, ...
<pre><code> SELECT students.ID as 'StudentID', course.ID as 'CourseID', students.name, course.course_name, course.cost_fee, students_Course.net_cost FROM students_course INNER JOIN ...
https://dba.stackexchange.com
38,458
[ "https://physics.stackexchange.com/questions/38458", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/12035/" ]
<blockquote> A 5.00-kg object placed on a frictionless, horizontal table is connected to a cable that passes over a pulley and then is fastened to a hanging 9.00-kg object, as in Figure. Find the acceleration of the two objects and the tension in the string. </blockquote> <img src="https://i.stack.imgur.com/...
<strong>Hint</strong>: Distinguish between the part of the system that is responsible for the gravitational force and the total system that is accelerated. You can also suppose that the mass of the pulley and any friction phenomenon that could be associated to it, is neglected. Further suppose that the cable is inexte...
Let us assume m(2) accelerates downward. <img src="https://i.stack.imgur.com/2eqzw.png" alt="Force Body Diagram for m(1)"> From the figure of m(1) we get, F(x)= T-m(1)a(x)=m(1)a F(y)=n-m(1)g=0=m(1)a(y) <img src="https://i.stack.imgur.com/DKsKZ.jpg" alt="Force body diagram for m(2)"> From figure of m(2) we get, F(y)...
https://physics.stackexchange.com
188,604
[ "https://physics.stackexchange.com/questions/188604", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
The steady-state motion of a driven oscillator is given by;$$x =\underset{\text{amplitude}} {\dfrac{F_0}{m({\omega_0}^2 - {\omega}^2)}} \cos\omega t.$$ As we see, the amplitude becomes maximum when $$\underset{\mbox{driven frequency}}{\omega} = \underset{\mbox{natural frequency}} {\omega_0}.$$ Coming now to the forced...
The power transfer is maximised at resonance because the driving force and the velocity of the oscillator are in phase. If you multiply two sinusoidal terms together (the force and the velocity) with a phase difference between them, then the product has its maximum average value when the phase difference is zero and a...
Although the mathematical model is generic, the physical systems it can represent are different in respect to what the parameters and input/output variables may represent. So in a general sense your question is difficult to answer. But to illustrate you can take the simple pendulum for example, and more specifically t...
https://physics.stackexchange.com
236,037
[ "https://physics.stackexchange.com/questions/236037", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/106843/" ]
According to Newton's laws, free fall is subjected to the pull of gravity at acceleration of 9.8 m/s per second (something like this). But I don't think the principle of "free fall" is applicable to calculate momentum when someone falls to the ground. It has a "fulcrum" in this process. (It is a second/third class leve...
Radiant energy is the only type of heat transfer you can have when the pressure is very low. Everything emits radiation and the major factors which control the rate of energy emission by radiation from a body is the temperature of the body, area of the body and the nature of the surface of the body. The rate of emiss...
In space where there is no matter to conduct heat, energy can still leave our body in the form of electromagnetic radiation. This will continue to happen until the amount of radiation emitted from our body and the amount of radiation from outer space absorbed by the body reach an equilibrium which would of course happe...
https://physics.stackexchange.com
35,764
[ "https://mechanics.stackexchange.com/questions/35764", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/3150/" ]
I am planning to do some car fixes and want to know what precautions I must follow in order to make it safely. Specifically, I'd like to know is for what kind of work, the battery should be unplugged. I assume that everything related to lights must be done with a disconnected battery. But what about tasks like door re...
These are some general guidelines when working with electricity on vehicles: <ul> <li>Always remove any jewelry, to include rings, necklaces, watches, etc. If one of these items should come in contact between a hot and ground, it will instantly go hot (if there's enough amperage flow) and will burn into your skin requ...
A car battery isn´t capable of generating enough voltage to shock you (but the ignition coil can.) It is however capable of generating enormous current and can easily melt things and start fires. You need to be careful with anywhere that is not fused. That means the battery itself and the starter motor. You should als...
https://mechanics.stackexchange.com
189,848
[ "https://physics.stackexchange.com/questions/189848", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/1792/" ]
I'm reading Landau's Book. He tries to conclude the law of inertia from the Lagrange equations. For that, he argues (by nice suppositions about space and time), that the lagrangian must depend only on the velocity. More specifically, only on the square of the velocity. The point is, since the lagrange equations is: ...
You're correct. To find the equations of motion, we have: \begin{align*}c_i&amp;=\frac{\partial L(v^2)}{\partial v_i}\\ &amp;=L'(v^2) 2 v_i \end{align*} so that $L'(v^2) v_i$ is constant for all of time. Firstly, you could imagine a world in which all paths ${\bf x}(t)$ are valid mechanical paths. Then the Galilea...
It follows from $L$ being a function $\propto\dot{x}^2$. With this at hand, you are left with two choices: <ol> <li>$\left(\nabla_{\dot{x}}L\right)'\sim\left(\dot{x}\right)'=0$ implies $\dot{x}=\rm const.$</li> <li>$L=0$ implies $\dot{x}=0=\rm const.$</li> </ol> Either way, you get that the velocity is constant in ti...
https://physics.stackexchange.com
86,028
[ "https://softwareengineering.stackexchange.com/questions/86028", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/23699/" ]
People used to say it's "better"/"Make more money" to do back-end programming (PHP, asp.net) instead of front-end(HTML, javascript) for web development. But I notice that HTML5, CSS3, WebGL, Javascript are gaining importance. We can even use HTML5, CSS3 and JAVASCRIPT for building mobile web applications(For both iph...
I think it's a function of the way software works: You are trying to design an interface that lets the user do the most with the least amount of effort/clicks. So for each user action, you're going to have more (and more and more) action being performed by the system. The logical extension is that there will always be...
As someone who specializes in front-end development I can say that there is still a lot more work for people on the server-side. I do agree that front-end development is becoming more "real" (ie. real programming, instead of just laying out static HTML) but it is still not as big an area for developers. On the other h...
https://softwareengineering.stackexchange.com
141,927
[ "https://chemistry.stackexchange.com/questions/141927", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/100350/" ]
why is the gap between the first two orbits greater than the gap between second and third orbit? shouldn't the gap keep decreasing as the radius keeps increasing? Can someone explain this ?
If the initial and final states of systems are the same for both reversible and irreversible process, the entropy change for the systems will be the same. But the entropy change for the surrounding will not be the same, as the final states will be different. The surrounding for the irreversible process will end with hi...
Yes, that is how we determine the entropy change of a system for an irreversible process . We determine the entropy change for a reversible path between the same two end states.
https://chemistry.stackexchange.com
111,421
[ "https://electronics.stackexchange.com/questions/111421", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/33210/" ]
A couple of times when taking apart older bits of electronics, I've seen a small neon lamp about the size of a fuse (but its definitely not a fuse) positioned near the power supply circuitry. What is its purpose? Is it used as some kind of input protection? Does it illuminate under fault conditions? Why not use a MOV...
It is used as discharger for overvoltage conditions - in case of overvoltage a discharge starts through the lamp and that protects the main circuit from overcurrent. A neon lamp is used because it is relatively cheap, very reliable and there's zero current through the lamp until the discharge actually starts.
On some old electronics (especially during vacuum tube era) the neon bulb was put in parallel with a fuse and used as a blown fuse indicator. Other times it was merely a power applied indicator (pilot lamp).
https://electronics.stackexchange.com
7,751
[ "https://mechanics.stackexchange.com/questions/7751", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/4020/" ]
With a less than optimal 12.2 volts at the battery terminals and the bendix drive at the starter failing to pop and engage the flywheel, would battery charge be a likely cause of such a failure? Or would the fact that the starter motor runs, minus bendix action, conclude that the battery charge is <strong>not</strong> ...
A less than optimal battery and a functioning solenoid you would <strong>at least</strong> get the bendix to actuate. The less than optimal battery, would not supply enough power to have the starter actually rotate the engine. This is usually audiable with a quickly repeating clicking type noise and other times by on...
It is unusual to hear of a bendix starter motor now days. Most starter motors are known as 'pre-engaged' and have a starter 'pinion' operated by the solonoid. When you turn the key to start with a bendix starter motor, the motor armature spins and the inertia of the bendix causes it to wind itself along its helix, enga...
https://mechanics.stackexchange.com
61,226
[ "https://physics.stackexchange.com/questions/61226", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/23188/" ]
How do named objects in the universe scale? Is there a predictable curve for an ordered list, say {atom, animal, planet, solar system, galaxy, etc}? Can you then use the analysis to predict when the next larger structure will be seen?
In principle you could, and there are some theorists that believe that dark matter has its own interactions. However, unless there is some fundamentally wrong about our understanding of earth's interior, we could not have a dark matter planet superimposed with the earth, or we would feel the additional gravity force, w...
<strong>No.</strong> Every piece of evidence that points to dark matter existing simultaneously points to it interacting <em>extraordinarily weakly</em> with everything else, <em>including</em> itself. A dark matter particle in all likelihood could pass back and forth through the Earth a billion times and still emerge ...
https://physics.stackexchange.com
149,496
[ "https://cs.stackexchange.com/questions/149496", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/139449/" ]
I can't understand why the Java HashMap load factor is 0.75. If I understand well, the formula for the load factor is n/m, where n is the number of key and m is the number of position in the hash table. Since HashMap utilize bucket (i.e., a linked list) to store the value it is possible to have a load factor &gt; 1 wit...
I don't know the answer, but I can walk you through what might be going through the mind of someone designing such a data structure. Assuming a &quot;good&quot; hash function, and that <span class="math-container">$n$</span> is large enough, then for a given load factor <span class="math-container">$\lambda$</span>, th...
Using linked-list buckets is not the only way to resolve collisions. There is another technique: <em>rehashing</em>. Basically, when a collision occurs, an attempt is made to find a different, unoccupied slot. One way is <em>linear probing</em> - basically, the index of the slot is incremented by a fixed constant (m...
https://cs.stackexchange.com
134,369
[ "https://mathoverflow.net/questions/134369", "https://mathoverflow.net", "https://mathoverflow.net/users/50973/" ]
Let $X$ be a complex manifold and $L$ a line bundle on it. Define $Y:=\mathbb{P}(L\oplus \mathcal{O}_X)$ be the projective bundle over $X$. Here is a statement I don't understand: <blockquote> The summands $L$ and $\mathcal{O}_X$ respectively determine divisors on $Y$, each of which is isomorphic to $X$. </blockquot...
This is a rather standard fact. Let $\mathscr{E}$ be a rank $2$ locally free sheaf on $X$ and let $\pi \colon \mathbb{P}(\mathscr{E}) \to X$ be the corresponding $\mathbb{P}^1$-bundle. Then there is a natural correspondence between sections $\sigma \colon X \to \mathbb{P}(\mathscr{E})$ of $\pi$ and suriections $\mat...
For any locally free sheaf $\mathcal{E}$ on $X$, the projective bundle $\mathbb{P}(\mathcal{E}\oplus \mathcal{O}_X)$ possesses an open subset $\mathbb{V}(\mathcal{E})$ whose closed complement is isomorphic to $\mathbb{P}(\mathcal{E})$ and corresponds to the divisor associated to the sheaf $\mathcal{O}_X(1)$. In your c...
https://mathoverflow.net
167,863
[ "https://physics.stackexchange.com/questions/167863", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7348/" ]
A while ago, I asked a question if two events are always simultaneous in some reference frame. I received excellent answers. The point is that if $E_1$ and $E_2$ are time-like separated with time between events $t &gt; 0$ in some frame $S$, then it can easily be shown that for any frame $S'$, these two events cannot be...
<img src="https://i.stack.imgur.com/yJs9P.png" alt="Spacetime diagram of relativity of simultaneity"> I drew the spacetime diagrams for you. On the l.h.s. you may see two simultaneous events in the unprimed (x,t) frame. The axes of a frame going in the positive direction (the primed frame) should be drawn into the unp...
You can draw this yourself. Make the vertical axis time and the horizontal axis space. The lines of simultaneity for various observers are all the lines with slopes of less than 45 degrees (in absolute value). So pick any two points that are connected by a line of slope greater than 45 degrees (or equivalently, draw...
https://physics.stackexchange.com
116,851
[ "https://physics.stackexchange.com/questions/116851", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/17264/" ]
What makes the two 'color-neutral' gluons $(r\bar r−b\bar b)/\sqrt2$ and $(r\bar r+b\bar b −2g\bar g )/\sqrt6$ different from the pure $r\bar r +b\bar b +g\bar g $ ? Why don't they result in long range (photon-like) interactions?
In your solution you seem to make the assumption that the terminal velocity in the y-direction is zero. This produces the wrong answer. This is how I would solve the problem: First, let's note that the initial velocity in both x- and y-direction are the same (due to the $45^{\circ}$ angle). Let's call it $v$. The dist...
If you can't directly use the formulae which are generally being used during study of this chapter, there is another method for doing so: You can find actual (resultant) initial velocity like, u = sqrt(Ux^2 + Uy^2) metre/second now if use of formula is allowed, you can find "hang time" (called "Time of flight", to...
https://physics.stackexchange.com
66,827
[ "https://physics.stackexchange.com/questions/66827", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/15874/" ]
1)<img src="https://i.stack.imgur.com/VNFAx.png" alt="circuit 1"> 2)<img src="https://i.stack.imgur.com/vzCwB.png" alt="circuit 2"> I know, that $$ τ = \frac{L}{R} $$ but what is $R$ in this formula? It seems to be the total resistance, but how to find it in 1) and 2)?
<sub>Have derived it myself:</sub> $${\tau}=\dfrac{\underbrace {\large { I}}_{\text{through inductor at steady state}}}{\underbrace {{dI_{\small }}/{dt}}_{\text{initial}}}$$ Also $$V_{\text{inductor}}=L\dfrac{dI}{dt}$$ where $I$ is current through inductor.
<blockquote> but what is R in this formula? </blockquote> Since you're interested in what happens <em>after</em> the switch opens in both cases, redraw the circuit after the switch opens. In (1), there is just the one resistor R to the left of the switch so that's the resistance in the time constant. In (2), there...
https://physics.stackexchange.com
141,792
[ "https://stats.stackexchange.com/questions/141792", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/71202/" ]
I have two factors j (with 3 levels A, B, C) and k (with 3 levels M, N, O), with k nested within j. Level A of j is the reference level and it has only one k level, M, in it. <strong>What I want to test with the model is: (1) are the means for each non-control j level significantly different than the mean for j="A"? ...
<strong>The answer in short is "contrasts".</strong> I had heard of them before but hadn't learned what they are. In fact, they serve exactly the purpose I was looking for. They can be used to alter the coefficients. For a given model you would always have the same number of coefficients, but by using contrasts the...
reverse the levels of k: levels(k)[1:3]=levels(k)[3:1] then re-run the model. The model uses the second two factors, so reversing them would display the first one and second factors. <pre><code> levels(df$k)[1:length(levels(df$k))]=levels(df$k)[length(levels(df$k)):1] f = lm(x ~ j/k, data=df) summary(f) </code></pre...
https://stats.stackexchange.com
15,511
[ "https://dba.stackexchange.com/questions/15511", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/7650/" ]
Apologies for the obscure question, it may make more sense with a concrete example: In my application, I may create a portfolio that contains a set of projects. However, I may also add a 'sub-portfolio' nested within a portfolio (which then may contain projects). Currently, I have my schema drawn out the following way...
If the relationship is strictly hierarchical (i.e. a portfolio can have several sub-portfolios or projects, but a project cannot appear in more than one sub-portfolio) then you can model portfolio and project using a subtype pattern, e.g. <pre><code>-- === PortfolioItem table =========================================...
If my memory serves me well, 'One to either' is called Polymorphic Association. Usually, it can be resolved by using a common parent table (index definitions are skipped for simplicity): <pre><code>PortfolioParent (id int not null PRIMARY KEY, portfolio_type char(1) not null, CONSTRAINT UQ_PORTFOLIO_PARENT UNIQUE (id...
https://dba.stackexchange.com
406,877
[ "https://softwareengineering.stackexchange.com/questions/406877", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/358952/" ]
Hi I am trying to create a role based dynamic route authorization system on my NodeJS ExpressJS powered API server. Scenario: <ul> <li>There will be some roles like Admin, StandardUser etc. and they can't be edited or removed. </li> <li>More roles can be added by authorized users dynamically. These roles of course can ...
Data being "unchangeable" doesn't necessarily mean it cannot be changed. It just cannot be changed through the application. Set an "unchangeable" flag on each row. When <code>true</code> the application refuses to change the data. When <code>false</code> it can change it. How you enforce this depends on how paranoid yo...
There is nothing inherently wrong in storing some data in your DB which will never change later. Just make sure there is no easy way to mess around with this data. <blockquote> <ol> <li>Where should I put SuperAdmin and StandardUser roles?</li> </ol> </blockquote> Just put them in your roles table, but introdu...
https://softwareengineering.stackexchange.com
383,231
[ "https://physics.stackexchange.com/questions/383231", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/174062/" ]
A system is described by a Hamiltonian $$H^0=\frac{p^2}{2m}+\frac{m\omega^2}{2}x^2.$$ A perturbation in the form of $$H'=\lambda \frac{4m^2\omega^2}{\hbar}x^4$$ is applied. I showed that $H'=\hbar\omega(a_++a_{-})^4$ with $a_{\pm}=\frac{1}{\sqrt{2\hbar m \omega}}(\mp ip+m\omega x)$. After this I need to show that $$(a...
Let's start noticing that \begin{equation} \left(a \ + \ a^{\dagger} \right)^2 = a^2 \ + \ 2 \ a^{\dagger} \ a \ + \ 1 \ + \ a^{\dagger 2} \, . \end{equation} Consider now the fact that \begin{eqnarray} \langle n| \left(a \ + \ a^{\dagger} \right)^4 | k \rangle &amp;=&amp; \langle n| \left(a \ + \ a^{\dagger} \right)^...
There seems to be a mistake in your question. Are you supposed to compute $(a_+ a_-)^4$ or $(a_+ + a_-)^4$ ? Whatever the task is - write down the ladder operators in their spectral form and form the pairs. Only the ones shown above will remain.
https://physics.stackexchange.com
214,517
[ "https://security.stackexchange.com/questions/214517", "https://security.stackexchange.com", "https://security.stackexchange.com/users/178480/" ]
As far as I know, with OpenSSL, you can self-sign your website's certificate. This means that the browsers that will connect your server are supposed to be willing to accept a self-signed certificate for your website. My question is, how does the browser know whether or not to accept a self-signed certificate for a par...
Browsers will only accept an invalid certificate - and self-signed is one form of "invalid" - when the user acknowledges the risk and overrides the browser. The specific steps for doing so vary from browser to browser, but they're usually onerous by design - they want the decision to bypass security to be hard, not ea...
Browsers will alert the user if they are presented with a self-signed certificate which they don't trust. The browser user or system administrator should preempts this scenario and add the self-signed certificate to the browser's trust-anchor store beforehand. That way, the user won't see a warning. Done this way, u...
https://security.stackexchange.com
102,385
[ "https://cs.stackexchange.com/questions/102385", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/98477/" ]
my data's range is from 1 to 9 and I have two subsets of integers from this range. the hash function takes each of this subsets and calculate product of these three integers and maps this set to the result of this multiplication.I want to know the probability of collision by this hash function with this two subsets of ...
First, if we wouldn't get the same number after negating it twice, it wouldn't make much sense, right? So we just need to prove that the "complement and add 1" has indeed the effect of negation, i.e., taking <span class="math-container">$x$</span> into <span class="math-container">$-x$</span> (and thus, <span class="...
If we look at the numbers in an unsigned way, flipping a binary number <span class="math-container">$x$</span> on <span class="math-container">$n+1$</span> bits is computing <span class="math-container">$(2^{n+1} -1) - x = M - x$</span>. Proof for that: <span class="math-container">$x = \sum_0^n b_i2^i$</span>. <span ...
https://cs.stackexchange.com
47,134
[ "https://mathoverflow.net/questions/47134", "https://mathoverflow.net", "https://mathoverflow.net/users/6159/" ]
It's an obvious and well-known fact that there is no uniform probability measure on a set of natural numbers (i.e. the one that gives the same probability to each singleton). On a recent probability seminar one professor mentioned that this nonexistance is one of the main objections to measure-theoretic formulation of ...
The correct notion here is <strong>amenability</strong>. This means that there is a positive linear form $\phi$ on the space of bounded functions that is invariant under translations: $$\phi(\tau_nf)=\phi(f),\qquad\forall f\in\ell^\infty(\mathbb Z),n\in\mathbb Z,$$ where $\tau_nf(m):=f(m+n)$. As mentioned by Qiaochu, i...
Some people object to countable additivity, and say that probability measures should be only finitely additive. There's a book called <em>Theory of Charges</em> (by---I think?---K. P. S. Bhaskara Rao) dealing with finitely additive measures and their theory of integration. I think Bruno de Finetti's book on probabili...
https://mathoverflow.net
166,024
[ "https://dba.stackexchange.com/questions/166024", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/116895/" ]
I would like to create a stored procedure that will create a row in a table for every day in a given date range. The Stored Procedure accepts two inputs - A start date and end date of the date range desired by the user. So, let's say I have a table like so: <pre><code>SELECT Day, Currency FROM ConversionTable </code...
One option is a recursive CTE: <pre><code>DECLARE @StartDate datetime = '2017-03-05' ,@EndDate datetime = '2017-04-11' ; WITH theDates AS (SELECT @StartDate as theDate UNION ALL SELECT DATEADD(day, 1, theDate) FROM theDates WHERE DATEADD(day, 1, theDate) &lt;= @EndDate ) ...
Another option is to use a Table-Valued-Function. This approach is very fast, and offers a little more flexibility. You supply the Date/Time Range, DatePart and Increment. Also offers the advantage of including it in a CROSS APPLY <strong>For Example</strong> <pre><code>Select * from [dbo].[udf-Range-Date]('2017-0...
https://dba.stackexchange.com
95,044
[ "https://electronics.stackexchange.com/questions/95044", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/34916/" ]
The RGB LED is supposed to be controlled by PWM, how can I map the position of a potentiometer to a color combination?
To begin with, there is no definitive discrete set of "all colors" for an RGB LED: Each of the emitters, red, blue and green, can essentially be varied through an infinite set of interim values from fully off to fully lit. If we were to simplify the problem statement per the convenience of fitting into Arduino's libr...
Mapping a three dimensional space to a single dimension is inherently difficult! I'd use an HSV model and use the pot to vary H for fixed S and V. I'd Google for an algorithm to translate HSV to RGB and implement that in the Arduino. I'm assuming you know how to connect pots to ADC inputs and read them. Also that you...
https://electronics.stackexchange.com
20,643
[ "https://physics.stackexchange.com/questions/20643", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/4556/" ]
My parents told me to turn off the light when I am not using it. But I remember my physics teacher told me that the action of turning on/off a light can cause huge energy. I am wondering how much is that? Someone said the energy caused by this action are enough to keep the light on for 15 minutes. If we require a conf...
First thing, it depends on the type of light used. For an incandescent bulb, a bit of energy is used up while turning it on; but not much. On the other hand, tubelights have inductors (choke coils) in them. These come into play when switching the tubelight on and off only. This is because inductors oppose change in c...
From an answer by Steve Selkowitz of Lawrence Berkeley National Labs (I'm quoting it in full here because the site has changed and I had to pull this from an old mailing list archive) <blockquote> Fluorescent Lighting - Should I turn the lights off? There have been two very resilient energy myths that have dis...
https://physics.stackexchange.com
480,938
[ "https://physics.stackexchange.com/questions/480938", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/136800/" ]
When we measure the speed of light we get the same answer in all directions. This is taken to undermine the aether or absolute motion hypothesis and give support to the proposal that the speed of light is invariant, from which derives the theory of special relativity. But doesn't the fact that we only measure speed of...
The bottom line is that this is the wrong question to ask. You don't ever prove an axiom in physics. You're not quite right about the ether: while the <em>first order</em> effect cancels out in "there and back again" experiments, the second order effect doesn't, which is why the Michelson-Morley experiment stood a ch...
There-and-back measurements still show the effect of an aether, because you can compare the results in different directions. For example, there-and-back along the direction of motion would show a different speed from there-and-back across it. This was the approach taken in the Michelson-Morley experiment.
https://physics.stackexchange.com
87,122
[ "https://dba.stackexchange.com/questions/87122", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/55695/" ]
I am a newbie in databases. I read around and found out that it's probably not a great idea to use email address as primary key because string comparisons are slower which effects performance in complex joins and if an email changes I'd have to change all the foreign keys which requires a lot of effort. But if my user...
Let's first distinguish between keys and indexes, key is part of the logical model and is often implemented with an unique index. You can however create a unique index without creating a key, but that can not be referenced by a foreign key. A candidate key is something that uniquely identifies a row in a table, in SQ...
Yes having a unique index on the EmailAddress column should be ok. The only problem would be if someone gave up the email address after signing up for your service but didn't tell you, then whoever the owner of the email address tries to sign up. But that's a pretty rare edge case. As to if a Unique Index allows null...
https://dba.stackexchange.com
38,141
[ "https://cs.stackexchange.com/questions/38141", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/27485/" ]
As far as I understand we got SYSENTER/SYSEXIT instructions because system calls via interrupts were slow (right? I might be wrong though). Therefore my question is why system calls via interrupts are slow? And how do we optimize them via SYSENTER/SYSEXIT instructions? Thank you
There is the general rule about interrupts being slow, and the particular case of x86 CPUs. <ul> <li>x86 have had several ways to enter kernel mode : Call gates, interrupts. They are complex, microcoded instructions, requiring many register save operation and protection checks. SYSENTER/SYSEXIT are just optimised meth...
A software interrupt (or call gate, for that matter) requires pushing a bunch of stuff onto the stack, and popping when the OS returns. SYSENTER/SYSEXIT does not.
https://cs.stackexchange.com
707,130
[ "https://physics.stackexchange.com/questions/707130", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/262313/" ]
I'm currently studying Friction <span class="math-container">$f_a$</span> and Normal force <span class="math-container">$N$</span>, and I read that those two forces are nothing but the parallel and perpendicular components of a &quot;general&quot; force called Contact Force <span class="math-container">$C$</span>. In t...
Yes, since friction is limited by <span class="math-container">$| \vec{f}_a | \leq \mu | \vec{N}|$</span> you can write as a condition for stiction the following expression <span class="math-container">$$ | \vec{C} | = | \vec{N} + \vec{f}_a | \leq \sqrt{1+\mu^2}\; | \vec{N} | $$</span> This is interpreted geometrically...
<blockquote> We know that the basic expression for the friction is <span class="math-container">$$f_a = \mu N$$</span> </blockquote> That's the basic equation for kinetic friction where <span class="math-container">$f_{k}=\mu_kN$</span> and <span class="math-container">$\mu_k$</span> is the coefficient of kinetic frict...
https://physics.stackexchange.com
322,621
[ "https://electronics.stackexchange.com/questions/322621", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/22868/" ]
The thermal noise density can be written as: $$nd_V=\sqrt{k_BTR}$$ or $$nd_I=\sqrt{\frac{k_BT}{R}}$$ The units begin V/sqrt(Hz) or A/sqrt(Hz). For the second expression, does this imply infinite current noise density for an ideal wire? This seems strange! I understand that the final noise power does <em>not</em> depe...
This looks a bit ugly, but maybe if we think a bit more about what a zero resistance wire is, we can work out why we won't get something physically unrealistic. <strong>Superconductors</strong> One way to get a zero resistance would be to use superconductors. These are very weird materials - they have huge quantum...
<blockquote> still infinite noise density seems absurd. </blockquote> You're assuming \$R=0\$, which is just as absurd. But yeah, if you have the slightest voltage in a system without resistance, you get infinite current. Ohm. However, the thermal noise formula is actually derived through the voltage case (ie. you ...
https://electronics.stackexchange.com
113,313
[ "https://datascience.stackexchange.com/questions/113313", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/70546/" ]
Many paper and books say that sigmoid activation function with random intialization is prone to vanishing/exploding gradients therefore it is better to use LeakyRelu, Elu, or Relu. Does this mean that we should use them in final layer of binary classificiation as well?
Vanishing &amp; Exploding Gradient problem happens in case of deep neural network. In NN when we have to update weights &amp; biases for each layer we calculate the partial derivate with respect to y_hat at each layer <strong>(Back Propogation Algorithm)</strong>. Because in this case weights are multiplied in chain wi...
There's no problem using the sigmoid function in the final layer. Vanishing/exploding gradients only become a issue when the sigmoid function is used across multiple layers. Sigmoid is used &quot;behind the scenes&quot; when you use the softmax function for multi-class classification. A sigmoid function is used for eac...
https://datascience.stackexchange.com
133,269
[ "https://security.stackexchange.com/questions/133269", "https://security.stackexchange.com", "https://security.stackexchange.com/users/106038/" ]
I was testing a new proxy server today with SSL Labs and found that I had somehow included some anonymous cipher suites. After resolving the problem I decided to find out what problems this could cause and how/why this was exploitable. To my surprise (considering the report and rating cap from SSL Labs) I was unable t...
While anonymous cipher suites feel bad when configured at the server side like in your case they are only a real problem if the client offers such cipher suites. Only in this case a man in the middle attacker could trick the client to connect to the attacker because the client can be forced to not authenticate its peer...
It's exploitable because no authentication / certificate exchange is performed.
https://security.stackexchange.com
16,757
[ "https://physics.stackexchange.com/questions/16757", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/6068/" ]
One of the experimental evidence that supports the theory of big bang is cosmic microwave background radiation (CMBR). From what I've read is that CMBR is the left over radiation from an early stage of the universe. My questions are: <ol> <li>Why are we able to detect this radiation at all? </li> <li>As the nothing...
This radiation was created 380,000 years after the Big Bang at every place of the Universe and from every place of the Universe, it was moving in every possible direction. So the density (per unit volume and per unit solid angle of motion) of photons at a particular place $(x,y,z)$ and a particular direction of motion ...
@Lubos is correct, but here is some additional information about why all these photons started traveling towards us when the universe was only 380,000 years old. Up to that time the temperature of the universe was over 3,000 $K^o$ (<em>approximately - this is from my memory which may be slightly inaccurate</em>) and al...
https://physics.stackexchange.com
90,216
[ "https://mathoverflow.net/questions/90216", "https://mathoverflow.net", "https://mathoverflow.net/users/21892/" ]
Suppose we have a simply-connected Lie group $G$. Let $G_1$ and $G_2$ be two closed and connected subgroups of $G$. Is it true that the commutator $[G_1,G_2]$ is a closed subgroup of $G$?
No. Let's make an example in which both $G_1$ and $G_2$ are one-dimensional. Start by choosing $x$ and $y$ in $\frak{sl}_2(\mathbb R)$ such that the subgroup determined by $[x,y]$ is a circle (the square of this matrix has negative trace) but the subgroups generated by $x$ and by $y$ are isomorphic to $\mathbb R$ (th...
Maybe I can frame the question further, though I'm not a Lie group specialist. From the viewpoint of topological groups, just requiring one of the two subgroups to be connected will force the commutator group here to be connected. But closure is a more delicate issue. Requiring a simply connected Lie group $G$ at...
https://mathoverflow.net
205,126
[ "https://stats.stackexchange.com/questions/205126", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/109510/" ]
I have 2 normally distributed random variable $H_0$ and $H_1$, which are combined to give the weighted distribution $H$ as follows: $H_0 \sim N(\mu_0, \sigma_0)$ $H_1 \sim N(\mu_1, \sigma_1)$ $$f_H = p * f_1(x) + (1-p) * f_0(x),$$ where $H$ has pdf $f_H$ and $H_1$ and $H_0$ have pdfs $f_1$ and $f_0$ respectively. T...
(I am assuming $H_1$ and $H_0$ are independent) Let $f_H = pf_1(x) + (1-p)f_0(x)$, where $f_1$ and $f_0$ are pdfs of $H_1$ and $H_0$. Then the random variable $H$ is the mixture of two normal distributions. For the mean of $H$ $$E(H) = \int x\left(pf_1(x) + (1-p)f_0(x) \right) dx = p\mu_1 + (1-p)\mu_0. $$ Similarly ...
Let $Z$ denote a Bernoulli random variable with parameter $p$. Then, the random variable $H$ can be thought of as having <em>conditional</em> density $N(\mu_i, \sigma_i^2)$ according as $Z$ equals $i$, $i=0,1$, and thus <em>unconditional</em> density $$f_H(x) = pf_{H_1}(x) + (1-p)f_{H_0}(x).$$ The <em>unconditional mea...
https://stats.stackexchange.com
4,531
[ "https://quantumcomputing.stackexchange.com/questions/4531", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/4866/" ]
In classical computing, we can run the key search (for example AES) by running parallel computing nodes as many as possible. It is clear that we can run many Grover's algorithms, too. <strong>My question is</strong>; it possible to have a speed up using more than one Grover's algorithm as in classical computing?
Certainly! Imagine you have <span class="math-container">$K=2^k$</span> copies of the search oracle <span class="math-container">$U_S$</span> that you can use. Normally, you'd search by iterating the action <span class="math-container">$$ H^{\otimes n}(\mathbb{I}_n-2|0\rangle\langle 0|^{\otimes n})H^{\otimes n}U_S, $$<...
In a sense, if we were doing it in parallel on different nodes, you would save time for running. But if we talk about complexity (that is what we refer to speedup generally), we need a bit of analysis. You agree that we need about <span class="math-container">$ \sqrt{N} $</span> operations for the non-parallel case. ...
https://quantumcomputing.stackexchange.com
39,234
[ "https://physics.stackexchange.com/questions/39234", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/12032/" ]
This is problem 2.8.3 from Miller's <em>Quantum Mechanics For Scientists And Engineers</em>. I'm getting stuck when I try to figure out the wave equation on the right-hand side of the barrier. The original problem is: <blockquote> Graph the (relative) probability density as a function of distance for an electron...
The particles that communicate the Weak interaction, i.e W Bosons and Z bosons are massive. So unlike Electromagnetism which is communicated by massless particles(Photons), the weak interaction has a very short range. For Massive particles the Potential of interaction falls as $V(x) = -K \frac{1}{r} e^{-m r} $ The...
The electrostatic force between the electron and the proton (in classical terms) varies as $1/r^2$ so when the electron and proton are separated by a large distance the force goes to 0 therefore at large distance the electron and proton become free particles. Note that when the electron and proton are very close the fo...
https://physics.stackexchange.com
59,580
[ "https://mathoverflow.net/questions/59580", "https://mathoverflow.net", "https://mathoverflow.net/users/13825/" ]
Assume you have a Poisson point process of constant intensity $\lambda$ in the Euclidean plane. From this point process we construct the Delaunay triangulation (or the Voronoi tessellation for that matter). It is known [Stoyan et all] that the expected degree of a typical vertex has degree 6. Moreover, there are seve...
The expected degree for the Delaunay triangulation on hyperbolic space will depend on the density of the points. With low enough density points, you should get arbitrarily high degree. You should be able to get the expected degree as high as you want for a point distribution in the plane by taking the conformal represe...
Let's speak momentarily about the space average, rather than the expected degree. That is, consider the (expectation of the) average degree over all vertices in the disc of radius $R$ around the origin and take $R$ to infinity. I claim that unless the intensity increases really fast (exponentially?) this average will s...
https://mathoverflow.net
10,999
[ "https://dba.stackexchange.com/questions/10999", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/5871/" ]
I was recently working in a very slow stored procedure (took 5 minutes to run). I made a very small tweak from doing this: <pre><code>declare @tempTable table ( ... ) insert into @tempTable select ..... </code></pre> to <pre><code>select ... into #tempTable from someTable </code></pre> The script then ran in ~2 ...
Table Variables don't have statisics in the same way as Temp Tables normally they're assumed to have only 1 row. This incorrect estimate of rowcount will make a nested loop operation look like the best plan but when this is done for a larger amount of rows the cost can easier be greater than a table scan.
Just to add to @MartinC's answer that the row count for table variables is maintained in <code>tempdb.sys.partitions</code> and <code>OPTION(RECOMPILE)</code> can cause this to be used but it doesn't have any more granular statistics to use so will need to fall back on guesses based on that. You have only shown the po...
https://dba.stackexchange.com
1,329,170
[ "https://math.stackexchange.com/questions/1329170", "https://math.stackexchange.com", "https://math.stackexchange.com/users/190098/" ]
I've been having trouble checking whether this sequence converges or not: $$\sum_{n=0}^{\infty} \frac{n-3}{n+2}^\left({n^2-n}\right)$$ At a first glance I thought I should try the root test but that didn't work (maybe I did something wrong?) Some help? Thanks.
I think the root test works $\mathop {\lim }\limits_{n \to \infty } \sqrt[n]{{{{\left( {\frac{{n - 3}}{{n + 2}}} \right)}^{{n^2} - n}}}} = \mathop {\lim }\limits_{n \to \infty } {\left( {\frac{{n - 3}}{{n + 2}}} \right)^{n - 1}} = {e^{ - 5}}$
Since: $$\left(1-\frac{1}{n}\right)^n \leq \frac{1}{e}, \tag{1}$$ we have: $$\sum_{n\geq 1}\left(1-\frac{1}{n}\right)^{n^2}\leq \sum_{n\geq 1}\frac{1}{e^n} = \frac{1}{e-1}.\tag{2}$$ With minor adjustments (I leave it to you to find them) this proves that your series is converging.
https://math.stackexchange.com
36,008
[ "https://electronics.stackexchange.com/questions/36008", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10555/" ]
Usually when I design a PCB, I name the LEDs as <code>LED1</code>, <code>LED2</code>, ... , but now I'm working on a set of boards where I do not have much space for the component names on the silkscreen. The boards are divided in four functional blocks. In order to be able to better identify which parts belongs to w...
<em>added <strong>IEC allows Stainless steel screen printing down to 1mm</strong></em> (but I know where you can get legible screen and printing at 0.5mm <strong>Q</strong> Is there any convention for one letter prefix to use for LEDs that is different for diodes? <strong>A</strong> Yes. DS for Display lampS (LEDs) and...
We had lots of discussions about component prefixes, but the main idea was to use as much single letter prefixes. So diodes are "D", whether they're LEDs or rectifiers. On a schematic the symbol should make the difference clear, on a PCB the silk outline may, though maybe not always for SMDs. Once the board is populate...
https://electronics.stackexchange.com
410,738
[ "https://physics.stackexchange.com/questions/410738", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/197872/" ]
I'm used to encounter units that come from product or division of units, such that $m/s$ or $kg\cdot m\cdot s^{-2}$. However, I have never seen a unit defined as a sum of units, for instance, $m+J$. I don't know if the reason if just that it doesn't make physical sense or if there are examples of something like that. ...
It’s because it doesn’t make any sense to add different units. Each unit measures a specific dimension. You give example of a m+J. But what does that mean? It’s like trying to add 4 oranges and 5 fire trucks. What’s the sum of that? Well, it’s 4 oranges + 5 fire trucks, because those are two totally different things...
One non physical example are complex numbers in the complex plane. But I'm not sure this is the same case.
https://physics.stackexchange.com
599,896
[ "https://physics.stackexchange.com/questions/599896", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/284453/" ]
Even though we don’t feel the gravity but is it true that we also attract every other object on the planet along with the earth attracting us. <ul> <li>Can I say that a human also has gravity? </li> <li>Can we find our gravity attraction range. </li> </ul>
Every object in this universe attracts every other object; this force is gravitational force. The magnitude of force that we exert on an object and the object exerts on us is equal. <blockquote> Can I say that a human also has gravity ? </blockquote> A better statement will be that humans have a gravitational field. <b...
Yes, every massive object attracts any object with mass in Newtonian mechanics (in a general relativistic view it would actually be: every object with energy is a source of curvature of the spacetime). In Newtonian mechanics, the gravitational force has an infinite range (and it is an instantaneous force), but the inte...
https://physics.stackexchange.com
37,143
[ "https://electronics.stackexchange.com/questions/37143", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/11271/" ]
I have a simple question, when troubleshooting a SMPS is highly adviced to use an Isolation transformer. But my question is this, if im using a scope to troubleshoot the "hot" side of my SMPS, both the SMPS AND scope AC power should come from the isolation transformer ? OR Should i connect the SMPS to the isolation t...
Power the circuit you are testing thru the isolation transformer, and the scope normally (not thru the isolation transformer). It <i>does</i> matter which of the scope or circuit you isolate, since the scope has a chassis and connectors that you can easily touch. You want that stuff grounded so that the dangerous par...
You connect the SMPS through the isolation transformer because the voltages on it are lethal and when directly connected to mains power may zap you <em>hard</em>. The transformer isn't a full proof solution, but at least you are safe when touching a single terminal. Also when using a isolation transformer, you are mor...
https://electronics.stackexchange.com