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
956,775
[ "https://math.stackexchange.com/questions/956775", "https://math.stackexchange.com", "https://math.stackexchange.com/users/104016/" ]
Consider the set $ \Bbb R^n = \{ x = (x_1, ..., x_n) : x_1, ..., x_n \in \Bbb R \}.$ For $x,y\in \Bbb R^n$, we define $&lt;$,$\leq$ as below: $$ x&lt;y \iff j \in \{1,..,n \} (x_j&lt;y_j) \wedge \forall i \in \Bbb N (i&lt;j \to x_i=y_i).$$ $$x \leq y \iff (x&lt;y) \vee (x=y). $$<br> $"&lt;"$ defines on $ \...
Compare on the first component and in case of a tie compare on the second component and in case of a tie compare on the third component... $\le$ is the non-strict version of $&lt;$. <strong>Antisymmetry</strong>: if two elements compare both ways ($\le$ and $\ge$), then their first components compare both ways, and t...
To answer your question about the correlation, suppose you have a dictionary of all the 4 letter words in the English language. For instance, you have the words $x$ and $y$ where $(x_1,x_2,x_3,x_4) = (D,A,N,G)$ and $(y_1,y_2,y_3,y_4) = (D,A,R,N)$. The reason that DANG comes before DARN in the dictionary is that if we t...
https://math.stackexchange.com
27,335
[ "https://softwareengineering.stackexchange.com/questions/27335", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/8594/" ]
I've been reading and thinking a lot lately, and I've come to the conclusion that I maybe I should rethink my web development strategy. I'm doing a lot of on-the-fly programming, and in the 2 years I've been working on a PHP web application, what might have begun as a little tool became quite the big project. But there...
Pretty much the same way you approach any kind of legacy code. You find a piece that's testable, you write tests for it, and refactor. If you can't find a piece readily testable, you'll need to make it testable without the safety harness of a test suite, in which case you very carefully change some almost-testable pie...
There's a great book about this called "Working Effectively with Legacy Code" by Michael Feathers. Let's face it, we all have legacy code. The main thing is to test-drive the new code that you're creating. As you have to touch other pieces of code, you'll find opportunities to get those under test as well. It's a l...
https://softwareengineering.stackexchange.com
152,467
[ "https://mathoverflow.net/questions/152467", "https://mathoverflow.net", "https://mathoverflow.net/users/43959/" ]
Consider the Sobolev space $W^{s,2}=H^s$ for $s=\frac{1}{2}.$ Let $\Omega \subset \mathbb{R}^n$ be an open set with boundary $\partial\Omega$. I have seen two definitions of the space $H^s(\partial\Omega)$: 1) (From Demengel &amp; Demengel) As the set of functions $u:\partial\Omega \to \mathbb{R}$ such that $$\lVert{...
1) Yes it is that simple. It is a special case of the so called Slobodeckij norm for Sobolev and more generally Besov spaces. 2) Not as much a need as it offers you a different perspective. Note that there is a third definition: One can also define $H^{1/2}(\partial\Omega)$ as the trace space of $H^1(\Omega)$. When yo...
One more remark on the definition of Sobolev spaces. Given a general metric measure space $(X,d,\mu)$, where $(X,d)$ is a metric space and $\mu$ is a locally finite Borel measure on $X$, one has at least four different definitions for Sobolev spaces, which are equivalent in very general context. I strongly recommend t...
https://mathoverflow.net
133,148
[ "https://mathoverflow.net/questions/133148", "https://mathoverflow.net", "https://mathoverflow.net/users/27398/" ]
Let $k$ a separably closed field. Do we have that $k((t))$ is of cohomological dimension one?
No to everything. More generally, consider any complete discrete valuation ring $R$ with uniformizer denoted $t$ and separably closed residue field $k$, and let $K = {\rm{Frac}}(R)$. We allow ${\rm{char}}(K) = 0$, since that case has some interest (e.g., $R$ could be the completion of the maximal unramified extension o...
I think the answer to the question about cohomological dim is yes. In fact, Artin proved in SGA4, exp.xix that, for any complete (or more generally, henselian excellent) equi-char. local domain $A$, $K$ its fraction field, and $k$ the residue field, one has $$cd_l(K)\leq dim(A)+cd_l(k)$$ for every prime $l\neq char(k)...
https://mathoverflow.net
395,031
[ "https://softwareengineering.stackexchange.com/questions/395031", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/255754/" ]
I would like to introduce permissions based access control in my Single Page Application (SPA) front-end which authenticates the user with token based authentication (JWT). <strong>Permission Requirement:</strong> In my SPA, each required (html) element is mapped to a permission and depending on the availability of t...
The longer a branch lives, the more it is able to diverge from the main branch and the messier and more complicated the resulting merge will be when it's finally finished. Ten small conflicts are easier to resolve than 1 massive conflict, and may actually prevent developers from duplicating or wasting effort. Given tha...
Assuming your intention is to eventually merge A, B back into master and maintain a single code base, it is never a good idea to deviate from master too far. Deviating from master for too long, especially when bug fixes and other development are merging to master as A, B are being developed, will certainly cause confli...
https://softwareengineering.stackexchange.com
210,816
[ "https://mathoverflow.net/questions/210816", "https://mathoverflow.net", "https://mathoverflow.net/users/75707/" ]
Let $\mathit{Pr}^L$ be the $\infty$-category of presentable $\infty$-categories and continuous functors in some universe. Is it presentable itself a larger universe?
When you pass to a larger universe, all categories that were in your old universe become small. A small category which is not a poset cannot be closed under colimits (think about taking coproducts with index sets larger than your category), and so cannot be presentable. All this applies equally well to $(\infty,1)$-c...
Let us fix a universe and use the words "large" and "small" with respect to that universe. Presentable $\infty$-categories are typically large $\infty$-categories (since, as the previous answer mentioned, small $\infty$-categories are rarely presentable). One might then expect that $Pr^L$ would be a "very large" $\inft...
https://mathoverflow.net
380,572
[ "https://physics.stackexchange.com/questions/380572", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
Apologies for the simplicity of this question. I don't have the data at hand to tackle it. It's been bugging me since I thought of it. If all the matter in the universe was packed into a ball with the density of a neutron star how large would it be, what would be its radius? Obviously, there is two types of matter. ...
The energy density of the universe is $\sim 10^{-26}$ kg/m$^{3}$. Visible matter constitutes something of the order of a percent of this energy density. The energy density of a neutron star is $\sim 10^{17}$ kg/m$^{3}$. Therefore a neutron star is $\sim 10^{45}$ times denser than the visible matter. Compressing the sph...
Given that there are $N = 10^{80}$ baryons in the observable universe, and the nucleon radius is $R_p=0.8\,{\mathrm{fm}}$, go with: $$ R_{all} \approx N^{\frac{1}{3}}R_p = 2.5\ AU,$$ which is reasonably close to @Philo.
https://physics.stackexchange.com
143,654
[ "https://softwareengineering.stackexchange.com/questions/143654", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/31950/" ]
I've been wanting to find a solid answer to the question of whether or not to have runtime checks to validate input for the purposes of ensuring a client has stuck to their end of the agreement in design by contract. For example, consider a simple class constructor: <pre><code>class Foo { public: Foo( BarHandle bar ...
I don't think there is a single answer to this. I think the main thing that's necessary is consistency -- either you enforce <em>all</em> preconditions on a function, or else you don't try to enforce <em>any</em> of them. Unfortunately, that's fairly rare -- what typically happens is that instead of thinking about the ...
It's a very difficult question, because there are several different concepts: <ul> <li>Correctness</li> <li>Documentation</li> <li>Performance</li> </ul> However this is mostly an artifact of a <em>type</em> fault, in this case. Nullity is better enforced by type constraints, because the compiler actually checks thos...
https://softwareengineering.stackexchange.com
20,207
[ "https://physics.stackexchange.com/questions/20207", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7277/" ]
If there's a mechanism for space-time expanding faster than the speed of light, is there an example of It contracting in the same manner? If whatever mechanism is causing it to expand, can the underlying mechanism reverse itself?
The equation of motion for cosmology from general relativity have a time reversal symmetry, even with a positive cosmological constant to explain dark energy. So any solution of the equations that features an expansion from a big bang can be reversed to give another solution in which the universe contracts towards a bi...
Both the early inflationary expansion of the universe and the "recent" accelerated expansion of the universe are thought to be driven by a positive vacuum energy content in space. The early inflationary expansion had a much larger positive vacuum energy density than the current accelerated expansion caused by the Dark...
https://physics.stackexchange.com
2,291,167
[ "https://math.stackexchange.com/questions/2291167", "https://math.stackexchange.com", "https://math.stackexchange.com/users/427204/" ]
$$(x+x^2+x^3+x^4+x^5)\cdot (x^2+x^3+x^4+…)^5$$ I have done a little : $$x(1 + x+x^2+x^3+x^4)\cdot x^{10}(1 + x^2+x^3+…)^5$$ By generating functions: $$\begin{align}&amp;x^{11}\cdot\frac{1 - x^5}{1-x}\cdot\frac{1}{(1-x)^5}\\[1ex] \implies &amp;x^{11}(1 - x^5)\cdot\frac{1}{(1-x)^6}\\[1.5ex] \implies &amp;x^{11}(1 - ...
Induction on positive integers $n$: <ul> <li>When $n=1$, $n^2 + n = 2$ which is obviously divisible by 2. </li> <li>Assume when $n=k$, that $k^2 + k$ is divisible by 2. </li> <li>When $n=k+1$, we have $$(k+1)^2 + k+1 = k^2 + 2k + 1 + k + 1 $$$$= (k^2 + k) + 2(k+1)$$ From our assumption, $k^2+k$ is divisible by 2 and ...
Hint: $(n+1)^2 + (n+1) = n^2 + 2n + 1 + n + 1 = n^2 + n + 2n+ 2= (n^2 + n) + 2(n+1)$.
https://math.stackexchange.com
295,904
[ "https://mathoverflow.net/questions/295904", "https://mathoverflow.net", "https://mathoverflow.net/users/121665/" ]
For <span class="math-container">$0&lt;\alpha&lt;n$</span> and <span class="math-container">$n\geq 2$</span> we define the <em>Riesz potential</em> by <span class="math-container">$$ (I_\alpha f)(x) = \frac{1}{\gamma(\alpha)} \int_{\mathbb{R}^n} \frac{f(y)}{|x-y|^{n-\alpha}}\, dy\, , \quad \text{where} \quad \gamma(\al...
This is an extended version of my comment. <hr> Let $g_t$ be the Gauss–Weierstrass kernel, $$ g_t(x) = \frac{1}{(4 \pi t)^{n/2}} \, e^{-|x|^2/(4t)} . $$ If $\alpha \in (0, n)$, we have $$ \begin{aligned} \frac{1}{\Gamma(\tfrac{\alpha}{2})} \int_0^\infty g_t(x) t^{\alpha/2 - 1} dt &amp; = \frac{1}{2^n \pi^{n/2} \Gam...
<blockquote> <strong>Theorem.</strong> <em>If <span class="math-container">$\alpha,\beta&gt;0$</span>, <span class="math-container">$\alpha+\beta&lt;n$</span>, then <span class="math-container">$I_\alpha(I_\beta\varphi)=I_{\alpha+\beta}\varphi$</span> for <span class="math-container">$\varphi\in\mathscr S_n$</sp...
https://mathoverflow.net
54,920
[ "https://mechanics.stackexchange.com/questions/54920", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/38130/" ]
I tried to bleed system but when I step on pedal no fluid comes out of the bleeder bolt.
This largely depends on the type of machine that was used and the condition of the steering and suspension parts. The toe on the RF was only slightly off. If it’s a newer machine with the fancy stuff it only takes a couple of minutes to mount the heads or targets, do runout and a caster sweep. A few more minutes for a...
It also depends on the adjustments available on the vehicle in question. Not all vehicles can be adjusted in every dimension, so an alignment may just be to make sure the tires are pointed in the right direction. Some vehicles don't have toe adjustment in the rear (solid and or beam axle), and most vehicles don't have ...
https://mechanics.stackexchange.com
75,410
[ "https://chemistry.stackexchange.com/questions/75410", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/45879/" ]
I had asked a question on a IA Past Paper: <blockquote> Predict the structure of <span class="math-container">$\ce{N2F2}$</span> using VSEPR Theory. </blockquote> Now I'm not that strong at VSEPR theory. For the most part, I understand it when it involves a central atom and a ligand, but how does it work for other ...
The reason that your solid mixture is clumping and hardening inside your airtight container is that the reaction between the two compounds is producing water as follows: $$\ce{C6H8O6 + NaHCO3 &lt;=&gt; NaC6H7O6 + CO2 + H2O}$$ where $\ce{C6H8O6}$ is ascorbic acid. This reaction proceeds rapidly in the presence ...
The sodium bicarbonate (a base) is reacting with the ascorbic acid to form sodium ascorbate and carbon dioxide, as well as water. The carbon dioxide is responsible for the fizzing you note when you dissolve the mixture in water. When you mix the two solids, the reaction is relatively slow, since the reaction must take ...
https://chemistry.stackexchange.com
288,246
[ "https://mathoverflow.net/questions/288246", "https://mathoverflow.net", "https://mathoverflow.net/users/13767/" ]
Let $M\colon \partial_- M \to \partial_+ M$ be an oriented, compact cobordism. Assume that there is a handle decomposition with at most one 0-handle, and denote the handle bodies by $M_i, i \in \{0,\dots 4\}$. It is known ("On attaching 3-handles to a 1-connected manifold" by Bruce Trace) that if $M$ is simply connect...
3-handles do matter. The reason why they're not usually there is because people often care about closed 4-manifolds; in this case, there is an essentially unique way of attaching all 3-handles to the boundary of (in your notation) $M_2$, which is just $\#^n(S^1\times S^2)$ for some $n$. The result is due to Laudenbach ...
If you want a specific example where $M$ is not determined by $\partial_- M$, $\partial_+ M$, and $M_2$, here is a simple one. Write the 4-disc $D^4$ as a $0$-handle, a $2$-handle, and a $3$-handle that cancels the 2-handle. And write $(S^1 \times S^3) \setminus D^4$ as a $0$-handle, a $1$-handle, and a $3$-handle (t...
https://mathoverflow.net
74,298
[ "https://mechanics.stackexchange.com/questions/74298", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/54994/" ]
I recently purchased a 1994 Toyota Pickup 2x4 that otherwise runs great, but has a strange transmission issue. If I hold the clutch down for too long, it's impossible to shift into gear. Either there will be resistance from the shifter making it difficult to shift into first / reverse, or if I am able to shift withou...
If its a hydraulic clutch, it may be bleeding off, either a leak or a bypassing clutch master cylinder.
Sounds to me like a worn synchro in the gear box, so the thing will only engage on the worn gear when the wheels match the position of the gear to be engaged. When you quickly depress the clutch, things are still moving so it will engage. This may be annoying, but it's not going to cause the transmission to fail. More ...
https://mechanics.stackexchange.com
17,976
[ "https://dba.stackexchange.com/questions/17976", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Is it possible to connect to the DAC using SSMS? If I understand correctly, it should be possible by using "admin:" prefix before the server name, but I receive the following message: <blockquote> Dedicated administrator connections are not supported via SSMS as it establishes multiple connections by design. (Mi...
You cannot connect the object explorer with the DAC. You need to use a single query window, and you can right-click on it to Connect/Change Connection. The nature of object explorer is that it uses multiple connections, which is not allowed with the DAC. Another piece with the DAC, out of the box it only allows loca...
This error occurs when you try to connect to DAC using the right click Connect and the <strong>Connect to Server</strong> dialog from the Object explorer However, you can connect to DAC via SSMS by clicking the <strong>Database Engine Query</strong> button <img src="https://i.stack.imgur.com/5en6H.png" alt="enter ...
https://dba.stackexchange.com
257,398
[ "https://dba.stackexchange.com/questions/257398", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/198865/" ]
I have a script which runs the following: <pre><code>pg_restore tmp/latest.backup --verbose --clean --no-acl --no-owner --dbname hub_development --jobs=12 </code></pre> This frequently fails with the following error: <pre><code>error: could not find block ID 4584 in archive -- possibly due to out-of-order restore re...
UPDATE: the &quot;a worker process died unexpectedly&quot; issue was fixed upstream in PostgreSQL 12.4! Upgrade to get the fix. For the best compatibility and performance with <code>pg_restore</code> have your <code>pg_dump</code> write the dump file to a local file on disk instead of an unseekable file descriptor.
I had this issue. For me the solution was to use an older version of postgres in development. Our production server was using 9.x or 10.x but I was trying to restore using postgres 12.x. Downgrading to 10.x worked for me.
https://dba.stackexchange.com
127,604
[ "https://cs.stackexchange.com/questions/127604", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/122794/" ]
By unrolling the recursion, <span class="math-container">\begin{equation*} \begin{split} T(n) &amp;= T(\sqrt{n}) + 3 = T(n^{\frac{1}{2}}) + 3 \\ &amp;= (T(n^{\frac{1}{4}})+3) +3 = T(n^{\frac{1}{4}}) +6 \\ &amp;= (T(n^{\frac{1}{8}})+3) + 6 = T(n^{\frac{1}{8}}) +9 \\ \end{split} \end{equation*}</span> Claim:...
Where are you using that T(n) = c for n &lt;= 10? Your formula is wrong when the argument is less than 10. K = 1 is not the base case. N &lt;= 10 is the base case. Clearly T(n) = c for n &lt;= 10, T(n) = c+3 if 10 &lt; n &lt;= 100, T(n) = c+6 if 100 &lt; n &lt;= 10,000, T(n) = c+9 if 10,000 &lt; n &lt;= 100,000,000 etc...
Assume the following: <span class="math-container">$T(n) \leq c\log_2(\log_2(n)), n &gt; 10$</span> and <span class="math-container">$T(4) = c$</span> as a base case (because <span class="math-container">$4^2 &gt; 10$</span>.) Now we can proceed by induction:<br> <strong>Base case:</strong> <span class="math-container"...
https://cs.stackexchange.com
189,736
[ "https://physics.stackexchange.com/questions/189736", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/72892/" ]
When an excited state couples to the vacuum, it has an infinite number of directions of the quantized electromagnetic field to couple to. Does it evolve into a superposition of all those directions at the same time and only collapses once the photon is measured, or does it couple to only one? (Or, of course, is there n...
There isn't really an answer to this. If your initial conditions are spherically symmetric then the system remain spherically symmetric and the emitted light will be in a superposition of all directions. The superposition will collapse, and the symmetry be broken, only when something interacts with your system e.g. a C...
There are two principal factors that affect the polarization and direction of the spontaneously emitted radiation: <ul> <li>The mode structure of the field</li> <li>The properties of the transition (i.e., the properties of the two levels between which the transition occurs).</li> </ul> <strong>The mode structure of the...
https://physics.stackexchange.com
164,634
[ "https://electronics.stackexchange.com/questions/164634", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/72219/" ]
Good Day EESE. After reading a lot of info and forums (on other sites) regarding shunts, and as everyone here seems pretty intelligent, as I only went to a public school ;) possibly you may answer this question. I have a competition car stereo system and I'm looking to add an ammeter to my vehical. My alternator puts o...
2nd Update: With the assistance of those on this forum (thank you), and with my trial and error, I thought it be fair to share what I have 'learned', in consideration that another like me encounters the same head scratching dilema as I regarding the wiring of shunts, or moreso the ammeters reading, what it actually mea...
A shunt is just a low value resistor that (like all resistors) drops a voltage proportional to the current flowing through it. A 500A 75mV shunt drops 45mV at 300A, so your 300A @ 75mV ammeter will only read 60% of the true value. You need to match the shunt to the meter.
https://electronics.stackexchange.com
16,925
[ "https://mechanics.stackexchange.com/questions/16925", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/10470/" ]
Want to: attach some hooks on the inside of my car, so I can hang stuff on them. The problem: The inside of my car consists of hard plastic panels. But when I try to get a screw in them, it gets lose very quickly because of the thickness of the material. Glue is another option, but that seems so permanent. If I s...
The only type of vehicle you need wait on is a diesel powered one. The reason for that is you need to wait (in most of them) for the glow plugs to heat the combustion chamber. Modern fuel injected cars will keep their fuel pressure after shutdown. It will stay there (usually) for a good 24 hours (<strong>Note:</strong>...
I used to do this with my Ford Fiesta and Puma - it's all about fuel. When the ignition key is turned on, the fuel pump runs for a few seconds, then shuts off. This ensures there is enough fuel pressure in the rail to start (since a richer mixture is required to start when cold). The Puma did not like me turning the ke...
https://mechanics.stackexchange.com
1,503,704
[ "https://math.stackexchange.com/questions/1503704", "https://math.stackexchange.com", "https://math.stackexchange.com/users/285120/" ]
I have this problem: <blockquote> Prove that $\mathbb{|Q| = |Q\times Q|}$ </blockquote> I know that $\mathbb Q$ is countably infinite. But then how can I prove that $\mathbb{|Q\times Q|}$ is countably infinite? Thanks you!
Whatever proof you have that $\mathbb Q$ is countably infinite probably relies on a mapping between elements of $\mathbb Q$ and elements of $\mathbb {Z \times Z}$. But to say that $\mathbb Q$ is countably infinite is to put it in correspondence with $\mathbb Z$. Use this fact, then repeat the original proof.
Use $\mathbb{|N\times N|=|N|}$ and $\mathbb{|N|=|Q|}$.
https://math.stackexchange.com
260,308
[ "https://electronics.stackexchange.com/questions/260308", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/104851/" ]
My little baby is now mobile and I'm afraid he gets his hand in the mains slot. I planned to buy this dummy cover from amazon but the reviews said it's safer not to use it at all. People say it cancels the ground or something. The slots in my house are UK ones with the on/off button. All of them are quite low and rea...
<strong>Don't mess with the sockets</strong> Modern (i.e. post 1950) sockets in the UK are very good. They are designed to make it very difficult to get a shock. There are three pins, earth, live and neutral. Earth is the one at the top, and is safe to touch, live and neutral are below, and have plastic shutters prote...
You don't need to do anything. The UK socket is very safe, it has an internal shutter so there is no path for anything to poke into the live (or neutral). There is a campaign to stop people using the plug-in covers you've seen, since they make the socket if anything more dangerous, since pushed in incorrectly they can...
https://electronics.stackexchange.com
645,726
[ "https://math.stackexchange.com/questions/645726", "https://math.stackexchange.com", "https://math.stackexchange.com/users/113813/" ]
I'm specifically looking for help analyzing the following DFA. What steps would one follow to show what language this particular DFA accepts? To me it seems quite random, and I can't figure out a decisive way of showing that it accepts language $L$. Note: $q_0$ is the start state and $q_3$ is the final state. <img sr...
The eigenvalues are $\{\|v\|^2, 0, 0, 0\}$. Consider $$Av = (vv^T)v = v (v^Tv) = v \|v\|^2 = v\lambda .$$ So we conclude $v$ is an eigenvector and $\|v\|^2$ is an eigenvalue. Now consider the mutually orthogonal $u_1$, $u_2$, $u_3$ such that $\mathrm{span}(u_1, u_2, u_3) \perp v$, then $$Au_i = (vv^T)u_i = v (v^Tu...
Note that for some vector $ w $, $ A w = v ( w \cdot v) $. If you choose an orthonormal basis $ \{ e_1 = \frac{v}{|v|}, e_2, e_3,e_4 \} $, then is it easier?
https://math.stackexchange.com
1,466,595
[ "https://math.stackexchange.com/questions/1466595", "https://math.stackexchange.com", "https://math.stackexchange.com/users/94401/" ]
I came across the following problem while reading Spivak's Calculus on Manifolds. <blockquote> Prove that a compact subset of $\mathbb{R}^n$ is closed and bounded. </blockquote> The definition of an open set in the book is a set $A$ in which for all $x \in \mathbb{A}$, there exists an open rectangle $U$ such that $...
I think that your argument is simple enough, though it has some holes. First, you claim that any finite open cover has finite volume. This may not be true if the open sets are unbounded. Instead, construct an open cover (Say, the rectangle of side lengths all 1 centered at $x$ for all $x\in A$) which contains only boun...
Alternatively you could use a similar construct and collapse both cases ($A$ is open and $A$ is unbounded) into the same case. Your construct in the first case is basically that you construct a covering of "shells" around a limit point outside $A$, where each "shell" is essential to cover $A$. The same can be done wi...
https://math.stackexchange.com
34,720
[ "https://chemistry.stackexchange.com/questions/34720", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/30140/" ]
We have to select the set of elements which will have almost the same atomic radii: <ol> <li>$\ce{O, S, Se, Te}$</li> <li>$\ce{Li, Be, B, C}$</li> <li>$\ce{Fe, Co, Ni, Cu}$</li> </ol> I googled the atomic radii of the third set and found them to be extremely close to one another: all of them are nearly $\pu{125 pm}$ ...
Atomic radius is inversely proportional to the effective nuclear charge. As we move from left to right in a period the effective nuclear charge increases. This will decrease the radius of an atom. At the same time, in transition elements the number of electrons in the 3d sub-shell will increase. This will repel the alr...
I think the point of this question is for you to realise that options 1 and 2 <em>can't</em> be the correct answer. As you go down a group, new electron shells are occupied which extend further from the nucleus, increasing the atomic radius. Therefore option 1 must be wrong. Effective nuclear charge increases across ...
https://chemistry.stackexchange.com
3,487
[ "https://iot.stackexchange.com/questions/3487", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/7382/" ]
I am working on IoT project in which I need to send alerts to users based on rules which already defined by user like if Temperature value matches certain condition then send alerts to users and their are multiple conditions.<br> I achieved to send the alerts to users when condition matches by using following steps: <...
This is typically called a rule-engine where you define rules, and actions to be taken when a rule is met/breached. And this is a common requirement and not specific to IoT. There is no specific technology for rules I know of. But rule engines are provided by platform vendors. For e.g, if you use Azure's IoT services ...
you describe node-red, a free input-processing-output app well-suited for IOT. It lets you drag and drop many forks and conditionals to your info flow. It support mqtt, sockets, and http out of the box. If you need more power, you can write complex JS functions with a central state to supplement the GUI-based tools.
https://iot.stackexchange.com
76,197
[ "https://electronics.stackexchange.com/questions/76197", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/20711/" ]
For a PLL in short, 1) What controls loop bandwidth? 2) What impact does it have on output phase noise/jitter? 3) What impact does loop bandwidth have on PLL lock time? I am trying to find answers to these questions, could you help?
<ol> <li>The loop bandwidth is controlled by the gain of the loop.</li> </ol> This gain includes the phase detector gain, any dividers in the loop, and the VCO tuning constant. If we break the loop at the VCO tuning input, we are controlling the frequency, but measuring the phase. This gives us a pure integrator. The l...
The loop bandwidth is entirely controlled by the gain of the loop. Of necessity, the loop filter is more or less inactive at the frequency of the loop bandwidth, and so has little influence on the loop bandwidth. It does have a large influence on loop stability, and loop quality. Above the loop bandwidth, the loop filt...
https://electronics.stackexchange.com
130,022
[ "https://mathoverflow.net/questions/130022", "https://mathoverflow.net", "https://mathoverflow.net/users/26223/" ]
Given a (splitting) $p$-modular system $(K, \mathcal{O}, k)$ for a finite group $G$, any given simple character $\chi$ is afforded by some $KG$ module $V_\chi$, and there in general many non-isomorphic $\mathcal{O}G$ modules $B$ (free as an $\mathcal{O}$ module) such that $B\otimes_{\mathcal{O}} K\cong V_\chi$ (call $B...
The answer to your basic question is certainly no, though it would take me some time to provide convincing examples. Decades ago I raised a similar question with experts like Walter Feit and Jon Alperin, who assured me that almost anything is possible when choosing the form $B$: the modular reduction might be indecom...
I am working from memory, but I believe that there is a proof in Feit's Book "Representations of finite groups" that if the prime $p$ is sufficiently ramified in the dvr then it can even be the case that the reduction (mod $p$) of (a module affording) $\chi$ can be completely reducible. In any case, that is a true stat...
https://mathoverflow.net
49,997
[ "https://electronics.stackexchange.com/questions/49997", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1623/" ]
I'm building an 8-bit register from d-type flipflops in VHDL for a lab exercise but I can't seem to diagnose a problem. Firstly I can't get it to compile because of the difference in types for the input clock. My project is called <code>eightBitRegister</code> so its not because my definition uses a different name. So ...
Your error says: <code>eightBitRegister</code>, but your code says: <code>eigthBitRegister</code>. ( <strong>ht</strong> vs <strong>th</strong> ) So you are probably trying to instantiate an entity that does not exist <em>as spelled</em>. The second error is just a type error you introduced (<code>bit</code> vs <cod...
&quot;Error: Top-level design entity &quot;<em>NAME</em>&quot; is undefined&quot; This is what I did to correct. <ol> <li>check paths for spaces, none allowed.</li> <li>check entity name can not start with number.</li> <li>Assignment - Settings - General - Top-Level Entity - &quot;...&quot;</li> <li>From bottom up. se...
https://electronics.stackexchange.com
111,090
[ "https://softwareengineering.stackexchange.com/questions/111090", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/31560/" ]
I consider myself an intermediate Python programmer and have been offered an opportunity to be a trainer for a beginner Python programming class. I was wondering if this would really widen my programming repertoire. Has somebody had an enlightening experience after they successfully trained a group of people? Does it...
In my experience, teaching programming did make me better. It forced me to get a much better understanding of concepts I had previously just accepted or taken for granted. When I had to articulate ideas that were old to me but new to students, in a number of different ways (because not everyone learns the same way from...
An old University of Texas study made the following findings. People retain: <ul> <li>10 percent of what they read </li> <li>20 percent of what they hear</li> <li>30 percent of what they see </li> <li>50 percent of what they see and hear </li> <li>70 percent of what they do</li> <li>90 percent of what they <strong>te...
https://softwareengineering.stackexchange.com
228
[ "https://cardano.stackexchange.com/questions/228", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/871/" ]
Want to understand if there can be scenarios where a stake pool gets penalised even though it does not act maliciously. If this risk exists, what are the possible cases that can lead to penalties and is there an official documentation on it? For example: will there be penalties if the node goes offline?
It can't. But that doesn't mean different smart contracts can't interact. The interaction must simply happen in the same transaction. As an example, imagine you have some Uniswap-like liquidity pool as one UTxO and another UTxO belonging to an auction contract. Then you can use the pool to swap tokens and then use the ...
In simple words, it probably can't (even thought we do know the final Plutus design yet). If two smart contacts needs to interact between each other, they need to provide each other inputs to consume, just like it would be the case with end-user.
https://cardano.stackexchange.com
69,053
[ "https://physics.stackexchange.com/questions/69053", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7182/" ]
This is a conceptual question about the application of Bernoulli's equation to a water spout. There is a classical problem found in many physics texts which goes something like "you have a garden hose with a nozzle which flares inward so the radius is smaller at the end. How high does the water shoot into the air?" S...
The pressure in the stream must be approximately atmospheric, which causes the two solutions to be identical. Fluid will naturally want to accelerate down a pressure gradient; there's more force on one side than the other, so there's a net force and thus the fluid will accelerate. Viscosity can prevent this accelerat...
It is an empirically observable fact that subsonic jets (of which your water spout is an example) do in fact exit into a quiescent medium at the pressure of that very medium. The water will leave the nozzle at precisely the ambient pressure if the exit Mach number is less than 1.
https://physics.stackexchange.com
473,035
[ "https://physics.stackexchange.com/questions/473035", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/228374/" ]
<ol> <li>What happens when a resistor of very high resistance (say <span class="math-container">$10,000\ \Omega $</span>) is connected in parallel with a resistor of comparatively lower resistance of about (say <span class="math-container">$100\ \Omega $</span>)? Is the overall resistance going to be lesser than <span...
When 2 resistors are connected in parallel, the resulting total resistance is given by <span class="math-container">$$\frac{1}{R}=\frac{1}{R_1}+\frac{1}{R_2}$$</span> From that you can see that, if a very large resistance <span class="math-container">$R_2$</span> is put in parallel with <span class="math-container">$...
<blockquote> What happens when a resistor of very high resistance (say 10,000 ohms) is connected parallelly with a resistor of comparatively lower resistance (about 100 ohms)? </blockquote> Current flows through each resistor according to Ohm's Law. If you apply a voltage <span class="math-container">$V$</span>, then t...
https://physics.stackexchange.com
72,130
[ "https://dba.stackexchange.com/questions/72130", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/75911/" ]
What I have <pre><code>Table A Table B ID ID_Fruit ,,, so on ID ID_Fruit ID_CRATE DateTime 1 1002 i_1 1002 1 2014-07-28 00:00.000 2 4534 i_2 1002 ...
Yes, shouldn't be too difficult, try: <pre><code>SELECT a.ID, a.ID_Fruit,,, so on b.ID, b.ID_Fruit, b.ID_Crate, b.[DateTime] FROM TABLEA a INNER JOIN TABLEB b ON a.ID_Fruit = b.ID_Fruit INNER JOIN (SELECT ID_Fruit, MAX([DateTime]) FROM TABLEB GROUP BY ID_FRUIT) maxtime ON b.[DateTime] = maxtime.[DateTime] </cod...
I get the suggestion of @blobbles and rewrite my response. I divide my answer into two parts for convenience: <ol> <li>In the case of table A contains all the <code>idFruit</code> of table B or when data quantity are not so big. <pre><code>WITH fruit AS ( SELECT idFruit, MAX (dt) dt FROM B WHERE b.idCra...
https://dba.stackexchange.com
389,117
[ "https://mathoverflow.net/questions/389117", "https://mathoverflow.net", "https://mathoverflow.net/users/4707/" ]
Consider the following diagram of algebraic varieties: <span class="math-container">$$\mathbb{A}^0 \to \mathbb{A}^1 \rightrightarrows \mathbb{A}^2$$</span> Here the first arrow is the inclusion of the origin into the line, and the next two are the inclusion of the line into the plane as the X and the Y axes. <blockquot...
We can rewrite the coequalizer as the pushout of the diagram <span class="math-container">$$ \begin{array}{ccc} X &amp; \to &amp; \mathbb A^2 \\ \downarrow &amp; &amp; \\ \mathbb A^1 &amp; &amp; \\ \end{array} $$</span> where <span class="math-container">$X$</span> is the union of the <span class="math-con...
Dan Petersen has already answered the hard part -- how to show that the affine pushout <span class="math-container">$\{ f \in k[x,y] : f(t,0) = f(0,t) \}$</span> is also the scheme push out. I write to record a discussion in the comments about how to see that this ring is finitely generated and obtain an explicit list ...
https://mathoverflow.net
531,053
[ "https://physics.stackexchange.com/questions/531053", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/254101/" ]
<img src="https://i.stack.imgur.com/Hud7S.jpg" alt="graph of photocurrent versus collector potential"> I'm convinced with the graph except for when x=0. When <span class="math-container">$x=0$</span>, the collector is at 0 potential. So photoelectrons that are emitted from the plate are not influenced by any electric...
<blockquote> If electricity is produced by flow of electron, that is current, </blockquote> Current and electricity is <em>not</em> only electrons flowing. <ul> <li>Sure, it is <strong>electrons</strong> flowing in metal wires, but</li> <li>it is <strong>holes</strong> (positively charged) in semiconductors such as...
The word current is often used by itself instead of the longer, more formal "electric current". Electric current is defined as the rate at which charge flows through a surface. An ampere is the unit used to measure electric current. Since charge is measured in coulombs and time is measured in seconds, an ampere is th...
https://physics.stackexchange.com
532,415
[ "https://electronics.stackexchange.com/questions/532415", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/252083/" ]
I am currently reading my text, for my electromagnetics course, and we are discussing guided waves. The text casually mentions the term &quot;guided modes&quot;, and never really defines what that means.
A <em>mode</em> is a configuration of the electromagnetic field that is stable as the system evolves in time according to Maxwell's equations. Mathematically, it's an eigenstate of the differential equations and boundary conditions describing the system. A guided mode is a mode that is confined within a guiding structu...
I would typically use &quot;guided mode&quot; to refer to a mode moving down a waveguide. For example, the LP01 mode of an optical fiber would be a guided mode. The opposite of a guided mode would be a mode in free space. There may be other uses depending on context however.
https://electronics.stackexchange.com
1,002,021
[ "https://math.stackexchange.com/questions/1002021", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
My attempt: $$2\pi\int_0^{5} (25-y^2) dy$$ What's my error?
Hint: $x = 3$ and $x = \sqrt{25-y^2}$ intersect at $y = 4$ and $-4$ $$V = \pi \int_{-4}^{4} (25-y^2 - 9)dy = \pi \int_{-4}^{4} (16-y^2)dy$$ if you evaluate the integral you get $V = \frac{256\pi}{3}$ The Shell method of solving: Radius $= x$ and height = $2\sqrt{25-x^2}$ $V = 2\pi \int_{3}^{5} 2x\sqrt{25-x^2}dx ...
You must subtract the area of the segment formed by the $x=3$. Try taking the integrals in sections: <ul> <li>The integral of {the circle minus the line}</li> <li>Subtract that from the total integral of the circle</li> </ul>
https://math.stackexchange.com
65,341
[ "https://electronics.stackexchange.com/questions/65341", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10765/" ]
I'm trying to power a LED strand from one wart (5V), and my logic driver FPGA from another wart (also 5V). Both warts are plugged into the same outlet strip. I know I should probably power them from one, but I don't have the plugs on hand to rig both to the same plug. Both warts are 2 prong (not 3 prong). Can I send ...
Your 2 wall-warts by themselves don't have a common DC ground. Each one is isolated from AC. As a result, they are isolated from each-other. You should be able to power the circuits off two separate wall-warts and have them communicate. Connect the grounds GNDA and GNDB with a wire. It doesn't sound that you need ...
Tie the DC grounds together. They are isolated from the mains, and each other. Use caution if you're going to send 5V to your FPGA. Not all FPGAs can take it and not all development boards will protect you from yourself. Consult the documentation.
https://electronics.stackexchange.com
139,080
[ "https://electronics.stackexchange.com/questions/139080", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/28577/" ]
I have a question today that possibly crosses to another website, but i'm interested in your expertise here. It's more or less about music, but also about noise and electric current. Basically, I have a band, we rehearse in an old garage, where there is no earth connection and the house attached to the garage is about...
It's there to protect the B-E junction of Q1 from reverse breakdown. For positive input voltages, the B-E junction of Q1 will conduct, and the voltage at the base will be limited to about +0.65V. As long as R1 is sized appropriately to limit the current, fairly arbitrary positive voltages can be applied to the input. ...
That is called an "input clamping" diode. It's often done with two diodes, not just one (one to Vcc as well as one to GND), and is used to "clamp" the incoming voltage to ground minus the forward voltage of the diode (or Vcc plus the forward voltage for the upper diode). <img src="https://i.stack.imgur.com/jyZvD.gif"...
https://electronics.stackexchange.com
118,525
[ "https://electronics.stackexchange.com/questions/118525", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6041/" ]
I'm designing a radio with the Si4735 chip to use in a car, and I want to use the existing FM antenna for both FM and AM reception. I'm not sure how to go about this, exactly. How would I go about achieving this? The chip's reference schematic is as follows: <img src="https://i.stack.imgur.com/hRM2w.png" alt="enter im...
The usual technique is to use a pair of filters to connect the common antenna to the two chip inputs. Basically, a low-pass filter for the AM input and a high-pass filter for the FM input, although more-specific bandpass filters for each band would do a better job of rejecting out-of-band signals. Each filter has a hig...
The simplest way is to just parallel the two inputs up and hope for the best. It might work adequately but you might get some reflections that cause the FM stations to be partially weakened. It will barely affect AM reception in the same way because the wavelength of AM is hundreds of metres and reflections won't be a...
https://electronics.stackexchange.com
148,777
[ "https://softwareengineering.stackexchange.com/questions/148777", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/54158/" ]
This has never come up, so I've never thought how a data or programming model should work that simulates (a) bird's eye view of cars moving and some rudimentary physics, (b) how the cars would follow a road layout and (c) how an efficient data structure for roads would look like. Obviously, this question also means t...
I don't know whether you need life-perfect simulation or not, just one of my previous project as an example. <img src="https://i.stack.imgur.com/FaC9m.png" alt="enter image description here"> This was a part of the program for studying highway code (I'm not sure this is the correct word). It was developed in 1996 fo...
Roads need defined lanes: a spline that determines the center of each lane is probably the most convenient. Lane and shoulder boundaries may also make sense, if only for road-drawing purposes. The interesting datastructure element is the ability to split and merge lanes: your lane splines should be associated with ...
https://softwareengineering.stackexchange.com
299,496
[ "https://stats.stackexchange.com/questions/299496", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/54664/" ]
I am interested in machine learning; I have a particular liking for RNNs. I have coursework in some areas of computer science, e.g., data mining, optimization for ML algorithms, deep learning, and an undergraduate degree in mathematics. I have been applying ML algorithms for a while. I have some coursework in basic ...
As a statistics PhD student studying Bayesian deep learning and Gaussian processes, I have found it useful to be familiar with probability. I do not directly use the results for now because I am working on applied problems, but a lot of the theoretical work I look at is based on nonparametric techniques such as Gaussi...
<blockquote> Should I take a graduate level statistics course in Probability Theory that follows Durrett's textbook </blockquote> <strong>NO</strong>. I have seen exactly zero instances where the sort of measure-theoretic background that is explored in depth in books like Durrett and Klenke is actually used in ML...
https://stats.stackexchange.com
220,822
[ "https://softwareengineering.stackexchange.com/questions/220822", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/111162/" ]
A lot of languages like Java and C# have garbage collectors that free memory when that memory no longer has any reference. Yet they don't immediately free it after the reference counter hits zero but instead every once in a while they check on all the memory to see if that memory has any reference and delete it if it d...
Because in order to free memory as soon as the reference counter hits zero, you have to keep a reference counter. And that doesn't come for free. Typically, it limits your throughput. There are generally two major strategies for implementing garbage collectors: tracing collectors and reference counting collectors. (Th...
Because it would be too expensive to do it continuously. "Mark and sweep" garbage collectors periodically sweep the memory space for objects that have been dereferenced. Generational garbage collectors sweep those objects first that are most likely to have been disposed of recently (which turns out statistically to b...
https://softwareengineering.stackexchange.com
66,614
[ "https://physics.stackexchange.com/questions/66614", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/20155/" ]
I am Dutch, so I cycle a lot, hence the following question. Say I am standing at the top of a mountain on my bicycle. I have an amount of energy $E$ available. Say that after the slope of the mountain ends, there is an infinite long, straight, smooth road ahead. How do I get the furthest on this flat road? Options: a)...
First, avoid using brakes, obviously. Second, your instinct is right. In the most realistic scenario possible, with a set amount of energy available for peddling, option c is the best. Note though that the speed should be kept high enough to avoid wobbling and instability, which can make you need to spend more energy p...
Option C is best. This is because air friction is non-linear. Put another way, it requires more energy for the same distance when pushing a object faster thru the air. If all friction was linear, then speed wouldn't matter and there would be a finite fixed amount of energy required per distance. Since slower uses l...
https://physics.stackexchange.com
639,937
[ "https://physics.stackexchange.com/questions/639937", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/234368/" ]
In the article <em>Cosmic abundances of stable particles: Improved analysis, P. Gondolo and G. Gelmini, Nucl. Phys. B 360 (1991), p. 145-179</em>, they convert <span class="math-container">$\rm{d}^3p_1\rm{d}^3p_2=2\pi^2p_1p_2\rm{d}E_1\rm{d}E_2\rm{d}\cos{\theta}$</span> (eq.3.2) into <span class="math-container">$\rm{d...
Assume some general <span class="math-container">$A \bar{A}$</span> states where <span class="math-container">$\theta = \theta_{A \bar{A}}$</span>. The bound on <span class="math-container">$E_-$</span> is given by <span class="math-container">$|\cos \theta_{A\bar{A}}| \leq 1$</span> : <span class="math-container">\beg...
Since nobody has answered and I figured it out some time ago, I'll respond to my own post. You have to use the Jacobian to change variables: <span class="math-container">$$ J_{ij}=\frac{\partial y_i}{\partial x_j} = \begin{pmatrix} \frac{\partial E_1}{\partial E_+} &amp; \frac{\partial E_1}{\partial E_+} &am...
https://physics.stackexchange.com
27,240
[ "https://mathoverflow.net/questions/27240", "https://mathoverflow.net", "https://mathoverflow.net/users/6307/" ]
It seems to me (at least according to books and papers on the subject I read) that the field of automated theorem proving is some sort of art or experimental empirical engineering of combining various approaches, but not a science which tries to explain WHY its methods work in various situations and to find classes of ...
You may be interested in the wonderful little book ``The Efficiency of Theorem Proving Strategies: A Comparative and Asymptotic Analysis'' by David A. Plaisted and Yunshan Zhu. I have the 2nd edition which is paperback and was quite cheap. I'll paste the (accurate) blurb: ``This book is unique in that it gives asymp...
One way of looking at this question is work in termination analysis of logic programs (googling "termination analysis of logic programs" isn't a bad way to find some of the relevant research.) As an example, if the rules I am looking at look like this: <pre><code>lt(zero,succ(Y)). lt(succ(X),succ(Y)) &lt;= lt(X,Y)...
https://mathoverflow.net
692,996
[ "https://physics.stackexchange.com/questions/692996", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/290438/" ]
I'm just starting with quantum mechanics and I've got some questions. <ol> <li>Long after measurement of a position of a particle, does the wavefunction return to the same form, or does an entirely different form emerge that has nothing to do with the first form of the wavefunction of the particle? I mean the expressio...
<ol> <li>In general, no. The wavefunction undergoes time evolution after the collapse, which may take it to an entirely different form. You can calculate this from the energy eigenstate expansion of the new wavefunction, if you wish.</li> <li>Depends on context - if you're talking about a stationary state, then the tim...
In standard QM there are two postulates that givern its evolution: <ul> <li>the abstract Schrodinger equation </li> <li>the collapse postulate </li> </ul> The first postulate tells us how the quantum wave evolves in the absence of measurements (in Rovelli's relational QM, in the absence of external interactions). It is...
https://physics.stackexchange.com
67,002
[ "https://dsp.stackexchange.com/questions/67002", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/47984/" ]
I tried for 2 signals <span class="math-container">$s_1(t) = u(t)$</span> and <span class="math-container">$s_2(t) = (1+i) \cdot u(t)$</span>. <span class="math-container">$i$</span> is the complex unit (<span class="math-container">$i = (-1) ^{0.5}$</span>). I got the left hand side of the inequality as <span class="...
Schwarz Inequality for continuous-time Complex valued functions is given as follows: <span class="math-container">$$\left|\int^{\infty}_{-\infty}f(t)^* \cdot g(t) dt \right|^2 \le \int^{\infty}_{-\infty}\left|f(t)\right|^2dt \cdot \int^{\infty}_{-\infty}\left|g(t)\right|^2dt$$</span> As you can see that, on left hand s...
<span class="math-container">$c$</span> need not be real number. For the LHS you would get <span class="math-container">$$ |\langle s_1,s_2\rangle| = |\langle s_1,cs_1\rangle |=|c|\,|\langle s_1,s_1\rangle |= |c|\|s_1\|^2 $$</span> For RHS, <span class="math-container">$$ \|s_1\| \times \|c s_1\| =\|s_1\| \times |c|\...
https://dsp.stackexchange.com
16,824
[ "https://chemistry.stackexchange.com/questions/16824", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/5084/" ]
Why must 3 equivalents of sodium amide be used here to form the alkyne? The part I specifically have issue with is in red. From what I understand, we should just use 2 equivalents of sodium amide to get rid of the bromines and to form the alkyne. Another equivalent of sodium amide will form the acetylide anion. Remov...
I think the comments basically have the answer - if you use only 2 equivalents of sodium amide, you will use 1.33 equivalents creating the alkyne and the remaining 0.67 equivalent will react with the alkyne after it is formed (an acid-base reaction) to form the acetylide salt -- probably a much faster reaction than the...
The third amide is used to deprotonate the alkyne after it is formed. It drives the formation of alkyne to the right, making a lot better yield of alkyne. That is why they also added water as a proton source in the second step to protonate the acetylide ion.
https://chemistry.stackexchange.com
202,335
[ "https://physics.stackexchange.com/questions/202335", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/8569/" ]
I read something about that locating our space in the multitude of multidimensional spaces of M-theory (and so identifying particular particles which we can measure with particular strings) is a too hard problem for us to solve; so we cannot experimentally verify M-theory. I have also heard that quantum computers can ...
The immediate problem with locating our space in the string theory landscape today, is that even if you pick just one definite background geometry (definite shape for the extra dimensions, etc), you will not be able to calculate particle masses and other measurable quantities. The calculations are too difficult and the...
Now we have the confusion about complexity classes sorted out (at least somewhat). Do you have any reason to suggest that the problems or M-theory have an algorithmic solution which is either NP, NP-hard or any complexity class you like? I seriously doubt there exists any algorithm which would be able to "locate our sp...
https://physics.stackexchange.com
58,926
[ "https://mathoverflow.net/questions/58926", "https://mathoverflow.net", "https://mathoverflow.net/users/13766/" ]
Is it well known what happens if one blows-up $\mathbb{P}^2$ at points in non-general position (ie. 3 points on a line, 6 on a conic etc)? Are these objects isomorphic to something nice?
I'll just add to Francesco's answer by saying that general position of the points on the plane is equivalent to ampleness of the anticanonical sheaf $\omega_X^{\otimes -1}$. The key observation is that on a del Pezzo surface, an irreducible negative curve ($C^2 &lt; 0$) must be an exceptional curve (i.e. $C^2 = C\cdot...
In both examples you are considering, the anticanonical model is a <em>singular</em> del Pezzo surface. In fact, let $X$ be the blow-up of $\mathbb{P}^2$ at three points lying on a line $L$. By Bezout's theorem, the birational map associated with the linear system of cubics through the three points contracts $L$. Sin...
https://mathoverflow.net
19,245
[ "https://stats.stackexchange.com/questions/19245", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/5902/" ]
Suppose one has a relatively large number of observations, each of which consists of a continuous result and a small number (2 or perhaps 3) of categorical variables, each of which has a large cardinality (up to 10k or so). So, for instance, one might wish to predict income given a person's university and chosen indus...
<strong>It is important to frame the question properly and to adopt a useful conceptual model of the scores.</strong> <h3>The question</h3> The potential cheating thresholds, such as 55, 65, and 85, are known <em>a priori</em> independently of the data: they do not have to be determined from the data. (Therefore this ...
I suggest fitting a model which explicitly predicts the dips and then showing that it significantly better fits the data than a naive one. You need two components: <ul> <li>initial distribution of scores,</li> <li>procedure of rechecking (honest or not) of scores when one fits below a threshold. </li> </ul> One poss...
https://stats.stackexchange.com
249,430
[ "https://physics.stackexchange.com/questions/249430", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/112190/" ]
Potential energy can be thought as the amount of work that the force can potentially do on the point because of its position. $$W=-\Delta U=U_{initial}-U_{final}$$ A positive work done by a force translates into a negative variation of potential energy. That sounds ok, given the interpretation of $U$ stated above. If ...
If a force does <strong>negative work</strong>, it is in fact trying to work against another force, doing <strong>positive work</strong>. When you lift up a book from the floor, gravity does <em>negative work</em> on the book, while you do <em>positive work</em>. And the books rises higher up, so $U$ increases. <ul> ...
It would be better to say that potential energy is the amount of work that a <em>system</em> can do. Say you have a system consisting of two masses - a brick and the Earth. As the brick moves down <em>U</em> decreases, the force pulling the brick and the Earth together acts downwards on the brick and it can do some p...
https://physics.stackexchange.com
87,628
[ "https://electronics.stackexchange.com/questions/87628", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/31162/" ]
This is a newbie question, but how many things an Arduino Uno R3 can control? My idea is to have Wireless + Ethernet modules and Relays module, be it 8, 16 or 32 relays each. I saw the Ethernet module goes on top of the Arduino, maybe I'm wrong, but how many pins are left for controlling other things? Sorry for my n...
As many as you can stack, without conflicting dedicated control pins. Devices that use I2C with unique addresses, or SPI with remappable Chip Select pins, are the most ideal. Even more if you avoid existing shields, and design your own.
Best is to take it step by step, make hardware work board by board. Arduino can control many devices, but the default shields may come with intercompatibility issues. If they occur, most of these issues can be solved, but it require a bit knowledge how to change the hard- and software in such a way that it will work ag...
https://electronics.stackexchange.com
205,736
[ "https://security.stackexchange.com/questions/205736", "https://security.stackexchange.com", "https://security.stackexchange.com/users/185954/" ]
When I search for MITM in the google most of the results say an unauthorized person positions himself in a conversation between two authentic users for malicious reasons, and there are several types in MITM. But what I couldn't understand is, do these two authentic users have to be in a local network (LAN) or they ca...
Technically, they can be anywhere in the network. But a lot depends on the attacker, their capabilities, and their goals. Some of the easiest Person In The Middle (PITM) attacks can be done with a fake WiFi hotspot, such as at a coffee shop or airport. These usually require physical proximity to the victim. They are ...
It is like a conman trying to impersonate an authorized person. For example, in public wifi where the attacker is trying to impersonate the gateway and then read all the traffic. Not only that, the attacker can also inject packets depending on the wifi adapter. Try first on LAN so you know what it really likes to do M...
https://security.stackexchange.com
27,829
[ "https://security.stackexchange.com/questions/27829", "https://security.stackexchange.com", "https://security.stackexchange.com/users/13699/" ]
I know that masquerading is to impersonate a false identity and replaying is the same wherein unauthorized person uses the credentials of the authorized one to have the privileges.Then what is the difference between the two terms?
These two terms do not have meanings at the same level. <strong>Masquerading</strong> (or <em>impersonation</em>; the two terms are equivalent) is any attack wherein the attackers acts (emits data packets or the like) <em>as if</em> he was some other user or entity in the system. <strong>Replay attacks</strong> are att...
To try to answer your question more directly, an impersonation attack may be a replay or may be some other type of attack. (For example a man in the middle could impersonate the client by getting the legitimate information rather than simply replaying a previously recorded session.) Similarly, a replay attack may o...
https://security.stackexchange.com
109,396
[ "https://chemistry.stackexchange.com/questions/109396", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/66245/" ]
In thermodynamics, we always quote a fixed temperature, whenever we mention enthalpy of a reaction. For instance, one can determine the enthalpy of combustion of methane at 25 °C. Now almost all reactions involve a change in temperature, i.e. they are either endothermic or exothermic. How should we physically interpre...
The enthalpy change at a fixed temperature is equal to the amount of heat you need to add in order for the final temperature to be equal to the initial temperature. If the enthalpy change is negative, this means that the reaction is exothermic, and you need to remove heat for the final temperature to equal the initial...
First, in order to compute state functions we often devise idealized paths to get from initial to final states, since we know that the value of a state function at each extreme is independent of path. The path we pick is a reversible one usually, and where the intensive variables describing the system can be related fu...
https://chemistry.stackexchange.com
345,789
[ "https://math.stackexchange.com/questions/345789", "https://math.stackexchange.com", "https://math.stackexchange.com/users/37092/" ]
Suppose I have two quadratic forms $Q_i(x)=(x-a_i)^T A_i(x-a_i)+c_i$, $i=1,2$ where $x,a_i \in \Bbb{R}^n$ and $A_i$ are positive-definite $n\times n$ matrices. Then $Q(x)=Q_1(x)+Q_2(x)$ is also a quadratic form, $Q(x)=(x-a)^T A(x-a)+c$, with $A=A_1+A_2$ (easy to see by considering just the quadratic terms). How do I ...
Let's turn to homogenous coordinates. For example, for $n=2$ you get \begin{align*} Q(x) &amp;= (x-a)^T\cdot A\cdot (x-a) + c \\ &amp;= \begin{pmatrix}x_1\\x_2\\1\end{pmatrix}^T\cdot\begin{pmatrix} 1 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ -a_1 &amp; -a_2 &amp; 1 \end{pmatrix}\cdot\begin{pmatrix} A_{1,1} &amp; A_{1,2}...
<span class="math-container">$\min_x Q(x)=a$</span> so, taking the derivative, <span class="math-container">$$2A_1(a-a_1)+2A_2(a-a_2)=0$$</span> and <span class="math-container">$$a=(A_1+A_2)^{-1}(A_1a_1+A_2a_2)$$</span> thus <span class="math-container">$$c=Q(a)=Q_1(a)+Q_2(a)$$</span>
https://math.stackexchange.com
78,252
[ "https://electronics.stackexchange.com/questions/78252", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5335/" ]
For our senior project we are making an electronic door lock controlled by a raspberry pi. We created a proposal which was approved for all the specs for creating the device which we have to abide by. In our proposal we specified that we would use a DC Motor for a broad range of options. We found that a solenoid was ...
You are on thin ice. I agree with your advisor. What you should do is go back to your advisor and say that now that you have gotten further into the design, experimentation, and testing, that you feel it is more appropriate to use a solenoid instead of a motor. Depending on what lesson he is trying to teach, he migh...
Let's put it the other way around: why would you call the solenoid a DC motor? Although you are definitely right in saying that <em>by some definitions</em> the term accurately describes one, most people (likely including your advisor) have a mental image of this when you mention a DC motor: <img src="https://encrypte...
https://electronics.stackexchange.com
91,445
[ "https://stats.stackexchange.com/questions/91445", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/27342/" ]
I like to keep analyses all in SAS or all in R when I can help it and lately have been using R more and more, but there's one analysis that I do somewhat routinely that has given me trouble in R. I have repeated measures data where I would like to fit the following model: $$Delta = Day + Group + Day\times Group$$ wher...
This is only a partial answer so far. It seems the main culprit is the fact that not all of the groups have data at all of the timepoints, which is what causes the matrix to be singular when including the interaction term, so I can get similar results by running: <pre><code>fit.cs &lt;- gls(Delta~Day*Group, ...
I got a similar error message and finally discovered that I had too much missing data in the y-variable of my dataset for certain factor categories. When I replaced many of my NA's with numbers (luckily in my case those NA's were supposed to be zeros), the model ran fine.
https://stats.stackexchange.com
42,538
[ "https://mathoverflow.net/questions/42538", "https://mathoverflow.net", "https://mathoverflow.net/users/6787/" ]
I am talking about the principle that is to DC what the global choice is to the usual axiom of choice. Global choice involves existential quantification over classes, but global DC can be stated as a schema in first-order set theory. $(\forall x (\phi(x) \to \exists y (\phi(y) \wedge \psi(x,y)))) \to \forall x (\phi(...
Given any $x$, let $\alpha_x$ be 0 if $\phi(x)$ fails. If it holds, for each $x'$ with $\phi(x')$ and $x'$ of set-theoretic rank less than or equal to $x$, let $\alpha^{x'}$ be the least ordinal $\alpha$ such that there is a $y$ of rank $\alpha$ with $\phi(y)\land\psi(x',y)$. Now set $\alpha_x$ as the supremum of the $...
Another economical way to think about it is to use the Reflection theorem (although unwinding this amounts just to Andres' argument). Namely, by the Reflection Theorem there is an ordinal $\theta$ such that the formulas $\phi(x)$, $\psi(x,y)$ and $\exists y\,\psi(x,y)$ are absolute between $V_\theta$ and $V$. By the Se...
https://mathoverflow.net
582,329
[ "https://physics.stackexchange.com/questions/582329", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/273464/" ]
When an electron moves at a high speed, it has a large kinetic energy. <ul> <li>I know that E = mc^2 and so if an electron was travelling at a high speed, wouldn't the mass decrease in order to increase the kinetic energy (as smaller masses travel faster)?</li> <li>Where does the energy come from to increase the mass; ...
The mass of an electron does not increase with speed! The invariant mass (the true mass!) of a particle does not depend on how fast it is going. What does change is the energy of the particle. <span class="math-container">$E=mc^2$</span> is not the full picture; the real relation is <span class="math-container">$$E=\fr...
The energy comes from whatever accelerated the electron. There is no need for the mass to decrease to “compensate” for an increase in kinetic energy. An electron with higher velocity has more energy overall. The increased mass for this electron is simply a reflection of its greater total energy.
https://physics.stackexchange.com
2,994,459
[ "https://math.stackexchange.com/questions/2994459", "https://math.stackexchange.com", "https://math.stackexchange.com/users/613654/" ]
Proving that L is not regular by showing that <span class="math-container">$\equiv_L$</span> has infinite index.<br> <span class="math-container">$\Sigma$</span> = {a}, L = {<span class="math-container">$a^{3^n} : n \geq$</span> 0}<br> My ideas:<br> theorem of Myhill-Nerode: L <span class="math-container">$\in$</span>R...
It follows from Chebyshev's inequality that if <span class="math-container">$\{Y_n\}$</span> is a sequence of random variables with finite second moments such that <span class="math-container">$\mathbb{E}[Y_n]\to\mu$</span> and <span class="math-container">$\mathrm{var}(Y_n)\to0$</span>, then <span class="math-containe...
Let <span class="math-container">$T_n=\sum_{k=1}^{n} S_k$</span>. Then <span class="math-container">$\frac {T_n} {n^{2}}=\frac {1(S_1-1\mu)/1+\cdots+(n(S_n-n\mu)/n} {n^{2}}+\mu \frac {n(n+1)} {2n^{2}}$</span>. By triangle inequality for <span class="math-container">$L^{2}$</span> norm it is easy to see that the first t...
https://math.stackexchange.com
596,444
[ "https://physics.stackexchange.com/questions/596444", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/280795/" ]
We know that work done <span class="math-container">$W$</span> to assemble <span class="math-container">$q_1$</span>,...,<span class="math-container">$q_n$</span> point charges is <span class="math-container">$$ W = \frac{1}{2} \sum_{i = 1}^{n} q_i V(r_i) \tag{I} $$</span> Now for the continous charge distribution with...
In equation (I) only the work spent to bring <em>whole</em> point charges (with finite charges) from infinity to the neighbourhood of each other is computed, but not the work spent to assemble each individual point charge, which is (theoretically) positive infinite for each point charge, because of the infinite repulsi...
A part of the problem is not differentiating between the work and the energy (which is defined via work done by removing charge to infinity or bringing it from infinity - depending on the one's taste). Further, the potential in the first expression may originate either from the charges of interest or from the external ...
https://physics.stackexchange.com
168,579
[ "https://physics.stackexchange.com/questions/168579", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31797/" ]
I'm trying to understand how a diode works and for this I've used(among other resources) the book written by Albert Malvino, <em>Electronic Principles</em>. Everywhere I read about this topic, it says that when the N-type and P-type semiconductors are joined together, the free electrons from the N-type diffuse to the ...
You should start with the strain energy density $\psi$, then define: $$ C_{ijkl} = \frac{\partial^2 \psi}{\partial \epsilon_{ij}\partial \epsilon_{kl}}, $$ and then define $$ \sigma_{ij} = C_{ijkl} \epsilon_{kl} $$ The remainder of my answer will be about explaining why you have to do it that way. Firstly it is phys...
Since <span class="math-container">$\epsilon$</span> is a symmetric tensor, it has 6 independent components that determine it. Hence use a multi-index <span class="math-container">$I\in\{(i,j)|1\leq i\leq j\leq 3\}$</span> to denote them. The strain energy density then becomes (perhaps one has to be careful with &quot;...
https://physics.stackexchange.com
265,757
[ "https://security.stackexchange.com/questions/265757", "https://security.stackexchange.com", "https://security.stackexchange.com/users/284472/" ]
Encryption with plain dm-crypt is often positioned as encryption that cannot be recognized. But is it really so? Are there ways to prove that the data is encrypted with plain dm-crypt? How to bypass these methods?
There is no inherent unavoidable risk in this approach which would put your private WiFi in danger. But ... These networks are served by the same router. This means their implementation and configuration are only separated by software. And software can have bugs. For example if the attacker manages to exploit your rout...
I think that besides the technical security risk (which probably is not that critical if the system only works for your visitiors and you trust them), the major problem will be that <em>anybody</em> near your home can use that network. This means, even if your hard- and software don't have any flaws, the next guy from ...
https://security.stackexchange.com
188,903
[ "https://softwareengineering.stackexchange.com/questions/188903", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/34603/" ]
I'm developing a board game that has a game class that controls the game flow, and players attached to the game class. The board is just a visual class, but the control of the movements is all by the game.<br> The player can try to make false movements that lead to the game telling the player that this kind of movement...
Why not store the history of all moves made (as well as any other non-deterministic events)? That way you can always reconstruct any given game state. This will take significantly less storage space than storing all of the game states, and it would be fairly simple to implement.
Building an Undo system is conceptually pretty simple. You just need to keep track of changes. You'll want a stack, and an object type that describes a piece of the state of the game. Your stack should be a stack of arrays/lists of game state objects. The trick is, <em>don't record moves that people make</em>. I s...
https://softwareengineering.stackexchange.com
360,343
[ "https://electronics.stackexchange.com/questions/360343", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/180448/" ]
I am a student of mechanical engineering so I am not very familiar with electronics. Recently I started working on a project where I am researching a control system for a motor which does some work. The system is powered by 3 phase AC electricity + ground + neutral which comes from 5 pin socket. The 3 phases then are d...
You said that the power comes from a 5 pin socket. If we assume that you mean a wall outlet, then ostensibly there is already a circuit breaker protecting this circuit. If so, then where you place the selector switch is immaterial now, as the circuit would ALREADY be protected upstream. So you could consider the "hand ...
Breaker should come first.. I pity the poor person that has to fix the hand-switch.
https://electronics.stackexchange.com
3,392
[ "https://security.stackexchange.com/questions/3392", "https://security.stackexchange.com", "https://security.stackexchange.com/users/1957/" ]
Anyone with a brain cell knows that using a user that isn't root/dbo/etc adds a lot to security and how effective SQL injection attacks can be. I'm wondering if taking that idea a step further is a good idea. The basic idea is simple. For guest-like actions (viewing) use a 'guest' user on the database which only has t...
In theory this kind of thing should always help (principle of least privilege) and can't really hurt, but if in practice you wind up with a CMS middle tier holding all the credentials anyway, then it may not help much or at all. An alarm bell is that you are thinking only in terms of SQL injection. The principle of l...
Making something more complex is never good for security but on the other hand giving someone more privileges the what they need may also compromise security. So its a balance between complexity whit additional security features or simplicity whiteout the additional features. What you are suggesting sounds interesting....
https://security.stackexchange.com
34,139
[ "https://dba.stackexchange.com/questions/34139", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/18816/" ]
I’m trying to update a table in a database on a linked server using code like this: <pre><code>declare @FirstName nvarchar(30); declare @LastName nvarchar(50); declare @AccountNumber nvarchar(30); set @FirstName = N'John'; set @LastName = N'Smith'; set @AccountNumber = N'ABC001'; update RemoteServer.MyDB.dbo.Custome...
Do the update remotely: <pre><code>exec RemoteServer.MyDB.dbo.sp_executesql N'UPDATE Customer set FirstName = @FirstName, LastName = @LastName where AccountNumber = @AccountNumber', N'@FirstName varchar(...), @LastName varchar(...), @AccountNumber &lt;type&gt;', @FirstName, @LastName, @...
This whole issue goes away with a setting on the MySQL ODBC connector. On the SQL Server that is linking to MySQL, go into the configure screen on the MySQL ODBC connection that is used by the linked server. Open "Details". On the "cursor/results" tab. Place a check in the "Return matched rows instead of affected rows...
https://dba.stackexchange.com
370,699
[ "https://physics.stackexchange.com/questions/370699", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/144564/" ]
<blockquote> A bird sitting on a single high tension wire does not get electrocuted because A) the circuit is not complete B) the bird feet has an insulating covering. C) capacitance of the bird is too small and the line frequency is too small. D) resistance of the bird is too high. </blockquote...
Badly stated question. If the capacitance is high and the frequency high, assuming one is talking of an <em>AC high tension</em>,the alternating fields will cook the bird, ( like a microwave oven) . BUT powerlines are not made with such conditions because a lot of energy would be lost in ionizing the air. For exist...
I think the question itself is quite bad for an exam because: A) the circuit is not complete: This is true depending on what you mean with complete. B) the bird feet has an insulating covering. This is also true, partially, most animals skin is dry and insulate a lot better than flesh. This helps in all cases both f...
https://physics.stackexchange.com
21,778
[ "https://mechanics.stackexchange.com/questions/21778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/617/" ]
I got brand new tires in April. In July they started growing unsightly brown stains. Even after I wash them the stains reappear within hours. Kind of annoyed because they were hella expensive and they are really unattractive. So 3 questions: <ul> <li>why?</li> <li>is it possible to get rid of them?</li> <li>is this s...
In my specific case, I called the distributor (Tire Rack - not sure if mentioning them is allowed, but it's a positive experience and I'm not affiliated) They saw that the brown stain was in the same pattern on every tire and "deduced" that it was something on the tire, not a problem with the tire itself. They recomme...
This sounds like tire blooming. <blockquote> Why </blockquote> Tire rubber usually contain an anti-ozonant which prevents UV damage to the tire (like you might see on a windshield wiper blade, it starts cracking). The anti-ozonant, when exposed to air, turns brown. Since the anti-ozonant is part of the tire's rubbe...
https://mechanics.stackexchange.com
82,719
[ "https://mathoverflow.net/questions/82719", "https://mathoverflow.net", "https://mathoverflow.net/users/13809/" ]
Well, I know that I'm going to have some vote-down, because this should be a very simple property but the real story is that... I am not able to prove it! For any fixed $n\in\mathbb N$, I have a finite partition of the natural numbers $$ \mathbb N=A_1^n\cup...\cup A_{k(n)}^n $$ (every set of the partition is infinit...
As requested, here's the comment posted as an answer: What if the $n$th partition splits the naturals into ten pieces based on the $n$th digit of the decimal expansion? (Of course ten is chosen for familiarity and not for optimality.) <hr> Apologies for such an extensive edit, but I couldn't visualize this either, ...
I think Clinton Conley intended for the $n$th digit to be read from the right (one's digit is the first, ten's digit is the second, etc.).
https://mathoverflow.net
218,975
[ "https://stats.stackexchange.com/questions/218975", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/78726/" ]
My data is categorized by two different parameters (say F having n groups and S having m groups) and I want to get a relationship between the two. For example $F = ${$f_1 , f_2 , f_3$} = {$ 10,10,5$} and $S = ${$s_1, s_2 , s_3, s_4$} = {$8,8,8,4$}. (Read $f_1$ has 10 elements in it, $s_1$ has 8 elements in it.) The pr...
Let $X$ denote the time of death (or time of failure if you prefer a less morbid description). Suppose that $X$ is a <em>continuous</em> random variable whose density function $f(t)$ is nonzero only on $(0,\infty)$. Now, notice that it <em>must</em> be the case that $f(t)$ decays away to $0$ as $t \to \infty$ because ...
$f(x)$ is not the probability of death, but the probability density; the expected number of times you die within the next unit of time if the probability density remained constant during that unit of time. Notice there is a problem: your probability of dying when you already died before is rather problematic. So it ma...
https://stats.stackexchange.com
206,426
[ "https://dba.stackexchange.com/questions/206426", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/150682/" ]
I'm trying to write query do delete rows based on two columns: <pre><code> DELETE FROM us_TEST WHERE [cell] in ('CA001018611', 'CA001135126') AND [date] IN ('2016-01-04', '2016-07-14') </code></pre> However this matches when <code>[cell]</code> <code>'CA001018611'</code> is either <code>'2016-01-04'</code> or ...
If you are only looking to delete these rows based on the two conditions listed you can break this out into two separate queries. <pre><code>DELETE FROM us_TEST WHERE [cell] = 'CA001018611' AND [date] = '2016-01-04'; DELETE FROM us_TEST WHERE [cell] = 'CA001135126' AND [date] = '2016-07-14'; </code></pre> If though,...
You need to add an <code>OR</code> to your SQL as follows: <pre><code>DELETE FROM us_TEST WHERE ([cell] = 'CA001018611' AND [date] = '2016-04-01') OR ([cell] = 'CA001135126' AND [date] = '2016-14-07'); </code></pre>
https://dba.stackexchange.com
84,774
[ "https://mechanics.stackexchange.com/questions/84774", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/67600/" ]
If I start the car, in the beginning I can put in a gear without problems. However, after driving for a while, putting in the gears becomes much more difficult. If the car is turned off, it is always easy to put in the gears. What are possible reasons that might cause this behaviour? The car is already 20 years old and...
If there is no tightening sequence listed in the service manual, I would just use a star pattern. Probably 1,3,5,2,4.
Tighten evenly, and to the torque specified but you have that from the manual.
https://mechanics.stackexchange.com
600,310
[ "https://stats.stackexchange.com/questions/600310", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/376278/" ]
I was testing out some classifier algorithms in scikit but wasn't able to find a classifier (linear or non-linear) that managed to provide good prediction on whether an input number is odd or even. Here's the code: <pre class="lang-py prettyprint-override"><code>import numpy as np from sklearn.linear_model import SGDCl...
As is often the case, the issue is one of defining your features. If you use the digits of the binary expansion of the number as features, your classifiers should have no problem picking up the fact that only one feature perfectly separates the target classes. Here I construct an example where the training data is 500...
A sine curve should do the trick. Pick a sine curve with a vertical distance of <span class="math-container">$1$</span> and a period of 2 so the curve hits <span class="math-container">$0$</span> at the even numbers and <span class="math-container">$1$</span> at the odd numbers. Then the output is the probability of be...
https://stats.stackexchange.com
74,451
[ "https://mechanics.stackexchange.com/questions/74451", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/55115/" ]
When I was driving home from work today I stopped at a traffic light. The car was stopped and in <em>drive</em>, and my foot was on the brake. I was on relatively level ground, and the ground was relatively smooth (no debris). The engine was not hot, and it was during a cool night. I noticed that the engine turned qui...
If you have a car that is stalling the problem is unlikely to go away, in fact it is likely to get worse. It could be a problem that is cheaper to fix now than later. Also, an engine stall could put you in a very inconvenient or even dangerous situation (it's happened to me), so you have every reason to get it fixed, ...
The engine replacement may have come with a warranty. You can take it back to them and see if they can diagnose and repair under warranty before you make any repairs that might void the warranty.
https://mechanics.stackexchange.com
37,263
[ "https://softwareengineering.stackexchange.com/questions/37263", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13408/" ]
I've been hired to make a website and am working with a designer (who happens to be the guy who is in contact with the client and hired me, so no, I can't kick his ass out =) ) who's too afraid to touch into the php code, and is too newbie in html and css to give me good enough models, so the work of today will be goin...
I used to do freelance front end development, my workflow went something like this: <ol> <li>Define things your client is providing you and things you will deliver to your client. Be sure to include what specifically they're paying you for and what the deliverables are. Setting expectations is VERY important.</li> <li...
Web designers should not usually have to touch the PHP code much, if at all. Usually designers develop the visuals in some graphics package (where needed), usually Photoshop. Build the HTML/CSS for a static version of the content, with alternate content for dynamics also built. Then the programmer tends to take this...
https://softwareengineering.stackexchange.com
45,505
[ "https://stats.stackexchange.com/questions/45505", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
Suppose I have a regression model shown below <strong>Model 1:</strong> $$ Y = \beta_0^\ + \beta_1SEX\ + \beta_2ALCOHOL\ + \beta_3SEX*ALCOHOL\ $$ The predictors I am interested in are SEX (binary: 0 female, 1 male) and Alcohol consumption (binary: drinker, non-drinker). Suppose that I found a significant interaction ...
As @AdamO says, tough language. The "vector-valued link function", see eqs. 3.3 and 3.5, is the McCullagh &amp; Nelder $\eta$. Suppose you have a baseline-categories regression with 3 categories. There are two multinomial "comparisons" (cat 0 vs. cat 1, and cat 0 vs. cat 2), with two logit predictors (0-v-1 and 0-v-...
In the section you've referenced, they're speaking of the class of <em>mixed</em> multinomial models. I don't think the authors' nomenclature is either intuitive or conventional. What they're calling "person predictors" are random effects which are implicit model terms that handle unmeasured sources of variation betw...
https://stats.stackexchange.com
121,597
[ "https://dba.stackexchange.com/questions/121597", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/80975/" ]
I have two tables <br> 1. Named as t1<br> 2. Named as t2 example of the tables are : <strong>t1 :</strong> <pre> id name 1 one 2 two 3 three </pre> <strong>t2 :</strong> <pre> id name 2 five </pre> I need to select all the data from the t1 table as well as from table t2 but I don't wan...
<pre><code>SELECT t1.ID, CASE WHEN t1."name" != t2."name" then t2.name ELSE t1.name END as fname FROM t1 LEFT JOIN t2 ON t1.ID = t2.ID </code></pre> from comments - duplicates, mean You have duplicates (answer with <strong>coalesce</strong> return the same), variant for avoid duplicates: <pre><co...
The cleanest has to be: <pre><code>SELECT T1.id COALESCE(t2.name, t1.name) as name FROM t1 LEFT JOIN t2 ON t1.id = t2.id </code></pre>
https://dba.stackexchange.com
19,880
[ "https://engineering.stackexchange.com/questions/19880", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/15360/" ]
I need to use this to find a motor that will be able to pull at most 2250&nbsp;kg at a 1.5&nbsp;m/s pace. At peak acceleration, I would like this to accelerate at 0.5&nbsp;m/s<sup>2</sup>. The area that the load will be pulled is a concrete sidewalk with, at its most extreme, a 20° incline.
Ignoring friction, because you have not provided any details regarding this in your question, and assuming that the object starts from rest on a $20°$ incline, and accelerates at a peak rate of $0.5m/s^2$ on it's way to a max speed of $1.5m/s$ The force required to stop a static object from rolling down a hill is the ...
Your question contradicts itself. Acceleration will mean infinitely increasing speed. If we disregard that and assume a steady speed of 1.5m/s up a ramp of 20 degrees for a mass of 2250kg, you need: $P= mgh/s= 2250(9.8)sin(20)1.5$ And force = P/vertical velocity= P/sin(20)1.5 This is the force needed. From here dep...
https://engineering.stackexchange.com
279,780
[ "https://stats.stackexchange.com/questions/279780", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/161486/" ]
I'm currently doing a self-study of Wasserman's <em>All of Statistics</em>. Theorem 5.10 states that for $X_1, ..., X_n$ IID with mean $\mu$ and variance $\sigma^2$, we have $\frac{\sqrt{n}(\bar{X}_n - \mu)}{S_n} \xrightarrow{D} N(0,1)$, where $\bar{X}_n = \frac{1}{n}\sum_{i=1}^n X_i$ and $S^2_n = \frac{1}{n - 1}\sum_...
Yes it is a result of Slutsky's Theorem since $S_n \rightarrow_p \sigma$
You appear to be interested in a quantity like $$ \mathcal{T}=\frac{\sqrt T(\bar{y}-\mu)}{s}, $$ with $s$ the sample standard deviation of $y_t$, $t=1,\ldots,T$. By the CLT, $\sqrt T(\bar{y}-\mu)\to_d \mathcal{N}(0,\sigma^2)$ when (e.g.) the $y_i$ are iid with mean $\mu$ and variance $\sigma^2$. By the WLLN, $s^2\to...
https://stats.stackexchange.com
20,279
[ "https://dba.stackexchange.com/questions/20279", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/9777/" ]
I have a database which stores information about various items. In particular, for each item I need to store the name, type and color. Each type can have a various amount of different colors. For example, I need to be able to ask 'what color can an item of type A have?' I'm struggling to see how I should best structur...
Use your option 2. <ul> <li>I have added an ERD showing 2 possible solutions (underlined columns are PKs). They are both Normalized to 3rd+ Normal Form. The first answer is not OK, because type information - the <code>TypeName</code> - appears in 2 tables. This is not following normalization rules.</li> <li>Note that...
With the first version the schema design itself forbids having invalid type-color pairs, so I would choose that one. With the second version you will need an extra mechanism (a trigger for example) to maintain valid state of the items. From a querying point of view, it means one more <code>JOIN</code> on quite simple...
https://dba.stackexchange.com
37,728
[ "https://mathoverflow.net/questions/37728", "https://mathoverflow.net", "https://mathoverflow.net/users/9014/" ]
An elementary question about Sobolev spaces: Is there some explicit theorem about embedding relation between spaces <span class="math-container">$BV(\Omega)$</span> and <span class="math-container">$L^p(\Omega)$</span>? Formulated otherwise: is <span class="math-container">$BV$</span> a subset of <span class="math-co...
<strong>Edit:</strong> The most general imbedding I know of about $L^p$ spaces is that $BV(\Omega) \subset \subset L^{n/n-1}(\Omega)$ where $\Omega \subset \mathbb{R}^n$ and $n &gt; 1$ (replace $n/(n-1)$ with $1$ when $n=1$). This embedding is <strong>compact</strong> for any $p &lt; n/n-1$. Hence for your $n=2$, $n=3$...
An $L^1_{loc}$ function on $\mathbb{R}^n$ is in $BV_{loc}$ iff its distributional derivatives $\partial_i f\in\mathcal{M}^1_{loc}$, i.e. they are all locally finite (Radon) measures. If $n=1$, the situation is well-known, and $BV_{loc}\subset L^\infty_{loc}$. So assume $n\geq 2$. Since $W^{s,p}_{c}(\mathbb{R}^n)\subse...
https://mathoverflow.net
153,876
[ "https://stats.stackexchange.com/questions/153876", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/41190/" ]
I have several populations (of people, actually) which vary in size (from 5 to 6000). I would like to visualize the ratio of women vs. men in each of them so that they can be compared. I will get, for instance <ul> <li>case 1: 20% of women, size of the population: 6000</li> <li>case 2: 20% of women, size of the popula...
You could present the actual population size using an axis label on any simple display (e.g. bar chart) of women/men. A quite different plot would just be #women versus #men; the sex ratios would then be different slopes. Provided all values are positive, logarithmic scale might help. On logarithmic scale, lines with...
The problem that you have presented is very valid and is similar to the difference between probabilities and odds ratio in a manner of speaking. The percentage that you have calculated is similar to calculating probabilities (in the sense that it is scale dependent). I would suggest that you calculate the Female to Mal...
https://stats.stackexchange.com
32,483
[ "https://physics.stackexchange.com/questions/32483", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/5686/" ]
My physics professor explained to me that electromagnetic waves are consisted of two components - <em>electric</em> and <em>magnetic</em> - which cause each other. <ol> <li>Which part of the mirror actually reflects the wave?</li> <li>Which of those two wave components? Both?</li> <li>How come the wave doesn't get hea...
The reflection could be viewed as a two step process. The incident wave causes the electrons in the silver to vibrate like in an antenna. Though by vibrating they also emit the same light. So it's the electrons at the surface of the silver that reflect the incoming wave. As you mentioned the wave is part electric and ...
Trying to separate electric and magnetic parts of a wave is not possible (Maxwell's equations couple them for propagation), so I will ignore your first two paragraphs. The mirror conductivity is the key. The electric field from light reaches the mirror's metal and thereby causes a current to flow (which actually gene...
https://physics.stackexchange.com
39,272
[ "https://datascience.stackexchange.com/questions/39272", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/60270/" ]
<h2>Introduction</h2> I understand the problem of <strong>data leakage</strong> that could be caused by the preprocessing step when our training and test sets are just <strong>samples</strong> of an <strong>unknown</strong> population. The preprocessing parameters should be calculated from the <strong>training set</st...
If you have the entire population, there is no need for inference. Thus data leakage is not an issue. You can fit any transformation on the data without a concern for its effect on prediction because there is no prediction step.
Any time you use some input from the test set to make your model, you have a data leakage. Examples: <ul> <li>You calculate the average income according to some category of your users and add it as a feature, with the income for each user being an additional feature. This is a data leakage, as you are calculating thes...
https://datascience.stackexchange.com
100,801
[ "https://stats.stackexchange.com/questions/100801", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/24097/" ]
<strong>The Game</strong> There is a pool of $n$ cards that are marked either by a <code>A</code> or by a <code>B</code>. There is a proportion $p$ of the cards that are marked by a <code>A</code> and a proportion $1-p$ of the cards that are marked by a <code>B</code>. The game is the following. I randomly draw a card...
Those probabilities for $ x, y, z $ don't look right. You basically have a trinomial sampling distribution (or multinomial with dimension 3). That is $(x, y, z)\sim Trinomial (n, p^2,2p (1-p), (1-p)^2) $ You can use this to get 95% marginal CIs for each of $ x, y, z $ by using the binomial distribution. These have ...
I suggest a chi-square test that compares the observed little brother frequences to the theoretical frequencies (in the ratio of 1:2:1 for AA, AB, and BB, respectively).
https://stats.stackexchange.com
379,862
[ "https://softwareengineering.stackexchange.com/questions/379862", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/132096/" ]
I come from a Java background, and my colleague is from .NET. We are working on a Java project and I saw him create a method like this: <pre><code>public Object myMethod(Object[] param1, ErrorMessage errorMessage) {...} </code></pre> <code>ErrorMessage</code> is a self-defined object that just holds a <code>String</c...
I find this kind of thing pointless busywork in most situations. The only time I can think of this being necessary is if you plan, from day 1, to write for multiple libraries. Otherwise, if you DO, by some chance, need to swap out pthreads in the future, do you really think that all of the underlying assumptions about...
I don't know how old your codebase is, but pthreads being implemented in a well conforming way on all the unices that matter is a very recent thing, driven as much by the thinning of the Unix herd as anything else. Threading was for a long time poorly defined on common Unix boxes, and more then a little variable betw...
https://softwareengineering.stackexchange.com
30,298
[ "https://quant.stackexchange.com/questions/30298", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/8175/" ]
Given two uncorrelated strategies, each with a Sharpe ratio of 1, what is the of Sharpe ratio of the ensemble?
If we assume that by ensemble you mean an equally weighted portfolio of the two. We can express that portfolio as $$P = \frac{1}{2}x + \frac{1}{2}y$$ and the sharpe ratio of $P$, $S(P)$, will be $$\frac{\frac{1}{2}\mu_x + \frac{1}{2}\mu_y - r_f}{\sigma_{\frac{1}{2}x + \frac{1}{2}y}}$$ becuase $x$ and $y$ are uncorellat...
Of course, it depends on the weights of your 'ensemble'. The optimal combination will have the following Sharpe ratio: <span class="math-container">$$ S_{opt} = \sqrt{S_1^2+S_2^2} $$</span> i.e. <span class="math-container">$S_{opt} = \sqrt{2} \approx 1.414$</span> in you example <strong>Proof:</strong> Let <span cl...
https://quant.stackexchange.com
357,650
[ "https://mathoverflow.net/questions/357650", "https://mathoverflow.net", "https://mathoverflow.net/users/45855/" ]
Given a complete riemannian surface <span class="math-container">$(S,m)$</span>, where <span class="math-container">$S$</span> is homeomorphic to <span class="math-container">$\mathbb{R}^2$</span>, I would like to find a weighted graph <span class="math-container">$G$</span> (which means a graph with real non-negative ...
This follows from the usual "economic covering" method: By Zorn (but alternatively, you can easily do it with your bare hands without using the choice axiom), <span class="math-container">$S$</span> admits a maximal family <span class="math-container">$(x_i)$</span> of 1-separated points (meaning that the distance betw...
Can you choose G so that its face-boundaries have uniformly bounded lengths? (Equivalently, so that every face of G is bounded by a triangle). Perhaps you can fiddle around a little to get rid of intersections too close to the x_i, so that your edges have lengths bounded below. Thus, for a different λ, you could let al...
https://mathoverflow.net
214,154
[ "https://softwareengineering.stackexchange.com/questions/214154", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/86765/" ]
I'm trying to test a class which calls some Hadoop web services. The code is pretty much of the form: <pre><code>method() { ...use Jersey client to create WebResource... ...make request... ...do something with response... } </code></pre> e.g. there is a create directory method, a create folder method etc....
In my opinion you should mock the webservice calls if this is a unit test, as opposed to an integration test. Your unit test should not test whether the external webservice is working, or whether your integration with it is correct. Without getting too dogmatic about TDD, note that a side effect of turning your unit t...
I disagree with "don't mock objects that you don't own" when your are unit testing. Mocks purpose of existence is the fact that there will be modules, libraries, classes we will not own. My suggestion for your scenario is mock the web service call. Setup the mock in such a way that it returns data back to your mod...
https://softwareengineering.stackexchange.com
17,290
[ "https://quant.stackexchange.com/questions/17290", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/11582/" ]
If $f$ is some function of BV on $\mathbb{R}$ and $dZ_t = f(W_t)dW_t + \mu_t dt$ ($W_t$ is a $1$-dimensional standard Brownian Motion), then what choice of real valued function $F$ makes: \begin{equation} M_t:= Z_t e^{\int_0^tF(Z_t)dt} \end{equation} into a martingale? I feel that I sould use Ito's product rule to s...
As you have guessed correctly, these type of questions can be answered using Ito's Lemma.We have: \begin{equation} d(M_t)= d(Z_t e^{\int_0^tF(Z_u)du})=d(Z_t) e^{\int_0^tF(Z_u)du}+Z_t d(e^{\int_0^tF(Z_u)du})+d(Z_t)d(e^{\int_0^tF(Z_u)du}) \end{equation} For the first two terms on R.H.S, we have: \begin{equation} d(Z_t) ...
$F=0$ seems like a good choice.
https://quant.stackexchange.com
435,934
[ "https://electronics.stackexchange.com/questions/435934", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/204897/" ]
I have implemented a full sine wave LUT, but would prefer to reduce it to a quarter. <pre><code>module functionGenerator(Clk,data_out, freq); //declare input and output input [7:0] freq; input Clk; output [9:0] data_out; //declare the sine ROM - 30 registers each 8 bit wide. reg [9:0] sine [0:99]; //...
Take advantage of the symmetry of a sine wave: <pre><code>if ( i &lt; 25 ) data_out = sine[i]; else if ( i &lt; 50 ) data_out = sine[50 - i]; else if ( i &lt; 75 ) data_out = - sine[i - 50]; else data_out = - sine[100 - i]; </code></pre>
For <span class="math-container">\$\pi &lt; x &lt; 2\pi\$</span>, sin(x) = -sin(x-<span class="math-container">\$\pi\$</span>) For <span class="math-container">\$\pi/2 &lt; x &lt; \pi\$</span>, sin(x) = sin(<span class="math-container">\$\pi\$</span>-x) That reduces it down to <span class="math-container">\$0 &lt; ...
https://electronics.stackexchange.com
47,962
[ "https://dsp.stackexchange.com/questions/47962", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/33977/" ]
I have a class covering Power Spectral Density but I have no idea why it matters. Could someone provide some examples of its use? Thanks
It is a rare individual who develops detection algorithms as a recreational pursuit. If you are not such a person then the reason for your algorithm should provide, what is favorable and not favorable in some measurable way. Your question has some ambiguity because random delay, missed transitions, and false transiti...
Feels like a standard cross-correlation would do a good job.
https://dsp.stackexchange.com
9,685
[ "https://mechanics.stackexchange.com/questions/9685", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/1631/" ]
This is a really classic and common old car problem. I see it <em>all the time</em> but this is the first time it's started happening to my own car. Basically when I first turn the car on, there's instantly a pretty horrific squealing that sounds belt-related, and develops to an even higher pitch as I pull out of my p...
It sounds like your alternator has not been tightened enough and the serpentine belt is slipping because of it. Since you have new belts on your engine, this is probably about the only thing which it can be. If you press on the belt with your thumb at the center of the long portion of the belt (between pulleys), you sh...
It could be cause by loose belts. I had some squealing when I started my car, used belt conditioner, replaced the belt, and it still squealed. So I retightened it twice until finally it stopped squealing the third time I tightened it. I had been afraid of over-tightening it, but had under-tightened it repeatedly.
https://mechanics.stackexchange.com
366,863
[ "https://softwareengineering.stackexchange.com/questions/366863", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/297578/" ]
I'm currently working on a desktop application in Java (using JavaFX). This application stores some user information, parts of which are sensitive. For example, if the user configures a proxy, it will store it into a file with encryption. Moreover, my application is calling a web API to execute auto-updates (with a ba...
The only way to ensure that the credentials used by a particular installation of your program cannot be abused is: A) Use a private key that only you know to generate a password <em>hash</em> and not an actual password. B) Add a random component in generated password hash such that each installation will have its o...
I'm going to try and simplify your problem statement -- you appear to be storing user-entered credentials in a similar way a web browser does for saved passwords. By default web-browser saved passwords are vulnerable in the same way your saved credentials will be. And you can use the same solution web-browsers do - a ...
https://softwareengineering.stackexchange.com