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 |
|---|---|---|---|---|---|
33,310 | [
"https://dba.stackexchange.com/questions/33310",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/18275/"
] | I tired to execute an insert directly from phpMyAdmin as follows:
<pre><code>INSERT INTO oracle.PLAYLIST_MUSIC ( TID,
ID,
STATUS,
CREATED_BY,
CREATED_DATE,
UPDATED_BY,
UPDATED_DATE,
ORDER
)
VALUE... | Your insert syntax is wrong, using <code>column=value</code> in the <code>values</code> clause doesn't do what you think it does.
Try:
<pre><code>INTO oracle.PLAYLIST_MUSIC ( TID,
ID,
STATUS,
CREATED_BY,
CREATED_DATE,
UPDATED_BY,
... | In MySQL you can use the following syntax:
<pre><code>INSERT INTO oracle.PLAYLIST_MUSIC
SET
TID = 56919,
ID = 115948,
STATUS = '1',
CREATED_BY = 15217,
CREATED_DATE = NOW(),
UPDATED_BY = 15217,
UPDATED_DATE = NOW(),
ORDER = 0;
</code></pre>
| https://dba.stackexchange.com |
12,622 | [
"https://ai.stackexchange.com/questions/12622",
"https://ai.stackexchange.com",
"https://ai.stackexchange.com/users/21213/"
] | I wonder if Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR) use any machine learning or deep learning?
For example in AR, the virtual objects are brought into the real world, does this process involve any object detection and localization?
| The derivative of <span class="math-container">$\mathcal{L_1}(y, x) = (\hat{y} - y)^2 = (f(x) - y)^2$</span> with respect to <span class="math-container">$\hat{y}$</span>, where <span class="math-container">$f$</span> is the model and <span class="math-container">$\hat{y} = f(x)$</span> is the output of the model, is
... | <blockquote>
The MSE can be defined as <span class="math-container">$(\hat{y} - y)^2$</span>, which should be equivalent to <span class="math-container">$(y - \hat{y})^2$</span>
</blockquote>
They are not just "equivalent". It is actually the exact same function, with two different ways to write it.
<span class="ma... | https://ai.stackexchange.com |
316,216 | [
"https://electronics.stackexchange.com/questions/316216",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/83149/"
] | I printed a board recently and, long story short, the pads aren't laid out correctly for two IC's: a SOIC8 MAX1771 and an 80-pin HV507. I moved all the pads from the top to the bottom layer, but forgot to flip the sides. Thus, along one side of the SOIC8 pads, for example, the connections number 4β1 instead of 1β4. I d... | The 80QFP is thin enough that you may be able to place it upside down on the board, glue it in place, then carefully bend each pin down to its corresponding pad, and solder it. 80 pins is a lot to do that for though, this method is more commonly used on smaller chips.
I'm trying to find a good picture showing this tec... | While the procedure given by uint128_t is probably best, here's another.
Get yourself a spool of bare 30 gauge wire. Solder a short length to each pad, with each piece perpendicular to the row of pads. Now place the IC on its back, but use something like superglue or RTV to tack it in place. Now bend each wire 180 deg... | https://electronics.stackexchange.com |
92,923 | [
"https://stats.stackexchange.com/questions/92923",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/34872/"
] | <strong>BACKGROUND</strong>
I have data in which the dependent variable is binary with a highly-skewed distribution: <1% records are 1 (doers), >99% records are 0 (non-doers). I'm using logistic regression to predict the <strong>probability</strong> that new records are doers.
To handle this rare-event situation, ... | You need a hold-out dataset that is representative of the actual mix of 0s and 1s. Use each model in the ensemble to predict probabilities for the holdout dataset. Then fit a meta-model, where the inputs are the predicted probabilities and the output is 0 or 1.
Something like a simple logistic regression might work,... | One approach that might work would be to use a cutoff to determine 1 or 0 for each model. Then using your ensemble, for each record calculate the sum of total 1s for each record.
Wherever you have general agreement across models you would have greater certainty.
Set a minimum agreement criteria for your final classi... | https://stats.stackexchange.com |
462,050 | [
"https://physics.stackexchange.com/questions/462050",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/222206/"
] | I can't understand this intuitively. Figure 2.9 in Griffith's QM says that the wavefunction at <span class="math-container">$x=0$</span> for a delta function potential is <span class="math-container">$\sqrt{\kappa}$</span>, and to the right it decays like <span class="math-container">$\psi_+=\sqrt{\kappa}e^{-\kappa x}$... | <blockquote>
But the potential is infinitely high at <span class="math-container">$x=0$</span>
</blockquote>
You've misunderstood the configuration. To the extent that this kind of language makes sense, at <span class="math-container">$x=0$</span> the potential is infinitely <strong>low</strong>.
The delta-function... | Eigenstates satisfy the SchrΓΆdinger equation:
<span class="math-container">$$\hat H \psi(x)=E\psi(x)$$</span>
Multiplying by <span class="math-container">$\psi^*(x)$</span> and integrating over all the space:
<span class="math-container">$$\int\psi^*(x) \left(\frac{p^2}{2m} +V(x)\right)\psi(x)=E$$</span>
If we had ... | https://physics.stackexchange.com |
830,336 | [
"https://math.stackexchange.com/questions/830336",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/156491/"
] | It is asked to prove:
$\int _0^{\pi }\:\sum _{n=0}^{\infty \:}\frac{n\cdot \sin \left(nx\right)}{e^n}dx=\frac{2e}{e^2-1}$
I have tried to search for convergence and it gave me 0 so i can't solve it. Can you help me?
| $$\int_0^{\pi} \sin(nx)=\frac{1}{n}\left(-\cos(nx)\right|_0^{\pi} =\frac{1}{n}\left(1-(-1)^n\right)$$
Hence,
$$\int_0^{\pi} \sum_{n=0}^{\infty} \frac{n\sin(nx)}{e^n}=\sum_{n=0}^{\infty} \frac{1-(-1)^n}{e^n}=\left(\sum_{n=0}^{\infty}\frac{1}{e^n}\right)-\left(\sum_{n=0}^{\infty}\frac{(-1)^n}{e^n}\right)$$
$$=\frac{1}{1... | <strong>Hint</strong>
You could use
$$\int _0^{\pi }\:\sum _{n=0}^{\infty \:}\frac{n\cdot \sin \left(nx\right)}{e^n}dx=\sum _{n=0}^{\infty \:}\int _0^{\pi }\:\frac{n\cdot \sin \left(nx\right)}{e^n}dx=\sum _{n=0}^{\infty \:}e^{-n} (1-\cos (\pi n))$$
At this point, I stop since appeared Pranav Arora's very nice answe... | https://math.stackexchange.com |
1,975,404 | [
"https://math.stackexchange.com/questions/1975404",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/337982/"
] | For which $t\in \Bbb R$ are vectors $\vec{a}=\vec{i}+2\vec{j}+3\vec{k}$ , $\vec{b}=\vec{i}+t\vec{j}+\vec{k}$ and $\vec{c}=\vec{i}+\vec{j}+\vec{k}$ non coplanar?
Vectors are non coplanar if and only if $\alpha\vec{a}+\beta\vec{b}+\gamma\vec{c}=0 \iff \alpha=\beta=\gamma=0$
So in this case $\alpha(\vec{i}+2\vec{j}+3\ve... | Suppose $f(x)=\frac{x^2-x}{1-ax}=k$ for some fixed constants $a,k$. Solving for $x$ we get
$$x^2-x=k(1-ax)=k-kax$$
$$x^2+(ka-1)x-k=0$$
$$x=\frac{1-ka\pm\sqrt{(ka-1)^2+4k}}2$$
For a chosen $a$, $f$ attains all real numbers if and only if the discriminant $(ka-1)^2+4k$ is non-negative for all $k$. Expanding:
$$(ak)^2-2ka... | Hint: Calculate the discriminant and see when this stays non-negative for every value of $y$.
| https://math.stackexchange.com |
124,170 | [
"https://chemistry.stackexchange.com/questions/124170",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/86243/"
] | One standard definition of equilibrium in beginner chemistry is that for a reversible reaction, (dynamic) equilibrium has been achieved when the rate of the forward and backward reactions are equal. We also define the equilibrium constant for a given reaction in terms of a ratio involving the concentrations of products... | Proper definitions of chemical equilibrium will not involve reaction rates whatsoever. Thermodynamics does not care about time. Chemical potential is the work required to form a molecule in solution, irregardless of the time it takes. Statistical Mechanics says chemical potential is the work required to move a molecule... | You have to look at two things in terms of equillibrium.
<ul>
<li>The pot with the solution, once all AgCl is dissolved and you have stirred it a bit more, is in equillibrium. Obviously. There is no chemical potential gradient, and you have only one phase. By itself, nothing will ever happen again in it.</li>
<li>The ... | https://chemistry.stackexchange.com |
236,251 | [
"https://softwareengineering.stackexchange.com/questions/236251",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/33996/"
] | In mark-sweep-compact garbage collection algorithm you have to stop-the-world when relocating objects because reference graph becomes inconsistent and you have to replace values of all references pointing to the object.
But what if you had a hash table with object ID as a key and pointer as value, and references would... | Updating references is <em>not</em> the only thing that requires a pause. The standard algorithms commonly grouped under "mark-sweep" all assume that the entire object graph remains unaltered while it's being marked. Correctly handling modifications (new objects created, references changed) requires rather tricky alter... | <blockquote>
All problems in computer science can be solved by another level of indirection β¦ except for the problem of too many layers of indirection
</blockquote>
Your approach does not immediately solve the problem of garbage collection, but only moves it up one level. And at what cost! Now, every memory access g... | https://softwareengineering.stackexchange.com |
666,774 | [
"https://physics.stackexchange.com/questions/666774",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/314241/"
] | Everything I have read did not explain it at all and just stated the fact. So WHY (what specific forces involved) excited electron spontaneously comes back to ground energy levels. Is it nucleus pulling electron inwards, so electron can not hold on in new energy level because part of energy was emitted while traversing... | In general
<span class="math-container">\begin{equation}
\langle \varphi| A |\psi \rangle^* = \langle \psi| A^\dagger |\varphi \rangle
\end{equation}</span>
If <span class="math-container">$A$</span> is hermitian <span class="math-container">$\Rightarrow A = A^\dagger$</span>
<span class="math-container">\begin{align}
... | I will approach your problem from a pure mathematical perspective:
<ol>
<li>Let me first say that in your post you use the same notation <span class="math-container">$\dagger$</span> for two distinct mappings which have two different definitions and notations. One mapping acts on the space of linear densely defined ope... | https://physics.stackexchange.com |
398,457 | [
"https://softwareengineering.stackexchange.com/questions/398457",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/93586/"
] | I'm a backend developer working on a webpage, building the CSS part. I like to write as less code as possible and reuse them throughout the site, a lot of pages.
I want to be able to reuse some CSS code. For example, if i have this code:
<pre><code>.box1{
background: blue;
height: 200px;
align-items: cent... | The reason this:
<strong>Example 1</strong>
<pre class="lang-css prettyprint-override"><code>.box1, .box2, .box3, .box4 {
/* common styles */
}
.box1 {
border-color: red;
}
.box3 {
text-align: center;
}
</code></pre>
is preferable to this:
<strong>Example 2</strong>
<pre class="lang-css prettyprint-o... | In my experience, attempts to write reusable CSS often lead to very hard to maintain code.
The problem with this idea is all your components across the application are tightly coupled together. What happens if you suddenly want one of the components to vary in its behaviour differently from the others? In practice, dif... | https://softwareengineering.stackexchange.com |
389,304 | [
"https://softwareengineering.stackexchange.com/questions/389304",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/332010/"
] | So, first of all hello to everyone, I hope you are having a good day :)
I will give you a little context. I coded a program for my job, in which I save to a database Errors ID and their solutions. It could be one or more solutions.
Right now the database is a text file which contains a dictionary, with keys being the ... | You should not give any client access to the SQL. Give them an API instead.
If you do want to give them access then depending on your database tech there are a number of solutions
<ul>
<li>One database each.
This is the easiest solution</li>
<li>Row level access restrictions</li>
<li>Duplicate tables into multiple s... | I'm not totally sure if/how this would work... but you could perhaps have one database, and one main set of tables, but then create unique views into each table for each user/instance. You'd only grant access to that users views, and the views would limit the data they return to only return that users data.
(Not a su... | https://softwareengineering.stackexchange.com |
131,699 | [
"https://security.stackexchange.com/questions/131699",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/6103/"
] | I've heard other parents say that they've monitored their kids access via services available from their phone provider; is this true? As for the internet stuff I believe I've already got that covered. I've also heard that text messaging can be monitored. Is it possible to control which apps they install as well?
| Give them your old iphone and don't let them change the password. Help them understand that the internet is forever, and what is and is not appropriate. My daughter isn't really texting addicted, phone addicted or game addicted, but if it became a problem I would confiscate that sucker in a heartbeat. A phone is a p... | If your child has an iPhone you can use the same Apple ID so that all his iMessages go to your phone as well. But problem with that is any android message will not go through, and they could also shut that off on their own. iPhone is good with its restrictions though. You can set it up so they can't use Internet, can't... | https://security.stackexchange.com |
5,091 | [
"https://security.stackexchange.com/questions/5091",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/2583/"
] | Usually it is advised, when one wants to secure an application, to "provide" as little information, or better yet, no information at all to unauthorized (possibly malicious) users. I'm thinking of information like OS, app version, etc.
My question is the following:<br>
I have a web application that allows access only ... | If your web server is only serving specific IPs, it's probably a better idea to only allow those IPs in your firewall.
| <blockquote>
is there anything wrong?
</blockquote>
It depends on that HTTP responses you are providing to HTTP requests. I think you are returning 403 Forbidden, but are you returning it in response to all requests?
GET, HEAD, PUT, POST, DELETE, TRACE, CONNECT, OPTIONS
Try sending all these requests from an unaut... | https://security.stackexchange.com |
255,669 | [
"https://softwareengineering.stackexchange.com/questions/255669",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/46212/"
] | In my team, we work closely with a few software architects. They approve all design decisions of our projects, do some code reviews etc.
Our projects consist mainly of backend functionality implemented in PHP using the Symfony 2 framework. So syntactically, the code, naming conventions and project structure look almos... | They are probably doing so because of naming conflicts. I assume that you cannot have two methods named <code>getEntity</code>, one which possibly throws an exception and one which returns <code>null</code>. Therefore, you have to name them accordingly.
I, for one, dislike the practice of having many different way... | In my code I sometime create method pairs with names like getEntity() and getEntityOrNull(). The name makes the expected behavior clear. If getEntity() finds no entity then an exception is thrown. getEntityOrNull() will return a null.
By doing this, the calling code becomes a bit clearer. If the calling code has t... | https://softwareengineering.stackexchange.com |
10,918 | [
"https://electronics.stackexchange.com/questions/10918",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/1225/"
] | I have a package of 10 inductors, all of which are supposed to be 22Β΅H, but they all have "220" printed on the case. It does not seem right when I compare to an otherwise identical (same type) inductor with an inductance of 3.3Β΅H, which has "3R3" printed on it. Is it just odd ordering or am I missing something? Inducto... | That should be read as 22 Γ 10<sup>0</sup> Β΅H and 3.3 Β΅H respectively. The R is a decimal, the last digit otherwise is an exponent.
| There are two ways of marking parts...
A Three digit code for values from 10 and up
<pre><code>X Y Z
X - First digit
Y - Second digit
Z - Power of ten
220 would be 22 = 22 x 10^0 (1)
221 would be 220 = 22 x 10^1 (10)
222 would be 2,200 = 22 x 10^2 (100)
223 would be 22,000 = 22 x 10^3 (1000)
</code></pre>
The Minim... | https://electronics.stackexchange.com |
496,025 | [
"https://physics.stackexchange.com/questions/496025",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/26275/"
] | I have an object that I am observing and focusing on, on a microscope slide. Half of the object is naked and half is covered with another microscope slide (not a coverslip).
Why do I have, in order to focus on the object, to bring the covered part further away from the objective than the naked part ?
| The rays from the object emerging from the glass slide appear to come from an image that is closer to the glass-air interface than the object is. This is because of the refraction that takes place at the glass-air interface, which is also the reason why a swimming pool filled with water appears shallower than it really... | In short, because the glass slide has a bigger index of refraction and therefore adds optical path, so the object looks like it is further away than it is.
If you want a bit more detail, you can see what's going on using a rough ABCD-matrix analysis, where the matrices for the flat air-glass interface, the in-glass pr... | https://physics.stackexchange.com |
56,401 | [
"https://electronics.stackexchange.com/questions/56401",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/18389/"
] | I'm learning about sequential logic and am wondering about the behavior of a clocked SR flip-flop.
<img src="https://i.stack.imgur.com/YErQ1.png" alt="http://en.wikipedia.org/wiki/File:SR_%28Clocked%29_Flip-flop_Diagram.svg">
If R=S=0, then the AND gates evaluate to 0. In that case, and if the recurrent inputs to the... | First, personally I would refer to the circuit you show as a set-reset flip-flop with enable, also called a latch. I reserve the words register and clock for an edge-activated two stage memory element.
The instable situation you sketch does exist and is called metastablility. It occurs when both of the set-rest flip-f... | Scenario 1:
Let's assume the outputs from BOTH And gates are zero. And also assume /Q =0. The top Nor gate will then have inputs of (0,0) -> NOR(0,0) = 1 = Q. With the Q output being 1 the lower NOR gate has inputs of (1,0) -> NOR(1,0) = 0 = /Q which we defined before.
Scenario 0: [ ;) ]
Let's still assume the o... | https://electronics.stackexchange.com |
345,783 | [
"https://physics.stackexchange.com/questions/345783",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/142382/"
] | In relativistic quantum field theory, we can observe that the Dirac equation is a square root of Klein-Gordon equation. But, we can get the Dirac equation by defining Dirac spinor as $(1/2,0)\oplus(0,1/2)$ representation of $\mathrm{Spin}(3,1)$ like Klein-Gordon equation and Maxwell action (Weinberg, Schwartz). So, I h... | Let us rewrite your expressions for velocity and displacement in terms of time, setting:
$\ \frac{mg}{b}=v_{lim}$ and $\frac{m}{b}=\tau$, so we have:
$$\ v(t)=v_{lim}+(v_0-v_{lim})e^{-t/\tau}$$
$$\ x(t)=v_{lim}t+\tau(v_0-v_{lim})(1-e^{-t/\tau})$$
Now, deriving $\ t$ from the first expression:
$$\ \frac{v(t)-v_{lim}}{... | It isn't necessary to subsitute the solution for $t$ into $x$, it is possible to achieve the correct solution using the chain rule:
$$\frac{dv}{dt}=\frac{dv}{dx}\frac{dx}{dt}=v\frac{dv}{dx}$$
$$mv\frac{dv}{dx}=mg-bv \quad v\left(0\right)=v_0$$
To simplify things i will make all variables dimensionless:
$$\tilde{v}=\f... | https://physics.stackexchange.com |
327,460 | [
"https://stats.stackexchange.com/questions/327460",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/136746/"
] | Harrell's course notes for <em>Regression Modeling Strategies</em> state
<blockquote>
One problem prevents most of these methods [mostly referring to lasso and relatives and variations] from being ready for everyday use: they require scaling predictors before fitting the model. When a predictor is represented by non... | I can't get into @FrankHarrel 's mind, and do hope he offers an answer himself, but I'll add my own thoughts on your questions.
<blockquote>
Is there a general problem with regularization and using multiple transformations of the same variable?
</blockquote>
No, definitely not if your goal is prediction. In genera... | I will try to answer your question as far as I understand it:
1-)There is no problem using multiple transformations of the same variable by changing the scaling parameter. Actually, this is one of the reasons why you would wanna use the lasso. You try a bunch of scale parameters and you find the "optimum" one using cr... | https://stats.stackexchange.com |
176,393 | [
"https://mathoverflow.net/questions/176393",
"https://mathoverflow.net",
"https://mathoverflow.net/users/22180/"
] | <ol>
<li>Let $G$ be a reductive algebraic group over ${\mathbb Z}$ (or a finite
localization of a ring of integers $R$ in a number field) acting on an
affine scheme of finite type $M=Spec(A)$ over $R$.
We can take the invariants $A^G$, and then reduce
modulo a prime $p$: $A^G\otimes_{\mathbb Z}{\mathbb F}_q$. We can f... | The answer to the first question is affirmative if we assume the generic fiber is normal.
First, some general setup (so it is well-posed to speak of "compatibility with any base change" below). Let $S = {\rm{Spec}}(D)$ be an affine scheme and $X = {\rm{Spec}}(A)$ a finitely presented affine $S$-scheme equipped with... | The answer to the first question is positive. One does not need normality of the
generic fiber. By the universal coefficient theorem [Prop I 4.18 (a) in Jantzen
Representations of algebraic groups], it suffices to know that $H^1(G,A)$ vanishes
generically on $Spec(R)$. But this is implied by theorem 33 of my paper wi... | https://mathoverflow.net |
378,467 | [
"https://math.stackexchange.com/questions/378467",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/55289/"
] | Given $p$, $q$ both primes such that $q = 2p + 1$, I need to prove that $-4$ is a primitive root mod $q$.
So far haven't found a direction that could lead me to the solution.
Any suggestion or short solution would be helpful, thanks in advance.
| The order of $-4$ can only be $1,2,p,2p$. It is easy to whos that it is not $1,2$ thus we only need to show it is not $p$.
Since $(-4)^{\frac{q-1}{2}}=\pm 1 \pmod q$ you need to prove that $(-4)^{\frac{q-1}{2}} \equiv -1 \pmod q$. This is the same as showing that $4^{\frac{q-1}{2}} \equiv 1 \pmod q$.
<strong>Hint<... | We use a counting argument that works well for these Sophie Germain prime situations.
Modulo $q$, there are $\varphi(\varphi(q))$ primitive roots. In our case, we have $\varphi(\varphi(q))=p-1$, so there are $p-1$ primitive roots of $q$.
But there are only $p$ quadratic non-residues of $q$. So every quadratic non-re... | https://math.stackexchange.com |
349,055 | [
"https://electronics.stackexchange.com/questions/349055",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/174208/"
] | I have a vape device with a mod that lets me configure the power I want to operate it with and also as an additional setting that is called vape strength which can be set to soft/medium/hard.
When operating it on soft it generates just medium amount of light vape. On hard it tastes most of the time burnt.
So my ques... | It could be monitoring temperature by the PTC resistance of the heater and altering the duration of power or total energy. I have seen expensive Vapes with many digital parameters on an LCD and this is how I imagine they have control over these variables.
<h2>opinion</h2>
I think soft and hard referring to <strong>sl... | Power is most likely not fixed. From your description, it seems that power is at least one of the parameters that is altered as a result of the soft/medium/hard setting.
The heater is most likely a nichrome element. This is often used for electrical heating since it has relatively high resistivity and can handle glo... | https://electronics.stackexchange.com |
5,902 | [
"https://mechanics.stackexchange.com/questions/5902",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/426/"
] | My 92 Civic has very old spark plug wires, probably original, but their resistance is in-spec (under 20k ohms), they have no external damage, and the vehicle has no misfire or other symptoms associated with bad wires, aside from having worse gas mileage than it used to. Is there any reason to replace them? Would doing ... | Mostly replacement is preventative maintenance. Eventually they'll get cracks that moisture can get into, etc. If they test good, they're probably fine for the moment, however, at their age they could develop problems any time.
On my '91 Toyota, I've been through several sets now, and have to say that in my case, OE... | If it ain't broke don't fix it. If your wires already check out and you don't have misfires it is probably not worth replacing them just yet.
You could possibly get better performance out of better coils and plugs but even those numbers are pretty minimal. Best thing I can recommend for fuel economy is to use seafoam ... | https://mechanics.stackexchange.com |
302,660 | [
"https://stats.stackexchange.com/questions/302660",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/176862/"
] | I run a regression with an interaction term similar to the form below:
$$
Y = B_0 + B_1 X_1 + B_2 X_2 + B_3 X_1X_2
$$
where $Y$, $X_1$, and $X_2$ are continuous variables. In terms of the interpretation, the effect of a $1$ unit increase in $X_1$ is:
$$
B_1+B_3X_2
$$
Similarly, the effect of a $1$ unit increase in $X_2... | @gung answered your third question. But you also asked
<blockquote>
But can I conclude about the impact of X1 and X2 from the same
regression? Or am I mistakenly using the same result twice?
</blockquote>
Yes, you can conclude about both X1 and X2 from the same regression, that is one of the main motivations beh... | If both $X_1$ and $X_2$ increase by $1$-unit simultaneously, $Y$ will increase by $B_1 + B_2 + B_3 + B_3X_{1i} + B_3 X_{2i}$, where $X_{1i}$ and $X_{2i}$ are the values of $X_1$ and $X_2$ from which you started. The fitted $B$s are automatically scaled to the units of your variables, so the result is just simplifying ... | https://stats.stackexchange.com |
3,698,973 | [
"https://math.stackexchange.com/questions/3698973",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/794574/"
] | It's a question involving three variables <span class="math-container">$a, b$</span> and <span class="math-container">$c$</span>. One just has to find the ratio of the three variables.
| <span class="math-container">$$ P^T H P = D $$</span>
<span class="math-container">$$\left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 1 & 0 \\
\frac{ 1 }{ 2 } & \frac{ 3 }{ 4 } & 1 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
2 & 0 & - 1 \\
0 & 8 & - 6 \\
- 1 &... | Hint: Subtract and complete two squares.
| https://math.stackexchange.com |
4,183,970 | [
"https://math.stackexchange.com/questions/4183970",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Let <span class="math-container">$p_1,p_2,\cdots,p_t\in\mathbb{Z}$</span> be primes and consider the set of all rational numbers <span class="math-container">$r=a/b, a,b\in\mathbb{Z}$</span> so that <span class="math-container">$\text{ord}_{p_i}a\geq\text{ord}_{p_i}b$</span> for <span class="math-container">$i=1,2,\cdo... | After OP's work
<span class="math-container">$$y=\frac{dp}{dy}(\sqrt{y^2+p^2}-p)$$</span>
This is a homogeneous equation for <span class="math-container">$p(y)$</span>
<span class="math-container">$$\frac{dp}{dy}=\frac{y}{\sqrt{y^2+p^2}-p}=\frac{\sqrt{y^2+p^2}+p}{y}$$</span>
Let <span class="math-container">$p=vy$</spa... | Let <span class="math-container">$y=e^z$</span> which makes the equation to be
<span class="math-container">$$z'+(z'-\sqrt{z'^2+1}) \left(z''+z'^2\right)
=0\implies z''=z'\sqrt{1+z'^2}$$</span> Reduction of order <span class="math-container">$(p=z')$</span> leads to
<span class="math-container">$$p'=p\sqrt{1+p^2}$$<... | https://math.stackexchange.com |
6,608 | [
"https://mathoverflow.net/questions/6608",
"https://mathoverflow.net",
"https://mathoverflow.net/users/362/"
] | Let $B$ be the graded ring $\bigoplus_i B^i$ (with $B^k B^l \subset B^{k+l}$), and $B_f$ the multiplicative group of all formal sums $1 + b_1 + b_2 + \cdots$ where $b_i \in B^i$ for all $i$.
The idea when talking about genera (such as the Todd genus or the $L$ genus) is that we can take $B$ to be $H^{2 \bullet}(X,\mat... | I think the idea is that using the splitting principle everything reduces to the first Chern class of line bundles: Chern classes of a general bundle $E$ are symetric functions of $c_1(L_i)$ where $\bigoplus L_i = E$.
If $Q(z)$ is a power series with constant term 1, you can define $K_n$ by the formula:
$$
\sum K_n... | Ok, I was getting confused about something rather silly.
As YBL says, getting a multiplicative sequence from a formal power series does just depend on the formula
$$1 + \sum_n K_n(\sigma_1, \ldots, \sigma_n) = \prod_j Q(z_j).$$
This is an algebraic identity in $\Lambda[[z_1, z_2, \ldots]] \cong \Lambda[[\sigma_1, \s... | https://mathoverflow.net |
85,917 | [
"https://electronics.stackexchange.com/questions/85917",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/27128/"
] | Here's the schematics of my NTC - ADC circuit,
<img src="https://i.stack.imgur.com/dE1DR.png" alt="NTC">
<img src="https://i.stack.imgur.com/IfZZf.png" alt="NTC-ADC">
<img src="https://i.stack.imgur.com/VTKbe.png" alt="AREF">
ADC 10bits, ADCVCC 2.56V
Vin = 5V
Someone can explain me how i get RT, the value of resi... | <blockquote>
Someone can try to explain me how to convert my ADC value to
Resistence of thermistor with this schematics?
</blockquote>
Firstly, the op-amp circuit is doing very little other than adding a small error. If it had gain, you could argue it had a benefit.
Secondly, this circuit benefits from using the... | I ran your code in Python and got 285 for adc_val = 1 and -84 for adc_val = 1023. With an adc_val of 318, I get 25.9. RT at that point is 4504. So it looks like your equations should be right. Are you sure it is being implemented correctly in terms of types? It has to be all floating point. If something is being ... | https://electronics.stackexchange.com |
222,201 | [
"https://dba.stackexchange.com/questions/222201",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/163203/"
] | I have 30 million rows inside a sql server database where I've added a simple tagging column. One character allowing null. I did add an index for the column.
I use it to keep track of which rows have been processed for a data extraction. During the initial development I will be restarting the extraction process from ... | Used the following and it executes in 41 seconds !
<pre><code>USE AcmeDatabase
DROP INDEX IF EXISTS IX_LegacyExtract ON AcmeWidgetTable
ALTER TABLE AcmeWidgetTable DROP CONSTRAINT IF EXISTS DF_Legacy_Extract
ALTER TABLE AcmeWidgetTable DROP COLUMN IF EXISTS LegacyExtract
GO
ALTER TABLE AcmeWidgetTable CHAR NOT N... | Depends on the type of data you have and if it's write intensive or not but I've used this approach a lot.
<ol>
<li>Select MAX(id) From TABLEX;</li>
<li>Create Table TABLEX_2 LIKE TABLEX;</li>
<li>Insert Into TABLEX_2 Select COLUMN1,COLUMN2,....,MYNEWVALUE From TABLEX Where ID <= MAX_ID_IN_STEP_1;</li>
<li>RENAME ... | https://dba.stackexchange.com |
350,358 | [
"https://physics.stackexchange.com/questions/350358",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/84950/"
] | In the textbook "Topological Insulators and Topological Superconductors" by B. Andrei Bernevig and Taylor L. Hughes, there is a chapter titled "Hall conductance and Chern Numbers". In section 3.1.2 (page 17) they are discussing including an external field in a tight binding model, the Peierls substitution. They make th... | I think that what is wrong is the approximation above. Let's take the function: $f(x)=x$ to see it clearly.
You say that: $$A(Rβ²,t)+A(R,t) \approx A\left(\dfrac{Rβ²+R}{2},t\right)$$
(it can be easily deduced from the equation shown)
That would mean that:
$$R'+R\approx\dfrac{R'+R}{2}$$
Don't you think that here the $\... | I'm not sure if this is just a more longwinded restating of ccorbella's answer, but I there might be a little room for confusion.
I think the problem is in the last part of your first expression.
Assuming that $A$ is slowly varying we can Taylor expand about $\frac{R+ R'}{2}$, so we have
\begin{equation}
\frac{1}{2}... | https://physics.stackexchange.com |
381,032 | [
"https://mathoverflow.net/questions/381032",
"https://mathoverflow.net",
"https://mathoverflow.net/users/60984/"
] | <strong>Notation.</strong> Denote <span class="math-container">$\mathbf{1}=(1,1,\ldots,1)$</span> as the vector-of-ones in <span class="math-container">$\mathbb{R}^n$</span>. Write the "positive part" as <span class="math-container">$[\alpha]_+ = \max\{\alpha,0\}$</span> for <span class="math-container">$\alp... | There's a certain confusion underlying your question, which Andreas Blass's answer is trying to point out. Let me see if I can explain it in different words.
You say, βthe negation of Con(ZFC) proves it halts in finite timeβ and you are trying to use this fact to argue about which axioms beyond ZFC to accept. The best... | <span class="math-container">$\DeclareMathOperator\BB{BB}$</span>Philosophical issues, like acceptance (or non-acceptance) of large cardinals, won't affect <span class="math-container">$\BB(n)$</span>, because the busy beaver function is defined arithmetically and so depends only on the natural numbers. Specifically, s... | https://mathoverflow.net |
70,091 | [
"https://dba.stackexchange.com/questions/70091",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/16052/"
] | I am using Visual Studio 2012 Professional with SQL Server Data Tools with a SQL Server 2012 standard edition database instance.<br>
I have been unable to locate a master.dacpac file on either my development machine or on the server hosting the SQL Server instance.
How can I obtain this file, so I can get rid of warn... | You should be able to add a Database Reference. Click Project-> Add Database Reference. Click the radio button for System and then master. Code with references to objects in the master db should now build correctly.
| The master.dacpac and msdb.dacpac files for SQL 2012 are usually installed at <code>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\100\SQLSchemas\</code>
| https://dba.stackexchange.com |
104,148 | [
"https://mathoverflow.net/questions/104148",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25566/"
] | Hello,
In the differentiable case it is quite easy to prove that vector bundles are equivalent to smooth maps to the Grassmannian $G_{k}(\mathbb{R}^N)$ for some integer $N>>0$. The proofs I have seen of this use a partition of unity on the base space to embed the bundle into a trivial bundle.
Now in the holomor... | Choose a set of generators for $G$. Draw the Cayley graph of the action of $G$ on $G/H$. Choose a set of generators for the fundamental group of the graph. For each generator of the fundamental group, multiply the generators of $G$ corresponding to the edges together in order. This will be a set of generators for $H$.
... | (I wanted to post this a comment on @Will Sawin's answer, but I don't have the rep yet. Also it turned out to be convenient to flesh it out a little longer than comment.)
Will's answer assumes that you know a fixed element of $G/H$ that you can use as your basepoint for the fundamental group, namely the identity coset... | https://mathoverflow.net |
112,168 | [
"https://cs.stackexchange.com/questions/112168",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/105746/"
] | First, let's see the pseudocode proof of halting problem:
<pre><code>P(x) =
run H(x, x)
if H(x, x) answers "yes"
loop forever
else
halt
</code></pre>
Then we have a problem:
When param x is the encoding string of P itself, the code line <code>run H(x, x)</code> will go to an infinite loop.
Becau... | You are committing a logical error. This question has nothing whatsoever to do with computability and machines. It is entirely about how to prove that something does not exist. Namely, to show the statement
<span class="math-container">$$\lnot \exists x . \phi(x)$$</span>
we do as follows:
<ol>
<li>Assume that there i... | First, let us see what the halting proof attempts to prove:
<blockquote>
There is no program <span class="math-container">$H$</span> that, on input <span class="math-container">$(x,y)$</span>, always halts, and returns whether the program encoded by <span class="math-container">$x$</span> halts when run on the input... | https://cs.stackexchange.com |
6,464 | [
"https://dba.stackexchange.com/questions/6464",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3709/"
] | I've just had some database backup problems on a website I run containing some important lead data. Unfortunately, I've now lost one of the key MySQL tables, which means my data has lost its relationship and is now hard to read and manipulate in Excel. Luckily, I did manage to keep 1 table which contains the important ... | This will generate a CSV per lead_id in order of field_number.
<pre><code>SELECT lead_id, lead_id, GROUP_CONCAT(value)
FROM test_table
GROUP BY lead_id
ORDER BY field_number
INTO OUTFILE '/tmp/result.txt'
FELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
</code></pre>
There are 2 lead_id ... | I would do this in Excel - much easier!
Give the following assumptions...
<ol>
<li>ALWAYS two items within the "field_number" field</li>
<li>information sorted by "id,lead_id,field_number"</li>
<li>Rename cells D1 and E1 as "field_1" and "field_2"</li>
</ol>
Then use the following formulae;
<ol>
<li>In cell E2; "=D... | https://dba.stackexchange.com |
27,809 | [
"https://physics.stackexchange.com/questions/27809",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/9034/"
] | The intensity of an electromagnetic wave is only related to its amplitude $E^2$ and not its frequency. A photon has the same wavelength as the wave that's carrying it, and its energy is $h f$.
So if a laser wave is kept at the same amplitude and the wave length is reduced, why does its intensity remain the same even... | In order for the intensity of a light source to stay the same, while each lower frequency photon carries less energy, there must be a greater number (per time, per area) of the lower frequency photons in the beam than the original number of higher frequency photons.
As for the second part of your question, I admit tha... | The frequency $f$ and the intensity or power $P=\epsilon_0 E_{\rm max}^2 Ac$ (energy per second where $A$ is area) are independent quantities so you may change each of them independently of the other. The energy of one photon is $E=hf$ so it's a simple function of the frequency; the number of photons per second is ther... | https://physics.stackexchange.com |
2,526,262 | [
"https://math.stackexchange.com/questions/2526262",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/504406/"
] | I have to find the projection of $v=(1, β1, 1, 1)$ on $S=\langle(0, 1, 1, 1) , (1, 1, 1, 0)\rangle$. This is what i'd do in 3 dimensions:
<ul>
<li>Find a base of $S$</li>
<li>Find a vector perpendicular to the plane generated by $S$ using cross product</li>
<li>Project $v$ on this last vector to get $w$</li>
<li>The p... | You can apply Gram-Schmidt to obtain an orthonormal basis of $S$. What I got was $\{e_1,e_2\}$, with$$e_1=\frac1{\sqrt3}(0,1,1,1)\text{ and }e_2=\frac1{\sqrt{15}}(3,1,1,-2).$$Then, the projection of $v$ is$$\langle v,e_1\rangle e_1+\langle v,e_2\rangle e_2=\frac15(1,2,2,1).$$
| For general $n$-dimensional Euclidean spaces the inner product of two $n\times1$ vectors $u=(u_1~u_2~\cdots~u_n)^t,v=(v_1~v_2~\cdots~v_n)^t$, is defined as
$$<u,v>=u^tv=\sum_{i=1}^nu_iv_i$$
| https://math.stackexchange.com |
318,553 | [
"https://physics.stackexchange.com/questions/318553",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/148390/"
] | What stops a projectile from endlessly flying forward? Excluding gravity since it's an obvious one.
Wind resistance is something that would eventually stop the projectile, anything else? Other that object in it's path.
(I'm sorry for sounding stupid, but in school we didn't do much physics stuff in science, and past fe... | Given enough time and distance, in a flight to the nearest galaxy, it would eventually wear away. At high speed, even though the density of matter is very, very low, the high speed of the probe would cause erosion, although again it's a long term process.
On Earth, it would be a much faster rate of erosion, as the d... | If there is nothing but time, space, and the projectile, it would not stop. Newton's first law says so. On earth, atmospheric drag and anything in the way slows it down. In space, we of course have gravity along with floating particles few and far between.
| https://physics.stackexchange.com |
97,550 | [
"https://security.stackexchange.com/questions/97550",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/15922/"
] | Say I have the a website with the following code on it:
<pre><code><input type="text" id="search-text" name="query" value="?" />
</code></pre>
Double quotes aren't escaped so I can break out of the value attribute, however, I can't break out of the HTML tag itself as '<' and <code>></code> are being filte... | Try this:
<pre><code>" onfocus="alert(1)" autofocus="
</code></pre>
It will expand to:
<pre><code><input type="text" id="search-text" name="query" value="" onfocus="alert(1)" autofocus="" />
</code></pre>
Which will cause an alert box, demonstrating XSS.
| Hyyyyyygg
alert("xss")alert("xss")alert("xss")alert("xss")</svg onResize></svg onResize></svg onResize></svg onResize></svg onResize>
| https://security.stackexchange.com |
212,841 | [
"https://electronics.stackexchange.com/questions/212841",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/23393/"
] | I have below configuration:
<pre><code> |---------|------- LED1
| |
24V, 350mA------|Switcher |------- LED2
| |
|---------|------- LED3
|
|
|
MCU to select t... | For small size and low cost, MOSFETs are the way to go. 3 MOSFETs, 3 GPIO lines, simple.
Relays are bulky and may not have the lifetime you want, and a multiplexer doesn't work very well because of the power requirements and because you want them all on at the same time.
| I would use 3 transistors. A relay is not good from size or life time consideration. A multiplexer is a set of switches, usually transistors. A SI2308BDS in SOT23 case size would be suitable.
| https://electronics.stackexchange.com |
3,675,772 | [
"https://math.stackexchange.com/questions/3675772",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/788557/"
] | For example, we say that the addition and subtraction are inverse operations like that does each and every mathematical operation has an inverse operation?
| Let <span class="math-container">$\mathbb{F_4}=\{0,1,w,1+w\}$</span> be the field of 4 elements. Suppose <span class="math-container">$R$</span> is the initial object in the category described in the question for the field <span class="math-container">$\mathbb{F_4}$</span>. Then <span class="math-container">$R$</span... | The category <span class="math-container">$C_{F}$</span> possesses a <strong><em>weak</em></strong> initial object <span class="math-container">$I_{F}$</span>, i.e. an object that is unique up to not necessarily unique isomorphism.
Let <span class="math-container">$F$</span> be a field and <span class="math-container"... | https://math.stackexchange.com |
473,116 | [
"https://electronics.stackexchange.com/questions/473116",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/140294/"
] | I'am looking for a mcu which has enhanced DAC performance to generate a sound which has some features (32bit BD / 96kHz SR) but i couldn't cause of bitdept.
Are there any mcu which are capable to do these requirements ? or Using external DAC is better way ?
| When you see a DAC chip rated for "32 bit" what this actually means is that it will accept 32 bit digital samples on its digital input, and it could imply that the internal digital filter would have more bit depth than a competing DAC accepting 24 bit samples, resulting in lower rounding error during oversampling and f... | The bitness of an audio DAC might only mean the bitness of audio interface so it has has very little to do with its analog performance. You won't find a 32 bit DAC with 192 dB analog performance, or a 24 bit DAC with 144 dB analog performance. A 24 bit DAC with 132 dB performance however is available, from many manufac... | https://electronics.stackexchange.com |
9,282 | [
"https://robotics.stackexchange.com/questions/9282",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/7185/"
] | For my robotics project I would like to utilise readily available mobile phone 'power banks' to simplify the power system for my robot. However, such power banks output 5V, great for the logic systems but not for the motors.
I was wondering if I could wire the outputs of two power banks in series and get 10V or is th... | Go ahead and use the phone battery for your logic supply. Then, series wire individual, high current L-ion cells to make your motor battery. It's good practice to keep the noisy, high-current stuff on a different buss, away from your processor.
Invest in a smart (processor driven) charger that can monitor the voltag... | If 5V blocks were your only option, then I would say "yes, this is fairly safe" with the caveats:
<ul>
<li>If one cell discharges faster than the other, it will start to deteriorate much faster than the other -- it will last for fewer recharge cycles</li>
<li>You should re-charge them separately, not in series</li>
</... | https://robotics.stackexchange.com |
155,947 | [
"https://dba.stackexchange.com/questions/155947",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/110990/"
] | in this situation i want to tell you guy's about one weird think.
Maybe its already answered for this but seriously i can't find answer.
I have table who have 130k records. 3 columns (id, product_id, picture_url).
When im creating SELECT picture_url FROM table WHERE id='1', server cpu,ram and ssd is going to 100% but w... | It is not <em>mandatory</em> for a b+tree leaf to have a pointer towards the next leaf, but it is a widely used optimization to allow efficient scanning of value ranges, such as, in the context of relational databases, supporting <code>WHERE field BETWEEN x AND y</code> or <code>WHERE field > x</code> predicates. Fr... | There is actually no big difference at all. A direct pointer link shortcut is completely optional. If you don't use any shortcuts, the jump to the next link takes some 3 or 4 pointers. If the algorithm uses a lot of horizonal jumps, it saves time; if not, you waste some extra resource.
| https://dba.stackexchange.com |
309,907 | [
"https://mathoverflow.net/questions/309907",
"https://mathoverflow.net",
"https://mathoverflow.net/users/117088/"
] | Let $X$ be a $k$-connected spectrum for $k \in \Bbb{Z}$.
I want to deduce how connected the counit of $(\Sigma^\infty, \Omega^\infty)$- adjunction is, that is, how connected is the map
$$
\Sigma^\infty\Omega^\infty X \to X.
$$
Any help would be appreciated.
| If the spectrum $X$ is $r$-connected, then the map $\Sigma^\infty\Omega^\infty X \to X$
is $(2r+2)$-connected.
Here's a sketch: apply the functor $\Omega^\infty$ to get the map of spaces
$$
Q(\Omega^\infty X) \to \Omega^\infty X
$$
where $Q = \Omega^\infty\Sigma^\infty$.
It will be enough to identify the connectivity ... | Indeed, as John Klein shows, the map is $(2k+2)$-connected. Let me offer an alternative proof of the fact that, for $X$ a $k$-connective spectrum, $k\geq 0$, the homomorphism $\pi_i\Sigma^\infty\Omega^\infty X\rightarrow\pi_i X$ is an isomorphism for $i\leq 2k+1$. As indicated by John, this homomorphism is surjective f... | https://mathoverflow.net |
147,059 | [
"https://softwareengineering.stackexchange.com/questions/147059",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/11393/"
] | I've been pondering this problem for a while now and find myself continually finding caveats and contradictions, so I'm hoping someone can produce a conclusion to the following:
<h3>Favour exceptions over error codes</h3>
As far as I'm aware, from working in the industry for four years, reading books and blogs, etc. th... | First of all, I would disagree with this statement:
<blockquote>
Favour exceptions over error codes
</blockquote>
This is not always the case: for example, take a look at Objective-C (with the Foundation framework). There the NSError is the preferred way to handle errors, despite the existence of what a Java develo... | I would just like to note that exceptions and error codes aren't the only way to deal with errors and alternate code paths.
Out of the top of the mind, you can have an approach like the one taken by Haskell, where errors can be signaled via abstract data types with multiple constructors (think discriminated enums, or ... | https://softwareengineering.stackexchange.com |
63,398 | [
"https://mathoverflow.net/questions/63398",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1384/"
] | This is a very naive question which really does little more than highlight my ignorance of how converse theorems really work.
Take an algebraic gadget which should be conjecturally associated to an automorphic representation. For example, take a finite image continuous complex representation of
the absolute Galois gro... | Dear Kevin,
My understanding of the current meromorphic continuation results is that they do something along the lines of expressing a given Galois representation as the induction of a virtual (i.e. positive and negative coefficients) combination of various automorphic Galois representations.
To get true automorphy, ... | I think it is also instructive to just look how the entireness condition comes in the proof of the simplest converse theorem: the case of cusp forms for $SL(2,\mathbf{Z})$; there you start with a Dirichlet series
$$L(s)=\sum_{n\geq 1}{a_nn^{-s}}$$
and form a suitable completed $L$-function
$$\Lambda(s)=(2\pi)^{-s}\Gamm... | https://mathoverflow.net |
1,173,643 | [
"https://math.stackexchange.com/questions/1173643",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/220581/"
] | I saw the following statement written, but I can't understand why it is true.
$$
\dfrac {P(A \text{ and } B)}{P(B)} = \dfrac{P(A)-P(A \text{ and }B^c)}{ 1-P(B^c)}
$$
Any help understanding why these are equivalent would be appreciated.
| First, the denominators $P(B)$ and $1-P(B^c)$ are equal because $P(B)+P(B^c)=1$ (either $B$ happens or it doesn't).
For the numerator, $P(A\text{ and }B)$ is the probability that both $A$ and $B$ happen. For $P(A)-P(A\text{ and }B)$, consider $P(A)$ first. $P(A)$ is the probability that $A$ happens. When $A$ happ... | Since $B$ and $B^c$ satisfy $B \wedge B^c = \emptyset$ and $B \vee B^c = \Omega$, we have$$
P(A \wedge B) + P(A \wedge B^c) = P(A \wedge \Omega) = P(A).
$$
As a consequence, $$\tag{1}P(A \wedge B) = P(A) - P(A \wedge B^c).$$
In addition, the special case $A = \Omega$ gives
$$
\tag{2}P(B) = 1 - P(B^c).
$$
Finally, $\df... | https://math.stackexchange.com |
19,762 | [
"https://mathoverflow.net/questions/19762",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4709/"
] | Where can I find explicit formulas for the higher homotopies, which exhibit the cup product (in singular simplicial cohomology, say) as homotopy commutative on the cochain level? Same question in Cech cohomology.
| Fix a prime p which doesn't divide the degree of K over ${\mathbb Q}$, and let ${\mathcal O}$ denote the ring of integers of ${\mathbb Q}_p(\chi)$ i.e. an extension of ${\mathbb Q}_p$ containing the values of $\chi$. Then the group algebra ${\mathcal O}[G]$ decomposes into a direct sum of 1-dimensional pieces over ${\... | First of all, I am not sure I fully agree with the notion that Tamagawa numbers are harmless factors.
What you wish for exists, and here is roughly why. The Birch and Swinnerton-Dyer conjecture is a special case of the Equivariant Tamagawa Number Conjecture for elliptic curves. As $E$ is defined over $\mathbb{Q}$, it ... | https://mathoverflow.net |
50,227 | [
"https://softwareengineering.stackexchange.com/questions/50227",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/3792/"
] | When adding salt values to a hash value for something like a password that cannot be stored in plain text, what is the best place to get the salt values come from? For context, let us suppose this is for passwords on a webpage login.
| I usually have a column <code>created TIMESTAMP</code> in a user table so I can see when the user registered. I don't like to add an additional column for Salt, so I use the timestamp column as salt:
<pre><code>SHA1(password + created)
</code></pre>
| Does it matter?
The salt serves two purposes. It makes it impractical to use large tables of prehashed passwords ("rainbow tables") and it makes identical passwords look different in the list of hashes. Making the identical passwords look different helps avoid a problem where several people are using one particular ... | https://softwareengineering.stackexchange.com |
555,543 | [
"https://stats.stackexchange.com/questions/555543",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/21846/"
] | Working in python, I get data at regular interval. The data contains some features, <span class="math-container">$X_1,\dots,X_p$</span>. I am trying to get an online algorithm to build correlation matrixes. The naive approach of keeping track of the last <span class="math-container">$n$</span> instances of <span class=... | If I understand correctly, you have a sequence of observations <span class="math-container">$\{(X^t_1,\dots, X^t_p)\}_t$</span> and you want to compute the matrix
<span class="math-container">$$Corr(t)_{ij}=\sum_{t'=t-n+1}^t (X^{t'}_i-\mu_i^{t})(X^{t'}_j-\mu_j^{t})\left(\sum_{t'=t-n+1}^t (X_i^{t'}-\mu_i^t)^2\sum_{t'=t-... | Yes, You can compute the correlation without using the whole dataset as follows.
Let
<span class="math-container">$$
\begin{aligned}
X = x_{ij}&~ i=1,\dots,n;~j = 1,\dots,p\text{ Whole dataset}\\
X_{1j}& \implies \text{oldest observation to be removed at feature }X_j\\
X_{(+)j}&\implies \text{new observatio... | https://stats.stackexchange.com |
2,128,603 | [
"https://math.stackexchange.com/questions/2128603",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/370598/"
] | A box contains m white and n black balls. Balls are drawn at random one at a time without replacement. Find the probability of encountering a white ball by the kth draw.
This is our tutorial sheet's question and I don't know the answer. Thanks in advance.
Edit : I corrected the title and I misunderstood the question.... | The probability of encountering a white ball by the $k^{th}$ is equal to $1 - P$ where $P$ is the probability that the first $k$ balls were all black. The latter probability is easier to compute. For example, the probability of the first ball being black is $\frac{n}{m+n}$. The probability that the second ball is also ... | Hint (if you are searching for the probability that the $k$-th draw results in a white ball).
Suppose that all ball are taken out and one of them (randomly taken) is handed over to you. What is the probability that you will receive a white ball?
<hr>
In the same line:
Suppose that for $i=1,2,\dots,m+n$ we have a pe... | https://math.stackexchange.com |
538,102 | [
"https://physics.stackexchange.com/questions/538102",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/238922/"
] | Yes I have seen the explanation of why this is so in quantum mechanical textbooks. However, let's use the identity operator and do the following:
<span class="math-container">$$\langle x|x'\rangle =\langle x|I|x'\rangle =\int\langle x|x''\rangle\langle x''|x\rangle dx''=\int\delta(x-x'')*\delta(x''-x)dx'\tag{1}$$</spa... | Performing the manipulation you suggest,
<span class="math-container">$$\langle x|x'\rangle=\langle x|\mathbb 1 |x'\rangle = \langle x|\left(\int dx'' |x'' \rangle\langle x''|\right)|x'\rangle $$</span>
<span class="math-container">$$= \int dx '' \langle x|x''\rangle \langle x''|x'\rangle = \int dx'' \delta(x-x'')\del... | I would say that thinking of the delta function as a function that takes value <span class="math-container">$0$</span> at certain points and ''<span class="math-container">$\infty$</span>'' when the argument is <span class="math-container">$0$</span> can be a bit tricky. My advise is that you blindly us the definition ... | https://physics.stackexchange.com |
186,784 | [
"https://dba.stackexchange.com/questions/186784",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/95141/"
] | I have a single table (table_1) of schema below:
<pre><code>row_id identifier col1 col2 col3 col4 status
1 A 1 2 3 4
2 A 2 3 4 5
3 B 1 2 3 4
4 B 2 ... | You can do it using a self-join and an aggregate function (<code>string_agg</code>) to aggregate the <code>identifier</code>s that are different from the current row as below.
The first and last lines initializes the <code>status</code> column to <code>NULL</code> and finalizes it to <code>foo</code> if it isn't assig... | <pre><code>update test_table t1
inner join (
select *,
(case
when status_value is null then 'foo'
else status_value
end) as to_update_status from
(select *, group_concat(case
when identifier='A' then null
... | https://dba.stackexchange.com |
392,272 | [
"https://softwareengineering.stackexchange.com/questions/392272",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/336970/"
] | I have to process biological data input in the format of 96-well plates.
<blockquote>
explainer for the non-biologists:
These plates are basically a 2D matrix of 8 rows x 12 columns of small cups called wells. Each well is used for different assay conditions. During an assay each plate iterates through several assay st... | You appear to be overcomplicating and overthinking stuff.
Your teacher is right that information should not be duplicated in a database, but the simple fact that 2 or 95 rows contain the same text does not immediately mean that information has been duplicated.
The problem with duplicated data in a database is that if... | <pre><code>Alice Smith
Bob Smith
Charily Smith
Edger Smith
Fred Smith
Greg Smith
</code></pre>
Normalizing data isn't really about repetition. Repetition is a symptom of ignoring structure. The problem is, not every repetition represents actual underling structure. Are all these people part of the same fam... | https://softwareengineering.stackexchange.com |
374,063 | [
"https://physics.stackexchange.com/questions/374063",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/178457/"
] | I've read that gravity is time symmetric, and from what I understand, that means that if I were to record a video of objects moving only under the influence of gravity and play it in reverse, it would not go against the laws of physics. But an apple can fall down. When reversed, the apple would float upwards as though ... | Under time reversal, $t\to-t$. Other physical quantities may change due to this transformation. For example, position does not change under time reversal. (Imagine pausing a simulation, then reversing the direction of playback. Before you begin playing back, while still paused, all objects are still where they were... | If you toss an apple up in the air, it rises and then falls. In the time-reversed video, the apple rises and then falls.
In general, velocities change sign under time reversal, but accelerations stay the same. A downward acceleration is still downward, and a downward force is still downward, so Newton's second law is ... | https://physics.stackexchange.com |
478,651 | [
"https://stats.stackexchange.com/questions/478651",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/268563/"
] | I would like to design a randomized complete block design experiment (RCBD). Let's say I have 3 treatments and 10 logical groupings of my experimental units (EUs) which are the blocks. If each of my 10 blocks has 3 EUs, I can easily use a RCBD by assigning the 3 treatments randomly within each block. However, each of m... | The choice of a completely randomized design will lose efficiency. You also may not be able to identify some effects which would be very disappointing.
Your second choice, the CRBD, is better. While you want randomization, you are sort of ending up in a fractional factorial design situation. You may want to consider ra... | The choice of a completely randomized design will lose efficiency. You also may not be able to identify some effects which would be very disappointing.
Your second choice, the CRBD, is better. While you want randomization, you are sort of ending up in a fractional factorial design situation. You may want to consider ra... | https://stats.stackexchange.com |
510,594 | [
"https://physics.stackexchange.com/questions/510594",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/86968/"
] | When two magnets are placed close to each other they turn and orient parallel. I suppose this is due mostly to spin of the unpaired electrons. But in QM a spin just orients up or down. 1. How are these two pictures compatible? If the spin is closer to up projection the magnet shoud first turn up say 25 degrees and then... | Your question about QM is not clear at all and I won't try to answer it.
But the part about, where does the magnet find the energy to rotate: if it is now in a position that is <strong>not</strong> the lowest energy one, someone, the experimenter, you for instance, put it there. It took that person some <strong>work</... | IMO when the spins are more antiparallel than parallel e.g in the second or third quadrant of the circle they project ac. to QM antiparallel to B. As it is in Einstein de Haas experiment the body receives a rotating momentum and is about to rotate in direction where the small magnet and the external magnet creating B w... | https://physics.stackexchange.com |
85,016 | [
"https://electronics.stackexchange.com/questions/85016",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/29996/"
] | We need to change a controller code from the out side as they do with industrial MCU.
So that you have an MCU, with a program on it, and someone can program some "words" to it, that will determine how it works.
So for example you can program an MCU—not with a programer but with some inputs from serial, to do som... | True microcontrollers only run internal code, and therefore only do what that internal code tells them to do. That internal code has to get in there somehow. Modern microcontrollers usually have flash memory where the code is stored, and have special pins that can be wiggled in special ways to write data into that me... | Yes,
You need a kind of script interpreter.
Google for the LUA language, it is very lightweight, has been ported to some MCU.
You may need to write some glue code to allow a user to upload its program, but the interpreter is here.
| https://electronics.stackexchange.com |
82,706 | [
"https://security.stackexchange.com/questions/82706",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/69308/"
] | Starting with a one time pad say you want to encrypt some small strings like the words in this sentence but you want to reuse the same OTP key for each string so that when you encounter the same word the ciphered text comes out the same.
But say you modify the OTP algorithm in some way, say by jumping around on an e... | As others have said, this is not a One-Time Pad algorithm. Your proposed algorithm is actually called a "code book"; the primary difference being that you are substituting one word for a random set of letters of the same length.
Code books have a long, well-documented history, and are still in limited use today. If y... | It's not a "one time pad" if you reuse the key.
You lose the perfect security properties of a one time pad with any key reuse, period. Your scheme just reduces the security level of the algorithm to your "special calculation", which is simply security by obscurity.
| https://security.stackexchange.com |
210,635 | [
"https://softwareengineering.stackexchange.com/questions/210635",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/57799/"
] | We have a big and complex application composed by at least 700 DLL. The number is growing month after month. The code is not well structured because every DLL is a stand alone solutions. As you can imagine, when have some problem when we have to test a new feature on a DLL because we do not know exactly where it is use... | Helpful yes, necessary no. K&R is not the definition of the C language. It's simply one of many introductory texts. I found it particularly clear and concise, but other readers may prefer other texts. Simply having read it doesn't set you apart from other programmers in any way.
| I'd agree with Charles E. Grant: it's not necessary, but it's worth the read, and here's why I think so:
<h3>The Bad Stuff</h3>
<ul>
<li>It's dated and thus could be confusing.</li>
<li>If you already know C well you won't learn much.</li>
<li>If you're not a fan of the K&R code style, your eyes might burn.</li>
... | https://softwareengineering.stackexchange.com |
113,393 | [
"https://security.stackexchange.com/questions/113393",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/89133/"
] | <ol>
<li>What steps must be followed to send password securely from the user registration page (i.e. client side) to the server over a non encrypted channel (http) when the user registers for the first time on the website?
(We assume that there exists an intruder in between client and server) </li>
<li>should the passw... | The only safe method for a website to transfer a password to the server is using HTTPS/SSL. If the connection itself is not encrypted, an ManInTheMiddle can modify or strip away any JavaScript sent to the client. So you cannot rely on client side hashing.
You cannot setup a secure connection between client and server ... | The answer here is that it shouldn't be.
The password should be hashed (and salted, and any other algorithms to taste) on the client side, and that hash should be passed to the database. The password should not leave the client-side.
If you want to prevent that hash from being intercepted, then HTTPS or similar to en... | https://security.stackexchange.com |
12,958 | [
"https://softwareengineering.stackexchange.com/questions/12958",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/3410/"
] | As a programmer what do you think that is the thing that your manager does that mostly decreases your motivation?
My manager insists in blocking web content (this week was msdn content and Microsoft domain sites) This is so stupid, make me think I am not a reliable professional or that I am stealing his internet. And ... | <strong>You need to find a new job.</strong>
What do base such a harsh conclusion on? I just think about some things you need from your work environment:
<ol>
<li>it lets you do your job.</li>
<li>it lets you grow professionally.</li>
<li>surround yourself with smart people - who may be leaving or have left already.... | <blockquote>
And no, it is not a small business.
It is a huge enterprise where such
dinossaurs should not exist anymore.
</blockquote>
This statement baffles me. My experience with managers is the exact opposite. Only big enterprises can afford mismanagement.
My enterprise is really small and my boss is actuall... | https://softwareengineering.stackexchange.com |
284,937 | [
"https://softwareengineering.stackexchange.com/questions/284937",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/181372/"
] | As I understand it, implicit conversions can cause errors.
But that doesn't make sense -- shouldn't normal conversions also cause errors, then?
Why not have
<pre><code>len(100)
</code></pre>
work by the language interpreting (or compiling) it as
<pre><code>len(str(100))
</code></pre>
especially since that's the <... | For what it's worth, <code>len(str(100))</code>, <code>len(chr(100))</code> and <code>len(hex(100))</code> are all different. <code>str</code> is <em>not</em> the only way to make it work, since there's more than one different conversion in Python from an integer to a string. One of them of course is the most common, b... | <blockquote>
As I understand it, implicit conversions can cause errors.
</blockquote>
You're missing a word: implicit conversions can cause <strong><em>runtime</em></strong> errors.
For a simple case like you show, it's pretty clear what you meant. But languages can't work on cases. They need to work with rules. Fo... | https://softwareengineering.stackexchange.com |
55,833 | [
"https://mathoverflow.net/questions/55833",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2625/"
] | Fix a prime $p$ and consider everything mod $p$. Steenrod operations arise somehow from the loss of information passing from the singular complex of a space to its cohomology ring. Are they exactly this gap, i.e. can I get the singular complex back from the cohomology ring of a space and its structure as a module over ... | No. For instance, Massey products on the cohomology are extra information that neither the ring structure nor the Steenrod operations see. The complement of the Borromean rings, for example, and the complement of three unlinked circles in $R^3$ have the same cohomology ring and Steenrod operations, but cannot be chain ... | This is answering a slightly different question, but here goes:
If the question is "does knowing the singular (co)chains up to quasi-isomorphism determine the space up to weak equivalence?" then of course the answer is no. To some extent the answer can be turned into a yes by altering the question, considering the (co... | https://mathoverflow.net |
32,028 | [
"https://astronomy.stackexchange.com/questions/32028",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/28147/"
] | In layman terms:
<ol>
<li>nothing ever escapes the pull of a black hole, not even light</li>
<li>when a super massive star reaches the end of it's life you get a supernova</li>
<li>sometimes the <em>"remains"</em> of these stars can turn turn into black holes</li>
</ol>
My question is: can a black hole <em>"supernova... | No, it cannot. A black hole is something vastly different from a star. It's vastly different from anything else. It's not a thing, really, but more like a portion of very distorted spacetime. Nothing escapes from it simply because there is no way out - spacetime is distorted in such a way that all trajectories lead to ... | One other supernovae-like but not a supernovae is a tidal disruption event. If a star passes close enough to a black hole it can be fully disrupted into a stream of gas. As the material passes its closest approach to the black hole it can be compressed and ignited. The resulting explosion will be very bright, like a su... | https://astronomy.stackexchange.com |
222,085 | [
"https://dba.stackexchange.com/questions/222085",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/90601/"
] | We have a table with the following structure:
<pre><code>+----+----------+-------------+---------------------+-----------+---------+----------+
| id | Batch_id | Merchant_id | ExpiryDate | Allocated | MaxUses | IsBarred |
+----+----------+-------------+---------------------+-----------+---------+----------+
|... | RickJames gave me the clue to how to answer this, along with remembering that MySQL uses a BTree for indexes:
<blockquote>
You are missing one thing -- A "composite" key. Alas, there is no 'perfect' one for this query. β Rick James
</blockquote>
We can make one though, and so we have.
We modified our application a... | I've been reading dba stackexchange for a while now, and these kind of questions come up often, and they always kind of frustrate me.
People often seem to go straight to explain plans, and or looking for special indexes like they're magic bullets - but they're really not.
What you should get into doing (everybody) is... | https://dba.stackexchange.com |
677,577 | [
"https://physics.stackexchange.com/questions/677577",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/257199/"
] | Why are the two-electron system usually described in singlet-triplet basis, but not computational basis
<span class="math-container">$\uparrow\uparrow$</span>,<span class="math-container">$\uparrow\downarrow$</span>,<span class="math-container">$\downarrow\uparrow$</span>,<span class="math-container">$\downarrow\downar... | Typical spin-spin coupling has form:
<span class="math-container">$$H_J=J\mathbf{S}_1\cdot \mathbf{S}_2.$$</span>
Thus, if we take two-spin Hamiltonian
<span class="math-container">$$H=\Delta_1 S_1^z+\Delta_2 S_2^z +J\mathbf{S}_1\cdot \mathbf{S}_2,$$</span>
it will be diagonal in the singlet-triplet basis, but not in t... | The number state representation can be as good as the singlet-triplet representation in some situations (or even better). As always, it depends on what your specific problem is.
However, the singlet-triplet representation is important because they are states with different total-spin angular momentum: the total spin qu... | https://physics.stackexchange.com |
515,156 | [
"https://electronics.stackexchange.com/questions/515156",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/178645/"
] | Suppose I declare an unpacked array of size say 8 bits wide.
<pre><code>reg b[7:0];
</code></pre>
If I want to assign b[7] = 1,b[6] = 1, b[5] = 1, ......b[0] = 1, then apart from assigning value to each bit is there a way to assign any combination of bits say 8'bA8, to b?
For instance if I execute this code(below) in v... | Remember, <code>b[7:0]</code> means an array of eight 1-bit numbers. In your example you are trying to initialise it with a single 8-bit number, which is not the same thing.
<hr />
For Verilog, you have to initialise each element in the array one by one:
<pre><code>b[0] = 1'b0;
b[1] = 1'b0;
b[2] = ...
</code></pre>
You... | You can use a packed array to initialize b to 8'hA8.
<pre><code>module tb();
reg [7:0]a;
reg b[7:0];
reg [7:0] temp;
integer i=0;
initial begin
$monitor("a = %b,b = ",a);
a = 8'hA8;
temp = a; // temp = 8'hA8;
while(i<8) begin
b[i] = temp[i];
... | https://electronics.stackexchange.com |
65,989 | [
"https://security.stackexchange.com/questions/65989",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/41978/"
] | I recently learned that every packet includes checksum bytes and that the computer will request the packet again if the checksums don't match. How do the following attacks defeat such a safeguard?
ARP Spoofing - I assume that this is able to take place because the attacker is not actually modifying the packet contents... | Packet checksums are not cryptographic measures, and are not intended to be a security feature. Anyone (even an attacker) can calculate the checksum for a packet containing anything, and there's no secrets/keys involved in the calculation.
Checksums are intended to catch errors during the transmission of the packet: ... | Not only can checksums be recomputed after a packet has been modified. This happens during normal operation of IP.
It is not at all unusual for a router to have to update three different checksums on a packet before it will be able to forward an unmodified payload.
The three checksums I am referring to are on the Eth... | https://security.stackexchange.com |
429,138 | [
"https://electronics.stackexchange.com/questions/429138",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/166784/"
] | I am using a STM32L052K6U6 to communicate with an SPI slave using the UART1 synchronous mode (configured with CubeMX, using the LL library).
Setup code generated by CubeMX (I left out the Tx and Clk pin config as those pins do what they should):
<pre><code> GPIO_InitStruct.Pin = USART1_RX_ECG_Pin;
GPIO_InitStruct... | I figured out a solution, but I don't know why it works.
There are some writes for initialization (max30003_init gets called once) and then repeated read sequences (max30003_readReg gets called regularly).
The writing has always worked but receiving data (and the RXNE flag getting set) only works when disabling and t... | <ul>
<li>Wait for <code>TXE</code> before transmitting</li>
<li>Wait for <code>RXNE</code> instead of monitoring the <code>BUSY</code> bit before reading the answer. Waiting on <code>BUSY</code> that way might fail when an interrupt comes at the wrong time, and the data might not yet be transferred to the data register... | https://electronics.stackexchange.com |
90,181 | [
"https://datascience.stackexchange.com/questions/90181",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/32243/"
] | In a huge dataset for NLP it is taking very long time to classify my dataset
therefore, trying each feature extraction method separetly is time consuming and not effecient.
Is there a way that can tell me which method (TFIDF or Bag Of Words) is more likely to give the highest F1 score.
I tried test them on smaller subs... | This depends on what you want to show.
When working with metrics you shouldn't just take the value as is, but <em>see what each metric are telling you</em>. baseline_1 isn't better/worse than baseline_0 because it has a higher/lower value in metric X. <strong>Both baselines give an interesting perspective on a given da... | Selecting the right metric is maybe the first point to find out and strongly <strong>depends on</strong> the <strong>real use case</strong> your are trying to apply the model to. Is it more important to prevent false negatives (e.g. in medical applications)? Or is it a balance between getting high true positives and tr... | https://datascience.stackexchange.com |
245,773 | [
"https://mathoverflow.net/questions/245773",
"https://mathoverflow.net",
"https://mathoverflow.net/users/41619/"
] | Let $(x_{n})_{n}$ be a normalized basic sequence in $X=L_{p}$, with $1<p<2$.
Does there exist a subsequence $(x_{k_{n}})_{n}$ of $(x_{n})_{n}$ and a weakly null sequence $(x^{*}_{n})_{n}$ in $X^{*}$ such that $(x_{k_{n}})_{n}$ and $(x^{*}_{n})_{n}$ are biorthogonal?
This question may be obvious or stupid. Than... | I think it is worthwhile to point out that you do not need to pass to a subsequence of $(x_n)$. To see that, let $(y_n^*)$ be any Hahn-Banach extensions to $X^*$ of the functionals biorthogonal to $(x_n)$ and observe that all weak$^*$ cluster points of $(y_n^*)$ in $X^*$ are in $(x_n)^\perp$. By the separability of $X... | You can find such subsequence as follows. Denote by $\{f_n\}$ some uniformly bounded extensions of biorthogonal functionals of $\{x_n\}$. This is a bounded sequence in $L_q$, $1/q+1/p=1$. It contains a weakly convergent subsequence $\{f_{k_n}\}$. Let $f$ be its weak limit. Then $\{x_{ k_n}\}$ and $\{f_{k_n}-f\}$ f... | https://mathoverflow.net |
314,823 | [
"https://softwareengineering.stackexchange.com/questions/314823",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/223328/"
] | Having difficulties deciding which rules to apply on by value / by name evaulation.
Say I have:
<pre><code>(Ξ»z.zz)(Ξ»b.b)
</code></pre>
And I want to evaluate according to call by valute, will the next step be
<pre><code>(Ξ»z.z)(Ξ»b.b)
</code></pre>
(evaluate the left side - z apply on z),
or
<pre><code>(Ξ»z.(Ξ»b.b... | You want to apply
<pre><code>(Ξ»z.zz)
</code></pre>
to the argument
<pre><code>(Ξ»b.b)
</code></pre>
<ul>
<li>Call by value means: reduce the argument to normal form and then bind the parameter <code>z</code> to it</li>
<li>Call by name means: replace each occurrence of the parameter <code>z</code> in the body of the... | Neither of these steps is correct, there is only one reducible expression in that term so in both cases the only valid step is to <code>(\b. b)(\b. b)</code>. You are only allowed to perform a reduction when applying a lambda abstraction and there is only one place where you are doing that, namely on the outermost leve... | https://softwareengineering.stackexchange.com |
271,932 | [
"https://mathoverflow.net/questions/271932",
"https://mathoverflow.net",
"https://mathoverflow.net/users/38068/"
] | Let $G$ be a finite group and let $k$ be an algebraically closed field of characteristic $p \neq 2$.
Let $V$ be a finite-dimensional irreducible $kG$-module. If $V \cong V^*$, then $V$ admits a nonzero $G$-invariant bilinear form $(-,-)$, unique up to scalar, such that $(-,-)$ is alternating or symmetric. Is there a f... | For one answer, here is a theorem due to Thompson and Willems (<em>Bilinear forms in characteristic $p$ and the Frobenius-Schur indicator</em>, Lecture Notes in Mathematics 1185, pg. 221-230).
For an irreducible self-dual $kG$-module $V$, set $\varepsilon(V) = 1$ if $G$ preserves a nonzero symmetric bilinear form on $... | The answer to the question can be found in Section 14, Frobeius-Schur indicator for Brauer characters, starting on page 320, of the book "Group Representations, Volume 4" by Gregory Karpilovsky. I don't have easy access to this book myself (our library only has Volume 1, and that is in two parts), but fortunately the G... | https://mathoverflow.net |
159,446 | [
"https://electronics.stackexchange.com/questions/159446",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/69772/"
] | I have three questions that have been troubling me for a long while:
<ol>
<li>We say that, in a Bode plot, there is a drop in gain of 20 dB per decade whenever a pole is encountered. But aren't poles defined as the values of \$s\$ which make the transfer function infinity? So why doesn't the gain go up at this point i... | Bode plot is not a graph that plots the transfer function (\$H(s)\$) against \$s\$. \$H(s)\$ is a complex function and its magnitude plot actually represents a surface in Cartesian coordinate system. And this surface will have peaks going to infinity at each poles as shown in figure:
<img src="https://i.stack.imgur.co... | When trying to understand transfer functions, I think the "rubber-sheet analogy" is very useful. Imagine an elastic rubber-sheet covering the complex \$s\$-plane, and imagine that at every zero of the transfer function the sheet is tacked to the ground, and at every pole there is a literal thin pole pushing the rubber-... | https://electronics.stackexchange.com |
993 | [
"https://mathoverflow.net/questions/993",
"https://mathoverflow.net",
"https://mathoverflow.net/users/625/"
] | I was trying to explain finite groups to a non-mathematician, and was falling back on the "they're like symmetries of polyhedra" line. Which made me realize that I didn't know if this was actually true:
Does there exist, for every finite group G, a positive integer n and a convex subset S of R^n such that G is isomorp... | The permutohedron may have additional symmetries. For example, the order 3 permutohedron <span class="math-container">$\{(1,2,3),(1,3,2),(2,1,3),(3,1,2),(3,2,1)\}$</span> is a regular hexagon contained in the plane <span class="math-container">$x+y+z=6$</span>, which has more than 6 symmetries.
I think we can solve it ... | Here's a sketch of an ugly argument. First construct an undirected graph whose automorphism group is G. You can do this by starting with a vertex v<sub>g</sub> for each element g of G and gluing in a path of length n(g<sup>-1</sup>h) from v<sub>g</sub> to v<sub>h</sub> with an extra leaf attached to the internal vert... | https://mathoverflow.net |
9,885 | [
"https://cardano.stackexchange.com/questions/9885",
"https://cardano.stackexchange.com",
"https://cardano.stackexchange.com/users/1832/"
] | I would like to increase the pledged amount on my stake pool. I searched online and I learned that I need to generate a new pool.cert among other things and that the change will take effect in two epochs. My question is: If I generate and re-register my pool with the new pool certificate and my pool is assigned to min... | With a new pool registration certificate, you will change some of the parameters, like pledge in your case. It has no influence on the blocks the pool is minting. The only potential problem is that you wont't match the new pledge, if you increase it and there is not enough ADA in your wallet after 2 full epochs, but th... | <blockquote>
If I generate and re-register my pool with the new pool certificate and my pool is assigned to mint block with-in those two epochs, will it mint those blocks or do I lose them since they were assigned/associated to the old certificate?
</blockquote>
Correct. The new certificate you submit is not valid unti... | https://cardano.stackexchange.com |
391,488 | [
"https://physics.stackexchange.com/questions/391488",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/131341/"
] | <blockquote>
Microscopically, the pressure exerted by a fluid on a surface in contact with it is caused by collisions of molecules of fluid with the surface. As a result of a collision, the component of a molecule's momentum perpendicular to the surface is reversed. The surface must exert an impulsive force on the mo... | The quoted paragraph from the textbook talks about <em>fluids</em> which usually includes gases, liquids, and plasmas. However, it would not be right to say that for liquids (e.g., consider water for concreteness) the pressure is the kinetic pressure $P_k=nkT$. First of all, we know that we can put water under a pisto... | <ol>
<li>The model is a very good approximation as long as the mass of the molecules colliding with the surface have negligible individual mass and cross section with respect to the surface they are hitting. The number density of molecules also matters in some cases because more molecules means more internL forces, whi... | https://physics.stackexchange.com |
866,122 | [
"https://math.stackexchange.com/questions/866122",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/164040/"
] | Again, for my Equation Theory class, I have the subject question.$p(x)$ has a remainder of 3 when divided by $x-1$ and a remainder of 5 when divided by $x-3$. What is the remainder when $p(x)$ is divided by $(x-1)(x-3)$?
I've been able to list out linear expressions that satisfy each of the first two requirements. The... | Here is a direct explanation using polynomial division to show how the quotient and remainder come into play.
Using the division algorithm with $(x-1)(x-3)$ and $p(x)$ we know we can express $$p(x)=(x-1)(x-3)q(x)+r(x)=(x-1)(x-3)q(x)+ax+b$$ for some polynomial $q(x)$ which we don't need to compute, and the remainder $r... | HINT:
Let $\displaystyle p(x)\equiv ax+b\pmod{(x-1)(x-3)}$
$\displaystyle\implies p(x)\equiv ax+b\pmod{(x-1)}\equiv a(x-1)+a+b\equiv a+b$
$\displaystyle\implies a+b=3$
| https://math.stackexchange.com |
81,998 | [
"https://mathoverflow.net/questions/81998",
"https://mathoverflow.net",
"https://mathoverflow.net/users/19557/"
] | Could any tell me if a multivariate polynomial generated from the sum of irreducible single variable polynomial is irreducible?
For example, f(x)=x^2+2x+2, g(x)=x^2+3x+3, h(x)=x^3+2x^2+2x+2 all of them are irreducible, then what about f(x,y,z) = f(x)+g(y)+h(z)?
| $(x^2+1)-(y^2+1)=(x+y)(x-y)$
| For two variables, see W. Feit,
Some consequences of the classification of finite simple groups, in
<em>The Santa Cruz Conference on Finite Groups</em>, Proc. Sympos.
Pure Math. <strong>37</strong>, American Mathematical Society, Providence,
RI, 1980, pp. 175-181. The result is the following. A polynomial $f(x)... | https://mathoverflow.net |
3,548,756 | [
"https://math.stackexchange.com/questions/3548756",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Solve for <span class="math-container">$x$</span>,
<span class="math-container">$$27x^3+21x+8=0$$</span>
I would like to know if there exists an formula for cubic equations just like quadratic formula for quadratic equations.
| We can begin by making an general cubic equation into a depressed cubic( missing square term)
To make <span class="math-container">$$ax^3+bx^2+cx+d=0$$</span> a depressed cubic we substitute <span class="math-container">$$x=y-\frac b{3a}$$</span> to get
<span class="math-container">$$a {\left[y-\frac b{3a}\right]}^3+b... | Better way to do it is this. If you write <span class="math-container">$t=3x$</span> you get <span class="math-container">$$t^3+7t+8=0$$</span>
so <span class="math-container">$$t^3+1+7t+7=0$$</span> <span class="math-container">$$(t+1)(t^2-t+1)+7(t+1)=0$$</span>
Now it is easy to finish.
| https://math.stackexchange.com |
367,275 | [
"https://softwareengineering.stackexchange.com/questions/367275",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/281623/"
] | In general, I would my domain objects (customer, contract, etc.) to be always in a consistent state. However there are situations, where they might be in an inconsistent state, and nevertheless I want to work with them:
<ol>
<li>When I load the domain-object from the database and it is in an inconsistent state (maybe ... | In general, you have the right idea. Assume that "(...) they might be in an inconsistent state, and nevertheless I want to work with them." is false and that you <em>never-ever</em> want to see your objects in an inconsistent state. Let's run with this idea, and see where it takes us.
<h3>When loading from the data ba... | <blockquote>
When I load the domain-object from the database and it is inconsitent
(maybe someone changed a field directly on the database)
</blockquote>
The best thing to do is make sure that corrupt data can't be inserted into the db by adding constraints. Foreign keys, unique or length constraints etc.
<blockq... | https://softwareengineering.stackexchange.com |
347,223 | [
"https://electronics.stackexchange.com/questions/347223",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/173143/"
] | Hope someone can help me out and point me the right direction to solving this.
I am trying to do a voltage drop calculation to see the VD % for the cable selected. The following are the values,
Current: 140A (I)
<br>Resistance of Cable: 0.0001 Ohm/m (R)
<br>Reactance of Cable: 0.0000704 Ohm/m (X)
<br>PF: 1
<br>Distan... | I think that the 1000 in your formula is placed incorrect and probably used when the length is in kilometers. So basically for a one phase load the formula is:
$$V_d = 2I \bigl(R \cos(\theta) + X \sin(\theta)\bigr) L$$
<em>Note: the first 2 is to get the result from source to load and the return as the return cable al... | Let's do this step by step. Shoving everything into one formula usually obscures what's happening.
0.0001ohms/s is quite big cable. 1mm2 cable is about 17mohms/m, so 0.1mohm/m means an area of 170mm2, which is a diameter of about 15mm. Is your cable that big?
140A in 0.1mohm gives 14mV voltage drop per metre.
300m o... | https://electronics.stackexchange.com |
221,515 | [
"https://dba.stackexchange.com/questions/221515",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/164093/"
] | I have a MySQL database with 15 tables. Three of them are used for website authentication and three other are tables that are frequently read and written to. Then other tables are set in stone and I'd never need to change them unless I make some significant changes to the web app.
Is there anything I can do to make my... | Short answer: You are making unnecessary work for yourself. Use InnoDB for everything. Forget about "readonly".
Long answer:
<ul>
<li>MyISAM is dying.</li>
<li>InnoDB is faster in some benchmarks than either MyISAM or MEMORY.</li>
<li>InnoDB "caches" things in its "buffer_pool", which is in RAM. If you were using... | In MySQL You can <strong>Revoke</strong> and <strong>grant</strong> the specific <strong>privileges</strong>.
So we will <code>REVOKE ALL</code> privileges to specific database's table as you want and after it we will grant only <code>SELECT</code> privilege to it then it will become a <strong>read-only table</strong>... | https://dba.stackexchange.com |
259,120 | [
"https://physics.stackexchange.com/questions/259120",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/10362/"
] | How can I calculate how fast water will evaporate, if I know its temperature, the relative humidity, temperature, and speed of air flowing over it? Or if that's not enough information, what formulas would I need to use?
| First, let me say that you should not use the formula on engineeringtoolbox. Indeed, you can write
$$J=K (c-c_s),$$
where $J$ is the evaporation flux, $c$ the concentration of water vapor in the air and $c_s$ the concentration of saturated water vapor at the given temperature.
The problem is that generally, $c$ will... | I appreciate the points you raised regarding the issues raised concerning the formula on engineeringtoolbox. What do you suggest would offer the best alternative to calculate the general case?
| https://physics.stackexchange.com |
55,195 | [
"https://datascience.stackexchange.com/questions/55195",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/-1/"
] | I am new to ML and as I take courses for the area DL, I am wondering, by our choice of activation function for the last layer, whether we take sigmoid, relu or softmax, would the formula for calculation of cost function change?
I am grateful for every good reply I can get, have a nice day! :)
| You need to discriminate between two types of neural networks. If your output variable is continous you can use linear, ReLU, tanh, logistic-sigmoid,... as activation functions, because these functions map continous inputs to continous outputs. If your output is discrete / categorical you can use the signum (binary) or... | The cost function doesn't change the activation function but is limits the activation function you can use on the output layer.
For example for a classification problem you will want to output a probability will which is between 0 and 1 so you will take a softmax as the output layer activation function, if you are look... | https://datascience.stackexchange.com |
26,704 | [
"https://physics.stackexchange.com/questions/26704",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/4179/"
] | I know that black holes are "black" because nothing can escape it due to the massive gravity, but I am wondering if there are any theories as to what happens to the light or mass that enters a black hole and cannot escape.
| It's difficult to know what happens on the other side of a black hole, since no information can cross back through the event horizon (the radius at which light and therefore any information can no longer escape). The leading idea is that near the center of every black hole lies a singularity, or a point where the densi... | I would argue that there are no theories about what happens to anything in the center of a black hole, that there are only hypothesis. But that's just a nit-pick about the wording.
Nobody knows what happens inside a black hole, but yes, lots of scientists have guessed about what might happen. The most common idea is p... | https://physics.stackexchange.com |
442,898 | [
"https://softwareengineering.stackexchange.com/questions/442898",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/15257/"
] | For example, A system can accept a description of a symbol as "black-heart" or "heart-black". As far as this system is concerned, both description are valid.
Is there a computer science terminology or math concept for the existence of multiple, equivalent codes/representations of a concept/object?
| One could say that one of the valid values is an <em><strong>alias</strong></em> of the other one.
It's a good idea to have a consistent canonical value and recommend the use of that one, though (for instance, color first always, or shape first always).
| You have non-unique representations, or multiple equivalent representations. Thatβs exactly the terms that are used. There is no single word.
Usually you have one (sometimes several, for example for Unicode graphemes) canonical references to make comparisons easier. The idea is that if you convert all your data to a ca... | https://softwareengineering.stackexchange.com |
5,505 | [
"https://physics.stackexchange.com/questions/5505",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Assume an observer sent a beam of photons close to an event horizon, say at some distance x (a distance far enough to avoid the photons falling in.) This light would still be observable, albeit red shifted and with it's path curved appropriately. Now assume the black hole absorbs enough mass to expand it's event horizo... | As I now understand the formulation of this question we have the following situation:(1) an observer is situated near the Event Horizon of a Black Hole;(2) a light source is situated a similar radial distance from the BH and is shining light which is reaching the Observer;(3) the radial distance of both from the BH is ... | When you look at a black hole, you never see the actual event horizon, because the proper distance to it is infinite and it would take a light signal an infinitely long time to come from it. What you actually see is the matter falling in as the event horizon is <strong>about</strong> to form. That's why an older name f... | https://physics.stackexchange.com |
326,940 | [
"https://stats.stackexchange.com/questions/326940",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/36171/"
] | I've just been given an old set of lecture notes to look at.
One of them contains the following question: if we are undertaking a paired $t$-test with a mean of differences $d=1$ and standard deviation $s=2$, what is the minimum number of subjects that would be required to "ensure that the difference observed is sig... | I assume that the d = 1 and s = 2 values are descriptions of the population from which the sample is drawn. If that's the case, then any sample you draw may overestimate or underestimate the values for d and s. However, you want to ensure (horrible phrasing aside) that the difference is significant even if your sample ... | I calculate the power as the following:
The critical value when the null is true: <code>cv <- qt(p=1-0.05/2, df=33, ncp=0, lower.tail=T)</code>
The probability of exceeding the critical value when the alternative is true:
<code>pow <- pt(q=cv, df=33, ncp=1/(2/sqrt(33)), lower.tail=F)</code>
which is 80% as th... | https://stats.stackexchange.com |
63,676 | [
"https://dsp.stackexchange.com/questions/63676",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/47502/"
] | In signal processing, I have heard of two terms:
<ol>
<li>Using band-pass filter to extract some frequency bands.</li>
<li>Using Discrete/Fast Fourier Transform (DFT/FFT) to extract some frequency bands.</li>
</ol>
Are these two terms similar or different?
How and when we use each of these methods?
Thanks in advanc... | Fast Fourier transform does not extract any frequency bands. It only shows the frequency content of a given signal. But while applying FFT, one should be careful about choosing the sampling frequency. As an example, if a signal contains a frequency range of <span class="math-container">$0-100\,\text{Hz}$</span> and <sp... | An FFT extracts frequency bands, similar to a bank of (mediocre) bandpass filters.
An FFT is just a bank of bandpass FIR filters, all of equal length, that because they are in default form rectangularly windowed, have very poor stop-band characteristics (except for deep notches at periodic orthogonal-in-window frequ... | https://dsp.stackexchange.com |
567,836 | [
"https://math.stackexchange.com/questions/567836",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/44596/"
] | Define a sequence $\left\lbrace a_{n}\right\rbrace$ by
$\displaystyle{a_{1} = 1\,,\ a_{n + 1} = {n \over a_n} + {a_n \over n}.\quad}$ Prove that for $n \geq 4,\,\,\left\lfloor a_{n}^{2}\right\rfloor=n$
<hr>
The substitution $b_{n} = a_{n}^{2}$ might be helpful, but I still haven't proved the assertion yet.
| First,we use Mathematical induction have following inequality
<blockquote>
$$\sqrt{n}\le a_{n}\le\dfrac{n}{\sqrt{n-1}},n\ge 3$$
</blockquote>
we easy prove this function $$f(x)=\dfrac{x}{n}+\dfrac{n}{x} $$ is decreasing on $(0,n)$
becasue $$f'(x)=-\dfrac{n}{x^2}+\dfrac{1}{n}\le 0$$
since $a_{1}=1,a_{2}=2,a_{3}=2... | $\newcommand{\+}{^{\dagger}}%
\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
\newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
\newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
\newcommand{\dd}{{\rm d}}%
\newcommand{\isdiv}{\,\left.\right\vert\,}%
\newcommand{\ds}[1]{\displaystyle{#1}}%
\new... | https://math.stackexchange.com |
90,211 | [
"https://softwareengineering.stackexchange.com/questions/90211",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/23632/"
] | If I have an application that is using a less secure method for storing passwords, such as SHA-1, how would I go about converting to SHA-256 or SHA-512?
| You mean something like a web application that is storing hashes rather than password for login? You won't be able to convert the SHA-1 hashes to anything else very easily.
You could store the new SHA value in your database as users log in, updating each user as they present their correct password, either making a mar... | Simply update your table to indicate which encryption method is used and force users to change their password after next login. They can even reuse the existing password, but then you can indicate in your table which method the password has was created with.
| https://softwareengineering.stackexchange.com |
170,622 | [
"https://dba.stackexchange.com/questions/170622",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/122540/"
] | I have a MS SQL Server 2012 and the following table:
<pre><code>CREATE TABLE dzp.contractid (
id bigint PRIMARY KEY IDENTITY(1,1),
VNR char(18) NOT NULL,
CONSTRAINT UC_VNR UNIQUE (VNR))
</code></pre>
For context, VNR represents a unique contract number in string form.
I want to import a csv file with contract inform... | SQL constraint violation affects the entire statement, you cannot ignore individual rows.
What you <em>can</em> do is insert only the rows that don't violate the constraint. There are several ways to do that, for example
<pre><code>INSERT INTO dzp.contractid(vnr)
SELECT DISTINCT vnr FROM dzp.accounts_stage s
WHERE N... | If multiple columns need to be unique, you can use "GROUP BY" clause with all unique fields.
Example:
<pre><code>INSERT INTO Table1Name (Field1, Field2, Field3)
SELECT Field4, Field5, Field6
FROM Table2Name
GROUP BY Field4, Field5, Field6;
</code></pre>
| https://dba.stackexchange.com |
130,784 | [
"https://cs.stackexchange.com/questions/130784",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/102741/"
] | I find several contradictory definitions regarding the head movements of the Turing machine. In some places, it is only L / R. While in some other formal definition; it is L / S / R. Which one is correct?
| You are right to be confused! The problem is that different authors disagree on the definition of a Turing machine. There is actually no one "right" answer. Some authors define that the machine moves L / R; but others define that it moves L / S / R, as you have pointed out.
This is not the only thing that dif... | As explained, the two formalisms are equivalent, as well as many other variations of Turing machine formalisms, so in a sense it doesn't matter.
But, if you want to 'program' a Turing machine, if you are using a single-tape machine, I guess having S is okay but kinda pointless: at some point you should move your head, ... | https://cs.stackexchange.com |
4,044,247 | [
"https://math.stackexchange.com/questions/4044247",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/881990/"
] | let <span class="math-container">$ y=f(x,t) $</span> and <span class="math-container">$F(x,y,t)=0 $</span> The function is determined
<span class="math-container">$t=t(x,y)$</span> what is <span class="math-container">$\dfrac{dy}{dx}$</span>
This is original question.
| Suppose you have coordinates <span class="math-container">$A(x_A,y_A), B(x_B,y_B), C(x_C,y_C),D(x_D,y_D)$</span>, taking them clockwise around the rectangle.
You will note that these probably don't look like a rectangle if drawn in the 2D plane. That's because you don't have the z-coordinates.
Let's assume that the z-c... | (Rewritten after missing an entire degree of freedom!)
Let's say the vertices are in (clockwise or counterclockwise order) <span class="math-container">$\vec{A} = (x_A, y_A, z_A)$</span>, <span class="math-container">$\vec{B} = (x_B, y_B, z_B)$</span>, <span class="math-container">$\vec{C} = (x_C, y_C, z_C)$</span>, an... | https://math.stackexchange.com |
14,689 | [
"https://quantumcomputing.stackexchange.com/questions/14689",
"https://quantumcomputing.stackexchange.com",
"https://quantumcomputing.stackexchange.com/users/7598/"
] | From what I understand, any circuit can be combined to make a gate, which has a square, unitary matrix form that acts on the <span class="math-container">$2^n$</span> row of the qubits state column vector. For example, the circuit
<pre><code> βββββ
q_0: β€ H ββββ ββ
βββββ€βββ΄ββ
q_1: β€ H ββ€ X β
βββββββββ... | The reset isn't unitary, so there is no unitary matrix for the circuit. You need to switch to looking at the general channel of the circuit (e.g. described by Krauss operators).
Alternatively, you can introduce environment qubits and replace the reset with unitary operations acting on the environment (e.g. the reset co... | You can use:
<pre><code>from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, execute, BasicAer, Aer
qreg_q = QuantumRegister(2, 'q')
creg_c = ClassicalRegister(2, 'c')
circuit = QuantumCircuit(qreg_q, creg_c)
circuit.h(qreg_q[0])
circuit.h(qreg_q[1])
circuit.cx(qreg_q[0], qreg_q[1])
print(circuit)
b... | https://quantumcomputing.stackexchange.com |
207,948 | [
"https://stats.stackexchange.com/questions/207948",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/112592/"
] | I am researching the spread of a disease through a population and want to capture the behavior of this disease with a model.
I already have a model and patient data. The data is a value per patient that is more or less lognormally distributed. I would like to tune the parameters of the model based on the patient data... | Since ABC is an approximate method, the simplest answer to your question is that you can use any distance you find to your taste! Provided it is a true distance, the basis justification holds that
$$\pi_\epsilon(\theta|y^{\text{obs}})=\pi(\theta|d(y(\theta), y^{\text{obs}})<\epsilon)$$where $y(\theta)\sim f(y|\theta... | The Bhattacharyya distance is a distance between <em>distributions</em> while, what you need to conduct ABC, is a distance between <em>summary statistics</em> (this is, vectors of numbers that summarise the information in the sample), unless your summary statistic is a functional approximation to the distribution, whic... | https://stats.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.