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 |
|---|---|---|---|---|---|
57,820 | [
"https://mathoverflow.net/questions/57820",
"https://mathoverflow.net",
"https://mathoverflow.net/users/-1/"
] | Since Euclid's axiomatization of space, we have developed a sophisticated mathematical model of space. Given a category of structures (measures), local space is modeled the spectrum of measurements that these structures can possibly make. Global space is construed as patches connected via transport, which identifies me... | In probability, time is usually handled as a nested sequence of $\sigma$-algebras (say $B_t$, with $B_t \subset B_s$ if $t\leq s$), and to find the reality (call the reality $f$, and it includes the state at all times past and future) at time $t$, one takes the conditional expectation $f_t := E[f | B_t ]$. The sequence... | The <em>thermal time hypothesis</em> (TTH) of Connes and Rovelli might be the sort of thing you're looking for.
By way of background, let $\mathcal{H}$ be a Hamiltonian. The thermal density matrix is $\omega = Z^{-1}\mbox{Tr}(e^{-\beta \mathcal{H}})$, and the time evolution of an observable $A$ is given as usual by $e... | https://mathoverflow.net |
321,667 | [
"https://physics.stackexchange.com/questions/321667",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/150063/"
] | What does my teacher mean when he says that all electromagnetic waves travel at the same speed when travelling through a vacuum? If you may, please answer as simple as possible.
| Electromagnetic waves include visible light, radio waves, X-rays, and so on. What distinguishes these different bands of light is their frequency (or wavelength). But what they all have in common is that they travel at the same speed in vacuum.
The reason for qualifying 'in vacuum' is because EM waves of different fre... | Assume you are walking down the road. You carry a little stick with you. Just for fun you decide to wiggle the stick rhythmically up and down at the rate of one up/down wiggle per second (you are a bit of an olympic expert at stick wiggling so it's very accurate and reliable). Your stick wiggling is at 1Hz. The speed a... | https://physics.stackexchange.com |
195,252 | [
"https://security.stackexchange.com/questions/195252",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/179495/"
] | Let's assume CAPTCHA is enabled with account lock out control (after five continuous failed attempts, the account will be locked for 15 min) on a system.
Is brute force still a probable threat?
| The protections you describe are good ones that you should consider, but there can still be weaknesses:
<ul>
<li>Many CAPTCHAS can be solved by robots, or you can easily pay people to solve them en masse for you (there are companies selling that service).</li>
<li>Account lock out is a good idea, but if you do it base... | Maybe.
it depends on how you define "brute force".
A lockout after X incorrect attempts is great for protecting an account where an attacker is going after a single target.
There's another scenario where the attacker has picked a few common passwords "password, password123, etc." And rather than attacking a single... | https://security.stackexchange.com |
128,946 | [
"https://mathoverflow.net/questions/128946",
"https://mathoverflow.net",
"https://mathoverflow.net/users/33492/"
] | <blockquote>
Let Bor(<span class="math-container">$X$</span>) = class of all borel subsets of <span class="math-container">$X$</span>. Cohen algebra is defined as Bor(X) modulo the ideal of meager sets.
</blockquote>
The Cohen algebra has a combinatorial : it is the unique atomless complete Boolean algebra with a count... | Regarding question $1$, it seems that you want to know whether
you've got the unique complete c.c.c. Boolean algebra with density
$\kappa$. The answer is no.
On the one hand, the forcing notion $\text{Add}(\omega,\omega_1)$
to add $\omega_1$ many Cohen reals is c.c.c. and has density
$\omega_1$. This is another way to... | There is a characterization of what you call a random algebra found in [1][Ch. 15. Sec 3]. This characterization involves the notion of a measure algebra.
We define a measure algebra to be a Boolean algebra $B$ along with a function $\mu:B\rightarrow[0,\infty)$ such that $\mu(a)=0$ if and only if $a=0$ and $\mu(\bigv... | https://mathoverflow.net |
51,559 | [
"https://physics.stackexchange.com/questions/51559",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/19925/"
] | We have a square loop (I believe it's called) in a uniform magnetic field between the 2 poles of a permanent magnetic field (green is N, red is S). P is connected to the positive pole of a voltage source and Q is connected to the negative pole (so there is a current):
<img src="https://i.stack.imgur.com/uUiEq.jpg" a... | The trouble is because you assumed that the final velocity of the small block is $\sqrt{2gh}$. This is true only if the wedge was stationary (in a frame of reference that <strong>is</strong> inertial), then what happens is that that the normal force from the wedge on the mass completely balances $mg\cos\alpha$, leaving... | $A =$ acceleration of $M$ to the left<br>
$a =$ acceleration on m down the incline<br>
$a'$ = acceleration of $m$ relative to $M$ along the incline<br>
N= normal reaction between block and plane
$PLANE -N sin(x) = -MA$<br>
$N = MA/sin(x)$
BLOCK: $F$ along incline: $mg sin(x)=m(a'-A cos(x))$<br>
$a' = g sin (x) + A ... | https://physics.stackexchange.com |
103,370 | [
"https://dba.stackexchange.com/questions/103370",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/10786/"
] | We have a "notes" table and some of the queries are getting very slow even though we're not searching on the note contents. We're wondering if moving the note content into a separate table would speed things up?
I wouldn't think separating the content would matter -- aren't TEXT fields essentially just pointers to som... | <strong>MyISAM only</strong> -- Normally a record is a continuous stream of bytes in the <code>.MYD</code> file. This includes <code>TEXT</code> and <code>BLOB</code> columns. An index has a byte offset (or record number) to point into the .MYD file.
After row(s) have been <code>DELETEd</code>, there can be holes in... | In MyISAM records are stored in blocks. There are like 20 different block types, some of can be really large. Those are used for BLOB/TEXT values. I never saw that MyISAM record stores a pointer to a BLOB (but I would not insist).
In InnoDB BLOB/TEXT values are also a part of the record and stored in-page as long as t... | https://dba.stackexchange.com |
255,253 | [
"https://softwareengineering.stackexchange.com/questions/255253",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/112367/"
] | I'm developing a system to handle sending transactional emails to our customers. This is how it works:
<ol>
<li>An event occurs during the order's life cycle, for example 'shipped' </li>
<li>This event will trigger the creation of an email in the database (email queue) </li>
<li>A separate windows service is polling ... | In this case I would serilize the objects needed to pass to the web service and store them in the database. The two services should operate as independently from one another as they can. Serialization of the complete "driving" objects will allow you to update and adjust the mailer without having to update and adjust th... | Record the values at the point of triggering and pass those to the emailer. Then the email's content will be consistent.
To expand on your example - an order enters the state 'shipped' and an email is queued. Before the email is send the customer cancels. The order is now in state 'cancelled'. Now the email is sen... | https://softwareengineering.stackexchange.com |
98,488 | [
"https://security.stackexchange.com/questions/98488",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/79415/"
] | If unencrypted FTP over the public internet is the only file transfer option for a particular situation, what security concerns are applicable assuming:
<ul>
<li>The data being transferred is strongly encrypted by whatever / whoever is creating the files</li>
<li>IP-restriction is in place at the firewall level so onl... | It's hard to say what your definition of "OK" is, but generally, I'd say, no, you're not ok with your current setup. I'll cover your points individually.
<ul>
<li><em>The data being transferred is strongly encrypted.</em> This is good. In other words, you could put the file with a download link up on a public website.... | I have a similar set-up, a whitelisted linux ftp server, receiving an encrypted file in the clear, and have asked similar questions.
For one, I have it set up as anonymous, since what is the point of a login in the clear? Second, it is whitelisted, so the only theoretical vulnerability is IP spoofing.
I read up on IP... | https://security.stackexchange.com |
46,358 | [
"https://mathoverflow.net/questions/46358",
"https://mathoverflow.net",
"https://mathoverflow.net/users/9246/"
] | Assume that $G$ is a semi-simple linear algebraic group defined over $\mathbb{Q}$, which is $\mathbb{Q}$-simple, and that $G(\mathbb(R)$ is non-compact, without $\mathbb{R}$-factors of rank 1. Then by Margulis's works, the arithmetic subgroups of $G(\mathbb{R})$ are the same as discrete lattice in $G(\mathbb{R})$. He... | Arbitrary Zariski-dense subgroups in a semisimple group can be very small from a real-analytic point of view. It seems that algebra cannot distinguish between "small" and "large" Zariski-dense subgroups, so most criteria to distinguish between the two have a strong non-algebraic flavour. (Of course one can also charact... | an arithmetic subgroup is a lattice. This is in characteristic zero due to Borel and Raghunathan (MR0147566) and in positive characteristic due to Harder and Behr.
| https://mathoverflow.net |
386,668 | [
"https://softwareengineering.stackexchange.com/questions/386668",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/327797/"
] | I have been programming my classes in the following mode. I create a public function that has a call to a private function that has all the logic and functionality. Something like:
<pre><code>public class MyClass
{
public string DoStuff()
{
return ActuallyDoStuff();
}
private string ActuallyDo... | <blockquote>
This way if I had to change some functionality I didn't need to change it everywhere, just in one place.
Now I'm instinctively doing the same with public functions in my classes but the more I think about it the more I think this is unnecessary.
</blockquote>
If your public method only contains <strong>one... | As it is, this practice serves no purpose. It could make sense if you have many external commands that actually perform the same internal action, but even then I wouldn't write my class that way preemptively.
| https://softwareengineering.stackexchange.com |
342,965 | [
"https://mathoverflow.net/questions/342965",
"https://mathoverflow.net",
"https://mathoverflow.net/users/125074/"
] | Let <span class="math-container">$\alpha \in \mathbb{C}$</span> be a zero of a monic irreducible polynomial <span class="math-container">$f \in \mathbb{Z}[X]$</span>. Define <span class="math-container">$K = \mathbb{Q}[\alpha]$</span> and <span class="math-container">$A := \mathbb{Z}[\alpha]$</span>, then <span class="... | <span class="math-container">$\newcommand{\Z}{\mathbb{Z}}$</span>No.
It is easier to construct a counter-example by starting from the local case.
Let <span class="math-container">$f\in\Z_p[X]$</span> be monic irreducible of degree <span class="math-container">$e>1$</span> such that <span class="math-container">$F ... | As pointed out by @KConrad and utilized by @Aurel, my claim can be disproved by considering primes <span class="math-container">$p$</span> ramified in <span class="math-container">$K$</span> and dividing <span class="math-container">$[O_K : \mathbb{Z}[\alpha]]$</span>. Finally, let us use this observation (and SageMath... | https://mathoverflow.net |
89,456 | [
"https://stats.stackexchange.com/questions/89456",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/10760/"
] | I made 100 measurements of a certain quantity, calculated mean and standard deviation (with MySQL), and got mean=0.58, SD=0.34.
The std seemed too high relative to the mean, so I made 1000 measurements. This time I got mean=0.572, SD=0.33.
I got frustrated by the high standard deviation, so I made 10,000 measurements... | The standard deviation is a measurement of the "spread" of your data. The analogy I like to use is target shooting. If you're an accurate shooter, your shots cluster very tightly around the bullseye (small standard deviation). If you're not accurate, they are more spread out (large standard deviation).
Some data is... | <em>This question seems trivial to statisticians, but I managed to make this mistake twice, and after a colleague of mine also made the same mistake, I decided to write the answer, in order to help myself and other people making the same mistake.</em>
<strong>The standard deviation does <em>not</em> become lower when ... | https://stats.stackexchange.com |
458,306 | [
"https://math.stackexchange.com/questions/458306",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/63087/"
] | How do I prove that the following graph is a non-Hamiltonian cycle?
$\hspace{5.3cm}$<img src="https://i.stack.imgur.com/Z57P2.png" alt="enter image description here">
I'm asked to create a graph which is both non-Eulerian and non-Hamiltonian, and this is what I produced in TiKz. My approach is the following:
<hr>
<... | I agree. Your graph is neither Eulerian nor has it a Hamiltonian cycle (By the way, you should check your wording, a graph is either non-Hamiltionian or has no Hamiltonian cycles, but being a non-Hamiltonian cycle implies that the graph is a cycle itself)
Are you sure, that there is no other condition on your graph? (... | This seems generally O.K. However, I do have two remarks.
First, "graph is a non-Hamiltonian cycle" would mean that "graph is a cycle (which is almost meaningless in itself), but not Hamiltonian". It would be better to say that the "graph doesn't have a Hamiltonian cycle".
Second, since a cycle goes around, you can a... | https://math.stackexchange.com |
151,103 | [
"https://softwareengineering.stackexchange.com/questions/151103",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/55565/"
] | Many web sites when you registering an account present you with a form where you put in your details such as name and other profile data. One of the fields without a change is email address. It seems that there are quite a lot of web sites that double this field up. They have email address field and then re-type your e... | You may use copy/paste to save typing the e-mail address twice but in doing so you are defeating the object of the repeated entry.
Many e-mail addresses are long and as such are prone to entry error as you type. I have had addresses with the domains @freeserve.co.uk, @virginmedia.co.uk and @emsglobaltracking.com all ... | Your e-mail may be needed if it serves as a login, if the website will send a confirmation link to it, or for advertisement purposes. In that case, it's important that you type it right, which is why you will be asked to type it twice.
| https://softwareengineering.stackexchange.com |
214,323 | [
"https://stats.stackexchange.com/questions/214323",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/115241/"
] | I don't fully understand why choosing proper initial centroids is very important for K-means. Demos or simple explanations will be very grateful. Thank you !
| The algorithm may find a <em>suboptimal</em> solution when the centers are chosen badly. Google for "k-means local minimum example" and you will likely find some examples.
There is no feasible way to guarantee finding the optimal solution (NP hard, too expensive), so you need heuristics.
But one of the most effective... | There are many different algorithms for solving the K-means problem. The most common one is called Lloyd's algorithm. The K-means problem itself is NP-hard, so any algorithm with a runtime that's practically usable will only give a locally optimal solution. The fact that we'll converge to a local minimum is what makes ... | https://stats.stackexchange.com |
154,480 | [
"https://electronics.stackexchange.com/questions/154480",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/66884/"
] | I am looking at this PCB I've got and these pads look terrible. It works, but this sure doesn't look right. What can I use to clean it up?
<img src="https://i.stack.imgur.com/wEMJR.jpg" alt="enter image description here" />
| I never buy commercial flux remover, which would likely help you with your problem, rather I go down to a local discount beauty supplies emporium and buy a bottle of acetone and a bottle of alcohol (not the drinking kind) and mix in equal parts.
Use a squeeze bottle for easy application of your brew.
| I would start with alcohol and a stiff brush, clean up the excess with some qtips. If that doesn't work you could try some of this, best to spray it outside though.
<img src="https://i.stack.imgur.com/UXFSp.jpg" alt="enter image description here">
| https://electronics.stackexchange.com |
194,615 | [
"https://softwareengineering.stackexchange.com/questions/194615",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/87930/"
] | I'm developing a WordPress theme and am planning to sell it myself. I was thinking of having a 14- or 30-day refund policy for customers, but my concern is that people can essentially get the theme for free, if they: 1) buy it, 2) download the files, and then 3) request a refund. Then they would have both the theme and... | With small <code>n</code> Big O it is just about useless and it's the hidden constants or even actual implementation that will more likely be the deciding factor for which algorithm is better. This is why most sorting functions in standard libraries will switch to a faster insertion sort for those last 5 elements. The ... | What's important isn't the value that O bounds but the rate of growth of the value that O bounds. This is where Calculus comes in.
If you take the derivative of log(n) for instance, you get 1/n as the rate of change. This means that the time taken by a log(n) algorithm grows as a rate of 1/n meaning that as you add mo... | https://softwareengineering.stackexchange.com |
24,423 | [
"https://physics.stackexchange.com/questions/24423",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/188/"
] | In quantum field theory or condensed matter physics, the fermionic one-loop diagram gives rise to the polarization tensor
$$ Π^{µν} = Tr[ γ^µ G γ^ν G ] $$
If we couple the electrons to an electromagnetic field, we can integrate out the electrons again and obtain an effective action for the electromagnetic f... | In the case of quantum field theory:
First of all for a massless gauge field the most general form of the effective action will contain the renormalizable term
$ \mathcal{L} = -\frac{1}{4 g^2} F^{\mu \nu} F_{\mu \nu} $.
This follows simply from Lorentz Invariance (indices must be contracted properly essentially) an... | You are correct Greg. The restriction $\Pi_{\mu\nu}q_\nu = 0$ comes from requiring that the Lagrangian only changes by a total derivative on a gauge transformation. The only other symmetry we can generally expect in condensed matter is time reversal symmetry which adds nothing of interest. So your condition more or les... | https://physics.stackexchange.com |
637,969 | [
"https://physics.stackexchange.com/questions/637969",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/266713/"
] | This is a question from SL Arora, so don't bash me. My initial thoughts were "Number of Field lines? well it should be infinity, You can draw how much ever field lines you want" However the author went on to say
<blockquote>
Number of lines of force originating from a charge of 1 Coulomb = Electric flux throu... | I really can't make any sense of the references you have given, especially not seeing them in context. However, it is important to realize that electric field lines are only a pictorial tool used to visualize and analyze electric fields qualitatively (not quantitatively) as opposed to a physical entity.
The primary use... | No, the number of field lines cannot be determined by the electric flux as it cannot be quantified and is also physically meaningless. The number only has a meaning when measured relatively. A simple counterexample to this statement:
<blockquote>
Number of lines of force originating from a charge of 1 Coulomb = Electri... | https://physics.stackexchange.com |
11,835 | [
"https://physics.stackexchange.com/questions/11835",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/4263/"
] | I have been reading the 1st chapter of Landau & Lifshitz <em>Mechanics,</em> and due to its concise style been facing a few problems. I hope you can help me out here somehow.
<ol>
<li>Does the "homogeneity of space and time" essentially talk about the invariance of the Lagrangian with co-ordinate system or time in... | <strong>1.</strong> Yes it is about invariance with respect to time and space translations: $t\to t+t_0$ and $\vec{r}\to\vec{r}+\vec{r}_0$
<strong>2.</strong> I see no <em>fundamental</em> problen in introducing the time dependence of the potential energy. But it would mean that the way our particles interact with ... | The answer of Kostya gives the insights very well. However I would like to add that your first and second points are quite related. When you assume that time is homogenous you find the law of the conservation of energy. Now if the Lagrangian depended directly on time the Energy Conservation would be violated. A simple ... | https://physics.stackexchange.com |
105,884 | [
"https://math.stackexchange.com/questions/105884",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/24239/"
] | So i have to evaluate this sum:
$\displaystyle \frac{1-2^{-2}+4^{-2}-5^{-2}+7^{-2}-8^{-2}+10^{-2}-11^{-2}+\cdots}{1+2^{-2}-4^{-2}-5^{-2}+7^{-2}+8^{-2}-10^{-2}-11^{-2}+\cdots}$
it has the form :
$\displaystyle \frac{\sum^{\infty}_0 [(3n+1)^{-2}-(3n+2)^{-2}]}{\sum^{\infty}_0 (-1)^n[(3n+1)^{-2}+(3n+2)^{-2}]}$
My current... | Let
$$\begin{align*}
\mathrm{Li}_2(z) & = \sum_{n=1}^{\infty} \frac{z^n}{n^2}, \\
\mathrm{Cl}_2(\theta) & = \sum_{n=1}^{\infty} \frac{\sin n\theta}{n^2} = \Im \left[ \mathrm{Li}_2(e^{i\theta}) \right].
\end{align*}$$
be dilogarithm and Clausen function, respectively. Then it is easy to see that the expressio... | First, let $A = 1-\frac{1}{2^2} + \frac{1}{4^2}-\frac{1}{5^2}+... $ and $B = 1 +\frac{1}{2^2}-\frac{1}{4^2}-\frac{1}{5^2}+... $<br>
Notice that the both A and B converges absolutely (by comparison test). Thus, limit law applies: $B-A=2\times\frac{1}{2^2}-2\times\frac{1}{4^2}-2\times\frac{1}{8^2}-2\times\frac{1}{10^2}+... | https://math.stackexchange.com |
114,256 | [
"https://mathoverflow.net/questions/114256",
"https://mathoverflow.net",
"https://mathoverflow.net/users/36572/"
] | I want to know the smoothness of convex set in <span class="math-container">${\bf R}^n$</span>.
Recall the following definition.
Definition : <span class="math-container">$X$</span> is a bounded closed convex set in <span class="math-container">${\bf R}^n$</span> if for <span class="math-container">$x$</span>, <sp... | <ol>
<li>Yes. The boundary even has a locally finite Haudsorff $(m-1)$-measure.</li>
<li>No. A convex function of 1 variable has increasing derivative, but this derivative can have a
dense set of jumps. </li>
</ol>
In general, the function describing the boundary is only Lipschitz (and differentiable almost
everywhere... | In fact one can say quite a lot of regularity of the boundary of a convex set.
Assume that <span class="math-container">$X\subset\mathbb{R}^n$</span> is a bounded convex set with non-empty interior.
<ol>
<li>Convex functions are locally Lipschitz and therefore the boundary of a convex set is locally a graph of a Lipsch... | https://mathoverflow.net |
2,195,030 | [
"https://math.stackexchange.com/questions/2195030",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/361774/"
] | Suppose I have an interval that looks like this:
$\left[\frac{k}{\lfloor m \rfloor }, \frac{k}{\lfloor mr \rfloor}\right)$
$m$ and $r$ are positive real numbers, but are constants in this problem.
Here is the question:
Which integer values of $k$ make this interval include at least one integer?
I have tried variou... | Let $n$ be the enclosed integer. Assuming $p=\lfloor m\rfloor>q=\lfloor mr\rfloor$, we have
$$\frac kp\le n<\frac kq$$ so that
$$nq<k\le np$$ for all positive $n$.
<hr>
These intervals go growing with $n$ and start touching when
$$np>(n+1)q$$ or
$$n(p-q)>q.$$
When this condition is met, every $k&... | You can think of this graphically. Consider the graphs of the functions
$f(x) = \frac{1}{\lfloor m\rfloor} x$
and $g(x) = \frac{1}{\lfloor mr\rfloor} x$
in a Cartesian plane with horizontal coordinate $x.$
Now consider all of the points with integer coordinates that lie on or above
the graph of $f(x)$ but below the gra... | https://math.stackexchange.com |
5,520 | [
"https://scicomp.stackexchange.com/questions/5520",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/3892/"
] | I'm trying to test a simple 1D Poisson solver to show that a finite difference method converges with $\mathcal{O}(h^2)$ and that using a deferred correction for the input function yields a convergence with $\mathcal{O}(h^4)$.
So, the equation is $ - u'' = f $ with boundary conditions $u(0) = u(1) = 0$. The method I'm... | Your formulation of $A$ assumes that $u_0$ and $u_{n+1}$ are zero, which is correct. However, you are then including your boundaries at $u_1$ and $u_n$. Your exact answer satisfies these later BC's but not the imposed BC's in $A$. These discontinuities floating around cause you to lose your higher order accuracy. To... | For defect correction you will need a 4th-order discretization. Let $A_2 u = f_2$ be your second-order discretization and let $A_4 u = f_4 $ be a 4th-order discretization. Defect corrections then become
\begin{equation}
A_2 u^{(0)} = f_2 \\
A_2 u^{(k)} = f_4 - A_4 u^{(k-1)} + A_2 u^{(k-1)} \quad k=1,2,...
\end{equation... | https://scicomp.stackexchange.com |
554,413 | [
"https://physics.stackexchange.com/questions/554413",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/204775/"
] | This is from A.P. French Special Relativity book, Chapter 3 (page 78)
Setup of the proof: <span class="math-container">$S$</span> and <span class="math-container">$S'$</span> be inertial reference frame. <span class="math-container">$S'$</span> move to the right with respect to <span class="math-container">$S$</span> ... | Without loss of generality, let's assume <span class="math-container">$v$</span> is positive. From the viewpoint of the S' frame, the S frame is moving to the left with velocity <span class="math-container">$v$</span>. (Equivalently, S moves to the right with velocity <span class="math-container">$-v$</span>). Now, if ... | <span class="math-container">$b$</span> has to have the dimension of a velocity to be consistent. When the reference frame <span class="math-container">$S$</span> looks at the reference frame <span class="math-container">$S^\prime$</span>, he sees it has moving to the right with velocity <span class="math-container">$+... | https://physics.stackexchange.com |
208,170 | [
"https://dba.stackexchange.com/questions/208170",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/-1/"
] | I've got the following working,
<pre><code>SELECT info1, info2
FROM TableA
WHERE id IN (SELECT xid
FROM TableB
WHERE userid=3 AND active=1)
</code></pre>
which works fine, but in <code>TableB</code> I also have a <code>team</code> column which I'd like to select and return in the... | This is what <code>JOIN</code>s are for:
<pre><code>SELECT A.info1,
A.info2,
B.team
FROM TableA A
INNER JOIN TableB B
ON A.id = B.xid
WHERE B.userid = 3
AND B.active=1
;
</code></pre>
| You can JOIN both tables in this way:
<pre><code>SELECT a.info1, a.info2, b.team
FROM TableA a
JOIN TableB b
ON a.id = b.xid
WHERE b.userid = 3
AND b.active = 1;
</code></pre>
| https://dba.stackexchange.com |
35,429 | [
"https://chemistry.stackexchange.com/questions/35429",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/19378/"
] | Why does $\ce{NH3+}$ have a higher $-\ce{I}$ effect ( inductive effect) than $\ce{NO2}$ even though oxygen is more electronegative? Does it have something to do with positive charge on $\ce{N}$?
| The short answer is that $\ce{NH3+}$ is a cation, and any cation will always draw electrons towards it stronger than any neutral species.
The electronegativity of the species involved is only a secondary cause. However, one can safely say that $\ce{NH2}$, if nitrogen’s lone pair is (somehow) impeded from excersizing i... | The inductive effect which you are talking about must be from the most common order given for strength of -I.
Here what you are missing is that its not $\ce{NH3+}$ but its - $\ce{NH3+}$ or $\ce{R-NH3+}$.
What I mean to say is some alkyl or aryl group will be attached to it.
Coming to your Question, -I, means that th... | https://chemistry.stackexchange.com |
98,955 | [
"https://physics.stackexchange.com/questions/98955",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/28118/"
] | <blockquote>
At equilibrium, the electric field at and just at the surface of the conductor must be perpendicular to the surface. If it were not, it would have a component parallel to the conductor's surface and would exert a force on the surface charge causing them to move and violating our assumption that the condu... | If you break the electric field lines you've drawn into components parallel to the surface and components perpendicular to the surface, you'll find a net field pointing to the left. That means positive charges would feel a force to the left, and since this is a conductor, they're free to move, and so they move to the l... | Dfg, you have not drawn an equilibrium electric field and the charges will move. We can decompose the field you drew into two parts -- the perpendicular part, and the horizontal part. This horizontal part pushes the charges to the left.
You are confused about the field lines not intersecting the surface. In this case... | https://physics.stackexchange.com |
398,931 | [
"https://softwareengineering.stackexchange.com/questions/398931",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/56170/"
] | I raised an issue at my employer concerning our gigantic heaps of testing logs.
I raised the issue because I was spending well over a minute to find the relevant logs and stack-trace.
I stated we should change the logging level of tests to either warning or error. Not debug or info which they currently are.
Two of my... | <blockquote>
I don't want to see entire debug logs of successful tests. I want to see the logs of failing tests and errors.
</blockquote>
Yup. <strong>This.</strong> Different test runners will handle this differently. But, it sounds like you're running on the CLI. So, I think ideally you'd want to see this:
<pre><... | Debug logs for successful tests are quite useless, that should be pretty obvious.
But in case a test fails, a full log may be helpful for finding the root cause of certain kinds of bugs, sometimes even more helpful than a debugger. So if your tests as default would only produce a minimal log, this leads to the questio... | https://softwareengineering.stackexchange.com |
568,974 | [
"https://stats.stackexchange.com/questions/568974",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/353804/"
] | I have a dataset from which I am taking a set of descriptive statistics as follows:
The value measured is productivity of a firm for each of the group at different quantile (I use Stata command: table group_var, c(p10 p25 p50... ).
The below is repeated for two subsets of the main data (I have two sets of descriptive s... | You can do this using quantile regression.
The code below does the single quantile case. It
<ol>
<li>estimates the q90 price for foreign and domestic cars with various repair records. Here origin is like your two cities and repair record is like your groups.</li>
<li>calculates the statistics within each origin <span c... | Instead of making quantiles, use the Kolmogorov-Smirnov test.
| https://stats.stackexchange.com |
113,637 | [
"https://softwareengineering.stackexchange.com/questions/113637",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/38417/"
] | Had a conversation with someone about adding some initialization code on application startup and he complained about that causing an increasing in the startup time. He couldn't really state a reason (gut feeling or something, don't know). This is not a heavy use application and starts in about a minute or so, we deploy... | It can be a big factor during development: if your platform does not support changing code in a running application, then the startup time becomes part of your feedback cycle, and there, even 30 seconds are painful and a threat to productivity.
For the production environment, it really does not matter; either a little... | I believe this is the case when Hegel's famous dialectical principle of transition from quantity to quality actually works.
You see, timing always is important. I agree with Michael Borgwardt's words about importance of quick build during development/testing, but I insist that (may be in some other way) it is also ver... | https://softwareengineering.stackexchange.com |
116,791 | [
"https://electronics.stackexchange.com/questions/116791",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/27499/"
] | What are the reasons of this undesired effect:
I have a PIC with RTC (Real time clock) connected to an external 32.768kHz crystal for auto-calibration (according to PIC Manual handbook). The crystal is also connected with two 12.5pF capacitors (to ground).
Just after start up of the PIC, the flow of the time given by... | SOLVED!<br>
Thanks to all the answer above, they have given me ideas to try different attempts; first changing to smaller ( according comment from Olin and Tut) and bigger ( according comments from placeholder and EM Fields) capacitors but all attempts without success ( so many desoldering and soldering in a small pla... | 22 pF sounds really high for a small 33 kHz watch crystal. This excessive capacitance is probably causing the PIC and crystal to oscillate at some sub-harmonic. But the loop gain is low and the oscillator is unstable. A little jolt when you touch it causes it to jump to the intended frequency.
This is a good exampl... | https://electronics.stackexchange.com |
319,085 | [
"https://stats.stackexchange.com/questions/319085",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/94980/"
] | I'm an experimental physicist by training and have used standard statistical methods to analyze data, and the design of experiments (DOE) framework to develop models of systems by varying inputs and measurement outputs.
Recently, I've been looking into the use of machine learning and I'm trying to figure if there's any... | Your question is difficult to answer because there is no "supervised ML algorithm". There are a large number of different ML algorithms that can be optimized in a supervised fashion, each with their strengths and weaknesses.
On a very abstract level, you can define Machine Learning (ML) as a search through some space ... | Substitute "supervised ML" with "regression analysis", and you'll see that your question is difficult to answer. Depending on how narrowly you define regression analysis, DOE could be part of the term.
Suppose, you're planning to use regression analysis to determine efficiency of a certain herbicide in the field. One... | https://stats.stackexchange.com |
155,242 | [
"https://security.stackexchange.com/questions/155242",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/99808/"
] | I recently installed a custom CA certificate from a trusted authority to access some blocked resources. Android popped up with a message "The network can be monitored"
This made me question what can be monitored and would it have any impact in other private networks I connect to.I also connect to a trusted wifi to acc... | As you have given a list of information you would like to protect from your ISP, I will try to give you some hints:
<ul>
<li>browsing history:
Your browser is normally not provided by your ISP, so if you consistently apply security patches, it should not be able to access it from your browser - I would not be as sure... | Try considering options such as a VPN. When you connect your device to the VPN, <b> ALL</b> the traffic is first encrypted on your machine and the sent to the VPN server, so the ISP can only see VPN traffic and nothing else.
Suppose you buy VPN from XXXX company, and you use VPN all the time to connect to the web, in... | https://security.stackexchange.com |
187,341 | [
"https://stats.stackexchange.com/questions/187341",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/73728/"
] | When performing Gaussian process regression, the variance at a prediction point is given by
$\operatorname{var}[f_*] = k(x_*,x_*) - k_*^T(K+\sigma_n^2I)^{-1}k_*$ (Equation 2.26 from GPML)
Basic statistical intuition tells me that this value should always be positive, but I can't figure out how to prove that.
| Covariance matrices are the variance times correlation (a value that ranges between 0 and 1). I won't prove the general case now as I just woke up, but let's do a 2D case, then $k_*^T(K + \sigma_n^2I)^{-1})k_* = \sigma_*\rho\sigma(\sigma^2 + \sigma_n^2)^{-1}\sigma\rho\sigma_* \lt \sigma_*^2\rho^2 \lt \sigma_*^2 = k(x_*... | One might argue that you do not need to use your intuition or proof anything to conclude that the expression is positive since it is the variance of a random normal variable. If you believed the prior proof no further analysis were necessary.
But it is possible to rewrite the variance expression in a way that the reaso... | https://stats.stackexchange.com |
55,574 | [
"https://quant.stackexchange.com/questions/55574",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/35658/"
] | Hi All: I've started reading "volatility trading" by Euan Sinclair and it's a very nice book. It's not so theoretical but instead focuses on the practicalities when dealing with trading options. I've never worked in options ( so just understand the basics from textbooks such as cox and rubinstein, baxter renn... | Note: what you call <em>true</em> volatility is often termed <em>realized</em> volatility.
When you purchase a call or a put, each time the underlying increases in value, your hedge modification consists of selling a little bit. When it drops in value, you buy a little bit. Those buy-low/sell-high elements are a <em>... | The implied volatility is not G_d given, but comes from the collective judgement of market participants. If you are right and the market is wrong (unlikely in my personal experience but perhaps true for you) then you can make money when you are proven right by future developments (i.e. by future realized volatility be... | https://quant.stackexchange.com |
87,386 | [
"https://electronics.stackexchange.com/questions/87386",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13393/"
] | I'm trying to configure Timer1 of a pic24h to 1ms per timer tick but don't seem to be able to get the math to match my results.
I have a 20MHz external oscillator (with a 1M resistor in parallel for stability) and think I have it enabled with the following configuration bits set in code:
<pre><code>#pragma config FNO... | Two things to recognize:
<ol>
<li>the timer is an upcounter that interrupts on overflows at which
point you should reload the start of the upcounter.</li>
<li>the frequency is the output of the PLL if you have one configured</li>
</ol>
<blockquote>
<pre><code>= (f_osc / 4)^-1 * prescaler * (65535 - TMR1)
= (16MHz / 4... | The timer0 its a 16bits timer, so tu set to interrupt every 1 second you need set:
<strong>- Prescaler @ 128</strong>
<strong>- TMR0 Preload @ 26474</strong>
The equation:
\$ T= \left(\left({1 \over Fosc}\right)\times4\right)\times Presc\times\left(Resolution - Preload\right) \$
Where:
<ul>
<li>T = Period = 1s</... | https://electronics.stackexchange.com |
172,979 | [
"https://electronics.stackexchange.com/questions/172979",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/76537/"
] | I have seen many zero ohm resistors which says that maximum resistance is say 50 mOhm. But, the maximum current rating will be only 1 amps. 0603 package. Power rating they mention as 1/8 watt. Can anybody comment on this differing I^2 * R and power rating?
Edit: My purpose of question is to clarify doubt in a datashee... | If a transistor had a max voltage rating of 100 volts and a max current rating of 10 amps, it doesn't mean it has a max power rating of 1000 watts - the max ratings supplied in the data sheet are extremes and not to be used in partnership with other extremes to forge some hyper-extreme max value.
If the max current is... | Very likely if you exceed the spec power rating, the heating causes a rise in temperature which leads to a rise in resistance and thus higher power dissipation. So much more like the filament of a light bulb rather than a 'linear' resistor.
The resistance is linear over a limited and specified range but when you push... | https://electronics.stackexchange.com |
183,997 | [
"https://softwareengineering.stackexchange.com/questions/183997",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/31673/"
] | I'm currently writing a library of helper functions to produce some repetitive markup. I have a reference to the markup the functions should produce, but I'm curious about how I should go about unit testing this?
There are a lot of unit tests needed to get full coverage of the number of different variations of output ... | What I might consider is decomposing the logic that generates the markup into smaller units, which you can test in more granular fashion. It really sounds like you're describing more of a conceptual integration test -- "here's a scheme for generating big hunk of markup that I want to generate and I'm testing that it's... | You could parse the generated mark-up and make sure that the structure/content matches what should result from the arguments that you passed in when you ran the method.
It seems like this could be used evaluate all the different variations somewhat programatically (depending on how much your markup changes for differe... | https://softwareengineering.stackexchange.com |
11,664 | [
"https://dba.stackexchange.com/questions/11664",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/16668/"
] | I have table that holds from very basic info. Just a title and a few date fields.
There's one field called <em>comments</em> which is varchar(4000)
Most of the time we leave it blank, but some times will enter a large amount of data here.
Is this a really bad design? Or is this just slightly inefficient?
<em>I would a... | For more predictable performance (and to avoid having high variation of rows per page), I would lean to storing this data in a related table - especially if it is only populated a small percentage of the time, and especially if it is only retrieved in some of the queries. The rows where this value is <code>NULL</code> ... | I think a separate table would be better to improve page density and reduce fragmentation, especially if you don't always populate that field.
<ul>
<li>A data page holds around <strong>8000 bytes</strong></li>
<li>You have some rows with say 100 bytes and some rows with over 4000 bytes</li>
<li>Those long rows will be... | https://dba.stackexchange.com |
382,201 | [
"https://physics.stackexchange.com/questions/382201",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/182720/"
] | I am confused with using newton's third law in electromagnetism problems which includes Lorentz transformation.
In what conditions does this law holds?
for example, if there is an infinite charged plate that moves in the +x direction with speed V1, and a charge q that moves in the -x direction with speed V2, and we wan... | Newton's Third Law has some tricky subtleties in electrodynamics. This is because Newton's Third Law is really a statement about momentum conservation of a closed system: if $\vec{F}_{12} = - \vec{F}_{21}$ in an isolated two-particle system, then $\dot{\vec{p}}_1 = - \dot{\vec{p}}_2$ and so the total momentum is a co... | You can use Newton's laws as long as speeds are non-relativistic ($v \ll c$, where $c$ is the speed of light). The full relativistic corrections will be of order $v/c$ and higher powers. For instance, if you use Newton's third law and then Lorentz transform to another frame, then in the new frame Newton's third law won... | https://physics.stackexchange.com |
74,635 | [
"https://softwareengineering.stackexchange.com/questions/74635",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/9803/"
] | I've recently learnt regular expressions and I love writing / using them. I'm looking for ideas and more opportunities to use them, however I don't want to overuse them as an all purpose tool, as often warned by people.
What kind of things should I use regular expressions for, and where should I not use them? (Apart f... | Where they shine is where you have a definition for a string that is well defined and straightforward, so you can both (a) verify that a piece of input matches the pattern and (b) extract all the parts of the pattern from that input, in a single regex operation.
For instance, just the other day I needed to deal with c... | Most string matching tasks can benefit from regular expressions. When you stop calling it matching and start calling it parsing, regular expressions aren't so helpful. Usually that's because people tend to call it parsing when it involves nesting or other recursion that regular expressions can't handle.
Probably the... | https://softwareengineering.stackexchange.com |
17,566 | [
"https://electronics.stackexchange.com/questions/17566",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/5186/"
] | I've got an assignment to design a 8-bit stack machine I was wondering if this would work:
<img src="https://i.stack.imgur.com/udLk6.png" alt="8bit Stack Machine Image">
My problem is this i'm not too sure if this design will work, i've hardly found any designs on a zero adress machine and the ones I have found have h... | If I read stevenvh correctly, his solution entails having an addressable data space, albeit one 'hidden' from the usual load/store kinds of access. From a hardware standpoint, a data address leaves the CPU, goes to an external RAM, and a data bus transfers data to/from the CPU, indistinguishable from a traditional load... | <em>Note: this was the answer I wanted to post before you edited the question. I hope I interpreted the question rightly. The editing doesn't make it more clear to me, however.</em>
Do you want the stack in common RAM, or a (limited) separate stack?<br>
If it's RAM-based you need an stack pointer pointing to the las... | https://electronics.stackexchange.com |
193,654 | [
"https://physics.stackexchange.com/questions/193654",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/58401/"
] | In classical determinism we need to know $2n$ quantities of our system and the equation of motion to predict it's future. In Lagrangian mechanics this is equivalent to knowing $q$ and $\dot q$, the generalised coordinate and the generalised velocity. However if we knew the acceleration $\ddot q$ would this be enough?
... | Observe that, knowing $\ddot{q}$, to get $\dot{q}$ and then $q$ you have to integrate twice. This introduces $2n$ integration constants you have to know to fully describe the system, which is the same amount of freedom you get when solving the Euler-Lagrange equations, where you need initial conditions for $q$ and $\do... | I'd like to point out that knowing $2n$ quantities and the equations of motion are not enough to determine the solution. Even at the level of $L=T-U$ for just one particle ($n=1$).
Consider $T=\frac{1}{2}m\left(\frac{dx}{dt}\right)^2,$ and $U=-C\frac {9m}{2}x^{4/3}.$ Then, for your equations of motion, you get $m\frac... | https://physics.stackexchange.com |
30,473 | [
"https://security.stackexchange.com/questions/30473",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/16239/"
] | When companies package binary executables, they are often encrypted, compressed, scrambled, and otherwise made so that your lazy hacker can't simply open the program up in Notepad++ and see the code.
In all the ones I've looked at, however, they each have some critical code components which are unencrypted, uncompress... | Ultimately, the CPU runs the code. And the CPU expects instructions in "clear text". You could envision some application code where a small initial part of the executable first decrypts the rest of the code, but this has several issues:
<ul>
<li>This forces all the code to go to RAM instead of staying on disk and be l... | You are talking of two different components. One is the <em>loader</em>, which is not human-readable but must be machine-readable (therefore unencrypted) in order to be executed. And this <em>has</em> to be this way, as you say: otherwise you'd get a chunk of unexecutable data.
Several other "plaintext components" may... | https://security.stackexchange.com |
436,622 | [
"https://physics.stackexchange.com/questions/436622",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/204351/"
] | Given that I have some coefficient(i.e. a number) which is to be determined from a radial integral:
<span class="math-container">$$b_{n00} = \frac{(2\pi)^{1/4}}{\sigma^{3/2}} \frac{1}{\sqrt{3}} [C(000|000)]^2 \int^{\infty}_{r = 0} \frac{1}{(a_0)^{3/2}} \frac{2}{n^2}\sqrt{\frac{1}{n}} L^{1}_{n-1}\left(\frac{2r}{na_0}\r... | The integral <span class="math-container">$\int r^2 dr$</span> has the dimensions of a volume, <span class="math-container">$[L]^3$</span>. This will cancel out the <span class="math-container">$\frac{1}{[L]^3}$</span> that you have correctly pointed out above. Thus, your coefficients are indeed dimensionless!
| Just a tip, regarding the dimension analysis of radial integrals: because there's a natural length scale <span class="math-container">$a_0$</span>, it's often convenient to nondimensionalise with the substitution <span class="math-container">$u=\frac{r}{a_0}$</span>, which should reduce any remaining dependence on <spa... | https://physics.stackexchange.com |
1,937 | [
"https://mathoverflow.net/questions/1937",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2/"
] | Let pi: \bar{M<sub>g,1</sub>} \to \bar{M_g} be natural projection of compactified moduli stacks of curves and let omega be the relative dualizing sheaf. Then the Hodge class \lambda of \bar{M_g} is the first chern class of the pushforward \pi_*(ω). Among other things the hodge class, together with the boundary di... | Some multiple of lambda is defined on the coarse moduli space and this is the pullback of an ample bundle on \bar{A_g}, the Satake-Baily-Borel compactification of A_g. Since \bar{M_g} maps birationally onto its image in \bar{A_g}, it follows that lambda is nef and big, in fact also semi-ample (some multiple is base poi... | For nef you can do the following: Take a map from some Hurwitz scheme to \bar{Mg}. Then any test curve in \bar{Mg} pulls to one in the Hurwitz scheme. You now compute the integral of the hodge class on the pullback of this test curve using Grothendieck-Riemann-Roch on the surface lying over the test curve.
I'm not sur... | https://mathoverflow.net |
342,029 | [
"https://mathoverflow.net/questions/342029",
"https://mathoverflow.net",
"https://mathoverflow.net/users/142627/"
] | It is well known that for a matrix <span class="math-container">$A$</span> in <span class="math-container">$\mathfrak{sl}_n(\mathbb{C})$</span>, we have the following equivalence:
<span class="math-container">$$\dim Z(A) \text{ is minimal} \leftrightarrow A \text{ is cyclic}$$</span>
where <span class="math-container">... | I just found a counter-example for <span class="math-container">$\mathfrak{sl}_3$</span>.
Take <span class="math-container">$A= \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$</span> and
<span class="math-container">$B = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0... | Edit: I've just realised that I didn't read your post properly. I took "<span class="math-container">$Z(A, B)$</span> is cyclic" to mean that the subalgebra generated by <span class="math-container">$A$</span>, <span class="math-container">$B$</span>, is a cyclic <span class="math-container">$k$</span>-algebra, i.e. is... | https://mathoverflow.net |
752,424 | [
"https://physics.stackexchange.com/questions/752424",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/206213/"
] | The Schwarzschild solution could simply be expressed as
<span class="math-container">$$ds^2=-(1-2GM/r)dt^2+(1-2GM/r)^{-1}dr^2+r^2d\phi^2 \; .$$</span>
Is it possible that we could obtained a new metric into the form as
<span class="math-container">$$ds^2=-(1-2GM/r)^{-1}dt^2+(1-2GM/r)dr^2+r^2d\phi^2 \; ?$$</span>
If pos... | In the beginning of section 24.3 of Schwarz, the <em>assumption</em> is that you have some one-particle state <span class="math-container">$|\Psi\rangle$</span> with mass <span class="math-container">$m_\Psi$</span> in your theory. But, unstable particles aren't actually one-particle states, they are not eigenstates of... | A resonance (i.e. an <em>unstable</em> particle) does not correspond to an asymptotic state in the strict sense. It will show up in the correlation functions of the asymptotic fields (associated with the asymptotic states of the theory) as a pole in the complex plane shifted away from the real axis. On the other hand, ... | https://physics.stackexchange.com |
187,477 | [
"https://security.stackexchange.com/questions/187477",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/179926/"
] | Using nmap I try to scan a server as a result I get multiple open ports.
For example when I try to scan <code>domain.com</code> as a result:
<pre><code>7/tcp open echo
9/tcp open discard
13/tcp open daytime
21/tcp filtered ftp
22/tcp filtered ssh
23/tcp open telnet
25/tcp open smtp
26/tcp open rsftp
37/tcp open time
5... | There are a lot of misunderstandings and assumptions in your question, but I will try to address them.
First, you are scanning a domain (I assume from the Internet). Just because nmap shows them as <code>open</code> does not mean that they actually are. There are a lot of devices in between you and the domain that cou... | Not surely:
<ul>
<li>It may be possible that actually there is a complex network of physical or virtual machines behind a gateway, with correctly separated privileges and protected from each other.</li>
<li>It is also possible that actually you've found some "trap system", which has many open ports, but instead of giv... | https://security.stackexchange.com |
100,297 | [
"https://softwareengineering.stackexchange.com/questions/100297",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/24028/"
] | We are outsourcing a development to a small team of offshore developers. Our in house process for code review is manual, paper based, based on a waterfall model requiring "big bang" delivery. It cannot be changed. Past experience is these devs are proficient and reliable, however come time to deliver, the overhead of ... | Frameworks that have their own replacements for standard library types usually do so because they are also compatible with platforms that do not have a good standard library implementation (such as phones and other embedded systems).
Boost is a special case - it is often practically considered part of the standard lib... | Always use Standard containers and types where possible. Reinvented containers and types only exist because the libraries in question pre-date Standardisation.
| https://softwareengineering.stackexchange.com |
223,069 | [
"https://dba.stackexchange.com/questions/223069",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/165416/"
] | <pre><code>select *
from orders o
WHERE EXISTS
(
select 1
from orders o2
where o2.EmployeeID = o.EmployeeID
AND YEAR(o2.OrderDate) = 1997
and MONTH(o2.OrderDate) = 9
AND DAY(o2.OrderDate) = 5
)
</code></pre>
I expect to receive only two records in result instead of 228.
As you can see this i... | There are two orders with an <code>orderdate=1997-09-05</code>. One for employee=4 and one for employee=7. Now, for employee=4, there are 156 rows on the order table and for employee=7, there are 72 rows on the order table. That totals to 228. Your query is returning all orders where the employeeid matches those tw... | Seems like you are using two tables based on this code: o2.EmployeeID = o.EmployeeID.
you need to use JOIN for you to be able to get the correct data.
| https://dba.stackexchange.com |
382,136 | [
"https://softwareengineering.stackexchange.com/questions/382136",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/204600/"
] | I'm working on implementing my first clean architecture and CQRS application, I've stumbled across a bit of logic that's leaving me a bit stumped. I'm working on integrating authorization and authentication into my application, but I'm having some trouble trying to figure out how to architect a portion of my applicatio... | Looks to me like your issue is:
<em>I have a thread acting on behalf of a user. I don't wish to pollute my nice clean business logic with authorisation details. But my data store needs authorisation details to enforce control of the data.</em>
From your description it sounds pretty critical that User A does/does not ... | Create <code>IPermissionValidator</code> that you inject from command's constructor using dependency injection.
When you need to check permissions for <code>CreateProduct</code> you call <code>_permissionValidator.ValidateCreateProduct(command.ParentProductId);</code>. If user doesn't have permission it will throw exce... | https://softwareengineering.stackexchange.com |
177,328 | [
"https://security.stackexchange.com/questions/177328",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/138069/"
] | I have n secrets to hide, my goal is to remember only a seed and derive them from the seed. Is this a safe aproach?
Calculate n keys:
<pre><code>k(1) = seed XOR secret(1)
...
k(n) = seed XOR secret(n)
</code></pre>
Store these keys in an apllication, asking the user for a seed and compute the secrets using XOR.
The... | This is unlikely to be secure for a number of reasons. Primarily XOR is only secure for a one time pad - you are reusing the key (your "seed" is the key here).
If a party knows any individual secret they can calculate the seed - and hence read all others. I.e. secret([known]) XOR [knownValue] yields seed. This entirel... | It is recommended to go through the logic of the encryption algorithm used. The algorithm won't keep in mind the structure of the file that has to be encrypted.
For example XOR'ing a file that contains:
<ul>
<li>0x00 bytes as padding will convert this part to the key itself .</li>
<li>the key itself in bytecode will ... | https://security.stackexchange.com |
598,066 | [
"https://math.stackexchange.com/questions/598066",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/29601/"
] | Let $A: D(A) \subset \mathcal{H} \to \mathcal{H}$ be a densely defined operator on a Hilbert space $\mathcal{H}$ with adjoint operator $A^{*}$. Given that $D(A) = D(A^{*})$ I'm trying to show that the spectrum $\sigma(A)$ is a subset of the closure of the numerical range of A: $N(A)=\{ \langle x, Ax \rangle \vert \|x\|... | $S$ must be a subspace of some vector space $V$. Say dimension of $V$ be $n$. Then dimension of $S^{\perp}$ is $n-\dim S$. Then the dimension of $(S^{\perp})^{\perp}$ is same as the dimension of $S$. Moreover it is obvious that $S\subseteq (S^{\perp})^{\perp}$. Hence we are done.
| $$
\text{Let } \vec{x} \in (S^\perp)^\perp\subseteq S\\
\Rightarrow x = \vec{u} + \vec{v} \text{ for some } \vec{u} \in S, \vec{v} \in S^\perp\\
\langle\vec{x},\vec{v}\rangle = 0\\
\Rightarrow \langle\vec{u}+\vec{v}, \vec{v}\rangle = 0\\
\Rightarrow \langle\vec{u}, \vec{v}\rangle+\langle\vec{v},\vec{v}\rangle = 0\\
\Ri... | https://math.stackexchange.com |
47,148 | [
"https://softwareengineering.stackexchange.com/questions/47148",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/17060/"
] | Probably it is necessary to have an actual device. But I'd rather not have to buy a phone with a contract. Is that possible?
| The WP7 "emulator" in VS 2010 is not just an Emulator, it's a virtual OS identical (MS words, not mine) to the one on the phone. In theory when you develop in VS 2010 is should be no different than a physical device (GPS and such are handled a little differently of course). All the other phone development environment... | All you need is a suitable Windows PC - the dev kit including Visual Studio Express, a phone specific version of Expression Blend and and the phone emulator (which runs as a virtual machine) can be downloaded for free.
Once you have an application and want to test on real hardware you'll need to sign up to get access ... | https://softwareengineering.stackexchange.com |
1,853,361 | [
"https://math.stackexchange.com/questions/1853361",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/188265/"
] | I am reading about stochastic process, but could not make sense if one equation I encountered. Can anyone help me understand it?
The equation states that suppose R(s) is an interest rate process, then the discount process is $D(t)=e^{- \int_0^t R(s)ds} $.
Suppose R(t)=W(t) is a simple Brownian motion, what does $\int... | Since Brownian Motion has continuous paths with probability 1 thus$\int_{0}^{t} W_s ds$ is well define. Now set $f(x)=x^3$. By application of Ito's lemma, we have
$$f(W_t)=f(W_0)+\int_{0}^{t}f'(W_s)dW_s+\frac{1}{2}\int_{0}^{t}f''(W_s)ds$$
$$W^3(t)=3\int_{0}^{t}W^2_s\,dW_s+3\int_{0}^{t}W_sds$$
therefore
$$\int_{0}^{t}W_... | There are two types of integrals involving Brownian motion, time integral and itos integral. Here the integral is a time integral, which is just an ordinary Lebesgue integral. The integral itself is also a random variable as it depends on the path of brownian motion.
The interpretation and properties of a time integr... | https://math.stackexchange.com |
265,141 | [
"https://electronics.stackexchange.com/questions/265141",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/126863/"
] | Capacitors are used for storing energy, then discharging electricity. My question is, What is the process of making a charged capacitor discharge it's voltage? Hoping that my understanding isn't flawed, to charge it you connect it to a dc source. If I'm planning to make electronics though, that understanding probably w... | When you say "discharge electricity", what do you think this stuff is being discharged? Energy is going in, and you are getting what out?
Capacitors do store energy, and they also <em>release energy</em>. There are many kinds of energy, so what kind is in a capacitor? It's electric potential energy, stored or released... | Capacitor stores energy to its electric field (E), which occurs as a voltage between two points (or plates). This means that charge or some electrons are located on one of the plate and other plate is missing electrons.
Discharging this energy means that E field is discharged as electrons (current) flows out of plate ... | https://electronics.stackexchange.com |
13,151 | [
"https://dba.stackexchange.com/questions/13151",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/6967/"
] | Can you let me know why a transaction log would be a lot smaller in size after restoring from a full backup. Currently we have a massive log file on the live server, but after a restore to a test / development server the log file is considerably smaller. Im guessing this is because the log was truncated as part of th... | <blockquote>
but after a restore to a test / development server the log file is considerably smaller
</blockquote>
Because when you're creating a full backup you're creating a backup of the data (as it is physically and as it is materialized from the log). Restoring it somewhere else restores it as data, not log.
<... | A full database backup contains almost no transactions - just the transactions that happened while the FULL transaction log was being created.
The LDF file created when a database is restored using a full database backup is almost empty, regardless its size. It should be inflated (with no data but active portion of tra... | https://dba.stackexchange.com |
16,787 | [
"https://dsp.stackexchange.com/questions/16787",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/7914/"
] | I have several Images of shape H, F, I, L.. which have curved corners. How do I process them to give sharp right-angled corners? I tried approximating them with inner rectangles, but this takes a LOT of time.. How do I proceed with it?
This is the sample Image. I want to process it such that I get rid of rounded corn... | here's how houghLinesP would look like. Not a solution yet, but maybe you can work with that:
<pre><code> int main()
{
cv::Mat image = cv::imread("SharpenCorners.jpg");
cv::imshow("image", image);
cv::Mat gray;
cv::cvtColor(image,gray,CV_BGR2GRAY);
cv::imshow("gray", ... | It is easy to find the contour for each character. You can analyze the contour to find the points at the corners. Using one line to connect two adjacent points can produce right angle corners.
| https://dsp.stackexchange.com |
689,531 | [
"https://physics.stackexchange.com/questions/689531",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/97176/"
] | If I use a solenoid of <span class="math-container">$ h = 0.1\, \mathrm{m}$</span>, with a current of <span class="math-container">$ I = 30\, \mathrm{A}$</span> , with <span class="math-container">$62$</span> turns and an iron core of permeability <span class="math-container">$\mu = 0.25$</span>, then it will give me a... | Your value of the permeability is not realistic. The real magnetic permeability of iron is complicated and depends on the geometry, the crystal structure, the purity, and the history of a particular sample. A typical value of the <em>relative</em> permeability for good everyday iron would be <span class="math-contain... | Another issue is that this equation seems to assume same permeability through the whole space. But solenoid's core is not closed, not a loop, magnetic flux has to go out in empty space on the outside of the coil. So effective permeability will be (much?) less than permeability of the core material.
| https://physics.stackexchange.com |
112,145 | [
"https://cs.stackexchange.com/questions/112145",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/107892/"
] | I am studying Quantum error correction that is based on some aspects on classical error correction.
I am reading some very basics around linear error correcting codes.
I consider a linear code [n,k]: thus it encodes k bits of information into n bits.
<strong>My question: I don't understand why the parity check matri... | You can have as many rows in <span class="math-container">$H$</span> as you like, but they will be linearly dependent after you reach <span class="math-container">$n-k$</span> independent rows. You can apply the rank-nullity theorem. If you like, think of the rank of <span class="math-container">$H$</span> as the num... | If you have <code>k</code> input bits and <code>n</code> output bits, you need to compute only <code>n-k</code> extra bits, so the matrix should be <code>k * (n-k)</code>. You multiply the input vector by the matrix and get the extra bits vector.
| https://cs.stackexchange.com |
51,427 | [
"https://cs.stackexchange.com/questions/51427",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/35938/"
] | A definition for terminals and non-terminals of a CFG says that
<blockquote>
terminals: The symbols that do not appear at the LHS of productions.
</blockquote>
Therefore,
<strong>Are all non-terminals of the CFG given by the LHS of productions?</strong>
| Given the definition you appear to be using, yes. There are only two types of symbols in a CFG, so this definition provides a dichotomy. This implicit defintion of CFGs, where the productions are provided and the terminals and non-terminals are inferred from the productions, is common in programming language circles (o... | No. Not all non-terminals necessarily appear at the LHS of productions, that is, not every non-terminal must have productions for it.
Of course, such non-terminals are rather useless and can be removed from the grammar without changing the language. Also the dual is actually possible: there might be terminal symbols t... | https://cs.stackexchange.com |
1,100,349 | [
"https://math.stackexchange.com/questions/1100349",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/207185/"
] | I'm studying for my exam of Logic later this week and I came across this question:
<blockquote>
Suppose that $\mathscr{F} \subseteq\mathcal P(X)$ and $\mathscr{G} \subseteq \mathcal P(X)$ so that every element of $\mathscr{F}$ a subset is of every element of $\mathscr{G}$. Then applies $\bigcup\mathscr{F} \subseteq ... | Let <span class="math-container">$x \in \bigcup \mathscr{F}$</span>. Then there exists some <span class="math-container">$A \in \mathscr{F}$</span> such that <span class="math-container">$x \in A$</span>.
Let <span class="math-container">$B$</span> be any set from <span class="math-container">$\mathscr{G}$</span>. By... | <strong>HINT:</strong> Show that $\bigcup\scr F$ is a subset of every element of $\scr G$, then conclude it is a subset of $\bigcap\scr G$. Remember that taking a union (or intersections) of subsets of some $A$, will result in a subset of $A$.
| https://math.stackexchange.com |
392,568 | [
"https://softwareengineering.stackexchange.com/questions/392568",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/337510/"
] | For me, I prefer having all my variables, not as pointers. Is it ok to keep all heap-allocated variables dereferenced?
For example:
<pre><code>#include "Foo.hpp"
#include "Bar.hpp"
class Foo {
private:
Bar* ptr = new Bar();
};
</code></pre>
Would it be ok to have Bar as a dereferenced pointer, without causing <str... | <blockquote>
For me, I prefer having all my variables, not as pointers.
</blockquote>
That's a good goal. If you are able to use C++11 or higher, that should be achievable for almost all use cases. The containers from the standard library and smart pointers make that possible. There will be exceptions but they shoul... | You really need to learn the language. The first example doesn't compile. The second example, if Bar b is declared in a context where it compiles, allocates and constructs an object on the heap, then uses assignment to assign a copy in a local variable, and leaks the object on the heap.
You are not "keeping a pointer... | https://softwareengineering.stackexchange.com |
10,692 | [
"https://electronics.stackexchange.com/questions/10692",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/-1/"
] | So I've been learning AVR assembly in my own time, I rather like it and I understand registers/counters and such.
But the problem is...most of the websites I read online/tutorials don't really talk about actually using them with stuff like Servo's/Motors/LEDs/etc
They more talk about just doing I guess math/logic, bu... | Altium is currently single-threaded, so a quad-core will not benefit you much.
I've heard Altium talk about multi-threading in the future, but at this point, I'd say go for a really fast dual-core over a slower quad-core.
| Recommended System Requirements "Intel® Core™2 Duo/Quad 2.66GHz (or faster) processor or equivalent" If your laptop isn't that fast, I would be concerned regardless of the issue you mention.
| https://electronics.stackexchange.com |
211,155 | [
"https://physics.stackexchange.com/questions/211155",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/94761/"
] | I have been given the potential of a simple harmonic oscillator:
$$V=\frac{1}{2}kx^{2}$$
I want to calculate the value $x(t)$ of a particle moving in this potential, with initial conditions $x(t=0)=0$ and $v(t=0)=v_{0}$. How would I go about doing this in simple classical mechanics?
Should I be using Hooke's law and... | <strong>Getting the equation</strong>
<ol>
<li><em>Using Newton's second law:</em></li>
</ol>
$$
ma_x \equiv m\ddot{x}=F_x=-\frac{\mathrm{d}V}{\mathrm{d}x}=-kx
$$
$$
\ddot{x}+\frac{k}{m}x=0
$$
<ol start="2">
<li><em>Using lagrangian formulation:</em></li>
</ol>
$$
L=T-V=\frac{1}{2}m\dot{x}^2-\frac{1}{2}kx^2
$$
th... | With given potential you can define force acting on your oscillator as $$F = - \dfrac{dV}{dx} = -kx$$
This gives you Hooks law (no surprise). Than just use Newton's second law:
$$ma = -kx$$
Than create second order differential equation replacing $a$ with $\ddot{x}$ and solve it with your initial conditions.
| https://physics.stackexchange.com |
363,254 | [
"https://electronics.stackexchange.com/questions/363254",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/115281/"
] | I am trying to power 5 servo motors from a 5v 7805 regulator with decoupling capacitors. The source is a 9.6v rc battery. Since the servos require 5v I am trying to get 5v to them from the battery hence the regulator but in practice only 3 servos can function at one time and are still causing the regulator to get incre... | There are two entirely different questions here.
First, is it possible to drive more servos using 7805s? And how to keep the regulators from getting hot?
Yup. Use one 7805 per servo, and buy some heat sinks. I've seen 5 volt, 75 amp power supplies which used linear regulators. With really hefty heat sinks and forced ... | As you have used the word "regulator" in "causing the regulator to get incredibly hot", rather than the word "heatsink" this leaves open the possibilty that you just have a regulator IC with no heatsink.
If this is the case, yes it will get incredibly hot. a 7805 should be bolted to a heatsink. i.e. a piece of alumini... | https://electronics.stackexchange.com |
26,665 | [
"https://mechanics.stackexchange.com/questions/26665",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/3988/"
] | A few days ago I tried doing an " tune up" on my car. It had just a transmission fluid replacement(with synthetic fluid) and had a couple of solenoids replaced. I had an oil change less than a month ago (with synthetic fluids as well).I decided to push the car a little bit to see if it will be ok. I made a wide open th... | More than likely the smell you encountered is just some residual fluid which was spilled during the fluid change. Considering you migrated from (assuming) standard transmission fluid to synthetic, extra steps would have been involved in getting it swapped over. With that in mind, it could very easily have gotten on an ... | use the ATF-MV (M5) fluid. This is the only fluid that your transmission can take (It is written on the dipstick). Aside from that, If you want to preserver your transmission for the long run, avoid common mistakes such as flooring the car in Neutral and then shifting to D etc. Avoid also hard shifts. Also, change the ... | https://mechanics.stackexchange.com |
3,531,997 | [
"https://math.stackexchange.com/questions/3531997",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/714079/"
] | I was reading a calculus book, and at some point the following standard limit was mentioned:
<span class="math-container">$$\lim_{n\to\infty}\left(1+\frac1n\right)^n=e$$</span>
Afterwards, the author of this book invited the reader to try and compute, using a calculator, the value of the expression
<span class="math-co... | Not exactly.
<span class="math-container">$\dfrac1n$</span> can be represented in floating-point for huge values of <span class="math-container">$n$</span>; <span class="math-container">$\dfrac1n=10^{-12}$</span> is not at all a problem. This is because the float uses an exponent, so that its order of magnitude can va... | Your theory is the only one that actually happens in the real world, where all machines have finite precision and cannot represent numbers sufficiently close to <span class="math-container">$1$</span>, like <span class="math-container">$1+1/n$</span>. There is no other plausible explanation for why the computed express... | https://math.stackexchange.com |
13,758 | [
"https://bioinformatics.stackexchange.com/questions/13758",
"https://bioinformatics.stackexchange.com",
"https://bioinformatics.stackexchange.com/users/9120/"
] | I currently am using this code to remove duplicate sequences from the fasta file. However, I would also like to write a new file with only the removed duplicates as well as a count for how many times they appear. Please let me know if you have any suggestions, I am hoping to keep it written in one py file, but I am not... | <strong>Edit: user @RamRS has a more robust answer for actually using this. Please use that. Leaving answer up as OP appears to be interested in implementing as a learning activity.</strong>
<strong>Please let us know why this is not doing what you intend.</strong>
I haven't checked it, but something like this would wo... | Please do not reinvent the wheel - <code>seqkit rmdup</code> does what you want.
From the website:
<hr />
<h1>rmdup</h1>
<h2>Usage</h2>
<pre><code>remove duplicated sequences by id/name/sequence
Usage:
seqkit rmdup [flags]
Flags:
-n, --by-name by full name instead of just id
-s, --by-seq ... | https://bioinformatics.stackexchange.com |
121,712 | [
"https://physics.stackexchange.com/questions/121712",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/51836/"
] | Here's my reasoning... time dilation due to velocity: t'=t√(1-v^2) v expressed as a % of the speed of light. If you are moving through distance at the speed of light, to an observer at rest relative to you, zero time has elapsed. So if you are at complete rest (no particle movement at all) is infinite time elapsing to... | Your reasoning seems to be that because $\frac{t}{\sqrt{1-v^2}}\to \infty$ when $v\to 1$, it must be the case that $\frac{t}{\sqrt{1-v^2}}\to 0$ as $v\to 0$. But in fact when $v=0$ we have
$$
\frac{t}{\sqrt{1-v^2}} = \frac{t}{\sqrt{1-0^2}} = \frac{t}{\sqrt{1}} = \frac{t}{{1}} = t.
$$
So time does not pass infinitely ra... | There seems to be some confusion. First of all, there is no such thing as a concept of absolute or "complete" rest. Everything is moving in a different inertial frame. Second, time dilation works the other way around from what you described. You would be more likely to witness the end of the universe if you were travel... | https://physics.stackexchange.com |
324,969 | [
"https://electronics.stackexchange.com/questions/324969",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/38261/"
] | I am designing a system which has a lot of wires. These pass power, communications (RS422), ethernet and even analogue video (NTSC,PAL). Now, these wires meander all over the place. One of the wires was an SPI wire that was about 25-30 cm long and was sending a clock of approx 8MHz or so. Now, the communication was fai... | You need to connect the Output from the sensor to pin 10 of the processor board then also connect one end the resistor to the same pin 10.
The other end of the resistor should connect to +5V(VCC), such as pin 4.
It is called a pull-up because it pulls the signal pin up to 5v when the source isn't driving it low.
Som... | The description of the sensor that you quote indicates, if I read it correctly, that the sensor output has an internal pull-up resistor (inside the sensor), so you should not need to add another pull-up resistor at the Arduino input.
A link to the sensor datasheet would help to clarify things...
| https://electronics.stackexchange.com |
165,439 | [
"https://dba.stackexchange.com/questions/165439",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/116768/"
] | I've got a database running on a SQL-Server 2012 DBMS. Consider that the server running SQL Server is not part of the network domain.
When I execute this sql command
<pre><code>ALTER DATABASE myDatabase SET TRUSTWORTHY ON;
</code></pre>
a service broker queue (early setted and working) receives messages but the activ... | Within each database there exists a <code>dbo</code> User. This User (Database-level) always exists, but the SID (Security IDentifier) that it maps to is not always the same; it will map to whatever Login (Instance-level) is specified either when creating the Database of when altered to have a new "Database Owner". The... | This can happen when you restore a database that was created on another server, and the database owner login account doesn't exist or has a different SID on the server you restored to.<br>
Choose a login that you are comfortable with owning the database, and execute this:
<pre><code>ALTER AUTHORIZATION ON DATABASE:: [... | https://dba.stackexchange.com |
242,762 | [
"https://softwareengineering.stackexchange.com/questions/242762",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/129506/"
] | This is not the usual "I don't want to write code during an interview", in this question the assumption is that
<ul>
<li>I need to write code during an interview (think about the level of rewriting the quicksort or mergesort from scratch)</li>
<li>I know how the algorithm work or I have a basic idea of how I should st... | As a copyright holder you can license the code any which way you want, again and again and again. You could license it as GPL, and then have a client ask for a license for the MS-Pl for one of their projects, and then license it again under BSD...
You, the copyright holder, always have the power to decide to release ... | Yes, the license says what other people can do to the code not what you (the copyright holder) can.
Of course GPL does not prevent a corporation from using code - or even distributing code, however they may want to license under a different license to prevent their code needing to be GPL
| https://softwareengineering.stackexchange.com |
452,626 | [
"https://electronics.stackexchange.com/questions/452626",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/228629/"
] | I am designing a motor system that has to run in a vacuum chamber (sub mbar). I am a little bit worried about the heat that would not dissipate at all in the vacuum. Therefore, I want the least amount of energy wasted to heat(high efficiency). Some people advised me to get a big motor that is much more capable so that ... | Assuming ideal diodes, for <span class="math-container">\$V_{in} \lt 0\$</span> this is an inverting op amp with gain <span class="math-container">\$\frac{R_3}{R_1}\$</span>, and <span class="math-container">\$R_2\$</span> keeps the non inverting input from floating. For <span class="math-container">\$V_{in} \gt 0\$<... | The opamp circuit is a full wave rectifier with some level of noise rejection when the input peak amplitude starts to fall below about 0.6 volts. Positive voltages are amplified by D2 (D1 is blocking) and negative voltages are amplified and inverted via D1 (D2 is now blocking). R2 is needed to bias the non-inverting op... | https://electronics.stackexchange.com |
91,687 | [
"https://stats.stackexchange.com/questions/91687",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/42698/"
] | <img src="https://i.stack.imgur.com/0jywZ.png" alt="enter image description here">
I am trying to fit a model for the values plotted above. The explanatory variable represents amounts of compensation claim in an earthquake, and the response variable represents amounts of compensation awarded. Can someone tell me what ... | Looks like a fairly linear relation to me. I would just start with a linear regression and inspect the residuals to see if I need to do any more, e.g. do something with the outlier claimed $\approx$ 7.5 milion, awarded $\approx$ 1 milion.
| The relationship looks linear so you might consider a linear regression of received on claimed.
But I think you are going to have a problem with the distribution of residuals. There is almost a ceiling effect (very few people get more than they claim) and thus, if the residuals have 0 mean they probably won't be nor... | https://stats.stackexchange.com |
58,782 | [
"https://dba.stackexchange.com/questions/58782",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/7869/"
] | So I have this table in <code>SQL Server 2008</code>. Let's just say it's called <code>TimeSheets</code>.
Now, that table has two columns I am concerned with.
<code>TimeSheetDate</code> and <code>UserCustomerKey</code>.
<code>TimeSheetDate</code> is a <code>DateTime</code> column and <code>UserCustomerKey</co... | If a single column is used by a query for filtering, it can use an index if the that column is the left-most column in the index.
So assuming the TimeSheetDate is the left-most column in your index, you don't need to create another index for it.
Whether or not you should create another index in a reversed order is de... | First of all, since I assume the timesheet dates are rising, not falling, you should replace the
<pre><code>TimeSheetDate (DESC)
UserCustomerKey (ASC)
</code></pre>
with
<pre><code>TimeSheetDate (ASC)
UserCustomerKey (ASC)
</code></pre>
This is important! Through the <code>DESC</code> you basically force SQL Serve... | https://dba.stackexchange.com |
68,521 | [
"https://cs.stackexchange.com/questions/68521",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/64460/"
] | Can anyone here give an example of DFA or NFA <strong>real time application</strong>?
And, can I know what are <strong>complexity and decidability problems</strong> in real time application? Does every real time application have <strong>complexity and decidability problems</strong>?
| Let's analyze the runtime. In each iteration of the loop we look for the maximum weight node. If you do this naively, you look at all nodes. By using a clever data structure you could speed this up. Adding the node to S takes constant time for all reasonable set data structures. Now we remove $v_i$ and its neighbors. T... | The running time of adding a vertex to the independent set $S$ is $O(1)$ if you use an appropriate set data structure, such as a linked list, an array, or a dictionary. Also, deleting a vertex $v$ from $G$ (once you have identified the vertex) takes time proportional to the number of neighbours, which, in this case, is... | https://cs.stackexchange.com |
5,911 | [
"https://physics.stackexchange.com/questions/5911",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/119/"
] | Suppose we have a lens with known focal length and are using the thin lens approximation. Is it possible to determine how an arbitrary beam of light will be deflected by it? Or, is it the case that there are multiple kinds of thin lenses, and so more information is required. I'm asking this question just so I can solve... | The subject you are looking for is called "the ABCD matrix method," "Matrix Paraxial Optics," "Matrix Ray Tracing," or some variation of that.
A thin lens is represented by a 2x2 matrix and the incident ray is a 2 element vector. Computing the height and angle of the outbound ray is a simple matrix multiplication.
| Okay, I've got an idea. I would have liked to draw a diagram, but my graphics software is playing up at the moment. First find where the light ray, <code>R</code>, crosses the axis of symmetry of the lens - call this <code>X</code>. Using the paraxial ray approximation: <code>1\s+1\s'=1/f</code> where <code>s</code> is... | https://physics.stackexchange.com |
497,036 | [
"https://stats.stackexchange.com/questions/497036",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/265673/"
] | I have troubles understanding the concept of degrees of freedom, especially in the case of the covariance. In the case of the standard deviation I think I understand why I have to devide the quatratic sum of the differences to the mean by (n-1). There is one degree less since I have to estimate the expected value. In t... | The "degrees of freedom" argument is esoteric and only useful as a vague argument in the first chapter of a statistic text book because the actual reason cannot yet be explained to beginners. Unfortunately, this "explanation" leads to more confusion than plainly admitting that the beginner cannot ye... | Recall the error propagation formula for the addition and subtraction
operations:
<span class="math-container">$s[x+y]^2 = s[x]^2 + s[y]^2 + 2 s[x,y]$</span>
and
<span class="math-container">$s[x-y]^2 = s[x]^2 + s[y]^2 - 2 s[x,y]$</span>
Therefore:
<span class="math-container">$s[x+y]^2 - s[x-y]^2 = 4 s[x,y]$</span>
Ex... | https://stats.stackexchange.com |
93,670 | [
"https://physics.stackexchange.com/questions/93670",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/25814/"
] | <strong>Note:</strong> Both diagrams are 2d(they might look 3d because I drew them manually.)
I have a prismatic frame that looks like this:<img src="https://i.stack.imgur.com/obZR5.png" alt="Frame"><br>
I made a section on the half of the first pillar(the red line represents the section), to study the internal forces ... | Edit with respect to correction/edit in question :
First of all lets assume that $M_A$ is caused by force $F$ applied at distance $x$ from A, and distance from A to B is $L$.
<blockquote>
To calculate $M_a$<br>
$xF = M_A$<br>
$M_a = \sqrt[2]{x^2 + L^2} F \sin\theta$<br>
$M_a = \sqrt[2]{x^2 + L^2}... | <span class="math-container">$M_a$</span> is a Moment of Couple and is a free vector. it can be moved any where in space.
whereas Force(X and Y) are sliding vectors they can only be moved along their line of action (principle of transmissibility).
| https://physics.stackexchange.com |
4,361,800 | [
"https://math.stackexchange.com/questions/4361800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/596488/"
] | I was thinking about a rather simple question, namely: If two things are equal, are they necessarily isomorphic? At first, I thought this was a silly question as it seems that the identity map should provide the isomorphism we are after. However, after thinking about it a little bit more, I started to think of what doe... | No, you can't do this. The reason is that the fundamental characteristic of equality---whatever equality is taken to actually mean---is that equal things may be substituted for one another in a way that the rest of the theory must respect.
So, for instance, it is completely fine to consider a theory where there are mul... | When you define a category, you need a <strong>set</strong> (or class) of objects <span class="math-container">$\text{Ob}$</span>. If your objects are themselves sets, <span class="math-container">$A,B\in\text{Ob}$</span> and <span class="math-container">$A = B$</span> as sets, then they are indistinguishable as object... | https://math.stackexchange.com |
104,971 | [
"https://dba.stackexchange.com/questions/104971",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/68198/"
] | <strong>Goal</strong>:
I want to retrieve the value of <code>[data].[Mobiles]</code> when you use a query document that is for the database <code>[test]</code> (<code>use [test]</code>)
<strong>Problem</strong>:
Based on picture two, I cannot retrieve the value from the database. Don't know what is the problem... | Try with <code>[wwtest].[data].[Mobiles]</code>
| You want to use the three-part naming syntax:
<pre><code><database>.<schema>.<object>
wwtest . data . Mobiles
</code></pre>
...however you seem to be confused between your schema naming. In the table <code>data.Mobiles</code>, <code>data</code> is the schema, not <code>dbo</code>, so the naming... | https://dba.stackexchange.com |
76,802 | [
"https://dba.stackexchange.com/questions/76802",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/44715/"
] | I want to run a job every 3 seconds, however in SQL Server 2008 we cannot define an interval of less than 10 seconds.
The job is used to insert/update visitor information, and segmentation information into a database which is tracked by google search.
There are up to about 100 rows inserted in a 2 or 3 seconds. That... | Create a job that is scheduled to start every minute. Have the job do something like:
<pre><code>WHILE 1=1
BEGIN
EXEC dbo.SomeProcedure; /* this would be the
name of a stored procedure that does the
actual work */
WAITFOR DELAY '00:00:03.000';
END
</code></pre>
| I do not think this answer is correct. The reason is as follows:
let's say dbo.SomeProcedure will run for 2 seconds and it starts at 10:00:00am, then after this proc finishes, it will wait for another 3 seconds before restart again, i.e. at 10:00:02am, it finishes, and it will not start until 10:00:05am.
While if we co... | https://dba.stackexchange.com |
26,669 | [
"https://scicomp.stackexchange.com/questions/26669",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/23082/"
] | How can I estimate the error of a result obtained by using the trapezoidal rule if I don't have the function that describes my problem? The only thing I have is discrete points.
| You may use the ideas of error extrapolation as one uses it to construct high-order Runge Kutta methods.
Depending on the function that you interpolate, the interpolation error $I - I_h$, where $I$ is the actual integral value and $I_h$ the value obtained by the piecewise trapezoidal rule, may have a smooth asymptotic... | There is a graphical version of this method (Richardson extrapolation) that can be very insightful. Use least three values of $h$, not necessarily different by factors of two or any other simple relationship. Plot $I_h$ versus $h^p$ where $p$ is the assumed order of accuracy. The result will be a straight line if your ... | https://scicomp.stackexchange.com |
2,249,636 | [
"https://math.stackexchange.com/questions/2249636",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/359315/"
] | If $R$ is an artinian ring and $I$ is an ideal of $R$ then is the quotient ring $R/I$ artinian?
If its not can someone provide examples?
Thank you in advance.
| Let $\ F$ be the matrix of the linear transformation, and $\ x=(u,v,w)\in{R^3}$
You need to find the values of a,b so the system Fx=(4,3,4) has the answer.
| Let $y = (4, 3, 4)$, and let $A$ be the matrix of the transformation $f$ that you describe. If $y \in \mathrm{Im}(f)$, that means that there is some $x \in \mathbb{R}^3$ for which $f(x) = y$. You could try to solve the matrix equation $Ax = y$ directly (using Gaussian elimination for example), but in this case you'll f... | https://math.stackexchange.com |
24,218 | [
"https://chemistry.stackexchange.com/questions/24218",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/2190/"
] | I read somewhere that the temperature of an atom is not defined. The definition of temperature is only for larger systems. Why is this so?
| Thermodynamic functions are strictly defined only for macroscopic systems (systems that have an essentially infinite number of atoms). <strong>You can't apply them to individual atoms because that would be confusing large-scale averages with individual microscopic values</strong>.
Here's an analogy: the average speed... | While generally temperature in textbooks is connected with the speed of atoms/particles, strictly speaking not the velocity, but the distribution of velocity what counts. If you microscopically observe a bunch of particles, their velocity can be whatever as your frame of observation can be any inertia system. When you ... | https://chemistry.stackexchange.com |
146,571 | [
"https://mathoverflow.net/questions/146571",
"https://mathoverflow.net",
"https://mathoverflow.net/users/42163/"
] | Logarithmic mean of two positive real numbers is well defined in the literature, it has also been extended to more than two arguments in various papers. Is there any notion of logarithmic mean of random variables or functions? Thank you for your help and time.
| I don't think counting even 1-D holes is appropriate for intuitive understanding of homology. Take a torus for example: its 1st homology $H_1$ is generated by a circle along the torus (the "hole" in this case it the dohnut hole), and a circle across the torus (now the "hole" is the void inside the dohnut surface). The ... | I recommend you to have a look at the first chapter of Roger Fenn's book "Techniques of geometric topology".
<ul>
<li>Going back to Poincaré's first approach to homology (where homology is defined as a geometric calculus), you can think to $n$-cycles of a space $X$ as maps from $n$-manifolds (with singularities) to $... | https://mathoverflow.net |
305,728 | [
"https://softwareengineering.stackexchange.com/questions/305728",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/22417/"
] | I have been looking at Microservices for a while now. The concept is not new but it's communicated in a lightweight manner. So, I am very excited about this.
However, there is a question that I am not sure what the answer is: is each microservice supposed to have its own isolated data storage model completely? Conside... | <strong>I think that each service should have its own storage</strong>. Otherwise you're missing a point of (micro-)services - you can't quickly evolve the service if you're limited by storage shared with other service.
Why are you splitting read and write logic into separate services? That's a bit of a smell for me.
... | Well, the best analogy is encapsulation and Data-Hiding in OOP.
The only way you can interact with the state of the object is through its public interface. In the same manner, <strong>the only way you should be able to interact with the data of a (micro)service must be through its public API</strong>. Having said tha... | https://softwareengineering.stackexchange.com |
71,661 | [
"https://electronics.stackexchange.com/questions/71661",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/24510/"
] | I'm getting the following timing summary from the synthesis:
<pre><code>Timing Summary:
---------------
Speed Grade: -1
Minimum period: 9.982ns (Maximum Frequency: 100.180MHz)
Minimum input arrival time before clock: 4.597ns
Maximum output required time after clock: 4.364ns
Maximum combinational path d... | You have to run the generate_timing report on your design to get the detailed report for your design. In ISE you do it by choosing Tools->Timing-Analyzer->PostMap
<img src="https://i.stack.imgur.com/GN8JE.jpg" alt="ISE Timing Analyzer ">
It will generate a report with the information you asked for.
For more accurat... | The bottleneck will be shown in explicit and gory detail just a little further down the synthesis report, in the "critical path" section for each timing constraint.
But before you pay too much attention to that : the "minimum period" is suspiciously close to 100 MHz. I would check to see if you had specified a 100 MH... | https://electronics.stackexchange.com |
185,448 | [
"https://softwareengineering.stackexchange.com/questions/185448",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7676/"
] | We are about to write our first WPF application and are becoming familiar with the MVVM pattern. We've built many Winform applications and have an architecture that has been very successful for us. We're having a little bit of trouble translating that architecture or determining where certain pieces of our architectur... | In general, I would not place business logic in the view model layer. But the term "Business Logic" is misleading.
Eric Evans uses a model where business logic is divided into two categories
<ul>
<li>Domain logic - Logic related to the actual problem domain you are solving</li>
<li>Application logic - Logic related t... | Yes.
The business logic layer is represented by the VM layer. So just migrate your mental model.
To help with your mental model migration, one slight nuance is that the GUI (View) objects should be bound to objects within the VM layer. That binding translates into | implies that the View no longer being the layer t... | https://softwareengineering.stackexchange.com |
1,419,483 | [
"https://math.stackexchange.com/questions/1419483",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/265255/"
] | Can anyone please help me in solving this integration problem $\int \frac{e^x}{1+ x^2}dx \, $?
Actually, I am getting stuck at one point while solving this problem via integration by parts.
| Since $x^2+1=(x+i)(x-i)$, partial fraction decomposition leads to $$\frac 1{x^2+1}=\frac 1{2i}\Big(\frac{1}{x-i}-\frac{1}{x+i}\Big)=-\frac i{2}\Big(\frac{1}{x-i}-\frac{1}{x+i}\Big)$$ So $$I=\int \frac{e^x}{1+ x^2}\,dx =-\frac i{2}\int\Big(\frac{e^x}{x-i}-\frac{e^x}{x+i}\Big)\,dx=-\frac i{2}\int\Big(\frac{e^i\,e^{x-i}}{... | According to Wolfram|Alpha, no closed form exists. However, that doesn't mean we can't make any progress at all.
We can use the substitution $x=\tan{u}$, expand the resulting integrand as a power series in $\tan{u}$ and then each term can be expressed by way of a reduction formula.
Let $x=\tan{u}$. Then, ${\mathrm{d}... | https://math.stackexchange.com |
44,677 | [
"https://mathoverflow.net/questions/44677",
"https://mathoverflow.net",
"https://mathoverflow.net/users/10537/"
] | I'm working on Markov Decision Process and I have not found yet an example of MDP that has a stochastic (non deterministic) optimal policy. Is there MDPs that have a stochastic optimal policy or is it shown that an optimal policy is always deterministic ?
If a stochastic policy exist, is it shown that some algorithms ... | If there is an optimal policy, there is a deterministic optimal policy. Here is a sketch of the argument:
Start with an optimal policy within the class of deterministic optimal policies. By the one-deviation-principle, you only have to check whether you can gain by randomizing after a certain history of the process. I... | I finally found the proof of this in "Markov Decision Process -- Discrete Stochastic Dynamic Programming" by Martin L. Puterman (John Wilson and Sons Ed.). It is proved that if the reward function is deterministic, the optimal policy exists and is also deterministic. But I don't know if this result can be generalized t... | https://mathoverflow.net |
131,420 | [
"https://chemistry.stackexchange.com/questions/131420",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/75345/"
] | I've come across numerous articles asserting that orbital optimized methods, where minimization of the energy is achieved through a series of unitary rotations (achieved by exponentiated single-electron excitations from the ground state reference) of the reference determinant, are exceptionally good at removing spin co... | I agree with the statement that FCI has no spin contamination, however, it's not necessarily true that if one reference is closer to FCI than other, it has less spin contamination (which is why UHF can produce better energies but lose spin symmetry). One way to think about it is by using the Thouless Theorem to relate ... | Upon further thought, I've summarized it as follows. If anyone comes along with a better explanation, they'll get the cake!
Spin contamination is a fictitious effect arising from not achieving the full CI solution to the Schrödinger equation. For, had we found the exact solution, then the solution we found would be an... | https://chemistry.stackexchange.com |
67,259 | [
"https://mathoverflow.net/questions/67259",
"https://mathoverflow.net",
"https://mathoverflow.net/users/15666/"
] | Can countable dense additive subgroups of the reals be well-ordered up to isomorphism by inclusion?
If so, is $\mathbb{Q}$ the smallest (up to isomorphism) countable dense subgroup of the reals, and what is the second smallest (up to isomorphism)?
| $\{a2^b:a,b\in\mathbb Z\}$ and $\{a3^b:a,b\in\mathbb Z\}$ are both countable dense additive subgroups of the reals, and they are not embeddable in each other (hence $\mathbb Q$ is embeddable in neither).
Also, let $\{p_k:k\in\mathbb N\}$ be an enumeration of primes, and let $A_k$ consist of all fractions $a/b$ of inte... | One can carry the idea of Emil's answer a bit further: for
any set $A$ of primes, let $G_A$ be the set of rational
numbers $\frac ab$ for integers $a$, $b$ where every prime
divisor of $b$ is in $A$. If $A$ is nonempty, then $G_A$ is
a countable dense additive subgroup of $\mathbb{R}$, and
furthermore $A\subset B$ if a... | https://mathoverflow.net |
4,395,859 | [
"https://math.stackexchange.com/questions/4395859",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/857055/"
] | <blockquote>
Show that if <span class="math-container">$f$</span> is continuous in <span class="math-container">$[a,b]$</span> and differentiable in <span class="math-container">$(a,b)$</span>, and <span class="math-container">$f(a)=f(b)=0$</span>, then for a real <span class="math-container">$\alpha$</span> there is a... | You are right, the formulation is indeed a little imprecise and "for any real <span class="math-container">$\alpha$</span>" would be the better formulation. "...for a real <span class="math-container">$\alpha$</span> ..." could mean "<span class="math-container">$\exists \alpha \in \mathbb{R}$<... | Indeed, this is true for al <span class="math-container">$\alpha$</span>. We may assume that <span class="math-container">$f'(a)\not=0$</span>, as well as <span class="math-container">$f'(b)$</span>, otherwise <span class="math-container">$a$</span> (or <span class="math-container">$b$</span>) does the job. Changing <s... | https://math.stackexchange.com |
181,923 | [
"https://security.stackexchange.com/questions/181923",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/56065/"
] | <h2>Where can I store my private-public ssh key?</h2>
I would like to keep these files somewhere safe, and also I would probably need to keep them updated from time to time. Is it a good idea to keep it in a git repo (that I'll also have a private GitHub repo)?
| Since you are talking about <strong><em>public</em></strong> keys only, it is fine to place these file in any repository you like.
Now I am unsure if you are really only talking about the <strong><em>public</em></strong> keys. In case you are wondering what to do with a <strong><em>private</em></strong> key, here is w... | Although public keys and authorized_keys files contain the counterpart of your private key you have good reasons to store them in a safe place. Read-only on your workstation is a start.
By convention, and openssh defaults, the authorized_keys file is stored in ~/.ssh of the account that you (and possibly others) log o... | https://security.stackexchange.com |
148,964 | [
"https://cs.stackexchange.com/questions/148964",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/147856/"
] | Can you help me design an algorithm to solve the following problem in <strong>polynomial</strong> time?
Let n be a given natural number. We define an <strong>input series</strong> of length n to be a string of length n which is built by using only the characters F, S and - (hyphen).
At least one F or S is guaranteed to... | <h3><span class="math-container">$L(G)$</span> is the set of all p-expressions</h3>
Let an operator mean either <span class="math-container">$+$</span> or <span class="math-container">$*$</span>. In order to characterize the strings generated by <span class="math-container">$G$</span>, we may observe the number of oper... | I would like to suggest another easy method to prove that the grammar <span class="math-container">$G$</span> is unambiguous. We can use the LR(0) parsing property to do so.
The language <span class="math-container">$L(G)$</span> is not prefix-free. If we add the endmarker <span class="math-container">$\\\$$</span> to ... | https://cs.stackexchange.com |
174,509 | [
"https://stats.stackexchange.com/questions/174509",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/90607/"
] | I have a physical problem looking quite a basic problem but I can't find a solution.
The problem can be translated as follow:
I have n identical decks containing d cards each.
Taking one random card from each deck, which is the probability to have at least k identical cards?
| Hello Daniele and welcome to CV! While I haven't thought up anything to clean we can quickly get you a some recursion relations that will help you calculate this. I will consider our draws of ordered hands so the event space has size $d^n$. We will break this up by the number of card type 1 that appears (for instanc... | I have assumed a deck of D cards that are unique.There are N such decks.
Probability of obtaining a specific card is 1/D.
Since there are N decks,the drawing of a card from each deck is considered independent of each other.Each experiment of drawing a card has a probability of 1/D and the experiment is being repeated N... | https://stats.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.