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
2,326
[ "https://robotics.stackexchange.com/questions/2326", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/2155/" ]
I'm simulating a sensor in 3D. The sensor should determine ($p, \theta, \phi$) from the origin where $\theta$ is the rotation about z-axis and $\phi$ is the rotation about x-axis. The sensor is given position of a point($x, y, z$). This is what I did <pre><code> p = sqrt(x^2 + y^2 + z^2); theta = acos(z/p); &lt;...
I found the problem by switching the following <pre><code> p = sqrt(x^2 + y^2 + z^2); Phi = acos(z/p); &lt;---- Phi not Theta Theta = atan2(y,x); &lt;---- Theta not Phi </code></pre>
Your first set of formulas are calculating the spherical coordinates for the sensor which are different from the angles of rotation around the x-axis (which you have called $\phi$) and the y-axis (which you have called $\theta$) When using the formulas for converting cartesian coordinates to spherical coordinates you ...
https://robotics.stackexchange.com
148,228
[ "https://cs.stackexchange.com/questions/148228", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/145676/" ]
Let's just say that some person discovered that <span class="math-container">$P = NP$</span> implies <span class="math-container">$P \neq NP$</span> and <span class="math-container">$P \neq NP$</span> implies <span class="math-container">$P = NP$</span>, and we don't know what is causing this contradiction, And this wa...
If P=NP implies P≠NP, then P≠NP (unconditionally). Similarly, if P≠NP implies P=NP, then P=NP. If both are true, then both P≠NP and P=NP, and so the axioms of mathematics are inconsistent. Most (but not all) mathematicians consider this quite unlikely.
If you have a proof that <span class="math-container">$(P=NP)\Leftrightarrow (P\not= NP) $</span> then <span class="math-container">$P=NP$</span> is proveable is equivalent to <span class="math-container">$P\not= NP$</span> is provable. This would mean that neither <span class="math-container">$P=NP$</span> nor <span c...
https://cs.stackexchange.com
2,300,667
[ "https://math.stackexchange.com/questions/2300667", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
My question has to do with Zorn's Lemma. <blockquote> Zorn's Lemma: If $P$ is a non-empty partially ordered set such that every totally ordered subset is bounded above in $P$ then $P$ contains at least one maximal element. </blockquote> First, let $A=\{a,b\}$ and $\leq = \{(a,a),(b,b)\}$. Then $\leq$ is a partial o...
A <em>maximal</em> element is an element $m$ such that $\forall x [ m \leq x \to m = x]$. A <em>maximum</em> is an element $m$ such that $\forall x[x \leq m]$. Zorn's Lemma says that there is a maximal element, not necessarily a maximum. In your case, both $a$ and $b$ are maximal elements.
The subset $\{a\}$ is only bounded above by $a$ as there is no relation between $a$ and $b$. Likewise for $\{b\}$, $b$ is the only upper bound, so $A$ has two maximal elements: $a,b$.
https://math.stackexchange.com
2,103,025
[ "https://math.stackexchange.com/questions/2103025", "https://math.stackexchange.com", "https://math.stackexchange.com/users/406892/" ]
I've been working on the <em>Collatz conjecture</em> and stumbled across what I think is a major property of <em>prime numbers</em>: every odd number can be expressed as a sum of consecutive odd numbers except the odd primes. Is this a new discovery?
This is an interesting observation - to answer your question, yes, it's well known. First I will try to clarify what I think you mean. You can always express an odd number as a sum of one consecutive odd number - itself. I assume this is a trivial case you want to ignore, so your "consecutive" means "more than one". ...
Any sum of consecutive odd numbers can also be expressed as a product of the average (which will be an integer) and the count of values. Therefore if we confine the odd numbers to positive values and the count to be $\ge 2$, the result cannot be a prime number. For example, $$7+9+11+13+15 = \overset{\text{average}}{1...
https://math.stackexchange.com
313,678
[ "https://physics.stackexchange.com/questions/313678", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/146234/" ]
We know low freqs. (800 Mhz) are preferred for rural area for they are travelling great distances. So, why do em waves (of mobile phones) with lower frequencies travel greater distances than em waves with higher frequencies, even though the latter have higher energy? Is this related to Rayleigh scattering like blue lig...
Free-space path loss (FSPL) occurs in a vacuum or air with inverse f² loss due to the antenna aperture, effective area, or receiving cross section area shrinking with frequency. At any point, a beam of radio waves has an irradiance or power flux density, PFD, which depends on $ \frac{1}{\lambda ^2} $ for inverse area...
Low frequencies waves suffer less from diffraction, by geographical features, implying they undergo less distortion from the cell mast to your phone. A further reason is that low frequencies are less attenuated and absorbed over long distances than higher frequency waves. Whalesong is a natural example of a simila...
https://physics.stackexchange.com
1,303,466
[ "https://math.stackexchange.com/questions/1303466", "https://math.stackexchange.com", "https://math.stackexchange.com/users/244295/" ]
I am a first year Math student and I am looking at problem in my text book which does not have any answers and I have completely no idea how to do this paticular problem. <blockquote> Show, using mathematical induction, that for all natural numbers n ≥ 3, $$ 4^2 + 4^3 + 4^4 + · · · + 4^n = \frac{4^2(4^{n-1} -1)...
<strong>Hint:</strong> The orthogonal complement of $span(a,b)$ has dimension $1$. To find this set, use Gram-Schmidt to orthogonalize first $a$ and $b$ and then find a vector $c$ that is orthogonal to the plane $span(a,b)$. Now solve the question regarding integer components with $gcd=1$.
\begin{align} 2x + 5y - z = 0 \rightarrow x + \frac{5}{2}y - \frac{1}{2}z = 0\\ -6x + 4y - 3z = 0 \rightarrow x - \frac{2}{3}y + \frac{1}{2}z = 0\\ \rightarrow \\ \left(\frac{5}{2} + \frac{2}{3}\right)y - z = 0 \end{align} This gives that $z = \frac{19}{6}y$ which gives that $x = -\frac{5}{2}y + \frac{1}{2}\frac{19}{6...
https://math.stackexchange.com
203,713
[ "https://electronics.stackexchange.com/questions/203713", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/93245/" ]
I have a battery which indicates 12V25Ah/10hr. What does 10hr mean here? I guess "hr" stands for "hour". But 25Ah already means if battery is fully charged and if I load 12V 25A (=300W) to it, it should last for an hour (correct me if I am wrong). <ol> <li>What does "/10hr" mean here?</li> <li>How many watts I can loa...
It means that the battery has a capacity of 25 Ah when discharged in 10 hours. 25 Ah is 25 Amps for 1 Hour which is equivalent to 2.5 Amps in 10 Hours. So if you load the battery with 2.5 Amps it will last 10 Hours. If loaded with a higher current usually battery capacity decreases so that is why the 10 Hours is ment...
The capacity of a battery depends partly on how fast you discharge it. A specification like "25Ah/10hr" says that the battery has a capacity of 25 amp-hours when it is discharged at a rate that takes it from fully charged to fully discharged in 10 hours &mdash; in other words, at \$\frac{25Ah}{10 hr} = 2.5 A\$.
https://electronics.stackexchange.com
362,163
[ "https://physics.stackexchange.com/questions/362163", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31790/" ]
This post will ask how to distribute loss in a transmission line so that the line has a known total loss, while dissipating the least amount of power. We'll refer to "gain" of a transmission line, but we're thinking of the case where the line is lossy, so the gain is always less than one. This post is in a sense a war...
Define $$\Phi(x) \equiv \int_0^x dx\, \ln g(x) \, .$$ Note that $\Phi(0)=0$ and $\Phi(L)=\ln G$. Then \begin{align} -\frac{P}{A_\text{in}^2} &amp;= \int_0^L dx \, \Phi(x)' \exp ( \Phi(x) ) \\ &amp;= \int_0^L dx \, \frac{d \exp \Phi }{dx} \\ &amp;= \exp (\Phi(L)) - \exp (\Phi(0)) \\ &amp;= G - 1 \, . \end{align} Therefo...
The solution is to take $\ln g(x)$ to be equal to a delta function concentrated at the point where $A(x)^2$ is minimal.
https://physics.stackexchange.com
522,430
[ "https://physics.stackexchange.com/questions/522430", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/250651/" ]
Suppose a particle like object is moving on a frictionless surface. If I push it back to reduce its kinetic energy, it also wastes energy stored in my body. Is energy really conserved here? Again, if I do not push, but try to balance the kinetic energy acquired from the body, where does my kinetic energy go? I mean...
A lot of other answers here go into much more detail, but i feel like the simplest answer to your question is just that it doesn’t matter whether or not we model spacetime curvature intrinsically or extrinsically. The idea is, if we can model spacetime curvature intrinsically then there is basically no reason to assume...
I'll try to give an answer, because I was thinking about this myself. The answer lies in Riemannian geometry, but the question is, what is it trying to tell us? I'll talk about curved space (Riemannian geometry), and then curved spacetime (pseudo-Riemannian geometry). I define space to be the set of locations (math...
https://physics.stackexchange.com
423,374
[ "https://softwareengineering.stackexchange.com/questions/423374", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/348585/" ]
The scenario is the following: For a project, such as <em>Spring Security</em> available on github, the following is accomplished: <ul> <li>forked and cloned</li> <li><code>git remote add upstream URL-Remote-Repository</code></li> <li><code>git fetch upstream</code></li> <li>In <em>master</em> branch <code>git merge up...
The workflow that I use with gerrit also sounds like it would be helpful to you: <ul> <li>first, <em>commit the work in progress</em> to a branch. Even if it's not finished. Put a title like &quot;WIP&quot; on the commit message along with the description. You will change this later. Take a note of the commit hash.</li...
At all the companies I have worked with, we have used this procedure: <pre><code>git checkout master git pull </code></pre> This will get you all the remote changes to the master downloaded to your computer. <pre><code>git checkout gh-150 git merge master </code></pre> This will take any changes made after you created ...
https://softwareengineering.stackexchange.com
256,607
[ "https://physics.stackexchange.com/questions/256607", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/235345/" ]
In case of identical particles we multiply the individual wave functions of the particles to get the system wave funtion. But why are we not adding? Or performing any other operation to get the system wave function. Can anyone show the math that what physics will be violated if i simply add the individual particle's wa...
The wave function for <em>any</em> composite system consisting of two uncorrelated (unentangled) subsystems is the (tensor) product $$ |\psi_A\rangle |\psi_B\rangle \equiv |\psi_A\rangle \otimes |\psi_B\rangle $$ This multiplicative behavior of states isn't a specific feature of identical particles – or any particles...
Consider this example: Imagine that the state vectors are represented by real-space wave functions. For any particular value of the possible location of particle A, the entire space of values for B are available for the position of B. For another location of A, again, the entire space is available for B. In or...
https://physics.stackexchange.com
481,891
[ "https://stats.stackexchange.com/questions/481891", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
I want to test whether <span class="math-container">$\mu=\mu_0$</span> where <span class="math-container">$\mu_0$</span> is some fixed number. Consider the following two different testings. Hypothesis Testing 1: <span class="math-container">$H_0:\mu=\mu_0,H_1:\mu&lt;\mu_0$</span> Hypothesis Testing 2: <span class="math...
<strong>Doing it right the first time is best.</strong> First, in practice, this should be an unlikely situation. <ul> <li>Maybe you have re-engineered a pharmaceutical process hoping that the new process has a higher yield than the current one with <span class="math-container">$\mu_0 = 100,$</span> so you'd take data ...
Imagine testing <span class="math-container">$\mu=0$</span>. You do your calculations and find that <span class="math-container">$\bar{x}=99$</span> and your z-statistic (or t-stat) is 123. I would have serious doubts about hypothesis 1 and very much believe hypothesis 2.
https://stats.stackexchange.com
27,438
[ "https://quant.stackexchange.com/questions/27438", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/20875/" ]
Just a quick question I was hoping someone could shed light on. <ul> <li>So far I am familiar with the Black-Scholes PDE with the terminal condition at time $T$ been $V(t=T,S)=(S-K)^+$.</li> <li>I also understand that the Black-Scholes PDE does not contain $S(T)$ and therefore is independent of the terminal condition....
The PDE will be the same but because the terminal condition is different the solutions will not be the same. The different boundary condition will give different values at $t=T$. Then the equation is marched backwards in time in both cases using the same equation but because the terminal condition is different the solu...
It is reasonable and PDE approach is not suitable. In the Black scholes model we have $$d\ln {{S}_{T}}=\,(r-\frac{1}{2}{{\sigma }^{2}})dt+\sigma d{{W}_{t}}$$ so $$d\ln {{S}_{T}^2}=\,(2r-{{\sigma }^{2}})dt+2\sigma d{{W}_{t}}$$ as a result $$\ln {{S}_{T}^2}=\ln{{S}_{t}^2}\,+(2r-{{\sigma }^{2}})(T-t)+2\sigma (W_T-W_t)$...
https://quant.stackexchange.com
1,272,297
[ "https://math.stackexchange.com/questions/1272297", "https://math.stackexchange.com", "https://math.stackexchange.com/users/223632/" ]
I flip a coin $n$ times, at each toss I count how many heads and how many tails have come out so far. An example with $n=4$ might be: <pre><code> Heads Tails 1 0 1 1 (here I count 1 tie so far) 2 1 2 2 (and here I count a total of 2 ties) </code></pre> In this run, I get 2 t...
We are tossing an even number $n$ of times. Let $n=2m$. For $i=1$ to $m$, define the indicator random variable $X_i$ by $X_i=1$ if there is a tie after $2i$ tosses, and $X_i=0$ otherwise. Then the random variable $Y$ that counts the number of ties is given by $Y=X_1+\cdots +X_m$. By the linearity of expectation we ...
I may be wrong, but to me that seems very cumbersome to solve analytically, because the chance to have a tie after a specific number of flips depends on the outcomes of all previous flips (and hence the chance to get a tie after e.g. 10 flips is not independent of the number of ties you got before). I would try Monte ...
https://math.stackexchange.com
53,780
[ "https://mechanics.stackexchange.com/questions/53780", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/37207/" ]
<strong>Context</strong>: My Car- Honda civic coupe Lx / 2007 ; 113000 miles I was getting a cranking noise from the front left wheel on doing full wheel turns. I took to the local auto repair shop and he said my CV axle is bad. I got the CV axle changed along with a few other works, including a rear break realignme...
So the problem was a busted transmission! Got it rebuilt (cost me a fortune :() The occurrence of the problem coincided with the CV axle thing got me thinking that way.
No. A new CV axle should work perfectly as soon as it's installed, and all the clicking should be cured. Does the car pull to one side or the other when driving on a straight road? How about when you apply the brakes? If so, that indicates brakes or alignment. I'd recommend taking it to a local tire/suspension shop ...
https://mechanics.stackexchange.com
141,586
[ "https://softwareengineering.stackexchange.com/questions/141586", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/50293/" ]
First of all I want to point out my concern with some pseudocode (I think you'll understand better) Assume you have a global debug flag, or class variable named "debug", <pre><code>class a : var debug = FALSE </code></pre> and you use it to enable debug methods. There are two types of usage it as I know: first i...
First, I don't think you should be concerned about speed here. My primary concern would be designing a proper API, otherwise speed wont be an issue because nobody would actually use it. Even if this is just for an internal application, I personally like to design things with the intent that someday they can be factored...
Ignoring compiler optimizations, of course testing to avoid a function call (your first solution) can avoid whatever overhead is associated with the function call. This is not specific to global debug flags though, and is certainly small stuff in the bigger picture. If you have any reason at all to prefer the second ...
https://softwareengineering.stackexchange.com
201,119
[ "https://softwareengineering.stackexchange.com/questions/201119", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/69796/" ]
I understand PKI reasonably well from a conceptual point of view - i.e. private keys/public keys - the math behind them, use of hash &amp; encryption to sign a certificate, Digital Signing of Transactions or Documents etc. I have also worked on projects where openssl C libraries were used with certs for securing commun...
While I really wanted to answer issue by issue, I think I'll hit this topic by topic: <strong>Authorization/Authentication</strong> OK, first things first. For your example, you need both: <ul> <li><strong>Authentication</strong> - proof that the user is who he says he is. You've choosen PKI, with the implied proo...
Personal certificates work well for periodical renewal of certificates (which has quite a robust process behind it) and can be implemented as a "password-less" authentication that customers like but where it fails is <ul> <li>The cost per certificate</li> <li>compatibility with modern browsers</li> <li>end users ext...
https://softwareengineering.stackexchange.com
4,589
[ "https://mechanics.stackexchange.com/questions/4589", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/853/" ]
This morning after running the car for 2 miles, my car was still blowing freezing cold air. I messed with the temp knob moving it all the way cold to all the way hot a few times. Then I started to get warm air. It happend again tonight. This time I had to turn off the car and turn it back on again. What could be going ...
Turns out I was just low on coolant. Once I filled the tank it was fine again.
Find the location of your heater valve, and see what the temperatures are like on both sides. Might just need a new heater valve, which allows coolant to flow to heater.
https://mechanics.stackexchange.com
68,715
[ "https://mathoverflow.net/questions/68715", "https://mathoverflow.net", "https://mathoverflow.net/users/15975/" ]
Assume $M$ is a $2n-$dimensional differentiable manifold. Let $(U_{i})$ be a open covering of $M$. With respect to this covering let $\rho_{i}$ be a partition of unity. Assume that on each $U_{i}$ we have a symplectic form $\omega_{i}$. Is then $\omega := \sum_{i} \rho_{i} \omega_{i}$ a symplectic form ? If, not what c...
Suppose you are in $\mathbb{R}^{2n}$, and endow it with a symplectic form $\omega$. Let $U_1 = \{x_1&gt;-\varepsilon\}$ and $U_2=\{x_1&lt;\varepsilon\}$, with two symplectic forms $\omega_1 = \omega|_{U_1}$, $\omega_2=-\omega|_{U_2}$. Notice that if $n$ is even, the $\omega_i$ induce the same orientation on the overlap...
This was too long for a comment---A conceptual way to understand this is to say for a vector bundle defined using patching, the transition functions live in GL(n,R). GL(n,R) is homotopy equivalent to O(n) by Polar decomposition so one can always define a Riemmanian metric(From this point of you can imagine a vector bun...
https://mathoverflow.net
129,574
[ "https://math.stackexchange.com/questions/129574", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1818/" ]
Is there a quick way to prove the completeness theorem (every consistant theory has a model) from the compactness theorem (a theory has a model iff every finite subtheory of it has a model)? Usually the compactness theorem is a very easy result of the completeness theorem, but it can also be proved in other ways (e.g. ...
You can't deduce $a(0)$ from your recurrence. Add $1$ on both sides to get $$b(n)=a(n)+1=2(a(n-1)+1)$$ so that $$b(n)=2 b(n-1)$$ Fine continuation!
You have to choose a(1). You can open the formula for n=2,...,n. You get in this way n-1 equalities. The product of all the left members of those equalities is equal to the product of all right members. You can simplify in both products a(2) ....a(n-1). Then you get that a(n)=2^n-1 * a(1) Sorry, I did not see the +1 ,...
https://math.stackexchange.com
13,259
[ "https://stats.stackexchange.com/questions/13259", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/5471/" ]
Consider $n\cdot m$ independent draws from cdf $F(x)$, which is defined over 0-1, where $n$ and $m$ are integers. Arbitrarily group the draws into $n$ groups with m values in each group. Look at the minimum value in each group. Take the group that has the greatest of these minima. Now, what is the distribution that...
I answer this: "Arbitrarily group the draws into n groups with m values in each group. Look at the minimum value in each group. Take the group that has the greatest of these minima. Now, what is the distribution that defines the maximum value in that group?"<br> Let $X_{i,j}$ the i-th random variable in group j and $f(...
Since the draws are from an iid samples, we can just consider the draw selected. Consider $f(x) = \frac{d F(x)}{dx}$. Now we know that $b$ is from $f(x)$ and that $b&gt;a$. So, $$p(b|a) = \frac{f(b)}{\int_a^1 f(y) dy} \forall b&gt;a, 0 \text{ otherwise}.$$ The minimum $m$ in a draw of two is $$p_2(m) = f(m)\int_m^1f...
https://stats.stackexchange.com
294,941
[ "https://softwareengineering.stackexchange.com/questions/294941", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/193262/" ]
Should I just copy the project files to him? Should I sit and explain the code to him ? If so, up to which level of details? Or do I just tell him where everything is within the solution and not how the code works? I would appreciate your input
You make a copy of the code. You take that copy of the code to a different computer and verify that you can build the application on that computer from the code. If that doesn't work, then you fix all the problems in the code until it works to build the application on your computer, and on the second computer. Yo...
I would approach this the same as when handing over to any other maintainer: <ul> <li>Include the source control files so that they have the entire history of the project.</li> <li>Make sure that the code builds from source with just one command. Nothing is more depressing then having to spend several hours/days befor...
https://softwareengineering.stackexchange.com
333,238
[ "https://electronics.stackexchange.com/questions/333238", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/-1/" ]
Suppose I have a 3w amplifier and two 1w maximum rated speakers, what would happen If I play some music?
As long as you don't crank the volume past what the speakers can handle, there will be no problems. If you try to drive the speakers too hard, they will start distorting. If you hear distortion, turn the volume down.
It’s a good practice to use an amplifier at least twice the power of the speaker. This is due to the fact that amplifier manufacturers rate their system max power when the output is already in a high distortion. Therefore if you used it with a speaker with similar power you won’t appreciate the full power of the speake...
https://electronics.stackexchange.com
963,337
[ "https://math.stackexchange.com/questions/963337", "https://math.stackexchange.com", "https://math.stackexchange.com/users/168264/" ]
How shall I check this:<br> Suppose that $R$ is a commutative ring and $|R|=30.$ If $I$ is an ideal of $R$ and $|I|=10$ show that $I$ is a maximal ideal.<br> Please give some hint how to go with solution...
1) Any ideal which is a maximal additive subgroup is also a maximal ideal. (This is trivial.) 2) Any subgroup of a finite group whose index is a prime number is a maximal subgroup. (Follows from Langrage's Theorem) Now conclude.
If another additive subgroup of $R$ sits between $I$ and $R$, its order would be a divisor of $30$ divisible by $10$. What could it be? There are only two possibilities, showing that nothing lies strictly between. You can easily see how this generalizes to any subgroup of order $n$ in a group of order $np$, $p$ prim...
https://math.stackexchange.com
276,351
[ "https://dba.stackexchange.com/questions/276351", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/216472/" ]
My database is associated with different usernames on the server and on my local machine. Whenever I try to restore it on my local machine from the backup downloaded from the server using the command <pre><code>psql -d dbname -f backupfile.sql </code></pre> I get the error output saying that <pre><code>ERROR: role &quo...
That is easy. Use the <code>--no-owner</code> and <code>--no-privileges</code> options of <code>pg_dump</code>. You might be more happy if you used the custom format of <code>pg_dump</code> (<code>-F c</code>). Then you'd restore with <code>pg_restore</code> and could specify the options at restore time.
Nothing you can do with <code>psql</code>, but plenty you can do with your <code>backupfile.sql</code>. You can remove the owner clauses on the fly: <pre><code>grep -v '^ALTER.*OWNER TO myusername;$' backupfile.sql | psql -d dbname </code></pre> or replace one user to another: <pre><code>sed '/^ALTER.*OWNER TO myuserna...
https://dba.stackexchange.com
529,376
[ "https://physics.stackexchange.com/questions/529376", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/45998/" ]
I have a super basic gap in my understanding of the theory of extra spacial dimensions - one piece of the explanation that never felt right. As I've heard it, it's theorized that there may be extra dimensions out there (often talked about in connection with string theory). Those dimensions are theorized to be hidden f...
Think about it this way. Suppose there's an ant crawling on a very thin, stretched wire located 100 meters from you. How would you describe the ant? You would be very much justified to say it's crawling on a 1-dimensional line and use only one coordinate to describe its position. However, if you zoomed in, you'd see t...
&quot;Small&quot; means that the extra dimensions form a compact space (you can think of it as a space with finite volume). An example would be the four-dimensional space that we know and love (3 space + 1 time) plus an additional fifth dimension as a circle. This is denoted as: <span class="math-container">$$ \mathbb{...
https://physics.stackexchange.com
20,941
[ "https://engineering.stackexchange.com/questions/20941", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/15417/" ]
(I'm not sure if this question belongs to this stack exchange, but it seems appropriate to me) I have a very practical situation and our knowledge is lacking to be able to solve our debate. <strong>The situation</strong> In our country, and I'm guessing everywhere in the world, people seem to always fill their drink...
In itself putting paper <em>inside</em> a glass will make very little difference. Glass is a brittle material and tends to fail by shock and point loading. Its static tensile strength is actually pretty good. What will help is packing paper between the glasses as it will help prevent them coming into contact with eac...
Filling inside the cup with paper is just to lock in the wrapping of the same paper around the glass. <ul> <li>It also offers coverage and protection of the rim of the glass.</li> <li>Because of the integrated, all-around coverage the whole package remains intact in the box with no chance of clinking against each othe...
https://engineering.stackexchange.com
2,213,626
[ "https://math.stackexchange.com/questions/2213626", "https://math.stackexchange.com", "https://math.stackexchange.com/users/421753/" ]
How can you prove that if the gcd(a,b) = 1 then gcd(a,bi) = 1 in the Gaussian integers? I know that $i$ is a unit in the ring, but how can you rigorously prove this?
Substitute $y'=p(y)$ with the new unknown function $p$ of a variable $y$. Then separate variables.
Integrate both sides of the second form of your DE with respect to $x$ and then you're left with an equation $$ \tfrac{1}{2} (y')^2 + a y^{-2}/2 = b y $$ Then you just are left with a 1-st order DE from there
https://math.stackexchange.com
138,990
[ "https://electronics.stackexchange.com/questions/138990", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/28916/" ]
I'd like to get more PCIe bandwidth for GPU compute applications. It occurred to me that PCIe bidirectional links are really dual simplex (a pair of unidirectional links). That means if there's no data to transmit in 1 direction, 1/2 the links are idle! So, my question is obviously, why not allow the links to be bidir...
I think you are assuming here that the number of physical lanes is the bottleneck, and that if you only had more bandwidth then the logic inside the GPU would no longer be held back. I don't think that is really the case. To give you more bandwidth in one direction you need more area, power and resources dedicated to...
I feel bad about answering myself, but unlike most other people who think it can't be done efficiently, I think the answer is more qualified. I agree that it can't be done for PCIe. The main assumption is that the communication is peer to peer. Then, it would be pretty difficult like SomeHardwareGuy claimed because if...
https://electronics.stackexchange.com
2,969,936
[ "https://math.stackexchange.com/questions/2969936", "https://math.stackexchange.com", "https://math.stackexchange.com/users/608220/" ]
A box contains 6 tennis balls. Peter picks two balls at random from the box, plays with them, and returns them to the box. Paul then picks two more balls at random from the box (they can be the same or different from Peter's balls), plays with them, and returns them to the box. Finally, Mary picks two more balls at ran...
For the all-distinct event to happen, <ul> <li>Peter has <span class="math-container">${\large{\binom{6}{2}}}$</span> valid choices out of <span class="math-container">${\large{\binom{6}{2}}}$</span> total choices.<span class="math-container">$\\[8pt]$</span> <li>Paul has <span class="math-container">${\large{\binom{4...
To start off all balls in the box have not been played with at all. So any balls that get picked by Peter have now been played with exactly once. When Paul goes to pick balls there are 2 balls that have been played with and 4 that have not. To satisfy the condition of each ball being played with exactly once Paul must ...
https://math.stackexchange.com
15,326
[ "https://dba.stackexchange.com/questions/15326", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/7251/" ]
i created a database schema in 11g express edition, however there are some APEX tables and some dummy data... Is it safe to delete them? also i would like to know what does apex means and why they have a dollar sign, thanks... <pre><code>APEX$_ACL TABLE APEX$_WS_FILES TABLE APEX$_...
I wouldn't suggest removing those tables, no. The Oracle XE browser-based interface is written in APEX (Application Express, a framework for developing web-based apps in the Oracle database). If you break APEX, that interface will likely stop working.
APEX is an acronym for Oracle Application Express. Those tables are there to support some of the tools within APEX (like Websheets), so you should leave those alone.
https://dba.stackexchange.com
6,835
[ "https://mechanics.stackexchange.com/questions/6835", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/3534/" ]
The 2010 Accord indicates that only 15% oil life is left. Oil level seems to be OK. The driver would rather complete the trip, which is 1400 more miles. At the beginning of the trip there were 20% oil, and she drove 650 miles on highways. So, after driving 1400 more miles on highways there should be about 5% oil life l...
I suspect that the 15% oil is talking about oil life. Just make sure that you check the oil level and top it off appropriately before taking the trip. Change the oil a quickly as possible once the trip is done.
Highway miles is very easy on oil, rather than, say, driving a taxi in the city. You're probably ok. Depends on how the first 85% percent of the oil's change interval was driven, too, and if it is synthetic.
https://mechanics.stackexchange.com
11,636
[ "https://bioinformatics.stackexchange.com/questions/11636", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/4595/" ]
I have 15 .vcf files. I need to remove `common variants in the 1000 genomes database' appearing in at least 0.5% of the population Do you know from where I may start? Thank you so much
Use VEP, ANNOVAR or snpEff to annotate your VCF file (I'd recommend combining your VCFs into a single file if they're single sample VCFs or are all comprised of samples from the same experiment/cohort). You can annotate the VCF file with 1000g (among a ton of other annotation sources). Once done, you can use <code>bcft...
Think removing everything &lt; 0.05 from <code>1000g2015aug_all</code> column of ANNOVAR annotation file helps with this
https://bioinformatics.stackexchange.com
488,677
[ "https://stats.stackexchange.com/questions/488677", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/269616/" ]
Why is <span class="math-container">$Y=\beta_0 x^{\beta_1} e$</span> a linear model? When we apply the transform, it becomes <span class="math-container">$lnY = ln\beta_0+\beta_1 lnx +lne$</span>, and why is it still linear when the <span class="math-container">$\beta_0$</span> part is under ln?
<span class="math-container">$Y=\beta_0 x^{\beta_1} e$</span> is not a linear model, it's a power model that can be linearized to a linear model, <span class="math-container">$\ln Y = \ln \beta_0+\beta_1 \ln x +\ln e$</span>. Doing that, and estimating it with least-squares, entail an assumption on the original model: ...
The meaning of linear is not on based on the predictors. It's based on the beta's. In your example the predictor is on the power of beta 1 not the beta itself.
https://stats.stackexchange.com
15,778
[ "https://quant.stackexchange.com/questions/15778", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/218/" ]
Is the mean variance optimization the same thing as the capital asset pricing model? Or is the mean variance only a part of CAPM?
Mean-Variance Optimization is a generic framework that creates optimal portfolios relative to two measures of risk - mean and standard deviation (covariation). It holds in general for elliptical distributions where the scale and location of the distribution are the only sources of risk and return. For a Normal Distribu...
The CAPM is basically mean variance optimisation plus equilibrium. Mean variance optimisation answers a simple question: what portfolios have the greatest expected return for a given variance? Those are the efficient portfolios. The set of efficient portfolios is convex: any portfolio of efficient portfolios is efficie...
https://quant.stackexchange.com
243,468
[ "https://dba.stackexchange.com/questions/243468", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/186032/" ]
I uploaded some tables to SQL Server Management Studio. Upon inspecting the tables I've found that the column headers area actually values. Is there any way to bump the headers down into a new row and to create new column headers, or will I have to re-upload all of the tables and remember to select the 'has header' opt...
Probably the least complicated option would be to select all your data into a new table with the correct column names, filtering out the row of values containing the header values. From there, you can drop the malformed table, and rename the new one. Example: <pre><code>CREATE TABLE dbo.wrongo(wrong INT, [column] INT...
There are two ways you can avoid having values as columns name while loading data from excel source. <ol> <li>Create the table in the database using the <code>CREATE TABLE</code> statement and then upload data using DTS.</li> <li>Mention column names as the first record in the excel sheet and upload it.</li> </ol> Th...
https://dba.stackexchange.com
444,981
[ "https://electronics.stackexchange.com/questions/444981", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/205074/" ]
i know that the differential gain of the differential amplifier ( mosfet or bjt ) is _gmRc or _gm Rd looking at the curve : if the current went down in one side and up in one side the gm will change so the gain will change right ? then the differential amplifier doesn't have a constant gain ? and if the current is ste...
Gh-B, I am afraid, there is a kind of misunderstanding on your side. <ul> <li>At first, let me quote and comment a sentence from Dan Fritchmans answer:<br> "<em>Generally for non-linear circuits, this is not a constant number, but a function of input signal</em>"</li> </ul> For my opinion, this can lead to severe mis...
Everything you've said here is right. I expect the confusion is just in interpretation of one term: <em>gain</em>.<br> It's true (and commonplace) to say things like: <blockquote> the differential gain of the differential amplifier ( mosfet or bjt ) is _gmRc or _gm Rd </blockquote> But more accurately, we could...
https://electronics.stackexchange.com
150,841
[ "https://electronics.stackexchange.com/questions/150841", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/65021/" ]
I've been reading for hours about how switching regulators work but I'm still unable to understand what it does to keep the power equity between the input and the output (ignoring internal losses). Let's say you step down 5v to 2v with a buck converter. What happens with the 3v dropped? Are somehow "converted" to curr...
Yes, crudely put, it converts the voltage into current. Ignoring the internal losses, if you halve the voltage you double the (available) current. So if you convert a 5V 1A input into a 2V output the current capacity becomes 2.5A minus internal losses. Say you have a switching efficiency of 85%, then you can work it...
In a switching regulator, energy is transferred indirectly using an inductor. In one part of the duty cycle, the source energizes the inductor, increasing its current. In the other part, the inductor drives the load. This is easiest to see in a buck-boost converter. Ideally, the switches and inductor/capacitor are loss...
https://electronics.stackexchange.com
442,130
[ "https://stats.stackexchange.com/questions/442130", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/269346/" ]
I am studying statistics and I stumbled on the following question. If we have the following model: Y = b0 + b1X1 + b2X2 + b3X3 + b4X1X2 + e with X3=X1-X2, which of the parameters can be estimated and why? Thanks in advance for any help.
All b's are estimated to construct the well-known linear regression line. Furthermore we obtain an estimate of the uncertainty (which is related to the estimation of e's).
The model <span class="math-container">$$Y =b_0 + b_1X_1 + b_2X_2 + b_3X_3 + b_4X_1X_2 + e,$$</span> is under the assumption that <span class="math-container">$$X_3=X_1-X_2$$</span> indistinguishable from the model <span class="math-container">$$Y =b_0 + \underbrace{(b_1-a)}_{\gamma_1}X_1 + \underbrace{(b_2+a)}_{...
https://stats.stackexchange.com
25,264
[ "https://physics.stackexchange.com/questions/25264", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/417/" ]
It seems obvious why mercury has no atmosphere, given its proximity to the sun--but yet Venus is also fairly close, and has an extremely dense atmosphere. Titan is a large moon with an atmosphere thicker than Earth's, and then Triton, a more distant large moon, has only a tenuous Nitrogen atmosphere. Why aren't more ro...
There are a lot of factors that go into whether or not a planet has an atmosphere. First, the mass and size of the planet. Really what it comes down to is the escape velocity. The higher the escape velocity (v<sub>e</sub>), the easier it is for a planet (or moon) to retain any atmosphere it gets as the gases that mak...
If a planet still has a hot core (like Earth), it will release gases needed for an atmosphere to form. Also, the planet should have enough gravity to hold the gases close to the planet.
https://physics.stackexchange.com
18,405
[ "https://physics.stackexchange.com/questions/18405", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/6724/" ]
Suppose I am going to the doctor's and I want to do either of the following <ol> <li>Make myself lighter on the scale</li> <li>Make myself heavier on the scale</li> </ol> For 2), isn't it just relaxing and let your mass drop? For 1) how could I do this? Should I maybe exert a force on a table close by? Will that for...
Lots of ways, none practical (except one). <ol> <li>Inhale a lungful of helium prior to stepping on the scale (or conceal helium balloons in pockets or the like). This will have a tiny effect but at least your voice will be squeaky.</li> <li>As @FrenchKheldar said, push on a table or pull on a bar. Obviously cheating ...
As you mention for 1), the scale is measuring the force applied on it. When "letting your mass drop" your body experiences a downward acceleration. Consequently, the force applied on the scale will be decreased. This would last only as long as your downward velocity is increasing. Eventually you have to stop though, ...
https://physics.stackexchange.com
186,581
[ "https://mathoverflow.net/questions/186581", "https://mathoverflow.net", "https://mathoverflow.net/users/60642/" ]
Suppose $G$ is a finite group and $A$ is the set of all character values of $G$. By character values, I mean entries of the character table of $G$. Let $\Gamma = \operatorname{Gal}({\mathbb{Q}(A)}/{\mathbb{Q}})$. Then $\Gamma$ has an action on the set of all conjugacy classes of $G$. Considering orbits, we get an equi...
The answer is yes, and this is not difficult to see, but first you have to show that you have indeed an action of $\Gamma$ on the conjugacy classes. Let $\varepsilon$ be a primitive $|G|$-th roots of unity and let $\widehat{\Gamma}=\operatorname{Gal}(\mathbb{Q}(\varepsilon)/\mathbb{Q})$. Then $\mathbb{Q}(A)\subseteq \m...
The answer is yes. For details, see Roger C. Alperin "Rational subsets of finite groups" International Journal of Group Theory Vol. 3 No. 2 (2014), pp. 53-55 (and the references cited there).
https://mathoverflow.net
370,043
[ "https://softwareengineering.stackexchange.com/questions/370043", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/304258/" ]
I created a small Desktop application (approx 15000 lines of code, so not that large) written in C++/Qt. This is non-commerical, just a hobby project and I am coding on my free time. The larger the application gets, I find it more and more tedious to write C++, and adding new features takes a lot of time. <ul> <li>I...
I have significant experience with C++ UI development, mostly in Qt but also including wxWidgets and raw win32. I've also done some C# UI development in WPF. I would strongly recommend literally any of the UI technologies I've used - including raw win32 - over C#/WPF. In my experience it's poorly documented, incredibl...
I don't have any experience with QT, but I spent over a decade working with C++ and MFC. I now have almost a decade working with C# and WPF. I find that I am an order of magnitude more productive in C#/WPF than I ever was in C++/MFC. As a language, I find myself being far more productive in C# than I ever was in C++...
https://softwareengineering.stackexchange.com
139,564
[ "https://math.stackexchange.com/questions/139564", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Suppose we have two firms with specialized, but similar products. Suppose market demand for the two products is: $$p_1(q_1,q_2)=a-bq_1-dq_2$$ $$p_2(q_1,q_2)=a-bq_2-dq_1$$ where $d \in (-b,b)$. Suppose that both firms have cost $c(q)=q$ What does $d$ mean intuitively? Is the Cournot Nash Equilibrium for this $$q_1=\fra...
<blockquote> <strong>What does d mean intuitively?</strong> </blockquote> To answer this question, think about the "vanilla" Cournot competition case, where products $p_1$ and $p_2$ are identical; they're perfect substitutes. In this case, increases in production from your competitor (i.e. $q_2$) displaces your own...
In response to your first question, the function $p_1(q_1,q_2)=a-bq_1-dq_2$ can be thought of as both <ul> <li>the highest price firm 1 can charge and</li> <li>the willingness-to-pay (WTP) of the marginal buyer (the person who bought $q_1^{st}$ unit) of good 1 when each firm $i=1,2$ is choosing to sell $q_i$ units.</l...
https://math.stackexchange.com
60,038
[ "https://electronics.stackexchange.com/questions/60038", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/3041/" ]
I recently looked at a reference design for an 433MHz transmitter and noticed that inductor orientation was specified (using the DOT). On the pcb layout the inductors are placed close, so they will probably couple electrically and magnetic. But is the orientation mainly to cancel EMC (magnetic) or voltage induced?
The soldermask color is purely a function of designer preference, and whether the person paying for the boards is willing to foot the bill for custom soldermask colors. It has no relation to whether the board is ROHS compliant or anything else. Green is the most common just because it's a defacto standard. You can get...
I've used solder mask color to indicate version of the copper of a PCB. I use...Green = prototype, Red = REV A, Blue = REV B, White = REV C, Yellow = REV D, etc... This allows easy differentiation between copper revisions. It also allows production and repair technicians to know which PCB they are working with from acr...
https://electronics.stackexchange.com
4,141,334
[ "https://math.stackexchange.com/questions/4141334", "https://math.stackexchange.com", "https://math.stackexchange.com/users/884068/" ]
I am really struggling to understand the concepts of topology and topological spaces. I read so many PDFs, Books, websites but I haven't found an easy intuitive explanation. For example, if I have all points in <span class="math-container">$\mathbb{R}^2$</span>. What information does the Topology on this set of points ...
The set <span class="math-container">$\mathbb{R}^2$</span> is dust. It has no structure. When we draw it as a plane, we are giving it some sort of geometric structure. (This geometric structure is better described as a metric space than a topology, and even better described as a manifold, but we'll stick with topology ...
A topological space is a pair <span class="math-container">$(X,T)$</span> where <span class="math-container">$T$</span> is a collection of some or all of the subsets of X such that (i). <span class="math-container">$\emptyset\in T$</span> and <span class="math-container">$X\in T,$</span> (ii). If <span class="math-cont...
https://math.stackexchange.com
65,644
[ "https://dba.stackexchange.com/questions/65644", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/38790/" ]
I have created a trigger to audit changes to a table: <pre class="lang-sql prettyprint-override"><code>CREATE TRIGGER [dbo].[iudt_AutoAuditChanges] ON dbo.CPTCategoryMaster AFTER INSERT,DELETE,UPDATE AS BEGIN SET NOCOUNT ON; Declare @v_AuditID bigint IF OBJECT_ID('dbo.AutoAudit','U') IS NULL BEG...
<blockquote> Now i'm running them both side by side </blockquote> So, to clarify, you did a side-by-side upgrade. Meaning that you installed a new instance of SQL Server 2014? In that case, if you are ready to rid yourself of the SQL Server 2008 R2 instance then you would need to <em>transfer all of your necessary...
select @@version will give you which version you are actually connecting to.Also check whether your instance names of both in configuration manager to avoid accidentally connecting
https://dba.stackexchange.com
703,309
[ "https://physics.stackexchange.com/questions/703309", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/321320/" ]
Consider the magnetic field <span class="math-container">$\vec{B}$</span> generated by an infinite solenoid on the <span class="math-container">$z$</span>-axis with radius <span class="math-container">$R$</span>. Then <span class="math-container">$$\vec{B}(r)=\begin{cases} B_z \hat{z} &amp; \text{ if }r&lt;R, \\ 0 &amp...
Your proposed vector potential diverges at <span class="math-container">$r = 0$</span>. This may not seem like an insurmountable problem—after all, we see infinite potentials all the time for things like point charges &amp; line currents, right? It turns out, in fact, that there's an infinite flux hiding in this probl...
Your vector potential field <span class="math-container">$\mathbf A$</span> obeys the equation <span class="math-container">$$ \mathbf B = \nabla \times \mathbf A\tag{*} $$</span> everywhere except on the line <span class="math-container">$r = 0$</span>. It is easy to check validity everywhere except <span class="math-...
https://physics.stackexchange.com
80,891
[ "https://softwareengineering.stackexchange.com/questions/80891", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/23204/" ]
We are going to be building a new project using Mercurial as our version control system. I'm still trying to fully understand what my workflow should look like, so I've listed below a case that I need some help undertanding. A single application with multiple modules (Each module being hosted in its own repository) M...
You really don't need to make a separate repo/branch for every single changeset, since the concept of a changeset is kind of doing that for you. I use branches for major features, and the main purpose a branch serves for me is being able to quickly and easily do "hg up branchname" or "hg up default" to switch between ...
Suggestion: Why would each module be in a separate repo? Are they just that sufficient independent that an entirely separate repo is necessary? With your scenario of multiple people working on the same module you just need to follow the general DVCS methodology: Work, make possibly many commits, at the end of the day...
https://softwareengineering.stackexchange.com
8,580
[ "https://dsp.stackexchange.com/questions/8580", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/3829/" ]
I have a GMSK modulator in MATLAB and wish to generate AWGN with a specific SNR, and I'm having some issues figuring out just how. I have found this step-by-step process to generate zero-mean Gaussian noise with a specified power spectral density W0: <ol> <li>Form Gaussian distributed random variable: w = randn(1,N)<...
First a comment on your noise-generation process. The Matlab function <code>randn()</code> generates Gaussian noise with zero mean and mean power 1. So steps 2 and 3 are obsolete. If you'd like to achieve a given SNR, then creating the noise signal with the wanted power is as simple as <pre><code>w = w .* sqrt(P_n) <...
This is how I compute the EbN0, you must realize that exist a little difference between it and SNR(depends on modulation type). <pre><code>%signal energy calculate the mean symbol energy % Bit energy for each symbol Eb = Es/bit_per_symbol; EbNo = 10^(EbNo_dB/10); % Noise variance No = Eb/EbNo; ...
https://dsp.stackexchange.com
31,580
[ "https://mathoverflow.net/questions/31580", "https://mathoverflow.net", "https://mathoverflow.net/users/7168/" ]
Otherwise, if all the elements in a set can be represented by a at most n symbols (finite Kolmogorov complexity), I could count them by creating a n dimensional pairing function. Or atleast, that is my assumption. Any thoughts? Edit: as @Carl has pointed out the correct term for sequences that have no finite represen...
Contrary to what some of the commenters said, there's no great difficulty in generalizing Kolmogorov complexity to infinite strings. For example, given a language L&subseteq;{0,1}<sup>*</sup>, we could let K(L) be the length of the shortest program that decides L, or K(L)=&infin; if L is undecidable. (Or we could als...
I'm not sure if I understand your question, but the set of all finite strings is countable, thus a set in which every element has a name (i.e., a finite description) is countable.
https://mathoverflow.net
256,919
[ "https://softwareengineering.stackexchange.com/questions/256919", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/146935/" ]
I would like to create a WebAPI application that can serve some of my web sites. My goal is to abstract some common task such as email sending, address resolving etc by providing an API to all of my web sites. I have created a WebAPI application that implements most of the above APIs but without any authorization. I w...
You're trying to limit the use of your shared (Web) API so only your sites can use the API. An alternative to OAuth mentioned by Joe would be to create API controllers in your sites that use your shared API. So, a client would send a request to an API controller on their site and that API controller would call your sh...
If what I assume is correct, you need to mimick what facebook/linkedin/twitter have and create something similar to: OAuth ("The OAuth 2.0 Authorization Framework", RFC 6749) What this means is that the client applications need to obtain the required keys to be allowed to access users/user-data from the single login...
https://softwareengineering.stackexchange.com
50,973
[ "https://math.stackexchange.com/questions/50973", "https://math.stackexchange.com", "https://math.stackexchange.com/users/13228/" ]
Is it true that: $$M{\otimes}_{A}(A/I) \cong M/IM$$ and $$IM \cong I {\otimes}_AM$$ where $A$ is a commutative ring, $M$ an $A$-module, and $I \subset A$ an ideal.
There is a proof of your first equation given in page 17 of Osborne's <em>Basic Homological Algebra</em> book (presuming you have defined tensor product in terms of the usual universal property). I'll give an outline here Define $\phi':M \times A/I \to M/IM$ by $\phi'(m,a+I) = am + IM.$ Check that this is well defined...
The 1st claim ok. The 2nd not: $A=\mathbf{Z}/4\mathbf{Z}$, $I=2A$, $M=A/2A$. In that case $IM=0$, but because $I$ is isomorphic to $A/2A$ as an $A$-module, we have $I\otimes_AM$ isomorphic to $M$ as well. Basically you are tensoring the short exact sequence $$ 0\rightarrow I\rightarrow A\rightarrow A/I\rightarrow 0 $...
https://math.stackexchange.com
2,453,603
[ "https://math.stackexchange.com/questions/2453603", "https://math.stackexchange.com", "https://math.stackexchange.com/users/436899/" ]
Why is $\left\{ n\in \mathbb{N}:n^2 \right\}$ nonsense, $ $ but $\left\{ n^2: n\in \mathbb{N} \right\}$ correct? From my understanding, $\left\{ n\in \mathbb{N}:n^2 \right\}$ should be read as:<br> <em>"The set of natural numbers such that each natural number is multiplied to itself."</em> What's wrong with th...
In more formal notation, we'd not allow either expression. The more formal notation in general is, given s set $X$ and a proposition $P$ of one variable: $$\{x\in X: P(x)\}$$ So, for example, in your case: $$\{k\in\mathbb N: \exists n\in \mathbb N(k=n^2)\}$$ Formal language is a mess sometimes, so for human readab...
All forms of this notation are of the form $$ \{ \text{term denoting an element of the set} \mid \text{additional information} \} $$ You have the pieces the other way around, which is why it's gramatically incorrect. <hr> There are two primary ways this notation is used; the first is to pick out the elements of som...
https://math.stackexchange.com
104,473
[ "https://mathoverflow.net/questions/104473", "https://mathoverflow.net", "https://mathoverflow.net/users/16425/" ]
A sequence of vector fields on an open subset of a manifold is linearly independent in module sense, i.e., if we multiply by smooth functions. Does it imply the pointwise independence of the vector fields?
No: consider the vector fields $\frac{\partial}{\partial x}$ and $x\frac{\partial}{\partial y}$ on $\mathbb R^2$.
If you add the condition that the submodule generated by those elements is a direct summand then this is true. Proof: the other summand must be projective, so locally free, so at each point the sequence forms part of a basis, so is linearly independent.
https://mathoverflow.net
134,261
[ "https://chemistry.stackexchange.com/questions/134261", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/93979/" ]
<blockquote> The solubility product of calcium fluoride, <span class="math-container">$\ce{CaF2},$</span> is <span class="math-container">$\pu{1.46E-10 mol^3 dm^{-9}.}$</span> What mass of calcium fluoride will dissolve in <span class="math-container">$\pu{500 cm^3}$</span> of <span class="math-container">$\pu{0.10 mol...
In the <span class="math-container">$\pu{500 cm^3}$</span> solution there are is already <span class="math-container">$\ce{F^-}$</span> dissolved coming from the <span class="math-container">$\ce{NaF}$</span> <span class="math-container">$\pu{0.10 mol dm^{-3}}$</span> that was already there. This means that the solubil...
Gc3941d has mixed the solubilities of <span class="math-container">$\ce{NaF}$</span> and <span class="math-container">$\ce{CaF_2}$</span>. Let's start the calculation from the beginning. The concentration of fluoride ion is : [<span class="math-container">$\ce{F^-}$</span>] = <span class="math-container">$0.1$</span>...
https://chemistry.stackexchange.com
94,245
[ "https://physics.stackexchange.com/questions/94245", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/33786/" ]
I derived the averaged energy for phonon mode with frequency $\omega$ in canonical ensemble and in grand canonical ensemble. Averaged energy derived in canonical ensemble is $E_c=\frac{1}{2}\hbar\omega+\frac{\hbar\omega}{e^{\hbar\omega\beta}-1}$. Averaged energy derived in grand canonical ensemble is $E_g=\sum_{n=0}^...
For both canonical and grand canonical ensemble, my formula provided in the question part are correct. I will show later that they will give the same expression for averaged energy. For canonical ensemble, the total particle number is fixed. Let us denote it as N. Since each boson, the particle in each energy level, h...
What does the $a$ in your second formula refer to? For a phonon mode, the formulas for the canonical and grand canonical will be the same, just the interpretation will be different. In BOTH cases the formula should be $$Z = \sum_{n=0}^\infty e^{-\beta \hbar \omega n}$$ (note that we can drop the zero-point energy $1/...
https://physics.stackexchange.com
434,342
[ "https://physics.stackexchange.com/questions/434342", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/209541/" ]
Because of time dilation we cannot observe a black hole forming in a finite amount of time. For the same reason I suppose we also cannot observe the horizon moving: everything happening on the horizon takes an eternity to witness from the outside perspective. Therefore, would a moving black hole result in new horizons...
Since I found an answer to my own question, which I first only wrote as a comment, I'll put it here to wrap things up: Just like photons don't age but still move, black hole horizons don't age but still move.
GR doesn't have global reference frames, only local ones. Therefore you can't have a frame of reference big enough to surround a black hole. So a better way to phrase this question would be in terms of a moving observer. No, a moving observer cannot observe the horizon. The definition of the horizon is that causal cur...
https://physics.stackexchange.com
95,131
[ "https://softwareengineering.stackexchange.com/questions/95131", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/30851/" ]
I usually work in a web design company, but my manager also has his own company. He is a designer basically and he catches the projects with clients and then I do his work during weekends or whenever I have time. He is very bold. He has no knowledge of programming at all. But I have seen that many times he catches pro...
The boss you are comparing yourself to seems to have a different mindset than you. He cares more about getting projects than about his abilities to accomplish them. Your description of him reminds me of a broker. He finds people that offer projects and pushes the projects towards others with the required skills to do t...
Speaking from a position of ignorance... (never been a freelancer). First thought - people fear what they don't understand. Get more knowledge, and maybe you'll have less fear. For example, on the liability issue, I'd have thought there's insurance for that. There's probably getout clauses, but if you get good advice...
https://softwareengineering.stackexchange.com
302,322
[ "https://physics.stackexchange.com/questions/302322", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/140114/" ]
By Ampere's Law, using a rectangle as an Amperian loop, I know that it can be derived that the magnetic field is constant throughout all of space (i.e. it does not depend on the distance <em>r</em> from the infinite sheet). I'm confused as to how this can be possible, as a point close to the current sheet would have l...
The central question you must ask yourself is: how do you tell how far away you are from a featureless infinite wall? No matter what distance you are from it, the wall looks exactly the same: featureless and infinite. This should intuitively tell you that the field, which depends on "how the wall looks", cannot depend ...
The key here is that it is an <em>infinite</em> plane. If you buy that the electric filed is constant outside of an infinite plane of charge, you have to buy this too. I find that the electric field argument is more intuitive though, so think about why that is true first. For any distance away from the plane you say th...
https://physics.stackexchange.com
65,524
[ "https://physics.stackexchange.com/questions/65524", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/15672/" ]
I'm confused in this situation. In an example of this book (Example 16.5. Thermal Physics, by Blundell) they ask to prove that $$C_P - C_V = VT\frac{\alpha^2}{\beta_T}\tag{1}$$ but using the fact that $S=S(T,V)$. Then they use the fact that $$C_V = T\biggl(\frac{\partial S}{\partial T}\biggr)_V\tag{2}$$ and that $...
There is no such thing as $S(T,p)$. $T$ and $p$ are both intensive variables, while $S$ is extensive. Just knowing $T$ and $p$ tells you nothing about how large the system is, and therefore cannot tell you the entropy. However, if you fix some extensive quantity, like the particle number $N$, you can have $S(T,p,N)$. ...
A good question, here my attempt at an answer. To describe a thermodynamic system, you can ask for the values of certain thermodynamic quantities: Pressure $p$, Volume $V$, particle Number $N$, chemical potential $\mu$, temperature $T$, entropy $S$, internal energy $E$. As it turns out, however, these quantities are...
https://physics.stackexchange.com
144,465
[ "https://dba.stackexchange.com/questions/144465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/27464/" ]
I have a Synonym called <strong>VirtualTable</strong> which points to <strong>RealTable1</strong>. A lot of inserts are happening to <strong>VirtualTable</strong> - about 50 every second. Very often I drop the synonym and re-create it to point to <strong>RealTable2</strong>. Unfortunately it happens some times, that...
If we slice your query, the first cte (<code>rt2</code>) returns this: <pre><code>id hid parent_hid hierarchy 11 2 1 2 22 3 2 3 44 5 3 5 77 8 5 8 170 11 8 11 190 13 11 13 240 18 ...
With this modified query <pre><code>with recursive rt1 as( select id,hid,parent_hid||'-&gt;'||hid as str from rt2 where rt2.parent_hid=1 union select t.id,t.hid,s.str||'-&gt;'||t.hid as str from rt2 t inner join rt1 s on (s.hid=t.parent_hid) ), rt2 as ( select id, hid, parent_hid, h...
https://dba.stackexchange.com
60,250
[ "https://softwareengineering.stackexchange.com/questions/60250", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/16422/" ]
Sometimes you need to write a constructor which can fail. For instance, say I want to instantiate an object with a file path, something like <pre><code>obj = new Object("/home/user/foo_file") </code></pre> As long as the path points to an appropriate file everything's fine. But if the string is not a valid path thing...
It's never good to rely on a constructor to do the dirty work. Besides, it's also <em>unclear</em> to another programmer whether or not work is going to be done in the constructor unless there is explicit documentation stating so (and that the user's of the class have read it or been told so). For example (in C#): <p...
In Java, you could use exceptions or use the factory pattern, which would allow you to return null. In Scala, you could return an Option[Foo] from a factory method. That would work in Java too, but would be more cumbersome.
https://softwareengineering.stackexchange.com
45,982
[ "https://softwareengineering.stackexchange.com/questions/45982", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/12750/" ]
How good of an idea do you think it would be to teach people Assembly (some variant) as a first programming language? It would take a lot more effort than learning for instance Java or Python, but one would have good understanding of the machine more or less from "programming day one" (compared to many higher level lan...
It would be difficult to inspire a new programmer with assembly code. A dynamic hello, user website is much cooler with less effort. I'm not saying that the fundamental lessons are the same, but an introductory course is going to have a large inspirational content, or else there won't be a second course. I remember my...
I think it's a <em>terrible</em> idea for both Software Engineering and CS students, and generally anyone more interested in programming than in electronics. It <em>can</em> be done, but it doesn't mean it <em>should</em> be done. Back in the day, the way to do really cool stuff with home computers was to learn assemb...
https://softwareengineering.stackexchange.com
1,002,825
[ "https://math.stackexchange.com/questions/1002825", "https://math.stackexchange.com", "https://math.stackexchange.com/users/180065/" ]
<blockquote> Compute $3^{2003}\pmod {99}$ by hand? </blockquote> It can be computed easily by evaluating $3^{2003}$, but it sounds stupid. Is there a way to compute it by hand?
I would calculate separately modulo $9$ and $11$ and put the pieces together at the end. Modulo $9$ is trivial, we get $0$. Note that $3^5\equiv 1\pmod{11}$, so $3^{2000}\equiv 1\pmod{11}$, and therefore $3^{2003}\equiv 3^3\equiv 27\pmod{11}$. This is already congruent to $0$ modulo $9$, so we are finished.
Calculate $3^2, 3^3, 3^4, 3^5, 3^6, 3^7$ modulo $99$, i.e. reduce at each step. For example $3^4=729\equiv 36\pmod{ 99}$. Now $3^5=3\cdot 3^4\equiv 3\cdot 36\equiv 45$. You will find that $$9=3^2\equiv 3^7\pmod{99}$$ Hence $$3^{2+5k}\equiv 9\pmod{99}$$ for all $k\in \mathbb{Z}^{\ge 0}$. Hopefully you can finish the ...
https://math.stackexchange.com
171,253
[ "https://physics.stackexchange.com/questions/171253", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/75773/" ]
Suppose a stone is thrown into a pool of crystal clear water and its a bright sunshiny morning. You can observe a shadow of the wave in the bottom of the pool. Why does this happen? Is it due to superposition of light or some other thing?
You can actually think of the ripple as a travelling lens. If you take a radial cross section through the ripple, it'll have a curved profile. Now just like a magnifying glass causes a bright spot in the middle of where you focus incoming light, it also causes a darker region around it. This is what you're seeing on...
The dark part of the shadow is the umbra, and the part that is a little lighter is the penumbra. They can be experienced on Earth, but more readily in space, such as during a solar eclipse, when the Moon moves in front of the Sun and leaves a shadow on Earth.
https://physics.stackexchange.com
245,465
[ "https://security.stackexchange.com/questions/245465", "https://security.stackexchange.com", "https://security.stackexchange.com/users/20094/" ]
I am trying to find if the following shell script is vulnerable to command injection <pre><code>#!/bin/sh set -x dig +noall +answer TXT $2._domainkey.$1 </code></pre> Now when I try something like this, <pre><code>sh script.sh &quot;sparkpost.com &amp; echo \$(whoami)&quot; &quot;google&quot; </code></pre> (Note: the ...
I see three layers of interpretation where there might be some sort of injection vulnerability. (EDIT: immediately after posting this, I realized that since you're working with domain names, you could just validate the inputs <em>in C</em> before any of this, and make the whole thing moot. The allowed characters in dom...
<h1>Yes it can!</h1> Like SQL injection, the key is to break the command sequence and insert your own. In this case, a semi-colon &quot;<strong>;</strong>&quot; will perform the break. Try this against your script: <pre><code>sh script.sh &quot;sparkpost.com &quot;;whoami; echo &quot;google&quot;;ls </code></pre>
https://security.stackexchange.com
178,704
[ "https://softwareengineering.stackexchange.com/questions/178704", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/74593/" ]
We have written an application that spawns at least 9 parallel processes. All processes generate a lot of logging information. Currently we are using Python’s <code>QueueHandler</code> to consolidate all logs into one file. Unfortunately, this sometimes results in very messy files which are hard to read (making it di...
Tag each log line with the process id as an identifier, then use grep when looking at the logs. Or something else besides the process id.
I prefer letting each process log to it's own file and later merge them together if needed/wanted. This way I don't have to concurrency/contention on one single log file. Being separate processes the log events are usually pretty disjoint anyhow. Performance wise this is the most efficient way to handle it. The joinin...
https://softwareengineering.stackexchange.com
82,909
[ "https://dsp.stackexchange.com/questions/82909", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/62758/" ]
I have implemented sample-rate conversion (SRC) from scratch in my hobby music player, and it worked fine. However, originally, the music player loaded entire audio files into memory and performed the sample-rate conversion on the entire audio signal during loading. I've now changed this to instead stream the audio fil...
You just need to save the last <span class="math-container">$N-1$</span> samples from the previous frame and prepend them to the data from your current frame, where <span class="math-container">$N$</span> is the filter length. An FIR filter is designed as <span class="math-container">$$y[n] = \sum_{k=0}^{N-1}h[k]\cdot ...
If you delay your output by N samples (or more), you will always have N samples of input after the new (interpolated or output) sample point available for use by your filter and/or interpolator. Or instead of considering it an output delay, you can consider the same thing to be an input fetch-ahead. Of blocks or sampl...
https://dsp.stackexchange.com
99,004
[ "https://chemistry.stackexchange.com/questions/99004", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/25484/" ]
We know that quantum tunneling is the reason behind several natural phenomenon like alpha decay and thermonuclear fusion inside the stars. How can it influence chemical reactions by tunnelling a species through the activation energy? If so how does it influence the kinetics and fraction of molecules taking part in the ...
The probability of tunnelling at an energy $E$ is given by $p(E)\approx e^{-bA\sqrt{m}}$ where $A$ is proportional to the <em>area</em> of the potential energy barrier above energy $E$, i.e. the top part of the potential barrier, $m$ the mass and $b$ some constants, $\pi, \hbar$. etc. Thus for a given mass and energy ...
Quantum tunneling in chemical reactions will only play a role if the collision energy and the spread in the collision energy of the reaction are very low. Just like in nucleosynthesis, the tunneling probability of a particle through a barrier only gets an appreciable value if the collision energy is very close to a qua...
https://chemistry.stackexchange.com
146,544
[ "https://dba.stackexchange.com/questions/146544", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/103346/" ]
When modelling a database, does the ER diagram depend on the DBMS used to implement the said ER?
When the ER (Entity-Relationship) model was devised in the 1970s, it was specifically intended to be implementation neutral (sometimes called "implementation agnostic"). The relational model, by contrast, was tilted towards a relational design and implementation. In classical three stage methodology, an ER model is...
Each ER diagram will be translated to SQL DDL. So we can translate you question to SQL DDL dependence from DBMS. In practice if you follow some SQL standard like SQL92 you are relatively undependable. If you use concrete RDBMS extensions for SQL standard you are dependable. It's the point.
https://dba.stackexchange.com
68
[ "https://cstheory.stackexchange.com/questions/68", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/148/" ]
Let G be a tree on 2n vertices. The treewidth of G, tw(G) = 1. Now suppose we add n edges to G to get a graph H. An easy upper bound on tw(H) is n + 1. Is this essentially the best possible? It seems somehow that tw(H) should be O(sqrt(n)) , but this is just a vague hunch. Do we know better upper bounds than O(n) for...
Your model is not really any less general than asking about arbitrary 3-regular graphs, and 3-regular expander graphs have linear treewidth. So I don't know about constant factors, but Θ(n) is best possible, yes.
As David pointed out, you basically ask for bounds on the treewidth of a connected graph with average degree 3. For the more special case of 3-regular graphs, the following lower and upper bounds can be obtained. Denoting by pw(G) the pathwidth of a graph G, it is clear that (1) tw(G) &lt;= pw(G) for any graph G (as a...
https://cstheory.stackexchange.com
666,178
[ "https://physics.stackexchange.com/questions/666178", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/119231/" ]
Why do objects fall down in same place on the rotating earth? I get that newton's first law is the reason an object falling on a high speed train will maintain the same velocity as a train and therefore appear to a train passenger to fall straight down. But why does something on a rotating mass like earth fall down in ...
<blockquote> But why does something on a rotating mass like earth fall down in same place? </blockquote> But they actually don't. Drop something from high enough and, even without any effects due to wind, you will observe the object moving relative to the Earth's surface. The reason you don't normally see these effects...
Actually it is not true , it's unnoticeable in human eye,the small fraction change in displacement of the body thrown upward.As it is thrown a short distance up into the air due to inertia it falls straight or with a small fraction of displacement over the ground,but if you throw a body high enough into the air the eff...
https://physics.stackexchange.com
7,156
[ "https://cstheory.stackexchange.com/questions/7156", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/206/" ]
<strong>Question:</strong> <blockquote> What is the best known formula size lower bound for an explicit function in AC<sup>0</sup>? Is there an explicit function with an $\Omega(n^2)$ lower bound? </blockquote> <strong>Background:</strong> Like most lower bounds, formula size lower bounds are hard to come by. I am...
A nice question! Khrapchenko can definitely not give quadratic lower bounds for $AC^0$ functions. His lower bound is in fact at least square of average sensitivity. And all functions in $AC^0$ have poly-logarithmic average sensitivity. Subbotovskaya-Andreev can apparently also not give such a function because the argum...
Thanks, Kaveh, for wishing to look at chapters on proof complexity! Concerning Robin's question, first that note $AC^0$ <b>contains</b> functions requiring formulas (and even circuits) of size $n^k$ for any constant $k$. This follows, say, from a simple fact that $AC^0$ contains all DNFs with constantly long monomials...
https://cstheory.stackexchange.com
24,933
[ "https://cstheory.stackexchange.com/questions/24933", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/25336/" ]
We are given a list $S$ containing $n$ numbers $S=(s_1,\ldots, s_n)$. Let $S \choose k$ be the set of all possible $k$-combinations from $S$ (i.e. size $k$ subsets of $S$). We want to compute the following expression: $$ \sum_{A\in {S \choose k}} \prod_{x \in A} x$$ Is there an algorithm for this problem that works m...
Consider the polynomial $p(t) = \prod_{i=1}^n (s_i t + 1)$. Then we want to compute the coefficient of $t^k$ in $p(t)$. We can compute $p(t)$ using fast polynomial multiplication and then output the coefficient of $t^k$. Say, partition $n$ polynomials $s_i t + 1$ into pairs and multiply the product of polynomials in ...
I guess the following trick is essentially "Newton's identities", but this seems a much more straightforward application to your question than what's on the wikipedia page. I've seen this mentioned on math.se before but don't know of a particular reference. First, we write down the polynomial $$ p(x) = \prod_{i=1}^n...
https://cstheory.stackexchange.com
264,109
[ "https://stats.stackexchange.com/questions/264109", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/145691/" ]
In what way does the curse of dimensionality affect the predictions? I know that as the number of predictors increases the observations that are geometrically near decrease, so we have to spread out more to capture the nearest neighbours. So my question is , in what other ways, than being computationally expensive , d...
The idea of nearest neighbours is that, due to continuity, other points close to your point of interest have values close to the value of your point of interest. If you have to spread very far out to find the 100 (for example) closest points, well then these points are not very close or neighbours anymore, and thus the...
The curse is that a lot of of things that work in lower dimension don't <strong>scale</strong> well (i.e. grow/shrink too fast compare to linear) with dimension. E.g. a measure of data quality is more than 2 times worse when you double the number of dimension. The curse comes in many form: the range of the data, the de...
https://stats.stackexchange.com
37,399
[ "https://stats.stackexchange.com/questions/37399", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/11917/" ]
I have a set of data, each element has a weight. I need to estimate the mean of this data. I found that there are two ways: A weighted geometric mean and a weighted mean. When should I use each of them and what are the advantages of using each of them?
The geometric mean and the mean whether weighted or unweighted are different parameters of a distribution. So the question of which parameter to estimate depends on which aspect of the distribution you are interested in. For a normal distribution, the mean and variance are the natural parameters and it seems that it w...
There is a practical difference between the two algorithms. Weighted arithmetic mean allows a lack in one element to be compensated by other elements, but weighted geometric mean better reflects a situation when a shortage in one element limits the result and cannot be compensated by other elements. For example, if you...
https://stats.stackexchange.com
212,707
[ "https://electronics.stackexchange.com/questions/212707", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/84456/" ]
We always assign a voltage drop to a resistor when a current goes through it in a closed circuit. I was wondering if this voltage drop is due to dissipated heat from the resistor or is there another reason?
The heat dissipation and volt drop are related, but I would not describe the dissipation as the <em>cause</em> of the drop. As electrons pass through a resistance, they lose energy as they interact with electrons in the conducting material. As energy is given up to the material, it gains thermal energy so its temperatu...
You can get a voltage drop across a capacitor and current can be flowing but no power will be dissipated so no, your question.... <blockquote> I was wondering if this voltage drop is due to dissipated heat from the resistor </blockquote> Is incorrect. Power is a by-product (for want of a better word) of current ...
https://electronics.stackexchange.com
49,692
[ "https://stats.stackexchange.com/questions/49692", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/18075/" ]
I have read a lot of research papers about sentiment classification and related topics. Most of them use 10-fold cross validation to train and test classifiers. That means that no separate testing/validation is done. Why is that? What are the advantages/disadvantages of this approach, especially for those doing res...
This is not a problem if the CV is <strong>nested</strong>, i.e. all optimisations, feature selections and model selections, whether they themselves use CV or not, are wrapped in one big CV. How does this compare to having an extra validation set? While the validation set is usually just a more or less randomly select...
[EDITED in light of the comment] I think there is a problem if you use CV results to select among multiple models. CV allows you to use the entire dataset to train and test one model/method, while being able to have a reasonable idea of how well it will generalize. But if you're comparing multiple models, my instinc...
https://stats.stackexchange.com
31,630
[ "https://softwareengineering.stackexchange.com/questions/31630", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/8153/" ]
What are best practices for managing and maintaining large Rails app?
The big need is test. Add a really big test suite to be sure avoiding some regression. When you can try to extract some part in gem too.
Note these are my recommendation based on experience.<br> They certainly include personal preferences and opinions gained through experience. <ul> <li>Tests for any code put into production.</li> <li>Make sure your source control is git over svn and others.</li> <li>A good issue / request / bug tracking system. I rec...
https://softwareengineering.stackexchange.com
59,382
[ "https://physics.stackexchange.com/questions/59382", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/22431/" ]
I have seen case studies of the 3D Debye model where the vibrational modes of a solid is taken to be harmonic with dispersion relation $\omega = c_sk$. It is said that for temperatures much less than the Debye temperature, the heat capacity at constant volume $$C_V\sim T^3$$. Now I want to show that for bosons with di...
For single quanta with an arbitrary dispersion relation $\omega(\vec{q})$, you can always write $E=\hbar \omega(\vec{q})$ and $\vec{p}=\hbar\vec{q}$. Energies might depend on momenta in some way, but de Broglie's relations hold for all single quanta, whether they're bosons like phonons or photons, fermions like electro...
I hope I remember this right from my solid state class (can't find my notes). The specific heat is something like $C_{v}\sim\int \frac{e^{\beta\omega}}{(e^{\beta\omega}-1)^2}g(\omega)d\omega$ where $g(\omega)$ is the density of states. And for a $3D$ lattice you get $g(\omega)d\omega =\frac{d^{3}k}{(2\pi)^3}=\frac{k...
https://physics.stackexchange.com
319,182
[ "https://softwareengineering.stackexchange.com/questions/319182", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/66354/" ]
<em>Please ignore performance issues, I am interesting in data flow, safety, modelling, reasoning.</em> I wonder what are the limitations of exception approach to error reporting implemented like in Java compared to Haskell-like (OCaml, and Rust use same/similar approach AFAIK). As far as I know in both cases error i...
I think the most interesting difference between the two, certainly from the perspective of a language designer, is that <em>Haskell's error handling is not a language feature</em> but is part of the library, and yet it manages to be just as expressive and easy to work with as Java's. The reason that this works so nice...
As @Jules points out, Haskell's monads can be implemented as a library, whereas Java's exceptions are built into the language. This has implications in practice: With Monads in Haskell, you can abstract over any function regardless of the errors, whereas in with checked exceptions in Java you can't. For example, you ca...
https://softwareengineering.stackexchange.com
716,096
[ "https://physics.stackexchange.com/questions/716096", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/95609/" ]
Let <span class="math-container">$\rho$</span> and <span class="math-container">$\rho'$</span> be <span class="math-container">$n\times n$</span> density matrices, and suppose that for every observable <span class="math-container">$A$</span> and every <span class="math-container">$\lambda$</span> in the spectrum of <sp...
Let <span class="math-container">$H$</span> denote a finite-dimensional complex Hilbert space, <span class="math-container">$\rho$</span> and <span class="math-container">$\rho^\prime$</span> be two density matrices, i.e. positive semi-definite operators with unit trace and <span class="math-container">$A$</span> an ar...
Actually <span class="math-container">$\rho=\rho'$</span>. Indeed, specializing <span class="math-container">$A= P= |\psi\rangle \langle \psi|$</span> for <span class="math-container">$||\psi||=1$</span>, the hypothesis implies <span class="math-container">$\langle\psi| (\rho-\rho')\psi\rangle =0$</span>. Linearity per...
https://physics.stackexchange.com
107,052
[ "https://mathoverflow.net/questions/107052", "https://mathoverflow.net", "https://mathoverflow.net/users/4701/" ]
Fix an algebraic closure, $\overline{\mathbb{Q}}$ for the rationals and consider the set, $B_p$, of all places of $\overline{\mathbb{Q}}$ over a fixed (possibly infinite) prime, $p$, of $\mathbb{Q}$. Let $G_\mathbb{Q}=\text{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$. 1: Let $G_\mathbb{Q}$ act on $B_p$ in the natural way...
If $p$ is a rational prime, then choosing a prime $v$ of $\overline{\mathbf{Q}}$ lying over $p$ amounts to choosing an embedding $i:\overline{\mathbf{Q}}\hookrightarrow\overline{\mathbf{Q}}_p$. This gives rise to a map $\varphi:G_{\mathbf{Q}_p}\rightarrow G_{\mathbf{Q}}$defined as follows: given $s$ in the source, $\va...
I do not understand what is $B_v$ in your notation, neither I see what you mean by "stabilizer of left multiplication". Anyhow you are right in saying that $H_v$ is the inverse limit of decomposition groups and is isomorphic to the absolute Galois group of $\mathbb{Q}_p$. If $p=\infty$ you get a cyclic group with two ...
https://mathoverflow.net
50,221
[ "https://mathoverflow.net/questions/50221", "https://mathoverflow.net", "https://mathoverflow.net/users/11765/" ]
Do we have examples of a contractible <strong>bounded</strong> open set $D\subseteq\mathbf{C}^n$ such that $Hol(D)$ (the group of biholomorphisms $f:D\rightarrow D$) acts transitively on $D$ but such that there exists no symmetry at a given point $x\in D$ (so at all points by homogeneity). By a symmetry at $x$ I mean a...
There are some examples given by Pjateckiĭ-Šapiro in Classification of bounded homogeneous regions in n-dimensional complex space. Dokl. Akad. Nauk SSSR 141 1961 316–319. and On bounded homogeneous domains in an n-dimensional complex space. Izv. Akad. Nauk SSSR Ser. Mat. 26 1962 107–124. (I have a vague memory that...
E.Cartan proved in 1936 that for dimension 1 and 2 bounded homogeneous spaces are symmetric. For dimension 3 he did not publish the proof considering it loo long in comparison to the interest of the result. This has now changed with P-Sapiro's example for dimension 4. So the proof for dimension 3 is presumably somew...
https://mathoverflow.net
30,140
[ "https://softwareengineering.stackexchange.com/questions/30140", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/6001/" ]
I want to obfuscate all the webpages of my website. I Googled through some free tools like HTML and Javascript obfuscation but don't know how effective they are. First of all, does it makes sense to obfuscate a webpage that could comprise of variety of codes like Javascript, PHP etc. Secondly, how effective is this m...
The best security against information being wrongfully used is to avoid sending the information over a public communications network.<br> If that is not an option, you have to consider who and what you are trying to protect against. If you want to be safe from third-parties snooping the traffic between your website an...
Obfuscating to attempt to hide PayPal button codes is not time well spent. You will not get a return on the time you spend on this so it is not worth the effort. Like others point out it can all be reversed so you will not be limiting those interested in finding out what goes on in your pages.
https://softwareengineering.stackexchange.com
5,059
[ "https://dba.stackexchange.com/questions/5059", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/1543/" ]
I have an index in place (from days of old) that I'm curious about. It's on a basic person table and the function is <pre><code>upper("LAST_NAME"||','||"FIRST_NAME"||"MIDDLE_NAME"||"SUFFIX_NAME") </code></pre> When trying to search on this index, I wind up with a full table scan. Any idea why? And if this is just com...
Are the columns nullable ? is the query a LIKE ? Is there an NLS issue ? I'd expect a <pre><code>upper("LAST_NAME"||','||"FIRST_NAME"||"MIDDLE_NAME"||"SUFFIX_NAME") = :bind </code></pre> to use a index range scan <pre><code>upper("LAST_NAME"||','||"FIRST_NAME"||"MIDDLE_NAME"||"SUFFIX_NAME") LIKE :bind </code></pre...
The CBO should be considering the index for query you have provided : <pre><code>create table person( last_name varchar(100), first_name varchar(100), middle_name varchar(100), suffix_name varchar(100) ); insert into person(first_name, last_name) values...
https://dba.stackexchange.com
610,365
[ "https://physics.stackexchange.com/questions/610365", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/207730/" ]
An object is released from rest in two conditions, one in which the object follows a straight path to the ground and one in which the object slides down a frictionless curved path. Will the time taken to reach the ground be the same in these two cases?
Simply, NO. You may think, that this is logical, since there is no energy dissipation, which leads to naive assumption <span class="math-container">$v=v(h)$</span>, where <span class="math-container">$v$</span> is velocity and <span class="math-container">$h$</span> is height... This can be derived from energy law: <sp...
<strong>The freefall object hits first.</strong> The object in freefall undergoes maximal acceleration directly toward its destination, since there is nothing to slow it down. It also passes through the minimum distance, which is a straight line between its starting position and the ground directly below. The object on...
https://physics.stackexchange.com
2,061,611
[ "https://math.stackexchange.com/questions/2061611", "https://math.stackexchange.com", "https://math.stackexchange.com/users/334909/" ]
I'm seriously having trouble in understanding the notation used for a splitting field: Let $f\in K[t]$. Is the splitting field notation $Σf/K$ or just simply $Σf$? What is the difference between the two? For example, let $t^2 + 1\in \mathbb{Q}[t]$. I know the splitting field of this polynomial is $\mathbb{Q}(i)$; do...
Both notations are the same, in $\Sigma_f/K$ the $/K$ part is here to emphasize on the fact that one take a splitting field of a polynomial over a given field which contains the polynomial coefficients. It makes no sense to talk about a splitting field of a polynomial without telling over which field. For example, a s...
I don't know this notation, but it <em>has</em> to be related to the field of coefficients, unless the context makes it obvious. For instance, as you wrote, for $f(x)=x^2+1\in\mathbf Q(x)$, one has $\;\Sigma f/\mathbf Q\simeq\mathbf Q(i)$. But if $f(x)=x^2+1\in\mathbf F_2(x)$, one has $\;\Sigma f/\mathbf F_2\simeq\m...
https://math.stackexchange.com
246,051
[ "https://dba.stackexchange.com/questions/246051", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/186375/" ]
I preinstalled Oracle Enteprise Linux and it automatically installed Mysql Community 5.1. But I wanna update it to 8. After update the daemon won't start and the <em>/var/log/mysqld.log</em> shows that <blockquote> [ERROR] [MY-012263] [InnoDB] The Auto-extending innodb_system data file './ibdata1' is of a different...
For the solution, I reinstall it completely with <pre><code>yum remove -y mysql mysql-server rm -rf /var/lib/mysql/ #to make sure it completely deleted yum install mysql mysql-server service mysqld start </code></pre> It works like a charm. Not recommending this solution if the database have useful data inside.
That is a gynormous upgrade. Plan A: Oracle recommends doing it in 4 steps 5.1 -> 5.5 -> 5.6 -> 5.7 -> 8.0. And, at each step, run mysql_upgrade. Plan B: Alternatively, you could dump the data and hope that the reload doesn't find some syntax errors. I fear that you may have already hosed the files too much to ha...
https://dba.stackexchange.com
22,572
[ "https://stats.stackexchange.com/questions/22572", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/6369/" ]
Will software eventually make statisticians obsolete? What is done that can't be programmed into a computer?
@Adam, if you think of statistical researchers analogously to those in other fields - people who build upon the existing methodology and knowledge - then it might make it more clear that the answer to your first question is 'No'. Statisticians that make a living from simply applying canned software packages could qui...
Computers will only make statisticians obsolete when strong AI makes humans as a whole obsolete. The question reminds me of the question about, "If there are all of these robust statistical methods, why do people still use other methods?" Some of the answer is habit and training, but much of it is that the question is...
https://stats.stackexchange.com
146,218
[ "https://physics.stackexchange.com/questions/146218", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/51930/" ]
I'm trying to analyse non-inertial motion in special relativity. First I'll start off with inertial motion. In my reference frame, my particle has coordinates <br> $x^\mu = (t, x)$<br> And in the particle's reference frame, it has coordinates<br> $x'^\mu = (\tau, 0)$<br> My understanding is that since we are in flat (a...
In the inertial frame K momentarily comoving with the particle, it is not true that its own coordinates are $(\tau,0)$. Here $\tau$ would be the accumulated time on a clock that has been moving along with the particle since some earlier time. This clock reading depends on the previous history of the particle, and is no...
<strong>Short answer</strong>: the Lorentz transformation does not give the correct transformation from an inertial frame to an accelerating frame, even if you let the velocity vary with time as you suggest. To convince you that this is so, recall that <ol> <li>An inertial observer see light travel along straight lin...
https://physics.stackexchange.com
682
[ "https://cstheory.stackexchange.com/questions/682", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/205/" ]
If $f$ is a convex function then Jensen's inequality states that $f(\textbf{E}[x]) \le \textbf{E}[f(x)]$, and <em>mutatis mutandis</em> when $f$ is concave. Clearly in the worst case you cannot upper bound $\textbf{E}[f(x)]$ in terms of $f(\textbf{E}[x])$ for a convex $f$, but is there a bound that goes in this direct...
EDIT: original version missed an absolute value. sorry!! Hi Ian. I will briefly outline two sample inequalities, one using a Lipschitz bound, the other using a bound on the second derivative, and then discuss some difficulties in this problem. Although I'm being redundant, since an approach using one derivative exp...
For insight, consider a distribution concentrated on two values; say, with equal probabilities of 1/2 that it equal 1 or 3, whence $\textbf{E}[x] = 2$. Take $N >> 0$ and $\epsilon > 0$. Consider functions $f$ for which $f(1) = f(3)= N\epsilon$ and $f(\textbf{E}[x]) = f(2) = \epsilon$. By making $\epsilon$ sufficien...
https://cstheory.stackexchange.com
317,606
[ "https://electronics.stackexchange.com/questions/317606", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/35526/" ]
I have a little confusion about sensitivity list rule: all signals that are read in the <em>always</em> block must be included in the list. When including the <em>posedge CLK</em> and <em>EN</em> in my sensitivity list, I get value of <em>x</em> changed when either of signals in the sensitivity list changes. Thus, if <...
Forget that rule. Here's a simpler one: <ul> <li>If you want sequential logic, use <code>always @(posedge clock)</code> (or <code>negedge</code>). You don't need to mention any other signals in the sensitivity block. (You can sometimes also use sensitivity lists like <code>always @(posedge clock or posedge reset)</co...
That rule is just for combinational logic, when the outputs are solely dependent on the current state of the inputs. Verilog 2001 added the <code>@(*)</code> syntax that automatically figures out the sensitivity list for you, and SystemVerilog added <code>always_comb</code> to capture your intent for the block (and als...
https://electronics.stackexchange.com
1,938,987
[ "https://math.stackexchange.com/questions/1938987", "https://math.stackexchange.com", "https://math.stackexchange.com/users/328193/" ]
Is it possible to prove the Tychonoff theorem <strong>in the finite case</strong> (the product of a finite number of compact spaces is compact), without using the axiom of choice ? My guess is yes but the proofs I've seen seem to use a form of choice at some point. (By choosing for all points of a space a given open s...
It suffices to prove that the product of two compact spaces is compact. Let $X$ and $Y$ be compact; $X\times Y$ is compact if and only if every filter on $X\times Y$ has a cluster point, so let $\mathscr{F}$ be a filter on $X\times Y$. Let $\pi_X:X\times Y\to X$ and $\pi_Y:X\times Y\to Y$ be the canonical projection ma...
Yes this is possible. Let $O$ be an open cover of $X\times Y$. Since the topology is generated by sets of the form $U\times V$ we can replace $O$ by $$O_1=\{U\times V|\exists W\in O, U\times V\subseteq W\}$$ It suffices to show that $O_1$ has an open cover. Define an open cover of $X$ as follows: an open set $U\subsete...
https://math.stackexchange.com
53,431
[ "https://security.stackexchange.com/questions/53431", "https://security.stackexchange.com", "https://security.stackexchange.com/users/42056/" ]
I pay for a very basic web hosting plan, which includes a personal email address. Would the sysadmin of said host be able to read the content of my messages? How likely would my personal mail folder be encrypted and secure from prying eyes nowadays?
By paying the company to host your website it means you have trusted them with full control on your website. Even if the websites directory was encrypted what stops the sysadmin from looking into the database and getting the key? If you for some reason don't trust hosting company you can always host it yourself.
It is very likely that /var/mail is <em>not</em> encrypted. But ask the host and you know for sure. Yes the sysadmin would be able to view and read your messages (encrypted or not, but if encrypted it's an extra barrier and depending on how the host has organized things a random sysadmin may or may not have access to ...
https://security.stackexchange.com
144,121
[ "https://stats.stackexchange.com/questions/144121", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/70932/" ]
I want to perform logistic regression with the following binomial response and with <span class="math-container">$X_1$</span> and <span class="math-container">$X_2$</span> as my predictors. <img src="https://i.stack.imgur.com/7iC8K.png" alt="data table with aggregated data" /> I can present the same data as Bernoulli r...
1) Yes. You can aggregate/de-aggregate (?) binomial data from individuals with the same covariates. This comes from the fact that the sufficient statistic for a binomial model is the total number of events for each covariate vector; and the Bernoulli is just a special case of the binomial. Intuitively, each Bernoulli t...
I just want make comments on the last paragraph, “The fact that the AIC is different (but the change in deviance is not) comes back to the constant term that was the difference between the log-likelihoods of the two models. When calculating the change in deviance, this is cancelled out because it is the same in all mod...
https://stats.stackexchange.com
111,706
[ "https://softwareengineering.stackexchange.com/questions/111706", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1130/" ]
I was thinking of this because I was trying to write an extension for an existing 3rd party software, and their database is horribly denormalized. I needed to use their existing tables and add a bunch of new fields. I had the option of either creating new tables in their design style (which consists of almost all the...
You should choose better design if: <ol> <li>You are going to be taking over a large part of future coding</li> <li>Better design isn't more expensive to the client in the long run. For instance, I have witnessed multi-month "refactorings" for projects that were discontinued by the end of the year.</li> </ol> You sho...
In the long run, it is better to use good practices. It will save time and effort as changes will take less time to implement. If possible, take little steps to refactor to good practice (for example: in SQL that would be breaking denoramlized tables to normalized one and using views with the old table names). You wi...
https://softwareengineering.stackexchange.com
605,108
[ "https://physics.stackexchange.com/questions/605108", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/284115/" ]
When a perfectly non elastic object (let's say a book) is dropped on the ground, it's kinetic energy from the fall is transformed into heat and sound. Now, if W = Fs, the work done by the normal reaction force on the book is zero since the book does not move after it hits the ground. My question is how can the kinetic ...
The work energy theorem assumes only one force, or the resultant of many. If you add other forces, like a friction, that will stop the moving object. In the case of the book it is the normal force that stops it and the book's deformation eventual gets dissipated into heat and deformation energy. This violates the macro...
&quot;Perfectly non elastic objects&quot; the size of a book do not exist, so nobody knows what would happen if you dropped one on the ground. (In classical mechanics, there is the concept of &quot;point particles,&quot; but we know that very small objects in the real world behave according to quantum mechanics not cla...
https://physics.stackexchange.com
147,924
[ "https://dba.stackexchange.com/questions/147924", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/80828/" ]
I backuped some SQL Server 2008 R2 databases using .bak files within SSMS, I sent them to a client and they're willing to open them within MS Access. Can you please tell me if this is possible and if limitations exists to perfmrom this procedures? My bak files are 40GB aprox Thanks in advance
It is not possible to restore a SQL Server backup into MS Access.
MS Access does not support that kind of action. I believe your best bet wold be to create a MS Access database and export the data from SQL Management Studio to the access database file. You can also try to export to flat file CSV and have them import it that way.
https://dba.stackexchange.com