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
182,618
[ "https://mathoverflow.net/questions/182618", "https://mathoverflow.net", "https://mathoverflow.net/users/37354/" ]
Let $G$ be a Lie group, $N$ a closed connected normal subgroup. Let $BG$, $BN$, $B(G/N)$ be the classifying spaces of $G,N$ and $G/N$. Is there a fibration $BN\to BG\to B(G/N)$ ? It seems that such a construction is used in Atiyah, Bott: <em>Yang-Mills equations on Riemann surfaces</em>, formula (9.2), but I can't see...
This is an edited extract from a book in preparation (Bruner, Catanzaro, May) tentatively titled Characteristic Classes and is therefore overlong for an answer. This is similar to Denis Nardin's answer, but more bundle theoretic; he did refer to an old Memoir of mine, so I thought I'd give an answer. Let $N$ be a clos...
By functoriality there is a map $BG\to B(G/N)$. Let $X$ to be its homotopy fiber. Then you can get a fiber sequence $\Omega X \to G \to G/N \to X \to BG \to B(G/N)$ using the fact that $\Omega BG = G$ for every (nice enough) topological group $G$. Then, since $N$ is the fiber of $G\to G/N$ we have that $\Omega X = N$...
https://mathoverflow.net
377,273
[ "https://mathoverflow.net/questions/377273", "https://mathoverflow.net", "https://mathoverflow.net/users/169294/" ]
In a combinatorial computation, I came across the following quantity: Consider a finite meet semilattice <span class="math-container">$L$</span>, that is, a finite poset which is closed under <span class="math-container">$\min$</span>. Denote the least element of <span class="math-container">$L$</span> by <span class="...
This is a special case of the crosscut theorem. See e.g. Corollary 3.9.4 of <em>Enumerative Combinatorics</em>, vol. 1, second ed. Let <span class="math-container">$L'$</span> be <span class="math-container">$L$</span> with a top element <span class="math-container">$\hat{1}$</span> adjoined. In Corollary 3.9.4 take <s...
To get a complete answer, I think you will need to use the specific properties of your semilattices. But I think the key observation is to notice what the maximal faces of your complex <span class="math-container">$Z_c$</span> are: A subset <span class="math-container">$S$</span> of <span class="math-container">$L$</s...
https://mathoverflow.net
5,167
[ "https://security.stackexchange.com/questions/5167", "https://security.stackexchange.com", "https://security.stackexchange.com/users/764/" ]
Is it not true that SSL can be decrypted by simply having listened to the network activity of a PC on a network? (for example, from the first time a random PC connects to a coffee shop, and keep listening until the user stops browsing and you no longer care for further data) Aren't all the keys there and the algorithms...
The short answer to your question is, in the general case*, no. The longer answer is that the reason that this is not possible is largely to do with the use of Public-Private key cryptography in the establishment of the SSL session which means that the session key is not transmitted over the network in the clear at an...
You can create a common shared secret without transferring it over the network. Read on RSA and Diffie-Hellman key exchange in Wikipedia or other sources to get an intuition on how this works. You can even do a simple test computation by yourself (but it is only secure for extremely large numbers and several minor modi...
https://security.stackexchange.com
77,251
[ "https://physics.stackexchange.com/questions/77251", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/29599/" ]
Given that some systems may radiate energy in the form of gravity waves, and that gravitational waves weaken proportionally to the distance travelled, what would happen to the waves that never hit anything and just propagated infinitely? Do they just become infinitesimally small? If so, would this imply that energy ca...
The amplitudes do become arbitrarily small, and there's nothing at all wrong with this. In fact the <strong>exact</strong> same thing happens with electromagnetic waves. Sure we have a quantum theory with photons that places limits on how small a packet of energy can be detected, but light can travel across the univers...
yes, the waves fall off in intensity as they get farther from the source. This does not violate conservation of energy, because you'll just be spreading the same amount of energy out over an ever larger volume, but the (energy density)*volume will be constant, minus energy transferred from the waves to matter.
https://physics.stackexchange.com
47
[ "https://dba.stackexchange.com/questions/47", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/19/" ]
Database files that are built using SQL 2008 are not compatable with 2005. Is there a work around?
No 3rd party tools necessary. SQL Server 2008 Management Studio gave us a very powerful tool to down-convert a database because they added a "Script data" option to the "Script database" wizard. Just right-click the DB in SQL2008 SSMS, and go to Tasks, then "Generate Scripts" Walk through the wizard, make sure to cho...
You could BCP the data from one SQL Server instance to another instance. That would be the fastest way to copy the data from one version to another. Depending on the volume of data, it might take a long time.
https://dba.stackexchange.com
13,774
[ "https://quantumcomputing.stackexchange.com/questions/13774", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/13244/" ]
I am running a very simple script just to learn how to use IBMQ, but my job will hang indefinitely and I am forced to terminate it. <pre><code>from qiskit import * from qiskit.compiler import transpile, assemble from qiskit import IBMQ from qiskit import QuantumCircuit, execute, BasicAer import logging logging.basicC...
The function <code>execute</code> is non-blocking. That means that it will return after sending the job, but not necessarily with the result. In your code, you should wait for the status of the job to be <code>DONE</code>: <pre><code>print('About to run job') job = execute(circuit, backend) job.status() </code></pre...
To add on to the previous answer, if you want to see the progress of your job in real time, you can try the following: <pre><code>from qiskit.tools.monitor import job_monitor job_monitor(job) </code></pre> job_monitor shows you ever step, including job initialization, validation, being queued, to running and completion...
https://quantumcomputing.stackexchange.com
13,408
[ "https://dsp.stackexchange.com/questions/13408", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5362/" ]
I am trying to understand the equivalence of convolution through polynomial (coefficient) multiplication, Fast Fourier Transforms, and matrix multiplication. I am using octave with the octave-signal package, and part of this question may possibly related to their implementation (which I believe would be the same for MA...
A helpful construction is that of a ,,convolution unit''. If you find a signal that, convolved by itself, stays identical, then you know a lot about how your convolution algorithm works. Note that while all discrete units (all ones surrounded by zeros) are convolution units, certain implementations might introduce padd...
Convolution and polynomial multiplication are equivalent by definition. Offsets are usually introduced through indexing. The treatment of ends is important.
https://dsp.stackexchange.com
400,134
[ "https://physics.stackexchange.com/questions/400134", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/174421/" ]
Would someone please give an intuitive explanation of this? I can still visualise an end of the rod getting compressed and thus transmitting a longitudinal wave, but how can a transverse wave be created?
Strike the side of the rod, not the end. This leads to a transverse displacement wave.
Answer 1 is correct. But for a solid you have surface waves. A solid does not act like a fluid. Fluids only support compression waves. The solid has a crystal matrix that describes the reaction of the solid for all the different directions under influence of a force. In particular there is the Poisson effect which...
https://physics.stackexchange.com
658,665
[ "https://physics.stackexchange.com/questions/658665", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311089/" ]
<em>In trying to learn about Quantum mechanics (QM) from popular science books and Stack Exchange (I of course expect my knowledge to be anything but complete) I regularly come up with seemingly childish questions where I wish I could interrupt the author or visit them during office hours.</em> <em>I'd prefer low level...
<blockquote> How can this argument be made without violating FTL? </blockquote> By thinking about the electron as not being a particle taking many separate classical paths simultaneously, but instead as a probability distribution, spread out so that there is a distinct probability of finding it any point along any p...
What Feynman is pointing out is actually a general wave property. For example, light passing through a slit can also be seen as a a superposition of all possible directions, note however, with an intensity equal to the slit's Fourier transform. At a distant, in terms of wavelength, point P all of these waves arrive, bu...
https://physics.stackexchange.com
74,699
[ "https://softwareengineering.stackexchange.com/questions/74699", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/24962/" ]
If so, can you tell me how learning a new paradigm changed your approach for solving programming problems even if the problem is in another paradigm/language/technology? I will really appreciated If you can tell me in a specific manner, how your X (ie: JAVA/C#/C++) programming skills improved by learning Y (ie: Scheme...
I try to learn at least 1-2 new languages every year. The most I gained was from learning a functional language (F#) which changed the way I look at solving problems - I=now I try to tell the machine what to do instead of how to do it, especially in C# where I use Linq heavily and immutable objects now that I know the ...
Absolutely. Every programming language you learn will have a different way of doing certain things. Some things will drive you crazy, some things you'll love and other things will slowly grow on you. Its never a waste of time to learn at least the basics of a new language.
https://softwareengineering.stackexchange.com
31,631
[ "https://mathoverflow.net/questions/31631", "https://mathoverflow.net", "https://mathoverflow.net/users/394/" ]
<strong>Background</strong> Let $f: M \to N$ be a smooth map between smooth manifolds. Two vector fields $X$ in $M$ and $Y$ in $N$ are said to be <strong>$f$-related</strong> if for all $p \in M$, $(f_*)_p(X_p) = Y_{f(p)}$; equivalently, if for every smooth function $g: N \to \mathbb{R}$, one has $$(Yg) \circ f = X(g...
I hate to throw cold water on the party, but surprisingly, the formula that the OP was trying to prove ($[X',Y']=[X,Y]'$) is actually <em>false</em> when $G$ acts on the left. This formula is correct if $G$ acts on the <em>right</em> on $M$; but if $G$ acts on the left, then the correct formula is $[X',Y']=-[X,Y]'$. ...
Since I could use the reputation... letting $\psi: G \to \operatorname{Diff}(M)$ be the action then $X' = \psi_* X$, where we identify $\operatorname{Lie}(\operatorname{Diff}(M))$ with vector fields on $M$. This is because they both correspond to the one-parameter subgroup $t\mapsto \psi(\exp tX)$ of $\operatorname{Di...
https://mathoverflow.net
18,203
[ "https://astronomy.stackexchange.com/questions/18203", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/14084/" ]
Why are the Galactic Coordinates not aligned so that the Axes go through the Long Bar Y-axis aligned to it's longer side, positive with Sol, and the X-axis align to the center of the short length with Sol being in the negative? Z should obviously be on the galactic plane where it generally is I think... I'm curious ab...
You're correct in assuming the net angular momentum of the system in question here will remain constant. The Moon's orbit around Earth is responsible for the slowing of Earth's rotation. This effect is <em>extremely</em> small. The decrease in Earth's angular momentum is transferred to the moon, which resultantly see...
<blockquote> Where does the power/energy go? </blockquote> It goes into heating the Earth and the Moon. That heat in turn spreads out into the universe. While the Earth-Moon system comes very close to conserving angular momentum, it does not conserve mechanical energy. In fact, that angular momentum transfers from ...
https://astronomy.stackexchange.com
186,876
[ "https://physics.stackexchange.com/questions/186876", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/57641/" ]
Can anyone kindly help me in finding the effective resistance between A and B in the below goven case ? Each resistor is of 16 ohm .. <img src="https://i.stack.imgur.com/12glA.jpg" alt="enter image description here"> Thank you .
If each resistor is 16 ohms then you can reduce the 4 parallel resistors on each side to one 4-ohm resistor. This leaves you with one 4-ohm resistor between A and B, in parallel with 3 4-ohm resistors in series going B-C-D-A. So, 4 ohms in parallel with 12 ohms. The formula for parallel resistors is <ul> <li>(R1 *...
First off, reduce those 4 resistors in each side to just one resistor - they are actually 4 in parallel. It then becomes simple.
https://physics.stackexchange.com
42,314
[ "https://electronics.stackexchange.com/questions/42314", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8769/" ]
What does high input resistance in fet mean? I always see this term when dealing with fet transistors like jfet and mosfets.
For a MOSFET the high input resistance is caused by the isolation layer between gate and channel (blue in the picture): <img src="https://i.stack.imgur.com/uV3st.png" alt="enter image description here"> The layer is made of SiO\$_2\$, which has an <em>extremely</em> high resistance of 10\$^{16}\$ &Omega;\$\cdot\$m, a...
Resistance determines the amount of current that flows when a certain voltage is applied. High resistace means less current (at the same Voltage). Ohms law, google if you don't understand that yet. The input resistance is the equivalent resistance of the input (in a FET's case, between the gate and the drain == groun...
https://electronics.stackexchange.com
214,555
[ "https://mathoverflow.net/questions/214555", "https://mathoverflow.net", "https://mathoverflow.net/users/15129/" ]
This must be surely known but I couldn't locate this problem in the literature. It popped out in <em>a priori</em> unrelated approximation problem but if true, would help me greatly. Let $p\in (1,\infty)$. Informal version: <blockquote> Do the spaces $\ell_2^k$ sit well-complemented in all sufficiently large fini...
If I understand you correctly, much stronger statement holds for any space with nontrivial type, see Theorem 15.10 in the book of Milman and Schechtman on Asymptotic Theory.
This can be directly calculated. All you need is upper and lower function $L_p$ estimates in a sequence of length $2^n$. Then the Rademacher functions spans well complemented copy of $\ell_2^n$. I think this is explicitly written in Tzafriri's paper `on Banach spaces with an unconditional basis' from late 70's in Israe...
https://mathoverflow.net
20,683
[ "https://mathoverflow.net/questions/20683", "https://mathoverflow.net", "https://mathoverflow.net/users/1040/" ]
The most elementary construction I know of quantum groups associated to a finite dimensional simple Hopf algebra is to construct an algebra with generators $E_i$ and $F_i$ corresponding to the simple positive roots, and invertible $K_j$'s generating a copy of the weight lattice. Then one has a flurry of relations betw...
There is a detailed exposition of this in Majid's paper <em>Double-bosonization of braided groups and the construction of</em> $U_q(\mathfrak{g})$, Math Proc Cambridge Phil Soc 125(1). Especially appendix B where quantum group is obtained by a version of Tannaka-Krein duality for braided monoidal categories applied to ...
If you have a copy of Gaitsgory's <i>Notes on factorizable sheaves</i> there is a sketchy exposition of the relative double in section 3.2, and a description of the construction of the quantum group in section 5 (in the numbering of the March 2008 edition). Here is what I understand, with many possible misconceptions....
https://mathoverflow.net
35,290
[ "https://electronics.stackexchange.com/questions/35290", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8769/" ]
So a while ago, i was stumbled upon a post what will happen to the dc circuit when we supply ac to it. Lets assume the ac has the same voltage as the dc. We know that ac switches direcions so there will come a tome it is positive, zero and negative. If the ac is in its positive voltage, the dc circuit will work fine....
Circuits designed for a particular DC voltage are very unlikely to work correctly with AC, even at the same voltage. There is a very good chance the circuit will be damaged by the negative half-cycles of the AC power. There are some exceptions to this, but they aren't really "circuits". A incandescent lightbulb work...
Your example of the battery in series with a resistor is atypical, in as much that the negative voltage might do less harm than the positive! If you would apply a positive voltage larger than 3 V there would flow a current from that voltage to the battery, and that's not a good idea if it's not a rechargeable battery. ...
https://electronics.stackexchange.com
405,246
[ "https://physics.stackexchange.com/questions/405246", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/193317/" ]
For the speed of a transverse wave in a string we use the formula $$v= \sqrt{\frac Tμ } $$ and sometimes we use the formula $v =λf$. Are these two same or different?
They give the same value for speed, however, they are different; they relate the speed to different parameters. The first relates the speed to the tension and the linear density, which gives the value of the speed in relation to the specific parameters of the string. Similar to relating speed of sound to temperature. ...
They are different, and both are true. $v=f\lambda$ applies to all waves: strings, sound, water, light, every sort of wave (maybe not crime waves :-). $v=\sqrt{T/\mu}$ is specific to transverse waves of strings. Waves in other situations have equivalent formulae coming from their specific dynamics.
https://physics.stackexchange.com
177,417
[ "https://mathoverflow.net/questions/177417", "https://mathoverflow.net", "https://mathoverflow.net/users/11395/" ]
Let $G$ be a compact abelian group. Then we know, because of the Peter-Weyl theorem, that $L^2(G)$ decomposes as a Hilbert space direct sum of 1 dimensional representations of $G$. Let $\mathbb{A}$ denote the adeles for $\mathbb{Q}$. Suppose we are given an automorphic funtion $\phi:GL_2(\mathbb{A})\to \mathbb{C}$ (I...
It is indeed reasonable to wonder what's going on with "Fourier expansions" along non-abelian (sub-) groups... since, among other things, any one-dimensional representation has to factor through the maximal abelian quotient, so must lose some information. For contrast: the unipotent radical $N$ of the standard minimal...
One needs to work with the more complicated object $N(\mathbb{Q})\backslash N(\mathbb{A})$ in order to be able to recover the automorphic form. This is called the Whittaker model for $GL_n$, and it goes as follows. Fix a nontrivial character $\psi$ on $\mathbb{Q}\backslash\mathbb{A}$, and consider the Whittaker functio...
https://mathoverflow.net
21,916
[ "https://mathoverflow.net/questions/21916", "https://mathoverflow.net", "https://mathoverflow.net/users/5483/" ]
I am fairly new at linear programming/optimization and am currently working on implementing a linear program that is stated like this: max $\sum_{i=1}^{k}{p(\vec \alpha \cdot \vec c_i)}$ $s.t. $ $|\alpha_j| \le 1$ Where p(x) = 2x if x &lt; 0, x otherwise, and $ \vec c$ is a constant The p(x) function is what's t...
Sorry for making you wait 14 hours unnecessarily but you are partially guilty yourself: if you posted a correct and full version of the question from the beginning, you would get the answer in 5 minutes. Keep it in mind when you ask a question on a public forum next time. Your problem is equivalent to maximizing the l...
<s>The easiest way to deal with this is to split it into two problems: one obtained by adding the inequality $x \ge 0$ and using the objective function $2x$, and the other by adding the inequality $x \le 0$ and using the objective function $x$. Incidentally, I don't think that you mean the inequality $|\alpha_i| \le 0...
https://mathoverflow.net
60,484
[ "https://stats.stackexchange.com/questions/60484", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4426/" ]
So just "why" is $SE = \frac{s}{\sqrt n}$ ? How should one interpret/articulate the reason of having $\sqrt n$ in the denominator. Why do we divide sample mean by the square root of the sample size, intuitively speaking? And how/why is it called standard "error". (Question equally applicable for true standard deviatio...
This comes from the fact that <span class="math-container">$\newcommand{\Var}{\operatorname{Var}}\newcommand{\Cov}{\operatorname{Cov}}\Var(X+Y) = \Var(X) + \Var(Y) + 2\cdot\Cov(X,Y)$</span> and for a constant <span class="math-container">$a$</span>, <span class="math-container">$\Var( a X ) = a^2 \Var(X)$</span>. Since...
Why √n? So there is this theory called the central limit theorem that tells us that as sample size increases, sampling distributions of means become normally distributed regardless of the parent distribution. In other words, given a sufficiently large sample size, the mean of all samples from a population will be the...
https://stats.stackexchange.com
193,255
[ "https://electronics.stackexchange.com/questions/193255", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/87450/" ]
I'm working with a system that has 3 2MVA transformers for which there is an existing estimate of the peak load and the power factor. The xfmrs appear to have a greater thermal capability than the rating (up to ~120% per xfrmr), and we're adding a shunt cap-bank ~1MVA to improve the voltage regulation. I'm trying to n...
Turns out I was making this too difficult. ~120% thermal capability of the transformers means they can each have 120% of their KVA rating. Hence the bank will need about 647 KVAR of additional caps.
If the transformers can be operated at 120% of their base rating, that probably only applies to operating conditions that are different from the base conditions. Alternate ratings are often stated for operation with cooling fans. Alternate ratings might also be published for operation below rated ambient temperature or...
https://electronics.stackexchange.com
17,873
[ "https://mechanics.stackexchange.com/questions/17873", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/10954/" ]
I need to know the exact version of my motorcycle, I can't find this information on the frame nor the user manual. It's a Kawasaki ER-5 sold in October 2005 in France. I want to replace the fork oil and the service manual states different level regarding the version of the motorcycle. <blockquote> Front Fork Oil Le...
If it's your car, and if the car's still drivable, then bring it to another garage (or 2 or 3) for a quote in person. No headlights should be ok during daylight, and I <em>think</em> hand turn signals are still legal in CAN/US if your signals are broken, but you might want to phone &amp; ask at a local motoring associ...
I think it would be very difficult to give a precise estimate over the Internet, without actually seeing the vehicle. You need to take a good look at the complete structure, not only the apparent bits but also underneath. Even if it does seem just such a bit of a superficial bang, modern vehicles are built with deforma...
https://mechanics.stackexchange.com
179,250
[ "https://mathoverflow.net/questions/179250", "https://mathoverflow.net", "https://mathoverflow.net/users/31310/" ]
I am currently working on a problem that may be interpreted as recovering an unknown function from its Radon transform. Unfortunately I don't have any background in Radon transform, but need to quickly get what I need for solving my problem. The questions are: <ul> <li>are there properties (e.g. degree of smoothn...
to follow up on my comment with a few more pointers: Even if you will not be using the ready-to-use <A HREF="http://www.mathworks.nl/help/images/the-inverse-radon-transformation.html" rel="nofollow">MATLAB toolbox</A> for Radon transform inversion, you will likely want to use MATLAB as a platform for the development ...
Regarding your first question. The Radon transform on even functions on the sphere $S^d$ is an isomorphism of the Sobolev space $L^2_s(S^d)^+$ (+ stays for even functions) to $L^2_{s+\frac{d-1}{2}}(S^d)^+$ for any real $s$. This still remains true if the measure, with respect to which the Radon transform is computed,...
https://mathoverflow.net
131,284
[ "https://physics.stackexchange.com/questions/131284", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/53164/" ]
I've seen in many movies and programs the event where a car plummets off the road and in to a body of water, sinking rapidly. The car slowly fills with water as it sinks and the occupant(s) don't break free until well under the water (50m say). At this point, when outside of the sinking vehicle, they then breathe air ...
<em>breathing</em>: Since the tyre is a about 2 atm at the surface, at 50m it will have a pressure of 6 atm if the tyre is thin (membrane) or less if is "partially rigid" (down to 2 atm if the tyre is totally rigid). If it behaves like a membrane, air will come out if you push the valve (with the tongue, I guess it wou...
The other answers have gone quite sideways with this. Firstly let's cover the easier parts of this answer (and some of the comments) before we get into the technical stuff. So you're probably pulling this from "The Transporter" 3 or something similar movie. Why you wouldn't want to breathe from the car's interior is th...
https://physics.stackexchange.com
8,930
[ "https://quantumcomputing.stackexchange.com/questions/8930", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/9254/" ]
In <em>Quantum Computation and Quantum Information</em> by Nielsen and Chuang, the authors introduce operator sum representation in Section 8.2.3. They denote the evolution of a density matrix, when given an environment, is the following: <span class="math-container">$$\varepsilon (\rho) = \mathrm{tr}_{\text{env}} [U(...
I think it helps here to write things explicitly. Suppose <span class="math-container">$\mathcal E(\rho)=\operatorname{Tr}_E[U(\rho\otimes|\mathbf e_0\rangle\!\langle\mathbf e_0|)U^\dagger]$</span>. Pick a basis for the environment in which <span class="math-container">$|\mathbf e_0\rangle$</span> is the first elemen...
<span class="math-container">$|e_k\rangle$</span> is the basis of the <em>environment</em>. Taking the sum of projections onto an orthonormal basis of one subsystem is the definition of the partial trace over that subsystem.
https://quantumcomputing.stackexchange.com
385,921
[ "https://softwareengineering.stackexchange.com/questions/385921", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
I'm rather new at programming so I'm still getting a grip on things. I'm creating an offline login system in C# that will have the ability add/remove users. The computer will not be connected to the internet. This was the approach that I was going to take: Have the username and a salted + hashed password in an XML f...
<blockquote> What's stopping a determined individual from creating their own XML file with their own details, encrypting it with their own key, and placing it on the computer via USB drive? </blockquote> Before you consider what is (not) stopping them, first ask yourself why they would want to do it to begin with. W...
<blockquote> Here's where my idea falls flat </blockquote> Only there? Why would the user fiddle with your attempt at security, when they could just decompile your .NET assembly, add a line in your check function that says <code>if( user.Name == &quot;me&quot; ) return true;</code>, compile it again and run <em>that</e...
https://softwareengineering.stackexchange.com
350,453
[ "https://softwareengineering.stackexchange.com/questions/350453", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/271680/" ]
My job is to come up with an implementation to save searches linked to an individual user, as well as the ability to analyze this data for business cases. The data will be used for users to see their search history, and for data mining to get insight in user behavior It will be implemented on an app to find houses, t...
I would go for the following UserSearches table: UserId Date Then I add <strong>a column for each field</strong> This way, you can easily SELECT the columns you want to consider, then group / sum the data. A business case you may encounter : How many different user searched for a price over 20000: <pre><code>SELE...
You may consider a third solution, having a table with: <ol> <li>Search ID (key)</li> <li>Field (key, assuming a field appears only once per search)</li> <li>Value</li> </ol> Then you can have another table with: <ol> <li>User ID (key)</li> <li>Search ID (key)</li> <li>Search counter (or whatever you need)</li> </ol...
https://softwareengineering.stackexchange.com
583,090
[ "https://physics.stackexchange.com/questions/583090", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
If <span class="math-container">$\hat p:\mathcal H\to\mathcal H_p\subseteq\mathcal H$</span> is a projection operator, and if <span class="math-container">$\hat u$</span> is unitary, then it's easy/trivial to show that <span class="math-container">$\hat u \hat p \hat u^{-1}$</span> is also a projector. But if we interp...
No, it is not true. Projectors are, by definition, idempotent; however, in general <span class="math-container">$(\hat u\hat p)(\hat u \hat p) \neq \hat u \hat p$</span>. As a trivial example, let <span class="math-container">$\hat u = -\mathbb I$</span>, which maps <span class="math-container">$\psi\in\mathcal H \ma...
J. Murray has given you a few counterexamples, so I'll address the other part of your question. The problem with your intuition is that if <span class="math-container">$\hat p$</span> is an operator, <span class="math-container">$\hat U\hat p$</span> is not a rotation of <span class="math-container">$\hat p$</span>. Co...
https://physics.stackexchange.com
3,606,743
[ "https://math.stackexchange.com/questions/3606743", "https://math.stackexchange.com", "https://math.stackexchange.com/users/607253/" ]
Suppose I have a function <span class="math-container">$f(x)$</span> differentiable on <span class="math-container">$(a,b)$</span> then by the basic definition I have that for any <span class="math-container">$c\in(a,b)$</span>: <span class="math-container">$\lim \limits_{x\to{c}} \frac{f(x)-f(c)}{x-c}=f'(c)$</span> e...
With binomial series, it's <span class="math-container">$$\lim\limits_{x\to\infty}\left[ n^2\left(1-\dfrac6{n^2}+\dfrac1{n^6}\right)^{1/3}-n^2\right]$$</span> <span class="math-container">$$\lim\limits_{x\to\infty}\left[ n^2\left(1-\dfrac13\dfrac6{n^2}+O\left(\dfrac1{n^4}\right)\right) -n^2\right]$$</span> <span clas...
A possible way is turning it into a derivative using <span class="math-container">$$n=\frac{1}{\sqrt t}$$</span> and consider <span class="math-container">$t\to 0^+$</span>. Hence, <span class="math-container">$$\sqrt[3]{n^6-6n^4+1} - n^2 = \frac{\sqrt[3]{1-6t+t^3}-1}{t}$$</span> <span class="math-container">$$\sta...
https://math.stackexchange.com
349,962
[ "https://physics.stackexchange.com/questions/349962", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/102936/" ]
I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \vec F) \cdot \vec x \ \ \ $ (or $\ \tau_x = (\vec r \times \vec F) \cdot \vec x \ $) But in my Physics class I saw: $\vec M = \vec r \times \vec F \ \ \ $ (or $\ \vec \tau ...
It is obviously a vector, as you can see in the 2nd formula. What you are doing in the first one is getting the $x$-component of that vector. Rememebr that the scalar product is the projection of one vector over the other one's direction. Actually you should write $\hat{x}$ or $\vec{i}$ or $\hat{i}$ to denote that it ...
Torque (Force Moment) is a vector that describes the location of the Force line of action. <ul> <li>Lemma: If you give me a force vector <span class="math-container">${\vec F}$</span> and a moment vector about the origin <span class="math-container">${\vec M}$</span> then I can define a line whose points obey the relat...
https://physics.stackexchange.com
332,236
[ "https://softwareengineering.stackexchange.com/questions/332236", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/144888/" ]
Lets say I have a function that takes an argument, does some action based on the value of that argument and returns false if there is no action for that value. (pseudo-code): <pre><code>bool executeSomeAction(someValue) { switch (someValue) { case shouldDoAction1: action1(); break; case ...
It's definitely not bad practice. I use the direct return pattern quite a lot for factory/strategy methods, where different classes implement the same interface and a specific implementation is retrieved based on some strategy. Not using direct return, having to use the <code>break</code> statement and perhaps having ...
I don't believe it is bad practice to write such code. On the contrary, I believe that it is <em>very good practice</em>. If the execution reaches a point where the function has nothing more to do, <code>return</code>ing immediately is the best and most obvious thing to do. If I read <code>return</code>, I know immedia...
https://softwareengineering.stackexchange.com
93,851
[ "https://security.stackexchange.com/questions/93851", "https://security.stackexchange.com", "https://security.stackexchange.com/users/54158/" ]
When would a DNS attack actually happen? Is it already possible when i connect my pc to the router which is connected to my isp's modem and has received their DNS servers, or later when i am trying to reach a website? If the second possibility is true i guess using tor browser or whonix would be an adequate protection...
A DNS attack happens when an attacker can influence how your computer will resolve host/domain names. That can happen if an attacker is able to: <ol> <li>Change the DNS server IP address in the network settings on your computer</li> <li>Change the DNS server IP address in the network settings on your router</li> <li>...
<blockquote> When would a DNS attack actually happen? [...] [W]hen [...] my pc [first receives DNS servers from] the router which is connected to my isp's modem? </blockquote> That's an interesting possibility, to somehow inject an attacker's DNS servers in DHCP replies. This is not how it's usually done however, be...
https://security.stackexchange.com
20,042
[ "https://chemistry.stackexchange.com/questions/20042", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/4835/" ]
I started to learn Chemistry with something like Hydrogen having 1 electron in the first shell, Oxygen having 2 electron in the first shell and 6 electron in the second shell... But I don't really understand how scientists know it? How do they know there are how many shells and how many electron per shell? Is that some...
Electrons are not <em>actually</em> separated in shells. That is a simplified model to explain the atom's structure when people first start approaching Chemistry or Physics. In reality, electrons' movements around the nucleus are governed by complex equations (some of them not even resolvable so approximations are ne...
One way to think of this is to think of the total number of bonds that atoms can make. You can then use experimentation to look at the structure of the compounds, and that will tell you a lot about how the electrons are configured around the nucleus. For instance, Carbon compounds tend to take on tetrahedral shape if t...
https://chemistry.stackexchange.com
519,424
[ "https://electronics.stackexchange.com/questions/519424", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/260824/" ]
Suppose I have the discharging free source RC circuit as shown below (I am referring to figure <em>a</em>, not figure <em>b</em>): <img src="https://i.imgur.com/jNIyvGy.png" alt="Text" /> From this, I can easily calculate that the charge on the capacitor as a function of time is <span class="math-container">$$Q(t)=Q_0 ...
The place where beginners usually screw up with Ohm's law is by not being clear about <em>which</em> voltage and/or which current they are referring to. Ohm's law relates the voltage across the resistor to the current through the resistor. &quot;V&quot; in your diagram is not the voltage across the resistor; it is the ...
The voltage in your figure is not the one across the resistor, so it'll not work as intended and that yields incorrect results. Remember as well that for capacitors and inductors, the use of phasors or the Laplace Transform may ease all your time domain calculations, a quick grasp of MATLAB functions can solve you lots...
https://electronics.stackexchange.com
148,298
[ "https://physics.stackexchange.com/questions/148298", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/50809/" ]
I have been looking for this for quite some time now. A simple pendulum behaves in SHM. Let's put that pendulum in an upward accelerating elevator. The component of the force that acts in SHM $(\text{mg}\sin\theta)$ still stays the same in my head. However, websites and books tell me to use $m(g+a)\sin\theta$ where $a...
Well it depends on the context of your question. If you're being introduced to General Relativity, then you're just going to assume, in the spirit of the equivalence principle, that gravity and the acceleration cannot be told apart from the pendulum's standpoint, so the acceleration is obviously $a+g$. If you need to ...
If an object is accelerating upwards at a rate of $a$ m/s$^2$, then the gravitational force felt by this object is <em>effectively</em>, $$ g_{eff}=g+a $$ where $g\sim9.8$ m/s$^2$ is the canonical gravitational acceleration we all know and love. In your particular case, the common equation of motion for a pendulum, $$...
https://physics.stackexchange.com
185,574
[ "https://softwareengineering.stackexchange.com/questions/185574", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/80183/" ]
I have almost a 'best-practice' question that's been nagging at me for a while. When I use JavaScript libraries and APIs such as JQGrid or Google Maps, I tend to find myself creating server side libraries to render the JavaScript for me. For example I might have: <pre><code>$map-&gt;setZoom(10); $map-&gt;setDimensio...
<strong>First issue: code quality</strong> How do you: <ul> <li>unit test,</li> <li>debug,</li> <li>review for security issues,</li> </ul> this generated code? The issue is the same for any generated code.That's why code generation tools are used only for simplistic tasks where the code is mostly boilerplate. For ...
I convert data to JSON on the server by using a series of "plug-ins" that convert standard data sets to multiple styles of JSON. This allows me to convert data to objects, array of arrays or custom formats (like that used by DataTables). My data layer doesn't have to change, I just switch out the JSON formatter when ne...
https://softwareengineering.stackexchange.com
23,995
[ "https://robotics.stackexchange.com/questions/23995", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/32878/" ]
Good afternoon! We are a company that has a pretty big robotic framework and we are currently working in a transition into ROS2. We are first creating the structure that all of our packages will follow. Until now, these were separate modules in the same CMake project. Now, as we are starting to test the transition we e...
After some trial an error and going through the suggestions that people made, I managed to at least make it work. It seems that when I try to link to my own spdlog installation (not the ros version), it finds it but links to it incorrectly. If I link to both, spdlog and rclcpp, then it find both installations and links...
I don't see where you're actually referencing spdlog in your CMakeLists.txt file. I would expect an entry like the following: <pre><code># spdlog find_package(spdlog 1.9.2 REQUIRED) target_link_libraries (your_project_name ${catkin_LIBRARIES} spdlog::spdlog) </code></pre>
https://robotics.stackexchange.com
223,356
[ "https://electronics.stackexchange.com/questions/223356", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/73068/" ]
PWM is a very powerful technique to simulate an analog output from a microcontroller, programmable logic or any other digital environment. This can be used to drive LEDs, motors and speakers, etc... without the need of an external DAC component (in some cases a low-pass filter is necessary). A PWM is typically made by...
I thought I'd sum up my comments in an answer - maybe it'll be of some use to somebody. <ol> <li>Using white noise will make it harder to remove the modulation signal rather than easier. In the case of a normal PWM signal, you need a low pass and you are done. When using white noise to do the modulation you will cau...
An improvement certainly. But it does not improve it to the point where there are no signals at a frequency of f_clock/resolution, they are still present, reduced by the first order of the frequency ratio. If the small improvement is adequate for your application, then go for it. For typical audio application, the impr...
https://electronics.stackexchange.com
93,575
[ "https://datascience.stackexchange.com/questions/93575", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/116681/" ]
I am working on a <strong>cab booking prediction problem</strong> where I need to use <em>datetime</em> aspects like hour,day ,week etc for prediction. As I need to do categorical encoding for the purpose. can anyone help me out on which one to use i.e label encoder or one hot encoder. I am not able to gather much info...
I am not sure this type of model is a good use case for the particular task. More specifically, citing Chollet from Deep Learning with Python book, <blockquote> Always remember that when it comes to markets, past performance is not a good predictor of future returns—looking in the rear-view mirror is a bad way to drive...
First of all, adding features to your model can easily cause overfitting. Even adding a column of random values can cause overfitting. Take for example your series with exactly one feature - the price. The price can be the same value X several times - first when the series is rising, and then when it's decreasing. if y...
https://datascience.stackexchange.com
2,213,960
[ "https://math.stackexchange.com/questions/2213960", "https://math.stackexchange.com", "https://math.stackexchange.com/users/309566/" ]
To seek the maximum value of $S=x_1x_2+x_2x_3+\cdots+x_nx_1$ on this domain: $x_1+x_2+\cdots+x_n=0$ and $x_1^2+x_2^2+\cdots+x_n^2=1$. I have made some trivial observations: 1) $S\in[-1,1)$ by the rearrangement inequality. 2) We can make $S$ arbitrarily close to $1$ by increasing $n$. 3) An equivalent problem is t...
I propose to do a discrete Fourier transform. To this end put $\omega:=e^{2\pi i/n}$. In the following all sums are over ${\mathbb Z}_n$, unless indicated otherwise. Let $$y_k:={1\over n}\sum_l x_l\omega^{-kl}\ .$$ Since the $x_l$ are real we have $$y_{-k}=\overline{y_k}\tag{1}$$ for all $k$, furthermore $y_0=\sum_lx_...
This is too long for a comment, sorry to post that as an answer, but this question is puzzling me more than it should ! Here are more observations : <ul> <li>For $n =2$, $S=-1$ with $x_1 = \frac{1}{\sqrt{2}},\ x_2 = -\frac{1}{\sqrt{2}}$ and this is the only way to satisfy the constraints.</li> <li>For $n=3$, $S=-1/2$ ...
https://math.stackexchange.com
323,733
[ "https://electronics.stackexchange.com/questions/323733", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/89422/" ]
I'm brainstorming ways to implement a high speed wireless laser data link without the exorbitant cost. Would it be possible to take a standard SFP transceiver module and use that across free space rather than through a fibre? In other words, to point two transceivers at each other from a distance without any fiber op...
<blockquote> Would it be possible to take a standard SFP transceiver module and use that across free space rather than through a fibre? In other words, to point two transceivers at each other from a distance without any fiber optic cable between them. </blockquote> No. "Proof" to follow: The point of the fiber is t...
I do not think this is at all feasible. Aiming the transceiver module at 1km range in and of itself is never going to work reliably - even if you could somehow get the light beam focused correctly. The other significant factor to consider the incredible attenuation of signal over distance in the free space. You would ...
https://electronics.stackexchange.com
330,849
[ "https://physics.stackexchange.com/questions/330849", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/118053/" ]
I understand now, that the static friction opposes the tendency of a surface to slip over another. When a wheel rotates, static friction pushes the wheel forward to keep the contact surface stationary with respect to the ground. When a car is going at constant speed down a hill, static friction must push the car down ...
<blockquote> I understand now, that the static friction opposes the tendency of a surface to slip over another. </blockquote> Exactly! Let's remember this point in the next sentences. <blockquote> When a wheel rotates, static friction pushes the wheel forward to keep the contact surface stationary with respect t...
It is possible without rolling resistance. The question is not about rolling resistance. The question is about steepest hill. When you are braking static fiction is not pushing you down the hill. The brakes are opposing gravity. You do not have to lock up the wheels to brake. In fact when you lock up the wheels...
https://physics.stackexchange.com
259,604
[ "https://dba.stackexchange.com/questions/259604", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/97832/" ]
I have recently discovered a PostgreSQL behavior which is strange and problematic in my opinion. Consider this simple query <pre><code>SELECT 'something confidential' WHERE FALSE; </code></pre> The nonsense clause <code>WHERE FALSE</code> resembles here a very strict permission check. That works as expected: Not...
This is standard SQL behaviour for pretty much all databases. There are three ways how rows are returned: <ol> <li>without aggregate functions, the query returns one row per row;</li> <li>with aggregate functions, but without grouping, the query returns exactly one row;</li> <li>with aggregate functions and grouping,...
This is expected behaviour (not only for Postgres). If we look at the logical order of evaluation for a query: <ol> <li>FROM</li> <li>WHERE</li> <li>GROUP BY</li> <li>SELECT</li> </ol> I'll add a table (T) with one column (x) and one row in the example We have: <pre><code>SELECT COUNT(1) as CNT FROM ( VALUES (1) ) ...
https://dba.stackexchange.com
51,409
[ "https://electronics.stackexchange.com/questions/51409", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/16638/" ]
It seems like when electricity flows out of + in a battery it should be attracted by a - end of a component, but it's not like that. Why?
<h2>It is like that.</h2> Current is "attracted" to the negative end of the component. That is why you have to attach it to the <em>positive</em> end of the component... so that it will <em>have to flow through</em> the component to reach the negative end. If you connected directly, it would not flow "uphill" to r...
A key point is that we name the "+" terminal of a two-terminal component that way because it's the one that's (normally) at a more positive potential. If current flows <em>in</em> to that terminal, it means that energy is being delivered <em>to the component</em>. If current flows <em>out</em> of the more-positive term...
https://electronics.stackexchange.com
1,478,887
[ "https://math.stackexchange.com/questions/1478887", "https://math.stackexchange.com", "https://math.stackexchange.com/users/141526/" ]
This problem involves complex analysis, and the limit is as follows: <blockquote> $\lim_\limits{z \to 0} e^{-1/z^4}$ </blockquote> I have to either show that this limit exists, or that it does not. This is how I've approached this problem: <blockquote> $\lim_\limits{x \to 0} e^{-1/x^4}$ = 0 $\lim_\limits{y...
What about looking at the limit of $e^{-1/z_n^4}$ along the sequence $(z_n)_n$ defined by $$ z_n = \frac{1}{n}e^{i\frac{\pi}{4}} $$ and also along the other sequence $$ z_n = \frac{1}{n} $$ ?
Hint: try evaluating $$\lim_{t \to 0} e^{-1/((1+i)t)^4}$$
https://math.stackexchange.com
360,962
[ "https://electronics.stackexchange.com/questions/360962", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/62210/" ]
Just looking to have two devices on a single bus with the same address. There are many I2C multiplexers available, but they seem to cost ~4x what a 2x 2:1 analog multiplexer costs. Any reason I can't use an analog multiplexer for I2C running a 100kHz bus? For example a TI TS3A5223RSWR is 0.63 cents, and based on the ...
Analog multiplexers work just fine for I²C signals (if you keep the impedance and parasitic cpacitance small enough, which is usually not a problem). I²C multiplexers are more complex because they are controlled through the I²C bus itself. You need one if you do not have a spare GPIO pin to control it.
You don't need expensive low-R analog switches. Simple parts like 74HC4066 and 74HC4053 or the single gate versions work just fine for $0.11 - and you get 2 or 3 more switches to use for other things. (But see diode solution for $0.015...) You can just switch the SDA line alone, and leave SCL common to all chips. Thus...
https://electronics.stackexchange.com
206,204
[ "https://electronics.stackexchange.com/questions/206204", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/51238/" ]
Are SMD packages of microcontrollers (to be more exact : AVR mega series) less affected by noise rather than DIP packages?<br> Or the opposite is true? By noise I mean anything that can disrupt the performance of the microcontroller.
The data sheet says: - <blockquote> ORG9802 is a miniature antenna assembly, comprising four components: <ol> <li>Ceramic patch antenna element</li> <li>Adaptor PCB</li> <li>Coaxial cable (option)</li> <li>Connector (option)</li> </ol> </blockquote> Everything above is passive
In answer to your "How is this possible" question: The RF signal and DC power are both on the center conductor of the cable. At the receiver the RF is blocked from the receiver's power input with a choke, and the DC power is blocked from the signal input with a capacitor.
https://electronics.stackexchange.com
225,240
[ "https://dba.stackexchange.com/questions/225240", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/75911/" ]
I am looking at this legacy SQL query. The bit I am not able to get is why it's inner joining same table twice on the same columns. I am talking about Table1 and Table1 joined with alias "Table1Alias", <pre><code>SELECT DISTINCT othercolumns, Table1Alias.columna FROM maintable INNER JOIN secon...
It might help to rewrite the query like this, so it is obvious that the 2 joins are <strong>different</strong>, i.e. the joins are to different subsets (of the same table): <pre><code>FROM maintable INNER JOIN secondarytable ON maintable.id1 = secondarytable.a_id1 INNER JOIN table1 ...
Looking at the <code>where</code> clause, the row being pointed to by <code>table1</code> requires the column <code>type</code> to = '0' and the row being pointed to by <code>table1alias</code> requires the column <code>columna</code> to = 'conn'. Perhaps there are multiple rows on <code>table1</code> for the same <co...
https://dba.stackexchange.com
7,616
[ "https://scicomp.stackexchange.com/questions/7616", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/4530/" ]
I have one algorithm that generates a feasible solution to a linear programming problem. However, it is very likely that this is not a corner point. This makes it not suitable for direct use as an initial feasible solution for a bounded Simplex solver. How can I efficiently find a corner point from this solution that I...
Every book on linear optimization explains the simplex method as a two-stage algorithm: the first for finding a feasible corner as a starting point, and the second for finding the optimum. The first uses a dual problem. Take a look at <em>D. Bertsimas and J. N. Tsitsiklis: "Introduction to linear optimization"</em>, fo...
Unfortunately Wolfgang Bangerth's solution isn't guaranteed to work: <img src="https://i.stack.imgur.com/Q8ytn.png" alt="enter image description here"> Here's what you can do instead: Pick a direction, and move along it until you hit a hyperplane. Pick a direction along the hyperplane and move along it until you hit ...
https://scicomp.stackexchange.com
56,185
[ "https://softwareengineering.stackexchange.com/questions/56185", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/19625/" ]
Is it kind of tacky or poor practice when programmers use an unusual amount of libraries/frameworks to accomplish certain tasks? I'm working with someone on a relatively simple programming project involving geolocation queries. The guy seems like an amateur to me. For the server software, this guy used Python, Django, ...
Writing an entire program in one method is probably bad. That being said, utilizing tools that already exist can definitely help speed up development times. I hope I misinterpreted your wording as it seems to imply that Python or Django should be looked down upon as outside help. Both are extremely useful tools for dev...
In general that is considered good if the programmer has exposure to a multitude of libraries . if you can do the task using an efficiently written algorithm already available in the library does it not save time and effort?. But it would depend on the situation if the libraries and dependencies are to obscure and do...
https://softwareengineering.stackexchange.com
640,743
[ "https://physics.stackexchange.com/questions/640743", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/167872/" ]
According to page-1268-69 of Halliday, Walker &amp; Resnick's Fundamentals of Physics (10th edition), <blockquote> To emit enough light to be useful as an LED, the material must have a suitably large number of electron-hole transitions....What we need is a semiconductor material with a very large number of electrons in...
You won't run out of electrons and holes. There are two main processes through which you will get more. Thermal energy will naturally generate electron/hole pairs in your semiconductor. That's where they come from in a semiconductor at thermal equilibrium. However, this process is slower than we would like for an LED, ...
No, the current won't stop flowing as the battery maintains constant electromotive force. Some free electrons will lose their kinetic energy and become gridlocked. You can view this phenomenon, that is, free electrons losing their kinetic energy, as free electrons losing kinetic energy to a resistance, say a light bulb...
https://physics.stackexchange.com
366,769
[ "https://softwareengineering.stackexchange.com/questions/366769", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/294434/" ]
I'm confused about applying the "Composition Root" (CR) to create aggregates in DDD. Seemann (2012) defines CR as a "(preferably) unique location ... where modules are composed". He argues for composing object graphs inside CR, near the application's entry point, and warns against the temptation to compose "classes ...
Typically, the composition root is about satisfying the dependencies of various modules that make up a process/application. When Evans described DDD in the blue book, he was working in the context of a three tier architecture. You can think of the tiers as being modules - an application module, which knows about the ...
This is how I'd approach the problem, based on the excellent answer and comments given. There's a similarity between the Composition Root and an Aggregate Root: the former composes the whole application graph, and the latter contains the local object sub-graph for an Aggregate (@RobertHarvey). Hence, DI via a Composi...
https://softwareengineering.stackexchange.com
651,092
[ "https://physics.stackexchange.com/questions/651092", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/305128/" ]
I am looking for reading on examples, or preferably a comprehensive summary on how the foundations of mathematics are related to physical theory. I would like to know whether basic set-theoretic and logical assumptions that underlie the higher-level mathematical techniques such as linear algebra, various branches of an...
We know that magnification of spherical mirrors is <span class="math-container">$$m=-\frac{v}{u}$$</span> and also <span class="math-container">$$\frac{1}{f}=\frac{1}{v}+\frac{1}{u}$$</span> Substituting <span class="math-container">$v$</span> in the magnification formula, we get <span class="math-container">$$m=\frac{...
When the object is placed very close to the mirror<span class="math-container">$^1$</span> so that <span class="math-container">$u \rightarrow 0$</span>, then the magnification <span class="math-container">$M\rightarrow +1$</span>. There is no contradiction. In this case, <span class="math-container">$$M=\frac{h_i}{h_o...
https://physics.stackexchange.com
112,275
[ "https://electronics.stackexchange.com/questions/112275", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7624/" ]
If I wanted to have a PCB assembled, would I have to give the manufacturer reels of components, or will pick &amp; place machines also work with cut tape? I ask because I'm thinking of having a low quantity of boards assembled (100-200), but most reels on Digi-Key have several thousand components or ICs on them. I w...
Some P+P machines can use cut tape, others must use reels. Talk to your assembler to find out what their capabilities are. You could always get the distributor to re-reel the tape though. They may add a surcharge for this. Look for a "Digi-Reel", "MouseReel", etc. packaging option.
As Ignacio points out, cut tape and mini-reel configurations are often acceptable. That said, an assembler I used warned me to be a bit careful with all of these mini-reel options, as they've had some experiences with spliced-together fragments of cut-tape causing feed problems. For things like resistors, where not m...
https://electronics.stackexchange.com
386,065
[ "https://stats.stackexchange.com/questions/386065", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/226783/" ]
I would like to solve the problem in <strong>LDA</strong> where the within classes matrix is <strong>singular</strong> if the number of samples is lower than the number of dimensions (which is true in my case, used on images of faces). I've seen suggestions that say that I should find a non-degenerated subspace on th...
LDA tries to maximise the ratio of between-class-scatter to within-class-scatter. That is - it seeks to find a projection where there is a big gap between the classes and small variance within one class. The problem with scenarios where there are more features than samples is that there often is an infinite number of ...
As has already been mentioned by Karolis Koncevičius, in general you should either regularize within-class covariance or find a non-degenerated subspace. for the former, an easy way to do it is to toggle the "shrinkage" option in LDA or Matlab LDA package. Giving it a close-to-zero value will make it equivalent to app...
https://stats.stackexchange.com
3,826,023
[ "https://math.stackexchange.com/questions/3826023", "https://math.stackexchange.com", "https://math.stackexchange.com/users/825091/" ]
I am trying to solve the problem <span class="math-container">$$\int d^3x\,e^{i{\bf a}\cdot{\bf x}}e^{-br^2}$$</span> using symmetry arguments. Could someone direct me to a similar question or guide me through a similar problem so I can learn the method to solving problems like this? edit: Here are the steps I've taken...
This is the product of the Fourier transforms of three Gaussians. But, of course, with substantial symmetry, so it would be a waste to perform all three. First, by redefining <span class="math-container">$\sqrt{b} ~{\mathbf x}\mapsto {\mathbf x}$</span>, scale <em>b</em> out of the problem, <span class="math-container"...
<span class="math-container">$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[...
https://math.stackexchange.com
80,618
[ "https://dba.stackexchange.com/questions/80618", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/36096/" ]
I started working on an existing SQL Server Database System in which most of the fields are stored as text. Except some IDs all fields are varchar (phone numbers, zip codes, dates, addresses, monetary values etc.). This is not how I learned to build a database. When asked collegues said that it is easier this way. Is ...
Size is one consideration. An <code>int</code> can hold up to -2,147,483,648 in four bytes. A <code>char</code> will need 11 bytes to hold the same value. There are built-in functions to manipulate the various data types. <code>DATEADD()</code> and <code>DATEDIFF()</code> are two examples. This will not be possibl...
Your colleague is correct that it is easier to simply not think about it and just store everything as a varchar. But this comes at a large cost in terms of space requirements, performance, flexibility in querying data, and most importantly, lack of data integrity. This is not just a one-time cost; it is paid repeated...
https://dba.stackexchange.com
1,073
[ "https://chemistry.stackexchange.com/questions/1073", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/550/" ]
So we are told that a unimolecular elementary reaction has a rate law of $k[\text{A}]$ where a termolecular reaction with three unique reagents, $A$, $B$ and $C$ has a rate law of $k[\text{A}][\text{B}][\text{C}]$. Now, other things being equal, and assuming for the sake of argument that the initial concentrations are ...
I second J M’s answer: the rate does not depend only on concentrations, but the rate constant is key. However, I will add two more comments: <ul> <li>First, you cannot compare values of rate constants for reactions of different orders… they don't have the same dimension (unit). So, you cannot say things like “rate con...
That is exactly the case. My professor is famous (well within our group at least) for often saying "A rate is a rate constant times a concentration" You can flood your reaction with a high concentration of reactants, but if the rate constant is 0, nothing happens. In the case of a termolecular reaction (which usuall...
https://chemistry.stackexchange.com
29,589
[ "https://physics.stackexchange.com/questions/29589", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7299/" ]
Let me explain. My shower is inconsistant in how hot it gets. Whenever I turn on the shower, I always put my hand really close to the water, but not touching it, so I can feel the heat radiate from the shower. That way, if I can feel it from a distance, I know it is too hot. I also notice that if the water is very co...
I think your question is perfectly fine, I don't think this forum is only for advanced research level questions. Assuming you are not actually receiving small droplets of water, the air around the droplets is cooled by the water, which will then cool your skin. This is strongly accentuated by the fact the water create...
There are Three Types of Heat Transfer: <ol> <li><strong>Convective</strong> heat transfer is what most of us are familiar with. This is how our forced air heating system or our baseboard system transfers energy (heat) to a space. Air moves over a heating element, becomes warmer and expands into the space. In a forced...
https://physics.stackexchange.com
638,788
[ "https://math.stackexchange.com/questions/638788", "https://math.stackexchange.com", "https://math.stackexchange.com/users/91561/" ]
I had an exercise for homework for a class that said prove $$(k+1)^p-k^p\equiv 1\pmod{p}$$ for all $k=0,1,....$ So I use the binomial formula to expand $$1=1^p=(k+1-k)^p=((k+1)-k)^p$$ $$=(k+1)^p+\left(\sum_{m=1}^{p-1}\binom{p}{m}(-1)^{m+1}(k+1)^{p-m}k^m\right)-k^p$$ But since $\binom{p}{m}=p\frac{(p-1)!}{(p-m)!m!)}\equ...
You've shown that $$ a^p-a\equiv0\pmod{p}\tag{1} $$ for all $a$. Now, remember that since $p$ is prime, $p\mid ab\implies p\mid a\lor p\mid b$. Now, $(1)$ is $$ a(a^{p-1}-1)\equiv0\pmod{p}\tag{2} $$
The intermediate step is to rewrite what you just proved as $$(k+1)^p\equiv k^p+1\pmod p$$ and then use this to prove that $k^p\equiv k\pmod p$ for all $k$ by induction. It's certainly true that $1^p\equiv1\pmod p$, so the previous result and the inductive hypothesis combine to show $$\begin{align} (k+1)^p&amp;\equ...
https://math.stackexchange.com
4,357,502
[ "https://math.stackexchange.com/questions/4357502", "https://math.stackexchange.com", "https://math.stackexchange.com/users/319008/" ]
Can an analytic function, real or complex, be smooth but not continuous? Here, smooth means infinitely differentiable. Naively, a function could be of the form <span class="math-container">$$ f(x) = \begin{cases}x^2 &amp; \text{ for } x\leq 1 \\ x^2+1 &amp; \text{ for } x&gt;1 \end{cases} $$</span> Which is infinitel...
Actually, your function <span class="math-container">$f$</span> is not infinitely differentiable. In fact, it's not even differentiable, since it is not differentiable at <span class="math-container">$1$</span>. Since <span class="math-container">$f(1)=1$</span>, asserting that <span class="math-container">$f$</span> i...
The question as posed is a little confusing. A differentiable function is necessarily continuous. Your example is continuous on the domain <span class="math-container">$\mathbb{R} \setminus \{1\}$</span>. On the same domain, the function you have defined is analytic, because it is analytic on the two connected componen...
https://math.stackexchange.com
418,924
[ "https://softwareengineering.stackexchange.com/questions/418924", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/19911/" ]
<strong>Background:</strong> Our group of 10+ engineers all share a Git Repository. In the past, someone has checked in binaries that have caused the size of the repository to grow from ~10 MB to ~10GB. These unneeded binaries are slowing downloads considerably. I have found a tool/method for removing the binaries. <...
Communication is key. And organization as well.<br /> There is no way you can avoid rewriting history and keep history in sync with all cloned repositories. Therefore your whole team has to cooperate on this to avoid unnecessary issues <ol start="0"> <li>Make sure the work created by the cleanup is really important eno...
Unfortunately you are now stuck with the repo because you care. If you don't want to be stuck with the repo you need to change the culture in your organisation. This is going to take time, and you will face resistance. To start with: <ol> <li>Implement Pull Requests <ul> <li>Only add those people who undertake the trai...
https://softwareengineering.stackexchange.com
146,241
[ "https://physics.stackexchange.com/questions/146241", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/21441/" ]
Angular momentum projection operators $\hat J_z$ and $\hat J_y$ don't commute, as don't the other combinations of different projections. But this means that there's no such state in which the whole angular momentum would be defined. On the other hand, there exists the angular momentum operator: $$\hat{\vec J}=\hat{\ve...
First of all $\vec{J}$ is not an Hermitian operator from a Hilbert space to the same Hilbert space, its three components separately are. Therefore nothing requires that there must exist an orthonormal basis of eigenvectors of $\vec{J}$, that is a orthonormal basis of <strong>simultaneous</strong> eigenvectors of $J_x$...
$\hat{\vec J}$ is not actually a Hermitian operator (well, not even an operator on Hilbert space, but a linear operator from $H$ to $H^3$), but a composition of three of them. One way to see it is that eigenvalues are scalars, not vectors. Each component of $\hat{\vec J}$ is Hermitian, as also is $J^2$, this last commu...
https://physics.stackexchange.com
2,396,018
[ "https://math.stackexchange.com/questions/2396018", "https://math.stackexchange.com", "https://math.stackexchange.com/users/259584/" ]
Isn't the Euler Characteristic a topological invariant?
The Euler's characteristic is a topological invariant, namely two homeomorphic spaces have the same Euler's characteristic but is not a <strong>total</strong> topological invariant. It does not suffice that two topological spaces have the same Euler's characteristic to ensure they are homeomorphic.
We can make a lot of examples that illustrate this. It's a fact (which is not terribly hard to prove) that puncturing a surface decreases the Euler characteristic by $1$. The torus, for example, has Euler characteristic $0$. The sphere on the other hand has Euler characteristic $2$. If I puncture the sphere in two poin...
https://math.stackexchange.com
281,722
[ "https://electronics.stackexchange.com/questions/281722", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/121023/" ]
On a 15 cm PCB, where the MCU is on the one end and the current sensor on another, where should R and C components of a passive low pass filter between them be placed? Will the placement affect anything?
I assume you are reading the analog signal of your sensor using the analog to digital converter of your microcontroller, right? If so, place the RC filter close to the ADC. That way the filter will also be effective filtering out all the noise that you've picked up over the long trace. If signal integrity is a concer...
If your MCU has analogGND pin, tie bottom end of the Capacitor to that MCU pin. If your MCU has differential inputs, tie the (-) input pin to bottom of the Capacitor. Bring the Resistor right up against the Capacitor, that node tied to the ADC input pin. A tiny PCB region is the goal, so cellphone energy and fluorescen...
https://electronics.stackexchange.com
72,353
[ "https://mathoverflow.net/questions/72353", "https://mathoverflow.net", "https://mathoverflow.net/users/1887/" ]
Let $X$ be a smooth projective algebraic surface (over $\mathbb{C}$ ). For all $L\in \mathrm{Pic}(X)$, we have $$\chi(L)=\chi(\mathcal{O}_X)+\frac{1}{2}(L^2-L\cdot \omega_X).$$ This is the famous Riemann-Roch theorem in the flavour I like the most. It usually comes together with the following two formulas: $$\chi(\math...
If <span class="math-container">$X$</span> is proper with rational singularities (and quotient and A-D-E (=Du Val) singularities are rational), then you can do most cohomology computations on a resolution. Let <span class="math-container">$\pi:Y\to X$</span> be a resolution of singularities (not necessarily minimal). T...
The adjunction formula in the form $$ \omega_C \cong \omega_X(C)|_C $$ holds whenever $C$ is a Cartier divisor on a Gorenstein scheme $X$. Taking Euler characteristics, you get an extremely general genus formula. If I remember correctly, you'll find in Beauville's book on algebraic surfaces a remark on what assumpti...
https://mathoverflow.net
224,822
[ "https://dba.stackexchange.com/questions/224822", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/102905/" ]
How can I speed up this 2m5s query that has indices? <pre><code>select urls.id as urlId, count(case when s1.hit_type = 0 then 1 end) as aCount, count(case when s1.hit_type = 1 then 1 end) as bCount, count(case when s1.hit_type = 2 then 1 end) as cCount, count(distinct s1.source_id) as sourcesCount ...
Your query is equal to <pre><code>select /* urls.id */ s1.url_id as urlId, count(case when s1.hit_type = 0 then 1 end) as aCount, count(case when s1.hit_type = 1 then 1 end) as bCount, count(case when s1.hit_type = 2 then 1 end) as cCount, count(distinct s1.source_id) as sourcesCount from /* urls ...
Your query depends on wanting to get a summary after reading 5869695+ results and matching these in another table. Getting this in &lt; 5 seconds is a large ask. As it seems your data is fairly constant after entry I'd suggest creating summary tables based on date and having a {a,b,c}Count.
https://dba.stackexchange.com
332,919
[ "https://softwareengineering.stackexchange.com/questions/332919", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/201440/" ]
This is a Gitflow process question. In all the documentation (and diagrams) I've read about Gitflow, they always indicate that once a feature is completed it is merged back into the develop branch. But the one thing that I never find defined anywhere is what the definition of "a finished feature"? Is testing (Quality ...
The feature should be tested on its own before it is finished and merged back in to the develop branch. However, I think its up to each team using gitflow to define what finished means. Each team should determine how much testing should be done in the feature branch vs. how much testing must be done after it is merged ...
Teams have varying standards for considering features "done," but this part is generally considered to be when the <em>developer</em> is done. That doesn't mean you slack on the quality however. On my team that means it has passed a code review, has 100% unit test coverage, has automated integration tests, and those ...
https://softwareengineering.stackexchange.com
301,641
[ "https://mathoverflow.net/questions/301641", "https://mathoverflow.net", "https://mathoverflow.net/users/22810/" ]
Let $V$ be an object of some stable infinity category (nothing is lost by taking spectra but I see no reason to state the question in this way as it is irrelevant) and suppose we have a two step filtration: $$V_0 \subset V_1 \subset V_2$$ Lets denote $A=V_0$, $B=V_1/V_0$, $C= V_2/V_1$, $D=V_1$, $E=V_2/V_0$, $F=V_2$. ...
Technically speaking the answer to your question is no, in the sense that the data of $(\alpha,\beta,\gamma,\delta)$ alone does not determine the filtered object $V_0 \subseteq V_1 \subseteq V_2$. However, a variant on your construction does have a positive answer, and this is closely related to Massey products. Recall...
Most of this is just the octahedral axiom for triangulated categories. It would be painful to typeset it in MathJax, but the axiom gives you an octahedral diagram in which four triangular faces are distinguished triangles and the other four faces are commutative. Four of the edges are your $\alpha,\dotsc,\delta$, and...
https://mathoverflow.net
339,700
[ "https://physics.stackexchange.com/questions/339700", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/56599/" ]
I have a question about the following passage on pg. 89 of Zee's QFT in a nutshell: <blockquote> At first sight, what Dirac wanted does not make sense. The equation is supposed to have the form "some linear combination of $\partial_\mu$ acting on some field $\psi$ is equal to some constant times the field." Denote t...
It depends what you mean by "breaking Lorentz invariance". As you say, it is certainly true that if you're given a vector $c^\mu$ at some point, you can construct Lorentz scalars from that vector (that is, objects that transform covariantly under Lorentz transformations). The point Zee is getting at is this: physical...
In general, whenever you're in doubt, a more reliable way of doing transformations is, instead of replacing things by other things, defining a new coordinate $x'^\mu = \Lambda^\mu_\nu x^\nu$ and finding equalities. In this case we have that $\partial_\mu = (\Lambda^{-1})^\nu_\mu \partial'_\nu$, so let's take the equati...
https://physics.stackexchange.com
85,481
[ "https://cs.stackexchange.com/questions/85481", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/77730/" ]
I can use the pumping lemma to prove simpler examples, but i'm finding this problem rather complex partly due to the notation. Can anyone explain how I would do this problem: <blockquote> For any string $s$ in $\{a, b\}^*$, let $n_a(s)$ be the number of a’s in s, and let $n_b(s)$ be the number of b’s in s. Let L ov...
Assume $L$ is regular, and let $p$ be as in the pumping lemma. Note that $s = a^pb^{(2p)^2}a^p\in L$. Now, by the pumping lemma, we have a decomposition of $s = xyz$. As $|xy|\leq p$, we must have that $y\subseteq a^p$, Say that $y = a^k$ for some $k\leq p$ (and by the property that $|y|&gt;0$, we have that $k\geq 1$)...
An alternative proof uses Parikh's theorem. If $L$ were regular, then by Parikh's theorem the set $S := \{(n,n^2) : n \geq 2\}$ would be semilinear. In particular, there is an infinite linear subset, and so there must exist $a_0,b_0,a_1,b_1$ (with $(a_1,b_1) \neq (0,0)$) such that $(a_0,b_0) + \mathbb{N}(a_1,b_1) \subs...
https://cs.stackexchange.com
405,754
[ "https://mathoverflow.net/questions/405754", "https://mathoverflow.net", "https://mathoverflow.net/users/65954/" ]
It is a well-known fact that the range of a positive measure <span class="math-container">$\mu$</span> on a measure space <span class="math-container">$(X,\cal M)$</span> is the interval <span class="math-container">$[0,\mu(X)]$</span> provided <span class="math-container">$\mu$</span> is atomless (i.e., there is no me...
(1) Existence of sets of small measure. Let <span class="math-container">$(\Omega,\Sigma,\mu)$</span> an atomless finite measure space with <span class="math-container">$\mu(\Omega)&gt;0$</span>. It is easy to show that any measurable set <span class="math-container">$A$</span> with <span class="math-container">$\mu(A)...
As note 'added in proof': the above answers in the positive the point I was trying to make, i.e. that in the presence of a gap at some <span class="math-container">$r&gt;0$</span>, the measure <span class="math-container">$\mu$</span> cannot be atomless. Indeed, suppose that <span class="math-container">$\mu$</span> ha...
https://mathoverflow.net
570,327
[ "https://physics.stackexchange.com/questions/570327", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/242555/" ]
Can we say the electric charge density of an electron is distributed uniformly over its spherical volume?
The source of gravity is energy-momentum, not just mass. Light has energy-momentum so it is a source of gravity.
Yes. You can have, for example, a Friedmann universe filled with nothing but electromagnetic radiation. The light’s gravity, due to its energy-momentum tensor, is the <em>only</em> gravity determining the dynamics of that cosmology. Our own universe, which we believe is homogeneous and isotropic on the largest scales a...
https://physics.stackexchange.com
401,464
[ "https://softwareengineering.stackexchange.com/questions/401464", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/351577/" ]
We're having a debate here on our server development team, and I'm struggling. I've always used master as source of record for production, with the master branch (or some designated release branch) acting as a long-running release branch. I'm in favor of using GitFlow for our process, releasing from master and tagging ...
Using the master branch as the canonical source for code in production makes it easier for developers to clone the repository and immediately have production code in front of them. It's as simple as: <pre><code>git clone your-repo </code></pre> If a different branch is used for production code, then the master branch...
Well, how else do you know what’s in prod? Download the live copy and recursive diff? Guess? Etc.? In other words, it provides a useful comparison point and a useful assumption about whats live (though it is helpful to regularly check this assumption, which git fetch + some plumbing can easily show).
https://softwareengineering.stackexchange.com
504,663
[ "https://physics.stackexchange.com/questions/504663", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/243274/" ]
In a given series configuration of n resistances of equal resistance r, I derived the relation bewteen total power and individual power consumption as follows: P(Total) = I^2 * R R= nr (equivalent resistance) P(total) = n*I^2*r = n*p(individual) {p individual = I^2*r} If the config...
They only look like they're consuming the same power because you're implicitly <em>using a different power source</em> in each case. For example, let's first look at a <strong>constant-voltage</strong> source, which maintains a constant voltage drop <span class="math-container">$V$</span> across whatever load it's con...
Yes, I can point it out. You went wrong in line seven of your question. In both the parallel and serial case the total power consumed is indeed n times the power consumed by an individual resistor. However, in the parallel case, each resistor takes the full voltage V. The power consumed by each resistor is VV/r so t...
https://physics.stackexchange.com
460,329
[ "https://physics.stackexchange.com/questions/460329", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/220675/" ]
I am trying to code the time dependence of a gaussian wavepacket using the Fourier transform techniques. I began with constructing a wavepacket (real parts only at the moment) at <span class="math-container">$t=0$</span> by multiplying the expression for a plane wave <span class="math-container">$\cos(kx)$</span> by a ...
Nothing prevents superposition at macroscopic scales. Schrodinger's cat states exist according to the Schrodinger equation. If they didn't, it would violate unitarity. What we don't get is interference at macroscopic scales. One reason for this is that macroscopic objects simply have very short wavelengths. So, e.g., ...
As you are already aware, classical mechanics (which includes the principle of superposition) breaks down at a quantum level, yet holds at more macroscopic levels, due to the effect of <em>h</em> meaning that quantum effects become greatly reduced as momentum of an object increases. This trend only keeps going, even a...
https://physics.stackexchange.com
124,427
[ "https://dba.stackexchange.com/questions/124427", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/83203/" ]
I have the following schema in my MySQL database, where I have read access: <pre><code>table1 (customersid*:int, zip1:int) table2 (customersfid*:int, zip2:int) </code></pre> Where <code>customersid</code> references some customers and <code>zip1</code> and <code>zip2</code> corresponds to zip code area of that part...
You can merge them in a SELECT, no problem. Something like: <pre><code>SELECT CASE WHEN t1.zip1 in (NULL, 0) then t2.zip2 ELSE t1.zip1 END merged_zip FROM table1 t1 INNER JOIN table2 t2 on t1.customersid = t2.customersfid </code></pre>
You should do an upgrade of all rows in <code>table1</code> where the <code>zip1</code> is 0 (zero) or NULL: <pre><code>update table1 t1 set zip1=(select zip2 from table2 t2 where t2.customersfid=t1.customersid) where zip1 is NULL or zip1=0; </code></pre>
https://dba.stackexchange.com
534,248
[ "https://stats.stackexchange.com/questions/534248", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/327829/" ]
I have 3 sets of points in <span class="math-container">$R^n$</span>: <span class="math-container">$X$</span>, <span class="math-container">$A$</span> and <span class="math-container">$B$</span>, how can I (preferably quickly) check which of the two sets <span class="math-container">$A$</span> and <span class="math-con...
See en.wikipedia.org/wiki/Statistical_distance. The most canonical distance measure seems to be the energy distance <span class="math-container">$\int_{Domain} (p_X(x)-p_A(x))^2dx/{VolDomain}$</span>
Perform a two-sample Kolmogorov-Smirnov test between <span class="math-container">$X$</span> and <span class="math-container">$A$</span>. Perform another two-sample KS test between <span class="math-container">$X$</span> and <span class="math-container">$B$</span>. If the first test has the highest p-value, choose <spa...
https://stats.stackexchange.com
381,110
[ "https://physics.stackexchange.com/questions/381110", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/182169/" ]
According to law of conservation of mechanical energy, $\Delta K + \Delta V = 0$ or $\Delta K = -\Delta V$ but when in spring block system $\Delta K = 0$, and at both initial and final positions $K = 0$, $\Delta V{\rm(potential\ energy)}\ne 0$. This implies $\Delta K \ne \Delta V$, which is wrong. Please tell what I...
In order for state <em>a</em> to shift to state <em>b</em>, without an external force, you must have velocity at state <em>a</em>. In this case, the velocity at state <em>b</em> is lower than at state <em>a</em> but the potential energy is higher. If at state <em>a</em> the velocity is zero and an external force shif...
The law of conservation of mechanical energy states that the total mechanical energy at any point in the motion is <strong>constant</strong>. It never says it's 0. $\text{K.E. + P.E. = constant}$. If total energy was 0, motion would have never taken place.
https://physics.stackexchange.com
470,721
[ "https://electronics.stackexchange.com/questions/470721", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/57556/" ]
At the time when the USB standard was being developed, there were a number of widely-available connectors that they could have used instead of making a new custom connector. Why did they not use mini-DIN or DE-9 or some other common connector of the time, instead of inventing entirely new physical connectors, which wou...
Most likely many reasons, at least the following. It was a requirement for the connector to support hot-plugging. The connectors you mentioned do not support hot-plugging. Using an existing connector also means it is possible for someone to plug in two incompatible devices together just because they use the same conn...
<h2>Compatibility with existing connectors is an anti-feature</h2> Let's imagine they used the then-common <s>DB-9</s> DE-9 for USB. What would happen? <em>Lots of mice used a DE-9</em>, and it's used in a lot of other serial ports. People would be plugging a serial mouse into the USB port, and become frustrated wh...
https://electronics.stackexchange.com
173,849
[ "https://electronics.stackexchange.com/questions/173849", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/77991/" ]
Recently I was doing a little research about SFP/SFP+ modules by reading the SFF-8472 spec. In there, I learned that SFP modules use TECs (Thermoelectric Coolers) to "pump" heat away from the load. My question; how come this technology is not deployed on common Desktop and Laptop (x86) machines that we use every day?...
A TEC is known in physics jargon as a "Peltier element" because it uses the Peltier effect. The peltier effect is semiconductor magic that cools one side of an array of p/n junctions while <em>simultaneously</em> heating the other side of the it. You should think of it more as a heat pump (thermodynamically) and not di...
In no particular order: <ol> <li>A Peltier element would cost money.</li> <li>A Peltier element would add extra weight. The kind of Peltier element used would probably weigh 10-20 grams. Given that high-end ultra-light laptops are marketed as being <em>"20 grams lighter than the Macbook Air!"</em>, the extra weight wo...
https://electronics.stackexchange.com
274,096
[ "https://softwareengineering.stackexchange.com/questions/274096", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/109776/" ]
I have a value checking function, something much like a credit card number checking function, that is passed in a string, and needs to check that the value is of the right format. If it's the right format it needs to return true. If it's not the right format it needs to return false, and also tell us what's wrong w...
Use a more complex return object that encapsulates both concerns. Example: <pre><code>public interface IValidationResult { boolean isSuccess(); String getMessage(); } </code></pre> This has several advantages: <ol> <li>Returns multiple related pieces of data in one object.</li> <li>Room for expansion if you need...
None of the above, use a ValueChecker class First an interface to give you flexibility: <pre><code>public interface IValueChecker { public boolean checkValue(String value); public String getLastMessage(); } </code></pre> <hr> Then implement as many valuecheckers as you need: <pre><code>public class MyVeryE...
https://softwareengineering.stackexchange.com
279,538
[ "https://stats.stackexchange.com/questions/279538", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/88687/" ]
In logistic regression with binary outcomes $y_{i},...y_{n}$, the hat matrix is $$H = \hat{V}^{1/2}X(X^{T}\hat{V}X)^{-1}X^{T}\hat{V}^{1/2}$$ where $\hat{V}$ is diagonal matrix with $n_{n}\hat{\pi}_{n}(1-\hat{\pi}_{n})$ and the diagonal elements of the hat matrix are $h_{ii} = n_{i}\hat{\pi}_{i}(1-\hat{\pi}_{n})x^{T}...
In regular multiple regression $\hat{V}=I\hat{\sigma}^2$ where $I$ is the identity matrix, since $(X^TVX)^{-1}=(X^TI\hat{\sigma}^2X)^{-1}=\hat{\sigma}^2(X^TIX)^{-1}=\hat{\sigma}^2(X^TX)^{-1}$. So the $\hat{V}$ matrix is there, it's just that you can't see it since it's essentially $\sigma^2$ times the identity matrix....
After almost a month, it struck me (and the comment from @John Madden helped as well). Logistic regression (the MLE estimates to be precise) is calculated by Newton-Raphson algorithm. And this algorithm can be actually rewritten as Iterative Reweighted Least Squares. In WLS, the weights are $w = 1/\sigma^2$. Which i...
https://stats.stackexchange.com
1,779,823
[ "https://math.stackexchange.com/questions/1779823", "https://math.stackexchange.com", "https://math.stackexchange.com/users/338539/" ]
I have the equation: $$3^n = \frac{1}{81}$$ And I need to find n. Can someone explain how I do this, with steps please (<em>GCSE level</em>)? TIA.
Use that $81 = 3^4$ Then $\frac{1}{3^4} = 3^n$ Then $n = -4$
After doing some googling I learnt that $$ b^y = x \therefore log_b(x) = y $$ So then $$ 3^n = \frac{1}{81} \therefore log_3(\frac{1}{81}) = n = -4 $$
https://math.stackexchange.com
213,246
[ "https://mathoverflow.net/questions/213246", "https://mathoverflow.net", "https://mathoverflow.net/users/49556/" ]
Does anyone have an idea how to prove the following identity? $$ \mathop{\mathrm{Tr}}\left(\prod_{j=0}^{n-1}\begin{pmatrix} x^{-2j} &amp; -x^{2j+1} \\ 1 &amp; 0 \end{pmatrix}\right)= \begin{cases} 2 &amp; \text{if } n=0\pmod{6}\\ 1 &amp; \text{if } n=1,5\pmod{6}\\ -1 &amp; \text{if } n=2,4\pmod{6}\\ 4 &amp; \text{i...
The following is a conjectured generalization of the claimed identity which may help in proving it. We prove this generalization (and hence also the identity from the question) in the case that $3$ does not divide $n$, and give a partial result in the remaining case. The idea of the generalization is to observe that $...
<strong>Lemma 1.</strong> Let $\eta$ denote primitive $m$-th root of 1. Consider all $m$-tuples $0\leq a_1&lt;a_2&lt;\dots&lt; a_m\leq 2m$ such that either $a_1&gt;0$ or $a_{m}&lt;2m$. Take the sum of $\eta^{a_1+\dots+a_m}$ over all such $m$-tuples. It equals $3(-1)^{m+1}$. <strong>Proof.</strong> Consider the polynom...
https://mathoverflow.net
15,391
[ "https://softwareengineering.stackexchange.com/questions/15391", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1524/" ]
It is now more and more popular to have video tutorials of the software or technology instead of writing long articles. As for me, it makes perfect sense, especially for such areas like "Getting Started" or "What's New". What do you think is the most appropriate duration for such a videos? If you record the video tuto...
I would tend to agree with the 5-10 minute rule. When I see a new technology, most of the time I don't want to get into the nitty-gritty details; I just want to get a general overview of it so that I can decide if it's something I want to learn more about. If the video does a B-tree traversal of everything one needs to...
<sub>This is perhaps slightly off-topic, but hopefully still useful feedback for anyone considering doing video tutorials</sub> If the video is basically slides with speaking, <em>please</em> provide a non-video version with images and a transcript as well. I can read far faster than people can talk, and it can be in...
https://softwareengineering.stackexchange.com
656,057
[ "https://physics.stackexchange.com/questions/656057", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/285829/" ]
<span class="math-container">$$a_T=\alpha r$$</span> is the tangential acceleration and where <span class="math-container">$\alpha$</span> is the angular acceleration and <span class="math-container">$r$</span> is the radius of the circular path. I know how we get to this mathematically, If <span class="math-container...
Angular speed <span class="math-container">$\omega$</span> is how fast your wheels are spinning. How many degrees (or radians) per second they are turning with. Angular acceleration <span class="math-container">$\alpha$</span> is how fast this spinning speeds up or down. How many more or fewer degrees per second the wh...
Angular acceleration <span class="math-container">$\alpha$</span> is the rate of change of angular velocity <span class="math-container">$\omega$</span> with time. So <span class="math-container">$\omega$</span> must increase or decrease somehow if there is an angular acceleration, since <span class="math-container">$...
https://physics.stackexchange.com
10,787
[ "https://cs.stackexchange.com/questions/10787", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/6747/" ]
I have an assignment to construct a game of Nim (a game in which two players must divide a pile of tokens into two unequal sizes; 6 can be divided into 2 &amp; 4 but not 3 &amp; 3). I was provided a game tree (the same one I find on Google), but I am confused. Shouldn't the first turn of the second player have access t...
No, the game tree is not correct for the description you gave. If you look a few levels downward, there's the position F(2), which by your description should be a dead end: you can't make a move, since splitting a pile of 2 into non-equal parts is not possible. Yet, the tree gives two options. Your observation that y...
There are many kinds of NIM. The one in the picture is a rather classic example. Take either one or two tokens, the one who takes the last token looses. Does not sound like the version you suggest. Your game does not state what happens with the divided heaps?
https://cs.stackexchange.com
1,336,495
[ "https://math.stackexchange.com/questions/1336495", "https://math.stackexchange.com", "https://math.stackexchange.com/users/209528/" ]
Classically, Hardy spaces $H^p$on the disk are introduced as set of functions analytic on $\mathbb{D} = \{z \in \mathbb{C}: |z|&lt;1\}$, which has bounded $H^p$ norm: $$ \|f\|_{H^p} = \sup_{0\leq r &lt; 1} \left( \frac{1}{2\pi} \int_{0}^{2\pi} |f(r \, e^{\mathrm{i} \theta})|^p \, d \theta \right)^{1/p}, \text { for } ...
Consider the function $f(z) = \exp{(1+z)/(1-z)}.$ This function has modulus $1$ on the boundary except at $1.$ So therefore $f\in H^\infty?$ Hardly. Look at $f(r)$ as $r\to 1^-.$
Any counterexample for $p=\infty$ is automatically a counterexample for all $p&gt;0$. You have $f$ which is not $H^\infty$, but which has boundary values in $L^\infty$. Hence the boundary values are in $L^p$. And hence $f$ is not in $H^p$, because of the result that says if $f$ is in $H^p$ and the boundary values are i...
https://math.stackexchange.com
45,086
[ "https://mechanics.stackexchange.com/questions/45086", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/29126/" ]
For various reasons, I keep several very large four cell lithium-polymer batteries in my vehicle. Each of these batteries is rated for over 100 amps of constant current, with 10 second burst ratings of twice that. Wired in parallel, they could easily provide enough power to start my vehicle. However, a fully-charged...
I'd say that 16.8 VDC is a bit too high to call "safe." Now to answer the primary question, obviously it depends on the exact vehicle. Different computers and different wiring designs will result in different characteristics. As an example, if your battery is very dead, then putting a 15 VDC trickle on it will read so...
i think the absolute max voltage that is farly safe is 14,4 volt,whith todays modern cars and all the computers and sensitiv elecrtonic always use jumper cables that have inbuilt protection. the reason your old mechanic was able to use 24volt to start a 12 volt car was in the past cars did not have sensitive electroni...
https://mechanics.stackexchange.com
179,403
[ "https://electronics.stackexchange.com/questions/179403", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/58013/" ]
I am in the beginning stages of development for a project where I need to continuously track the position of an object for long amounts of time. The object will not move very much, but when it does I want to track it to see when it moves 10 meters from its initial position. I looked into IMU tracking as I have some p...
Since your object seems not to be moving most of the time, you may still use an IMU using the following assumption : <em>If the object is not accelerating and approximately not moving during a long time, then it's probably not moving at all.</em> Then, use an IMU and check for this condition ; as soon as this conditi...
Triangulation MAYBE could be done by placing three low power emitters (check the allowable frequencies for indoor transmission) on the perimeter of the area, each one of them emitting at a different frequency. Place three receivers (or one tunable receiver) on the moving device. On the mobile device rectify and smooth...
https://electronics.stackexchange.com
179,966
[ "https://softwareengineering.stackexchange.com/questions/179966", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/46560/" ]
Recently I have been assigned to work on a major requirement that falls between a change request and an improvement. The previous implementation was done (badly) by a senior developer that left the company and did so without leaving a trace of documentation. <br> <br> Here were my initial steps to approach this problem...
Loads to be said about all that. Due to this being Programmers.SE I will ignore the aspect about falling out of favor with some folks and your "baffledness". If you want input on those, I suggest you pay workplace.SE a visit instead. Apart from that, let's look at the technical issues here: <ul> <li>You are a develop...
Trying to do TDD out-of-blue on highly complex requirement is never good idea. TDD is meant as long-term approach and commitment. TDD won't make it easy to implement change requests and new features overnight. Also, like Carl said, having answers as "if possible" and "maybe" only shows lack of understanding and commit...
https://softwareengineering.stackexchange.com
481,097
[ "https://electronics.stackexchange.com/questions/481097", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/242588/" ]
I recently came about one such transformer while fixing a boiler PCB and I suspect it's damaged. How do I test it?
Checking SMPS transformers is always a bit hard: You probably have no information to information that would tell you what the intended winding ratios are; and without, shorts between traces on either side are hard to detect. Even worse, if it's e.g. a flyback configuration, it'd be non-trivial to reliably test isolat...
About the best you can do is to ohm out the windings for continuity, or maybe check for a short between a winding and the core, for instance. Otherwise, as Marcus said, you're basicaally out of luck.
https://electronics.stackexchange.com
256,661
[ "https://physics.stackexchange.com/questions/256661", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82928/" ]
The commutator $[A^2,B]$ can be written as $A[A,B]+[A,B]A$. So if $[A,B]=0$, $[A^2,B]$ is also zero. But is the converse also true? If $[A^2,B]$ is given to be zero, then is [A,B]=0? Let $C=[A,B]$. If $[A^2,B]=0$, then $A[A,B]+[A,B]A=0$, so $AC+CA=0$. But then I don't know how to show that $C$ is/is not equal to zero....
It's <em>not</em> true. For example take $$ A = \begin{pmatrix} 0 &amp; 1\\ 0 &amp; 0 \end{pmatrix} \qquad\qquad\qquad B = \begin{pmatrix} 0 &amp; 0\\ 1 &amp; 0 \end{pmatrix} $$ you have $A^2=0$ so that $[A^2,B]=0$, but $$ [A,B] = \begin{pmatrix} 1 &amp; 0\\ 0 &amp; -1 \end{pmatrix}. $$ You must add some condition...
No, it's not true and a simple counter example suffices. Let $A = \vec L^2$, the square of the angular momentum operator, and $B = L_z$, the z component of the angular momentum operator. $[\vec L ^ 2, L_z] = 0$, but $[\vec L , L_z] != 0$ because the components of the angular momentum operator do not commute with each...
https://physics.stackexchange.com
215,422
[ "https://dba.stackexchange.com/questions/215422", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/155154/" ]
I am currently working on the following table in SQL Server <pre><code>Table: order_status_logs log_id INT NOT NULL IDENTITY(1,1) order_id INT NOT NULL status_id INT NOT NULL log_date DATE NOT NULL expected_by DATE NULL </code></pre> In this table for the <code>status_id</code> column...
Yes, you can create a table check constraint without going to triggers or stored procedures. This is valid for Sql Server 2008 or higher: <pre><code>ALTER TABLE dbo.order_status_logs ADD CONSTRAINT CHK_EXPECTED_BY CHECK ((status_id &lt;&gt; 4 AND expected_by IS NOT NULL) OR status_id = 4); GO </code><...
I would probably wrap it in a stored procedure - you can't use a constraint to dynamically change the <code>NULL</code>/<code>NOT NULL</code> state of a column. Something like: <pre><code>CREATE PROCEDURE usp_OrderLogInsert @OrderID INT ,@StatusID INT ,@LogDate DATE ,@ExpectedBy DATE AS B...
https://dba.stackexchange.com
58,883
[ "https://mathoverflow.net/questions/58883", "https://mathoverflow.net", "https://mathoverflow.net/users/12940/" ]
Let <span class="math-container">$K=\lim(K_{i})$</span> be an ultrafield (over a non-principal ultrafilter), and let <span class="math-container">$K\hookrightarrow K'$</span> be a field extension of <span class="math-container">$K$</span>. When the field <span class="math-container">$K'$</span> is finite over <span c...
[EDIT on March 26, 2019: There are issues with this argument, found by @YCor who also gives a correct and more general answer.] Let me show that if <span class="math-container">$k$</span> is algebraically closed, and <span class="math-container">$X=(x^{(\alpha)})$</span> any nonempty family of indeterminates, then <sp...
Every finite field is an ultrafield (an ultrapower of itself). But a countable infinite field is not an ultrafield (an ultraproduct cannot be countable). Now take the field of fractions $\mathbb{F}_2(x_1,x_2,...)$ . It is a transcendental extension of a (finite) ultrafield which is not an ultrafield.
https://mathoverflow.net
135,896
[ "https://security.stackexchange.com/questions/135896", "https://security.stackexchange.com", "https://security.stackexchange.com/users/90489/" ]
Over the last couple of years, there were a few instances when some third party managed to create a SSL certificate for a domain that doesn't belong to them, for example google.com, or most recently github.com. In my limited understanding, accessing a signed web site means my browser will compare the domain I'm acces...
It is not needed to get a forged certificate for g00gle.com. The person behind the phishing site just needs to obtain a regular certificate for that domain. Of course requesting such a certificate may fail as a computer or a human may be triggered by the likeliness to google.com. But otherwise any owner of a domain can...
@Vic In the attack by Iranian Hacker on DigiNotar, the attacker obtained the wildcard certificate for google.com and this certificate had domain name *.google.com So, when a user typed google.com in the browser, using the compromised network, the attacker redirected the traffic to his own website such as phishing.goog...
https://security.stackexchange.com
507,744
[ "https://math.stackexchange.com/questions/507744", "https://math.stackexchange.com", "https://math.stackexchange.com/users/95693/" ]
How to find the minimum of $n$ when we know $a$, to satisfy: $a^n&lt;n^a$ $a^m&gt;m^a$ for each $m&gt;n$ $n$ and $m$ are natural numbers.
Some suggestions. Too long for a comment: As I said, there are many ways to measure the "distance" between two matrices. If the matrices are $\mathbf{A} = (a_{ij})$ and $\mathbf{B} = (b_{ij})$, then some examples are: $$ d_1(\mathbf{A}, \mathbf{B}) = \sum_{i=1}^n \sum_{j=1}^n |a_{ij} - b_{ij}| $$ $$ d_2(\mathbf{A}, \m...
If we have two matrices $A,B$. Distance between $A$ and $B$ can be calculated using Singular values or $2$ norms. You may use Distance $= \vert(\text{fnorm}(A)-\text{fnorm}(B))\vert$ where fnorm = sq root of sum of squares of all singular values.
https://math.stackexchange.com
171,867
[ "https://security.stackexchange.com/questions/171867", "https://security.stackexchange.com", "https://security.stackexchange.com/users/127671/" ]
I am writing a Java web application and I am trying to prevent file upload vulnerabilities by storing uploaded profile pictures as blob in the database. Is it safe to store uploaded images a blob in a database in order to prevent: <ol> <li>Executing the files with possible LFI vulnerabilities?</li> <li>Accessing other...
I can envisage a couple of possible vulnerabilities that you should keep in mind: <ul> <li>Uploaded Data overrun - if there is not a way to limit the size of uploads your server could be damaged by sending it a very large file.</li> <li>Out of bounds access, since you are allowing the image to be served from the datab...
<blockquote> Can a file be executed when trying to serve the image when retrieving the file from the database? </blockquote> The safest way is not to open the uploaded images in the file system of the server, one way to do -as a bad practice- is to create temporary file to serve the image from. Instead keep image...
https://security.stackexchange.com