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
163,217
[ "https://physics.stackexchange.com/questions/163217", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/46227/" ]
Recently I had a question to find the electric field at a distance $R$ from the origin, where the space is filled with charge of density $\rho$. I did this by assuming a Gaussian surface of radius $R$. Now outside won't affect the field so I calculated the field as: $$\left|\,\vec E\,\right| = \frac{\rho R}{3\varepsil...
Gauss's law is always fine. It is one of the tenets of electromagnetism, as one of Maxwell's equations, and as far as we can tell they always agree with experiment. The problem you've uncovered is simply that "a uniform charge density of infinite extent" is not actually physically possible, and it turns out that (i) i...
Let's be really clear about the exact kind of mistake you are making. Consider the numbers $1,-1,1,-1,1,-1, \dots$. If you wanted to sum them you could argue that $1-1+1-1+1-1+\dots=(1-1)+(1-1)+(1-1)+\dots=0+0+0+\dots=0$. Your friend could argue that $$1-1+1-1+1-1+\dots=1+(-1+1)+(-1+1)++\dots=1+0+0+\dots=1.$$ The ...
https://physics.stackexchange.com
19,575
[ "https://datascience.stackexchange.com/questions/19575", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/33020/" ]
I have a data set given as follows: target shape <code>(200000, 1)</code> train_data.shape <code>(200000, 48)</code> test_data.shape<code>(100000, 48)</code> I had used the data to <code>predict_proba</code> using <code>RandomForestClassifier</code> <code>ExtraTreesClassifier</code> <code>RandomForestClassifier</code> ...
The problem occurs due to <code>DMatrix..num_col()</code> only returning the amount of non-zero columns in a sparse matrix. Hence, if both train &amp; test data have the same amount of non-zero columns, everything works fine. Otherwise, you end up with different feature names lists. There're currently three solutions t...
<pre><code>import numpy as np train_data = np.array(train_data) test_data = np.array(test_data) clf = XGBClassifier() clf.fit(train,y_train.ravel()) pred = clf.predict_proba(test_data) </code></pre> Use this instead of your original code.
https://datascience.stackexchange.com
332,185
[ "https://softwareengineering.stackexchange.com/questions/332185", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/207419/" ]
I am trying to decide the type of relationship (or association) there is between the following two classes: <pre><code>Class Stable { private const int MaxStableRooms; private Horses[] Horses; public Stable(int MaxStableRooms) { Horses = new Horse[MaxStableRooms]; for (int i = 0; i &lt; horsecount; i++) Horses[i] ...
To add to @RobertHarvey's good answer and @tofro's excellent observation in comment: <blockquote> If the Stable is destroyed, so the horses too. </blockquote> <strong><em>This snippet is unrealistic in a number of ways:</em></strong> Only because the <code>Horses</code> array is shown as being allocated once, mark...
Check your <strong>is-a</strong> and <strong>has-a</strong> relationships. "is-a" is inheritance. "has-a" is composition. So Horse "is a" animal is inheritance. Stable "has a" horse (or horses) is composition.
https://softwareengineering.stackexchange.com
26,037
[ "https://softwareengineering.stackexchange.com/questions/26037", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/4280/" ]
How can I say more than just "C++" on my resume, reports or other writings, to convey clearly what kind of C++ programming I've been doing? Are there well-defined styles of C++? ("Styles" might not be quite the right word.) Examples: using C++ as an "improved C" taking advantage of stronger typechecking, syntact...
I'd say that the domain might be more important than the coding style. The style is largely subject to convention in the target company anyway (by convention, I mean the lead architects perception of best practice ;)). So something like "C++ back-end development in a distributed high volume accounting system for a lar...
The purpose of a resume is to get you an interview. That means it has to have all the right buzzwords to get you past the HR, and just enough substance to get the technical manager interested in talking to you. The technical interview is where you should discuss your coding style and design philosophy.
https://softwareengineering.stackexchange.com
36,108
[ "https://softwareengineering.stackexchange.com/questions/36108", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13058/" ]
I work in a team with wide range of expertise and experience. I have been trying to introduce weekly knowledge sharing sessions. Sessions of 30-60 min length where everybody gets a chance to present something and talk about it. This will contribute in improving presentational and language skills. However, the team is ...
Here's a question: <blockquote> Are your project and feature deadlines <em>reasonable</em>? </blockquote> Just playing devil's advocate - If I were on your team, and I was worried about meeting deadlines for my current project load, then I too would be inclined to skip such superfluous knowledge sharing sessions....
Have you tried these yet: <ul> <li>Bribe with free food. This can sometimes work for getting people to show up which is a start.</li> <li>Prizes based on tests after the presentation. For example, have a 10 question multiple choice test from the presenter at the end to see who remembered what from the presentation.<...
https://softwareengineering.stackexchange.com
214,309
[ "https://physics.stackexchange.com/questions/214309", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/12691/" ]
Long time ago Wheeler proposed an idea that there is only one electron, some kind of a closed(?) four dimensional knot in spacetime, and in one particular time we slice this knot with a plane and observe it as many electrons at different places in space. In this picture a positron is just this same electron, but moving...
The differential versions of Maxwell's equations would tell you something about the fields <em>at a point</em>. For example, inside the circle, where $\partial \vec{B}/\partial t = p \hat{k}$, then Faraday's law $$ \nabla \times \vec{E} = - \frac{\partial \vec{B}}{\partial t},$$ tells you what the "curl" of the E-fiel...
As I understand it, your system does have a great deal of symmetry. I'm assuming the problem is cylindrical, <em>i.e.</em> the picture you have drawing is valid at all values of $z$, if we make the $z$ co-ordinate out of the page. So, I'm assuming your problem definition is $\vec{H}(t) = k\,t\, \hat{z};\forall\,t&gt;0;...
https://physics.stackexchange.com
136,557
[ "https://softwareengineering.stackexchange.com/questions/136557", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/44384/" ]
I'm learning Silverlight, and I know that if I master it, I can apply the same concepts to WPF, which means I can do either web or desktop development pretty easily. But I've read articles and followed the discussion online, and I understand HTML5 is gaining traction for being cross-platform, and a lot of people seem t...
Silverlight will be slightly more "secure" as you are serving compiled code to the client rather than source to be interpreted on the client, but the code is still executed on the client. Someone determined enough will be able to use reflection etc. to see inside your Silverlight XAP file if they so wish. However, yo...
Anything you want to protect needs to be kept on the server, end of story. This goes for any of the web technologies - HTML, Flash, Silverlight, etc. Anything downloaded to the client can be stolen easily.
https://softwareengineering.stackexchange.com
286,992
[ "https://dba.stackexchange.com/questions/286992", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/223477/" ]
I'm pretty basic with SQL and need help with the following task: I already have a table with data in it. What I would like to do is to Duplicate a Column (Including the data) in the same table but with a different column name. Is this possible? Any help would be greatly appreciated.
You can just add the new column to the table as nullable, either with <strong>SQL Server Management Studio</strong> by right clicking on the Table and clicking &quot;Design&quot; <strong>or</strong> by using an <code>ALTER TABLE</code> statement like this <code>ALTER TABLE TableName ADD NewColumnName DataType NULL</cod...
Depending on other requirements, you might be able to get away with using a computed column. This assumes you don't need to manipulate the data in the duplicated column. <pre><code>ALTER TABLE dbo.t ADD NewColumn AS OldColumn; </code></pre>
https://dba.stackexchange.com
405,468
[ "https://mathoverflow.net/questions/405468", "https://mathoverflow.net", "https://mathoverflow.net/users/128556/" ]
Belyi's theorem establishes a correspondence between smooth projective curves defined over number fields and the so called <em>dessins d'enfants</em> which are bipartite graphs embedded on an oriented surface so that each component of their complement is a topological disk. To be more precise, given a smooth projective...
If <span class="math-container">$X$</span> is a (smooth projective) curve over <span class="math-container">$\overline{\mathbb{Q}}$</span>, we define <blockquote> <blockquote> The Belyi degree <span class="math-container">$\deg_B(X)$</span> of <span class="math-container">$X$</span> to be the minimum degree of a Belyi ...
I think there is basically no hope of proving such a comparison (and it is probably not true, but my argument for this is less convincing). Such a comparison theorem would have two parts: (1) Proof that curves with a simple dessins have small Weil height. (2) Proof that curves with small Weil height have simple dessins...
https://mathoverflow.net
243,621
[ "https://math.stackexchange.com/questions/243621", "https://math.stackexchange.com", "https://math.stackexchange.com/users/44431/" ]
can we find a function $f(x)\not=0$,such that $$\int_1^{\infty}\left(1-\frac{1}{x}\right)f(x)dx=0$$ who can give an instance ? thanks
Let $g\in L^1([1,\infty))$ so that $$ \int_1^\infty g(x)\,\mathrm{d}x=0 $$ We can create such a $g$ by taking any $h_1,h_2\in L^1([1,\infty))$ and defining $$ g(x)=h_1(x)\int_1^\infty h_2(t)\,\mathrm{d}t-h_2(x)\int_1^\infty h_1(t)\,\mathrm{d}t $$ Now, define $f(x)=g(x-\log(x))$. Then, since $x-\log(x):[1,\infty)\mapst...
Consider any $g(x)$ such that $\displaystyle \int_1^{\infty} g(x) dx = 0 $ and take $f(x) = \dfrac{g(x)}{1-1/x}$. One such class of function for $g(x)$ is $$g(x) = \begin{cases} \alpha \dfrac{h(x)}{\displaystyle \int_1^a h(t) dt}; &amp; 1 \leq x \leq a\\ -\alpha \dfrac{k(x)}{\displaystyle \int_a^{\infty} k(t) dt}; &amp...
https://math.stackexchange.com
287,729
[ "https://mathoverflow.net/questions/287729", "https://mathoverflow.net", "https://mathoverflow.net/users/59235/" ]
A subgroup $H$ of an algebraic group $G$ is said to be Zariski-dense if its Zariski closure is all of $G$ (or alternatively, if every polynomial which vanishes on all elements of $H$ vanishes identically). <strong>My question:</strong> Is any irreducible subgroup of $SL(2,\mathbb{C})$ Zariski-dense? (It's easy to se...
To summarize the discussion. Let <span class="math-container">$G$</span> be a subgroup of <span class="math-container">$\mathrm{SL}_2(\mathbf{C})$</span>, <span class="math-container">$H$</span> its Zariski closure. <blockquote> <b>Proposition.</b> Equivalent statements: (i) <span class="math-container">$G$</span> acts...
I believe that a subgroup of $SL(2, C)$ (viewed as a complex algebraic group, it is different if it is viewed as a real group) is Zariski dense if and only if it is non-elementary, so in other words it has more than two limit points in $\overline{\mathbb{H}^3}$ One fixed point in the interior of $\mathbb{H}^3$ correspo...
https://mathoverflow.net
288,489
[ "https://physics.stackexchange.com/questions/288489", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/134016/" ]
I am doing two tasks of flipping card and lifting a load. I am collecting data for this two tasks for a week. I want to find the mean acceleration for each day. As it is 3-axis I thought it is good to take magnitude. I have a 3-axis accelerometer sensor. I have the 100 readings collected. I found the acceleration magn...
Indeed, it can be counterintuitive that adding a polarizing filter can increase the transmitted intensity, when each filter only 'removes' light. Here's a slightly more intuitive way of thinking about it. A filter doesn't strictly remove light -- what it really does is <em>add</em> a light wave which destructively int...
There are two effect on a beam of light from passing through a polarizing filter. <ul> <li>First the intensity is reduced as you write above. (For unpolarized light incident on a polarizer you average over all possible polarization and get $I = I_{up}/2$.)</li> <li>Second, the light that passes now has the polarizatio...
https://physics.stackexchange.com
266,802
[ "https://physics.stackexchange.com/questions/266802", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/118676/" ]
The equation for the gas flow rate (in pressure*volume/time units) $$ Q = {kA\over d} (p_1-p_2) $$ where $A$ is the surface area, $d$ the wall thickness, $p_{1,2}$ the pressures on either side of the wall, and $k$ is the permeation conductivity. How much pressure would I lose on one side of the wall? Because I get num...
Your question is short on details, so to answer your question I am assuming a particular configuration. Hope it helps with whatever your actual configuration is. A closed porous container consists of a gas at partial pressure $p_1$ which is less than partial pressure $p_2$ of that gas in the ambient. We shall assume ...
The equation you wrote is for steady state flow through a <em>porous</em> wall of thickness d. Q is the volumetric flow rate. Q/A is the so-called superficial velocity. The equation inherently assumes that the pressures on both sides of the wall are constant, and not varying with time. The only way that you would g...
https://physics.stackexchange.com
598,915
[ "https://physics.stackexchange.com/questions/598915", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
When we apply KVL in a circuit containing R and L elements connected to a battery, we write the voltage (or EMF?) across the inductor as EMF= L di/dt. But, according to Faradays law and Lenz law, we know that the EMF across the inductor is actually induced EMF that opposes the change in flux passing through the winding...
When you subtracted, What you did here was you found the separation between the thief and the policeman in the LHS, and in the RHS you found the relative speed between them, as you only subtracted the velocities since t is common. Thus it is the alternate method TKA suggested. When you add the equations we get 100=19t ...
I think I am understanding it a bit now. It is more of making the distances equal actually. I did 10t -9t = 100 -0 because let us say if we make a graph of police at origin and theif at 100m =x. 10 t - 9t is the distance.When we get this equal , means they are at same point. But we need another value because their is s...
https://physics.stackexchange.com
176,825
[ "https://softwareengineering.stackexchange.com/questions/176825", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/61276/" ]
Imagine you have such routines <pre><code>/*just do X. Fail if any precondition is not met*/ doX() /*take care of preconditions and then do X*/ takeCareOfPreconditionsCheckIfNeededAtAllAndThenDoX() </code></pre> A little bit more concrete example: <pre><code>/*create directory. Most probably fail with error if any...
There are many possible conventions - I often have to have routines that do something, and other routines that check things and then, eventually, either do it or not. I invariably call these <code>frobWidgets()</code> and <code>maybeFrobWidgets()</code>. There are other prefixes that would fit, e.g. <code>ensure</code>...
Usually function names should be longer when the functions' scope is shorter (ie. private methods) and shorter the name when the functions are public with a longer scope. In your case, I usually do something like this: createDir($path) and fail with ugly error; or tryCreatingDir($path) and catch the error and continu...
https://softwareengineering.stackexchange.com
109,523
[ "https://softwareengineering.stackexchange.com/questions/109523", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/3785/" ]
I know that Subversion (what we're using at work) can be configured to require comments on commits, however I'm not in a position of power to simply turn this on. I know that <em>my</em> reason for commenting my commits is because it is useful, if only as a memory-jogger, to quickly understand the reason behind the co...
Focus on "Why". Its all very well looking at the diffs and seeing that someone changed the logical flow of a section of code or something like that, but why did they change it? The why is usually in the associated ticket (JIRA for you). They may wonder why the "Why" is important but in 2 years time when you have caug...
Make them do the merges and deal with support. Again maybe you are not in a position to to do this, but if you find yourself being the one to troubleshoot a problem from a previous commit politely send it over the fence and say. I can't tell what you did because there are no commit comments, you made these changes yo...
https://softwareengineering.stackexchange.com
554,062
[ "https://physics.stackexchange.com/questions/554062", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/260346/" ]
This could be extremely trivial but I am having problems figuring it out. I think I understand properly the difference between waves and fields. A field is a function valued on space or spacetime which takes values that can be scalars, vectors, tensors and so on. While waves can be understood as a consequence of fie...
<strong>Mathematically,</strong> you can define <em>any</em> dynamic law you'd like on a field. A <em>dynamic law</em> is simply a map <span class="math-container">$\Phi^t(C)$</span> mapping a system configuration <span class="math-container">$C$</span> - no matter what it is, could be a field, position/velocity pair, ...
Fields are not, in general, solutions of a wave equation. They are solutions of the <strong>equations of motion</strong> derived from a particular Lagrangian density. The dynamics of a field are described by a <em>Lagrangian density</em> which is specified as part of the foundations of the field theory. For the free s...
https://physics.stackexchange.com
278,825
[ "https://physics.stackexchange.com/questions/278825", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/129536/" ]
If you have a potential difference between two plates (a capacitor) then you have and electric field between the plates. Is there also a perpendicular magnetic component to this electric field? I've never heard of this - but I thought electric and magnetic fields must always coexist in phase and orthogonal for every p...
Electric field gives a birth to magnetic field <strong>only</strong> when it changes in time. This is expressed in Maxwell's equations: $\nabla \times \vec{E} = - \frac{\partial \vec{B}}{\partial t}$ $\nabla \times \vec{B} = \frac{\partial \vec{E}}{\partial t} + const \cdot \vec{J}$ Static electric (magnetic) fields...
Magnetic fields are created by <em>changes</em> in the Electric Field. If the Voltage difference between the plates is constant, so is the electric field, so there will be no induced magnetic field. To answer your second question, the bottom plate doesn't need to "know" about the top plate. The potential difference is...
https://physics.stackexchange.com
85,002
[ "https://chemistry.stackexchange.com/questions/85002", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/33671/" ]
If I place a proton and an electron close to each other, can they form an atom of hydrogen? Why or why not? Please explain the scenarios where this is not likely/unlikely. Personally I doubt it, since the electron would have to spin around the proton to call it an atom. Can it be well-explained by classical mechanics...
Both in classical and quantum mechanics you have to get rid of a (rather large) amount of energy, i.e. the difference in potential energy from zero (=infinite distance) to the bound state (= e.g. Bohr radius), also called the binding energy. Nature has no way to do that without a third particle taking the excess energ...
If you put an electron and a proton together you get a hydrogen atom, assuming there's nothing else around it will stay a hydrogen atom. The positive proton and the negatively charged electron will attract each other to form a stable atom. However, classical mechanics would predict that the electron would collide with...
https://chemistry.stackexchange.com
10,349
[ "https://mathoverflow.net/questions/10349", "https://mathoverflow.net", "https://mathoverflow.net/users/622/" ]
Here's something that's been bothering me, and that's come up again for me recently while reading some stuff about Hilbert schemes of points (Nakajima's lectures, specifically): Let $C$ be an algebraic curve. Define $S^nC$ to be $C\times\ldots\times C/S_n$, the symmetric power. Now, over $\mathbb{C}$, I can show tha...
Just convince yourself that if $(C,P_1,\dots,P_n)$ and $(D,Q_1,\dots,D_n)$ are analytically isomorphic -- $C$ at the point $P_i$, $D$ at the point $Q_i$ -- then $Sym^n C$ at the point $(P_1,\dots,P_n)$ is analytically isomorphic to $Sym^n D$ at the point $(Q_1,\dots,Q_n)$. For this, you need to see that completion comm...
I also wanted to mention a `high-technology' answer to (1). Namely, if $C$ is a smooth algebraic curve, its $n$-th symmetric power coincides with the variety of all degree $n$ effective divisors on $C$ (that is, we consider $n$-element subsets of $C$, and then allow points to merge). In a fancier language, we are looki...
https://mathoverflow.net
105,609
[ "https://physics.stackexchange.com/questions/105609", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/40999/" ]
India is about 8.5 hours ahead of US. If some person starts from India at 9 pm(according to his wrist watch) and reaches US in 2 hours(just assume),at that time his wrist watch will b showing 11 pm but as he his in US so he will have to match his watch according to US time so he will adjust his watch to 4:30 pm.This me...
Time Travel does not mean going from one time zone to another. You did not get those 6.5 hours back again, they just appear to be back to you because you entered a different time zone. I think this definition of Time Travel by David Lewis’ is perfect and will explain why you are wrong: <strong>An object time travels...
In an inertial frame , the clocks at different points of space are synchronized. This synchronization issue is important. Once you synchronize Indian time with the American one, there is no paradox. So it is not a time travel. Anyways , the question was interesting.
https://physics.stackexchange.com
515,885
[ "https://electronics.stackexchange.com/questions/515885", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/260579/" ]
I'm considering building my own power strip for multiple different reasons. I've been trying to research these, but haven't found much information. I obviously know what makes up a power strip, but I'm wondering if the copper(?) rails within the strip housing are something you can buy premade and then build the housing...
No, you can't make outlets from scratch like that. You must use UL-approved outlets from the hardware store; otherwise, your insurance company could deny your claim when your house burns down.
Generally those rails are called &quot;sections of house wiring with the insulation stripped off&quot;. And yes, what Dave said about DIY and UL -- but I still use the power strip I made for myself in the electronics prototyping shop at Worcester Polytechnic Institute 30 years ago.
https://electronics.stackexchange.com
368,294
[ "https://physics.stackexchange.com/questions/368294", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/155995/" ]
[Bit a long question] Here in this question, I need to know clear my doubts on Gravity, more precisely <strong>Work done by a Conservative Force(here, gravitational force)</strong>. Ok, suppose there is an object lying. Neglect any damping force like friction, etc.<br> Now, suppose a force(it could be <em>consevative...
Lets place the stationary mass $M$ a the origin. In both cases the gravitational force is <strong>towards the origin</strong>, and is given by $$\vec{F}_{g}=-\frac{GMm}{r^{2}}\hat{r}$$ Thus in the first case, the work done by the gravitational force is $$W_{r\rightarrow\infty}=\int_{r}^{\infty}\vec{F}_{g}\cdot\vec{dr}...
In the second case at first you did scalar multiplication and got the <strong>sign</strong>. Now all becomes magnitude and no additional signs are allowed from integration. You might say &quot;why?&quot; Remember the definition of scalar multiplication. <span class="math-container">${\vec A }{\cdot}{\vec B}={ABcos\thet...
https://physics.stackexchange.com
6,111
[ "https://mathoverflow.net/questions/6111", "https://mathoverflow.net", "https://mathoverflow.net/users/1095/" ]
Does anyone know of a global proof (involving no local argument) of Serre duality at the level of varieties or manifolds (as opposed to schemes).
You might like the proof in section 5.3 of Voisin's book <em>Hodge theory and complex algebraic geometry</em>.
Have you looked at the one in Griffiths and Harris? That's at least rather different from the general nonsense one in Hartshorne.
https://mathoverflow.net
75,157
[ "https://physics.stackexchange.com/questions/75157", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/23517/" ]
I am looking for an appropriate derivation of the $(\frac{d}{dt})_{\text{laboratory}} = (\frac{d}{dt})_{\text{rotating}} + \omega \times $ relationship that enables one to calculate all desired quantities in a rotating referece frame. Does anybody know a good way how to understand this transformation?
The components of any vector function can be written any any desired basis. In particular, let \begin{align} \mathbf A_L(t) = (A^1_L(t) , A^2_L(t), A^3_L(t)) \end{align} denote the components of a vector function as written in an orthonormal basis fixed in the laboratory, and let \begin{align} \mathbf A_R(t) = (A^...
I'll consider two-dimensional reference frames, and i will use galilean transformation, adapted to your particular problem. Here is how i imagine this: <img src="https://i.stack.imgur.com/JC31y.png" alt="enter image description here"> Here, $\vec{r}$ is the position vector of a point, as seen from the laboratory fram...
https://physics.stackexchange.com
8,960
[ "https://robotics.stackexchange.com/questions/8960", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/9972/" ]
What are strategies used when trajectories, which are applied to a robotic joint, are interrupted? Say a robotic arm hits an obstacle, the controller just keeps applying the trajectory. Then at the end, the error gets so large, the torque can get quite strong and damage the robot or snap.
If you have no possibility to detect the obstacle apriori (e.g. with cameras, vicinity sensors...) If you already hit an obstacle and your position error increases, you can only detect the problem by the increasing position error or indirect by the increasing motor current. <br> Most of the motion controllers, I have s...
In 1981 Raibert and Craig wrote a paper <em>Hybrid Position/Force Control of Manipulators</em> which was published in the June 1981 issue of <em>Journal of Dynamic Systems, Measurement, and Control.</em> It was republished in Brady's book <em>Robot Motion: Planning and Control.</em> You can find many similar concept...
https://robotics.stackexchange.com
108,640
[ "https://stats.stackexchange.com/questions/108640", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/41307/" ]
If I want to investigate how two continuous variables are linked, what is the difference between calculating the <em>correlation</em> coefficient (Pearson's $r$) versus calculating the (simple linear) <em>regression</em> coefficient? I see people who, if the regression coefficient is significantly different from zero,...
OLS regression tells you more than the (linear) correlation coefficient. Also, the latter is <em>one</em> of the things you get from the former. Here's what you get with OLS: <ol> <li>A characterization of a <em>linear trend</em> describing how <em>Y</em> relates to <em>X</em>. This trend includes: 1a. The <em>slope<...
To focus one just one aspect of the question (@Alexis answer analyzes well the greater picture), the sample correlation coefficient between $Y$ and $X$ is $$r = \frac { \operatorname{\hat Cov}(Y,X)}{\hat \sigma_y\hat \sigma_x}$$ while in a simple regression $Y = \beta_0 + \beta_1X+ u$, the OLS estimator for the slope...
https://stats.stackexchange.com
52,216
[ "https://electronics.stackexchange.com/questions/52216", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10461/" ]
Out of most of the electronics I use, I have two, both of them speakers, that use a power adapter that simply steps down the voltage without rectifying it. Why did the designers choose to put the rectification circuitry in the speaker instead of the power adapter?
One reason is that you usually need positive and negative voltage for audio amplifier. (Like +5, 0, -5 V). Another reason: Some devices run directly on AC, e.g. Christmas light bulbs can do. Yet another reason: Some devices need two different voltages, like 5 V and 12 V. Yet another reason: An external step down tra...
There could be any number of reasons it was done the way it was, and only the designers have those answers. Some possible scenarios: A suitable transformer may not fit inside the device's enclosure. In testing, the magnetic fields from the transformer may have caused unacceptable audible artifacts. The transformer w...
https://electronics.stackexchange.com
1,622,026
[ "https://math.stackexchange.com/questions/1622026", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307017/" ]
When evaluating $f(x)=\left(\dfrac{e^x-1-x}{x^2}\right)$, we observe large relative error as $x \rightarrow 0$. Find a method to evaluate $f(x)$ to full machine precision for all $|x|&lt;1$.
It is not true: consider the sequence $$\langle x_2,x_1,x_4,x_3,x_6,x_5,\ldots\rangle\;,$$ formed by reversing the order of each pair $x_{2n}$ and $x_{2n-1}$. No matter where you start, no tail of this is a subsequence of the original sequence. <strong>Added:</strong> The most that you can guarantee is that your sub...
Not, it doesn't. Remember that $\{y_n\}$ is a subsequence of a sequence $\{x_n\}$ if there is an injective function $f:\mathbb{N}\to\mathbb{N}$ such that $y_n=x_{f(n)}$. Thus, if take, say, $f(n)=1$, then $f$ is not injective, but $y_n=x_{f(n)}=x_1$ for all $n$ satisfies your hypothesis and isn't a subsequence of $\{x...
https://math.stackexchange.com
107,662
[ "https://stats.stackexchange.com/questions/107662", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/39871/" ]
I wrote a Naive Bayes Classifier and want to be able to test how much information one variable gives about another. The idea is to use the ones that are the most orthogonal and avoid using highly redundant variables. My idea was to use the mutual information, but have found that it is not as clear cut as I first thou...
Relative entropy (or Kullback-Leibler divergence ) is the appropriate quantity to measure how much one variable tells about another one. Relative entropy is, unlike the mutual information, unsymmetrical. That means, it is possible that knowing a variable A tells everything about another variable B, even knowing B does ...
Yes, you can use mutual information to determine how much one variable tells you about another – as a matter of fact, that's the exact purpose of mutual information. The reason for the different results in the two examples is that in the second example you have more possible values for each variable, which means there...
https://stats.stackexchange.com
426,442
[ "https://softwareengineering.stackexchange.com/questions/426442", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/282688/" ]
Let's say I want to make a class for a car. A car has an engine, transmission, steering, radio, ... Each of these parts have its own internal state, so in C++ it makes sense to use composition like this: <pre><code>class Car { public: Engine engine; Transmission transmission; Steering steering; Radio radio;...
<strong>tl;dr</strong> <blockquote> How can composed sub-objects access the parent object? </blockquote> They don't need to, either in your example problem, or in your motivating problem. <hr /> You seem to have chosen an example which is a poor illustration of your real problem, and then fixated on a poor approach to ...
If the copy and move constructors bother you, you could insist on cars being non-copyable (I don't know whether that's possible in C++) so a new car must always be constructed from scratch, just like in the real world. A somewhat more elegant solution is to pass down references to the containing object and possibly oth...
https://softwareengineering.stackexchange.com
55,378
[ "https://dsp.stackexchange.com/questions/55378", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/37634/" ]
I know that if <span class="math-container">$f_\mathrm{m}$</span> is the <em>"Nyquist frequency"</em> (max frequency) and <span class="math-container">$f_\mathrm{s}$</span> sampling rate then <span class="math-container">$f_\mathrm{s}&gt;2f_\mathrm{m}$</span>. <ul> <li>Am I correct so far?</li> </ul> I have a signa...
Since nobody answered my I will answer using what I read on the internet, "Nyquist frequency" is the max frequency we can get using given sampling rate. the <span class="math-container">$f_s$</span> of convolution between 2 function is indeed the min of their max frequency, but I'm not sure yet about the part which sta...
I'll give it a try. <blockquote> I know that if fm is the "Nyquist frequency" (max frequency) and fs sampling rate then fs>2fm. Am I correct so far? </blockquote> No. The Nyquist frequency is simply defined as half the same rate. If your sample rate is 48kHz, your Nyquist frequency is 24kHz no matter what ...
https://dsp.stackexchange.com
203,641
[ "https://physics.stackexchange.com/questions/203641", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
I have a modification to ${\rm MOND}$ that appears to work much better than 'Standard' ${\rm MOND}$ at the galactic scale. I want to test this model now on larger structures. Does anyone know where I can find kinematic data on galaxy clusters, preferably some 'gold' standard that people have been examining for years....
You can't "simply" calculate the average velocity from the velocity at the end points, unless the velocity graph is a straight line. Which it is between 2 and 3. But not between 0 and 3. So the approach you can take is this: What is the distance after 2 seconds of moving at 4 m/s? And what is the average velocity b...
The final position will be the initial position plus the area under the velocity versus time graph. That is the area between y =0 and the velocity function. I'm assuming you're not familiar with integral calculus, but if you look at the dimensions you arrive at by calculating this area you will find that it is meters. ...
https://physics.stackexchange.com
27,307
[ "https://dba.stackexchange.com/questions/27307", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/14632/" ]
I have two tables, a Project and an Action: Project has the following fields: <pre><code>project_name </code></pre> Action has the following fields: <pre><code>action_name project status </code></pre> There is a one-to-many relationship between Action and Project. I need a query that returns all the Projects that...
Your solution seems correct. Here's another way that may be more efficient as it doesn't do a grouping. It can't show the <code>MIN(status)</code> though: <pre><code>SELECT "id", "name" FROM "testapp_project" AS p WHERE NOT EXISTS ( SELECT * FROM "testapp_action" AS a WHERE p....
<pre><code>SELECT "testapp_project"."id", "testapp_project"."name", MIN("testapp_action"."status") AS "m" FROM "testapp_project" LEFT OUTER JOIN "testapp_action" ON ("testapp_project"."id" = "testapp_action"."project_id") GROUP BY "testapp_project"."id", "testapp_project"."name" HAV...
https://dba.stackexchange.com
43,743
[ "https://mathoverflow.net/questions/43743", "https://mathoverflow.net", "https://mathoverflow.net/users/26801/" ]
An alternative title is: When can I homotope a continuous map to a smooth immersion? I have a simple topology problem but it's outside my area of expertise and I worry may be rather subtle. Any help would be appreciated. The set-up is the following: Let $M$ be some (closed say) $n$ dimensional manifold and suppose ...
There is a general strategy for these kind of problems, which sometimes helps (the ''h-principle''): separate the homotopical and smooth aspects of the problem. Setup: $f:N \to M$ a map of smooth manifolds, $dim (N) &lt; dim (M)$, $f|_{\partial N}$ is an immersion. Step 1: if your $f$ is going to be homotopic to an i...
Reading between the lines, I suppose you have oriented manifolds $\Sigma_i$, so that each of them determines an element of the integral homology group $H_k(M)$. In fact the assumption that these two classes are equal does not even imply that there is a compact oriented $(k+1)$-manifold $\Gamma$ with boundary such that ...
https://mathoverflow.net
33,476
[ "https://cs.stackexchange.com/questions/33476", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/18089/" ]
I'm learning Dynamic Programming (By myself) and in the textbook there is this question: <blockquote> Given two undirected graphs <span class="math-container">$G_1=(V,E_1)$</span> and <span class="math-container">$G_2=(V,E_2)$</span> over the same set of Vertices <span class="math-container">$V$</span> and a weight fun...
Hint: Try to modify the Floyd–Warshall algorithm to account for edge types. As described in Wikipedia, we construct an array $A[i,j,k]$ which keeps the weight of the shortest path from $i$ to $j$ via the vertices $1,\ldots,k$. Instead, construct an array $A[i,j,k,x,y]$ which keeps the weight of the shortest path from $...
May be it helps you to see more easily the way to attack the problem. The first that you could try it's find or understand the recursive relation behind <em>Floyd-Warshall Algorithm</em>. As the next function $f$. $$ f(u,v,k) = \begin{cases} w_{u,v} &amp; k = 0\\ \min\, (\ f(u,v, k-1),\ f(u,k,k-1) + f(k,v,k-1)) &amp;...
https://cs.stackexchange.com
10,319
[ "https://cstheory.stackexchange.com/questions/10319", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/8494/" ]
In the lambda calculus, are there commonly accepted names for $x$ and $M$ when they appear in $\lambda x [M]$ ? Something along the lines of "binder" and "bindee"?
$x$ is a "bound variable" and $M$ is the "scope" in which it is bound.
In logic the $\phi$ in $\forall x . \phi$ is called <em>the matrix</em>, and $x$ the <em>bound variable</em> and $\forall x$ the <em>quantifier</em>. By this analogy I would call $M$ in $\lambda x . M$ the matrix, $x$ is the bound variable, and $\lambda x$ is the abstraction, or maybe the "abstractor"?
https://cstheory.stackexchange.com
21,607
[ "https://physics.stackexchange.com/questions/21607", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7896/" ]
The Hamiltonian of a non-relativistic charged particle in a magnetic field is $$\hat{H}~=~\frac{1}{2m} \left[\frac{\hbar}{i}\vec\nabla - \frac{q}{c}\vec A\right]^2$$. Under a gauge transformation of the magnetic potential: $$\vec A ~\rightarrow~ \vec A + \vec\nabla \chi,$$ the wavefunction of the particle transfor...
$\chi$ is a real-valued function. This is part of the definition of the gauge transformation, since $U(1)$ is a one (real) dimensional group. In general, when talking about gauge transformations in particle physics, group parameters are restricted to be real by convention. In principle, I suppose you could perform a t...
$\chi$ can be any reasonable function, real-valued, imaginary-valued, whatever. No variable change can change physics although new wave function and its new equation may be different from the old ones ;-)
https://physics.stackexchange.com
181,976
[ "https://security.stackexchange.com/questions/181976", "https://security.stackexchange.com", "https://security.stackexchange.com/users/101474/" ]
How do I express non-compliance to ISO 27002 chapter 5 as a risk? The basic principle of an ISMS according to ISO 27001 is a risk-based approach. Following this, every control of Annex A (ISO 27002) needs to be evaluated and included or (with reason) excluded in the SOA statement. For the practical controls, that is ...
This question has two type of answers. One, that directly addresses it. The second, questions the question itself. Let's discuss them one by one. To answer your question, organizational risks to its information will need systematic approach that cannot be done in an ad-hoc manner. They need to be thought through and ...
As an optimist I would say: you are looking at this half-right. You are right about the fact, that not having a security policy creates risks. You are not right about that this does not include business risks. ISO/IEC 27000 itself says under chapter 3.6: <blockquote> A large number of factors are critical to the succes...
https://security.stackexchange.com
9,407
[ "https://physics.stackexchange.com/questions/9407", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/3097/" ]
Why do bar magnets have the least attraction in its center?
Their field lines look like this: <img src="https://i.stack.imgur.com/bTeXS.jpg" alt="enter image description here"> You see that the field lines near the center are parallel to the length of the bar. Moreover, the density of the field lines on the picture is maximized at the "poles" of the bar magnet and minimized a...
as the middle the magnetic lines are far away from one another and at the poles are close to each other that is why at the center the magnetic force is less than the poles.
https://physics.stackexchange.com
32,834
[ "https://security.stackexchange.com/questions/32834", "https://security.stackexchange.com", "https://security.stackexchange.com/users/15194/" ]
Just reading I learned about the TPM technology and how it works. However, it make me wonder... if the motherboard crashes, is the data lost forever? Because you can't use the drive in other system due to the unique RSA key used by the TPM.
Many TPMs will allow a backup to be stored of the key either prior to loading it on to the TPM or via some kind of export. As long as you have the key, you can reload it on a new TPM if the TPM fries. I actually had this exact thing happen with an IBM ThinkPad with an early TPM where the TPM circuit fried and I had...
<blockquote> However, it make me wonder... if the motherboard crashes, is the data lost forever? </blockquote> That depends, primarily on whether the TPM is the only storage unit for the key. TPM units contain a <code>SEAL</code> command, <code>TPM_SEAL</code>, which can be used to verify the state of the system mat...
https://security.stackexchange.com
747,095
[ "https://physics.stackexchange.com/questions/747095", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/336082/" ]
I saw this question from a book: An empty sled is sliding on frictionless ice when Susan drops vertically from a tree down onto the sled. When she lands, does the sled speed up, slow down, or keep the same speed? The speed will decrease because of the added mass of the system, according to the conservation of momentum....
Susan won't immediately acquire the sled's velocity. There will need to be a horizontal frictional force between the sled and Susan's backside after she lands on the seat in order to accelerate her to the speed of the sled. An equal and opposite force will decelerate the sled. Since this won't happen instantly, if the ...
Newton's second law for a system tells that the net external force is equal to the mass of the system times the acceleration of the cenetr of mass. For the case described in the OP the horizontal force is zero and this means that the horizontal component of the velocity of the center of mass does not change. The horizo...
https://physics.stackexchange.com
700,835
[ "https://physics.stackexchange.com/questions/700835", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/330928/" ]
Say a mass <span class="math-container">$m$</span> is attached to a massless string that is attached to the ceiling. The mass is pulled 30 degrees to the left of the vertical and then let go. At the lowest point of its swing it has kinetic energy but no potential, but at the lowest point velocity = 0 like at the highes...
At the bottom of the swing the vertical component of the velocity is (ideally) zero, but there is definitely a horizontal non-zero component to the velocity. In other words, at that point it is swinging from <em>right to left</em> or from <em>left to right.</em>
In polar coordinates, <span class="math-container">$$\mathbf v=\frac{\text dr}{\text dt}\hat r+r\frac{\text d\theta}{\text dt}\hat\theta$$</span> Throughout the entire motion of the pendulum, <span class="math-container">$\text dr/\text dt=0$</span>, so we have in this case <span class="math-container">$$\mathbf v=r\fr...
https://physics.stackexchange.com
89,796
[ "https://stats.stackexchange.com/questions/89796", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/37461/" ]
I want to generate correlated random variables with a given correlation matrix, means, and variances. Does the Cholesky decomposition only work when the initial random variables are iids with the same mean and variance?
Let Z be uncorrelated random variables normally distributed with mean 0 and variance 1. This means $$Z\sim N\left(0,I\right)$$ If you make an affine transformation $$X\equiv A+BZ$$ then $X$ has a distribution $$X\sim N\left(A,BB'\right)$$ In our case, we want $BB'=\Sigma$, so applying the cholesky decomposition to $\Si...
Additionnal items: We need to decompose the convariance matrix Σ into orthogonal matrix product as mentionned above. There are different ways to get the orthogonal matrix B, Cholesky is one of them. We can also use SVD (Singular Value Decomposition) to get B, equivalent to calculate the eigenvalues/vectors for PDM. ...
https://stats.stackexchange.com
3,255,346
[ "https://math.stackexchange.com/questions/3255346", "https://math.stackexchange.com", "https://math.stackexchange.com/users/680636/" ]
Assuming that <span class="math-container">$A$</span> is a real symmetric matrix and <span class="math-container">$(\forall x: \ x^tAx=0)$</span>, is it possible to prove that <span class="math-container">$A$</span> is the zero matrix? I am trying to prove example 2.15 from the Book "Convex Optimization" by Stephen Bo...
first let <span class="math-container">$x=e_i,$</span> the column vector with all zeroes except a single <span class="math-container">$1$</span> at position <span class="math-container">$i.$</span> Multiply it out, it tells you something very specific. Then, for each pair <span class="math-container">$i \neq j,$</span...
I'll offer an alternative answer: since <span class="math-container">$A$</span> is real and symmetric, we know that it can be diagonalized, and in fact can be diagonalized by a matrix <span class="math-container">$S = [ \vec{u}_1 \text{ } \vec{u}_2 \cdots \vec{u}_n]$</span> where the <span class="math-container">$u_...
https://math.stackexchange.com
436,849
[ "https://electronics.stackexchange.com/questions/436849", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/216993/" ]
<strong>Question</strong>: Is there an algorithmic way to produce a digital logic circuit for an n-bit majority function? (hopefully reasonably efficient as well). <strong>Motivation</strong>: Half adders can be put together to make full adders, which in turn can easily be put together to make an n-bit adder. This is ...
<blockquote> worried about the power draw on the drone battery and whether it will significantly effect flight time (7 min fully charged). </blockquote> Assuming the battery has 600mAh usable capacity and is 90% drained in 7 minutes, the average current draw should be 0.6*(60/7)*0.9 = ~4.6 Amps. At 100mV rf output...
Things do exist that allow us to step up voltage when we need to. That transmitter contains a boost converter that can step up voltage to 5V. It's a lot simpler to step down voltage so we go that route if we can, but in some cases it doesn't make sense to do so. This scenario is one of them because the motors are muc...
https://electronics.stackexchange.com
58,503
[ "https://quant.stackexchange.com/questions/58503", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/48290/" ]
Implied volatility is supposed to show volatility of the underlying over next k days where k - maturity of the option. Say our stock price is <span class="math-container">$S_t$</span> and percentage return is <span class="math-container">$r_t$</span>. Then which empirical estimate below should be used to compare with i...
For option pricing in the classical Black-Scholes model, you assume the underlying stock follows Geometric Brownian Motion: <span class="math-container">$$S_t = S_0 + \int_{h=0}^{h=t} S_h \mu dh + \int_{h=0}^{h=t} S_h \sigma dW_h = S_0 \exp \left( \mu t + 0.5 \sigma^2 t + \sigma W(t) \right)$$</span> Take the log of th...
<em>&quot;I believe 1st shows k days volatility, since it will be equal to 0 if spot came back to the same value . However, what does 2nd (total variance) actually represent in this case ?&quot;</em> Your first formula is simply absolute % change over k-days. This is sometimes used to compare against the breakeven on a...
https://quant.stackexchange.com
242,188
[ "https://physics.stackexchange.com/questions/242188", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/81224/" ]
When a streamlined flow of water flows down through an ordinary tap, it's cross-sectional area decreases according to eq. of continuity due to atmospheric pressure. If the same apparatus were to be arranged in a vacuum, would the cross-sectional area of the flow decrease? And if yes, which force pushes it inwards?
It would be difficult to begin with to set up such an apparatus to produce a stream of water because for a flow of water from a nozzle there would need to be a pressure difference. As such the water would instantly vaporize once exposed to the vaccuum. So technically, the cross-sectional area of a stream of water would...
Equation of continuity is basically mass conservation. It can write more simply in case of incompressibility, but it can still be written with varying densities. BTW interstellar medium and nebula can be considered as fluids, at the appropriate scale of time and space.
https://physics.stackexchange.com
74,126
[ "https://security.stackexchange.com/questions/74126", "https://security.stackexchange.com", "https://security.stackexchange.com/users/15577/" ]
Best practices would dictate that domain admins should not be logged into as such for daily tasks. Ideally the user would have two accounts; Their "daily" account and their domain admin account. <strong>How can one assure (through a technical control) that Bob doesn't use the same password for his domain admin accoun...
Forcing unique passwords for both domain admin and Daily account would simply do people so they use like "MyP@ssw0rd1" for their Daily and "MyP@ssw0rd2" for domain admin. That would do the passwords easly guessable anyways, knowing the Daily password would make it easier for an attacker to deduce the domain password o...
I am assuming we are discussing Windows Active Directory within a domain. As far as I know, I do not believe it is possible to enforce unique passwords between two separate accounts related to the same end-user using standard methods of password implementation. You CAN, however, use a third-party software to manage a...
https://security.stackexchange.com
121,715
[ "https://mathoverflow.net/questions/121715", "https://mathoverflow.net", "https://mathoverflow.net/users/18871/" ]
Let $G_1$ and $G_2$ be connected reductive algebraic groups defined over $\mathbb{C}$ and let $V_1$ and $V_2$ be irreducible representations of $G_1$ and $G_2$ respectively. I'm interested in general techniques for computing the (generators of the) invariant polynomial functions on the representation $V_1 \otimes V_2$ ...
There is a fruitful way of thinking about the algebra $\mathbb{C}[M_{n,m}]^{{O_n}\times O_m}$ that originates from the $(GL_n, GL_m)$-duality. Namely, <blockquote> $$ \mathbb{C}[M_{n,m}]=\bigoplus_{\lambda}V_n^{\lambda}\otimes V_m^{\lambda}, $$ </blockquote> where the sum is over all partitions $\lambda$ with at m...
It is best to think of these invariants in terms of pictures but it is hard for me to draw one here. You are asking about invariant polynomials in variables $X_{a,b}$ with $1\le a\le n$ and $1\le b\le m$. The invariants are all complete contractions of $X$'s with the following four pieces: $\delta_{a,a'}$ the $n\times ...
https://mathoverflow.net
158,115
[ "https://electronics.stackexchange.com/questions/158115", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/15734/" ]
We know Ohm`s law: $$\Omega = \frac{V}{I}$$ $$W=\frac{A}{t} \space\space\space\space\space\space V = \frac{A}{q} \space\space\space\space\space\space I = \frac{q}{t} \space\space\space =&gt;\space\space\space W= VI$$ $$\Omega = \frac{W}{I^2}=\frac{V^2}{W} \space\space\space\space\space\space Right!$$ Lets say I h...
Resistors in parallel dissipate proportional amounts of the total power from each depending on the proportion of the current that is flowing through them. Two equal resistors in parallel will share the current equally. Ergo, they will dissipate half the total power each. So yes, two equal resistors of twice the valu...
I'm having a hard time understanding your notation. R is usually resistance. Stick to that. R = V/I Anyways, if you have a 0.5W resistor then the equivalent of that same resistor is two 0.25W resistors in parallel. However, because the resistance is in parallel, that means you need to increase the value of each resi...
https://electronics.stackexchange.com
1,631,417
[ "https://math.stackexchange.com/questions/1631417", "https://math.stackexchange.com", "https://math.stackexchange.com/users/273575/" ]
I'm trying to calculate this integral:: $$\int\frac{u+5}{u^2+9}du$$ which is a part of: $$\int\frac{e^x}{(e^x-5)(e^{2x}+9)}dx$$ The part I posted is the only one giving me a wrong answer. I am using trigonometric substitution, but I can't see the error I've made so I'd like someone to point out what's wrong with my...
Hint: Split this into two integrals.<br> $$\int\frac u{u^2+9}du+5\int\frac{du}{u^2+9}$$ The first doesn't require trig substitution, just $u$-substitution. Use trig substitution on the second one.
<span class="math-container">$$\int\frac{u+5}{u^{2}+9}du\\ u=3v\Rightarrow du=3dv\\ \int\frac{u+5}{u^{2}+9}du=\int\frac{3v+5}{9v^{2}+9}3dv=\frac{1}{2}\int\frac{2vdv}{v^{2}+1}+\frac{15}{9}\int\frac{dv}{v^{2}+1}\\ \int\frac{u+5}{u^{2}+9}du=\frac{1}{2}\ln(\frac{u^{2}}{9}+1)+\frac{5}{3}\arctan(\frac{u}{9})+c$$</span>
https://math.stackexchange.com
223,376
[ "https://electronics.stackexchange.com/questions/223376", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/23782/" ]
In AVR Tutorials I often see: <pre><code>DDRA |= (1 &lt;&lt; PA0); PORTA |= (1 &lt;&lt; PA0); </code></pre> used instead of: <pre><code>DDRA |= PA0; PORTA |= PA0; </code></pre> What is the purpose of this?
<code>PA0</code> will be defined as 0 so the following line: <pre><code>DDRA |= (1 &lt;&lt; PA0); </code></pre> Equates to shifting 1 left by zero bits, leaving an OR with the value 1 to set the first bit. Whereas the following line: <pre><code> DDRA |= PA0; </code></pre> Is doing an OR with zero so won't change t...
Why do they do this? Likely because everyone else they ask for help or learned from did it that way. And because the standard defines are weirdly done. Shifting by a number, typically a decimal number, will move that value over by that many binary positions. <code>1 &lt;&lt; PA0</code> will shift 1 by <code>PA0</code>...
https://electronics.stackexchange.com
3,369,714
[ "https://math.stackexchange.com/questions/3369714", "https://math.stackexchange.com", "https://math.stackexchange.com/users/662083/" ]
I have this question,<br> <span class="math-container">$$f(x,y)= cx^2 (8-y)$$</span><br> If <span class="math-container">$x&lt;y&lt;2x$</span> and <span class="math-container">$0\leq x\leq 2.$</span> If I have the correct range for Y then I can do alot of things with it (like the marginal pdf of x etc).<br> so my mai...
<span class="math-container">$I=\int_0^2 \int_x^{2x} x^2(8-y)dydx=\int_0^2 x^2(8x-\frac{3x^2}{2})dx=22.4$</span>. Thefore <span class="math-container">$c=\frac{1}{I}=\frac{1}{22.4}$</span>. I suggest you check arithmetic.
<span class="math-container">$1 = \int_0^2 \int_x^{2x} c x^2 (8-y)dydx$</span> solve this and you will know <span class="math-container">$c$</span> <span class="math-container">$f_X(x) = \int_x^{2x} c x^2 (8-y)dy$</span> and this will give you marginal pdf for x you can also flip whole exercise and make <span class...
https://math.stackexchange.com
18,496
[ "https://mathoverflow.net/questions/18496", "https://mathoverflow.net", "https://mathoverflow.net/users/3959/" ]
Let $R$ be a Noetherian domain, and let $\mathfrak{p}$ be a prime ideal; consider the completion $\hat R_{\mathfrak{p}}$ of $R$ at $\mathfrak{p}$ (the inverse limit of the system of quotients $R/\mathfrak{p}^n$). If $R$ is a PID, it is easy to see that $\hat R_{\mathfrak{p}}$ is a domain. Someone asked in sci.math if...
Let $R=\mathbb{C}[x,y]/(y^2-x^2(x-1))$. This is the nodal cubic in the plane. Look at the prime $\mathfrak{p}=(x,y)$, corresponding to the nodal point. The completion here is isomorphic to $\mathbb{C}[[x,y]]/(xy)$.
It might be worth pointing out that you get an example of this by localizing at any point of a variety (scheme) which is irreducible but not (analytically/formally/étale) locally irreducible. In particular, any self-intersecting curve will give an example, just like the one above by Charles.
https://mathoverflow.net
212,639
[ "https://softwareengineering.stackexchange.com/questions/212639", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/74066/" ]
I have a number of (large) test files that need to be maintained. This means access to their history is a requirement. <strong>Benefits</strong> <ul> <li>Any new developers get the entire test suite with just a <code>git pull</code>.</li> <li>The history of the files is backed up.</li> <li>The files themselves are ba...
Store them in source control. The benefits you listed are all very good ones. When you say that doing this will result in a "huge" size, just how huge are you talking? 100's of gigabytes? Terabytes? If storage is really that much of a problem, could you zip the files, store the zip file in source control and then have...
I'd store them in source control. Is there ever a case where you want the test suite without the code? Doesn't make sense. Is there ever a case where you want to edit the code without updating the test suite? There shouldn't be. Drawback 1 shouldn't be a problem given the storage prices these days, and modern SCM syst...
https://softwareengineering.stackexchange.com
754,166
[ "https://math.stackexchange.com/questions/754166", "https://math.stackexchange.com", "https://math.stackexchange.com/users/86425/" ]
Find a basis for the subspace of <span class="math-container">$\Bbb{R}^3$</span> that is spanned by the vectors: <span class="math-container">$$v_1=(1,0,0), \space v_2=(1,0,1), \space v_3=(2,0,1), \space v_4=(0,0,-1)$$</span> I am not sure how to solve this problem. I know that if these vectors span <span class="math-...
Notice that $v_{1} = v_{3} - v_{2}$. So $\{v_{1}, v_{4}\}$ is your basis, as you can form $v_{2}$ and $v_{3}$ from linear combinations of $v_{1}, v_{4}$. <strong>Edit</strong>: I'll add a bit more on a basis. Note that a basis is a maximally independent set of vectors that spans the space. In $\mathbb{R}^{3}$, we wou...
Let $S = \{v_1, v_2, v_3, v_4\}$. A basis $B$ for $[S]$ would be any set of vectors so that $[B]=[S]$ and the vectors in $B$ are linearly independent. Let's have $B=S$. We already have that $[B]=[S]$, so we only need to check that $B$ is linearly independent, which is clearly not the case. We can see $v_3=v_1+v_2$ and...
https://math.stackexchange.com
286,101
[ "https://electronics.stackexchange.com/questions/286101", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/138506/" ]
What does an operational amplifier (op-amp) amplify? Is it power, voltage or current?
Technically opamps are voltage amplifiers. The output voltage is the difference between the two input signals times a large gain. This raw capability can be used in circuits to ultimately amplify various parameters, including power and current. Note that opamp inputs are high impedance, and the opamp output can sour...
It amplifies voltage, the voltage difference between two pins called the inverting and non-inverting inputs. It outputs a voltage but that voltage is sourced from a circuit that can deliver a reasonable amount of current so immediately you can start to think that the very tiny amounts of current that the op-amp inputs ...
https://electronics.stackexchange.com
80,648
[ "https://softwareengineering.stackexchange.com/questions/80648", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/26671/" ]
I was told by a few members here that splitting up my unit tests into different assemblies for different components is the best way to structure unit tests. Now, I have a few questions about that idea. <ol> <li>What are the advantages of this? Organization, and isolation of errors?</li> <li>Let's say I have a compo...
This could be a weird semantic thing, but it sounds like you're equating "component" to "class". I would normally associate "component" with "assembly". In other words, one unit test assembly per assembly-under-test. That's a pretty common configuration in my experience. You do that in order to minimize the number ...
if you need to run the tests separately - say unit tests on every build, integration tests once per day - then this might be useful or if the test assemblies are getting too big to easily find things in them otherwise i don't see the point
https://softwareengineering.stackexchange.com
4,275,620
[ "https://math.stackexchange.com/questions/4275620", "https://math.stackexchange.com", "https://math.stackexchange.com/users/975208/" ]
<blockquote> Find the minimum natural number <span class="math-container">$n$</span>, such that the equation <span class="math-container">$\lfloor \frac{10^n}{x}\rfloor=1989$</span> has integer solution <span class="math-container">$x$</span>. </blockquote> My work- <blockquote> <span class="math-container">$\frac{10^n...
<span class="math-container">$\frac{10^4}5=2000&gt;1989$</span> <span class="math-container">$\Rightarrow x&gt;5 $</span> for n=4 let <span class="math-container">$x=5.1$</span> for <span class="math-container">$10^4$</span> or 51 for <span class="math-container">$10^5$</span> we have: <span class="math-container">$\fr...
Rewrite the equation as <span class="math-container">$$\frac{10^n}{x} = 1989+\epsilon$$</span> where <span class="math-container">$0 &lt; \epsilon &lt; 1$</span> and <span class="math-container">$x$</span> is a positive integer. Then <span class="math-container">$\dfrac{10^n}{1989 + \epsilon} = x$</span> and <span clas...
https://math.stackexchange.com
622,841
[ "https://math.stackexchange.com/questions/622841", "https://math.stackexchange.com", "https://math.stackexchange.com/users/118357/" ]
I'm wondering if an element of an algebraic structure can have two (or more) two-sided identities. Google wasn't very helpful, and I have never encountered anything with the given properties. Essentially, I'm looking for $g,h,i \in X$ such that $X$ is an algebraic structure, $ig=gi=g, hg=gh=g,$ and $h \neq i$ I have ...
$0$ can have multiple 'individual identities' in any ring, w.r.t multiplication: $x\cdot 0=0\cdot x=0$ for all $x$. Similarly, e.g. $3=1\cdot 3\equiv 5\cdot 3\pmod{12}$, so $1$ and $5$ and $9$ are identities for $3$ in $\Bbb Z/12\Bbb Z$. In a group, as we can cancel out, every element must have only one identity. In...
The identity element is unique. This can be see from the fact that <span class="math-container">$$i = i \star h = h$$</span>
https://math.stackexchange.com
165,214
[ "https://physics.stackexchange.com/questions/165214", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/72249/" ]
How do I find the air resistance force and the maximum air resistance force when all I'm given is the mass, terminal velocity, and I know it's falling in quite air? I found a formula online but it requires the drag, density and cross-sectional area which I do not have.
In general, $$F_R=bv^2$$ where $F_R$ is the resistive force, $b$ is a constant and $v$ is the object's velocity. The net force on the object also depends on gravity: $$\sum F = bv^2 -mg = ma$$ When $v$ is the terminal velocity, $a=0$. So $$bv_t^2=mg \to v_t^2 = \frac{mg}{b} \to v_t = \sqrt{\frac{mg}{b}}$$ That's how te...
<blockquote> How do I find the air resistance force and <strong>the maximum air resistance force</strong> </blockquote> For the last part (emphasized in bold face), here's a hint: If you fall at the terminal velocity, then you don't speed up anymore. No acceleration. The air resistance has rosen to a value that giv...
https://physics.stackexchange.com
249,661
[ "https://physics.stackexchange.com/questions/249661", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/110423/" ]
I understand how capacitors in series and in parallel work. However, I am wondering if it makes a difference, in terms of making a better capacitor that can store more charge, would you connect them in series or in parallel?
While the other two answers are technically correct, they are not actually addressing the engineering aspects of what comprises a "good" capacitor. Ideal capacitors in parallel or series circuits lead to ideal capacitors of different value, i.e. there is no measurable "quality" difference - ideal is ideal. In reality...
<blockquote> in terms of making a better capacitor that can store more charge would you use in series or in parallel? </blockquote> To be sure, capacitors don't (ordinarily) store charge, capacitors store <em>energy</em>, i.e., a 'charged' capacitor is electrically neutral. If, by better, you mean store more ener...
https://physics.stackexchange.com
111,008
[ "https://security.stackexchange.com/questions/111008", "https://security.stackexchange.com", "https://security.stackexchange.com/users/87090/" ]
XP support was dropped by MS on April 8 2014, almost two years ago, but there are still many people who use XP for internet surfing. Also, there are still many sites like Google or Facebook who offer SSLv3 and similar stuff to support XP. However, if we would drop XP we would have a much better security. We could use...
Depends entirely on specific sites. I suspect that a lot of sites with known audiences have already started dropping support for XP specific fixes - sites dedicated to OSX software, for example, probably get negligible XP using traffic. They may well have decided that they would rather have better security than worry a...
The only way to decide if you are willing to lose the users with XP on your site, is to find out how much of them there are. Start to collect statistics on that. Then you have something to decide on. If you decide to increase security and drop XP support, based on that numbers, you can also show big information banne...
https://security.stackexchange.com
1,055,651
[ "https://math.stackexchange.com/questions/1055651", "https://math.stackexchange.com", "https://math.stackexchange.com/users/170343/" ]
<blockquote> A random 13-card hand is dealt from a standard deck of cards. What is the probability that the hand contains at least 3 cards of every suit? (Introduction to Probability, p.36) </blockquote> My solution: <ul> <li>There are $\binom{52}{13}$ possible hands.</li> <li>Because there are 13 cards for the h...
We count the "favourables," the 4-3-3-3 hands. The suit in which we have $4$ cards can be chosen in $\binom{4}{1}$ ways. For each of these ways, the actual $4$ cards in that suit can be chosen in $\binom{13}{4}$ ways. For each of these ways, the cards in the other three suits can be chosen in $\binom{13}{3}^3$ ways, ...
Dominik, your answer was off by a factor of 4. This happened because you counted a hand containing J,K,Q,A of spades (for example) 4 times: (JQK)(A), (QKA)(J), (KAJ)(Q), and (JAQ)(K)
https://math.stackexchange.com
4,218,181
[ "https://math.stackexchange.com/questions/4218181", "https://math.stackexchange.com", "https://math.stackexchange.com/users/948381/" ]
I have this problem below that i don't understand: <blockquote> Let <span class="math-container">$L_1$</span> be a straight line in <span class="math-container">$\mathbb{R}^3$</span> as defined by <span class="math-container">$(x, y, z) = (2,2,0) + t(3,0,2)$</span>. </blockquote> <blockquote> a) Determine the plane tha...
The line you are looking for passes through <span class="math-container">$A$</span> and it intersects <span class="math-container">$L_1$</span>. Therefore it is along the plane <span class="math-container">$y=2$</span>, which contains <span class="math-container">$A$</span> and any point in the line <span class="math-...
The answer by Robert Z is fine and I cannot improve it, but I will provide my answer nevertheless, since it is about how to solve part b) without using part a) of the problem. An arbitrary point of <span class="math-container">$L_1$</span> has the form <span class="math-container">$(2,2,0)+t(3,0,2)$</span>. The line de...
https://math.stackexchange.com
279,752
[ "https://electronics.stackexchange.com/questions/279752", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/118105/" ]
I bought a new electric fan oven recently. It has a digital thermostat and control system. Yet much to my surprise, I can hear a relay clicking on and off inside it to control the power to its heating element. The oven is rated at 4kW (230V). I would have expected it to be using a triac to turn the power to the elemen...
Advantages of relays over triacs:<ol> <li>Very little voltage drop when on. This means they don't dissipate much power. For high power devices, the cost of dealing with the heat often outweighs the cost of the component that dissipates the heat. <li>Good isolation. The relay coil is inherently electrically separat...
Adding to the points of Olin's answer: If you don't need the fast switching times of semiconductor devices, relays are pretty robust and cheap, compared with the circuitry needed to implement a solid state switch capable of switching the same amount of power.
https://electronics.stackexchange.com
352,217
[ "https://physics.stackexchange.com/questions/352217", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/166555/" ]
A monochromatic red ray of light, enters a beaker of water , $\gamma = \gamma ' / \mu $ , $\mu $ is the refractive constant. The wavelength should reduce, (taking $\mu$ as $1.33$ ), so the light should become green, but we see it as red light. Why?
This is an important question because it gets at the concept of color, and what that really means. Mitchell is correct that when you observe scattering from a laser beam sent through a beaker of water, you are really only seeing the photons which have left the water ($\mu\approx1.33$) and the beaker (glass $\mu\approx...
You are seeing that part of the ray that is coming out of the beaker, with its original wavelength. If the monochromatic radiation has reached your eye through the beaker then it means that it would have got out of the beaker. The emergent radiation has the same wavelength as the incident radiation.
https://physics.stackexchange.com
81,454
[ "https://chemistry.stackexchange.com/questions/81454", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/35341/" ]
Two containers, kept at different temperatures are connected through a stopcock and two different ideal gases at different pressures are filled inside them. Initially the stopcock is closed. When the stopcock is opened, will the pressures become same or will thermal equilibrium be established first? Why? Here's an ext...
The situation that is being covered in your class is where the two containers are thermally insulated from one another. In this case, the only place where heat can be transferred from one container to the other is through the gas in the valve (by conduction). But the assumption is being made in your class problem tha...
Thermodynamics is only concerned with equilibrium situations and tell us nothing about how quickly things happen, so all that thermodynamics can say is that the pressure will be equalised and thermal equilibrium will be established. We know from experience that the pressure will be equalised very rapidly as one gas f...
https://chemistry.stackexchange.com
658,235
[ "https://physics.stackexchange.com/questions/658235", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/281389/" ]
<blockquote> We have the following definitions of average speed: (a) the average of the values of the instantaneous speed over a time interval. <br>(b) the magnitude of the average velocity. Are these definitions equivalent? Explain your conclusion with two examples. </blockquote> Well as this site demands that anyone ...
In all your figures, you are referring to the speed of the vehicle with respect to the surface of the earth. Since you cannot tell the speed of the earth, you do not have access to an absolute reference frame. You do have access to the relative speed of the vehicle, but of course that could be done as a speedometer a...
The work done by the battery is frame dependent. In order to make my point and to simplify the math, I'm assuming that the battery does work by applying the force on a single point, instead of applying forces on multiple charges to move the current. I'll also be doing things in 1d. You can think in this particular case...
https://physics.stackexchange.com
1,248,315
[ "https://math.stackexchange.com/questions/1248315", "https://math.stackexchange.com", "https://math.stackexchange.com/users/149134/" ]
Im having some problem with the following question. Show that if $f: \mathbb{R}/\mathbb{Z} \to \mathbb{R}/\mathbb{Z}$ orientation reversing, then $f(x) = x$ has exactly $2$ solutions. ($f$ has $2$ fixed points) I was wondering if anyone can help.
Take a circle as <span class="math-container">$[0,1)$</span>. (Drawing this as a picture will help!) Take <span class="math-container">$x$</span> such that <span class="math-container">$f(x) \neq x$</span>. Choose this <span class="math-container">$x$</span> maximally so you have <span class="math-container">$[0,1]$</s...
Translating the assumptions into simpler terms it means that <span class="math-container">$f$</span> can be lifted into a continuous function <span class="math-container">$g:\Bbb R\to\Bbb R$</span>, which <ul> <li>is monotonically falling (from orientation reversing), </li> <li>can be assumed to have <span class="math...
https://math.stackexchange.com
21,566
[ "https://quant.stackexchange.com/questions/21566", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/18001/" ]
I have a basic understanding of the principles behind Geometric Brownian Motion and how it can be used to model stock prices, however I am confused as to how it is used in practice. In particular, how can the fundamental analysis of a company be incorporated into the GBM model? Is it the case that information such as ...
It turns out that GBM with constant drift and constant volatility is not really used in real life. It is well known that volatility as well as drift may vary over time. Hence, if you want to use a model with time-varying parameters, you need to come up with a model to define $\mu_t$ and $\sigma_t$. There are classic mo...
It does not necessarily have to be using historical data (you could use implied volatilities for example), but indeed fundamental analysis is not taken into account in geometric Brownian motions: you just assume returns are normally distributed with some mean and volatility and it does not change in time. So if you wa...
https://quant.stackexchange.com
28,874
[ "https://datascience.stackexchange.com/questions/28874", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/47078/" ]
I'm a little bit new to machine learning. I am using a neural network to classify images. There are two possible classes. I am using a <code>Sigmoid</code> activation at the last layer so the scores of images are between 0 to 1. I expected the scores to be sometimes close to 0.5 when the neural net is not sure about th...
<strong>Train to avoid false negatives</strong> What your network learns depends on the loss function you pass it. By choosing this function you can emphasize various things - overall accuracy, avoiding false negatives, false positives etc. In your case you probably use a cross entropy loss in combination with a sof...
To answer the last question, suppose that you have a binary classification problem. It is customary to label the class as positive if the output of the <code>Sigmoid</code> is more than <code>0.5</code> and negative if it's less than <code>0.5</code>. For increasing recall rate you can change this threshold to a value ...
https://datascience.stackexchange.com
493,576
[ "https://physics.stackexchange.com/questions/493576", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/181063/" ]
When a wave function in QM potential well problems interact with a potential barrier with height more than the energy of the wave, the amplitude of the wave doesn't immediately falls off to zero, rather it decays exponentially, allowing phenomenon like quantum tunneling. In optics, the electromagnetic waves behave like...
Physically, the Schrödinger's equation expresses conservation of energy. The term <span class="math-container">$d^2\Psi/dx^2$</span> measures the curvature of the wavefunction, which is an indirect indication of its wavelength, and therefore its momentum and kinetic energy. At a "kink" where the second derivative blows...
Why should it? Think of this as a boundary condition problem. You solve the PDE, Schrodinger's equation, which is a wave equation. The solutions must have continuous first and zeroth derivations, zeroth being a fancy way of saying that the function is continuous. This is what allows some solution beyond the barrie...
https://physics.stackexchange.com
107,566
[ "https://mathoverflow.net/questions/107566", "https://mathoverflow.net", "https://mathoverflow.net/users/14967/" ]
Here is my setting: Let $E\in\mathcal{M}_k(\Gamma_0(N))$ be an Eisenstein series (of trivial Nebentypus) that is a normalized eigenform for all the Hecke operators at level $\Gamma_0(N)$. Assume that the Fourier expansion of $E$ lies in $\mathcal{O}_K[[q]]$ where $\mathcal{O}_K$ is the integer ring of some number field...
Let $f$ be any modular form of weight $k$ whose coefficients at the cusp $\infty$ lie in $\mathcal{O}_K$. Then (using GAGA and the $q$-expansion principle - see for example Katz's article on $p$-adic forms) $f$ gives rise to a section of the sheaf $\omega^k$ on $X_0(N)$ (or $X_1(N)$ + fixed under the diamond operators...
I think your answers are contained in theorems (0.1) and (0.3) of Deligne and Ribet's paper in <em>Inventiones</em>, 1980.
https://mathoverflow.net
484,066
[ "https://physics.stackexchange.com/questions/484066", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/182971/" ]
Here are two versions of the conservation of angular momentum. <ol> <li>The total angular momentum is constant if there is no external moment on the system</li> <li>The total angular momentum of a particle is constant if it is only under the influence of a conservative force with the potential function <span class="ma...
What you understand is basically correct. Regarding DC circuits it is important to point out that 1 watt = 1 amp x 1 volt under steady state (long time) conditions when transients are gone. Under those conditions an ideal capacitor looks like an open circuit (no current flow) and an ideal inductor looks like a short-ci...
<blockquote> I understand that a watt is a unit of power (change in energy per unit time) that describes the rate at which physical work can be done </blockquote> Right. The key thing to observe is that energy can move in both directions. It can move from the "supply" to the "load", but it can also move from the "l...
https://physics.stackexchange.com
176,099
[ "https://security.stackexchange.com/questions/176099", "https://security.stackexchange.com", "https://security.stackexchange.com/users/94282/" ]
We're currently constructing a security development lifecycle in our software development corporation. Our main idea is to have an asset-driven approach, where we: <ol> <li>Enter assets into an asset inventory as the system is constructed;</li> <li>Determine security goals for each asset (and implicitly the criticalli...
The way I'd reason about this is to go back to the initial decision, which was to focus on assets. Asset-driven approaches to threat modeling tend to end up with a problem like yours, which is "Make a list of everything." That long list makes it hard to focus. (The other problem they encounter is "what's an asset?")...
That's a very good question. Risk management is a tricky business. In lifecycle process, You should find the balance between the detail level inventorying the assets. The definition of asset is <code>Any resource or information an organization needs to conduct its business</code>. Based on this, you should categorize ...
https://security.stackexchange.com
67,211
[ "https://math.stackexchange.com/questions/67211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/15581/" ]
What is the most efficient way to generate the set $S$ of unique binary strings of a certain length, $L$, s.t. all strings are unique under the reversal operation? For example, if $L = 2$, the elements of $S$ would be {00, 01, 11}. Also, what is $||S||$ as a function of $L$?
Generate all strings of length $L$ and discard those that are lexicographically greater than their reverse. This number of strings this produces is $2^L$ minus half of the number of strings that are <em>not</em> palindromes. There are $2^{\lceil L/2 \rceil}$ palindromes, so $$|S| = 2^L - \frac{2^L - 2^{\lceil L/2\rcei...
For every string $x$, <ul> <li>If $x$ is a palindrome ($x = x^R$), pick it. </li> <li>Otherwise, pick either $x$ or $x^{R}$, but not both. </li> </ul> The maximum size of $S$ is $$ \frac{2^L - P}{2} + P = \frac{2^L+P}{2}, $$ where $P$ is the number of palindromes of length $L$. Can you see why $P$ is equal to $$ ...
https://math.stackexchange.com
30,334
[ "https://cs.stackexchange.com/questions/30334", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/4911/" ]
<blockquote> <strong>Question:</strong> Given an $n$-bit natural number $N$, how to compute $\lceil \sqrt{N} \rceil$ using only $O(n)$ (bit) additions and shifts? </blockquote> The tip is to use binary search. However, I could not achieve the required complexity (I got $O(n^2)$). <hr> <strong>What does it mean by ...
An iterative algorithm seems like it should work. Let $M=\lfloor N/4 \rfloor$. Suppose we know that $x$ is the integer approximation to $\sqrt{M}$, i.e., $x=\lceil \sqrt{M} \rceil$, and suppose we know the value of $x^2$ (obtained previously). Now we want to find $y=\lceil \sqrt{N} \rceil$. What are the possible va...
Are we talking integers here? Where N is n bits long? <pre><code>A = 2<sup>(n/2)</sup>, B = A and C = A<sup>2</sup> Step: B = B/2 If C > N, C = C - 2AB + B<sup>2</sup> // too high - make smaller A = A - B Else C = C + 2AB + B<sup>2</sup> // keep this bit A = A +...
https://cs.stackexchange.com
1,753,320
[ "https://math.stackexchange.com/questions/1753320", "https://math.stackexchange.com", "https://math.stackexchange.com/users/238738/" ]
Let $X$ be a normed space over the field $\mathbb{K}$. Use the triangle inequality to prove that if a sequence $\{x_n\}$ in $X$ converges in the norm to an element $x \in X$ then $x_n$ is a Cauchy sequence in $X$ This is the proof: If $u$ is the limit of $\{u_n\}$ then $$||u_n -u_m|| \leq ||u_n -u|| + ||u-u_m|| \to ...
It's a common little 'trick' to add and subtract the same value from something to prove a result. In this case - as sinbadh points it out in the comments- you have $$ u_n -u_m = u_n - u + u -u_m$$ and so $$ \| u_n -u_m \| = \| u_n - u + u -u_m \| \leq \| u_n - u\| + \|u -u_m \|$$ Where the last step is just the tri...
Thats easy: you add and subtract u to the original term: $$ ||u_n -u_m|| = ||u_n -u+u-u_m|| $$ Then you view $u_n-u$ and $u-u_n$ as $a,b$ and get $$ ||u_n -u_m|| = ||u_n -u+u-u_m||=||a+b||\leq||a||+||b||=||u_n -u||+||u-u_m||$$ and since both norms converge to zero we have $$ ||u_n -u_m|| \rightarrow 0$$
https://math.stackexchange.com
135,120
[ "https://mathoverflow.net/questions/135120", "https://mathoverflow.net", "https://mathoverflow.net/users/13694/" ]
Let $\kappa$ be an infinite cardinal. We know that the notion of being closed and unbounded (club) in $\kappa$ is strictly stronger than being stationary in $\kappa$. My question: Do you know any notion that is strictly between being a club and being a stationary set?
Here are a few intermediate notions: <ul> <li>"Being in the club filter" is strictly stronger than stationary and strictly weaker than club.</li> <li>More generally, "being in $F$", for some fixed normal filter $F$ on $\kappa$. By normality, $F$ contains the club filter and so all such sets are stationary, but needn't...
Along the lines of Joel's last example, Baumgartner has studied ideals associated with vrious large-cardinal properties. See in particular his papers "Ineffability properties of cardinals, I and II". There's also an ideal associated to Jensen's diamond principle, giving rise to the following notion of largeness. Cal...
https://mathoverflow.net
400,357
[ "https://physics.stackexchange.com/questions/400357", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/63097/" ]
It is well known how and why the running coupling of QCD grows as we reduce energy or equivalently increase distance. Hence, if the effective color charge increases with distance then why doesn't this infrared slavery fully explain quark confinement?
The Sun orbits in the gravitational potential of the entire Galaxy, not just the black hole at the centre (which is negligble actually - it has a mass of $4\times 10^{6}M_{\odot}$ compared to the rest of the mass inside the solar orbit, which is of order $10^{11}M_{\odot}$) or the few stars that are closest to us. The...
An object other than the SMBH at the galactic center does not have to be large like a black hole to influence the orbit of the sun around the galactic center. Remember that gravitational forces scale as $1/r^2$ so objects have a larger gravitation attraction as they get more massive but also as they get closer. The sun...
https://physics.stackexchange.com
164,963
[ "https://chemistry.stackexchange.com/questions/164963", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/123803/" ]
From what I understand (please correct me if I'm wrong), combustion is an exothermic oxidation reaction where, for example, a fuel like methane is combined with oxygen, i.e. CH4 + 2O2 → CO2 + 2H2O. My question is in this reaction, in what forms is the energy released? I know it releases light and heat, but how is the h...
<strong>There are alternatives to combustion as a way of releasing energy but only in specific reactions</strong> In a typical combustion reaction (or any exothermic reaction) it is hard to control how the energy gets released. The reacting molecules bump into each other, react with each other and the resulting excess ...
All the chemical energy comes from the relative positions of electrons being attracted to nuclei. Efficiency depends on the path that the energy is transferred. Efficiency is an engineering concern; Making everything work right electrically and mechanically. Thermodynamics just does its best to determine what is possib...
https://chemistry.stackexchange.com
19,666
[ "https://security.stackexchange.com/questions/19666", "https://security.stackexchange.com", "https://security.stackexchange.com/users/4445/" ]
The reason: I want to be able to use a portable USB drive to access my passwords on any machine and OS. TrueCrypt seems to be the only program that has sufficient support on all major platforms. So I thought I'd store my passwords in a hidden volume in a TrueCrypt container stored on the drive in a plain .txt-file, so ...
That's as good as encryption is gonna get. TrueCrypt is a well-vetted, respected piece of software for disk encryption. There are no guarantees in life, but TrueCrypt is about as good as it gets today. The primary remaining risk is not that someone is going to find a cryptanalytic weakness in TrueCrypt and break Tru...
I had a similar problem, I needed a way to encrypt data on USB sticks in a portable way. First I thought on buying one of these encrypted USB sticks. There are two types: some rely on a software app, while others have a physical padlock. I discarded software option because these were Windows-only, and because I can't ...
https://security.stackexchange.com
15,630
[ "https://datascience.stackexchange.com/questions/15630", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/17310/" ]
I am dealing with a highly unbalanced dataset so I used SMOTE to resample it. After SMOTE resampling, I split the resampled dataset into training/test sets using the training set to build a model and the test set to evaluate it. However, I am worried that some data points in the test set might actually be jittered fro...
When you use any sampling technique (specifically synthetic) you divide your data first and then apply synthetic sampling on the training data only. After you do the training, you use the test set (which contains only original samples) to evaluate. The risk if you use your strategy is having the original sample in trai...
Per your last question: <blockquote> Then I am wondering this way, I won't be able to perform n-fold cross validation, right? Because my data is so small (especially for the minority class) </blockquote> This is not true. You can try upsampling if your data is really small (but how small is it?)
https://datascience.stackexchange.com
1,241,695
[ "https://math.stackexchange.com/questions/1241695", "https://math.stackexchange.com", "https://math.stackexchange.com/users/120111/" ]
I was reading A First Course in Probability by Sheldon Ross. I think I quite understood the below problem but I still feel fuzzy. <blockquote> <strong>Problem</strong>: In answering on a multiple choice test, a student either know the answer or guesses. Let p be the probability that the students knows the answer and 1-...
The way I work through these is by thinking "the probability of <strong>B GIVEN A</strong> is equal to the probability of <strong>A AND B</strong> divided by the probability of <strong>just A</strong>. So in this case, the probability that the student knew the answer given he answered it right is the probability he k...
Imagine that the test consists of $N$ questions, each with the same parameter $p$ of the student knowing the right answer; and assume that knowing the right answer on any question is independent of knowing the right answer on any other question. In this scenario, each question will fall into one of three categories: ...
https://math.stackexchange.com
147,779
[ "https://physics.stackexchange.com/questions/147779", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
As we know, antiderivative or indefinite integral is the function the derivative of which gives the actual function. Let $F(x)$ be the derivative of $f(x)$ ie. the instantaneous rate of change of $f(x)$ with respect to $x$ is $F(x)$ . $$\dfrac{d{f(x)}}{dx} = F(x).$$ Now $$ d{f(x)} = F(x)\,dx,$$ right? Then writing ind...
The integral $\int$ is indeed a continuous version of summation. There are two ways of looking at this: As an <em>indefinite</em> integral, you have $\int df(x)=\int F(x)dx$. As we are dealing with indefinite integral, the right side after evaluation still depends on $x$. So naturally, it's a function of $x$. On the l...
Let's say for simplicity $F(x) = 3 x^2$, just so we have an example to talk about. As you wrote $$f(x) = \int F(x) \mathrm d x + C = x^3 +C\,.$$ And now the initial conditions come into play (the $x_0$, $v_0$ and so on) or in some cases boundary conditions. Those are always needed to find a specific solution to a diffe...
https://physics.stackexchange.com
634,527
[ "https://electronics.stackexchange.com/questions/634527", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/220456/" ]
Suppose, let's assume an IC pin requires a 10kohm 1% tolerant resistor connected to ground for its proper operation. In that case, can someone tell me whether I can split the required resistors into two or three? Like, can I use two number of 5kohm 1% tolerant resistor in series , so that the equivalent resistance is 1...
<blockquote> can I use two number of 5kohm 1% tolerant resistor in series , so that the equivalent resistance is 10kohm connected to ground? </blockquote> Yes, you can. Not many people do, as one resistor is usually smaller and cheaper. However, there are good reasons that you will often see series resistors instead of...
5000 ohms + 1% of tolerance is 5050 ohms. Two of those in series is 10100 ohms, which is 10000 ohms + 1%. So same thing. However, whether it is recommended to split it or not depends on what is the purpose of the resistor. Usually things like Ethernet PHY chips or other fast communication chips require such a resistor ...
https://electronics.stackexchange.com
18,742
[ "https://dsp.stackexchange.com/questions/18742", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/7285/" ]
<img src="https://i.stack.imgur.com/YAmve.jpg" alt="enter image description here"> The "textbook" OFDM block diagram is as the below figure. But I wonder if it satisfies the sampling theorem. Here, we have N points $X[k]$ before IFFT, and $$x[n]=\frac{1}{\sqrt{N}}\sum_{k=0}^{N-1} X[k] \mathrm{e}^{\displaystyle -j\fra...
This may sound trivial but the sampling theorem can only be violated in the process of sampling an analog signal. In your question you would like to sample the signal $$ x(t) = \sum_{k=0}^{N-1}\mathrm{e}^{\displaystyle -j 2\pi k\Delta f t} $$ and you state correclty that, in order to not violate the sampling theorem, ...
The diagram from the textbook in the opening post appears to have some mistakes. For this IFFT method, the box that says 'QAM modulator' should just be a complex number generator (such as a digital QAM generator that produces a complex number from 'x' binary bits at a time - that is meant to represent a vector on a QAM...
https://dsp.stackexchange.com
339,903
[ "https://stats.stackexchange.com/questions/339903", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/186473/" ]
I have a dataset with 150 observations. The dataset has 9 input parameters and 1 output parameter. I have built a predictive model (Random Forest) using the dataset. And now, I want to know that which variables are the most effect on the constructed predictive model. How can I do? P/s: Please help me with an example be...
A loss function is a measurement of model misfit as a function of the model parameters. Loss functions are more general than solely MLE. MLE is a specific type of probability model estimation, where the loss function is the (log) likelihood. To paraphrase Matthew Drury's comment, MLE is one way to justify loss functio...
<h1>Loss</h1> In machine learning applications, such as neural networks, the loss function is used to assess the goodness of fit of a model. For instance, consider a simple neural net with one neuron and linear (identity) activation that has one input $x$ and one output $y$: $$y=b+wx$$ We train this NN on the sample ...
https://stats.stackexchange.com
171,402
[ "https://physics.stackexchange.com/questions/171402", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/75628/" ]
We know that there is an electric field inside the battery that works against the moving electrons of a circuit. But there is also the chemical force of the battery that at some point become equal. Voltage drop is the integral of the electric field over a closed loop. But you must also have the same integral over the s...
Imagine a free-standing battery (not connected to any wires) and take a closed loop through the battery, out one terminal, and back in the other terminal. The total work done in moving a test charge around that loop must vanish. For this to happen, the change in electric potential outside of the battery must equal th...
First let's establish the situation in which the result actually holds. Voltage itself is only well defined in electrostatics, and this result only holds in a steady state. In an ideal battery, there is no energy loss inside the battery during operation, and in the steady state just as much charge flows into the bat...
https://physics.stackexchange.com
121,027
[ "https://softwareengineering.stackexchange.com/questions/121027", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/23010/" ]
Typically, computer memory is always linear. So is the term non linear used for a data structure in a logical sense? If so, to logically achieve non linearity in a linear computer memory, we use pointers. Is that right? In that case, if pointers are virtual implementations for achieving non linearity, why would a data...
I think what they mean by "linear" is most probably the linked list's <em>performance characteristics</em>. To access the <em>n</em>-th element of a linked list, you need to walk through each element before it one by one. Thus, the time required to do this is a <em>linear</em> function of <em>n</em> (the upper limit of...
Non-linear tends to imply a structure beyond a simple sequential pattern. Pointers are one concept used to get past a simple array-like structures. Relational databases could also be seen as a non-linear structure if you want another example. A linked list can be considered linear if each node is pointing at another...
https://softwareengineering.stackexchange.com
101,399
[ "https://electronics.stackexchange.com/questions/101399", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/16794/" ]
I am building a homebrew computer using core memory. What sort of a ferrite core will I need?
Look for a core that saturates in a low H field (lower power needed) and the core should have a wide hysteresis curve so that it stays magnetized when current is removed. No air gaps of course. Try ferroxcube, they do a good range.
You should consider to purchase an old core memory plane from an ancient computer. You could connect your own circuits to drive the plane and save the huge amount of work trying to wire up 1000's of magnetic cores. You could even just use one corner of the plane if your computer project needs a small amount of memory. ...
https://electronics.stackexchange.com
78,250
[ "https://dsp.stackexchange.com/questions/78250", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/59133/" ]
I’m a beginner in image processing, and was wondering since seperated (decomposed) filters help give faster and more efficient results, when do we even need to use composite filters? All I heard is the advantages of decomposed filters,but what about composite filters?
<h2>Image Processing Context</h2> In classic Image Processing the filters used are known.<br /> Hence being separable is a property of a given filter which is suitable to the task.<br /> In this context, separability only means we can have a more efficient way to apply the filter computationally while the end result is...
For any given problem definition, there's a filter that -- if you ignore execution time and hardware expense -- is &quot;best&quot;*. In general, that &quot;best&quot; filter isn't separable. Depending on the problem at hand, the degree to which the optimum degrades if you find the best <em>separable</em> filter will...
https://dsp.stackexchange.com
12,050
[ "https://datascience.stackexchange.com/questions/12050", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/19258/" ]
Golang is one of my favourite languages and I want to use it for a personal NLP/ML project. Is golang's ecosystem good and rich enough for this? Is there an alternative package for nltk in golang?
You can do this using the <code>xtabs</code> function! Here's how I did it using your example data: <pre><code># Create example data... name &lt;- c("Maria", "Thomas", "Maria", "Maria", "Thomas", "Maria") sex &lt;- c("f", "m", "m", "f", "m", "m") count &lt;- c(97, 12, 5, 97, 8, 4) data &lt;- data.frame("name"=name, "s...
Using <code>data.table</code> is also another option you can explore. Working with data.tables is more efficient when you do certain operations on your table. Its simple to use as well. <pre><code>require(data.table) DT &lt;- data.table(data) DT[ , .(Totalcount = sum(count)), by = .(name,sex)] </code></pre> <em>out...
https://datascience.stackexchange.com
5,061
[ "https://mechanics.stackexchange.com/questions/5061", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2274/" ]
I am thinking about installing a 500w halogen (HDX brand) on the roll bar in my jeep as the dome light because often I work in the back when it is dark or when I would like more light. The 500w light will be drawing about 40amps from my car's electrical system (battery or alternator). Currently I have an 800w inverte...
I don't know of any vehicle (as equipped from the factory) that increases the idle speed to compensate for a large draw on the battery. If the alternator starts bogging the engine down then the computer should compensate to <strong>maintain</strong> the set idle speed but not make it increase. It's easy to find out i...
Most modern engines <strong>should</strong> increase RPM's when the load on the electrical system increases, as the Engine Management system should monitor voltage and identify it being drawn low, so increasing RPM to increase output from the alternator. Even many older engines would do this.
https://mechanics.stackexchange.com
502,823
[ "https://electronics.stackexchange.com/questions/502823", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/243607/" ]
What is the most traditional approach to getting sensor data onto a radio from an embedded device pcb that doesn’t utilize a microcontroller? Up until now, we’ve been utilizing a convenient firmware on the radio that accesses discrete GPIO data directly wired to the radio’s IO and it automatically constructs everythi...
The only remotely sensible solution is to use an MCU. That was true last week when someone asked a remarkably similar question, and it remains true today. MCUs are cheaper and more flexible than all but the simplest combinations of building block logic, and have the added benefit of drastically expanding the sorts o...
<blockquote> getting sensor data onto a radio from an embedded device pcb that doesn’t utilize a microcontroller? </blockquote> Then the solution will look like a weather balloon or satellite from the 1970's, with lots of logic hardware to encode data into a specific radio protocol, which these days would better fit...
https://electronics.stackexchange.com
87,610
[ "https://physics.stackexchange.com/questions/87610", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31585/" ]
I've been trying (for a while) to prove that $S^{\mu\nu}:=\frac{i}{4}\left[\gamma^\mu,\,\gamma^\nu\right]$ is a representation of the Lorentz Lie algebra, that is, to prove that it satisfies the commutation relations of equation (3.17): $$ \left[J^{\mu\nu},\,J^{\rho\sigma}\right]=i\left(\eta^{\nu\rho}J^{\mu\sigma}-\et...
<blockquote> What if without meeting they send a light pulse to each other, such that they can know each other's age </blockquote> The result will still be the same - each twin judges the other twin to be ageing more slowly than themselves. However, sending a light pulse to each other involves other factors that ...
If the twins never meet, but just continue travelling in a straight line at constant velocity then each twin will see the other as being younger. The *paradox*$^1$ only occurs if one or both of the twins is accelerated, which of course is necessary for the twins to meet again. $^1$ it's not a paradox of course, just a...
https://physics.stackexchange.com
227,058
[ "https://security.stackexchange.com/questions/227058", "https://security.stackexchange.com", "https://security.stackexchange.com/users/176472/" ]
If I am storing multiple customers' data in cloud-based file storage such as an <strong>AWS S3 bucket</strong>, and I use an encryption service such as <strong>AWS KMS</strong> to achieve encryption at rest, does it add any extra security for me to store each customer's data in a separate bucket and use a separate encr...
Unfortunately, the answer is "It depends". But first, we need to clear up that KMS keys and Buckets are mutually independent, one KMS key (called a CMK) can be tied to multiple buckets, and one bucket can have objects encrypted by multiple CMKs. Secondly, because of the tight integration between KMS and S3, the only...
One argument in favour of separate keys: assume at some point in the future your app has some sort of SQLInjection or Server-side request forgery (SSRF) vulnerability that lets a user logged in as CustomerA bypass the usual access control rules and fetch data belonging to CustomerB. If all customers use the same key,...
https://security.stackexchange.com
260,006
[ "https://softwareengineering.stackexchange.com/questions/260006", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/91018/" ]
Say we have a class that is frequently used in a single-thread context: <pre><code>public class Foo { public List&lt;Bar&gt; Data; public virtual void ChangeData() { for(var i =0; i &lt; Data.Count; i++) { if(i % 4 == 0) { data[i].Baz(); ...
<blockquote> I was wondering about this because there are specific subclasses in System.Collections that are intended to be used across threads, and I wanted to know whether there was a reason this thread-safety wasn't simply rolled into List, etc. </blockquote> In this specific example, it is because only a very li...
The problem with this kind of thinking is that you often can't just make a class thread-safe (at least not in a way that is useful), without also modifying how it works. And collections demonstrate this nicely: for example, using normal <code>Dictionary</code>, you could implement some kind of caching like this: <pre>...
https://softwareengineering.stackexchange.com