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
330,970
[ "https://softwareengineering.stackexchange.com/questions/330970", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/35812/" ]
I'm working on a piece of software which generates configuration data for certain hardware and currently needs to be adapted each time the hardware is released in a new version by an external company (this happens around twice a year). My current task is to introduce a plugin interface so the whole application doesn't ...
After sleeping over the question for a night and thinking about the various comments so far, I found the following solution to fit best for our needs: Create a <code>HardwareVersion</code> C-style <code>POD</code> (*) struct like this: <pre><code>struct IMPORT_EXPORT HardwareVersion { public: /// The first part o...
I would say that rather than use an actual enumeration, it would be advisable to have each plugin use a set of offsets from some base value. The base value for each plugin can be supplied when the plugin is loaded. This makes it fairly easy to maintain a unique set of values across the entire system, while still allow...
https://softwareengineering.stackexchange.com
297,347
[ "https://softwareengineering.stackexchange.com/questions/297347", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/164475/" ]
When it sees the parentheses, does it have the machine do the operations in the parentheses first, or does it distribute out the parentheses? Like, if I have the following line of code: <pre><code>int i = 2 * (a + b) </code></pre> does it compile like this code: <pre><code>int c = a + b int i = 2 * c </code></pre>
It works "as-if" the addition is done first, followed by the multiplication. Under the as-if rule, any number of machine instructions that produce the correct result can be used, and in fact it's almost certain that a multiplication instruction will not be used by any optimizing compiler.
One likely sequence of machine instructions for a regular, orthogonal, 3-address RISC CPU would go something like this: <pre><code>LOAD_MEMORY &amp;a -&gt; register01 LOAD_MEMORY &amp;b -&gt; register02 INT_ADD register01, register02 -&gt; register01 LOAD_CONSTANT 1 -&gt; register02 BIT_SHIFT register01, register02 -&...
https://softwareengineering.stackexchange.com
371
[ "https://physics.stackexchange.com/questions/371", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/139/" ]
Recently I was surprised to discover that no exact solution for the position of a planet as a function of time exists. I am referring to the two-body problem in a gravitational field where Newtons law of gravity holds. Well known are proofs that the planet will move in an ellipse, Keplers laws can be derived fairly ea...
This is not that there is no exact solution, only the exact solutions for $x(t)$ and $y(t)$ use elliptic functions. The problem whether elliptic functions (which are defined by inverse of some integrals) are "good" functions is a bit philosophical one; one can on one hand state that sine is not a real function because ...
I think i have recently learned a solution of that.<br> I hope <em>Kepler equation</em> can be helpful; that is:<br><br> $M=\frac{2\pi t}{p}=E-e\sin E$ <br><br> where $E$ is defined by: <br><br> $\tan \frac{E}{2}=\sqrt{\frac{1-e}{1+e}}\tan \frac{\theta}{2}$ <br> <br> and $e$ &amp; $\theta$ are eccentricity of the orbit...
https://physics.stackexchange.com
430,363
[ "https://physics.stackexchange.com/questions/430363", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/207396/" ]
I am currently trying to learn some basics of thermodynamics. I encountered the following equation <span class="math-container">$$ \frac{p_2}{p_1}=\left(\frac{V_1}{V_2}\right)^\gamma $$</span> that allows computing the effect of an isentropic compression or expansion of an ideal gas from volume <span class="math-contai...
The entropy change for the constant volume case is <span class="math-container">$$nC_v\ln{(T_f/T_i)}=(1)(30)\ln{(320/300)}=1.936\ J/K$$</span> The entropy change for the constant pressure case is <span class="math-container">$$nC_p\ln{(T_f/T_i)}=(1)(38.314)\ln{(315.66/300)}=1.950\ J/K$$</span>
Entropy change doesnot only depend on the heat added.It also depends on the temperature of the system at which heat is added(Temperature might be continuously changing as heat is being added).The work done during adiabatic expansion is not equal to the work done during isobaric expansion(even if the change in volume du...
https://physics.stackexchange.com
145,895
[ "https://chemistry.stackexchange.com/questions/145895", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/102053/" ]
Find all hydrocarbons(alkanes, alkynes, alkenes), which answers given conditions: the sum of volumes of combustion air products equals to the initial sum of volumes of airs. ( volumes are measured in the same conditions 101.3 kPa pressure and 150 deg C) So this is my solution: let's write ideal air equation --&gt; we ...
If we consider a possibly branched, but not cyclical hydrocarbon ( unless we count each cycle as an extra double bond ): <span class="math-container">$$\ce{C_nH_{2n+2-2d-4t}},$$</span> where <ul> <li>d is number of double bonds</li> <li>t is number of triple bonds</li> </ul> then the combustion reaction is <span class...
We can more simply render the hydrocarbon as <span class="math-container">$\ce{C_xH_y}$</span>. Render the combustion reaction <span class="math-container">$\ce{C_xH_y + O2 -&gt; CO2 + H2O}$</span> and balance the equation: <span class="math-container">$\ce{C_xH_y + (x +\frac{y}{4}) O2 -&gt; x CO2 + \frac{y}{2} H2O}$<...
https://chemistry.stackexchange.com
4,939
[ "https://mathoverflow.net/questions/4939", "https://mathoverflow.net", "https://mathoverflow.net/users/382/" ]
Apologies for the very simple question, but I can't seem to find a reference one way or the other, and it's been bugging me for a while now. Is there a compact (Hausdorff, or even T1) (topological) group which is infinite, but has countable cardinality? The "obvious" choices don't work; for instance, $\mathbb{Q}/\math...
No, there is no countably infinite compact Hausdorff topological group. Indeed such a group $G$ would have a left-invariant Haar measure $m$ with $m(G)=1$ and all points would have the same measure (since the group acts transitively on itself). But then, by countable additivity of the measure $m$, the group itself wou...
A Baire category argument shows that any countable, locally compact Hausdorff group must be discrete. Of course, to moreover be compact it would have to be finite. In more detail (apologies if this is known/tedious): in any locally compact Hausdorff topological space, the intersection of a countable collection of open...
https://mathoverflow.net
618,828
[ "https://physics.stackexchange.com/questions/618828", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/277576/" ]
Today I asked a question on this site regarding inertia, and while reading one of the answers, a question popped up <blockquote> Why does a body have inertia? </blockquote> I looked up this site and several others, but could not find any resources.
<h2>Philosophical aspect</h2> Physics typically cannot answer &quot;why&quot;-questions very well. Physics observes phenomena in the world, creates descriptions of the behaviour observed there, and postulates rules (physics laws) stating that under specific circumstances this very same behaviour will happen again. So, ...
If you google it you can find several explanations for this, but I believe using the classical physics, we can clarify it intuitively and simply. According to the Newton's first law, bodies tend to keep their velocities unchanged. Inertia typically refers to this phenomenon. You can check it by some experimental tests....
https://physics.stackexchange.com
538,083
[ "https://physics.stackexchange.com/questions/538083", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/256173/" ]
Gravitational force is a bend in the space-time fabric.....so I would like to know that is every other <strong>fundamental force</strong> is a bend or a wave in some kind of field/s?
Yes, indeed, you simply need to calculate the matrix elements of the Hamiltonian in the new basis: <span class="math-container">\begin{array} \hat{H}_{11}' = \langle \phi_1'|\hat{H}|\phi_1'\rangle = \frac{1}{2}(\langle\phi_1| + \langle\phi_2|)\hat{H}(|\phi_1\rangle + |\phi_2\rangle) = \\ \frac{1}{2}(\langle \phi_1|\ha...
The easy way in which you will always get there is just by diagonalizing the system first. When you "solve" a Hamiltonian you always search for the eigenvectors (=eigenstates) and eigenvalues. Let's try and do this for this Hamiltonian now first. We find the eigenvalues through the following characteristic equation: <s...
https://physics.stackexchange.com
34,669
[ "https://dba.stackexchange.com/questions/34669", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/19133/" ]
Given a non-normalized data table, is there a good a strategy to attempt to normalize based on repeated data? Assume we have no information about the significance of the columns. In a small example <pre><code>Col1 Col2 Col3 ======================================== Europe France Pari...
I've had to reverse engineer several existing complex data sets. The most important thing to establish are the keys and dependencies in the data. The problem is frankly NP hard, so some intuition and inspection will go a long way to getting you to a sensible answer, so don't count on a simple "turn the crank" solutio...
Normalization is based on semantics; it's based on what the data <em>means</em>. When you don't know what the data means, you're at a significant disadvantage. If you have a big enough data set, you can get close by doing some simple queries. (The law of big numbers is on your side.) Any set of columns that's a candid...
https://dba.stackexchange.com
509,441
[ "https://physics.stackexchange.com/questions/509441", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/209383/" ]
Quote: <blockquote> "... a map <span class="math-container">$h$</span> of an open set <span class="math-container">$\Theta$</span> of a Bnach space <span class="math-container">$B_1$</span> into a Banach space <span class="math-container">$B_2$</span> is Lipschitz in <span class="math-container">$\Theta$</span> if ...
This is why cosmic censorship is considered to be so important -- you are saved from this conclusion if all of the infinite curvature points are hidden behind horizons, and therefore, the exterior of the black holes can still be globally hyperbolic.
The question and the example are not directly related. The equations in GR are PDE and it is not just a simple fixed point argument, where you use the Lipschitz property. Also the function <span class="math-container">$f(t,x)$</span> in your example is part of the equation, not related to a particular solution nor init...
https://physics.stackexchange.com
544,875
[ "https://physics.stackexchange.com/questions/544875", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/199289/" ]
In university physics textbook he says : <blockquote> The internal energy of an ideal gas depends only on its temperature, not on its pressure or volume. </blockquote> I know that the only contribution to the internal energy comes from the translational kinetic energy (for monatomic ideal gas) according to <span c...
For an ideal gas, you have that <span class="math-container">$U = \frac{3}{2}nRT$</span> and also <span class="math-container">$PV = nRT$</span>, which means that you can write <span class="math-container">$$U = \frac{3PV}{2}$$</span> if you'd like. It doesn't make sense to say that <span class="math-container">$...
For an arbitrary solid, liquid, or gas, it follows from the 1st and 2nd laws of thermodynamics thatthe internal energy per mole is related to the temperature T and specific molar volume V by <span class="math-container">$$dU=C_vdT-\left[P-T\left(\frac{\partial P}{\partial T}\right)_V\right]dV$$</span>For an ideal gas, ...
https://physics.stackexchange.com
107,528
[ "https://softwareengineering.stackexchange.com/questions/107528", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/14144/" ]
This is more of a design question and i was hoping to get pros and opinions on what makes sense. BACKGROUND Imagine something that holds one or more event listeners. Every now and then the thing fires events to its listeners. PROBLEM The problem is of course that listeners that follow after a listener that throws n...
A couple of points to consider: Listeners should be well-behaved in as much that they protect their own code's execution from letting exceptions escape to the outside. The event firer (?), that is the one firing the event, has (should have) no interest in whatever the listeners do with it. Its only job is to ensure t...
Usually the event source (observable) is decoupled from observers. So the design is something as below : <pre><code>Observable -&gt; (fires)-&gt; Observer1,Observer2,Observer3...ObserverN </code></pre> However if you need to add extra logic add one more indirection using an ObserserProcessor class. <pre><code>Obse...
https://softwareengineering.stackexchange.com
126,441
[ "https://softwareengineering.stackexchange.com/questions/126441", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/43530/" ]
I am actually considering learning C++. I want to become a quantitative financial analyst, and going to pursue my CFQ soon. Java is not heavily used in this field, but C++ is for its complexity. For someone who already has knowledge in HTML, CSS, JavaScript (intermediate), and PHP (intermediate), how hard would the swi...
I disagree with all the other answers<sup>1</sup>, it's not going to be as <em>easy</em> as they tell you. There's quite a lot more to the shift, it's a: <ul> <li><strong>Domain shift</strong>: Web development to quantitative financial analysis. Extremely different mindsets, approaches, etc.</li> <li><strong>Philosoph...
I had one answer in mind when I read the title of this question, and then obliterated that answer once I read your actual “question.” If I were you, I wouldn’t even bother applying for these jobs if you don’t have <em>a lot</em> of experience in the things they’re looking for. I was a consultant for many high-speed tr...
https://softwareengineering.stackexchange.com
910,418
[ "https://math.stackexchange.com/questions/910418", "https://math.stackexchange.com", "https://math.stackexchange.com/users/54916/" ]
I read from my book something like this: <blockquote> Let $R \subseteq A^2$ be a binary relation. If $R$ is <em>reflexive</em>, then... </blockquote> Saying that some relation is <em>reflexive</em> without mentioning the set it is on confuses me. I think what author meant was that if $(a, b) \in R$, then $(a, a) \i...
A relation from $A$ to $B$ is a subset of $A \times B$ (the cartesian product of $A$ and $B$). Here it is given that $R \subseteq A^2 = A \times A$, so the set is $A$. $R$ is reflexive, implies that for some subset $A'$ of $A$, we have $(a, a) \in R, \forall a \in A'$. Then $R$ is actually not a reflexive on $A$ (unle...
Reflexivity of a relation makes no sense without reference to the underlying set. Say you have a set of ordered pairs $$R = \{ (1,1), (2,2), (3,3) \}$$ Then $R$ is reflexive as a relation on the set $\{1,2,3\}$, but is not reflexive as a relation on $\{1,2,3,4\}$, for instance. It makes no sense to say "$R$ is reflexi...
https://math.stackexchange.com
66,073
[ "https://datascience.stackexchange.com/questions/66073", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/87996/" ]
I am ranking a filtered item list as per user's metadata and historical behaviour. Now how to calculate metrices like precision at K? One approach could be - Divide historical data in training and test dataset(e.g. 90% and 10%). Now pick all the items for a user from <strong>test</strong> data and randomize the order...
I think here you must maintain the actual tf-idf and create corpus over it.. Assuming you already have lables for documents available. You can rum classification over it. Best classification I am anticipating for this problem would be naive bayes..
A direct way to find the words which are the most representative of a class is to calculate the probability of the class given a word: <span class="math-container">$$p(c|w)=\frac{\#\{\ d\ |\ label(d)=c\ \land w\in d\}}{\#\{\ d\ |\ w\in d\ \}}$$</span> Ranking the words according to their probability <span class="mat...
https://datascience.stackexchange.com
3,162,145
[ "https://math.stackexchange.com/questions/3162145", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415489/" ]
Given that the product <span class="math-container">$f(x)\cdot g(x)$</span> is differentiable at <span class="math-container">$x_0$</span>, I need to work out what conditions over <span class="math-container">$f(x)$</span> guarantee that <span class="math-container">$g(x)$</span> is also differentiable at <span class="...
Maybe I'm not seeing the trees for the forest, but to me a 'natural' condition would be that <span class="math-container">$f$</span> is differentiable at <span class="math-container">$x_0$</span> and <span class="math-container">$f(x_0) \neq 0$</span>. That would make <span class="math-container">$g$</span> the quotien...
You must use that <span class="math-container">$$\lim_{h\to 0}\frac{g(x_0+h)-g(x_0)}{h}=g'(x_0)$$</span> and <span class="math-container">$$\lim_{h\to 0}\frac{f(x_0+h)-f(x_0)}{h}=f'(x_0)$$</span> And <span class="math-container">$$\lim_{h\to 0}f(x_0+h)=f(x_0)$$</span> and <span class="math-container">$$\lim_{h\to 0}g...
https://math.stackexchange.com
259,352
[ "https://math.stackexchange.com/questions/259352", "https://math.stackexchange.com", "https://math.stackexchange.com/users/30379/" ]
Apart from simplifying matrix powers, why do want to diagonalize a matrix? Do they have any appealing application which can be used to motivate to study diagonal matrices. Thanks for any answers.
An important motivation for the determination of eigenvectors and eigenvalues of a (square) matrix is that it helps understanding the geometry of the underlying linear transformation. As an example, consider for instance that the analysis of the eigenvalues of a $3\times3$ orthogonal matrix leads immediately to the cl...
Computing powers of the matrix is just part of it -- what is important that it is simple to <em>understand</em> what the matrix does when you view it from a diagonalizing basis. Each coordinate of the input vector simply gets multiplied by the corresponding diagonal element, and there are no cross-term between differen...
https://math.stackexchange.com
384,410
[ "https://stats.stackexchange.com/questions/384410", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/119261/" ]
<blockquote> Suppose <span class="math-container">$X_1$</span> and <span class="math-container">$X_2$</span> are independent <span class="math-container">$N(0,1)$</span> variables. Define <span class="math-container">$$Y_1=X_1\,\text{sign}(X_2)\quad,\quad Y_2=X_2\,\text{sign}(X_1)$$</span> I have to show that <span cla...
<blockquote> without explicitly finding the distribution of <span class="math-container">$(Y_1,Y_2)$</span> can I justify that the distribution is not jointly normal? </blockquote> One obvious way would be to see that <span class="math-container">$Y_1$</span> and <span class="math-container">$Y_2$</span> cannot be o...
To see what happens, let's explicitly find the distribution. You could see it as a transformation from the entire plane to the first and third quadrants. <ul> <li>Transform the first quadrant (<span class="math-container">$X_1&gt;0, X_2&gt;0$</span>) to itself <span class="math-container">$Y_1,Y_2 = X_1,X_2$</span>...
https://stats.stackexchange.com
508,876
[ "https://physics.stackexchange.com/questions/508876", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/214055/" ]
I don’t yet understand why 2 energy levels aren’t enough as they can still emit photons (even when B12 and B21 are equal). By the way, I’m talking about stimulated emission.
In a two-level system you can have stimulated emission, but you can't have gain. No gain, no laser amplification, no laser. Stimulated transitions work both ways with equal probability: up and down. As long as there is more population in the lower state there will be more "ups" than "downs", that is more absorption ...
Albert Einstein showed that rate of stimulated emissions is equal to that of stimulated absorptions. That is, a photon of energy <span class="math-container">$h \nu$</span> has equal probablity to cause either absorption or stimulated emission. Suppose there are only two levels;one ground state and one metastable state...
https://physics.stackexchange.com
169,876
[ "https://electronics.stackexchange.com/questions/169876", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/52466/" ]
I'm building my own digital meter in order to upload the data to a SQL database; up until now I know that there are several parameters being measured into a digital watt-meter: volts, current, apparent power, instantaneous power, actual power, power factor However, I still have to understand which one of these is th...
The analog meter is built around a motor. The magnetic fields that produce the torque to drive the motor are proportional to the voltage and current at any instant. So, in that sense, it is measuring instantaneous power. Because it spins and turns a counter, it also measures the total energy consumed. The digital m...
Analogue meters measure the average value of the instantaneous values of current and voltage multiplied together: - <ul> <li>power = Average(v x i)</li> <li>energy = integral(v x i)</li> </ul> <img src="https://i.stack.imgur.com/KJXuV.jpg" alt="enter image description here"> Power factor is irrelevant because there ...
https://electronics.stackexchange.com
118,769
[ "https://softwareengineering.stackexchange.com/questions/118769", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/2898/" ]
I'm simulating a double click programmatically and I want to have a slight pause between both clicks in order to better simulate a real user. I know the interval should be less than <code>GetDoubleClickTime</code> but am not sure what would be a good time to choose. Does anyone know of any data on how fast a typical ...
<code>Does anyone know of any data on how fast a typical person performs a double-click?</code> - doubleclick interval is an adjustable OS user setting. Our user might not have configured his machine typically. I don't know what's the issue with <code>GetDoubleClickTime() / 3</code>. Even if there was some research p...
Fire up an audio recording program in a quiet space and double click your mouse a few times. The time distance between the two peaks is how long it takes. If you're feeling really intense, you can calculate the statistical deviation among many clicks. Me? I'd go with your thought of <code>GetDoubleClickTime()/3</code>...
https://softwareengineering.stackexchange.com
580,085
[ "https://physics.stackexchange.com/questions/580085", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/161035/" ]
I can't find this, but i've seen that GR is the only possible theory of gravity if you assume causality and principle of equivalence?
The first formula in OP's post is Noether's theorem for vertical variations only, i.e. when the field values are varied at a fixed point. Moreover, it is only for strict symmetries, when the Lagrangian is invariant under the symmetry. There is also a formula for when the independent variables (the <span class="math-con...
First one is only true if Spacetime coordinate is not being transformed but only fields are. This is discussed in great depth at around page number 595 of Goldstein's classical Mechanics.
https://physics.stackexchange.com
155,143
[ "https://softwareengineering.stackexchange.com/questions/155143", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13937/" ]
I have a recurring question when writing unit tests for code that involves constant string values. Let's take an example of a method/function that does some processing and returns a string <em>containing</em> a pre-defined constant. In python, that would be something like: <pre class="lang-py prettyprint-override"><c...
There's a little warning about the DRY principle that many people aren't aware of: Don't get so obsessed about avoiding repetition that you remove 'duplicates' of things that appear to be the same but are actually conceptually very different. As an extreme example you wouldn't try to remove the repetition of the dupli...
First off in your example, you are actually testing <strong>two</strong> things in a single unit test, a unit test should only test <strong>one</strong> thing at a time. What you should be testing: <ol> <li>the constant value is in the format or a proper URL with a single <code>%</code> wildcard position.</li> <li>th...
https://softwareengineering.stackexchange.com
293,388
[ "https://mathoverflow.net/questions/293388", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
Suppose $B$ is an abelian group such that for every integer $n\ge 1$, the $n$-torsion subgroup $B[n]$ is finite. Let $B_{\rm tor} = \varinjlim_{n\ge 1} B[n]$ be the torsion subgroup of $B$. Is it true that, necessarily, there exists an integer $d\ge 0$ such that $$B_{\rm tor} \simeq (\mathbf{Q}/\mathbf{Z})^d\oplus F...
The first question has been answered by Jeremy Rickard. Another counter-example is the Prüfer group $\mathbb Z[\ell^{\infty}]$ (this is a subgroup of a group of the form you ask for, but it is not of that form). For the second: you are taking a torsion $\ell$-group (your $B[\ell^{\infty}]$) with finite socle, so that ...
For the first question, $$\bigoplus_{p\text{ prime}}\mathbb{Z}/p\mathbb{Z}$$ is a counterexample.
https://mathoverflow.net
116,842
[ "https://electronics.stackexchange.com/questions/116842", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/46354/" ]
I've been shopping for a voltage regulator that works in a range of .5-1.5 (+/-.5) Volts, but they are not easily found. I'm wondering if anyone knows whether they even exist, or possibly how to make one. Thank you, L.
Yes, what you want can absolutely be achieved. Before you capture a waveform use the horizontal position adjustment knob to change the position of the orange cursor at the top of the screen. This first image show a capture from my scope with the horizontal position set to the center of the screen. The second image sh...
For the rigol DS1000z series, the only way I have been able to do it is by using the "window" trigger type. Push "menu" under trigger level adjustment knob. Then select window as the trigger type. Select time in the position box. The increase the time to match with half the number of points you have. Example, if you...
https://electronics.stackexchange.com
161,952
[ "https://physics.stackexchange.com/questions/161952", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/62505/" ]
Case I: The force acting on an object of mass m is $F(x) = F_o(1-e^{\alpha x})$ Case II: The force acting on an object of mass m is $F(x) = F_o(1-e^{-\alpha x})$ where $F_o$ and $\alpha$ are positive constants. In which case can the object oscillate near the equilibrium and what is the oscillation frequency? SOLVIN...
An object that oscillates near equilibrium will essentially follow the harmonic motion F = -kx, and at equilibrium x = 0. I take the derivatives for a) and b) and solve for frequency, where $ w = \sqrt{k/m}$: a) $ (F_o - F_o e^{\alpha x})\frac{d}{dx} = {-kx}\frac{d}{dx} $ $ -F_o \alpha e^{\alpha x} = -k $ $k = F_o \...
I don't think is the correct way to go about the problem. In your first case you've just arbitrarily added another force, which is not what the particle is asking. The way these problems are usually done is you should do perturb the correct path of the particle x by dx so the perturbed path is x+dx where dx &lt;&lt; x...
https://physics.stackexchange.com
174,257
[ "https://security.stackexchange.com/questions/174257", "https://security.stackexchange.com", "https://security.stackexchange.com/users/143050/" ]
A router doesn't support ipv6. There is a machine connected to the router, that is assigned an ipv4 address by the router. The machine uses firewall software. Setting up the machine's firewall, all incoming traffic to the machine needs to be blocked except for one service. Is it enough for the machine's firewall to ac...
The other answers are misleading, so here is my take: Yes, you should block IPv6 on the machines firewall or disable IPv6 on the machine altogether. Here is why: While the router may not support IPv6 (at this moment) and thus no IPv6 traffic is routed from external devices, the router does act as a Level 2 switch as...
If the router doesn't support IPv6, it won't route IPv6 packets, so you don't have to worry about IPv6 attacks from the internet (as others have said). It's probably still worthwhile setting up firewall rules for IPv6, though, to protect against malicious traffic originating from your local network (smart TV, your fri...
https://security.stackexchange.com
350,796
[ "https://softwareengineering.stackexchange.com/questions/350796", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/32339/" ]
Suppose we've a <code>permissionManager</code> which tell us if user has some privileges to some action or not. We've quite a lot of them(dozen, maybe more). I see two ways to implement checks for a user, like a: <ol> <li>Dedicated method: <code> permissionManager.canAdminister(user); </code></li> <li>Method with a p...
Sometimes, the fact that you have this choice to make is itself a smell. It tells you that perhaps you are missing an abstraction, or that behavior is not sitting in the proper place. That may or may not be true in your particular case, so I'll address your question directly. The preferred choice depends on what the c...
I always like to sort out issues like this by looking at using code: <pre><code>sc = new SecuredCommands( permissions.for(user) ); sc.delete("foo.txt"); </code></pre> That seems nicely decoupled and doesn't require responsibility mixing. All we care about when trying to issue the command is if it's permitted. We d...
https://softwareengineering.stackexchange.com
57,995
[ "https://electronics.stackexchange.com/questions/57995", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/19003/" ]
I have evaluated the transfer function of an \$RC\$ circuit, getting the following transfer function: $$H(s)= \frac{1}{1+sCR}$$ the impulse response (i.e. output response to a Dirac's Delta) would thus be the inverse laplace of the same expression and that would be a decaying exponential function with a peak value of...
The instantaneous rise on the capacitor is not possible in the real world, but then again neither is the impulse it takes to cause that. The rate of voltage rise on the capacitor is proportional to the input voltage. During the impulse, that input voltage is infinite, so the capacitor voltage can rise infinitely fast...
It's important to keep in mind that $$\frac{1}{1+sRC}$$ is the transfer function you still have to multiply by a step function to obtain the voltage on the output of the capacitor. A step function has a Laplace transform of \$1/s\$ (prove this for yourself by calculating $$\int_{0}^{\infty} 1 \times e^{-st}dt$$ That m...
https://electronics.stackexchange.com
229,954
[ "https://security.stackexchange.com/questions/229954", "https://security.stackexchange.com", "https://security.stackexchange.com/users/67818/" ]
I'm pretty sure this is a stupid idea but I'd like to know why, so bear with me for a moment.<br> Lots of the work backend developers do is providing CRUD access to customers via HTTP, essentially mapping data from and to the internal database. Customers authorize to the web service using some sort of credentials via a...
<strong>TL,DR:</strong> Don't. <blockquote> (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues </blockquote> Even with permission on the record level, it does not scale easy. If a user has irrestricted <code>SELECT</code> on a table, they can select any record on t...
Interesting question. In theory, this can be done securely. MS-SQL can secure the connection with encryption, authenticate the user, and provides fine-grained permissions and other security features like auditing. In fact, it used to be common in intranet environments that thick clients would access a database directl...
https://security.stackexchange.com
608,840
[ "https://electronics.stackexchange.com/questions/608840", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/132183/" ]
I would like to have a synthesizable and optimized solution for the modulus operator in Verilog (%) for the nonpower of two integers. <pre><code>cnt_mod &lt;= cnt % 3; </code></pre> For power of two integers (n_arg), it could be seen as a left shifting process followed by truncation to n_arg bits. How it can be impleme...
It's actually possible to implement modulus by a constant with only addition and a small look-up table. Suppose you have an 8 bit binary number. Look at all powers of two representable in 8 bits, which are the following: <pre><code>00000001 = 1 00000010 = 2 00000100 = 4 00001000 = 8 00010000 = 16 00100000 = 32 01000000...
I suppose cnt is a counter. If so, and if it starts from 0 (or a fixed number N), then why not to keep a second variable cnt_mod_3, that is incremented the same moment as cnt and reset to 0 when reaching 3. That way, you don't have any modulo/division computation to do, and you have no additionnal delay. In case cnt is...
https://electronics.stackexchange.com
560,415
[ "https://physics.stackexchange.com/questions/560415", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/233022/" ]
As you know, the electrostatic potential for a point charge in free space (at the position <span class="math-container">$\vec {r_0}=x_0\hat {x}+y_0\hat{y}+z_0\hat{z}$</span>) is given by the relation: <span class="math-container">$$V(\vec r)=\frac{1}{4\pi\epsilon_0}\frac{q}{\left|\vec r-\vec {r_0}\right|}$$</span> (I h...
The key here is the &quot;ground&quot;. According to your picture, you can see immediately that there is an electric field from the two rods acting (in the downward direction) on the wire connecting between the sphere and the ground. This electric field will 'kick' electrons in the wire, and generate current. The spher...
Yes, it will. You are thinking that with balanced electrostatic forces, there is no force to make electrons move. That's reasonable. But when electrons can move from an area of high potential to an area of low potential, some of them will randomly do that. And they are less likely to move back to the high potential are...
https://physics.stackexchange.com
35,608
[ "https://mechanics.stackexchange.com/questions/35608", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/876/" ]
The air conditioning has not worked on my 2003 Honda for about 1 year or so now. The weird thing is that right around the time it was going to break, the vents on the left side of the car was not putting out cooled air, but the right side was. When it eventually stopped working all together, I had a guy come over and...
I suspect that the "psst bzzz psst bzzz" sequence is due to excessive compressor cycling, because enough refrigerant (it's NOT Freon "R12", BTW ... for your vehicle it should be R134a) has leaked out, and opens the low-pressure safety switch, disengaging the compressor clutch. Once the compressor is no longer "compres...
The periodic hissing is probably the compressor cycling on and off. If your pressure sensor is functional, I wouldn't be surprised if there is too much refrigerant in the system. You can confirm this using a manifold pressure gauge. Be sure to check both high side and low side to confirm that they are within spec.
https://mechanics.stackexchange.com
9,569
[ "https://ai.stackexchange.com/questions/9569", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/20762/" ]
When reading the book by Sutton and Barto, I came across the <em>importance sampling ratio</em>. The first equation, I believe, describes the probability a particular sequence is obtained given the current state, and the policy. <span class="math-container">\begin{align} &amp;\operatorname{Pr}\left\{A_{t}, S_{t+1}, A...
Dropout and Max-pooling are performed for different reasons. Dropout is a regularization technique, which affects only the training process (during evaluation, it is not active). The goal of dropout is reduce unnecessary feature dependencies in the network, allowing it to be simpler and improves its generalization abi...
I think we would consider regularization and downsampling better in this way: <ol> <li>dropout</li> </ol> it puts some input value (neuron) for the next layer as 0, which makes the current layer a sparse one. So it reduces the dependence of each feature in this layer. <ol> <li>pooling layer</li> </ol> the downsampl...
https://ai.stackexchange.com
650,361
[ "https://electronics.stackexchange.com/questions/650361", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/330751/" ]
I wrote a VHDL code to Build an array multiplier (no booth encoding, no tree structure). The output multiplier should be able to multiply two unsigned 8-bit numbers. The multiplier can either multiply signed and unsigned numbers or that can two times multiply unsigned 4 bit numbers. Also, multiplier can support both...
I suggest reducing the value of C45 as 47uF seems too high. This, in combination with extra capacitance added by the DAC input could cause the ringing. Reducing the capacitance - while staying in the recommended range (C and ESR) - can, in my opinion, solve the problem. I would recommend 1uF as a starter. <strong>EDIT ...
The problem is the output capacitance, C45. The ESR of the output cap is needed for stability, so using a ceramic cap with zero ESR is calling for a trouble. Replace it with an aluminium electrolytic cap, or simply replace R10 with something between 20 mR and 50 mR. Up to 0R1 should be alright.
https://electronics.stackexchange.com
572,375
[ "https://physics.stackexchange.com/questions/572375", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/249207/" ]
I’ve read that short circuiting means that a huge amount of current flows through the conductor in an extremely small period of time. Also, resistance increases with temperature for conductors, right? So if temperature increases, resistance increases. Which would mean the current doesn’t have an easy path to flow throu...
<blockquote> So, assuming the aforementioned definition of short circuiting to be true, and the wire to be isolated (so there’s no chance of any insulation melting and contact with another such wire), am I correct? </blockquote> Since the most common cause of short-circuits is the failure or shorting of electrical insu...
In a tungsten filament light bulb, the temperature and resistance rise rapidly until the power being radiated away equals that being supplied. Normally this occurs at a temperature that is below the melting point of tungsten.
https://physics.stackexchange.com
587,766
[ "https://physics.stackexchange.com/questions/587766", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/261821/" ]
I have to show that two eigenfunctions of an electron in a 1 dimensional infinite square well with different parity and different quantum numbers are orthogonal. I am attempting this by integrating the product of the two eigenfunctions <span class="math-container">$\psi_n=A_n \sin(\frac{nx\pi}{a})$</span>, with <span c...
The condition for two eigenfunctions to be orthogonal is that their inner product is zero. In Dirac notation this would mean: <span class="math-container">$$\langle \psi_n|\psi_m\rangle=0\quad m\neq n\tag{1},$$</span> and in wave function notation (as you have written <span class="math-container">$\psi_n(x)=\langle x|\...
There is a more slick, more mathematical way, of approaching the problem, by using the general theorems that eigenvalues of a Hermitian operator are real and that eigenvectors with distinct eigenvalues are orthogonal. In this case the result is a trivial corollary. However, I do not think the question would be asked if...
https://physics.stackexchange.com
752,911
[ "https://math.stackexchange.com/questions/752911", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
How can I show that $n\sum_{i=1}^n {x_i^2} \ge (\sum_{i=1}^n{x_i})^2$ for any natural number $n$ and $x_i \in\mathbb{R}?$ I assume there is something about Cauchy-Schwarz and induction, but I really don't see it.
Assuming $x_i\ge0$ for each $i$, $x_i\le\sum_{k=1}^nx_k$ and $x_i^2\le(\sum_{k=1}^nx_k)^2$ for each $i$, so $$\sum_{i=1}^nx_i^2\le\sum_{i=1}^n\left(\sum_{k=1}^nx_k\right)^2=n\left(\sum_{k=1}^nx_k\right)^2$$ The updated version follows from the Cauchy-Schwarz inequality, with $y_i=1$ in: $$\left(\sum_{i=1}^nx_iy_i\rig...
$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\dow...
https://math.stackexchange.com
54,761
[ "https://dsp.stackexchange.com/questions/54761", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/36529/" ]
When calculating the spectrum estimation of a signal <span class="math-container">$x(t)$</span> with random noise, why do we use (<span class="math-container">$E$</span> for expectation) <span class="math-container">$$E[|X(\omega)|^2]$$</span> but not <span class="math-container">$$E[|X(\omega)|] $$</span> If it i...
I disagree with aspects of other the given answers. It depends on signal model that is assumed. If <span class="math-container">$x(t)=s(t)+n(t)$</span> such that the probability density <span class="math-container">$x(t)$</span> is <span class="math-container">$$ p(x(t))=\frac{1}{\sqrt{2\pi}\sigma} e^{(x(t)-s(t))^...
Simply because that gives us a <em>power</em> spectral density, and that is usually more helpful than some amplitude density. But that's just a convention. We could just as well use <span class="math-container">$\sqrt{E\left[\lvert X(\omega)\rvert^2\right]}$</span>. Your considerations with randomness are off. The who...
https://dsp.stackexchange.com
3,486,902
[ "https://math.stackexchange.com/questions/3486902", "https://math.stackexchange.com", "https://math.stackexchange.com/users/557123/" ]
Here's the question, and I want to know if my steps are correct: <blockquote> Assume <span class="math-container">$x_i \geq 0$</span>. If <span class="math-container">$\sum_i^\infty x_i$</span> converges, show that <span class="math-container">$\prod_i^\infty(1+x_i)$</span> converges as well. </blockquote> <strong...
You write <span class="math-container">$\prod^\infty_i(1+x_i)$</span> is monotone increasing. But <span class="math-container">$\prod^\infty_i(1+x_i)$</span> is merely a number. What does it mean to say a number is monotone increasing? What I presume you mean is <span class="math-container">$$ \prod_{i=1}^M (1+x_i) $...
Taking limit is okay because both limit exist. Your proof seems perfect.
https://math.stackexchange.com
4,473
[ "https://stats.stackexchange.com/questions/4473", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/776/" ]
I've created a model (cue ominous music) in R based on previous months data using lm(). Now, I would like to see how well it predicts the current months data. For example, my model predicts sales figures. I have figures for January, February and March. My model is based on figures from January and February and I woul...
?predict (which will implement ?predict.lm) Make sure you put into "newdata" a data.frame with the exact same variable names.
You use the example "January, February, and March", and I hope that's more for illustration and it isn't literally all the data you have. For monthly data, you really should have 3+ years of data, and places like the Census Bureau won't touch a monthly series with less than 7 years of data. Also, you don't mention exa...
https://stats.stackexchange.com
634,049
[ "https://physics.stackexchange.com/questions/634049", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/203557/" ]
Mesons in chiral lagrangian are described by the chiral action <span class="math-container">$U = e^{2i\pi^a T^a/f_\pi}$</span>, <span class="math-container">\begin{equation} \mathcal{L}_{chiral} = \frac{f_\pi^2}{4} \text{Tr} \left( \partial^\mu U^\dagger \partial_\mu U \right) + \frac{\sigma}{2} \text{Tr} \left(MU + ...
<h1>Answer to first question:</h1> If <span class="math-container">$\theta\not=45^\circ$</span>, <span class="math-container">$T_1sin\theta=200N\not=T_1cos\theta$</span>. Using the knowledge of <span class="math-container">$\theta$</span>, we need to find out the value of <span class="math-container">$T_1$</span> and t...
<blockquote> If θ was any value but 45°, this wouldn’t be true (right?). Because sin30 ≠ cos30 (for example). </blockquote> If it wasn't 45<span class="math-container">$^0$</span> <span class="math-container">$T_2$</span> wouldn't be 200 N and the minimum required coefficient of static friction for equilibrium would be...
https://physics.stackexchange.com
194,500
[ "https://dba.stackexchange.com/questions/194500", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/116066/" ]
I ran DBCC CheckDB and got some consistency errors in the database. In an attempt to recover all the data I have exported out all the data from the database to a new database except for one table. When I try to copy all the data from that table to the new database I get an error that says <blockquote> "A severe e...
When you are using <code>mongoS</code> authentication is done against config servers <code>admin</code> database. When you connect directly to replica set, you are authenticating against replica set's <code>admin</code> database, where you don't have that <code>root</code> user set. What can you do? Start replica set'...
shard members authentication requires local credentials. As what JJussi has said, you need to create local users on the sharded replica sets.
https://dba.stackexchange.com
29,898
[ "https://cs.stackexchange.com/questions/29898", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/21350/" ]
We are given numbers $n \leq 200$, $k \leq 10$ and an array of $3n$ positive integers not greater than $10^6$. Find the maximum possible sum of a subset of elements of this array, such that in every contiguous $n$ elements there are at most $k$ chosen. As this is an old high-school level contest problem, I ask for som...
Let's call the length of the array $t \cdot n$, so in your task $t=3$. Since in every fragment $[1, n], [n+1, 2n] \ldots [(t-1)n+1, tn]$ we can't take more than $k$ elements, so the number of taken elements won't be larger than $t\cdot k$. Let's call the indices of taken elements in the given array $x_1, x_2 \ldots x_{...
<h2>Method 1: Merging lazy streams</h2> One approach you could try involves iterating through partial solutions for a part of the array, in decreasing merit, and then merging them: <ol> <li>Enumerate the ways of selecting at most $k$ out of the first $n$ elements, in decreasing order of their sum. But don't try to b...
https://cs.stackexchange.com
514,239
[ "https://physics.stackexchange.com/questions/514239", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/247333/" ]
When we say that the current flowing in a series circuit is the same, do we mean that the current is same in the entire circuit i.e, charge per unit time is the same in the entire circuit at any point of time, or do we mean that at each point in the circuit, the charge per unit time is the same? While explaining, pleas...
<blockquote> charge per unit time is the same in the entire circuit at any point of time, or do we mean that at each point in the circuit, the charge per unit time is the same? </blockquote> If the circuit has only one loop, then at any point in time, the current is the same at all points in that loop.
<blockquote> charge per unit time is the same in the entire circuit at any point of time </blockquote> <blockquote> at each point in the circuit, the charge per unit time is the same </blockquote> Both of these statements are true. The current is the same at all points, thus it is the same throughout the entire circuit...
https://physics.stackexchange.com
34,510
[ "https://mathoverflow.net/questions/34510", "https://mathoverflow.net", "https://mathoverflow.net/users/8152/" ]
How to see that the cup products vanish on suspensions?
13.66 in Switzer's Algebraic Topology: Homotopy and Homology. The idea is to use the fact that $\Sigma X$ decomposes into two copies of $CX$, say $A$ and $B$, glued along the common boundary of $X$. For any two cohomology classes $x$ and $y$ in $\tilde{E}^* \Sigma X$, you can uniquely pull $x$ back to a class $x'$ on...
This is a special case of the fact that the cup-length is a lower bound for the Lusternik–Schnirelmann category. Using those two terms as keywords should get you the standard arguments.
https://mathoverflow.net
276,034
[ "https://stats.stackexchange.com/questions/276034", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/36661/" ]
I have nested time series data where the outcome (number of visits per month) is available for 24 months (repeated measures) across two time periods (pre- and post-intervention), for three health facilities (a control, intervention 1 and intervention 2, where the interventions differ). I wish to see if once the interve...
correlation = corAR1(form = ~ x | grp/period), It seems grp/period separates the data into 6 groups, and assumes the independent between groups. Especially it means the independent between the observations at pre- and post-intervention from the SAME facility. Maybe this assumption is not true. So I prefer correlat...
Can I ask why you are using the analysis strategy rather than another method, for example, why not use a spline model (or piece-wise, or split, or whatever your field calls a continuous time series with more than one slope)? Coding a continuous time variable along with your fixed levels (period one, period 2) seems lik...
https://stats.stackexchange.com
19,897
[ "https://electronics.stackexchange.com/questions/19897", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5842/" ]
As I understand it a LED emits a photon when an excited electron falls back to a lower orbit, and this is always the same energy (read: wavelength). So then why is the spectrum of a LED a bell-shaped curve instead of just a line (maybe a couple of lines for different electron transitions)?
Several reasons. Without getting too deep into quantum mechanics, the main reasons are: <ul> <li>If the LED isn't at absolute zero temperature, its atoms are vibrating. The semiconductor allows longitudinal and transverse waves of many wavelengths, all going at the same time in ways described by thermodynamics. Thes...
I guess that the orbit fallback energy is not strictly constant, but depends (a little bit) on the neighbourhood of the atom, for instance how exactly it fits in the grid, location of nearby impurities, if atoms of various isotopes are involved teh exeact isotope of the atom, etc.
https://electronics.stackexchange.com
1,240,661
[ "https://math.stackexchange.com/questions/1240661", "https://math.stackexchange.com", "https://math.stackexchange.com/users/229496/" ]
Here is the question - <img src="https://i.stack.imgur.com/q8ZSJ.png" alt="enter image description here"> I am able to visualize the solid, but how do I find its volume? I'm unable to figure out the 2D structure that when rotated, produces this solid. Please help. Edit: The answer required is 8/3
This solid is not obtained by a rotation. Here, the area of the triangle $T_y$ that cross the y axis at $y$ is given by $A(y) = \frac{1}{2}(2x)^2 = 2(1-y^2) $, because $x^2+y^2=1$ Hence the volume of your solid is $$\int_{-1}^1 A(y) dy = \int_{-1}^1 2(1-y^2)dy = \frac{8}{3}$$
Hint: the area of each of these triangles is half the height of a circle squared at the given point. Hint #2: The height of the circle is going to be $2\sqrt{1-x^2}$, right? But we can figure out the area of the triangle only from the base!
https://math.stackexchange.com
121,247
[ "https://mathoverflow.net/questions/121247", "https://mathoverflow.net", "https://mathoverflow.net/users/24541/" ]
I want to start studying differential geometry but I can't seem to find a proper starting path. Whenever I try to search for differential geometry books/articles I get a huge list. I know that it is a broad topic, but I want some advice for you regarding the books and articles. I want to learn differential geometry and...
I would recommend Lee's book "Introduction to Smooth Manifolds." It's a long book but is comprehensive, has complete proofs, and has lots of exercises.
M. Spivak, A comprehensive introduction to differential geometry, Publish or Perish, Wilmington, DL, 1979 is a very nice, readable book. If you prefer something shorter, there are two books of M. Do Carmo, 1. Differential geometry of curves and surfaces, and 2. Riemannian geometry.
https://mathoverflow.net
6,276
[ "https://mechanics.stackexchange.com/questions/6276", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/3252/" ]
My friend is against cars with automatic transmission because he thinks that they break easily and that their repairing cost a lot. He thinks that it is impossible to maintain an automatic transmission box. Hence he is avoiding all cars with automatic transmissions -- I am very skeptical about this. <em>What are the l...
They will probably work out to be the same. An automatic transmission is inherently more complicated which means more can go wrong and usually does (more so than manuals). The increased complexity also makes them more expensive, heavier, less fuel efficient etc. A manual transmission is less complicated which means ...
Manual transmission BOXES last much longer than automatics. The clutches, however, vary with the driver. If the driver is good, then the manual is just as good as the automatic. If not, then the automatic's clutches will last longer. This is true because there is at least one clutch for each gear in an automatic, a...
https://mechanics.stackexchange.com
607,835
[ "https://physics.stackexchange.com/questions/607835", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/284245/" ]
In the amount of quantum mechanics I'vs learnt I understand what wave functions are, how do we extract information from them and so on, and that <em>addition of two wavefunctions on renormalization gives a <strong>superposition</strong> of the corresponding quantum states.</em> I was learning the completeness of hermit...
<blockquote> But, what I couldn't understand is the difference between isothermal free expansion and adiabatic free expansion? </blockquote> Isothermal means the temperature of the gas is constant <em>during</em> the expansion process so that the ideal gas law can be applied at each point during the expansion. That req...
The process you described is adiabatic, but it is isothermal only for a substance whose equation of state is such that pressure is directly proportional to temperature at constant volume (like an ideal gas). Otherwise, the process is not isothermal, because the internal energy depends on both temperature and specifi...
https://physics.stackexchange.com
2,111,123
[ "https://math.stackexchange.com/questions/2111123", "https://math.stackexchange.com", "https://math.stackexchange.com/users/48197/" ]
I'm new treating with power-law probability distributions and I need to remember the conditions under certain integrals converge. So, let $I_n(a,b)=\int_a^b \frac{1}{x^n}dx$. <strong>Questions.</strong> <ol> <li>What are the conditions that should satisfy $n$ in order to $I_n(a,b)$ be a convergent integral when $a=0$...
This can be attacked directly: how can $m \implies p$ be false? You may find it helpful to covert the implication into a disjunction (that is, express $m \implies p$ using $\lor$ instead of $\implies$) and then negate it.
There are three variables here; each can take two different values (true or false). That means there are only eight different situations to consider. That's small enough to do the straightforward thing: check 'em all, and see if any are counterexamples. For example, if $p$, $m$, and $t$ are all "true", then $p \implie...
https://math.stackexchange.com
60,600
[ "https://dba.stackexchange.com/questions/60600", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/35439/" ]
I'm studying DDBB and we are using Oracle. Using too much tables can be really difficult for me because I have to remember table1.content2, table3.content1, etc. So because of that, I would like to print (in paper) the header tables to make it easier. I know my explanation is not very good so I tried to "draw it" bel...
You can do a describe using SQLplus or SQL Developer: <code>desc myschema.mytable</code> This way you'll also see the column's datatype and whether it can be null or not. <pre><code>desc myschema.category Name Null Type -------------- -------- -------------- CATEGORY_ID NOT NULL NUMBER(38...
If you're a student and can't install SQL Developer locally, maybe you could use SQuirreL SQL, a more lightweight (but still excellent) JDBC database client. I've not used the graphical stuff which I believe they have, but you can just simply navigate the tree like structures through the tables and easily get any info ...
https://dba.stackexchange.com
224,446
[ "https://security.stackexchange.com/questions/224446", "https://security.stackexchange.com", "https://security.stackexchange.com/users/198465/" ]
I have a web application built in a classic MERN stack (MongoDB, Express, React, Node) and I want to create an admin route, so I figured I could just do it with a <code>[url]/admin</code> route. Could that be a security risk? Of course the admin users would be prompted with some form of authentication, but having the...
It is not a security flaw to use a known admin URL. The things that should be secret are the management credentials, not the URL. It's like hiding a door, while really it's the key that you should keep secure. You can protect the door better using human guards, a perimeter fence, extra secure lock, sturdy walls, etc. ...
It depends on the use-case of your application. If it's within an organization, you can restrict the admin panel to only respond to requests from a specific source IP. You can also use certificate-based authentication, which is more secure than traditional password-based authentication. If you write some "general" sof...
https://security.stackexchange.com
6,156
[ "https://iot.stackexchange.com/questions/6156", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/16593/" ]
Well, I have no experience with ESP32 UART, tried it and failed. In brief: I need to implement a data exchange between ESP32 and external module via UART. And at some point I need to read the data from the external module, but have a garbage instead. Details: I'm playing with KNX. I've made a simple setup with some dev...
Sorry colleagues, I simply <em><strong>forgot to connect common ground</strong></em>. Found the unconnected wire, plugged it to the devboard and now everything is working.
Configuring a UART for 8 bits plus even parity is a red flag. This configuration has been obsolete for decades. A lot of current hardware doesn't actually support it. Set to 8-bit no parity.
https://iot.stackexchange.com
165,574
[ "https://mathoverflow.net/questions/165574", "https://mathoverflow.net", "https://mathoverflow.net/users/48554/" ]
For simplicity, call the Weil group of a local nonarchimedean field $F_v$ to be the following extension: $$1\longrightarrow F^\times_v\longrightarrow W_{F_v}\longrightarrow\text{Gal}(F_v/\mathbb Q_v)\longrightarrow 1.$$ <ol> <li>Finding this definition to be lacking in terms of describing $\ell$-adic representations, ...
First, (2) and (3) are functionally equivalent. What matters are not the group themselves, but their categories of finite-dimensional complex representations (continuous in case (3), algebraic in the case (2)). But the two are the same: that's the simplest case of the famous Weyl's unitary trick. So working with (2) o...
The equivalence between (1) and (2) is obtenaid by a theorem of Jacobson-Morozov-Kostant. You can find a proof in Gross, Benedict; Reeder, Mark Arithmetic invariants of discrete Langlands parameters. Duke Math. J. 154 (2010), no. 3, 431–508, section 2.1
https://mathoverflow.net
186,355
[ "https://physics.stackexchange.com/questions/186355", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82257/" ]
(Feel free to correct any mistaken assumptions I have) The overall question I have is: given that the early universe started as an incredibly dense ball of matter and energy, why didn't that mass stick together in one huge "blob" due to gravity instead of becoming, as it is, "homogeneous and isotropic"? One explanati...
Atoms themselves didn't form until well after the Big Bang. The Big Bang Nucleosynthesis (BBN) is when most nuclei formed and that happened somewhere between 10 seconds and 20 minutes after the Big Bang (that's a long time relative to how quickly everything was happening back then). That would be when ions formed, neut...
First, the early universe was incredibly hot. Second, Gravity is the weakest force. Third, when we talk about the early universe, we analyse things up to the point that gravity is not important. Why? Because we don't have a quantum theory of gravity. Forth, you need to think of the early universe as an <em>infinite</em...
https://physics.stackexchange.com
348,684
[ "https://softwareengineering.stackexchange.com/questions/348684", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/87655/" ]
I work as a release manager in a company with 15 internal developers and 10 external developers. <strong>Setup</strong> <ul> <li>Code base is a heavily modified Magento (PHP)</li> <li>Test suite is almost non-existent but is improving every day</li> <li>Development is done on each developer's laptop with Docker conta...
When I read through your question, everything sounded reasonable and even enviably agile – right up to the point where you said you have to wait 6 months (that is over 120 business days!) until a production-ready feature has been approved for deployment?!??! Your problem is not the branching model. Your root cause is...
I feel your pain. Try not to branch and merge. Instead of branching and merging, try altering your codebase so that it is modular. Then rely on build tooling to produce the correct artifacts for deployment to any intended environment by selecting what modules constitute the final build. So project x is not live yet, ...
https://softwareengineering.stackexchange.com
216,218
[ "https://dba.stackexchange.com/questions/216218", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/1754/" ]
We are running into an odd error when trying to stress test our application that hits an AG. If we point the application directly to the primary server, we don't see any issues with the test. However, if you point the application at the listener, we get this error: <blockquote> provider: TCP Provider, error: 0 - Y...
So the fix for us was actually making some changes in the app tier. We reduced idle time to 5 seconds instead of 4 minutes and increased maxTCP connections to 65000. we made the change using this powershell: <pre><code>Function ApplyRegChange { Param ($RegistryPath, $Name, $Value) IF(!(Test-Path $RegistryPath)) ...
<blockquote> If we point the application directly to the primary server, we don't see any issues with the test. </blockquote> Sounds like a problem with the name chosen for the Listener... <blockquote> error: 0 - You were not connected because a duplicate name exists on the network. If joining a domain, go to Sys...
https://dba.stackexchange.com
150,316
[ "https://electronics.stackexchange.com/questions/150316", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/62110/" ]
I am learning about source transformations in my circuits class and I had a couple of questions regarding them. Question 1: Is a source transformation a law? By this, I am asking if I am able to do it at any time and still yield the same results as far as power dissipation, current measurements, voltage drops, etc. Q...
1) It isn't a 'Law' as much as it is a theorem, specifically Thevenin's theorem, stating that any network of resistors, voltage sources and/or current sources can be represented by a single ideal voltage source with a series resistance. There is also then the Norton equivalent circuit which represents any similar netwo...
You are getting different answers because you are measuring different things. 'R27' and 'R31' are not the same equivalent resistance. The current path through R27 does not exist in the original circuit, but the current path through R31 is equivalent to the path through R4/R5. If you take the 57.6V across R27 and y...
https://electronics.stackexchange.com
319,303
[ "https://mathoverflow.net/questions/319303", "https://mathoverflow.net", "https://mathoverflow.net/users/20598/" ]
Suppose <span class="math-container">$f:\mathbf{N} \to [0,1]$</span> satisfies <span class="math-container">$$f(x)f(y) + f(x+y)\leq 1\qquad(1)$$</span> for all <span class="math-container">$x,y$</span>. Let <span class="math-container">$$d_n = \frac{1}{n} \sum_{x=0}^{n-1} f(x).$$</span> It is easy to prove that <span c...
This system seems simple enough to throw to a CAS or some optimizer for small <span class="math-container">$n$</span>. The inequalities are sequential: once you have understood behaviour for <span class="math-container">$n$</span>, you can add a few more constraints for <span class="math-container">$n+1$</span> and try...
Gerhard Paseman's solution is correct, and shows that <span class="math-container">$f \equiv 1/\phi$</span> is the unique maximizer of <span class="math-container">$d_n$</span> for each <span class="math-container">$n\geq 0$</span>. Just reproducing here in as few words as I can, for the purpose of succinctness. Let <...
https://mathoverflow.net
175,668
[ "https://softwareengineering.stackexchange.com/questions/175668", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/72514/" ]
I'm working on a content synchronisation module for Drupal. There is a server module, which sits on ona website and exposes content via a web service. There is a also a client module, which sits on a different site and fetches and imports the content at regular intervals. The server is created on Drupal 6. The clie...
Unless the project is really huge, I'd go for single repository with subdirectories for server and client and create a branch for each version. You can still have multiple copies of the repository in case you want access multiple versions at the same time. By maintaining multiple repositories, you'd make transferring ...
I have seen and worked with such variations. Everything in one folder with subfolders for server and client or one repo each. I prefer the single repo for every main part of the project. In case of big version changes I would simply create new repos too. Definitely not have different branches for them. While branches ...
https://softwareengineering.stackexchange.com
15,714
[ "https://mechanics.stackexchange.com/questions/15714", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7132/" ]
My car, a 97 Mazda 323, burns about a liter of oil per 1000 kilometers, mostly start and stop city driving. Sometimes I see a puff on start-up and sometimes I see smoke while accelerating, but it's intermittent. So I figure that both the valve seals and the oil rings are probably worn ( even though the car supposedly ...
You said "valve gaskets" but I'm going to assume you actually mean the <em>valve seals</em>. Since you are seeing a small puff of smoke sometimes during startup and when you are accelerating, these are usually caused by two separate issues, both of which you are mentioning. Start-up puff of smoke can usually be attri...
I asked this same question to the workshop that performed the headjob on one of my cars and they said that apart from a bit of smoke, it wouldn't be anything to worry about. As long as there is enough oil in the engine. They could have told me to give them more money, but they didn't.
https://mechanics.stackexchange.com
571,925
[ "https://physics.stackexchange.com/questions/571925", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/269918/" ]
Newton's first law states that given an ideal situation, any force applied on a body would change its state of motion and the object would continue to pursue that state, given no other force acts on the body. However, Newton's third law says that for every action force, there is an equal and opposite reaction force, so...
They are not contradictory. Contradictory would mean that they both apply in the same situation and have effects that cannot both be true together. Instead, they apply for different situations. The first law applies when there is no force and the third law applies when there is a force. In other words, the first law de...
Newton's first law states that an object with no forces acting on it does not change it's velocity. Newton's third law states that if you apply a force to an object, then that object applies a force of equal magnitude and opposite direction to you. Since Newton's first law applies in the absence of force, and Newton's ...
https://physics.stackexchange.com
128,715
[ "https://dba.stackexchange.com/questions/128715", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/71655/" ]
We have tables with MyISAM. The are out of sync, the number of records is different on each cluster node <pre><code>&gt; select table_schema, table_name from tables where ENGINE = 'MyISAM' and table_schema != 'mysql'; +--------------+------------+ | table_schema | table_name | +--------------+------------+ | nrmtz ...
<blockquote> I need the tables to be InnoDB and in sync. Those two statements crashing. </blockquote> Does it crash with a stack trace in the server logs? Could you share it here? I tried the above two commands on a 2-node MariaDB-5.5.47 cluster and it worked as expected. As @jkavalik suggested, you could do someth...
MyISAM support in galera is <em>cough</em> beta at best. The best thing to do is: mysqldump ... -T db table_name > dump.sql (this will make a .sql and .txt file) drop the myisam table edit the .sql file and change ENGINE=MYISAM to ENGINE=INNODB LOAD DATA INFILE 'table.txt' INTO TABLE table_name; Do this on whatever...
https://dba.stackexchange.com
82,721
[ "https://security.stackexchange.com/questions/82721", "https://security.stackexchange.com", "https://security.stackexchange.com/users/69323/" ]
I'm used to writing web stuff in PHP and let Apache or nginx handle the actual HTTP handling and load my code via whatever means (mod_php, fcgi, fpm, ...). I'm under the impression that this is a Good Thing(tm), as there have been years and years of hacking, patching and improving these webservers, so they are "battle...
Well-tested code helps to <em>reduce the risk</em>, but even PHP keeps issuing patches to remedy security issues. The problem is not with "newcomers" but with appropriate protections and controls over any type service that you expose. PHP/Apache/etc. behave (and fail) in predictable ways, but we can predict their beh...
I would not be using node for production but that's a different topic. The use of ngnix or Apache as a reverse proxy will provide little if no benefit security wise due to the fact that almost everything is being passed through transparently
https://security.stackexchange.com
507,526
[ "https://physics.stackexchange.com/questions/507526", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/198185/" ]
The canonical process of determining the pressure, velocity, and density of a fluid under the influence (or not) of external forces is through simultaneously solving conservation of mass, conservation of momentum, and an equation of state for the pressure (or conservation of energy). For an incompressible Navier-Stokes...
I think the role of pressure is to adjust itself immediately according to changes in the velocity field so that velocity is divergence-free at all times. In that sense, it does not have any thermodynamic meaning.
You are correct in concluding that the pressure <span class="math-container">$p$</span> in the Navier-Stokes equations is not related to the equation of state. It is a purely mechanical quantity, defined as <span class="math-container">$p = -\sigma_{ii}/3$</span>, where <span class="math-container">$\sigma_{ij}$</span>...
https://physics.stackexchange.com
405,827
[ "https://softwareengineering.stackexchange.com/questions/405827", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/358581/" ]
A programmer keeps making cosmetic changes to the code while we have a strict deadline and the contract stipulate "no changes to the existing code". I am wondering where this "attitude" comes from: DevOps ? Agile ? Changes performed: <ol> <li>Replacing explicit variables with "var"</li> <li>Renaming short variable n...
These things sound like general good practice being over zealously applied. But there is a easy answer <blockquote> the contract stipulate "no changes to the existing code" </blockquote> There's no arguing with a contract, revert the changes and discipline the programmer.
Some of these changes are sensible and will reduce technical debt, but there is a time for refactoring, and if you're under pressure right now, then this is not that time. In the light of that, it sounds like they are just procrastinating. They are trying to look busy without having to tackle any of the difficult work...
https://softwareengineering.stackexchange.com
18,094
[ "https://quant.stackexchange.com/questions/18094", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/16404/" ]
I need to calculate the a time dynamic Maximum Drawdown in Python. The problem is that e.g.: <code>( df.CLOSE_SPX.max() - df.CLOSE_SPX.min() ) / df.CLOSE_SPX.max()</code> can't work since these functions use all data and not e.g. considering the minimum only from a given maximum onwards on the timeline. Does anone kn...
You can get this using a pandas rolling_max to find the past maximum in a window to calculate the current day's drawdown, then use a rolling_min to determine the maximum drawdown that has been experienced. Lets say we wanted the moving 1-year (252 trading day) maximum drawdown experienced by a particular symbol. The f...
If you want to consider drawdown from the beginning of the time series rather than from past 252 trading days only, consider using <code>cummax()</code> and <code>cummin()</code> <pre><code>Roll_Max = SPY_Dat['Adj Close'].cummax() Daily_Drawdown = SPY_Dat['Adj Close']/Roll_Max - 1.0 Max_Daily_Drawdown = Daily_Drawdown...
https://quant.stackexchange.com
245,106
[ "https://mathoverflow.net/questions/245106", "https://mathoverflow.net", "https://mathoverflow.net/users/37659/" ]
I asked the following question one week ago at math.stackexchange but didn't receive a response, so I want to give it here another try: I'm interested in the following problem: We have got a time-discrete Markov chain $(X_n)$ with state space $S=\mathbb{R}^d_+$. The transition kernel is discrete in the sense, that for ...
Your ultimate question was answered by Gauss: $O_f^- \cap \operatorname{GL}_2(\mathbb{Z})$ is nonempty if and only if the class of $f$ is ambiguous (i.e. its square is the trivial class). Indeed, $f(x,y)$ is improperly equivalent to itself if and only if $f(x,y)$ is properly equivalent to $f(y,x)$. As the classes of $...
For such quadratic forms. $$ax^2-bxy+cy^2=a$$ If we consider all the equations of Pell. The resulting factorization of the number. $4a=tq$ And use these equations Pell. $$p^2-(b^2-4ac)s^2=\pm{t}$$ Then the solution can be written in this form. $$x=\frac{(p\pm{bs})^2-4acs^2}{t}$$ $$y=qps$$ The proposed scenario...
https://mathoverflow.net
46,344
[ "https://dsp.stackexchange.com/questions/46344", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/-1/" ]
I am trying to find the inverse system of the following (I tried finding the mathematical inverse function but since it is not the same I am not so sure) . Can someone help me find it? $$ y(t)=\int_{t-1}^{t+1}\cos\left(\frac{\pi\tau}{8}\right)x(\tau)d\tau $$
It seems that we have the same homework. You probably are Greek. After having the same question, I came to the conclusion that in order for this system to be invertible, you have to prove that for any given $$x_1(t), \, x_2(t)$$ the following sentence is correct: $$ x_1(t) \ne x_2(t) \,\, {\Rightarrow} \,\, y_1(t) \n...
<strong>HINT:</strong> The given input-output relation can be interpreted as modulation followed by filtering with an LTI system: $$\tilde{x}(t)=x(t)\cos(\pi t/8)\\y(t)=\int_{t-1}^{t+1}\tilde{x}(\tau)d\tau$$ First you need to figure out the impulse response of the LTI system. Then find its frequency response. Next, ...
https://dsp.stackexchange.com
3,793
[ "https://mechanics.stackexchange.com/questions/3793", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/1926/" ]
My 2001 Honda Civic's manual indicates that my timing belt should be replaced every 110,000 miles or 84 months. I bought the car in July 2001 and have around 49,000 miles on it. A dealer mechanic said (when fixing a seat belt recall) that it is time to be replaced, but two local mechanics strongly suggested I wait due ...
As they are made of rubber, belts begin to perish over time, and this weakens them. The constant flexing as the engine turns accelerates this weakening process. Eventually (if it weren't replaced), the rubber would split and the belt would snap - causing very expensive damage to your engine... It is quite easy to visu...
You don't weigh them against each other. Items are generally inspect or replace at x miles or y period of time, <em>whichever comes first</em>. This is what you need to do to keep the car within factory tolerances. Go outside of that range and you become a "test driver", which may not be an issue, but it <em>could</...
https://mechanics.stackexchange.com
161,124
[ "https://softwareengineering.stackexchange.com/questions/161124", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7274/" ]
Due to not wanting to pay licenses my company is still using SQL Server 2000 for new projects.<br> This is very limiting for multiple reasons.<br> I'm wondering what are the limitations of using SQL Server Express 2008?<br> Is there any reason NOT to use it to power ASP.Net MVC3 websites?
Sql Server 2008 R2 Express has the following limitation: <ul> <li>10GB size limit per database</li> <li>No agent to run scheduled tasks</li> <li>Limited to run on 1 physical cpu (will use multiple cores on the single cpu)</li> <li>1GB ram limit</li> </ul> If you can run your app within these limits then you could upg...
Let me explain the risks of developing in Express 2008 if you might ever run up on those limits. You will not be able to easily convert back to the SQL Server 2000 license if you use any newer features. If you don't use any newer features, they why not use SQL Server 2000? If you use the Express version and after a fe...
https://softwareengineering.stackexchange.com
832,564
[ "https://math.stackexchange.com/questions/832564", "https://math.stackexchange.com", "https://math.stackexchange.com/users/46215/" ]
I want an example (with details, please) showing that Nullstellensatz may be false over non-algebraically closed fields. Thanks in advance!
Consider the ideal $J = (x^2 + 1)$ in $\mathbb{R}[x]$. We have $V(J) = \emptyset$ and $I(V(J)) = I(\emptyset) = \mathbb{R}[x]$ but $\sqrt{J} = J \neq \mathbb{R}[x]$.
Not exactly the answer but related. One can get Nullstellensatz over any field $F$ provided you take the affine space over the closure $\overline{F}$. In the above example if we took the variety of $\mathbb{C}$, then $V(J)=\lbrace i,-i\rbrace$ and then $I(V(J))=\lbrace f\in \mathbb{R}[x] \mid f(\pm i)=0\rbrace$. But $f...
https://math.stackexchange.com
495,355
[ "https://electronics.stackexchange.com/questions/495355", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/214898/" ]
I was reading a chapter of my book (I am not putting it as reference since it is not in english) about the quantization noise problem in digital filters. Specifically, it writes about a filter that performs multiplication operations: <blockquote> "If the input, the output and the multiplicative coefficients of the ...
It means if you multiply say two 16-bit numbers together, the result is 32 bits. Example: 65535x65535 = 4294836225. If you must store the 32 bit result into 16 bits, you need to keep 16 bits and throw away 16 bits, therefore the result is truncated to 16 bits, so the value is not exact and there is error from the trun...
It is integer truncation, mainly from divisions as unless you build in rounding functions 80.9 becomes 80, say you have a muliplication that will not have an even result, e.g. 81x49 = 3969, now if stored in a 16 bit value would be fine, but if you now need to output that on an 8 bit DAC, you have to scale it down, e.g...
https://electronics.stackexchange.com
180,821
[ "https://electronics.stackexchange.com/questions/180821", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81412/" ]
In our village, the power supply is unstable. Sometimes it goes weak, sometimes not. You can tell it by our bulbs, it goes dimmer when the power is weak. Our monitor now shows some green and red wires in the screen, kinda like a 3D screen without a 3D glasses. According to the technician, it was due to the unstable flo...
There are two things you need to protect yourself from: <ul> <li>Over-voltage (which it sounds like what your AVR is for - it just trims voltage down when it's over).</li> <li>Under-voltage (which often uses a battery and an inverter - when the voltage goes too low, it <em>switches</em> to the battery).</li> </ul> Yo...
shortly, your laptop charger is a voltage regulator by itself. A voltage regulator is designed to automatically maintain a constant voltage level . it converts the main line voltage (230V for example ) to a voltage for your battery needs ( 12 volts for example - you can know that from charger specs -) <img src="https:...
https://electronics.stackexchange.com
14,674
[ "https://robotics.stackexchange.com/questions/14674", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/18497/" ]
My application requires a DC geared motor with torque of 10 NM - 20 NM and low speed (25 RPM at most) and a small dimensions (120 mm length at most). I failed to find my specs at eBay, and Alibaba targets only mass production. Can you recommend me certain models of Gear, Stepper or even Servo motors that met the above...
Based on your actuator and their sensor you can try force based control, relying on admittance filter. You command the arm to go down and when an external force is applied it means you pushed the object top. Alternatively, if you don't need millimeter accuracy you can use cheap ultra-sound sensors to detect the depth....
One of the experimental methods is to mount the camera on the actuator itself(called eye in the hand). Then use vision algorithms to detect the object of interest using edge detection techniques and use the images for visual odometry.
https://robotics.stackexchange.com
136,558
[ "https://electronics.stackexchange.com/questions/136558", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10190/" ]
I have attempted to build many amplifier circuits with little luck. The audio is either severely distorted, the gain is not high enough, or I pick up FM and AM broadcast stations. I would like to build something with variable gain via a Pot, output to drive a small, handheld speaker (1/4 watt or so?) and power from a...
For some reason a lot of the really simple discrete circuits that you find on the Internet have a lot of gain. But an electric guitar can put out 2-4 volts peak-to-peak (Vpp) if you really jam on it. So if you have a gain of only 2 and your supply is 9V, you're almost clipping the signal already. A lot of the "guitar p...
One candidate would be using LM386. On some circuits it can drive guitar pickup coil, but an additional preamp with single transistor might help.
https://electronics.stackexchange.com
130,306
[ "https://mathoverflow.net/questions/130306", "https://mathoverflow.net", "https://mathoverflow.net/users/33828/" ]
What is the role of the theory of Automatic Groups in the history of Geometric Group Theory? Motivation: When I read through the "Word Processing in Groups" I was amazed by the supreme beauty and elegance of the theory and of how robust it is. (That it started from conversations between (true artists) Cannon and Thur...
I think there are a few different ways in which Automatic Groups affected the history of Geometric Group Theory. One was mentioned by Derek Holt, which I will spin in a slightly different way: if you really want to know the group, and if it has an automatic structure, you had better know that structure. For an individ...
My own interest in automatic groups has been principally algorithmic, and I believe that this was Thurston's original motivation for studying them - they provided a method for carrying out practical computations in a variety of interesting groups with negative curvature. Once a (geodesic) automatic structure has been c...
https://mathoverflow.net
73
[ "https://cs.stackexchange.com/questions/73", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/-1/" ]
I have observed that there are two different types of states in branch prediction. <ol> <li>In superscalar execution, where the branch prediction is very important, and it is mainly in execution delay rather than fetch delay.</li> <li>In the instruction pipeline, where the fetching is more problem since the instructio...
I don't know which case is prevalent, but I would like to offer some thoughts on your proposal of double pipelines. First of all, you would need double the wire which would consume double the energy and produce double the heat while active. While not needed, on the other hand, it would be completely useless. So one co...
In one sense, the effect of branch prediction is more critical in the fetching of instructions since an instruction which is not fetched cannot be executed. With respect to executing both paths of a branch, this is called eager execution and has been researched somewhat substantially. Augustus K. Uht and Vijay Sindag...
https://cs.stackexchange.com
3,969,297
[ "https://math.stackexchange.com/questions/3969297", "https://math.stackexchange.com", "https://math.stackexchange.com/users/834840/" ]
I am stuck at the following Real Analysis problem from my book: <strong>Problem:</strong> Give an example of two open sets <span class="math-container">$A$</span> and <span class="math-container">$B$</span> and a continuous function <span class="math-container">$f: A \cup B \rightarrow \mathbb{R}$</span> such that <spa...
Consider <span class="math-container">$A = (0, 1),$</span> <span class="math-container">$B = (-1, 0),$</span> and <span class="math-container">$f:A \cup B \to \Bbb R$</span> given by <span class="math-container">$$f(x) = \begin{cases} x + 1 &amp; x &gt; 0, \\ x - 1 &amp; x &lt; 0. \end{cases}$$</span> It is clear that ...
Let<span class="math-container">$$A=\bigcup_{n\in\Bbb N,\ n\text{ odd}}\left(\frac1{n+1},\frac1n\right)\quad\text{and}\quad B=\bigcup_{n\in\Bbb N,\ n\text{ even}}\left(\frac1{n+1},\frac1n\right).$$</span>Define <span class="math-container">$f\colon A\cup B\longrightarrow\Bbb R$</span> with<span class="math-container">$...
https://math.stackexchange.com
136,543
[ "https://electronics.stackexchange.com/questions/136543", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9983/" ]
Would a 20-30cm microSD extension cord suffer any kind of noticeable transmission loss? This is a passive extender - literally, a microsd card with wires coming off of it, and a card slot at the other end. Simple ribbon cable connecting the two ends. <em>EDIT</em> I'm not making this - it's a store-bought thing. Here'...
I can't say with any certainty, but I think that for 20 to 30 cm it should work, as that length is just a small fraction of the wavelength of the data frequencies (around 10Mhz). But consider to use a ribbon cable with twice as many signals as you need (plus a couple of more) and connect every other wire to ground so t...
Transmission losses should be the least of your worries at those data rates. However you need to think about all those other things that may be much more likely problems: <ul> <li>Reflections. When you extend the length of the electrical path, you are more likely to get enough reflections that requires termination. W...
https://electronics.stackexchange.com
103,965
[ "https://datascience.stackexchange.com/questions/103965", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/98535/" ]
I want to use XGB regression. the dataframe is coneptually similar to this table: <pre><code> index feature 1 feature 2 feature 3 encoded_1 encoded_2 encoded_3 y 0 0.213 0.542 0.125 0 0 1 0.432 1 0.495 0.114 0.234 1 0 ...
It doesn't matter, it's just what the data is. I assume that you're thinking about issues related to &quot;imbalanced dataset&quot;, but this term refers only to imbalance in the values of the <em>target variable</em> (and it's more commonly used about classification, but technically it's relevant also in regression). ...
As Erwan said, the imbalanced dataset problem is about the target variables and not the features. But if your model favors a section of your regression target more, you can perform a study on the distribution of the target variable and then, depending on the distribution, perform a transformation (e.g. square root or e...
https://datascience.stackexchange.com
3,713,683
[ "https://math.stackexchange.com/questions/3713683", "https://math.stackexchange.com", "https://math.stackexchange.com/users/460196/" ]
This is a really elementary question for kids but I have difficulties at the moment to find my mistake. I stepped over the problem in my statistics course at which we use bayes theorem and it appears when I have to give the probability of a certain event: Say, I ask 100 people, 52 female and 48 male, what kind of sup...
Let's take other numbers: All <span class="math-container">$52$</span> females and all <span class="math-container">$48$</span> males said they wanted "flying". Your calculation would find that <span class="math-container">$$\frac{52}{52} + \frac{48}{48}=2 = 200\%$$</span> of the asked people wanted to fly. Your ma...
You forgot to multiply the probabilities with <span class="math-container">$\frac{48}{100}$</span> and <span class="math-container">$\frac{52}{100}$</span> respective depending on whether we have a male or female. If you do that, you get the correct result because you add P(male and fly) and P(female and fly)
https://math.stackexchange.com
64,295
[ "https://dba.stackexchange.com/questions/64295", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/33170/" ]
I am looking to deploy log shipping in my production environment. This will mean I will have to manage backup chains which could be disrupted by people taking backups to refresh development environments. If I have a failure and want to use the log backups to restore to a point in time I will also need the backup taken ...
You dont need to have them use <code>COPY_ONLY</code>. Only An intermediate <code>LOG BACKUPS</code> will break the <code>LSN</code>. What you can do is explicitly <code>DENY BACKUP LOG to [user|group]</code> privilege to developers or developer group. Alternatively, just create a ROLE and deny backup log to that role....
Good question that I can't find a good answer for, but here's one. What if you removed everyone from having the backup role and then created a task that used the execute as command for a specific user that drops the copy_only backup file out to a specific location?
https://dba.stackexchange.com
24,531
[ "https://cs.stackexchange.com/questions/24531", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/9631/" ]
There is something I don't understand. In the Subset Sum problem, in the Dynamic Programming solution, because of binary representation of the sum T, we say it is pseudo-polynomial in run time; we must sum in the worst case from 1 to T. So I don't understand why the Addition algorithm is not pseudo-polynomial, when...
The reason is that the runtime of addition is proportional to the number of digits, not the value of the numbers, as it is for subset sum. Remember that the number of digits is the size of the input.
The subset sum algorithm runs in time $\tilde{O}(S)$, where $S$ is the sum we're looking for. The input length is $n = \log S$, since it takes this many bits to encode $S$ in binary. Overall, the algorithm takes time $\tilde{O}(2^n)$, which is exponential. In contrast, you can add two $n$-bit numbers in $\tilde{O}(n)$...
https://cs.stackexchange.com
14,352
[ "https://engineering.stackexchange.com/questions/14352", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/10554/" ]
I have used the Equivalent Lateral Load Method from the IBC code to distribute forces and moments on each storey (level) but what I need to know is how to distribute the moment on each shear wall. This maybe a stupid question, but I'm just a student. Do I distribute the force &amp; moment on each storey to each shear ...
Your question seems like it is incomplete so it's difficult to provide a complete answer. For the moment computation, what you'll need to do is compute the centroid of rotational stiffness, which is determined by the relative stiffness of each shear wall in the X and Y directions. Then you'll compute the moment arm b...
When you said moment in your question, I got confused. You need to say how to distribute shear. You are not distributing any moment. You are distributing shear forces to shear walls, which would cause "torsional moment" or "torsion" with respect to the geometric center of the floor. Even if you were talking about momen...
https://engineering.stackexchange.com
612,124
[ "https://electronics.stackexchange.com/questions/612124", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/260806/" ]
This is more of a manufacturing question than anything else. What is the probability distribution of component tolerances? For example, let's say I ordered a 100 ohm, 5% resistor, and I order 100 parts. Are the odds of getting a 95 ohm resistor the same as getting a 100 ohm resistor (uniform distribution), or is it a n...
In ancient times, with carbon composition resistors, there was generally a reasonable spread of values - for &quot;precision&quot; circuits you might get instructions like &quot;pick through your 100 ohm resistors to find one of 95 ohm&quot; (at that time 10% resistors were common, and 20% might be available). Now, wit...
The problem is, nobody knows. Each manufacturer may work differently. You might ask a specific manufacturer about a specific series of resistors how they are binned, but why would they reveal that information, as you can buy existing parts with whatever precision you need and they can guarantee it. You might get a gaus...
https://electronics.stackexchange.com
3,229
[ "https://dba.stackexchange.com/questions/3229", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2063/" ]
I have a vendor database from I want to extract and transform certain information. As I dont want to change the structure of the original database due to licensing I therefor wondering if I can put together views from the vendor database but storing those in a second sql server 2008 database together with some other re...
Licensing shouldn't stop you adding views to your first database. Every place I've been in has custom objects for reporting etc that extend the functionality of the 3rd party product. Saying that, it is possible to have 3 part object names in views in your own database <pre><code>CREATE VIEW myview AS SELECT ... FRO...
Yes it possible, that's what three part naming is for. Use the form: [DatabaseName].[DatabaseOwner].[TableName] when referencing your vendor tables. ie: <pre><code>CREATE View [ViewName] AS SELECT * FROM [VendorDB].[dbo].[TableName] </code></pre> Regarding performance, there's no big performance impacts, if the tabl...
https://dba.stackexchange.com
269,648
[ "https://softwareengineering.stackexchange.com/questions/269648", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/154627/" ]
When programming in C (or C++) there are three different ways to specify the parameter in a function that takes an array. Here is an example (implementing <code>std::accumulate</code> from C++ in C) that shows you what I mean. I can write it like this: <pre><code>int accumulate(int n, int *array) { int i; in...
In practice, you'll see <pre><code>int accumulate( int n, int *array) </code></pre> most often. It's the most flexible (it can handle arrays of different sizes) and most closely reflects what's happening under the hood. You won't see <pre><code>int accumulate( int (*array)[N] ) </code></pre> as often, since it as...
In C, when the array notation is used for a function parameter, it is automatically transformed into a pointer declaration, so declaring parameter as <em>int* array</em> and <em>int array[]</em> are equivalent. I tend to use second one because it is more clear that function expects an array as an argument. Declaring f...
https://softwareengineering.stackexchange.com
168,943
[ "https://physics.stackexchange.com/questions/168943", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
I was reading about the equipartition theorem and I got the following quotations from my books: <blockquote> A diatomic molecule like oxygen can rotate about two different axes. But rotation about the axis down the length of the molecule doesn't count. - <strong>Daniel V. Schröder's</strong> Thermal Physics. A diatomic...
The energy levels of a diatomic molecule are $E = 2B, 6B, 12B$ and so on, where $B$ is: $$ B = \frac{\hbar^2}{2I} $$ Most of the mass of the molecule is in the nuclei, so when calculating the moment of inertia $I$ we can ignore the electrons and just use the nuclei. But the size of the nuclei is around $10^{-5}$ time...
Just an addition to John Rennie's answer. The equipartition theorem can only be derived in classical statistical physics. In quantum statistics it is not correct. For each degree of freedom there is a characteristic temperature below which the quantum effects are significant. This temperature is very high for rotation ...
https://physics.stackexchange.com
622,779
[ "https://physics.stackexchange.com/questions/622779", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/291831/" ]
As we know, the relationship between atomic weight and neutron energy loss can give the number of collision between a neutron and nucleus to slow down (average logarithmic energy decrement.) I was wondering if this can be a good factor of selecting materials for fast and thermal reactor. I have not found the any releva...
The diagram is correct. However, you may be misinterpreting it in terms of the equivalence principle. <blockquote> Also, why are the two reference frames presented there equivalent? </blockquote> You are correct. These two reference frames are NOT equivalent. The easiest way to see that they are not equivalent is to no...
In diagram (a), the arrow labeled <span class="math-container">$g$</span> should be attached to the ground and pointing up, because it's the ground that accelerates in this frame. In diagram (b) they draw the falling lab at two different times. To make (a) more closely analogous, it should have two drawings of the grou...
https://physics.stackexchange.com
6,810
[ "https://engineering.stackexchange.com/questions/6810", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/4390/" ]
I work in a lab, and I've been trying to replace a lost AC-DC power adapter. I got one recently that has the exact specs that I need, which are apparently pretty rare (15V, 400 mA). However, when I test the power adapter with a voltmeter, it's actually outputting ~22V, despite what it says on the plug. Now, when I pl...
What Russell said. In addition, the reason the LED lights but the device no longer appears to work may be because the LED is just wired to indicate power, and the rest of the device is now blown out due to the much higher than specified voltage you applied to it. Power LEDs are sometimes just a LED and resistor conne...
Modern power adapters tend to be electronically regulated and not vary much in output voltage with load changes. Older ones that used iron core transformers were often less stable in output voltage with Vout rising to a substantially higher than specified value on no load. If you are 'lucky' the camera load may have re...
https://engineering.stackexchange.com
37,211
[ "https://chemistry.stackexchange.com/questions/37211", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/20836/" ]
<blockquote> <span class="math-container">$\pu{0.1 mol}$</span> of sodium formate was added to one litre of <span class="math-container">$\pu{0.2 M}$</span> solution of formic acid (<span class="math-container">$K_\mathrm{a} = 1.8\times10^{-4}$</span>). How much will the <span class="math-container">$\ce{H+}$</span> co...
<span class="math-container">$$\ce{HCOONa + HCOOH&lt;=&gt; HCOONa + HCOOH}$$</span> The constant of this equilibrium equals <span class="math-container">$1$</span>. The composition of the mixture will not change. <span class="math-container">\begin{align} \mathrm{pH} &amp;= \mathrm{p}K_\mathrm{a} + \log\frac{\ce{[HC...
A rough calculation for the pH of 0.2-ᴍ formic acid gives: <span class="math-container">$$ \mathrm{pH} = 1/2 (\mathrm{p}K_\mathrm{a} - \log(0.2)) = 1/2 (3.74 + 0.70) = 2.22 $$</span> You can check by calculating the equilibrium constant from the concentrations of all the species, and the estimate is pretty good. The pH...
https://chemistry.stackexchange.com
3,549,969
[ "https://math.stackexchange.com/questions/3549969", "https://math.stackexchange.com", "https://math.stackexchange.com/users/751630/" ]
Let <span class="math-container">$f:\mathbb{R}\to\mathbb{R}$</span> be a continuous function. Suppose <span class="math-container">$$f(x)=\frac{1}{t}\int_0^t(f(x+y)-f(y))dy$$</span> for all <span class="math-container">$x\in\mathbb{R}$</span> and all <span class="math-container">$t&gt;0$</span>. Then show that there ex...
For <span class="math-container">$t&gt;0$</span> we have <span class="math-container">$tf(x)=\int_0^t(f(x+y)-f(y))dy.$</span> Differentiation with respect to <span class="math-container">$t$</span> gives: <span class="math-container">$$(*) \quad f(x)=f(x+t)-f(t)$$</span> for all <span class="math-container">$x \in \m...
We can write <span class="math-container">$f(x)=\frac 1 t \int_x^{x+t} f(y) dy-\frac 1 t \int_0^{t} f(y) dy$</span>. Since <span class="math-container">$f$</span> is continuous this equation shows that <span class="math-container">$f$</span> is differentiable. If <span class="math-container">$f(x)=c_1x$</span> for <spa...
https://math.stackexchange.com
435,686
[ "https://math.stackexchange.com/questions/435686", "https://math.stackexchange.com", "https://math.stackexchange.com/users/84082/" ]
Let $K = \mathbb{Q}(\sqrt{-d})$ be an imaginary quadratic field of class number one (i.e. every ideal in $\mathcal{O}_K$ is principal, i.e. $\mathcal{O}_K$ is a principal ideal domain). Let $d_K$ be the discriminant of $K$. <blockquote> How does one prove that all primes less than $\frac{1 + |d_K|}{4}$ are inert in ...
Let $p$ a prime. If ${\frak P}$ is a prime ideal of $O_K$ above $p$, then the assumption on the class number implies that ${\frak P}=\langle \alpha\rangle$ for some $\alpha\in O_K$. Let $\alpha=a+b\theta$, where $\theta$ is either $\sqrt{-d}$ or $(1+\sqrt{-d})/2$ depending. Show that if $\alpha$ is not a rational integ...
Well, according to Stark-Heegner, there are only 9 such fields, corresponding to the values of $-d$ $$−1, −2, −3, −7, −11, −19, −43, −67, −163.$$ Thus, the statement can be verified by a finite computation (left to the reader ;)).
https://math.stackexchange.com
2,531,203
[ "https://math.stackexchange.com/questions/2531203", "https://math.stackexchange.com", "https://math.stackexchange.com/users/445992/" ]
I want to calculate $$ \sum_{k = 1}^{p-1} k^n \,\,\,\,\,\text{(mod $p$)} $$ with the knowledge $n \not\equiv 0 $ (mod $p-1$), where $n \geq 1$ and $p$ is an odd prime.
Suppose $n$ does not divide $p-1$. Then the map $$x \mapsto x^n$$ from $\mathbb{F}_p^\times \to \mathbb{F}_p^\times$ is surjective, since $\mathbb{F}_p^\times$ is a cyclic group of order $p-1$. To see this, let $g$ be a generator of $\mathbb{F}_p^\times$. Then $g^n$ is still a generator of the group and is in the image...
$\mathbb{Z}/(p\mathbb{Z})^*$ is a cyclic group (it is the multiplicative part of a finite field), hence all the non-zero remainders $\!\!\pmod{p}$ can be represented as $g^r$ for $r\in[1,p-1]$, with $g$ being one of the $\varphi(p-1)$ generators of $\mathbb{Z}/(p\mathbb{Z})^*$. In particular, for any $n$ which is not a...
https://math.stackexchange.com
474,920
[ "https://math.stackexchange.com/questions/474920", "https://math.stackexchange.com", "https://math.stackexchange.com/users/91570/" ]
I'm new to this site. I have created a 6th order polynomial equation using MS Excel 2010 for fitting my data set which is given below: <pre><code>y = -50.388x6 + 2972x5 - 72980x4 + 955030x3 - 7E+06x2 + 3E+07x - 4E+07 </code></pre> I've tried to solve this equation using MATLAB for different values of x by converting ...
Your <em>first-order term</em> is $4\cdot 10^7 \, x$, given with only one significant digit. When $x$ is around $10$, this gives an uncertainty in the intended function value of about $10^8$, and the difference between $2.2$ and $30570069$ is well within this tolerance. And there's a similarly-sized uncertainty contri...
Here's some Matlab code that fits a polynomial to your data and checks that the results look reasonable. <pre><code>data = ... [8.55 0.4;... 9 0.46;... 9.05 1.46;... 9.1 2.07;... 9.15 1.65;... 9.2 1.35;... 9.25 1.4;... 9.3 1.43;... 9.35 1.4;... 9.4 2.1;... 9.5 2.2;... 9.55 2....
https://math.stackexchange.com
24,265
[ "https://mathoverflow.net/questions/24265", "https://mathoverflow.net", "https://mathoverflow.net/users/1243/" ]
Let $s_n = \sum_{i=1}^{n-1} i!$ and let $g_n = \gcd (s_n, n!)$. Then it is easy to see that $g_n$ divides $g_{n+1}$. The first few values of $g_n$, starting at $n=2$ are $1, 3, 3, 3, 9, 9, 9, 9, 9, 99$, where $g_{11}=99$. Then $g_n=99$ for $11\leq n\leq 100,000$. Note that if $n$ divides $s_n$, then $n$ divides $g_m...
This is so close to the Kurepa conjecture which asserts that $\gcd\left(\sum_{k=0}^{n-1}k!,n!\right)=2$ for all $n\geq 2$, which was settled in 2004 by D. Barsky and B. Benzaghou "Nombres de Bell et somme de factorielles". So what they proved is that $K(p)=1!+\cdots+(p-1)!\neq -1\pmod{p}$ for any odd prime $p$. This go...
An amusing (but perhaps useless) observation: the property $1! + \ldots + (p-1)! = 0 \hbox{ mod } p$ is also equivalent to the matrix product property $$\left( \begin{array}{ll} 1 &amp; 1 \\\ 0 &amp; 1 \end{array} \right) \begin{pmatrix} 2 &amp; 1 \\\ 0 &amp; 1 \end{pmatrix} \ldots \begin{pmatrix} p &amp; 1 \\\ 0 &amp...
https://mathoverflow.net