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 |
|---|---|---|---|---|---|
440,471 | [
"https://softwareengineering.stackexchange.com/questions/440471",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/419279/"
] | I have a function that uses a static variable to count how many times it got called:
<pre><code>void func ()
{
static int counter=0;
counter++;
/* some code */
}
</code></pre>
The code in the function executes differently depending on the counter.
As it happens while expanding the program to have more feat... | Congratulations, you've figured out why hidden global state is bad.
Commiserations, you are going to have to change a whole bunch of code to fix this.
<pre><code>class Counter {
int counter;
public:
Counter(int counter = 0) : counter(counter) {}
void func() { ++counter; /* some code */ }
}
int main()
{
... | If you think you want to be able to modify counter, then you create a function setCounter(value). Not caring at the moment how you do it. Having a function returning the address of the variable is an unacceptable hack.
And then it looks like the best implementation is something like static int counter_ = 0; outside any... | https://softwareengineering.stackexchange.com |
392,996 | [
"https://mathoverflow.net/questions/392996",
"https://mathoverflow.net",
"https://mathoverflow.net/users/99414/"
] | I was recently trying taking a look at the paper "Some two-generator one-relator non-hopfian groups" by Baumslag and Solitar where they introduce the groups now known as the Baumslag-Solitar groups given by the presentation
<span class="math-container">$$
G = \left< a,b \mid a^{-1}b^la = b^m \right>
$$... | Method 1: There is a clear harmonic-analytic interpretation: if
\[ u(x, s) = C_k \int_{\mathbb R^{k+2}} \frac{s}{(s^2 + |x - y|^2)^{(k+3)/2}} \times |y|^{-1} F(|y|) dy , \]
then <span class="math-container">$u$</span> a harmonic function in the half-space <span class="math-container">$x \in \mathbb R^{k+2}$</span>, <sp... | Rewrite the assumption as
<span class="math-container">$$\int_0^\infty \frac{y^k}{(1+y^2)^\frac{k+3}{2}}F(sy) dy=\int_{-\infty}^\infty \frac{e^{(k+1)x}}{(1+e^{2x})^{\frac{k+3}{2}}}F(e^{t+x})dx=0.
$$</span>
If <span class="math-container">$G(s)=F(e^s)$</span>, this means that <span class="math-container">$G*v=0$</span>,... | https://mathoverflow.net |
79,614 | [
"https://dsp.stackexchange.com/questions/79614",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/46733/"
] | Is comb filtering a reversible operation? If applied to a signal, can I restore the original signal from the filtered image?
What about the histogram equalization operation? Is it reversible?
| A room consists of many hard surfaces. When you generate a wideband click sound in that room («perturbations about the mean pressure»), those waves will travel into the room, be reflected by surfaces, travel once more, be re-reflected etc. As time goes by, the wave tends to diminish due to spherical expansion, and beca... | <ol>
<li>The sound pressure is a scalar - it can be superposed linearly.</li>
<li>The acoustic system can be assumed as a linear time-invariant (LTI) system in the most situation.</li>
<li>The output of an LTI system is equal to the convolution of input and the impulse response.</li>
</ol>
| https://dsp.stackexchange.com |
35,303 | [
"https://security.stackexchange.com/questions/35303",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/16367/"
] | I installed CentOS 6 on a 3gb virtualbox disk. It hosts a web server which starts automatically when the OS boots. No user login required. When it boots, it is given an IP and the host machine can connect to the server.
The idea is to hand this to someone on a flash drive, let them install virtualbox on their compute... | Virtual machine, but real CPU. Regardless of how you elect to see it, the code for your server still runs on the machine of the supposed attacker. Similarly, disk encryption of any kind would not help either, even if you personally typed the password yourself upon boot: at some point, the data is still decrypted, on th... | If you give someone code to run on their own computer, there is always the possibility that they will do something with it that you didn't want or expect. If you've given them the source code, you've made that easier for them. If you absolutely must give people the actual code, and you don't want them to play with it, ... | https://security.stackexchange.com |
3,928,447 | [
"https://math.stackexchange.com/questions/3928447",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/583624/"
] | <span class="math-container">$\sqrt{9 - x^2} \geq \sqrt{3}*x$</span>
I used the standard method (meaning, it involves two systems of inequalities).
At the end I've got (on the number line):
<span class="math-container">$x>-3$</span>, <span class="math-container">$x<3$</span>, <span class="math-container">$-1.5<... | Define <span class="math-container">$$f(x)=\sqrt{9-x^2},\quad g(x)=\sqrt3x,\quad h(x)=f(x)-g(x).$$</span> We want to find where <span class="math-container">$f(x)\geq g(x)\implies h(x)\geq0$</span>. We can first find where <span class="math-container">$h(x)=0$</span>, then determine whether <span class="math-containe... | For real <span class="math-container">$x,\sqrt{9-x^2}\ge0$</span> and <span class="math-container">$x^2\le9\iff-3\le x\le3$</span>
So, if <span class="math-container">$-3\le x<0, \sqrt{9-x^2}>\sqrt3x$</span>
If <span class="math-container">$x\ge0,$</span> <span class="math-container">$$ \sqrt{9-x^2}\ge\sqrt3x\if... | https://math.stackexchange.com |
18,238 | [
"https://dba.stackexchange.com/questions/18238",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/8360/"
] | I am looking to replace my cursor-based solution if possible in a particular stored procedure. If it makes any difference, this is running on SQL Server 2008 R2. I am looking more for an algorithm than precise code.
Background:
The SP is part of a system for a company that sends mailings via direct mail or email. ... | I would probably just do this the brute force way, and add indexes to support these joins where they don't exist. Not much gain to treating new customers and old customers any different once you've inserted all the customers that don't already exist:
<pre><code>INSERT dbo.Customer(fname, lname, address, city, state, z... | I think you need the OUTPUT clause to return any new recordids. Further depending on what you want to do, you may be interested in using a MERGE statment instead of just an insert. For instnce someone whose email has remained teh same but whose address has changed coudl be updated rather than having a new record added ... | https://dba.stackexchange.com |
378,699 | [
"https://math.stackexchange.com/questions/378699",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/59360/"
] | In <em>Algebra</em> by Hungerford, page 237 the sketch of proof for Theorem 1.10:
<blockquote>
Theorem 1.10: If $K$ is a field and $f\in K[x]$ polynomial of degree $n$, then there exists a simple extension field $F = K(u)$ of $K$ such that $u\in F$ is a root of $f$.
</blockquote>
In the proof I could not understand... | In general topology there is no definition of what an open set is in terms of anything else. Instead, the open sets are precisely what constitutes the topology. So, a topological space is a pair $(X,\tau)$ where $X$ is a set and $\tau$ is a collection of subsets of $X$ that satisfy the axioms that: the intersection of ... | The point is that on metric spaces where we have a notion of distance we can indeed make precise the notion of "all the points that are less than $\epsilon$ of some other point" using the concept of ball. An open set then is a set on which all points can be surrounded by some open ball completely contained in the set, ... | https://math.stackexchange.com |
51,333 | [
"https://electronics.stackexchange.com/questions/51333",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/7663/"
] | I have two mains power inputs (in case one fails, the other is likely to still work), but the device only has one power supply, so I decided to use a relay to switch between the inputs (the device should be able to cope with a momentary interruption during the switching), like this:
<img src="https://i.stack.imgur.com/... | The relay coil must be for 230 V AC. Most relays are for voltages less than 24 V, and also DC. An AC relay will consume less power.
The contacts must be for 250 V AC minimum. But your demands are different than for a common 250 V contact. If there's a spark over an open contact in a normal serial switch application th... | First, if you are asking these questions, I would get a qualified electrician involved. For your safety.
<ol>
<li>Make sure the relay is rated for 230 V, and has margin past that.</li>
<li>Make sure the relay is rated for the maximum current it will see.</li>
<li>Make sure the relay isn't a latching one. Those stay in... | https://electronics.stackexchange.com |
609,559 | [
"https://physics.stackexchange.com/questions/609559",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/240866/"
] | Photons move on null geodesics and the equation of motion on equatorial plane after some algebra can be written as
<span class="math-container">$$e^{\nu}\dot{t}^2-e^{-\nu}\dot{r}^2-r^2\dot{\phi}^2 = 0$$</span>
<span class="math-container">$\phi =0$</span> for the radial motion thus above equation becomes
<span class="... | The physical meaning is that for a distant observer at fixed <span class="math-container">$r$</span>, for whom <span class="math-container">$dt$</span> approximately represent a proper time interval, ingoing light appears to take an infinitely long time to reach the event horizon.
The other solution is for outgoing lig... | Those time coordinates represent the incoming and outgoing photons in the spacetime diagram. At the limit <span class="math-container">$R=2M$</span>, the coordinate time <span class="math-container">$t\to \infty$</span> (equivalent to saying it crosses the horizon).
| https://physics.stackexchange.com |
1,720,682 | [
"https://math.stackexchange.com/questions/1720682",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/327251/"
] | There are three questions for this problem.
<blockquote>
Please help me explain the answer for number 3.
</blockquote>
<ol>
<li>Find $f_X$ where $X$ is the total number of heads.
<br> Yep I got this. Ans:
\begin{align}f_X (0)&=P(X =0)=P(T)=\frac12\\
f_X(1)&=P(X =1)=P(HTT)=\frac18 \\f_X (2)&=P(X =2)=P(... | The sample space $Ω$ or in other words the set of possible outcomes of this experiment is $$Ω=\{T, HTT, HTH, HHT, HHH\}$$ and the probabilities of these elementary events are
<ol>
<li>$P(T)=\dfrac12$</li>
<li>$P(HTT)=P(HTH)=P(HHT)=P(HHH)=\dfrac{\frac12}{4}=\dfrac18$</li>
</ol>
which of course sum up to $1$ as they s... | You’ve already worked out that the possible outcomes are $T$ (with probability $\frac12$), and $HTT,HTH,HHT$, and $HHH$, each with probability $\frac18$. Which outcomes give you which values of $Z$? Here’s a table:
$$\begin{array}{c|c}
\text{Outcome(s)}&Z&\text{Probability}&\text{Total prob.}\\ \hline
T&am... | https://math.stackexchange.com |
191,510 | [
"https://mathoverflow.net/questions/191510",
"https://mathoverflow.net",
"https://mathoverflow.net/users/64319/"
] | A (weak) composition of a positive integer $n$ into $k$ parts is an ordered sequence of nonnegative integers $(a_1, a_2, \ldots, a_k)$ such that $ \sum_{i=1}^k a_i = n $. I am interested in the case when the parts are bounded: $a_i\in\{0, 1, \ldots, j-1\}$. The number of such compositions satisfies the two-variable rec... | Up to a factor of $j^k$, What you're asking for is the probability $P$ that a k-step random walk with steps chosen uniformly from $S = \{0, 1, ..., j-1\}$ lands on $\lambda n$. This is the probability of return to the origin at time $k$ of the (typically biased) random walk with steps chosen uniformly from $S - \lambda... | Such problems can be solved routinely using the methods explained in the book by me and Robin Pemantle, Analytic Combinatorics in Several Variables (preprint version online at our websites, book published by Cambridge in 2013). The bivariate generating function for $\kappa(n,j,k)$ is $F_j(x,y) = 1/(1 - yf_j(x))$ where ... | https://mathoverflow.net |
244,640 | [
"https://softwareengineering.stackexchange.com/questions/244640",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/136275/"
] | Really sorry about the title that probably doesn't make much sense. Hopefully I can explain myself better here as it's something that's kinda bugged me for ages, and is now becoming a pressing concern as I write a bit of software with configuration.
Most software comes with default configuration options stored in the ... | For new question: you can read the default configuration inside an array/associative mapping, so you have key->default values. Then you read the user configuration, overwriting (in RAM) only the options you encounter (new options will be probably missing), so you have the default values, eventually customized. The file... | I'd do the following. When the updated software runs and reads the configuration (already cloned), it can see it knows new configuration X but that's not inside the configuration file.
So you can show a message to the user and, if you like, add the option inside one or both the configuration files, maybe with a defau... | https://softwareengineering.stackexchange.com |
9,176 | [
"https://cardano.stackexchange.com/questions/9176",
"https://cardano.stackexchange.com",
"https://cardano.stackexchange.com/users/5085/"
] | I am stuck with this error, what's a <code>NonOutputSupplimentaryDatums</code>?:
<pre><code>""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (NonOutputSupplimentaryDatums (fromList [SafeHash \"13866df5e21887cb0d2c27b8d8ccf03d1cb7f... | So I was able to resolve the issue. The problem was caused by the way I attached the datum as <code>PlutusWitness</code>. So instead of creating directly instantiating a <code>PlutusWitness</code> I created one with the help of the newly made available constructor <code>PlutusWitness.new_with_ref</code> in <strong>CSL ... | I don't use cardano-serialization-lib but I can tell you that <code>NonOutputSupplimentaryDatums</code> is the ledger error thrown when datum is unneceserilly included in the tx when using inline datum. When inline datum is being used you can't have the same datum also in the tx body's witness set.
| https://cardano.stackexchange.com |
46,202 | [
"https://mathoverflow.net/questions/46202",
"https://mathoverflow.net",
"https://mathoverflow.net/users/3544/"
] | Today in my introductory algebraic geometry class we defined the so-called Rees algebra associated with an ideal $I$ of a ring $R$ (with strong conditions on $R$, if you like: I don't mind restricting to finitely generated reduced algebras $R$ over an algebraically closed field $k$). If we want to think of (maximal) Pr... | The blowup of $Spec R$ along $I$ and $I^m$ give isomorphic results. This is Hartshorne exercise II.7.11.a. In general, any birational projective morphism is realized as the blowing up of the target along some ideal sheaf, which in general will be quite complicated (e.g. not radical, but not a power of a radical ideal... | Here are some other examples that you might find interesting. Try blowing up the following ideals:
$(x,y^2), (x^2, y^2), (x,y^2)(x,y) = (x^2, xy, y^3)$
Playing around with the third one will likely lead you to understand what blowing up the product of ideals does.
In some related contexts, you might ask what ideals... | https://mathoverflow.net |
113,224 | [
"https://softwareengineering.stackexchange.com/questions/113224",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/32800/"
] | While I am studying for job interview, I got this kind of OOD questions a lot. But from my TDD perspective, I think it would be reasonable to ask more about use-cases of (or requirements for) the Car. Otherwise, there are tons of way of designing car. Am I missing something here? How would you handle this sort of inter... | I'm a little confused about your question. Why can't you ask questions about use-cases to try to understand the requirements? <strong>If you're asked in an interview to design a car in an object oriented manner, it would be bad not to ask about details.</strong>
The point of a question like this is to make sure you ... | <em>I don't know if the following is going to make any sense, but here goes ...</em>
A car, in a way, could be said to be OODed. Let's start from the designers - the drawing guys, they dream up the overall design. Then it gets to the engineers, who calculate the dimensions of the suspension, the shafts, the engine, th... | https://softwareengineering.stackexchange.com |
503,102 | [
"https://physics.stackexchange.com/questions/503102",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/31748/"
] | Carroll writes in his Spacetime and Geometry book on page 68 that
<blockquote>
"[...] in fact, however, we could just as well have begun with an intrinsic definition of one-forms and used that to define vectors as the dual space. Roughly speaking, the space of one-forms at <span class="math-container">$p$</span> is ... | EDIT: I agree with Kostya that there is likely a typo in Carroll's book, and that the equality of <em>first</em> (not second) derivatives is what's required. I haven't thought about this for long, though, so it's possible I'm mistaken here.
<hr>
Let the set of all smooth functions from a manifold <span class="math-c... | If <span class="math-container">$f\in C(M)$</span> is a smooth function on <span class="math-container">$M$</span> (I am dropping the "<span class="math-container">$\infty$</span>" sign, since all functions shall be smooth), and <span class="math-container">$v\in T_xM$</span> is a tangent vector then the assignment <sp... | https://physics.stackexchange.com |
19,228 | [
"https://cs.stackexchange.com/questions/19228",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/12321/"
] | As I understand, to show that a certain problem <span class="math-container">$P$</span> is NP-hard we can reduce a known NP-hard problem <span class="math-container">$Q$</span> to a problem in <span class="math-container">$P$</span>. This reduction, say <span class="math-container">$f$</span>, has to be polynomial time... | Yes and no. To cut a long story short, it's enough that the pre-image of $f$ is NP-hard.
Intuitively, the point of NP-hardness is that, if you had an efficient algorithm for an NP-hard problem, then you would have an efficient algorithm for all problems in NP. Let's suppose you've come up with a new problem, Trio... | I'm not sure I understood you. But I believe you wanted to ask the following question:
Assuming I have NPH problem $Q$, we usually refer it as a language/set. For example, the set of all the tuples $(G,k)$ such that $G$ is a graph and it has a vertex cover of size $k$.
To prove that a problem $P$ is NPH, it is ... | https://cs.stackexchange.com |
367,107 | [
"https://physics.stackexchange.com/questions/367107",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/174412/"
] | We know that work done is change in kinetic energy, but when the speed is constant the work done must be zero, I guess. Am I right or wrong?
| You're right in saying that the work performed on an object with constant velocity is 0. The work-energy theorem says that the net work done on an object equals change in its kinetic energy.
$$
W_{net} = \int_{t_i}^{t_f} \mathbf F_{net} \cdot \mathrm d \mathbf x = KE(t_f) - KE(t_i)
$$
For an object with constant veloc... | An obvious counterexample is a lift moving upwards at constant velocity. The lift does work on its occupants because it increases their gravitational potential energy. So moving at constant velocity does not necessarily mean no work is done.
Although it's true that work can go into kinetic energy it can also go into p... | https://physics.stackexchange.com |
312,453 | [
"https://physics.stackexchange.com/questions/312453",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/145517/"
] | I came across a question recently:
A 75-kg petty thief wants to escape from a third storey window. Unfortunately a makeshift rope of sheets tied together can support a mass of only 58 kg. How might the thief use this rope?
I know the answer is 2.2$m/s^2$. However, I don't understand the idea behind why the thief acc... | Let us think that the thief doesnt use the rope at all that is he just jumps off, now he is under free fall. In the INERTIAL free body diagram of the thief, the forces on him are gravity and an equal pseudo force in opposite directions while tension in rope is zero.
Now consider that the thief just holds onto the rope... | The thief is very well trained in physics; he knows that saying the rope can support 58 kg is the same as saying that the rope can exert $(9.8 \times 58=568.4)$ newtons of force without breaking. (At least here on earth; if the theft is taking place on any other planet or satellite, other calculations are needed)
So... | https://physics.stackexchange.com |
598,483 | [
"https://electronics.stackexchange.com/questions/598483",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/290037/"
] | I'm trying to convert dBm to Vrms.
<hr />
The formula for dBm is
<span class="math-container">\$ dBm = 10 * log(P1 / P0) \$</span> where P0 = 1mW
so<br />
<span class="math-container">\$ +13dBm = 20mW \$</span>
If I convert this to a voltage using the formula
<span class="math-container">\$ P = Vrms^2/R \$</span> whe... | Your error stems from a misunderstanding of units. The square root of 1000 mV is not 31 mV. It's either 1 √V or 31 √(mV), which are both strange, non-physical units.
The correct units are actually a bit different: mW * ohms is (mV * A) * (V/A), so you really have a value of 1000 V*mV, or 1 V^2. Taking the square root y... | <ul>
<li>13 dBm is 20 mW - correct</li>
</ul>
<span class="math-container">$$P = \dfrac{V^2}{50}\text{ hence, } 0.02\times {50} = V^2\text{ hence, } V = 1 \text{ volt RMS} $$</span>
<blockquote>
<em>But where is the inconsistency in the first solution?</em>
</blockquote>
The square root of (1000 mV)² is not 31.62 m... | https://electronics.stackexchange.com |
34,095 | [
"https://electronics.stackexchange.com/questions/34095",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/1240/"
] | I'm powering a 12 V computer fan with a simple 7810 circuit shown here:
<img src="https://i.stack.imgur.com/SLvYH.png" alt="7810 regulator circuit">
When the fan is connected to the regulator, on the output I get this wave:
<img src="https://i.stack.imgur.com/IAy4g.png" alt="one sine period">
When I zoom out in tim... | This all looks perfectly normal and should be expected. Look up the <i>load transient response</i> spec for the regulator. As the motor is commutating, the load it presents to a constant voltage changes suddenly. The regulator can't change its output current quite that suddenly, so for a short time the voltage is ou... | About your update. The two signals are totally unrelated. It just happens that the fan's noise seems to repeat at <em>about</em> 100 Hz, so giving <em>about</em> 1 pulse per half mains period. That they're unrelated can be seen from the fact that triggering on one signal, the other one won't remain in sync. The speed a... | https://electronics.stackexchange.com |
87,922 | [
"https://mechanics.stackexchange.com/questions/87922",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/71090/"
] | How do you replace the transfer case on a 2010 Toyota RAV4?
| It could be that it just wasn't latched all the way and finally popped. I've seen weird things like this happen. If it happens again, I'd suggest the latch needs to be adjusted to ensure it's fully engaging correctly, or possibly the latching mechanism is worn out and might need replaced.
Most modern day hood latches t... | It's possible someone at Carvana was in there inspecting it, and didn't latch it all the way when they closed it. I'd consider it "no big deal".
Any hood will have a secondary latch, which will prevent it from opening more than a few inches even if it pops open. You must reach in and release the secondary la... | https://mechanics.stackexchange.com |
105,525 | [
"https://dba.stackexchange.com/questions/105525",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/69615/"
] | I have two tables
<pre><code>@T1 TABLE
(
Id INT,
Date DATETIME
)
@T2 TABLE
(
Id INT,
Date DATETIME
)
</code></pre>
These tables have a non-clustered index on (Id, Date)
And I join these tables
<pre><code>SELECT *
FROM T1 AS t1
INNER JOIN T2 AS t2
ON
t1.Id = t2.Id
WHERE
t1.Date <= GETDA... | The performance will be the same. The optimizer will recognize this and create the same plan.
On the other hand I wouldn't say they are equal. The first form <em>in the question</em> is far more readable and generally expected.
For an example using some tables I have at hand you can see the execution plan is exactly ... | They are semantically identical and the optimiser should have no trouble recognising this fact and generating identical plans.
I tend to put conditions referencing both tables in the <code>ON</code> and conditions referencing just one table in the <code>WHERE</code>.
For <code>OUTER JOINS</code> moving the conditions... | https://dba.stackexchange.com |
100,808 | [
"https://physics.stackexchange.com/questions/100808",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | I have doubts with the following problem:
A projectile is fired from the top of a mountain that has a downward slope with angle $\phi$ from the horizontal. The initial velocity of the projectile is $v_{0}$ and has a angle $\theta$. Show that the range $R$ (maximum horizontal distance traveled) is related to $v_{0}$, $... | The functions $e^{i \bf p \cdot \bf x}$ as functions of $\bf x$ are linearly independent for different $\bf p$'s, hence every coefficient in the linear superposition (that is, in the integral) must be zero.
| The reason you can get rid of the integral and the exponential is due to the uniqueness of the Fourier transform. Explicitly we have,
\begin{align}
\int \frac{ \,d^3p }{ (2\pi)^3 } e ^{ i {\mathbf{p}} \cdot {\mathbf{x}} } \left( \partial _t ^2 + {\mathbf{p}} ^2 + m ^2 \right) \phi ( {\mathbf{p}} , t ) & = 0 \\... | https://physics.stackexchange.com |
66,365 | [
"https://stats.stackexchange.com/questions/66365",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/11409/"
] | A multinomial distribution can be given as
$ M(m_1,\dots,m_K|N,P) = {N \choose m_1\dots m_K}\prod_k p_k^{m_k} $
The expected value is $Np_k$.
How can I prove it?
| A demonstration using "equations" was requested in a comment. Here is a short, simple one that is practically painless.
<h3>Notation and definitions</h3>
Let the random <span class="math-container">$K$</span>-vector <span class="math-container">$X$</span> have a multinomial distribution with parameters <span... | I think that you mean that you take $N$ draws from a multinomial distribution and the expected value of getting object $k$ is $Np_k$. The easiest way to show this is to reduce the problem to $N$ draws from a binomial distribution, with the options "not get object $k$" and "get object $k$." Consider $K$ of these separat... | https://stats.stackexchange.com |
64,226 | [
"https://datascience.stackexchange.com/questions/64226",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/86402/"
] | I have a neural network that Im evaluating using 10 -Fold cross validation. The validation accuracy for a fold changes alot during training in the range of -+10%
So for example the validation accuracy of a fold would range between 80% and 70%.
My question is which number should I consider to be this fold's accuracy.... | For some context, the entire point of running K-Fold cross-validation to compute an <strong>estimate</strong> of the performance. If the obtained values vary a lot, it just means that your estimate is less <em>precise</em> (i.e. has a larger standard deviation)
In a neural network setting, your network evolves, so obv... | The value you take as result should always be the last one you obtain. However, you might want to set up some early stopping procedure, in order to avoid overfitting.
| https://datascience.stackexchange.com |
53,580 | [
"https://mathoverflow.net/questions/53580",
"https://mathoverflow.net",
"https://mathoverflow.net/users/12566/"
] | Let $Y$ be an algebraic variety over a field $K$ whose coordinate ring is given by $K[Y]=K[X_1,...,X_n]/(F)$, where $F=\prod_{i=1}^{n} X_{i}^{a_i}-1$ is an element in the polynomial ring $K[X_1,...,X_n]$, with each $a_i$ an integer.
Now if we assume that the greatest common divisor $gcd(a_1,...,a_n)=1$, then I want to... | There is nothing wrong with Qing's proof of irreducibility but the following is perhaps more conceptual (though less elementary). We immediately reduce to the case when all the $a_i$ are different from zero. Then in the quotient ring, the images of the variables are invertible so we may replace the polynomial ring with... | You want to show that $F$ is an irreducible polynomial. If it decomposes as a product $GH$, it is easy to see that at least one variable appears in both $G$ and $H$. Suppose this is $x_1$. Then $F$ is reducible as polynomial in $K(x_2,\dots, x_n)[x_1]$, and the same is true for $x_1^{a_1}-f$ where $f=(x_2^{a_2}\cdots x... | https://mathoverflow.net |
51,598 | [
"https://dba.stackexchange.com/questions/51598",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/5226/"
] | I have a <code>domains</code> table and each domain belongs to a <code>contact</code>. Additionally you can assign 3 extra <code>contacts</code> with different roles <strong>admin</strong>, <strong>tech</strong> and <strong>billing</strong> ,<em>those are not mandatory</em>.
My first thought was to add three extra fie... | Using an intersection table is a cleaner and more flexible design.
With extra columns you are limited to the number of instances you can include (one per foreign key column). Also, the types of instances are limited to those given by your FK columns. Making any changes requires a table design change. Also, since ... | In both approach you see the table will have all columns to gather where for one column you will always have some value for every row and for remaining you don't know how frequently the column will have value, as they are not mandatory.
In such cases I would separate the data by its probability of availability.
<co... | https://dba.stackexchange.com |
736,200 | [
"https://physics.stackexchange.com/questions/736200",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Excuse my poor English, I have a lot to learn.
If all the particles of a gas had the same speed, the same direction, did not collide and were not subject to any external force, would the gas have a temperature, despite the fact that the particles would have an average kinetic energy ?
And what if all the particles had ... | The short answer is that energy is not frame-invariant. Thermodynamics and, as a consequence Statistical Mechanics at equilibrium, assume that all the energies are measured in a reference frame where the center of mass of the system is at rest.
Therefore, independently of its speed, an ice cube keeps always the same te... | <blockquote>
If all the particles of a gas had the same speed, the same direction,
did not collide and were not subject to any external force, would the
gas have a temperature,
</blockquote>
What you are describing is the kinetic energy of a container of particles as a whole with respect to an external frame of referen... | https://physics.stackexchange.com |
97,541 | [
"https://mathoverflow.net/questions/97541",
"https://mathoverflow.net",
"https://mathoverflow.net/users/23850/"
] | Is there a characterization of graphs $G$ such that $\exists$ $\phi : G \rightarrow KG(n,k)$, where $KG(n,k)$ is the Kneser graph ($k \leq \lceil \frac{n}{2}\rceil $).
Any references on the subject will be appreciated.
| Homomorphisms into Kneser graphs are another way of describing fractional colourings; an introduction to how this all works is the topic of one of the chapters in my favourite book on Algebraic Graph Theory. There are other much more detailed references on fractional colourings, but not necessarily from the homomorphis... | From you original graph G, built a set system (on the same ground set as G) such that KG(F), the Kneser graph of F, is isomorphic to G.
I assume it is impossible if G contains a 1-cycle though.
| https://mathoverflow.net |
126,031 | [
"https://electronics.stackexchange.com/questions/126031",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/31102/"
] | I need pads with holes in by PCB, but the top and bottom side of the pads need to have different nets i.e. the top and bottom sides must be isolated. Here is the picture <img src="https://i.stack.imgur.com/Hb87b.png" alt="enter image description here"><br>
Is this possible to fabricate for the PCB manufacturers? If yes... | I don't see any reason why you can't create a footprint with overlayed pads on top and bottom going to different pins. Just specify the hole as unplated. If you avoid drilling one of the holes (make it an SMT pad) you may be able to avoid all DRC errors with little fuss (otherwise it may complain that the two drilled h... | I'll add that in Eagle you can add mounting holes which have no electrical connection between the different layers in a board or in a package.
HOLE - Function Add drill hole to a board or package.
Board houses can do this but you should check with them before ordering.
| https://electronics.stackexchange.com |
392,175 | [
"https://physics.stackexchange.com/questions/392175",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/186307/"
] | I've been looking at stuff to do with binding energies and was wondering why Helium 4 is so stable. The fact everything up to carbon is less stable seems a bit odd. Is there a reason for this or another, that's how the universe works?
| If one regards the nucleus as a potential well for nucleons, there is one lowest level. It can contain:
<ul>
<li>a spin-up proton</li>
<li>a spin-down proton</li>
<li>a spin-up neutron</li>
<li>a spin-down neutron</li>
</ul>
Then that lowest level is full. Any additional nucleons can only find a place in levels with... | Yes as Pieter mentions being fermions with Pauli exclusion you can get a spin up and a a spin down in the same ground state for both n and p. Like in atomic physics you can put 2 electrons in the s orbital.
In addition a geometric effect that 4 particles can be arranged in a tetrahedron shape with each ball touching th... | https://physics.stackexchange.com |
105,485 | [
"https://dba.stackexchange.com/questions/105485",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/69567/"
] | I have a MySQL table with 3 columns for simplicity sake:
<pre><code>Datename |Date |Name
-------------+--------+-----
30/06/15test |30/06/15|test
30/06/15other|30/06/15|other
</code></pre>
<strong>Note:</strong> Column <code>Datename</code> is unique
I would like all new data to be inserted into the table bas... | A table is, by definition, an unordered bag of rows. There is no guarantee that if you say <code>SELECT * FROM table</code> you will get the rows back in the same order you inserted. Think about throwing a bunch of popsicle sticks on the ground while blindfolded; now take off the blindfold and tell me which one hit the... | Check Codd's rules - there's no mention of "ordering". You can order by a PRIMARY KEY (in the SELECT statement) but you aren't forced to.
If you use ORDER BY in your SELECT for your INSERT and use MySQL's AUTO_INCREMENT to INSERT into your target table, then you should have the target table's PK be "ordered" by your ... | https://dba.stackexchange.com |
481 | [
"https://biology.stackexchange.com/questions/481",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/57/"
] | From all accounts, it seems as if the <em>Escherichia</em>, <em>Enterobacter</em>, etc. that live and thrive in the human gut are pretty well entrenched. I know that these microbial populations are often analyzed as an ecosystem.
What surprises me is that it seems like minor food poisoning can throw the whole ecosyst... | There are two types of food poisoning:
<strong>Alimentary intoxication</strong>
This is the case when you consume food which is contaminated with some toxins, and those are responsible for development of the poisoning symptoms. The source organisms of these toxins might not be present anymore (killed by heating durin... | As requested, elaborating this into a full answer.
Three things to consider:
<ol>
<li>"Alterations to gut microflora" need not only be the invasion of a different, aggressive species of bacteria. One of the most common, and most dramatic forms of alteration to our gut flora is something we do to ourselves: antibiotic... | https://biology.stackexchange.com |
487,578 | [
"https://stats.stackexchange.com/questions/487578",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/296472/"
] | I am trying to deepen my knowledge in probability and I am having hard times to understand dependent and not identically distributed random variables.
Can someone maybe provide me a real world example for this?
| Next to the "formal" example by Xi'an, a "real-world" example might be height and weight. Already because the two are measured on different scales will they be distributed differently, but they sure are dependent, as taller people tend to be heavier.
| If you randomly draw a card from a deck of playing cards, <strong>do not put it back</strong>, and draw again. Then, the probability distributions for which card will be drawn in each of the two draws are dependent and not identical.
Otherwise, if the card of first draw is <strong>put back and well shuffled</strong> be... | https://stats.stackexchange.com |
129,991 | [
"https://stats.stackexchange.com/questions/129991",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/64279/"
] | When there is measurement error in the independent variable I have understood that the results will be biased against 0. When the dependent variable is measured with error they say it just affects the standard errors but this doesn't make much sense to me because we are estimating the effect of $X$ not on the original ... | When you want to estimate a simple model like
$$Y_i = \alpha + \beta X_i + \epsilon_i$$
and instead of the true $Y_i$ you only observe it with some error $\widetilde{Y}_i = Y_i + \nu_i$ which is such that it is uncorrelated with $X$ and $\epsilon$, if you regress
$$\widetilde{Y}_i = \alpha + \beta X_i + \epsilon_i$$
yo... | Regression analysis answers the question, "What is the AVERAGE Y value for those who have given X values?" or, equivalently, "How much is Y predicted to change ON AVERAGE if we change X by one unit?" Random measurement error doesn't change the average values of a variable, or the average values for subsets of individua... | https://stats.stackexchange.com |
1,214,030 | [
"https://math.stackexchange.com/questions/1214030",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Given equations:
$$
\prod_{i=1}^n p_i = \prod_{i=1}^n (1-p_i)= \frac{1}{2^n}
$$
where $p_i\in (0,1), i=\overline{1,n}$.
Is it true that this system has unique solution $p_1=p_2=\ldots=p_n=\frac12$ for all $n\in\mathbb{N}$?
In other words, if we have (discrete uniform distributed) function $f\colon X\to \{0,1\}^n$ so ... | From your assumption it follows that
$$\prod_{i=1}^n\bigl(p_i(1-p_i)\bigr)={1\over 4^n}\ .\tag{1}$$
If $p$ is a probability then
$$p(1-p)={1\over4}-\left(p-{1\over2}\right)^2$$
implies that $p(1-p)\leq{1\over4}$ with equality only if $p={1\over2}$. Therefore $(1)$ can only hold if $$p_i={1\over2}\qquad(1\leq i\leq n)\ ... | Let $n=1$.
The equation:
$$\prod_{i=1}^1 p_i = \prod_{i=1}^1 (1-p_i)= \frac{1}{2}$$
does necessarily imply that $p_1=\frac{1}{2}$ is the unique solution.
Let $p_i=\frac{1}{2}$ for all $i=1, \ldots, n-1$.
Then by the same logic as the above:
$$\prod_{i=1}^n p_i = \prod_{i=1}^n (1-p_i)= \frac{1}{2^n}$$
implies $p_... | https://math.stackexchange.com |
53,781 | [
"https://security.stackexchange.com/questions/53781",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/40706/"
] | I'm thinking about playing with/learning about firewalls. It is easier for me to learn by building, so why not build a firewall? If I run it alongside my normal firewall, I'd get the normal firewall's protection right?
| I applaud your desire to create your own firewall in order to understand them better. What I would suggest is creating a VM and deploy and test your firewall on that. You risk nothing this way because you are in a closed environment.
As further advice, try looking at iptables (Linux) and play with custom rulesets bef... | A firewall rule would not be reversed by a firewall later in line. It would be one block then another block. The second firewall would only be dealing with traffic the first firewall did not block.
While this will not be any more dangerous, you may also not have anything to test with your test firewall. You could put... | https://security.stackexchange.com |
236,982 | [
"https://mathoverflow.net/questions/236982",
"https://mathoverflow.net",
"https://mathoverflow.net/users/90645/"
] | For a group $G$ and a field $K$ let $S(G,K)$ be the sum of the dimensions of the irreducible K representations of $G$. Note that $S(G,\mathbb{C})< |G|$. It's not difficult to prove that if $n \ge 6$ then $S(S_n,\mathbb{C}) < (n-2)!(n-2)-n$. I'm interested in "good" bounds (not necessarily the best but at least si... | I guess that $S_n$ denotes the symmetric group. It is well known that all irreps of $S_n$ over $\mathbb C$ are defined over $\mathbb Q$. Therefore $S(S_k\times S_{n-k},\mathbb{C})=S(S_k\times S_{n-k},\mathbb{Q})$. Also the fact that the sum of the squares of the dimensions is the group order and Cauchy-Schwarz immediat... | If all representations of a group can be realized over $\mathbb{R}$, then $S(G, \mathbb{C})$ equals the number of elements of order 2 in $G$. More generally, the number of solutions of the equation $x^2=g$ in $G$ is $\sum\epsilon_\chi \chi(g)$, where $\epsilon_\chi=1$, if $\chi$ belongs to a real representation, $\epsi... | https://mathoverflow.net |
652,441 | [
"https://physics.stackexchange.com/questions/652441",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/307359/"
] | I am currently working on a lab experiment to find a relationship between the diameter of a sphere and its drag coefficient. I will be using a spring-mass system that oscillates vertically and then damps because of drag. How can I use the data obtained from that experiment in order to determine a drag coefficient for t... | You are calculating the EPE as if there is no tension in the string before it is stretched from extension <span class="math-container">$\frac l {10}$</span> to extension <span class="math-container">$\frac l {5}$</span>. But we know there is already tension <span class="math-container">$Mg$</span> In the string, and so... | You are 100 percent correct when you say that additional GPE loss got stored in EPE and actually the question requires you to only calculate this change i.e. from initial <span class="math-container">$l/10$</span> extension to additional <span class="math-container">$l/10$</span> extension.
Just consider the EPE initia... | https://physics.stackexchange.com |
507,422 | [
"https://stats.stackexchange.com/questions/507422",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/96835/"
] | Consider a situation where we have individual patient survival data from a series of clinical trials of patients treated in a similar way. We might have a dataset that looks like this, with n total subjects from k total trials, experiencing events (event = 1) or censored (event = 0) at time t.
<div class="s-table-conta... | In the absence of covariates, <code>f2b</code> and <code>f1</code> are effectively equivalent as single models because <code>robust=TRUE</code> only affects the standard errors for the regression coefficients and there aren't any. They aren't exactly interchangeable if you consider them as base models that some other ... | I think f2b should be the same as f1. Do you get the same result?
It seems like f2a should be different, but can you explain what error you get with f2a? Can you also try this instead
<pre><code>f2a <- coxph(Surv(time, event) ~ 1,cluster=trial)
</code></pre>
I would use the package muhaz to estimate the hazard funct... | https://stats.stackexchange.com |
28,810 | [
"https://astronomy.stackexchange.com/questions/28810",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/25234/"
] | I am planning on buying my first telescope. I am getting an 80mm refractor and a 114mm reflector for the same price range. Which would be a better option? Further, would a Barlow lens solve the chromatic aberration issues with a f/5 refractor?
| The refractor will be better for wide-field observing of starfields and big nebula and galaxies. For planets and small to medium (also larger with 2" eyepieces or just 1.25" eyepieces with a low magnification and big apparent field of view) sized DSOs (nebulae, galaxies and star clusters) the reflector will have an adv... | <blockquote>
Further would a Barlow lens solve the chromatic aberration issues with
a f/5 refractor.
</blockquote>
I suppose in theory they could, but they would have to be designed to do so. In practice, they vary widely in quality, and either don't have an effect on chromatic aberration, or actually make it wors... | https://astronomy.stackexchange.com |
487,976 | [
"https://physics.stackexchange.com/questions/487976",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/123113/"
] | In special relativity, Maxwell's equations may be written as
<span class="math-container">\begin{align*}
dF = 0, \\ \star\, d\star F = J.
\end{align*}</span>
In four-vector notation, this translates to <span class="math-container">$\partial_{\mu}F^{\mu\nu} = J^{\nu}$</span> and <span class="math-container">$\partial_{[... | Differential forms are natural objects that depend solely on the smooth structure, therefore they are valid in any spacetime.
Note that the Hodge star <span class="math-container">$\star$</span> does, however, depend on a metric tensor. However, any metric tensor works with it. Therefore, Maxwell's equations in differ... | <blockquote>
Is there a way to write this using differential forms (such that it reduces to equations involving covariant derivatives rather than partial derivatives)?
</blockquote>
It turns out that the differential form equations written in my original post are already what I wanted. This was unclear to me, so I will... | https://physics.stackexchange.com |
51,066 | [
"https://astronomy.stackexchange.com/questions/51066",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/32126/"
] | Someone else asked about various planets located at the orbital range of the Moon. It made me wonder if an object with the same density as the Moon, at a distance which would present the same angular diameter of the Moon seen from the Earth, would have the same general gravitational effects of the Moon on the Earth, g... | Exactly the same tides, yes.
The Sun is the same angular size as the Moon but about 400 times further away.
If the Sun were as dense as the Moon then its gravitational pull would be 400 times that of the Moon: <span class="math-container">$400$</span> times the diameter, so <span class="math-container">$400^3$</span> t... | The tides depend on the inverse cube of distance (<span class="math-container">$D$</span>) and the mass (<span class="math-container">$M$</span>) of the object causing the tides.
<span class="math-container">$$F_{\rm tide} \propto M D^{-3}.$$</span>
The mass of an object depends on its density (<span class="math-contai... | https://astronomy.stackexchange.com |
236,535 | [
"https://security.stackexchange.com/questions/236535",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/240503/"
] | A friend of mine has an old family PC with a bunch of important photos on it. Unfortunately, from what he told me, it seems like they have fallen victim to a tech support scam some five years ago, during which the scammer had remote access to their machine. They haven't used this PC ever since that incident, because th... | Start by copying every image file on their infected device to a media card. Then on your recovery machine launch a VM running an OS that is immune to Windows malware (Linux), install ImageMagick, mount the media card, then use a script that calls ImageMacick to transform each image to PNG format. This will neutralize m... | <blockquote>
They haven't used this PC ever since that incident, because they were afraid that the scammer might have put some sort of malware onto their system. Since they aren't super tech-savvy, my friend asked if I could help him safely recover their photos.
</blockquote>
If the only thing you're recovering is phot... | https://security.stackexchange.com |
434,156 | [
"https://softwareengineering.stackexchange.com/questions/434156",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/406316/"
] | My understanding of a "browser" as a means of consuming software over the web:
<ul>
<li>Browsers isolate web application execution to an environment which greatly reduces end user vulnerability.</li>
<li>Browsers provide an approximately standard environment which developers can target with their software.</l... | Note that the premise is somewhat flawed. Originally, browsers were tools to navigate a web of linked documents. It seemed desirable to add dynamic content to web documents, and there have been several approaches, such as Java applets or Shockwave Flash scripts.
Today, JavaScript (however you call it) rules, and WASM l... | Yes, it would be theoretically possible to combine a browser and a container runner into one.
No, such a combination would not be as useful as you seem to think.
Containers are not intended to be able to run anywhere, but rather they are tied to a particular platform (OS and processor). A container that contains softwa... | https://softwareengineering.stackexchange.com |
252,056 | [
"https://electronics.stackexchange.com/questions/252056",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/120563/"
] | I am planing make a water pump circuit connected with a switch and when i press the switch the water pump should start pumping water for six seconds (x seconds) and then stop itself and whenever i press the button same should happen so please help.
| You need a minimum load for them to regulate. Add a resistor to give 100 uA of load and the situation should improve.
| Your circuit is fine. The battery in your meter needs to be replaced.
The voltmeter is reading high by more than 20% because the internal voltage reference has gone out of regulation (low) and the readings are a ratio like Reading = K * Vin/Vref.
| https://electronics.stackexchange.com |
93,461 | [
"https://stats.stackexchange.com/questions/93461",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/31418/"
] | When talking about longitudinal data, we may refer to data collected over time from the same subject / study unit repeatedly, thus there are correlations for the observations within the same subject, i.e., within-subject similarity.
When talking about time-series data, we also refer to the data collected over a series... | I doubt there are strict, formal definitions that a wide range of data analysts agree on.
In general however, <em>time series</em> connotes a single study unit observed at regular intervals over a very long period of time. A prototypical example would be the annual GDP growth of a country over decades or even more ... | There are roughly three kinds of datasets:
<ul>
<li>cross section: different subjects at the same time; think of it as one row with many columns corresponding to different subjects;</li>
<li>time series: the same subject at different times; think of it as one column with rows corresponding to different time points;</l... | https://stats.stackexchange.com |
2,817,576 | [
"https://math.stackexchange.com/questions/2817576",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/553571/"
] | As in the title, my problem is to compute the relative homology group $H_1(S^1, S^0) $ of these two spheres.
The problem is that te long exact sequence of the couple gives
$0 \rightarrow \mathbb{Z}\rightarrow H_1(S^1, S^0)\rightarrow\mathbb{Z}^2
\rightarrow \mathbb{Z} \rightarrow 0$
And I think this is not so hel... | It is possible to compute $H_1(S^1,S^0)$ as a group just from the long exact sequence given. Because $\mathbb{Z}$ and $\mathbb{Z}^2$ are both torsion-free, $H_1(S^1,S^0)$ must also be torsion-free. So we need only compute the rank of $H_1(S^1,S^0)$. Rank is additive over exact sequences, and so the rank must be 2.
Ho... | Another way to do this, without CW complexes but with one tiny topological thought, goes like this. The key idea is to remember where those homomorphisms come from:
<span class="math-container">$$0 \rightarrow \underbrace{H_1(S^1)}_{\mathbb{Z}} \rightarrow H_1(S^1,S^0) \rightarrow \underbrace{H_0(S^0)}_{\mathbb{Z}^2} \... | https://math.stackexchange.com |
324,018 | [
"https://softwareengineering.stackexchange.com/questions/324018",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/235991/"
] | I've been tasked with overhauling a fairly large web-system that requires much user input. In an attempt to instruct the users when making input, the original creators has made extensive use of feedback structures like help texts and tool-tips.
<em>The problem for me is that all the text material used for user feedbac... | Interspersing large amounts of data with program logic is so bad that added complexity in your code base is a cheap price to pay for it. Make the transformation, and you'll probably be rewarded with additional of opportunities for refactoring to simplicity.
| You have to ask what you hope to achieve by this - if its only to get a list of string resources for your own benefit, you might as well just try to learn the system. You say that a lot of it is in the form of constants and variables so all you would gain from putting the data into an external file is to replace the or... | https://softwareengineering.stackexchange.com |
4,516,652 | [
"https://math.stackexchange.com/questions/4516652",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1088331/"
] | <blockquote>
If <span class="math-container">$$\operatorname{cosec}\theta-\operatorname{sin}\theta=m$$</span> and <span class="math-container">$$\operatorname{sec}\theta-\operatorname{cos}\theta=n$$</span> then eliminate <span class="math-container">$\theta$</span>.
</blockquote>
My work:
Squaring both the equations an... | Writing <span class="math-container">$x$</span> for <span class="math-container">$\theta,$</span>
<span class="math-container">$$m=\csc x-\sin x=\dfrac{\cos^2x}{\sin x}$$</span>
<span class="math-container">$$\text{Similarly, } n=\sec x-\cos x=\dfrac{\sin^2x}{\cos x}$$</span>
<span class="math-container">$$\dfrac mn=\... | Actually I solved the question.
From the equations we can conclude that <span class="math-container">$$mn=\operatorname{sin}\theta \operatorname{cos}\theta$$</span>
or <span class="math-container">$$\theta=\frac12\cdot\operatorname{arcsin}(2mn)$$</span> so it is seen
<span class="math-container">$$2mn=\left(\frac{2}{\s... | https://math.stackexchange.com |
557,589 | [
"https://electronics.stackexchange.com/questions/557589",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/281686/"
] | To my understanding, ambient temperature is the temperature of the surrounding area while the unit being worked on is powered. While operating temperature is the temperature of the unit itself under heat and power.
I have seen many different explanations online, and most seem to contradict themselves. If the operating ... | Generally the "Operating Temperature" is listed as a MAXIMUM or a range. That means you should not operate the equipment or device outside those bounds or you risk damage or the device not performing according to specs. In my opinion "Ambient" is the same although different manufacturers may have ... | I'm not sure there is a universally accepted definition, especially considering the wide range of possible equipment etc. There are probably military standards that nail it down in that domain.
Without further information, I would interpret "operating temperature" as ambient temperature <strong>during operati... | https://electronics.stackexchange.com |
163,873 | [
"https://mathoverflow.net/questions/163873",
"https://mathoverflow.net",
"https://mathoverflow.net/users/26080/"
] | With the exception of a few miscellaneous cases, the axioms (and/or schemeta) of ZFC can roughly be divided into two kinds:
<ol>
<li>Those that guarantee the existence of more complicated sets, given that simpler sets are already around (e.g. separation, replacement schema). Also, uniqueness of these entities immediat... | Axiom: $0^\sharp$ exists.
$0^\sharp$ is a pivotal principle in the large cardinal hierarchy, but it is actually a set of natural numbers. If it exists, it is unique.
| I like to use the following very mild extension of ZFC. Add a predicate "Sat"; add axioms saying that this predicate satisfies the expected inductive clauses to define "satisfaction of $\in$-formulas in the full universe of sets"; and add replacement (or separation and collection) axioms for formulas in which Sat occur... | https://mathoverflow.net |
220,009 | [
"https://security.stackexchange.com/questions/220009",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/186578/"
] | Our company have 10+ private websites and 20+ person and need to open a different one automatic when the developers are testing some functional. We do not want anyone outside the company to view the content of the private websites.The websites is access with ip and port.Those websites have public ip, can be access from... | <h1>Simplification</h1>
Neither option is remotely secure. But you present those as THE options, so I'll address them first, then present you an option 3.
<h1>Security: Technical</h1>
Given your two options, neither is technically superior. The addition of SSL/TLS would only be security theater.
In regards to you... | I'm coming from the assumption that you don't leave any backdoor open in either of the methods, and choose high-entropy passwords for Basic Auth. In that case, the biggest difference between the methods is that HTTPS will encrypt the traffic and prevent Man-in-the-Middle Attacks, making it impossible for anyone to eave... | https://security.stackexchange.com |
14,537 | [
"https://mechanics.stackexchange.com/questions/14537",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/2141/"
] | I have a 2010 VW Jetta Stuck in Park. When I turn it on, press the brake, and press the shifter button it doesn't move. How do I get it out of park?
The brake light and dash indicator do toggle (lights on / dash indicator goes off) when I press the brake, so it's not the brake sensor.
| Under the centre console trim, surrounding the gearlever, you will find a a solonoid that engages a pin into the gearlever linkage. Release or remove this to release the gearlever. You will then need to determine the exact fault of this detent and repair it to ensure future safe starting. Possible faulty solonoid.
| The problem could be as Allan stated with a bad solenoid, but could also be a mechanical problem with the shifter itself. If you are pressing the button (after pressing the brakes) to shift and it does not allow you to rotate the gear shifter from park, the rod from the button to the latching mechanism or the latching ... | https://mechanics.stackexchange.com |
71,634 | [
"https://electronics.stackexchange.com/questions/71634",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/24594/"
] | Basically, I have two led lights connected to pin 2 (led 1) and pin 3 (led 2), and I want led 2 to light up every time led 1 lights up, and turn off every time led 1 turns off.
My code:
<pre><code>int led1=2;
int led2=3;
void setup()
{
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop()
{
if (di... | With the if() statement fixed as mentioned in another answer, it still won't work because you turn led1 on, then off at the end of the loop, so when the program gets back to the top of the loop, led1 is always off.
To get the effect you want, you need to do the if/else both after turning led1 on, and after turning led... | This line:
<pre><code>if (digitalRead(led1 == HIGH))
</code></pre>
Is incorrect. This should be:
<pre><code>if (digitalRead(led1) == HIGH)
</code></pre>
Because you want to check the return value of <code>digitalRead()</code>. However, this doesn't cause the problem.
You can see the real problem when you try to th... | https://electronics.stackexchange.com |
22,175 | [
"https://electronics.stackexchange.com/questions/22175",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3039/"
] | I have a 60W soldering iron, which is too much heat for typical electronic soldering purposes. I find myself constantly switching it on and off using a powerstrip to control its temperature so it does not get too hot. I was wondering if there exists some easy way to reduce its power output. Is there some type of circui... | There are numerous ways of reducing power input to your iron. As others have said and you yourself have noted, this is more likely to be of value as a learning exercise than a major improvement to the iron.
A temperature controlled iron is a really really really good idea for quality soldering.
A "closed loop" tempe... | Ditch it and buy a <strong>temperature-controlled iron</strong>. Even at lower power your iron will keep heating if you leave it unused for some time. This will go on until there's an equilibrium between generated heat, and heat drained to the environment. Problem is that at low temperatures little heat is drained, and... | https://electronics.stackexchange.com |
177,343 | [
"https://stats.stackexchange.com/questions/177343",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/58450/"
] | Given this question:
$$\text{minimize } \| Ax - b \|_\infty$$
Then this question is equivalent to
$\text{minimize } \max |Ax - b|$ = $\text{minimize } \max\limits_i |a_i^Tx - b_i|$
Let $t = |a_i^Tx - b_i|$, $t$ a fixed number
Then $ -t \leq a_i^Tx - b_i \leq t$
Then we are able to convert the original problem i... | $ -t \leq a_i^Tx - b_i \leq t$ being true for all i is equivalent to $\max\limits_i |a_i^Tx - b_i| \leq t$
Minimizing t then drives $\| Ax - b \|_\infty$ as small as possible. It's really that simple.
| Along @ Mark's answer, The answer is $\infty$ unless $A =0$. If $A=0$ the answer is $||b||_{\infty}$.
The reason is because, I can drag $Ax$ to $+\infty$ or $-\infty$ along any singular vector of A. To see why write $A$ using the SVD as $\Sigma \sigma_{i}u_{i}v_{i}^{T}$. Multiply by $x$ and set $x = tv_{i}$ and let $t... | https://stats.stackexchange.com |
199,327 | [
"https://mathoverflow.net/questions/199327",
"https://mathoverflow.net",
"https://mathoverflow.net/users/37338/"
] | Given a Cohen-Macaulay ring $R$ over a field of characteristic zero and $G$
a reductive algebraic group acting on $R$, then the ring of ivanriants $R^G$
is also Cohen-Macaulay. This is known as Hochster-Roberts Theorem.
It is also known that if $X=Spec(R)$, has rational singularities, then
$Y=Spec(R^G)$ has rational s... | This is not true in general.
Indeed, there exists $\mathbb{Q}$-Gorenstein rings $S$ with rational singularities such that their canonical covers do not have rational singularities, see for instance <em>Cyclic covers of rings with rational singularities.</em> by Anurag K. Singh. Generally speaking taking Veronese's ... | The answer to 1. is no. Let $V:=\mathbb{A}^n$ $(n\geq 2)$. In $V\times V$, take $X:=V\times \{0\}\cup \{0\}\times V $ . $\ X$ is stable under the involution $\sigma :(x,y)\mapsto (y,x)$, the map $(x,y)\mapsto x+y\ $ from
$X$ to $V$ identifies $X/\sigma $ to $V$, which is of course smooth, but $X$ is not Cohen-Macau... | https://mathoverflow.net |
342,345 | [
"https://electronics.stackexchange.com/questions/342345",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/147576/"
] | if the load of an inverter(using a battery) is a pure reactive load, will the battery be drained ( neglect the efficiency of DC/AC conversion)?
| If you neglect efficiency, there will be no drain on the battery with an inductive reactive load. An inverter will not work very well with a capacitive reactive load. To supply a reactive load, an inverter must have an internal capacitor that is large enough to handle the reactive current. Since there is no such thing ... | The answer depends on the exact circuit used in the inverter. Most likely the DC power draw will be less than for a resistive AC load of the same current. Either find a spec in a datasheet that tells you what the inverter does with reactive loads, or just measure it.
Don't expect the measurements from one model to a... | https://electronics.stackexchange.com |
211,620 | [
"https://softwareengineering.stackexchange.com/questions/211620",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/66228/"
] | I have been reading the Wikipedia article on double check locking and one thing that's not clear from it (at least to me) is what the pattern achieves. What is the reason for making the two checks below? Why not have triple checked locking? Wouldn't that be even better?
<pre><code>if (mySingleton == null) { // 1st ... | The correct version without double check locking is:
<pre><code>lock (myLock) {
if (mySingleton == null) { // 2nd (double) check
mySingleton = new MySingleton();
}
}
</code></pre>
However this requires the <em>expensive</em> operation of getting a lock each time you want to get the singleton, however ... | Its worth noting that in C# there is a thread safe approach that avoids the need to use locking for creating the singleton instance.
<pre><code>class MyClass
{
// Static constructor - Can only by called once per application domain.
static MyClass()
{
// We must be the only thread.
MyClass... | https://softwareengineering.stackexchange.com |
67,850 | [
"https://electronics.stackexchange.com/questions/67850",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/19331/"
] | I recently fried my AVRISP MKII programmer, so I am looking for a new programmer. What is the best AVR programmer according to the following criteria:
<ul>
<li>Out of the box use</li>
<li>Works well with Ubuntu</li>
<li>Easy to use</li>
<li>Able to program common types of AVR uCs (such as ATmega328-PU or ATtiny85)</l... | Honestly, my experience with AVR programmers is really quite uniform regardless of which programmer I'm using. I have used several different programmers, from the SparkFun Pocket AVR to a cheap eBay AVR programmer that cost under $5. I didn't really notice better performance coming from a more expensive programmer as c... | I use UsbAsp - works on all OS, is cheap.
| https://electronics.stackexchange.com |
41,816 | [
"https://mathoverflow.net/questions/41816",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4354/"
] | Given three points $a,b,c$ in a (geodesic) metric space $X$, one defines a <em>comparison angle</em> $\angle(a,b,c)$ by the cosine law:
$$
\angle(a,b,c) = \arccos \frac{|ab|^2 + |ac|^2 - |bc|^2}{2\cdot|ab|\cdot|ac|}
$$
where $|ab|$, $|ac|$ and $|bc|$ are distances in $X$. In other words, $\angle(a,b,c)$ is the angle o... | To Deane Yang, concerning the smoothness of geodesics. These issues have been studied by Hartman
and his coauthors more than 40 years ago. Together with Calabi he claimed to prove
that in a $C^{\alpha}$ continuous metric all geodesics are uniformly $C^{1,\alpha}$.
(I do not have mathscinet access now, but I think ... | For $C^0$, the answer is "NO".
Start with Euclidean plane and choose a function $\alpha(r)$ such that $\alpha(r)\to\infty$ as $r\to 0$,
but it does it really slow (so $r\cdot\alpha'(r)\to 0$ sufficiently fast).
Consider the induced metric by the map in polar coordinates $(\theta, r)\mapsto (\theta+\alpha(r),r)$;
it i... | https://mathoverflow.net |
316,423 | [
"https://mathoverflow.net/questions/316423",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2362/"
] | I understand that in the number field / function field analogy, the ideles <span class="math-container">$\mathbb I_K$</span> of a number field <span class="math-container">$K$</span> are supposed to be analogous to the Picard group of a function field.
<strong>Question:</strong> Is this more than an analogy? Is there ... | As explained in the comments, I disagree with this analogy. Nonetheless, there is a way you can realize the idele class group (not the ideles) as a group of line-bundle-like objects under the tensor product.
First, some context.
Suppose we have a number field <span class="math-container">$K$</span> with ring of integ... | It seems it would be helpful to discuss idealic/adelic view on line/vector bundles, which is <strong>quite simple and intuitive</strong>. At the end we might arrive at a kind of asnwer to the question.
<strong>Step 1:</strong>
Bundles are described by transition functions from one chart of the covering to another - ... | https://mathoverflow.net |
98,807 | [
"https://mathoverflow.net/questions/98807",
"https://mathoverflow.net",
"https://mathoverflow.net/users/7492/"
] | Let $f$ be a function of two variables $x$ and $y$. Assume that $f$ is $C^1$. Assume that $f_{xx}$ exists and continuous.
<ol>
<li>Is it true that $f_{xy}$ exists and continuous?</li>
<li>Is it true that $f_{yx}$ exists and continuous?</li>
</ol>
I suspect that the answers are negative, so let me ask a more general ... | From Counterexamples in Analysis (9.10), consider the function $f(x) = xy\frac{x^2-y^2}{x^2 +y^2}$. A bit of calculation confirms that $f_{xx}$ exists and is continuous, while $f_{xy}$ is discontinuous at the origin.
In general, consider, for example,
$f(x,y) = \frac{x^k y^3}{x^2+y^2}$.
You can take any number of $... | This does not directly answer your question, but is a related phenomenon:
Even if $f_{xx}+f_{yy}$ exists and continuous, it is possible that $f$ is not in $C^2$. This is a basic property of the solutions of $\Delta u = g$. One recovers $C^2$ if the right hand side is a bit more than merely continuous (e.g. Dini contin... | https://mathoverflow.net |
283,522 | [
"https://physics.stackexchange.com/questions/283522",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/131802/"
] | Suppose we have an ebonite rod (insulator). This rod has a negative charge, and once it touches a neutral pith ball, charges are distributed amongst the pith ball. However, why doesn't the same happen if we have neutral paper rather than a pith ball? Even though the paper is an insulator, shouldn't the charge migrate f... | Start with Hamiltonian density, the quantity in the integrand from the definition of the Hamiltonian:
$$H = \int d^3x \left( \psi_{,0} \frac{\partial \mathcal{L}}{\partial \psi_{,0}} - \mathcal{L} \right) \equiv \int d^3x \,\mathcal{H}$$
$\mathcal{L}$, of course, denotes the Lagrangian density.
Since $\mathcal{H}$ cor... | This is my derivation
<span class="math-container">\begin{equation}
T_{\mu\nu} = \frac{-2 c}{\sqrt{-g}} \frac{\delta S_{M}}{\delta g^{\mu\nu}} \; .
\end{equation}</span>
<span class="math-container">\begin{equation}
S_{EM}[g^{\mu\nu},A^\mu] = \frac{-1}{4 \mu_0}\int d^4x \sqrt{-g} F_{\alpha\beta} F^{\alpha\beta} \; ... | https://physics.stackexchange.com |
143,434 | [
"https://physics.stackexchange.com/questions/143434",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/26419/"
] | In my textbook (Resnick Halliday Krane), the derivation for pressure in a fluid at a given depth is done assuming that the fluid is homogeneous. Thus, the book concludes that the pressure in a fluid is the same at all levels <em>given that the fluid is homogeneous</em> and not otherwise. I had two problems with this:
... | Take A to be a cylindrical fluid element of height $h_A$ and cross sectional area $A_A$, as the entire portion of the fluid above the section marked $A$.
Take B to be another cylindrical element of the height $h_B$, with cross sectional area $A_B$, as the entire portion of the fluid about the section marked $B$.
As y... | Your mistake is assuming that the interfaces of the blue liquid must be at the same level on the left and the right: that would only be true if they faced the same pressure from above. But on the left the blue liquid is supporting column A; at the bottom of A there must be a certain pressure to support the liquid. At B... | https://physics.stackexchange.com |
163,059 | [
"https://security.stackexchange.com/questions/163059",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/152172/"
] | My main concern is not being a pain in the ass to my end-users. However, because 'banks' do it, some believe that session time-outs make an app more secure. But does it when your only mode of authenticating is username/password? (given that session keys are properly randomized and user interacts only over HTTPS?). I te... | Session timeout can prevent or mitigate several types of attacks. The following come to mind.
<strong>Unsecured workstation.</strong> Boss leaves his desk for lunch, employee sits down and gives himself a raise.
<strong>Shared devices.</strong> Donald Trump uses a complimentary iPad at the Mar-a-la-go Resort. Terro... | There's a trade-off between ease of use and security. You'll need to make appropriate choices based both on how your users interact with your site and your threat assessment of what would happen if an unauthorized user got access to their account (from being left signed in after many minutes of being inactive).
For e... | https://security.stackexchange.com |
43,068 | [
"https://physics.stackexchange.com/questions/43068",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/7743/"
] | I learned about the coronal discharge, and the common explanation is because the electric field is strong where radius of curvature is small. But I haven't found anything yet that explains why electrons like to crowd at the peaks, and escape from the holes.
My intuition suggests electrons try to distribute on the surfa... | Electrons just don't like each other, a point captured by the phrase that "like charges repel." So, imagine a gymnasium full of students pretending to be electrons, staying as far away from others as possible. Anyone near the center of the crowd will feel badly pressed and will try to work there way towards the edge of... | Consider a charged conductor made out of two spheres of radii $R_1$ and $R_2$, connected with a conducting wire. Assume that $R_1<R_2$, and that the spheres are far apart so that effects of electrostatic interactions between the spheres can be neglected. Then, the surface charge density, the quantity that describes ... | https://physics.stackexchange.com |
34,577 | [
"https://softwareengineering.stackexchange.com/questions/34577",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/2662/"
] | I was wondering how you guys start out if you need to design a multi-client project where multiple clients can interact with a server. In specific how do you go about dealing with different states and message handling, how do you start designing and considering all these cases?
For example a video webchat application ... | Not entirely sure what you're asking, however I use a very strict style:
<pre><code>;==========================================
; Title: Author Style Sample
; Author: Darknite
; Date: 7 Jan 2011
;==========================================
</code></pre>
The style is inspired from assembly programmers.
I put this a... | Why would you? that's the job of the versioning system and "Blame" :)
| https://softwareengineering.stackexchange.com |
643,033 | [
"https://math.stackexchange.com/questions/643033",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/104922/"
] | For what value(s) of $A$, if any, will $y = At\mathrm{e}^{-2t}$ be a solution of the differential equation
$$
2y'+ 4y = 3\mathrm{e}^{-2t}?
$$
For what value(s) of $B$, if any, will $y = B\mathrm{e}^{-2t}$ be a solution?
When attempting to find $A$ I got the equation
$$-4At+At+3=0$$
When attempting to find $B$ I g... | Careful when differentiating. With $y=Ate^{-2t}$ I got,
$$y'=-2Ate^{-2t}+Ae^{-2t} $$
and so when we plug that into the differential equation we are looking for values of $A$ such that the following equation is satisfied,
$$ 2(-2Ate^{-2t}+Ae^{-2t})+4Ate^{-2t}=3e^{-2t} $$
So we are looking for $2A=3$. So I do think t... | Letting $D$ denote the differentiation operator, your equation is
$$
(D+2)y=\frac{1}{2}e^{-2t}.
$$
$(D+2)$ annhilates $e^{-2t}$. So $Be^{-2t}$ is never a solution by itself, but it can be added to any particular solution of the above to get another. The general solution of the above must have the form $A... | https://math.stackexchange.com |
377,622 | [
"https://softwareengineering.stackexchange.com/questions/377622",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/313992/"
] | Setting the debatability of using personal accounts on the workplace aside.
<hr>
<strong>Context:</strong>
The company I work for is dedicated to creating apps for other companies. Because of this we have many different clients and handle many different projects within our company's Github Enterprise organization.
I... | Git, on the client side, does not associate the authentication-method with the repository-address. Accidental pushes to personal repositories are thus <em>NOT</em> possible by simply changing the ssh-keys.
<hr>
Cloning a repository from github requires you two things which are independent:
<ol>
<li>an authorizatio... | I've participated in work environments where everything was open. I could surf wherever I wanted, install whatever I wanted on my work computer, use a private Github account, and access Facebook and private email accounts. There were no rules, other than the agreement that what happens in the company stays in the com... | https://softwareengineering.stackexchange.com |
46,574 | [
"https://mathoverflow.net/questions/46574",
"https://mathoverflow.net",
"https://mathoverflow.net/users/10943/"
] | Does there exist a field $k$ and a subring $R$ of $S = M_2(k)$ such that $R$ is not finitely generated over its center, $S=kR$ and $1_R = 1_S$? ($S$ is the algebra of $2 \times 2$ matrices over $k$.)
| I think the answer is "yes". Let $A$ be a non-Noetherian integral domain (for example a polynomial ring in infinitely many variables over a field), let $I$ denote a non-finitely-generated ideal, and let $k$ be the field of fractions of $A$. Let $R$ denote the ring of $2\times 2$ matrices with coefficients in $A$ and wi... | This question has been explored in the context of polynomial identity rings (PI-rings). Your hypothesis implies that $R$ is a prime PI-ring of PI-degree 2 (see below). However, the main structure theorems of PI-theory, Kaplansky's Theorem, Posner's Theorem, Artin-Procesi Theorem and central polynomials, are in the op... | https://mathoverflow.net |
67,179 | [
"https://stats.stackexchange.com/questions/67179",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/29066/"
] | I am having some trouble solving the following.
You draw cards from a standard 52-card deck without replacement until you get an ace. You draw from what is remaining until you get a 2. You continue on with 3. What is the expected number you will be on after the entire deck runs out?
It was natural to let
<ul>
<li>$T... | following @gung's idea, i believe the expected value would be 5.84? and from my interpretation of the comments, i'm assuming "A" is an almost impossible value (unless the last four cards in the deck are all aces). here are the results of a 100,000 iteration monte carlo simulation
<pre><code>results
2 3 4... | <strong>For a simulation it's crucial to be <em>correct</em> as well as fast.</strong> Both these objectives suggest writing code that targets core capabilities of the programming environment as well as code that is as short and simple as possible, because simplicity lends clarity and clarity promotes correctness. He... | https://stats.stackexchange.com |
635,511 | [
"https://physics.stackexchange.com/questions/635511",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/299015/"
] | Electric field due to an uniformly charged infinite sheet at a distance <span class="math-container">$x$</span>, if we calculate using Gauss Law, is <span class="math-container">${\bf \frac{σ}{2ε_0}}$</span>.
But, How to calculate the electric field without using Gauss Law?
Can it be done?
| Consider a circular disc on the infinite sheet with radius <span class="math-container">$r$</span>.
As an exercise, you can prove that electric field at a distance <span class="math-container">$a$</span> on the axis of a circular disc from its centre having uniform surface charge density <span class="math-container">$\... | No you cannot do a calculation without Maxwell's equations in some form. In this case that means you need Gauss's law.
| https://physics.stackexchange.com |
4,460,754 | [
"https://math.stackexchange.com/questions/4460754",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1062283/"
] | <strong>Question :</strong> Evaluate <span class="math-container">$$\int \frac {2x}{(x^2+1)(x^2+2)^2} dx $$</span>
I am not able to find the value of the following integrals I tried with the method of <strong>substituting</strong> the denominator by <span class="math-container">$t$</span> but I cannot find the answer. ... | Substituting <span class="math-container">$t=x^2$</span> the integrand takes the form <span class="math-container">$$\displaylines{{1\over (t+1)(t+2)^2} =\left [{1\over t+1}- {1\over t+2}\right ] {1\over t+2}\\ =
\left[ {1\over t+1}- {1\over t+2}\right ]-{1\over (t+2)^2}}$$</span> Thus the result is equal <span class=... | <strong>HINT</strong>
Let <span class="math-container">$u = x^{2} + 1$</span>. Then the proposed indefinite integral reduces to
<span class="math-container">\begin{align*}
\int\frac{2x}{(x^{2} + 1)(x^{2} + 2)^{2}}\mathrm{d}x & = \int\frac{\mathrm{d}(x^{2} + 1)}{(x^{2} + 1)((x^{2} + 1) + 1)^{2}}= \int\frac{\mathrm{d... | https://math.stackexchange.com |
1,792 | [
"https://electronics.stackexchange.com/questions/1792",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/588/"
] | I've had a number of issues getting good stable analog readings from an RTD temperature sensor. The temperature readings have a tendency to bounce as much as +/- 5 Deg C. The circuit is very basic, a voltage divider is formed between a fixed resistor and an RTD connected to ground. The voltage at the RTD is then fed in... | The first thing I'd look at is ripple in your voltage rail. Noisy voltages are killer with a voltage divider. A higher-quality measurement system might use a regulated constant current source to drive the RTD instead of a voltage divider. An LM317 can be used to do this - hook a resistor between the OUTPUT and ADJ t... | There are a few places to look.
First of all you should have some analogue filtering before you sample. Temperature measurements are usually slow changing so it should be possible to filter fairly aggressively. Even a simple RC can be very effective.
Consider how much cable you have between the circuit and the RTD. W... | https://electronics.stackexchange.com |
532,748 | [
"https://physics.stackexchange.com/questions/532748",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/252155/"
] | I was reading a great answer by John Rennie earlier (and took a mental note of the question which I must have mislaid). I wanted clarification by comment so I thought I could look it up amongst John's answers but he has 191 <strong>pages</strong> of answers. Needle in a haystack.
John explains that in relation to in... | The soda can't escape through a sealed can, which leaves two options: the can wasn't sealed or the soda didn't escape.
<h2>Soda didn't escape:</h2>
This is the less likely and less interesting case: the can was produced defective and never had any soda in it. Issue on the manufacturing line, and whoever saved it (you... | I’ve had numerous experiences with unopened old cans of soda losing part of their contents, though my cans were no where near as old as yours. I do remember one being empty.
The snap top tabs probably don’t make a perfect seal. That combined with the positive pressure of the carbonation might result in very slow esca... | https://physics.stackexchange.com |
293,851 | [
"https://softwareengineering.stackexchange.com/questions/293851",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/61277/"
] | I've been reading over and over that functional languages are ideal (or at least very often useful) for parallelism. Why is this? What core concepts and paradigms are typically employed and which specific problems do they solve?
On an abstract level, for example, I can see how immutability might be useful in prevent... | The main reason is that referential transparency (and even more so laziness) abstracts over the execution order. This makes it trivial to parallelize evaluation.
For example, if both <code>a</code>, <code>b</code>, and <code>||</code> are referentially transparent, then it doesn't matter if in
<pre><code>a || b
</co... | Lets first look at why procedural programming is so bad at concurrent threads.
With a concurrent programming model, you are writing sequential instructions that (by default) expect to be run in isolation. When you introduce multiple threads, you need to explicitly control access to prevent concurrent access to a shar... | https://softwareengineering.stackexchange.com |
98,703 | [
"https://physics.stackexchange.com/questions/98703",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/35354/"
] | In textbooks, it is sometimes written that a mixed state can be represented as mixture of $N$ (I assume here $N<+\infty$) <strong>quantum</strong> pure states $|\psi_i\rangle$ with <strong>classical</strong> probabilities $p_i$:
$$\rho = \sum_{i=1}^N p_i |\psi_i \rangle \langle \psi_i| \tag{1}\:.$$
Above $p_i \in (... | Yes, the density matrix reconciles all quantum aspects of the probabilities with the classical aspect of the probabilities so that these two "parts" can no longer be separated in any invariant way.
As the OP states in the discussion, the same density matrix may be prepared in numerous ways. One of them may look more "... | Let's look at a famous, concrete example: Perfectly unpolarized light.
Alice creates unpolarized light by randomly (incoherently) mixing left-circular-polarized light with an equal intensity of right-circular-polarized light.
Bob creates unpolarized light by randomly (incoherently) mixing vertically-polarized light w... | https://physics.stackexchange.com |
9,290 | [
"https://chemistry.stackexchange.com/questions/9290",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/121/"
] | Why do we typically take $n^2$ scans, even in the basic NMR experiment? I've heard various explanations, including that it helps the fast Fourier transform, and would like to know the real reason.
| If you mean why do we <strong><em>process</em></strong> raw NMR data using $n^2$ data points, then @Klaus's answer is correct. Although, it is actually usually possible to record an arbitrary number of time domain data points; it is just the processing algorithm is limited to how many data points it can handle. You wil... | The signal to noise ratio (S/N) is proportional to the square root of the number of scans. Hence the more scans, the better the S/N ration
| https://chemistry.stackexchange.com |
210,666 | [
"https://dba.stackexchange.com/questions/210666",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/150678/"
] | Right now I have two databases behind my asp.net web application. I'm using a single login to access both databases. the login has full ownership of one database and read-only rights to the second database. I'd like to set it up so that specific stored procedures from my main database can do update/delete operations... | Ok, I found out why. Apparently I was querying against the admin database. Always run <code>use <db></code> guys
| In my case, on my query I put an incorrect collection name. Always check that too.
| https://dba.stackexchange.com |
261,279 | [
"https://physics.stackexchange.com/questions/261279",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/120381/"
] | I wanted to know that how can we charge a battery using another higher voltage DC supply? I got a question that there is a 12 volt battery with an internal resistance 3ohm Connected with a 100 V DC supply , where the 100 v DC supply is connected to reverse the polarity. I don't quite understand the purpose of reversing... | You can think of charging the battery as being like charging a leaky capacitor - ie one which has a high (but not infinite) resistance dielectric material between its plates.
So you connect the + terminal of the DC supply to the + electrode of the battery/capacitor, and likewise for the - terminal/electrode. The DC... | The battery which if working normally has within it a chemical reaction occurring which produces a potential difference across its terminals which in your case is $12$ volts.
When an external conducting circuit is connected to the terminals of the battery a current flows from the positive terminal, through the exter... | https://physics.stackexchange.com |
668,626 | [
"https://math.stackexchange.com/questions/668626",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/127216/"
] | Would like to show the following:
If $f(x_0)=g(x_0)$ and $f'(x_0) \ge g'(x_0)$, then $\exists \epsilon >0$ such that $f(x)\ge g(x)$ on $[x_0,\epsilon)$
Maybe something like Taylor series? Help appreciated.
| The 'strictness' of the relationship between $f(x_0)$ and $g(x_0)$ matters.
It is not true in general if we just have equality. Take $g(x) = 0$, $f(x) = -x^2$, and $x_0 = 0$. Then $f(x_0) = g(x_0) = 0$, $f'(x_0) = g'(x_0) = 0$, but $f(x) < g(x)$ for all $x\neq x_0$.
If $f'(x_0) > g'(x_0)$, then $\lim_{x \to x_0... | Let $h(x)=f(x)-g(x)$. Then $h(x_0)=0$, $h'(x_0)>0$. From $h'(x_0)>0$, there exists $h_0>0$ with
$$
\frac{h(x_0+h)-h(x_0)}h>0, \ \ 0<h<h_0.
$$
As $h(x_0)=0$ and $h>0$, the inequality above tells us that $h(x_0+h)>0$ for all $0<h<h_0$. In other words, $h(x)>0$ for all $x\in(x_0,x_0+h_0)$... | https://math.stackexchange.com |
68,099 | [
"https://dsp.stackexchange.com/questions/68099",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/45340/"
] | I am dealing with a communication model described as
<span class="math-container">$$\overrightarrow{y(n)}=\pmb{H(n)}\overrightarrow{x(n)}+\overrightarrow{w(n)}$$</span>
where <span class="math-container">$\pmb{H(n)}$</span> is the <span class="math-container">$M\times M$</span> fading coefficient matrix at time <sp... | Below is a sample MATLAB/pseudocode to generate a 4x4 MIMO system, for 1000 Monte Carlo trials:
<pre><code>M=4; MC=1000;
H= randn(M,M,MC);
x=randn(M,1,MC);
w=randn(M,1,MC);
Y=zeros(M,1,MC);
for j = 1:MC
Y(:,:,j)= H(:,:,j)*x(:,:,j) + w(:,:,j);
end
</code></pre>
This would generate <code>y</code> according to ... | <span class="math-container">$n$</span> is the time index for the samples of <span class="math-container">$y$</span>, <span class="math-container">$x$</span>, etc. So you can express the 1st sample, 2nd sample, etc., of each signal, with reference to the reference 0 time, for <span class="math-container">$n=1$</span>, ... | https://dsp.stackexchange.com |
102,767 | [
"https://physics.stackexchange.com/questions/102767",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1345/"
] | From Mechanics; Landau and Lifshitz, it's stated on page 5:
<blockquote>
Since space is isotropic, the Lagrangian must also be indpendent of the direction of $ \mathbf{v}$, and is therfore a function only of its magnitudie, i.e. of $ \mathbf{v} \cdot \mathbf{v}=v^2$:
$L = L(v^2)$
</blockquote>
How is he able to e... | for any function $f$, we have $f(|v|) = f(\sqrt{v^{2}}) = g(v^{2})$, where $g = f\circ \sqrt{}$, so we lose no generality by assuming that the function is a function of the square. Also, it generalizes more nicely to vector spaces, where $v^{2} ={\vec v}\cdot {\vec v}$ is defined, but it is not necessarily the case th... | $\sqrt{x}$ is not an analytic function -- its first derivatives are not continuous at 0. We often require that the quantities we deal with are analytic for various physical, aesthetic or practical reasons. In this case we know that one thing we would like to do with our Lagrangian is get equations of motion from it, an... | https://physics.stackexchange.com |
3,091,464 | [
"https://math.stackexchange.com/questions/3091464",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/639265/"
] | If I had an array of 7 numbers and I wanted all numbers to be equally spaced within it but needed to start at 5 and end at 35 how would I do this?
For instance if I were given:
<ul>
<li>Numbers in array: <strong>7</strong></li>
<li>Largest number in array: <strong>35</strong></li>
<li>Smallest number in array: <stron... | Correct.
As the extension is bounded, where <span class="math-container">$|\hat{f}(x)| \leqslant M$</span> on <span class="math-container">$[0,1]$</span>, we have as <span class="math-container">$\epsilon \to 0$</span>,
<span class="math-container">$$\left|\int_0^1\hat{f} - \int_\epsilon^{1-\epsilon} f \right| = \lef... | Hint: <span class="math-container">$\int_\epsilon^{1-\epsilon} f = \int_\epsilon^{1-\epsilon} \hat f.$</span>
| https://math.stackexchange.com |
1,315,598 | [
"https://math.stackexchange.com/questions/1315598",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/246303/"
] | Are there unary predicates $\varphi(x), \psi(x)$ such that
<ol>
<li>The formula that states "There is a set $M$ with: $\forall x[x\in M \leftrightarrow \varphi(x)]$" is provable in $ZFC$.</li>
<li>The formula that states "There is a set $F$ with: $\forall x[x\in F \leftrightarrow \psi(x)]$" is provable in $ZFC$.</li>
... | Sure. Let $G$ be some undecidable sentence of ZFC, and let
$$ \begin{align}
\varphi(x) &\equiv x=\{42\} \\
\psi(x) &\equiv G \land x=\langle\{42\},42\rangle \end{align} $$
| Surely this is over simplistic, but this is an "obvious" example.
Take $\varphi(x)$ to be the predicate "$x$ is a non-empty set of finite ordinals", then $\sf ZF$ proves that there is some $M$ such that $\forall x(x\in M\leftrightarrow\varphi(x)$.
Take $\psi(x)$ to be the predicate "If $V=L$ holds, then $x=\langle y,... | https://math.stackexchange.com |
153,210 | [
"https://electronics.stackexchange.com/questions/153210",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/66294/"
] | I am trying to help my daughter with her science fair project of measuring efficiency of different types of household lighting in various heating conditions. Since she doesn't have the electronics experience I volunteered to make the current data logger.
In order to measure the current going into the light I am usin... | Your amplifier looks good in theory. Most likely the 741 and the low input signal is the culprit. The µA741 is a very old OpAmp. It was a good chip 40 years ago. These days you should only use them (if at all) for educational purposes. (They are really robust little chips that can take a lot of abuse, that's why they a... | Using just a diode won't work because the voltage is too small to overcome the 0.7V turn on voltage of a silicon diode. However you can combine the diode with the 741 op amp to make a precision diode which will operate at millivolt input levels because the turn on voltage of the diode is divided by the open loop gain ... | https://electronics.stackexchange.com |
238,029 | [
"https://physics.stackexchange.com/questions/238029",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1768/"
] | If an object lose energy when it emits light, does that energy come from the mass of the object?
Examples:<br>
Does a flashlight lose mass when it's turned on?<br>
Does a regular object (like a pencil or a piece of paper) lose mass when the environment is colder than the object?
If there is a loss of mass, what speci... | You are being misled by some of these answers and responses. It is perfectly fine to think of the internal energy of the flashlight as real mass. Of course the percent difference in mass between a charged and uncharged battery is tiny but in principle that mass works like any other.
If you want a rough classical pictu... | When an object radiates heat or energy (without supply from external source), it goes into a lower energy state. There are different way for that to happen. I will take one example - the pencil one.
Think the reverse first - what happens if temperature of pencil is raised say by 10 degrees. The molecules in the pencil... | https://physics.stackexchange.com |
188,696 | [
"https://softwareengineering.stackexchange.com/questions/188696",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/68683/"
] | I am programming in PHP and I have an include file that I have to, well, include, as part of my script. The include file is 400 MB, and it contains an array of objects which are nothing more than configuration settings for a larger project. Here is an example of the contents:
<pre><code>$obj = new obj();
$obj->... | There's not just the file. There's the parse tree that gets generated from parsing the file, the bytecode it gets compiled to, the memory taken up by the variables defined in it, etc. 6GB still sounds like a lot, but for a 650,000 line file it doesn't surprise me much.
At some point along the way, someone should pro... | File size is the size of the code that is executed.
Memory usage is the size of the contents of all the variables created by the execution of the code.
An algorithm computing <em>pi</em> may take less than 10 lines of code and need billions of bytes just to store the result.
| https://softwareengineering.stackexchange.com |
43,095 | [
"https://softwareengineering.stackexchange.com/questions/43095",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/15369/"
] | Did any of you use behavior driven development in your projects?
The concept and tools for it sound great. But was it easy to introduce and then stick to it? Did it lead to significant and visible positive results?
| Yes. Used it.
Yes. Stuck to it. It was easy. All behaviors were provided by examples. No narrative text "specifications". Actual examples with actual business rationale. Since users can do this, there are no intermediary business analysts.
Yes. Without it, some bunch of business analysts would still be writin... | It's pretty simple once you start doing it.
If you have any idea on what you want your program to do (high level, low level, whatever), formalize it into a test <em>before</em> you start writing code.
<code>'When I open the program I should see option X, Y, and Z'</code>
Formalize it into test code. Write the code. ... | https://softwareengineering.stackexchange.com |
2,102,993 | [
"https://math.stackexchange.com/questions/2102993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/352368/"
] | <strong>Question</strong>
if $f(x)+2f(\frac{1}{x})=2x^2$ what is $f(\sqrt{2})$
<em>My steps</em>
I tried to plug in $\sqrt{2}$ into the equation but that didn't get me anywhere because then i would have $2f(\frac{1}{\sqrt{2}})$ in the way. I was wondering on how to solve this equation?
| Hint: You're about half-way there. If you plug in $x=\sqrt{2}$, you get
$$
f(\sqrt{2})+2f\left(\frac{1}{\sqrt{2}}\right)=4.
$$
Now, if you plug in $x=\frac{1}{\sqrt{2}}$, then you get, instead
$$
f\left(\frac{1}{\sqrt{2}}\right)+2f(\sqrt{2})=1.
$$
You can use these two equations to solve for $f(\sqrt{2})$: in the seco... | If $f(x)+2f(\frac{1}{x})=2x^2$, then by substitution $f(\frac{1}{x})+2f(x)=\frac{2}{x^2}$ and so $f(\frac{1}{x})=\frac{2}{x^2}-2f(x)$. Substituting $f(\frac{1}{x})$ into the first equation yields $f(x)+2[\frac{2}{x^2}-2f(x)]=2x^2$. Solve for $f(x)$: $f(x)=\frac{2}{3}[\frac{2}{x^2}-x^2]$. So $f(\sqrt{2})=-\frac{2}{3}... | https://math.stackexchange.com |
469,008 | [
"https://electronics.stackexchange.com/questions/469008",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/111146/"
] | I'm trying to setup a Raspberry Pi to measure the position and speed of 8 DC motors that all have incremental quadrature encoders. At full speed (unloaded), each encoder ticks at 3.3 kHz. I assume that this means that I have to sample the encoders at >13.2 kHz to measure the position without missing any ticks. (Note: I... | GPUs are parallel processors. Their performance scales linearly with die size, while bigger dies can be run at lower clocks and so be more efficient while still being faster. Therefore, it makes sense to have the die as large as is economically feasible as it will be faster and more efficient.
CPUs have much less ... | It might have to do with exploitable parallelism and locality on typical use cases; and the fact that power consumption (thus heat) rises roughly with the square of the clock rates.
Typical CPU workloads on consumer PCs usually can not be spread evenly across all cores on a die, so visible (benchmarks, etc.) perform... | https://electronics.stackexchange.com |
9,745 | [
"https://mechanics.stackexchange.com/questions/9745",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/3766/"
] | As the title says, does the oil sump plug washer need to be replaced after every oil change, or can they be reused?
Background - my 2005 Daihatsu Copen needs an oil change every 3000 miles. I have always reused the washer in previous cars three times before replacing them, however these cars have far longer service in... | Replacing the washer depends on what the washer material is made out of. Most OEM parts are rubber based, so are both cheap and designed to be one use only.
There are also crush washers, which need to be replaced after every use.
There are a number of aftermarket (usually magnetic) sump plugs and washers - a large nu... | Personally I'm not seeing an issue with replacing the washer. This is a $.05 part. For my '08 Hyundai Azera, it comes with the filter I get from my Hyundai dealer. Does it really need replaced? Probably not, but the one time when it does need changed and you don't do it may be the difference between a $.05 part and a $... | https://mechanics.stackexchange.com |
152,223 | [
"https://softwareengineering.stackexchange.com/questions/152223",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20747/"
] | I'm working on a multi-player Android game (very simple it is that it doesn't have any game-engine used). The game is based on Java <code>Socket</code>. Four devices will connect the game server and a new thread will manage their session. The game server will server many such sessions (having 4 players each).
What I'm... | for testing the server you'll need to mock the clients (mock the input and output stream of the socket or the object that parses the input depending on what it easier)
the mocked clients are bots really that do some prearranged moves as they receive the moves of the other players (and send an error when they see somet... | You should ideally write your classes in such a way you can instantiate multiple clients in the same program instance, and mux the input/outputs accordingly... That's the best way to do this IMHO.
| https://softwareengineering.stackexchange.com |
9,765 | [
"https://physics.stackexchange.com/questions/9765",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/3514/"
] | I just recently finished a test on Physics, and when receiving my scores back I missed a question. Here's what it was if I can remember it correctly:
<blockquote>
Three resistors (10.0, 15.0, and 6.00 ohms) are parallel and the circuit is powered by 12.0V. How much current (in amps) is the 6.00 ohm resistor usin... | Think about this: the current through a certain circuit element represents the amount of charge that flows through that element per second. In a case like this, it's electrons that carry the current, so the amount of current is related to the amount of electrons that flow per second.
Now, you found that a total of $4\... | Only if the resistors are the same, they carry the same amount of current. Otherwise, the current is distributed according to the ratio of their resistances.
| https://physics.stackexchange.com |
152,836 | [
"https://math.stackexchange.com/questions/152836",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/24690/"
] | Well, I am always wrong in calculation of Radius of Convergence $R$ of a Power series. Would anyone help me to find this one? $\sum\limits_{n=0}^{\infty}a_nx^n$ where $a_0=0$ and $a_n= \sin(n!)/n!$, I guess $R\ge 1$, is it?
| We have, since $(x^2-y^2)^2\geq 0$, that $2x^2y^2\leq x^4+y^4$ hence $0\leq |f(x,y)|\leq \frac 12|x|$.
| You could take advantage of the fact that numerator and denominator are homogeneous polynomials to write the expression, as far as possible as a function of $y/x$ (or $x/y$): Divide both numerator and denominator by $x^4$ to get $$\frac{z}{1+z^4}\cdot y,\qquad z=\frac{y}{x}.$$
Now use ordinary single variable calculus ... | https://math.stackexchange.com |
24,832 | [
"https://physics.stackexchange.com/questions/24832",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/6627/"
] | With <strong>current technology</strong>, would the energy released by a matter-antimatter annihilation be more than the energy needed to created the antimatter in the first place? Would it be worth it? Just curious, even if was on a small scale, Could one produce a machine that uses annihilation to produce a net energ... | If you need to produce the antimatter from (e.g. electric) energy – e.g. antiprotons may be produced from collisions of proton pairs at the LHC (most of the initial, "invested" energy is the kinetic energy of the protons there) – then you're obviously not getting an economic source of energy because you're converting e... | To answer the question you asked (which is possibly not what you meant to ask):
<blockquote>
would the energy released by a matter-antimatter annihilation be more
than the energy needed to created the antimatter in the first place?
</blockquote>
No, because that would give you a perpetual motion machine. If annih... | https://physics.stackexchange.com |
54,656 | [
"https://security.stackexchange.com/questions/54656",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/17763/"
] | I am dealing with a multi-step form, and I need to pass information from step 1 to step 2, then from step 2 to step 3, and so on.
Step 1 contains a membership number and ID number entry, as well as another identifier (3 fields to complete to identify the visitor). At this moment I use RIJNDAEL encryption to encrypt th... | If you are using HTTPS, <strong>there is no reason to encrypt anything in your forms</strong>. This is because HTTPS is already encrypting all of your traffic. If you have a properly configured HTTPS connection between your server and the client, there is no way for an attacker to see the data being passed between the ... | HTTPS protects the data in transit in both direction between client and server from sniffing and tampering, so there is no need to encrypt them again, even not for passwords.
But maybe the intend of your question was different: From what I see your input spans multiple forms and you transfer the input from one form a... | https://security.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.