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
87,608
[ "https://electronics.stackexchange.com/questions/87608", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/25756/" ]
I am rather new with micro controllers, please, push me in the right direction. I'm planning to use RS-485 network for audio streaming at home. On maxim-integrated site there are drivers, which have throughput of 30-40 or even 52Mbit. But I wonder, what MCUs should one use to get such speeds? UART is several times slow...
This is an SRAM-based FPGA. After cycling power, its configuration is lost! Normally a board using these FPGAs will have some non-volatile memory, and you load the configuration into that. The FPGA has some logic (configured by M0,M1,M2 the Configuration Mode pins) to boot itself from several common types of Flash mem...
It sounds like you are not providing your inputs correctly. You say you apply VCCO to your two input pins to provide logic '1'. You can't just leave them unconnected for a logic '0' though. You must drive them either high (VCCO) or low (GND).
https://electronics.stackexchange.com
1,922,994
[ "https://math.stackexchange.com/questions/1922994", "https://math.stackexchange.com", "https://math.stackexchange.com/users/367636/" ]
I have to find another complex solution to the polynomial equation $z^6 - 1 = 0$ given that $\frac{1}{2}−\frac{\sqrt{3}}{2}i$ is a solution. I guess the question I have for this is that is there any other way other than expanding the brackets out completely?
$$x^6-1=(x^3-1)(x^3+1)=(x-1)(x^2+x+1)(x+1)(x^2-x+1)$$ the roots are as follows $$x_1=1$$ $$x_2=-1$$ roots of $x^2+x+1$ are $$x_{3,4}=-\frac{1}{2}\pm \frac{\sqrt{3}i}{2}$$ roots of $x^2-x+1$ are $$x_{5,6}=\frac{1}{2}\pm \frac{\sqrt{3}i}{2}$$
There are actually 6 solutions to this equation, called the sixth roots of unity. They are as follows: $$e^0=1$$ $$e^{i(\pi/3)}=\frac{1}{2}+\frac{\sqrt{3}}{2}$$ $$e^{i(2\pi/3)}=-\frac{1}{2}+\frac{\sqrt{3}}{2}$$ $$e^{i\pi}=-1$$ $$e^{i(4\pi/3)}=-\frac{1}{2}-\frac{\sqrt{3}}{2}$$ $$e^{i(5\pi/3)}=-\frac{1}{2}-\frac{\sqr...
https://math.stackexchange.com
293,288
[ "https://softwareengineering.stackexchange.com/questions/293288", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/147758/" ]
I'm building a web application using a MVC pattern. Following this kind of architecture we can see that all the methods used to interact with database are implemented in the <strong>model</strong>. But what happen if I have to call a service exposed by others on web? For example, I would like to access the Facebook AP...
The model is not limited to interaction with the database, the model is responsible for getting and manipulating data. So, to your view and controller, it should make no difference, if the data comes from a database or from a webservice or is even totally random, therefore you should do it in model. MVC is a presenta...
There's a common (intentional?) misunderstanding about what M, V and C are. Not about the roles they take, but what <em>are</em> they. In the original, desktop GUI definition of MVC, they were <em>modules</em>. Typically an application had several of them, sometimes working in triplets, sometimes having a variety of...
https://softwareengineering.stackexchange.com
60,819
[ "https://cs.stackexchange.com/questions/60819", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/49401/" ]
I understand that Dynamic Time Warping is an algorithm to find a matching between two signals with different length and speed But is there a possible way to find the speed difference between the two signals being compared? To clarify my question. I am working on a project to find similarity between two motions. The ...
Let us first go into the proof. Let us then review any further considerations as you do (ie., whether the graph should be complete or not). <strong>Lemma</strong> Given an undirected graph $G=(V,E), |V|\geq 3$, and a cost function $c$ defined over $E$, if the triangle inequality is satisfied, then $c(u,v)\geq 0, \fora...
There is a much simpler proof. Say <span class="math-container">$\{a,b,c\}$</span> are the weights of edges forming a triangle, with <span class="math-container">$a&lt;0$</span> and <span class="math-container">$b \leq c$</span>. Then <span class="math-container">$a+b&lt;b \leq c$</span>, so triangle inequality does n...
https://cs.stackexchange.com
11,532
[ "https://mechanics.stackexchange.com/questions/11532", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2148/" ]
I recently had a full freeflow system fitted to my Opel/Vauxhall Astra Turbo Coupe. Along with this, I had a stage 1 STO map done to take full advantage of the new exhaust characteristics. At any rate, I asked the tuner whether I could use the Torque Pro app I had on my Galaxy Tab to read boost, temperature, timing adv...
In my opinion, most of the stuff he told you is bullshit. First off, he didn't install any software on the ECU; he just dumped the original firmware, identified where the values that control fuel injection are (amount of fuel, etc), changed them and installed that modified firmware; in the end he just modified a few d...
I am a CAN App programmer so I would like to share a bit of my experience. <ol> <li>Yes, you can report false. It's even very simple. Just watch for messages you don't like and then report error. But what is the point to implement such a stuff? Then you will not be longer able to read error or some other parameters by...
https://mechanics.stackexchange.com
482,732
[ "https://electronics.stackexchange.com/questions/482732", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/243330/" ]
My power source is 24v, and each component of the setup wants 5v and a decent number of amps. I know not to convert the same output more times than necessary, and I know not to chain step down converters. Is there any guideline as to whether it's better to have one large buck converter that can handle the entire curre...
There is no clear winner without greater system specific details. If all strips have power feeds from about thesame point them 5V 24A may be OK.<br> If there is substantial transmission distance then wiring losses rapidly make local converters more attractive. You can but well priced 5V high current supplies (Meanw...
I agree there isn't one answer. A few more guidelines: <ul> <li>The closer together the loads are, the less I^2*R penalty from a single converter</li> <li>The further apart, the more benefit in distributing higher voltage and converting locally. If one load is far from the others, consider giving it a local regulator...
https://electronics.stackexchange.com
379,921
[ "https://mathoverflow.net/questions/379921", "https://mathoverflow.net", "https://mathoverflow.net/users/130882/" ]
Context: A submission to a very good generalist journal X received one positive referee report recommending publication and two shorter opinions which both deemed the paper a solid and valuable contribution and thus worthy of publication but perhaps not a priority given the backlog this journal has, thus only weakly re...
For many journals the referee is asked to tick a box when they submit their report to indicate whether or not they (1) allow the report to be used for another journal and (2) whether their identity may be disclosed to the editors of that other journal. Given this practice, the answer to question 1 would be a &quot;yes&...
This is not really an answer, but it might be informative. The BE Journals in economics (of which there are several: The BE Journal of Macroeconomics, the BE Journal of Economic Analysis and Policy, the BE Journal of Theoretical Economics, etc) label each published paper as belonging to one of four &quot;tiers&quot;:...
https://mathoverflow.net
113,257
[ "https://softwareengineering.stackexchange.com/questions/113257", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7369/" ]
In relational world we have Foreign Keys to reference other entities. But how do document-oriented databases like MongoDb, CouchDb, RavenDb implement references among entities? <strong>Update.</strong> StackExchange related example. We have Question entity and its tags. Each tag, is a separate entity so it has its pro...
You can do the same thing as in RMDBs, you reference by identifiers. I use MongoDB, so we can talk about this from that point. Tag: <pre><code>{ _id: ObjectId('tag id'), tag_name: "nosql", tag_description: "blahblah' } </code></pre> Then in the Post <pre><code>{ _id: ObjectId('post id'), tags: [ Obj...
Easy; they don't. If you want join abilities, you have to implement them in your client code. Some of these APIs do it a little easier by defining a 'Key' type that makes it easy to store and use references, but you have to do a second fetch to get the referenced entity.
https://softwareengineering.stackexchange.com
677,813
[ "https://physics.stackexchange.com/questions/677813", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/319609/" ]
Here, by system I mean all the objects in consideration. Net force means the vector sum of all forces present in the system. For example, let's say there are two magnets somewhere in a vacuum space where no force from outside is present. This two magnets are the system. There will be some force on magnet-1 and some on ...
Yes by Newton's 3 law of motion, an isolated system is a system where no external forces act on both of the objects simultaneously. So, net force=0 as any force between them will have some action-reaction pair
From Newtons third law &quot;for every action there is an equal and opposite reaction&quot;, the net result of forces between any two of the objects is zero. That is, if object A pulls object B with <span class="math-container">$10$</span>N then object B pulls object A with <span class="math-container">$10$</span>N in...
https://physics.stackexchange.com
76,137
[ "https://security.stackexchange.com/questions/76137", "https://security.stackexchange.com", "https://security.stackexchange.com/users/53583/" ]
Is it advisable to store the salt in a separate database column or should we concatenate it together with the password? Is there any difference? I have come across implementations of both types. Example of concatented salt used in wordpress hashing function. <pre><code>$P$Bo3k0g.yPKzWx.xmABq/hCuGLLd7A20 </code></pre>...
It really doesn't make a bit of difference. The salt in no way needs to be kept secure. There are arguably some very minor security advantages to it remaining secret (since it would provide some protection against cracking trivial passwords), but if your security is dependent on that, then your security is broken. A...
I'd say it's more of a performance question, basically which of these database schemas involves less overhead. Either way if the DB is compromised an attacker would be able to easily find the salt for each password hash. Since a salt just protects you from pre-compute attacks, but is needed for authentication, it's dif...
https://security.stackexchange.com
399,489
[ "https://electronics.stackexchange.com/questions/399489", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/40245/" ]
I'm just getting started with electronics (arduinos and friends) and I would like to get a multimeter. As far as I can tell arduinos and any other logic chips and circuits I'm gonna be using are using DC power in the 3-12V range. Multimeters with "true RMS" seem to be quite more expensive than those without and well......
For experimenting with microcontrollers, you don't need a multimeter with true RMS. Get a cheap V, mA, and &Omega; meter, and save the money for a scope. You will soon be lost without at least some way of looking at voltages as a function of time.
Most of the time in electronics work multimeters are used either as a DC voltmeter or a resistance/continuity meter. A bottom of the range multimeter will do both jobs more than well enough for beginner. On the relatively rare occasions that you want to measure current it often works out more conviniant to put in your...
https://electronics.stackexchange.com
381,871
[ "https://softwareengineering.stackexchange.com/questions/381871", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/247380/" ]
What algorithm does a video player use to find the subtitles to show at any given time? I'm building a video player that displays some notes on different times over a video. Each note has a starting time and an ending time, just like subtitles. I'm having issues coming up with an algorithm to find the all the "notes"...
Unless your subtitles overlap, the algorithm is pretty simple: <ul> <li>keep the subtitles in an ordered list.</li> <li>in your event loop, determine the current time</li> <li>if it is larger than the end time of the current subtitle, unpost it</li> <li>if it is larger than the start of the first subtitle in the list,...
Subtitles are ordered: the ones which appear later in the video are stored after the ones which appear earlier. Therefore, use a simple cursor which points to the next subtitle to show. In order to make the subtitles disappear (while ensuring that overlapping is possible), either set individual timeouts for every sub...
https://softwareengineering.stackexchange.com
146,799
[ "https://physics.stackexchange.com/questions/146799", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/64381/" ]
I recently had an argument with someone on why a bicycle with a broader steer gives you more control. We both had different answers to this question and neither could convince the other. First a schematic drawing of the situation: <img src="https://i.stack.imgur.com/9mgUA.jpg" alt="enter image description here" /> Both...
The mechanics of steering a bicycle are more complicated than you think - as evidenced by the fact that it's quite easy to ride a bike without touching the handlebars, for example. The key to the stability of a bicycle is the angle of the fork - both the angle of the main pivot, and the offset of the wheel with respec...
Its easy...when you get used to riding a bike with one steer, you get used to the fact that same movement of your arms turn the steer in the same angle. But, if you make the steer shorter, that same movement will turn the wheel more, and you will be somewhat out of control, because your instincts are now a bit off...it...
https://physics.stackexchange.com
81,456
[ "https://mathoverflow.net/questions/81456", "https://mathoverflow.net", "https://mathoverflow.net/users/36285/" ]
I am trying to understand the interaction between Borel subgroups of $GL_n$ and its roots. Is it correct to say that for any choice of roots among each pair of reciprocal roots there is a Borel subgroup containing those root subgroups? (Meaning that exactly those roots appear on the decompsition of its Lie algebra) If ...
Not every collection of choices between roots $\alpha$ and $-\alpha$ is "allowed". Yes, there is a partition of the set of all roots into positive $\Phi$ and negative $-\Phi$, but, also, $\Phi$ must be closed under addition. In the case of $GL(n)$, the Weyl group (permutation matrices, if you like) acts simply-transiti...
The question itself seems too elementary for this site, since it just involves the standard axiomatic treatment of root systems as in Bourbaki <em>Groupes et algebres de Lie</em>, VI.1.7. The question is really about an arbitrary reductive algebraic group (with nontrivial derived group) over an algebraically closed f...
https://mathoverflow.net
69
[ "https://mechanics.stackexchange.com/questions/69", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/64/" ]
I have a radiator in my truck that has a slow leak which looks like it is oozing a little bit in between some of the fins. What are some of the ways to repair a radiator without replacing it? At what point should it just be replaced completely? I have seem the little additive bottles that claim to fix small leaks. ...
I wouldn't use additives to plug a leak unless it's an emergency. That stuff migrates all through your cooling system gunking up everything it can in the process - including radiator tubes with a partial flow restriction... If you are fortunate enough to possess a brass radiator - take it to a rad shop to have the le...
First up, after about 4 decades of trying different things I'm absolutely convinced that the only worthwhile solution is to take it to a radiator specialist and see what they can do with it. Personally, every time I've tried one of those leak sealing compounds I always end up feeling like I've been ripped off. At best ...
https://mechanics.stackexchange.com
366,558
[ "https://stats.stackexchange.com/questions/366558", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/220335/" ]
Given $n$ random variable $X_i$, with probability distribution $P(X_1,\ldots,X_n)$, the correlation matrix $C_{ij}=E[X_i X_j]-E[X_i]E[X_j]$ is positive semi-definite, i.e. its eigenvalues are positive or zero. I am interested in the conditions on $P$ that are necessary and/or sufficient for $C$ to have $m$ zero eigen...
<strong>Perhaps by simplifying the notation we can bring out the essential ideas.</strong> It turns out we don't need involve expectations or complicated formulas, because everything is purely algebraic. <hr /> <h3>The algebraic nature of the mathematical objects</h3> The question concerns relationships between (1) th...
<h3>Linear independence is not just sufficient but <em>also</em> a neccesary condition</h3> <em>To show that the variance-covariance matrix has eigenvalues equal to zero if and only if the variables are not linearly independent, it only remains to be shown that "if the matrix has eigenvalues equal to zero then the var...
https://stats.stackexchange.com
1,985,853
[ "https://math.stackexchange.com/questions/1985853", "https://math.stackexchange.com", "https://math.stackexchange.com/users/372647/" ]
<blockquote> Let $X,Y$ be independent random variables. $X$ has uniform distribution on $[0,1]$ and $Y$ has uniform distribution on $\{0,1\}$. Find $E\left(X^{Y}\mid X\right)$ and $E\left(X^{Y}\mid Y\right)$. </blockquote> Both $E\left(X^{Y}\mid X\right)$ and $E\left(X^{Y}\mid Y\right)$ are random variables. My ques...
Let $f(x) = e^x - x$. $f'(x) = e^x -1 \geq 0$ and hence $f$ is increasing. Thus for any $x &gt; 0$, $f(x) &gt; f(0)$ and hence $e^x &gt; x+1$ and $f(x) = 0$ has no solution when $x &gt; 0$. For $x &lt;0$, $e^x &gt;0$ and $x &lt; 0$ and hence $e^x \neq x$.
<ol> <li>For $x \le 0$ we have $e^x &gt;0$, thus no solution of the above equation exists in $(-\infty, 0)$</li> <li>If $x&gt;0$, then $e^x=1+x+\frac{x^2}{2!}+\ldots&gt;x$. Therefore: no solution of the above equation exists in $(0, \infty)$.</li> </ol>
https://math.stackexchange.com
52,488
[ "https://cs.stackexchange.com/questions/52488", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/45592/" ]
Disclaimer: I know there are similar sounding questions already here and on Stackoverflow. But they are all about collisions, which is not what I am asking for. My question is: why is collision-<em>less</em> lookup <code>O(1)</code> in the first place? Let's assume I have this hashtable: <pre><code>Hash Content ---...
The hash function <em>doesn't</em> return some string such as <code>mkwer</code>. It directly returns the position of the item in the array. If, for example, your hash table has ten entries, the hash function will return an integer in the range 0&ndash;9.
<strong>Hash function calculates array position from given string</strong>. If this is perfect hash it means that there are for sure no collisions, the most probably array is at least twice bigger than number of elements. For example I will give very poor hash for letters, just to ilustrate mechanism:<br> 0) $x = 0;$<...
https://cs.stackexchange.com
222,114
[ "https://mathoverflow.net/questions/222114", "https://mathoverflow.net", "https://mathoverflow.net/users/82084/" ]
It is known (via Kotschwar's uniqueness of backwards Ricci flows) that the isometry group of a Riemannian metric remains unchanged under the Ricci flow. But, one can easily observe that it can change at the limit. For example, one can perturb a sphere $S^2$ slightly so that it has no symmetry. As long as the Ricci flow...
I think the phenomenon is much more general: If a sequence of metrics $d_i$ on a compact metric space $X$ converges (pointwise on $X\times X$) to a metric $d$, and if $h$ lies in the intersection of the isometry groups of $(X, d_i)$, then clearly $h$ is an isometry of $(X,d)$.
The answer is yes (I'm assuming you are asking about closed manifolds, non-compactness allows for all sort of crazy things to happen, you can check out the work of Topping and collaborators). Kotschwar's backwards uniqueness proves that the isometry group cannot <em>increase</em> under the Ricci flow in finite time. ...
https://mathoverflow.net
1,057,000
[ "https://math.stackexchange.com/questions/1057000", "https://math.stackexchange.com", "https://math.stackexchange.com/users/195607/" ]
I am currently doing an highschool math problem and I do not know what the question is asking for when it asks '<strong>state which functions are odd and which are even for the below</strong>'. <ul> <li>$f(x)= x^2+1 $ ,<br/>Dom: $x : R$</li> <li>$h(x)= 1/(x^2)$ ,<br/>Dom: $x ≠ 0$</li> <li>$g(x)= ...
<img src="https://i.stack.imgur.com/BnbuY.png" alt="enter image description here"> I found an explanation that was really clear, and it seem to complement the answer that Mahidevran gave.
$F$ is $\mathbf{even}$ if $F(x) = F(-x)$ for all $x$. $F$ is $\mathbf{odd}$ if $F(-x) = - F(x) $ for all $x$ $\mathbf{Homework}$: Are there functions that are both even and odd?. [Hint: There is exactly one.]
https://math.stackexchange.com
127,920
[ "https://electronics.stackexchange.com/questions/127920", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/50752/" ]
I am trying to do convolution of a function \$ x(t)\$ with \$e^{-t}\delta(t)\$ Here are the steps I followed: \$ x(t)e^{-t}\delta(t) = \int x(\tau)e^{t+\tau}\delta(t-\tau)d\tau =e^t\int x(\tau)e^{\tau}\delta(t-\tau)d\tau=e^t x(t)e(t)=e^{2t}x(t)\$ But if I put back \$x(t)=\delta(t)\$, we wont get impulse response. C...
There is a slight mistake: it's not \$e^{t+\tau}\$ in the convolution, but \$e^{-t+\tau}\$. You replace the original \$t\$ with \$t-\tau\$, and \$-(t-\tau)=-t+\tau\$.
\$ e^{-t}\delta \left ( t \right ) \$ is simply \$\delta \left ( t \right )\$. That should make it easier, no? FWIW, the solutions to many "problems" that courses present you with on convolution involve either simplifying the functions you'll be convolving by simple reduction (like this one), or simplifying by playin...
https://electronics.stackexchange.com
70,571
[ "https://math.stackexchange.com/questions/70571", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11309/" ]
Show that $f(x)=3x^2+2x-1$ is continuous at $x=2$. <ol> <li>$f(2)=15$</li> <li>$f(x)-f(2)=3x^2+2x-16 \Rightarrow f(x)-f(2)=(x-7/3)(x+3)$</li> <li>Let $|f(x)-f(2)| &lt; \varepsilon\Rightarrow |(x-7/3)(x+3)| &lt; \varepsilon$</li> <li>$|x-7/3|&lt;\varepsilon$ or $|x+3|&lt;\varepsilon$</li> <li>$7/3-\varepsilon &lt; x &l...
Remember the definition of continuity - you're trying to show that for any $\varepsilon &gt; 0$ (think of this as very small) you can find some $\delta &gt; 0$ (also very small) so that $|x - 2| &lt; \delta$ implies directly that $|f(x) - f(2)| &lt; \varepsilon$. You're right to look at $|f(x) - f(2)| = |3x^2 + 2x - 1...
Wrong from the step 4: it does not follow from 3. E.g. $$ 0.1\cdot0.2 = 0.02&lt;0.05 $$ but it does not imply that $0.2&lt;0.05$ or $0.1&lt;0.05$. For the continuity you can just consider $$ |f(2+\delta)-f(2)| = |3(2+\delta)^2+4+2\delta - 1-15| = |3\delta^2+14\delta| $$ where the last term goes to zero with $\de...
https://math.stackexchange.com
2,355,452
[ "https://math.stackexchange.com/questions/2355452", "https://math.stackexchange.com", "https://math.stackexchange.com/users/335742/" ]
<strong>Prove that the equation $$\ x^{180} +\frac{84}{1+x^2+\cos^2 x} = 119$$ has at least two solutions.</strong> At most the number of solutions can go up to is $182$ since it is the greatest power available on the variable. However in regards to at least two, I think the $x^2$ term in the denominator has somethin...
At $x=1$, $$\ x^{180} +\frac{84}{1+x^2+\cos^2 x} &lt; 43 &lt; 119$$ Since the denominator in $\frac{84}{1+x^2+\cos^2 x}$ is always more than $1$ (and never negative or zero), for $x=2$ $$\ x^{180} +\frac{84}{1+x^2+\cos^2 x} &gt; 2^{180} &gt; 119$$ Similarly, for $x= 2$ $$\ x^{180} +\frac{84}{1+x^2+\cos^2 x} &gt; (-2...
Consider the function $f(x)=x^{180}+\dfrac{84}{x^2+\cos ^2(x)+1}-119$. It is even, $f(0)=-77$ is negative and $f(2)\approx 2^{180}$ is positive therefore $f(x)$ has a zero in $(0,2)$ and another one in $(-2,0)$ $x\approx \pm 1.0248386$
https://math.stackexchange.com
450,977
[ "https://physics.stackexchange.com/questions/450977", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/171047/" ]
One of the assumptions of the thermo textbook I'm reading is that the probability of any given microstate of a system is equally likely to occur. This does not mean that the <em>macro</em>states of the system are all equally probable, since there will usually be several microstates corresponding to a particular macrost...
Gravitational attraction refers to the <strong>force</strong> of attraction between you and the earth. Weight is the amount of force you exert on the earth. These two are essentially the same thing. Gravitational force of attraction is given by <span class="math-container">$F=\frac{GMm}{r^2}$</span>, where <span c...
It is a force in classical mechanics. It's a force of attraction. The mass (not the weight) is the source of this force, that &quot;always pulls and never push&quot; . You can't go deeper than <em>masses attract each other</em>. This is a fact and we have to accept it as an empirical statement. But we may want to know ...
https://physics.stackexchange.com
50,783
[ "https://stats.stackexchange.com/questions/50783", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/2676/" ]
I was wondering about the motivation behind the following definition of expected loss: $$E[L] = \sum_{k} \sum_{j} \int_{R_{j}} L_{kj} p(x, C_{k})dx$$ where $L_{kj}$ is the loss matrix, in which $j$ is the predicted class and $k$ the true class, $R_{j}$ is the decision region corresponding to the $j$ class and $x$ is ...
As you said, $L_{kk} = 0$ because you want to minimize the probability of misclassifying the sample. Then you want to minimize the area (where $p$ is the measure) of $\Omega-R_{k}$. The decision boundaries of your classifier define $R_{k}$. I hope that is clear. Now, why $p(x,C_{j})$?. First, $p(x) = \sum_{i}p(x,C_{i}...
$p(C_k|x)$ is your model in this case, the thing you are estimating. If it is not part of the loss, how would you optimize it?
https://stats.stackexchange.com
32,452
[ "https://quant.stackexchange.com/questions/32452", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/26589/" ]
I just read the following and i am having some difficulty to interpret it: <blockquote> We begin our analysis in the standard Black-Scholes world consisting of a bank account process of price denoted by $B_t$, and a risky stock process $S_t$, both defined on a filtered probability space $(0, \mathbb{F}, \mathfrak{F}...
I am not sure I understand your question. If not - then please clarify. <ol> <li>The process for $S$ follows from the Black-Scholes assumption of the risky asset price following a constant coefficient geometric Brownian motion.</li> <li>The process for $B$ follows from the instantaneous interest rate being constant.</...
Your problem seems to lie in the fundamentals of stochastic processes, so you should probalby refresh your knowledge in this field. Every process, also $W_t$ comes with a "natural" filtration $\mathfrak{F}_t$. It's the minimal (in a certain sense) filtration for which the process is adapted. Adapted means for a proces...
https://quant.stackexchange.com
130,683
[ "https://mathoverflow.net/questions/130683", "https://mathoverflow.net", "https://mathoverflow.net/users/21258/" ]
In the heat equation: $$\partial u(x,t)=D\partial_{xx}u(x,t)$$ the diffusion coefficient $D$ is in general a constant or a given function of $u(x,t)$ in the nonlinear equation. Suppose I have a diffusion coefficient depending on the integral of $u(x,t)$. In this case I have: $$\partial_t u(x,t)=\left[\int_{-L}^L u(x,t)...
There is a simple way to manage this equation using a Fourier series. We assume a boundary at $0$ and $L$ and that exists the Fourier series for the solution $$ u(x,t)=\sum_{n=-\infty}^{\infty}u_n(t)e^{i\frac{2\pi n}{L}x} $$ then you note that $$ D(t)=\int_{-L}^L u(s,t)ds=\int_{-L}^L\sum_{n=-\infty}^{\infty}u_n(t...
Apart from your question, let me say that a heat equation with non-constant conductivity would rather be $\frac{\partial u}{\partial t} = \frac{\partial }{\partial x}(D \frac{\partial u}{\partial x})$.
https://mathoverflow.net
111,893
[ "https://electronics.stackexchange.com/questions/111893", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/40207/" ]
Does anyone have a good idea on how I could raise the voltage from a 12v car alternator to 48v dc for use in a 48v wind system? Could I put a dc negative voltage of 36v into the regulator field sensing pin to trick the regulator? Can I somehow switch out the voltage regulator for another one or change how much it regul...
It's possible to make the car alternator to produce 48V instead of 12V provided enough RPM. It's not a very good idea to trick the regulator the way you described. A better solution could be to tune a ready-made 42- or 48-volt regulator to get the voltage you need. You could also use a high-power zener together with a ...
The output voltage of a common vehicle alternator is controlled by its internal rectifier/regulator module (although external regulation was once common, it's not now). Opening the casing on many modern alternators to replace its regulator with one of the target voltage is not an easy task; putting it back together can...
https://electronics.stackexchange.com
638,541
[ "https://physics.stackexchange.com/questions/638541", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/300316/" ]
Imagine we are measuring the period <span class="math-container">$T$</span> of a pendulum using a stopwatch The stopwatch has an inerent instrumental uncertainty (e.g. 0.1s) let's keep this fact in mind Due to random error (let's assume that there is no systematic error in this example) we end up with a series of val...
Lets consider the result of combining two Gaussian distributions of the measuring period <span class="math-container">$T$</span> (assumed the exact value <span class="math-container">$T_o$</span>) with deviation <span class="math-container">$\sigma_1$</span> and <span class="math-container">$\sigma_2$</span>: <span cla...
Engineer's view, proceed with caution! When reporting uncertainty, you want to report every contribution together into a single value; but sometimes there is a need to distinguish between instrument limitations and uncertainty measured from repeated measurements. If you were an ideal measurer, you could simply say <spa...
https://physics.stackexchange.com
52,354
[ "https://mechanics.stackexchange.com/questions/52354", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7628/" ]
I bought a Yamaha XJR 1300, 4 cylinders air-cooled with carburetors. It has a problem known from the sale (hence a very decent price), when the engine is hot, the rpm tend to stay higher than the idle setting after a throttle blip. I felt confident I could fix this easily but I am still struggling. I already tried som...
The actual problem was the idle mixture. The screws were not evenly set, and the overall setup was wrong, almost fully closed, while being recommended around -3.5 turns. The problem is now solved, I only need to do a new throttle body sync since the idle screws were uneven when I did the first sync. Thanks for the sugg...
It sounds like the carburetors are sticking when hot or you have an air leak between the carbs and the head. I'd recommend using an unlit propane torch, or something like WD40 or spray carburetor cleaner. Spray it around the carburetors and the intake ports. If the idle changes it's an air leak. You could try tappi...
https://mechanics.stackexchange.com
87,881
[ "https://stats.stackexchange.com/questions/87881", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/29137/" ]
I'm working on a promotional response analysis. I have a <strong>really small</strong> real world dataset with 25 observations and 15 variables. The variables have a <strong>high degree of multicollinearity</strong> and some have <strong>outliers</strong>. Also, I cannot use machine learning methods because I need inte...
My advice is "don't try to do this". 25 observations with 15 variables is very overfit, even if it satisfies all the assumptions of linear regression. Collinearity will mess up your standard errors and make the output highly sensitive to small changes in input. Outliers may well be influential points (although they ...
To begin in terms of an analytical framework...I would say you have 15 independent variables to choose from. You don't have 15 independent variables you have to include in your model. Given that, I have a couple of ideas. Hopefully one of them will be helpful. Before trying any of the following ideas, I would scrutini...
https://stats.stackexchange.com
147,968
[ "https://chemistry.stackexchange.com/questions/147968", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/106513/" ]
im looking for a gaseous substance (or airborne solid like dust) to use in my story that is organic, has a sweet odor, or at least pleasant enough to not cause any suspicion from main characters, is nontoxic to inhale, has some coloration (whether that be changing the color of a substance it dissolves in, being visible...
Benzene, which has already been mentioned in the comments is colourless. The frequency of light absorbed corresponds to the complementary colour of the colour we see in azo dyes. Benzene only contains a small area of delocalisation, which is not sufficient to lower the energy gap to the visible part of the spectrum, me...
Given that I am a new member and don't have much reputation, I can't comment on your post, so I am answering here...ozone has a pale bluish colour and also a metallic odour and if it is present in minimal concentration it is not deadly toxic, just might result in chest pain and laboured breathing...In the stratosphere,...
https://chemistry.stackexchange.com
128,011
[ "https://physics.stackexchange.com/questions/128011", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/52420/" ]
<blockquote> A sailboat is moving at a constant velocity. Is work being done by a net external force acting on the boat? </blockquote> The answer key is "No" according to the work energy theorem about work is done when there is a change in final and initial velocity. But if I use Work = Force x displacement, even th...
The wind is certainly doing work, because it applies a force and the point where the force is applied is displaced. However it isn't doing any work on the boat, it's doing the work on the water. The key point is that the <strong>net</strong> force on the boat is zero. We know the net force on the boat is zero because ...
<blockquote> A sailboat is moving at a constant velocity. Is work being done by a net external force acting on the boat? </blockquote> This is a bit of a trick question it tricks you into thinking there is a net external force. The boat is moving at a constant velocity; that's a given. That means that the net extern...
https://physics.stackexchange.com
608,156
[ "https://electronics.stackexchange.com/questions/608156", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/226413/" ]
The formula of voltage regulation is: (voltage at no load - voltage at load or (voltage at full load)) divided by voltage at load or (voltage at full load). <span class="math-container">$$ \frac { V_{\text{unloaded}} - {V_{\text{loaded}}}} {V_{\text{loaded}}} $$</span> Why do we write voltage at load or (voltage at fu...
<strong>% Voltage error for Load regulation is the same as the % ratio of source resistance to total loop load.</strong> But this always uses the source impedance at the rated = full load relative to the external load ratio. <strong>Thus the correct Load regulation ratio must use the Full Load in the denominator.</str...
I have done an online search of &quot;transformer voltage regulation&quot; and have found that the definition is not consistent. Most use the load voltage in the denominator but some use the no-load voltage. As a practical matter it really doesn't matter much because transformer regulation in general is very good which...
https://electronics.stackexchange.com
522,549
[ "https://physics.stackexchange.com/questions/522549", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/250618/" ]
I know how to get the wave equation of light from Maxwell's equation, but I never understood why it is called the solution of the Maxwell equations. If say we have a positive charge standing still from our frame of reference, it generates an electric field that is solution of the Maxwell equations (Gauss law) but it do...
The field of a charge in otherwise empty space obeys the wave equation everywhere but at the position of the charge. Because it has zero frequency it cannot propagate. It also is a solution of Poisson's equation, which has no propagating solutions. To generate propagating, non zero frequency solutions, time dependent ...
Maxwell equations are a set of 4 vectorial differential equations. Given a charge distribution and current (basically think of filling up space with things) that may or may not move, those equations will spit out an electric field and a magnetic field. If you arrange your charge distribution in some specific ways, you...
https://physics.stackexchange.com
89,522
[ "https://physics.stackexchange.com/questions/89522", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/26221/" ]
How does sub-ambient cooling work? There are water cooling systems for computers that can cool components to below room temperature. The problem I see here is that the water is cooled using room temperature air. How can the cooling system keep a 150 watt computer component at a temperature below room temperature? The ...
Assuming the cooling system is just a radiator, water and a pump then you can't cool the fluid below the ambient temperature of the radiator. A refrigerator manages this by compressing the fluid in the cooling circuit, extracting the excess heat and then expanding it to make it colder. If your system uses a phase chan...
i have pondered this theory before. with ac the change in refrigerant state causes a high and low pressure range. when a car needs gas topped up its because the high pressure is not reaching the required pressure so when the state is changed it is cold. if this would be possible with water would certainly interesti...
https://physics.stackexchange.com
225,668
[ "https://physics.stackexchange.com/questions/225668", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/40266/" ]
When I solve some physics problem, it helps a lot if I can find the logarithm of Pauli matrix. <blockquote> e.g. $\sigma_{x}=\left(\begin{array}{cc} 0 &amp; 1\\ 1 &amp; 0 \end{array}\right)$, find the matrix $A$ such that $e^{A}=\sigma_{x}$. </blockquote> At first, I find a formula only for real matrix: $$\exp\lef...
Observe that \begin{equation} \sigma_{z} = \begin{pmatrix}1&amp;0\\0&amp;-1\end{pmatrix} = \exp(B) = \sum_{r=0}^{\infty} \frac{B^{r}}{r!} \end{equation} with \begin{equation} B = i\pi\begin{pmatrix}2m&amp;0\\0&amp;2n+1\end{pmatrix}, \end{equation} where $m,n\in\mathbb{Z}$. Next, notice that \begin{equation} \sigma_{x...
As March comments: <blockquote> $e^{ia(\hat{n}\cdot\vec{\sigma})}=I\cos(a)+i(\hat{n}\cdot\vec{\sigma})\sin(a)$ would be of use </blockquote> For this example, set $a=\frac{\pi}{2}$, $\hat{n}\cdot\vec{\sigma}=\sigma_{x}$, the Euler's formula is rewritten as: $$ e^{i\frac{\pi}{2}\sigma_{x}}=i\sigma_{x}=e^{i\frac{...
https://physics.stackexchange.com
365,678
[ "https://physics.stackexchange.com/questions/365678", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/168088/" ]
If a body of small mas $m_{1}$, collide with object of equal mass $m_{2}$ at rest , i.e $m_{1}= m_{2}$, then acc. to conservation of energy and momentum $m_{1}$ will come at rest while $m_{2}$ will start moving with same velocity (momentum) as that of $m_{1}$, however they both suffered equal force during collision acc...
You need to apply Newton's 2nd law as well as the 3rd law. If the masses involved in the collision are unequal the forces acting on each will still be of equal magnitude but the accelerations of each will be different. This is why m1 does not have to be brought to rest.
During the collision the force $\vec F_{21}$ on mass $m_2$ due to mass $m_1$ is equal in magnitude and opposite in direction to the force $\vec F_{12}$ on mass $m_1$ due to mass $m_2$ - Newton's third law. $\vec F_{21} = - F_{12}$ The impulse on mass 2 due to mass 1 is $\displaystyle \vec I_{21} = \int_{\rm collisi...
https://physics.stackexchange.com
6,858
[ "https://biology.stackexchange.com/questions/6858", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/2952/" ]
<strong>(1)</strong>. Why does having cold hands create a painful sensation? Is it a physical effect, maybe a protection mechanism from evolution? <strong>(2)</strong>. Why, if one's hands are cold, does it feel as if they are more <em>susceptible</em> to pain? Note: I have (2) as a separate question because the painfu...
For question 1 it's just a biochemical response from thermoreceptor nerves in the skin, temperatures that are likely to cause lasting damage from prolonged exposure cause a neurological response - in this case it's pain. In address to question 2 it is most likely down to the physiological response of vasoconstriction....
It doesn't matter if its hand or any other human body organ, cold would hurt, the reason being that we humans being warm blooded animal require an optimal temperature-pressure balance to be maintained for our nervous system to work in its natural order. So when we have, in your case, cold hands its like a thermal shoc...
https://biology.stackexchange.com
25,876
[ "https://security.stackexchange.com/questions/25876", "https://security.stackexchange.com", "https://security.stackexchange.com/users/2337/" ]
Let's say I have a message that I want to keep safe for the next 100 years. Is it theoretically possible? Let's say the message is unique (raw picture data, raw video video data, raw text data) and the key is unique. Can anything prevent (near)future brute force attack?
<strong>TL;DR in bold:</strong> We don't have crystal balls to predict where technology will take us, but the purpose of cryptography is to develop algorithms that have just this kind of resistance on a very fundamental level. Mathematically speaking, <strong>in terms of "honestly" brute-forcing a single plaintext fr...
The problem with the future is that you don't know what will happen. We can guess, of course, but you can never get a guarantee. AES is presumed to be secure, and no known faults exist in the algorithm. In fact, DES (the original government-endorsed cipher) has no known faults in the algorithm either, the only problem...
https://security.stackexchange.com
167,079
[ "https://security.stackexchange.com/questions/167079", "https://security.stackexchange.com", "https://security.stackexchange.com/users/21272/" ]
I'm trying to understand scenario under which CSR (certificate signing request) can be useful. Please help me understand the concept and use. <blockquote> Mutual authentication </blockquote> In client side authentication, where a client generates a CSR to be signed by server trusted root CA. The result be a client ...
A CSR allows a user to get a certificate authority (CA) to give them a signed certificate, without the CA actually knowing the user's private key. An X.509 cert has a few major pieces: the subject (who the cert is for), the cert's validity period, the cert's allowed uses, the subject's public key, and the issuer's sign...
A certificate signing request is the precursor of a CA signed certificate. Thus a CSR is needed wherever CA issued certificates are used: server authentication, client authentication, creation of a sub-CA, signing mails with S/MIME, signed applications ...
https://security.stackexchange.com
133,302
[ "https://softwareengineering.stackexchange.com/questions/133302", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/6919/" ]
I was just watching the "Going Native 2012" streams and I noticed the discussion about <code>std::shared_ptr</code>. I was a bit surprised to hear Bjarne's somewhat negative view on <code>std::shared_ptr</code> and his comment that it should be used as a "last resort" when an object's life-time is uncertain (which I be...
If you can avoid shared ownership then your application will be simpler and easier to understand and hence less susceptible to bugs introduced during maintenance. Complex or unclear ownership models tend to lead to difficult to follow couplings of different parts of the application through shared state that may not be ...
The world that Bjarne lives in is very... academic, for want of a better term. If your code can be designed and structured such that objects have very deliberate relational hierarchies, such that ownership relationships are rigid and unyielding, code flows in one direction (from high-level to low-level), and objects on...
https://softwareengineering.stackexchange.com
556,529
[ "https://physics.stackexchange.com/questions/556529", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/266302/" ]
A plane sound wave is travelling in a medium. In reference to a <strong>frame A</strong>, its equation is <span class="math-container">$$y=A \cos (\omega t - k x)$$</span> In reference to a <strong>frame B</strong>, moving with a constant velocity <span class="math-container">$\vec{v}$</span> in the direction of propa...
The wave equation in the reference frame <strong>B</strong> has to be expressed in terms of <span class="math-container">$x'$</span>, not <span class="math-container">$x$</span>. Thus you would have: <span class="math-container">$$y=A\cos(\omega t-kx)=A\cos\big[\omega t-k(x'+vt)\big]=A\cos\big[(w-kv)t-kx'\big].$$</span...
The speed of the wave when the observer is at rest is <span class="math-container">$\dfrac \omega k$</span>. If the observer is moving at a velocity <span class="math-container">$v$</span> in the direction of wave propagation then the wave speed as measured by the moving observer is <span class="math-container">$\df...
https://physics.stackexchange.com
76,714
[ "https://mechanics.stackexchange.com/questions/76714", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/53694/" ]
I have vw golf 2004 that needs its battery replaced. The battery is four years old. The battery the car got when it was new lasted 8 years. My dad said as the car gets older it ruins the battery faster. I am wondering is this incorrect? If it is not surely it is a matter of a new alternator or something. I am not sure...
My car had it's original battery for 12 years, the next, an aftermarket one, lasted 4 years. But it lives outside now and the first owner kept it in a garage. I know that the quiescent drain has not changed and I don't leave the interior light on etc but aftermarket batteries, especially the cheaper ones, don't seem t...
The age of the car <em>usually</em> should not influence the lifespan of the battery. Battery failure is normally related to sulfate deposits on the cell plates within the battery. This can be affected by a number of factors, most of which have to do with the design of the battery's components. Higher-tier batteries...
https://mechanics.stackexchange.com
104,096
[ "https://softwareengineering.stackexchange.com/questions/104096", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/35419/" ]
I am working in a private bank, a leading mid size bank in local market. We are going to create our core banking solution. Existing solution has been developed on Java using IBM Visual Age 4.0. It is very important to discuss architecture first, we have currently more than 350 branches working in standalone mode, and ...
<strong>Let's talk about costs:</strong> You state that everything has been done in Java so far? Why change then? You might use parts of the old system or create a reusable domain model. Integration will be easier. The developers are probably used to Java, so why would you spend money to train them on .NET? There's no...
Your attachment to .Net is scary for someone responsibe for architecture, perhaps you are best surrendering to a lead programming role. Given that a lot of the code base is already in Java, there will be years of business logic, refinements and bug fixes, the appetite to 'rewrite' from scratch is very dangerous.
https://softwareengineering.stackexchange.com
330,233
[ "https://mathoverflow.net/questions/330233", "https://mathoverflow.net", "https://mathoverflow.net/users/61536/" ]
A <em>tower</em> is a subset <span class="math-container">$T\subset [\omega]^\omega$</span> of the family <span class="math-container">$[\omega]^\omega$</span> of all infinite subsets of <span class="math-container">$\omega$</span> such that <span class="math-container">$T$</span> is well-ordered by the relation <span ...
As @alesia points out <span class="math-container">$2\Gamma$</span> means to take the curve ``with multiplicity two&quot; (this is usually understood to be in the context of currents or flat chains -- for an oriented curve you can think about it as tracing out the curve twice). The reason this can give a lower area fo...
I do not have access to the paper, but in this literature multiplying a curve by say <span class="math-container">$2$</span> roughly means taking the union of the curve with a very close translate of that curve. In reality, the translate actually coincides with the original curve, so we have "twice the same curve". Thi...
https://mathoverflow.net
439,316
[ "https://softwareengineering.stackexchange.com/questions/439316", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416267/" ]
When updating to a new major version of <em>.NET</em> (in this case from <em>.NET 5</em> to <em>.NET 6</em>) without needing to make any change other than selecting the new target framework in Visual Studio, does this warrant a new major version or does bumping the minor version suffice, when adhering to <em>SemVer</em...
Unless the update to the .NET Framework would affect consumers of the package or its API, I would increment the patch version number when updating dependencies. Both the major and the minor version numbers are incremented with functional changes, with the major indicating backwards-incompatible changes and the minor in...
Unless there is a change to the functionality of the code. Don't change the version number. You can build your library to target multiple framework versions. The compiled dlls should all have the same version number, .net can tell what framework version each is for.
https://softwareengineering.stackexchange.com
451,853
[ "https://electronics.stackexchange.com/questions/451853", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/215306/" ]
If I have a 120V @ 50Hz AC heater rated at 750W, and I run it using 120V DC, will the DC heat it faster, and why? (Assuming I could get a clean 120V DC power source).
When you say 120V @ 50Hz AC you are implicitly saying 120Vrms. The RMS voltage is qualitatively defined as the voltage which will give the same resistive heating (averaged out over time) as a DC voltage of the same number. Therefore, by the definition of RMS, the heating will be the same because the RMS voltages are t...
No, because 120V RMS is the AC voltage that produces the same heat as 120 VDC. Theoretically it should be no difference at all.
https://electronics.stackexchange.com
16,565
[ "https://chemistry.stackexchange.com/questions/16565", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/5084/" ]
I saw an interesting spectrum in my biology class the other day. On the left end was methane - the least oxidized form of carbon - and the most energetic form of carbon (at least relative to what else was on the slide). On the right end was carbon dioxide - the most oxidized form of carbon - and the form with the lowes...
From a very basic explanation from general chemistry: <ul> <li>Increasing your oxidation state increases the charge. So that means that you move to the left on the periodic table increasing your atom radius and decreasing your ionization energy and electronegativity. </li> <li>If your IE decreases and you become more ...
<blockquote> is there an intuitive explanation of why increasing oxidation state correlates with lower potential energy, at least for carbon? </blockquote> The heat of formation of methane, carbon dioxide and carbon tetrafluoride are -74.9, -393.1 and -927.2 kJ/mol respectively (the trend remains unchanged even if...
https://chemistry.stackexchange.com
53,005
[ "https://dba.stackexchange.com/questions/53005", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/14666/" ]
My question is about DB design and its principles. I am working on a Python application where objects are mapped to database tables. I have <code>Projects</code> and <code>People</code> objects, mapped to their respective tables. Then I have <code>Messages</code>, also mapped to its own table. A <code>message</code> ...
I'd say it depends on whether there's a connection between People and Project? From what you've mentioned, I'd properly go with a: <code>Projects -&gt; ProjectsToMessage &lt;- Message</code> and <code>People -&gt; PeopleToMesseage &lt;- Message</code> type structure (your bullet point 2) Unless there's a releation...
I think that the first option is correct as compared to creating 2 different tables as creating more tables and then using "JOIN" queries on them seems quite costly process for the database(i.e costly in terms of performance)
https://dba.stackexchange.com
592,699
[ "https://stats.stackexchange.com/questions/592699", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/276238/" ]
If my linear regression model provides good results on the test set, and my main goal is to predict correctly, is there still a reason to plot the residuals and check the residual assumptions? (for example, to check if they are independent) Let's assume the regression model has good results for a relevant metric for my...
Another good reason to plot residuals is to check the linearity assumptions. If the residuals are similar whatever the predicted value, then your model seems good. If the residuals are small for small predicted values, and large for large predicted values, then the assumption of linearity does not seem good. In that ca...
Recommendations are for free, so people are always happy to recommend doing more work when they are not the ones who have to do it. That being said, plotting data, including your predictions, is a good practice that will help you notice problems with the data that you have no way to know based on numbers alone (see the...
https://stats.stackexchange.com
49,618
[ "https://stats.stackexchange.com/questions/49618", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/516/" ]
I'm trying to find a way to visualize the results of an association analysis where I corrected for confounding variables. I have a set of cytokine data (amount of protein in the blood) from a set of patients infected and uninfected with HCV. The difference between the two is minimal when we test/visualize the raw data...
How about a trellis plot? (If you are using R, see the lattice package, for one). Another would be to do a parallel box plot, not of the actual data but of the predicted values from the linear model.
If you have infected and uninfected individuals and a level of exposure (in this case Cytokine levels) you should be able to calculate a relative risk, and an appropriate 95% CI after adjustment. These can then be used in a plot that looks very similar to a boxplot if your levels are organized categorically, or a line ...
https://stats.stackexchange.com
167,998
[ "https://physics.stackexchange.com/questions/167998", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/45439/" ]
Using relevant equations for E and J, show that the current in a steady current I in a cylindrical conductor with uniform conductivity $\sigma$ is uniformly distributed across its cross-section. I think the relevant equations are the divergence of the E field from the Maxwell equations and $\sigma$E=J but calculating...
Since the cylinder is an ideal conductor, the electric field inside the cylinder must be parallel to the axis of the conductor, and thus no charge should be moving radially inward or outward. Now consider the electric field at a certain radius r from the central axis of the conductor. By your equation, $ \sigma E = J...
By symmetry there can be no gradient of the electric field with respect to <span class="math-container">$z$</span> or <span class="math-container">$\phi$</span> (using the <span class="math-container">$R$</span>, <span class="math-container">$\phi$</span>, <span class="math-container">$z$</span> cylindrical coordinates...
https://physics.stackexchange.com
637,945
[ "https://physics.stackexchange.com/questions/637945", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/254782/" ]
I have a hard time understanding how the transition happens between the two. Starting from Schrödinger eqaution for kets: <span class="math-container">$$i\hbar\frac{d}{dt}\left|\psi\left(t\right)\right\rangle =\hat{H}\left|\psi\left(t\right)\right\rangle \implies\left\langle x\right|i\hbar\frac{d}{dt}\left|\psi\left(t\...
The notation here is confusing, because the same symbol <span class="math-container">$\hat{H}$</span> is used for two different things: The operator <span class="math-container">$\hat{H}$</span> that you start with, i.e. the one you use in <span class="math-container">$\hat{H} |\psi(t) \rangle$</span>, is the Hamiltoni...
Generally, <span class="math-container">$$ \langle x |\hat{H}|\psi\rangle = \int dx'\langle x|\hat{H}|x'\rangle \langle x'|\psi\rangle = \hat{H}\psi(x), $$</span> where the second and the third terms are just the two ways to express the same thing.
https://physics.stackexchange.com
29,937
[ "https://astronomy.stackexchange.com/questions/29937", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/26195/" ]
If we look back far enough we can see all the origins of the universe, so is it possible, even if not feasible, that we could trace the history of some matter as it moves through space-time? I want to understand how looking at different depths in space and time are correlated in regards to the matter being observed. ...
<blockquote> Would it be possible to look deep into a certain part of space and time to find some galaxy that contributed to the matter that makes up the Milky Way today? </blockquote> No, that's not possible. If we could do that, it'd mean that the matter traveled from there to here faster than its light got he...
You would have to catch up to the light that carries the information you seek. It's traveled for a few billion years at this point (Earth is ~4.3B). So, you could watch the formation of Earth (Milky Way, whatever), if you could instantly teleport billions of light years away from here. When we watch distant galaxies a...
https://astronomy.stackexchange.com
252,912
[ "https://softwareengineering.stackexchange.com/questions/252912", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/145779/" ]
After a user installs my application, where in the app's install directory should I place information regarding 3rd party software (e.g. FOSS) licenses? Should I just append it to my EULA? Is there some sort of convention or standard that I should following to make it easily scan-able by license detection scripts?
You probably ought to do both - place it in your EULA as well as providing a <code>LICENSE.txt</code> (or equivalent) file. That way, your end users are aware of the licenses prior to accepting the terms of your license as well as being able to go back and reference the licenses later. Most packages place the <code>L...
If you look at other software that makes use of FOSS you'll usually find the information available through the about option in the menu. For an example have a look at the Chrome or Firefox about screen/page.
https://softwareengineering.stackexchange.com
290,307
[ "https://dba.stackexchange.com/questions/290307", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/228439/" ]
I am using PostgreSQL Database and here is the Sample Data. It is a large dataset and I am using the first two rows for example. <pre><code>Price | Moduletype 172 | 1 173 | 2 </code></pre> What I want is to query the data based on the Moduletype numbers 1 and 2. Moduletype1 will have the prices belonging to it an...
This is the Query which helps to select the Price based on the Module Type. <pre><code>Select (case when i.moduletype = 1 then i.PRICE else -1 end)RTL_PRC_AMT, (case when i.moduletype = 2 then i.PRICE else -1 end)ADMN_FEE_AMT from TABLE </code></pre>
The following assumes you never have more than one price per moduletype: <pre><code>select max(price) filter (where moduletype = 1) as module_type_1, max(price) filter (where moduletype = 2) as module_type_2 from the_table; </code></pre> If you want to see multiple rows per moduletype, maybe you want this: <pre>...
https://dba.stackexchange.com
700,171
[ "https://physics.stackexchange.com/questions/700171", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/330743/" ]
If two objects with equal mass collide on a floor that has friction, why is momentum not conserved? I understand that in collisions where one object is initially at rest, the force of friction on both objects will be opposite. However, when two objects collide moving towards each other, the net force acting on both obj...
Momentum is always conserved when the net force on the whole system is zero. If the frictions are both the same at all times, but opposite in directions, then the net force is zero and momentum is conserved. However, i see where your confusion lies, the masses are losing velocity, at one point, say both have 5m/s and t...
The momentum is conserved , if you consider the moment directly bevor and after the collision, after that the velocity will change because of friction
https://physics.stackexchange.com
11,216
[ "https://dba.stackexchange.com/questions/11216", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
When should you rebuild an index? vs reorganize? What index fragmentation value is considered healthy?
Rebuilding an index takes more CPU than reorganizing it. It locks the database so that has to taken into account. Indexes should be rebuilt when the fragmentation is more than 40% or so. After that it becomes too slow and cumbersome for the server to reorganize. You should reorganize an index when the fragmentation...
There's a few variables: - how much data is being changed (inserted/updated) - how much data you have - whether you have a maintenance window, and how long it is A general consensus is to perhaps consider doing general reindexing once a week at weekends along with other maintenance (dbcc checkdb for instance), and mon...
https://dba.stackexchange.com
1,141
[ "https://mechanics.stackexchange.com/questions/1141", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/649/" ]
What type and size air compressor (HP, Tank Size, CFM, direct drive/2 stage... etc) would be suitable for a home garage where I'm going to do small amounts of maintenance but nothing major?<br> So I would need to be able to use a tyre inflator and a impact wrench, I'd like to be able to do small amounts of spray painti...
I would suggest looking at the tools you plan to purchase for use with the compressor. Air tools will list what CFM @ X PSI they need to operate. That is the most important number, to make sure it can supply the air flow your tools need to run. Beyond that, horsepower and tank size are going to be how much money you...
Painting tends to use a lot of air (CFM) at low pressure (&lt;50psi, typically). So do sanders. Air sanders are great if you are planning on doing bodywork of any kind. Review your air tool requirements as @ManiacZX recommends. Painting is an enjoyable activity with challenges; getting paint that matches exactly ...
https://mechanics.stackexchange.com
196,007
[ "https://dba.stackexchange.com/questions/196007", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/44959/" ]
"persons" table: <pre><code>id | name ----------- 1 | alice 2 | ben 3 | claire </code></pre> "items" table: <pre><code>id | name | person_id | is_active ----------------------------------------- 1 | apple | 1 | NO 2 | banana | 2 | YES 3 | carrot | 2 | NO 4 | drag...
<blockquote> book_id is int </blockquote> Then your code should say: <pre><code>WHERE book_id = 15 </code></pre> And not: <pre><code>WHERE book_id='15' </code></pre> This shouldn't affect performance in <em>this</em> case, but it is a best practice to delimit (or not) correctly. Non-Unicode strings and dates wit...
If the value does not change this eliminates a lock and a trigger <pre><code>UPDATE books SET last_read = '2018-12-31 11:23:45' WHERE last_read &lt;&gt; '2018-12-31 11:23:45' AND book_id = 15 </code></pre>
https://dba.stackexchange.com
370,019
[ "https://softwareengineering.stackexchange.com/questions/370019", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13110/" ]
Let's say I want to add a row to a table. I send the query from the client (the website, not the user) to the database which is on another physical server. The query is sent over the network. The query is executed successfully. The database then sends a message back to the client saying that the query succeeded. At t...
Let's assume a complex case, a query that modifies an unknown number of records, in a way that isn't idempotent. And we assume that it is the connection between you and the database that goes wrong, the database itself is fine. You create a unique id which will go into a transaction table. Then you send a query which...
If this is a scenario you are concerned with, one solution is to create your own unique key either as the primary key or in a column with a uniqueness constraint. Then you can retry and you will get a failure because the DB will not allow a duplicate value. The general approach is termed 'duplicate transaction detect...
https://softwareengineering.stackexchange.com
3,178,327
[ "https://math.stackexchange.com/questions/3178327", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657156/" ]
(From Rudin <em>Principles of Mathematical Analysis</em>, 5.2) <blockquote> Suppose <span class="math-container">$f'(x) &gt; 0$</span> in (<span class="math-container">$a, b$</span>). Prove that <span class="math-container">$f$</span> is strictly increasing in (<span class="math-container">$a, b$</span>), and let <span...
In fact, we do need continuity of <span class="math-container">$g$</span>. If only g is continuous, then <span class="math-container">$z→y $</span> implies <span class="math-container">$f(z)→f(y) $</span>. But this is unhelpful, since we want <span class="math-container">$t→x $</span>. Recall the only thing we know ...
You do not need to assume that the inverse function <span class="math-container">$g\colon f([a,b])\to [a,b]$</span> is continuous because that actually does come for free. To see this, it suffices to show that if <span class="math-container">$U\subset [a,b]$</span> is an relatively open interval, then <span class="math...
https://math.stackexchange.com
239,991
[ "https://electronics.stackexchange.com/questions/239991", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/16307/" ]
During the transmission, the generated electric power is delivered after stepping up to hundreds of thousands or even more voltages by transformers. In that case since <span class="math-container">\$P=I\cdot V\$</span>, increasing <span class="math-container">\$V\$</span> reduces <span class="math-container">\$I\$</spa...
For these transmission lines, not the voltage will result in a power loss, but the voltage drop on these lines. I thinks its easiest explained on an example: Lets say your transmission line has a resistance of R=100Ohm and you want to transfer P=1kW. With "P=U*I" you get: <strong>@1000V, you need to transfer 1A</str...
<blockquote> I'm asking because we can write the power loss equation as: Ploss = V^2/R </blockquote> Well... no. A more accurate representation would be: <span class="math-container">\$P_{loss} = {{{\Delta V}^2} \over R}\$</span> That is to say, you only lose power when you have a voltage (i.e. energy) drop in the resi...
https://electronics.stackexchange.com
3,063,762
[ "https://math.stackexchange.com/questions/3063762", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
<blockquote> <span class="math-container">$a,b,c \in\mathbb{Z}$</span> and <span class="math-container">$x\in\mathbb{R}$</span>, then the following expression is always true: <span class="math-container">$$(x-a)(x-6)+3=(x+b)(x+c)$$</span> Find the sum of all possible values of <span class="math-container">$...
To answer the explicit question, "Is there a problem with the question?," the answer is Yes, it's worded in a weird, nonsensical way. (I think this is why Dr. Sonnhard Graubner left a comment asking for the question's source: was it reproduced verbatim, or did the OP paraphrase the problem?) A better version would be ...
Two polynomials which are always equal over the reals are exactly the same. In this case, since <span class="math-container">$x$</span> is allowed to vary, while <span class="math-container">$a,b,c$</span> are fixed, these are two polynomials in <span class="math-container">$x$</span>. For them to be equal, the coeff...
https://math.stackexchange.com
230,016
[ "https://physics.stackexchange.com/questions/230016", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/102648/" ]
A mass is another form of energy. When a mass ceases to exist as 'matter', it exists as energy - in the forms of energy we generally know (light, heat). But is this so simple? When a mass exists in its usual form (a particle for instance), it creates a space time curvature. When the mass ceases to exist anymore in its ...
Whenever you have mass you have energy too, lots of energy for a tiny bit of mass. And it is <strong>energy</strong> not mass, that is related to spacetime curvature. Your idea that mass curves spacetime and energy does not, is a lie, completely 100% baseless and simply untrue. It's just that the energy associated ...
According to Einstein's theory of general relativity, both matter <em>and</em> energy curve spacetime. The theory already makes an allowance for matter-energy equivalence. The Einstein field equations are: $$G_{\mu\nu} + \Lambda g_{\mu\nu} = k T_{\mu\nu}$$ The left hand side has the Einstein tensor G which encapsulates...
https://physics.stackexchange.com
100,284
[ "https://security.stackexchange.com/questions/100284", "https://security.stackexchange.com", "https://security.stackexchange.com/users/59871/" ]
Consider the following scenario: <ol> <li>the attacker scans (optimally automatically) open codebases (eg. GitHub) for vulnerable code fragments by checking bug reports and patches.</li> <li>the attacker scans for similar code fragments in <strong>other</strong> sources. (i.e. other software using the same pattern, bu...
For the record, the answer is mostly yes. The problem is extensively analysed by several researchers like Hongzhe Li et al. in "A Scalable Approach for Vulnerability Discovery Based on Security Patches" (Springer, 2014) and Silvio Cesare, Yang Xiang, and Jun Zhang: "Clonewise – Detecting Package-Level Clones Using Ma...
In theory, yes, this is possible and there have been some attempts to do this. However, the technique is not all that practical because there are just too many variables involved to generalise the approach. What your talking about is really just a subset of static code anlsysis and it has been used for along time. The ...
https://security.stackexchange.com
220,241
[ "https://softwareengineering.stackexchange.com/questions/220241", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/51130/" ]
Suppose I have an array of float values in the following format: <pre><code>{ 1.34, 1.15, 1.1, 1.2, 1.26, 1.10, 1.20, 1.17 } </code></pre> Suppose they have been provided by user input (or some other mechanism), where the user takes "1.1" to actually mean "1.01" - meaning that it is separate from "1.10". Using a sta...
Your problem is that your "numbers" don't have decimal places. You have a string which consists of two integers which are separated by <code>.</code>. Parse them as two integers and write a custom comparer. The sorting algorithm can remain the same, you just need to pass in the comparer. In C# such a comparer could lo...
A bit of nitpicking: If some values have more significant digits than others, than what you have is <em>not</em> floats. It's strings intended to be <em>interpreted as floats</em>, but you do have to interpret them every time you access them, and that's precisely the issue here. Basically you have two options. Either ...
https://softwareengineering.stackexchange.com
3,747,881
[ "https://math.stackexchange.com/questions/3747881", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
<span class="math-container">$$L=\lim_{n \to \infty} \sqrt[n^2]{\sqrt{3!!}\cdot \sqrt[3]{5!!} \ldots \sqrt[n]{(2n-1)!!}}$$</span> It turns out that this limit equals <span class="math-container">$1$</span>. The solution key uses Stolz-Cesaro theorem and I was wondering if this could be evaluated without this theorem. ...
Write <span class="math-container">$$\Bigl(2-\frac1n\Bigr)^n=\biggl(1+\Bigl(1-\frac1n\Bigr)\biggr)^n &gt;1+n\Bigl(1-\frac1n\Bigr)=1+n-1.$$</span>
Better write <span class="math-container">$$(2-{1\over n})^n&gt;n$$</span> We have <span class="math-container">$$(2-{1\over n})^n = 2^n(1-{1\over 2n})^n \geq 2^n(1-n\cdot {1\over 2n})=2^{n-1}$$</span> Now try with induction (for <span class="math-container">$n&gt;2$</span>) <span class="math-container">$2^{n-1}&gt;n$<...
https://math.stackexchange.com
49,899
[ "https://mechanics.stackexchange.com/questions/49899", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/26792/" ]
My car heater is taking a long time to come on if at all. Anyone know what can be causing this? Just to note that I recently changed my engine because the previous engine overheated and the water pump was found to be not working.
A car heater can stop working for a number of reasons including a low antifreeze/water level in the radiator(due to leaks in the cooling system) or a bad thermostat which isn't allowing the car to heat up properly etc. In this case it was due to a low antifreeze/water level in the radiator due to a leak. It was not r...
When the engine was changed, was the heater properly bled when the cooling system was refilled? If there is an air-bubble stopping coolant from flowing properly through the heater, that would create exactly the symptoms you are describing, yet may not cause any overheating issues if the rest of the cooling system is wo...
https://mechanics.stackexchange.com
9,045
[ "https://security.stackexchange.com/questions/9045", "https://security.stackexchange.com", "https://security.stackexchange.com/users/5938/" ]
If application needs opened port X UDP, or X TCP combination. Is there any potential risk by opening both UDP/TCP as I usually am not sure which one the application uses?<br>
So, SSH needs port 22/tcp. You're asking if opening 22/tcp and 22/udp presents a security vulnerability. The answer is "no" if nothing is listening to 22/udp. If some other application is listening to 22/udp, an application which you wouldn't want open to other hosts, then it could. There are such combinations (sysl...
Just want to expand on @gowenfawer 's really outstanding answer. Even if a process is not <strong><em>currently</em></strong> listening on a specified port, that might not be true in the <strong><em>future</em></strong>... IE: Somebody is hosting a SMTP server; it shifts mail around. There's no webserver on it, so t...
https://security.stackexchange.com
273,540
[ "https://physics.stackexchange.com/questions/273540", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/125059/" ]
I have the radius, surface gravity, escape velocity, mass, and average density of a hypothetical planet. I also have the initial velocity of the object being launched. How do I determine the maximum height of an the object when the initial velocity is lower than the escape velocity?
2km/s is very fast. If the planet has an Earth-like atmosphere there would be a significant amount of air resistance, proportional to either $v^2$ at high speed or $v$ at low speed, or something in between. The fact that the atmosphere gets thinner as you go further up makes it even more complicated. There are also co...
When you know the initial velocity, you know the kinetic energy - $E=\frac12 m v^2$. Now when projectiles travel just a short distance, you can say the the height $h$ is found by solving $mgh = \frac12 m v^2$ which gives you $h = \frac{v^2}{2g}$. But when the height is sufficiently large (compared to the radius of the...
https://physics.stackexchange.com
26,797
[ "https://mathoverflow.net/questions/26797", "https://mathoverflow.net", "https://mathoverflow.net/users/1046/" ]
Let $K$ be a finite extension of $\mathbb{Q}_p$ and $E$ an elliptic curve over $K$ with good ordinary reduction. The p-adic Tate module $T_p(E)$ is (after tensoring with $\mathbb{Q}_p$) a 2-dimensional $\mathbb{Q}_p$-representation of $\mathop{\mathrm{Gal}}(\bar{K}/K)$. It is reducible: the kernel of reduction to the...
Serre has shown that there exists a complementary subspace invariant under the Lie algebra $\mathfrak{g}$ <em>if and only if</em> E has complex multiplication. Otherwise the image of Galois is open in the Borel subgroup of $\operatorname{GL}_2(\mathbb{Q}_p)$. I learnt this from the paper by Coates and Howson ("Euler ch...
If you go to the maximal unramified extension of $K$ (so the residue field is algebraically closed) then you can write $T_p(E)$ as an extension of $\mathbb{Z}_p$ by $T_p(\mu)$. The class of this extension is the Serre-Tate parameter and can be viewed as a one-unit in the ground field. The Serre-Tate parameter parametri...
https://mathoverflow.net
372,616
[ "https://physics.stackexchange.com/questions/372616", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263243/" ]
So the covariant derivative of a scalar function $f$ on a manifold $M$ w.r.t the vector $X$ is defined as $$ \nabla_X f = X(f) .$$ From the very beginning of my course on general relativity, it has been stated that vectors in the tangent space are directional derivative operators. So $X$ is a map from the space of f...
It depends on how you read the symbol <span class="math-container">$$\nabla_X f.$$</span> If you consider <span class="math-container">$X$</span> and <span class="math-container">$f$</span> fixed, i.e., you pick one specific vector field <span class="math-container">$X\in \Gamma(TM)$</span> and a specific smooth functi...
On a smooth manifold $M$, the tangent vector fields $v\in \Gamma_M(TM)$ may be defined as a collection of paths $\gamma_x : \mathbb R \to M$ with $\gamma(0) = x$ for all points $x\in M$, being equivalent if the derivative $v_x$ coincides. If we have a scalar function $f : M \to \mathbb R$ defined on the manifold, we c...
https://physics.stackexchange.com
79,137
[ "https://electronics.stackexchange.com/questions/79137", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/27547/" ]
I use three 65Ah/12V VRLA batteries connected in series to a 36V UPS to power my computer. I will soon have two 200W/24V solar panels. What do I need to charge the UPS batteries with these panels? It's not clear to me if normal charge controllers can handle this situation, and I've received conflicting answers from the...
You <em>could</em> connect your battery string directly to the solar panel: the voltage is about right. However, your VRLA batteries are sealed, so you should never over-charge them. Your "24V" panels probably have a peak power point around 36V, and an open circuit voltage around 48V. This is a suitable voltage range ...
The correct way would be to connect the solar panels in series, to get 48v and then use a MPPT charge controller which can match the input voltage to the batteries correctly. Most charge controllers are designed for 12, 24v or 48v but you may find one which is able to support 36v.
https://electronics.stackexchange.com
16,591
[ "https://dba.stackexchange.com/questions/16591", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/8191/" ]
I am working on a database design and see myself with lots of *_type tables (e.g. user_type, product_type, etc.) where the structure of these tables is the same, basically: <pre><code>user_type ( id int pk label char ) </code></pre> I could simplify this by doing something like: <pre><code>labels ( id i...
Please don't combine the various <code>_type</code> tables. Your future self (and anyone that ends up writing queries against the tables) will thank you. <ul> <li>If you combine the tables, you give up the ability to have referential integrity constraints ensure that your tables have valid data. Inevitably, someone ...
Type tables are a common feature of many systems. You may want to create a standard layout for your type tables. I prefer something like: <pre><code>model_type { model_id int PK NOT NULL, description char UK NOT NULL, abbreviation char, sort_order int active indicator (boolean, end date, other ap...
https://dba.stackexchange.com
66,665
[ "https://stats.stackexchange.com/questions/66665", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/28874/" ]
I am trying to estimate the mean of a variable for 2 different groups. If in Stata I use <pre><code>. bys group: sum variable </code></pre> I'll get the mean. However, there are differences among two groups in terms of age, gender, education... And I have to control for that. To be more clear, let's say my groups a...
Example illustrated with auto data in Stata <strong># without controls and if you want to find the mean of variable say price for foreign, where foreign consists of two groups (if foreign==0, domestic, and if foreign==1, it is Foreign).</strong> <pre><code>sysuse auto, clear </code></pre> Two ways: <strong>1. Use...
Once you control for a variable, it doesn't have a mean any more. Say I have a group of kids, I can estimate their mean height. But then I say "What's their mean height, controlling for age". There is no longer a mean. Because the height depends on the age, so the question is, "at what age". You use regression, an...
https://stats.stackexchange.com
614,063
[ "https://math.stackexchange.com/questions/614063", "https://math.stackexchange.com", "https://math.stackexchange.com/users/104895/" ]
<blockquote> Let <span class="math-container">$ a_1,a_2,a_3 &gt;0$</span> <span class="math-container">$\lambda_1\lt \lambda_2 \lt \lambda_3 \in \mathbb{R}$</span> prove that the following equation has exactly 2 solutions <span class="math-container">$\dfrac{a_1}{x-\lambda_1} + \dfrac{a_2}{x-\lambda_2} + \dfrac{a_3}{x-...
Just examine the signs of the function on the left hand side (call it $f$) for all intervals where it is continuous. For $x &lt; \lambda_1$, $f$ is always negative. So there are no roots here. For $\lambda_1 &lt; x &lt; \lambda_2$, $f(x) \to \infty$ as $x \to {\lambda_1}^+$ but $f(x) \to -\infty$ as $x \to {\lambda_2...
Letting $f(x)$ be the left hand side of the equation, then imagine the graph of $y=f(x)$. We can get the followings : $$\lim_{x\to \pm\infty}f(x)=0, \lim_{x\to\lambda_i\pm0}f(x)=\pm\infty.$$ With the continuity of the graph except $x=\lambda_i$, this leads what you desire. Do you see the monotonicity of each part? ...
https://math.stackexchange.com
165,437
[ "https://electronics.stackexchange.com/questions/165437", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/56778/" ]
I'm trying to wrap my head round Skin Depth, we've derived the wave equation from Maxwell's equations, using the conditions that it's a "good conductor" &rho; = 0, &sigma; >> &omega;&epsilon; and therefore you get that the current density decreases exponentially from its value at the surface. I'm happy that it pops o...
If you want to understand this, instead of thinking of a transmission line as two wires with special behavior, you need to think of a transmission line as a guiding structure for electromagnetic waves. When we talk about currents and voltages and capacitance and inductance in a transmission line, that's a useful simpli...
For an <strong>intuitive</strong> understanding of the <strong>"skin effect</strong>," look at the cross section of the wire. Next, think of the center atom as surrounded by a ring of similar atoms, and then repeat this radially. The center atom will be compressed the most (highest density), the next "ring" will be a ...
https://electronics.stackexchange.com
128,940
[ "https://mathoverflow.net/questions/128940", "https://mathoverflow.net", "https://mathoverflow.net/users/6094/" ]
Let $S$ be a sphere of unit radius. Let $C_n$ be a collection of unit-radius circles/rings whose centers are (uniformly distributed) random points in $S$, and which are oriented (tilted) randomly (again, uniformly). <blockquote> <b>Q1</b>. As $n \to \infty$, does the probability that all the rings in $C_n$ are l...
I think I can complement the answer of Ori Gurel-Gurevich to prove that indeed, when we deal with connected open sets (no need for convexity) the answer is positive. <strong>1.</strong> There is a finite configuration of circles $C_1, \dots, C_N$ whose centers are in the domain $D$, such that any circle $C$ with cente...
Cool question! I believe the answer should be positive for any bounded connected body, but I cannot show this yet. However, I have a reduction of the question to the case where the body is small. The idea is to partition the body into smaller bodies, say by taking the intersections of the cubic lattice of side length...
https://mathoverflow.net
488,057
[ "https://physics.stackexchange.com/questions/488057", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/231434/" ]
Today, in my physics class my teacher was talking about how we can never predict the outcome of a coin flip. So I thought: Will the outcome of a coin flip be the same if we do not change the initial conditions (such as launch angle, force position where force is applied,etc.)? Intuitively, I feel that the answer would ...
<blockquote> Today, in my physics class my teacher was talking about how we can never predict the outcome of a coin flip </blockquote> Your teacher was most likely not talking about this from a QM perspective of how experiments have probabilistic outcomes due to the inherent nature of QM (as we currently understand ...
I guess the subject here is chaos, which arises even in classical mechanics, with a very nicely define classical Hamiltonian. "Deterministic chaos" is one of the wonderful oxymorons modern science can produce. In system having exponential dependence to initial conditions, evolution from two "infinitely" close initial s...
https://physics.stackexchange.com
308,226
[ "https://softwareengineering.stackexchange.com/questions/308226", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/165513/" ]
I'm developing a C++14 application and would like to take advantage of the new multithreading features, in particular <code>std::async</code>. I have seen a number of applications which allow the user to specify the maximum number of software threads that can be used for the duration of the program run. However, the r...
It is not generally sensible to limit the number of threads, if these threads are used only for concurrency. I.e. aside from the extra resource use, spawning threads is fine to manage blocking operations, increase responsiveness, …. A good example is a web crawler that might want to download multiple small resources, a...
IMO threads can be split into three main categories. Long running threads that monitor one thing per thread. Putting a limit on these will limit the number of things you can monitor which is likely not what you want to do. If you do put a limit it should be very high and mostly a sanity check. Threads that spend most...
https://softwareengineering.stackexchange.com
3,982,093
[ "https://math.stackexchange.com/questions/3982093", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847114/" ]
<blockquote> Consider the statement <span class="math-container">$$\forall x \in \mathbb{R}\;\forall y \in \mathbb{R}\ x+y&gt;0$$</span> Is this statement true or false? Also, find its negation. </blockquote> I think this statement is false because the inequality is not always true; for example, for <span class="math-c...
Write: Since for <span class="math-container">$x=-1$</span> and <span class="math-container">$y=-1$</span>, <span class="math-container">$(-1)+(-1)=-2&gt;0$</span> is false. So, the given statement is false. Clearly, the negation is: <span class="math-container">$$\exists x,y\in\mathbb{R}\ x+y\leq0$$</span> <HR> <stro...
For the sake of contradiction, assume the statement holds true. Next, we fix <span class="math-container">$x\in\mathbb{R}$</span> and set <span class="math-container">$y = -x$</span>. Observe that from our contradiction assumption, we have <span class="math-container">\begin{align*} x + y &amp;&gt;0\\ x + (-x)&amp;&gt;...
https://math.stackexchange.com
252,771
[ "https://dba.stackexchange.com/questions/252771", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/194358/" ]
I have come across the following line in a text book (Database System Concepts Textbook by Avi Silberschatz, Henry F. Korth, and S. Sudarshan $6e$) page no. 686: <blockquote> Thomas’ write rule allows schedules that are not conflict serializable but are nevertheless correct. Those non-conflict-serializable sched...
The given schedule S is: <pre><code>T1 T2 ---- ----- R(X) W(X) W(X) </code></pre> To be view serializable W2(X) must move before R1(X) or after W1(X). However, the first would violate the "initial read" rule and the second would violate the "last write" rule. T2 starts after T1 so has a higher timestamp. W...
I don't find it clear to ask if Thomas write rule &quot;allows&quot; view serializable schedules. Proper question should be,&quot;whether the schedule &quot;generated&quot; by thomas write rule is view serializable or not?&quot;. This rule says to ignore T1's obsolete write(x) in the schedule S:R1(X),W2(X),W1(X). It ca...
https://dba.stackexchange.com
3,625,523
[ "https://math.stackexchange.com/questions/3625523", "https://math.stackexchange.com", "https://math.stackexchange.com/users/309527/" ]
<blockquote> <strong>Prove that:</strong> <span class="math-container">$$\sum_{k=0}^n\sum_{j=0}^n\sum_{i=0}^n\binom ni\binom{n-i}j\binom{n-j}k=5^n$$</span> </blockquote> I have tried expanding the binomial coefficients as fractions of factorials. <span class="math-container">$\sum\sum\binom ni\binom{n-i}j$</span> ...
Suppose you want to paint <span class="math-container">$n$</span> balls which are initially white, and you follow this procedure: <ul> <li>You pick <span class="math-container">$i$</span> white balls and paint them yellow. (<span class="math-container">$\binom ni$</span> ways)</li> <li>You pick <span class="math-conta...
Here's a short direct proof via three applications of the binomial theorem: <span class="math-container">\begin{align} \sum_k \sum_j \sum_i \binom{n}{i} \binom{n-i}{j} \binom{n-j}{k} &amp;=\sum_j \sum_i \binom{n}{i} \binom{n-i}{j} \sum_k \binom{n-j}{k} \\ &amp;=\sum_j \sum_i \binom{n}{i} \binom{n-i}{j} 2^{n-j} \\ &amp;...
https://math.stackexchange.com
1,329
[ "https://cs.stackexchange.com/questions/1329", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/1132/" ]
So I thought this (though somewhat basic) question belonged here: Say I have a graph of size 100 nodes arrayed in a 10x10 pattern (think chessboard). The graph is undirected, and unweighted. Moving through the graph involves moving three spaces forward and one space to either right or left (similar to how a chess knig...
If the edges in the graph only represent valid moves between certain positions, using Dijkstra's would work just fine. However as the graph is unweighted it would be overkill. A simple breadth-first-search will give the optimal answer.
Nicholas already provided a perfect answer. However, let me address your original attempt to use depth-first search. First, either Dijkstra (which works fine with unweighted nodes as noted by Nicholas Mancuso) or breadth-first search incur in exponential waste of your memory. Their advantage, however, is that they nev...
https://cs.stackexchange.com
240,733
[ "https://softwareengineering.stackexchange.com/questions/240733", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/132089/" ]
We have a database that stores the process/history of particular machines. What I mean by that is that we have "started", "updating", "shutdown", and so on for all the computers in the company. The requirement is to have the history available in the right order. Simple enough. My approach was to have a simple database...
The second approach produces ambiguous results: what is the value in the <code>time</code> column? the time of <code>started</code>? or <code>shutdown</code>? or something else? The second approach also makes it harder to query for machines that have a <code>started</code> and <code>updating</code> process and no <cod...
That's a fine idea, assuming that your database vendor has no maximum text field size. I could also see there being concurrency issues on the rows when two threads are trying to append to the same row near simultaneously. Ask your team why space is that much of an issue that you would try to make bad optimisations tha...
https://softwareengineering.stackexchange.com
286,353
[ "https://electronics.stackexchange.com/questions/286353", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/136021/" ]
Real inductors can be represented as perfect inductor plus a series resistance \$R_s\$. The impedance of this component is \$Z_{L+R_s}=R_s+j \omega L\$ therefore $$\frac{1}{Z_{L+R_s}}=\frac{1}{R_p}-\frac{j}{Z_{Lp}}$$ With \$R_p=\frac{R_s^2+(\omega L)^2}{R_s}\$ and \$Z_{L_p}=\frac{R_s^2+(\omega L)^2}{\omega L}\$ Whi...
If I measure \$R_s\$ will the measurement depend on the frequency of the RLC bridge?<br> Generally, your bridge measurement will be larger than an ohmmeter measurement. <em>How much larger</em> depends on the quality of the inductor. <ul> <li>Skin resistance of the inductor's wire will increase at higher frequencies....
A common Ohmmeter measures with a constant voltage or current. So after a short time - at usual values less than a second - you get Rs.
https://electronics.stackexchange.com
64,265
[ "https://security.stackexchange.com/questions/64265", "https://security.stackexchange.com", "https://security.stackexchange.com/users/52906/" ]
I have a client that needs to be able to secure a data site from hackers. This is the methodology we currently are looking at: <strong>server.com</strong> (web server) —> HTTP JSON API request —> <strong>dataStore.net</strong> (data server). He doesn’t want to force people to authenticate just to visit <strong>serv...
<em>Please bear in mind my answer is based on assumptions. If you edit your question to clarify let me know and I'll update my answer.</em> From your diagram <blockquote> server.com (web server) —> HTTP JSON API request —> dataStore.net (data server). </blockquote> it appears that you are connecting to <code>datas...
<blockquote> I need to prevent: some-person.com —> HTTP JSON API request —> dataStore.net </blockquote> It is important to understand, that if anyone wants to get data from your data store they could just use any web proxy to circumvent cross origin policies. It is unclear what you are asking here, but I would re...
https://security.stackexchange.com
105,299
[ "https://stats.stackexchange.com/questions/105299", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/5323/" ]
I have a large number of factors that categorize my numerical observations in different ways and no preconception which if any of these factors may be significantly explanatory, but I have a p-value threshold that I'm obliged to observe. I want to perform an analysis of variance for each factor and then select those fa...
You also seem a little unclear (possibly) on which tests you are conducting. You would generally conduct a single omnibus ANOVA to answer the question <strong>Do <em>any</em> of the samples in each of the levels of my factor variable have sample means that are drawn from a population with a different mean than at least...
If I understand your question correctly, you have a multiple comparison issue. As a quick example of this issue, if you have a critical $\alpha$ value of 0.05 and you were to perform 100 hypothesis tests then we would expect 5 of the tests to come up significant even if all null hypothesizes are actually true. There ...
https://stats.stackexchange.com
212,336
[ "https://dba.stackexchange.com/questions/212336", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/88154/" ]
I've added a simple table to a db called: aaa_log with columns :(<code>id</code> ,<code>name</code>, <code>op</code>)) <pre><code>CREATE TABLE aaa_log ( [id] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL, [name] [varchar](50) NOT NULL, [op] [varchar](50) NULL) </code></pre> <code>id</code> column used just in ma...
You are relying on the presence of rows in either <code>inserted</code> or <code>deleted</code> (or both). What happens when no rows are affected? The trigger still fires. <pre><code>CREATE TABLE dbo.floob(a int); INSERT dbo.floob(a) VALUES(1); GO CREATE TRIGGER dbo.TRfloob ON dbo.floob FOR INSERT, UPDATE, DELETE AS ...
Question: Should you be taking any action against the database if no changes are made? This seems like it will needlessly slow down your application, and is not best practice. I would say here that a better solution would be to remove the unnecessary database transactions, if at all possible. If this trigger is mea...
https://dba.stackexchange.com
165,302
[ "https://mathoverflow.net/questions/165302", "https://mathoverflow.net", "https://mathoverflow.net/users/11640/" ]
Let $\mathcal{C}$ be a small category equipped with a terminal object $1$ and a Grothendieck topology. (Assume $\mathcal{C}$ also has pullbacks, if it is more convenient.) The following is a simplicial version of Verdier's hypercovering theorem: <blockquote> Let $X$ be a locally fibrant simplicial presheaf on $\math...
Jardine has recent a paper called "The Verdier hypercovering theorem", based on an earlier paper called "Cocycle categories", which you should look at if you haven't. He doesn't exactly say it this way, but it looks like the following is true: given presheaf such that $X$ is locally fibrant, then you can define the "...
Here are some remarks on Charles Rezk's answer: <ol> <li>Everything is happening in the category of locally fibrant presheaves, which has a homotopy calculus of right fractions in the sense of Dwyer and Kan (because it has suitable functorial factorisations), so the hammock spaces have the same homotopy type has Jardi...
https://mathoverflow.net
29,729
[ "https://dsp.stackexchange.com/questions/29729", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/19352/" ]
<ul> <li>$y(n)$ = output signal</li> <li>$x(n)$ = input signal</li> <li>$\mathbf H$ = system response as a toeplitz matrix</li> </ul> $$\mathbf H = \begin{bmatrix}h(0)&amp;&amp;&amp;\\h(1)&amp;h(0)&amp;&amp;\\h(2)&amp;h(1)&amp;h(0)&amp;\\\vdots&amp;&amp;&amp;\ddots\end{bmatrix}$$ I understand that $\mathbf H$, with i...
Actually, you can't say how many non-zero values $a[n]$ is going to have because, depending on the values that $b[n]$ and $c[n]$ take, $a[n]$ may equal 0 for some values of $n$ or not. Nevertheless, I think that you want to know the length of the sequence $a[n]$. As a general rule, for two sequences of length $P$ and ...
No, you aren't correct. Convolution is equivalent to multiplying polynomials, with a sequence of length $n$ corresponding to the coefficients of a polynomial (let's say for a variable called $x$) of degree $n-1$. So convolving sequences with length $n$ and $m$ is equivalent to getting a polynomial of degree $n-1+m-1$...
https://dsp.stackexchange.com
1,260,748
[ "https://math.stackexchange.com/questions/1260748", "https://math.stackexchange.com", "https://math.stackexchange.com/users/230223/" ]
I have a function: $$\text{sinc}(x) = \frac{\sin(x)}{x}$$ and the example says that: $\text{sinc}(0) = 1$, How is it true? I know that $\lim\limits_{x \to 0} \frac{\sin(x)}{x} = 1$, But the graph of the function $\text{sinc}(x)$ shows that it's continuous at $x = 0$ and that doesn't make sense.
In an elementary book, they should define $\mathrm{sinc}$ like this $$ \mathrm{sinc}\; x = \begin{cases} \frac{\sin x}{x}\qquad x \ne 0 \\ 1\qquad x=0 \end{cases} $$ and then immediately prove that it is continuous at $0$. In a slightly more advanced book, they will just say $$ \mathrm{sinc}\;x = \frac{\sin x}{x} $$...
The function $\operatorname{sinc}$ is defined as $$ \operatorname{sinc}\colon x\in\mathbb{R} \mapsto \begin{cases} \frac{\sin x}{x} &amp; \text{ if } x\neq 0\\ 1 &amp; \text{ if } x = 0 \end{cases} $$ (note that you cannot write $\frac{\sin x}{x}$ for the case $x=0$). It <em>is</em> continuous on $\mathbb{R}$, because ...
https://math.stackexchange.com
10,784
[ "https://security.stackexchange.com/questions/10784", "https://security.stackexchange.com", "https://security.stackexchange.com/users/3775/" ]
I have a following problem/challenge: Web application (ASP.NET 3.5) installed on corporate LAN and operates on SQL Server DB needs to provide ability to generate custom reports. These reports can be basically anything from underline DB, include complicated joints, unions and whatever you can think of. (Just selects, n...
You are providing a list to sanitize, which includes drop, create, exec,... But if you only need "SELECT" access, it would be easier to just take away the rights the user who's executing the queries doesn't need. (least-privileged rather than all privileged ) If I were you I would define stored procedures because the...
Read only account for starters, deny update/delete, etc. from the users. Personally I like using stored procedures for such things. And if you can't trust your admins, who could do anything they probably want on the backend outside if your application, who can you trust?
https://security.stackexchange.com
3,320,628
[ "https://math.stackexchange.com/questions/3320628", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Weierstrass approximation theorem is a quite strong theorem,even stronger than the Taylor's theorem because: <strong>Statement:Suppose <span class="math-container">$f:[a,b]\to \mathbb R$</span> is a continuous function then <span class="math-container">$\exists$</span> a sequence of polynomials <span class="math-conta...
Let <span class="math-container">$\ f:(0;1] \rightarrow \mathbb R\ $</span> be such that <span class="math-container">$$ \forall_{x\in(0;1]}\quad f(x)\ :=\ \cos\left(\frac \pi x\right) $$</span> Then <span class="math-container">$$ \forall_{n=1}^\infty\quad f\left(\frac 1n\right)\ =\ (-1)^n $$</span> Let <span class=...
No bounded continuous function from <span class="math-container">$\mathbb R$</span> into itself (other than a constant) can be approximated uniformly on <span class="math-container">$\mathbb R$</span> by polynomials. This is because any non-constant polynomial <span class="math-container">$p$</span> has the property <s...
https://math.stackexchange.com
638,180
[ "https://physics.stackexchange.com/questions/638180", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/239012/" ]
Does covariant derivative include magnitude change of a vector as well as direction change of the vector? In some explanations I followed I have not noticed mentioning of magnitude change along with direction change of a vector.
The short answer is yes, it does. A covariant derivative describes the change of a vector field under parallel transport along a given vector. It does not single out changes in direction from changes in magnitude, but rather returns a vector that describes the change of both. To extract one or the other, you can take t...
No, I think it's just direction. A vector which is parallel transported will not have its magnitude changed, only its direction. This is mathematically encoded in the statement that the covariant derivative is &quot;metric compatible&quot; i.e. <span class="math-container">$\nabla_\mu g_{\nu \rho} = 0.$</span>
https://physics.stackexchange.com
27,748
[ "https://stats.stackexchange.com/questions/27748", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/966/" ]
Given the following two time series (<strong>x</strong>, <strong>y</strong>; see below), what is the best method to model the relationship between the long-term trends in this data? Both time series have significant Durbin-Watson tests when modelled as a function of time and neither are stationary (as I understand t...
Matt, You are very right in the concerns that you have raised with respect to using unnecessary differencing structure . In order to identify an appropriate model <img src="https://i.stack.imgur.com/UZE3l.jpg" alt="enter image description here"> for your data yielding significant structure while rendering a Gaussian Er...
I don't understand that advice either. Differencing removes polynomial trends. If the series are similar because of the trends differencing essentially removes that relationship. you would only do that if you expect the detrended components to be related. If the same order of differencing leads to acfs for the resi...
https://stats.stackexchange.com
251,328
[ "https://physics.stackexchange.com/questions/251328", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/111661/" ]
I don't understand why heat transfer from hot reservoir to the system is considered reversible in this case:<br> $T_{reservoir}$ = $T_{system}$ + dT but it's considered irreversible in this case:<br> $T_{reservoir}$ = $T_{system}$ + ΔT Where dT is infinitesimal difference while ΔT is finite difference in temperature ...
To do it reversibly, you can heat the body from $T_1$ to $T_2$ (i.e., over a finite temperature change) using an infinite sequence of constant temperature reservoirs, in which each reservoir in turn is only dT higher in temperature than the body at any time (and also only dT higher in temperature than the reservoir bef...
It is reversible in the first case because it satisfies the reversibility definition. A thermodynamic process is called reversible if an infinitesimal change of the external condition reverses the process. Consider a system at temperature $T$ in thermal contact with a thermal reservoir at same temperature. By an infini...
https://physics.stackexchange.com
191,408
[ "https://physics.stackexchange.com/questions/191408", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/48764/" ]
I could prove that $d\vec{p}/dt = m\vec{a}$, but how can I prove that $\vec{F_{net}}=d\vec{p}/dt$? Is force just defined by this expression? What is the rigorous definition of a general force? In my textbook (matter and interactions vol.1), force is qualitatively defined as a "quantity of interaction". <hr> <strong><...
I had this kind of question myself for a long time because before studying Physics I've studied Math and in Mathematics we do things quite differently. In Mathematics, a general procedure is to give some definitions, probably by specifying some axioms, then we derive and prove theorems from this. On Physics there is a...
Equations of motions <strong>need not</strong> be proven: they are such because they are experimentally true and there is no basic reason for that (at this point I wonder how you proved that $\dot{\textbf{p}} = m \textbf{a}$: you must have done so just re-writing a different form of the same equation, or any other star...
https://physics.stackexchange.com