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 |
|---|---|---|---|---|---|
9,281 | [
"https://stats.stackexchange.com/questions/9281",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/2830/"
] | Hope this newbie question is the right question for this site:
Suppose I would like to compare the composition of ecological communities at two sites A, B. I know all three sites have dogs, cats, cows, and birds, so I sample their abundances at each site (I don't really have an "expected" abundance for each animal at ... | I will concur with what has been mentioned that Bray-Curtis can handle abundance as well as presence/absence, also to add another good book to the mix: Analysis of Ecological Communities by McCune and Grace.
There are a lot of factors to consider as you compare ecological communities and I don't think there is a singl... | Since you mention Sorensen index, it seems you need a dissimilarity score rather than a dissimilarity test. (A score will give a numerical value indicating how different they are. A test will tell you whether the difference is significant with a given probability.)
You can represent species abundance at each location ... | https://stats.stackexchange.com |
11,984 | [
"https://security.stackexchange.com/questions/11984",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/6838/"
] | I know some people that, in regards to network security, argue that because the firewall on the router into the building is on, that makes the network secure and therefore, the firewall on Windows PC's can be switched off. These people work in IT.
I disagree with this and I need a solid argument to go back with. I am ... | Your argument is a very good one. I agree with you.
If it is too abstract for your IT folks, here is a way to make it more concrete. Suppose one of your fellow employees catches a virus/worm while travelling, then brings his/her laptop back and connects it to your company network. The worm will then be free to spre... | Malware can enter an organization in many ways, such as email attachments and malicious web sites, or a USB stick brought in from home. Conficker was able to spread from computer to computer within an organization. Defense in depth as previously mentioned is a best practice to ensure the protection of the organizatio... | https://security.stackexchange.com |
1,489,540 | [
"https://math.stackexchange.com/questions/1489540",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/280739/"
] | I have problem with this. I can't find anything similar in books I have. I would be more glad for a good hint than for straightforward solution (but keep in mind I am not very gifted). Thank you for your time and help!
$$
\lim_{n \to \infty} n\Bigg(\sqrt[k]{a^k + \frac{1}{n}} -\sqrt[k]{a^k - \frac{1}{n}} \Bigg)
$$
| Multiply through by $\sum_{i=0}^{k-1} \left( \sqrt[k]{a^k+\frac 1n} \right)^i \left( \sqrt[k]{a^k - \frac 1n} \right)^{k-1-i}$ and obtain
$$
n \left( \sqrt[k]{a^k+\frac 1n} - \sqrt[k]{a^k - \frac 1n} \right) \left( \sum_{i=0}^{k-1} \left( \sqrt[k]{a^k+\frac 1n} \right)^i \left( \sqrt[k]{a^k - \frac 1n} \right)^{k-1-i} ... | Assuming $k$ is a constant, you are looking for
$f_k(n) = n\left( \sqrt[k]{a^k + \frac{1}{n}} -\sqrt[k]{a^k - \frac{1}{n}}\right)$ when $n\to\infty$.
You can start by factoring out:
$$
f_k(n) = n\left(\left( a^k + \frac{1}{n} \right)^{1/k} - \left(a^k - \frac{1}{n}\right)^{1/k}\right)
=an\left( \left( 1 + \frac{1}{na^... | https://math.stackexchange.com |
92,022 | [
"https://security.stackexchange.com/questions/92022",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/78967/"
] | I am experiencing a security issue with one server that it happens that I manage. I will try to cite all relevant facts as briefly as possible. I am asking for any additional information and course of action to take.
The server hosts several relatively low-volume web sites, and other minor services as well. Most sites... | If you can verify the password by character, it significantly reduces the effective strength of the password. Rather than being exponentially stronger for each character it would only be incrementally stronger.
For example, say I have a password four characters long that is "ABCD". If I have to know the entire pas... | It is possible that the service not only computed the hash of the full password when it was created, but also hashed the 3rd and 7th character (or possibly every character) individually. That way, they technically wouldn't be storing the characters or the full password in plaintext. However this would be a terrible ide... | https://security.stackexchange.com |
162,698 | [
"https://softwareengineering.stackexchange.com/questions/162698",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/3278/"
] | There used to be <em>very</em> good reasons for keeping instruction / register names short. Those reasons no longer apply, but short cryptic names are still very common in low-level programming.
Why is this? Is it just because old habits are hard to break, or are there better reasons?
For example:
<ul>
<li>Atmel ATM... | There are so many different ideas here. I can't accept any of the existing answers as <em>the</em> answer: firstly, there are likely many factors contributing to this, and secondly, I can't possibly know which one is the most significant one.
So here's a <strong>summary of answers</strong> posted by others here. I'm ... | The reason the software uses those names is because the datasheets use those names. Since code at that level is very difficult to understand without the datasheet anyway, making variable names you can't search is extremely unhelpful.
That brings up the question of why datasheets use short names. That's probably beca... | https://softwareengineering.stackexchange.com |
81,277 | [
"https://stats.stackexchange.com/questions/81277",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/36462/"
] | <strong>Question:</strong>
I want to test a medicine and I have two groups of people with baseline blood pressure, one I give medicine A and the other one medicine B. After 6 months, I measure their blood pressure.
Now there are two options:
<ul>
<li>I measure the difference of the mean change. </li>
<li>I forget abo... | First thing to do is to make a good plot. The data used here is the ACTG175 data set in R of the R package speff2trial. Treatment 1 seems to have little effect on the measurement (i.e. bloodpressure), treatment 2 on the other hand seems to have a positive effect, as the measurements seem to be higher at the end of the ... | How about plotting your data: before against after. That would give you an even more detailed overview of what is going on.
Here are some situations and how they look in such a plot:
<ul>
<li><strong>no.effect</strong> in the graphic below: If there is no effect, expect a correlated point cloud on the diagonal (th... | https://stats.stackexchange.com |
500,948 | [
"https://physics.stackexchange.com/questions/500948",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/238900/"
] | I found this problem in ‘200 puzzling physics problems’
<blockquote>
<ol start="25">
<li>An empty cylindrical beaker of mass 100 g, radius 30 mm and negligible wall thickness, has its center of gravity 100 mm above its base. To what depth should it be filled with water so as to make it as stable as possible?</li>
... | It seems "max stability" is defined as follows, 1. All water added hardens like resin, so when you push the cylinder trying to tilt it, the water surface will not keep horizontal but will tilt with the cylinder; 2. The system is at its max stability if it has the maximum possible tilting angle before it falls over.
So... | When the water level lies below the (vertical) center of mass adding water adds mass below the center of mass. This must lower the center of mass, making the cup more stable.
| https://physics.stackexchange.com |
4,407,569 | [
"https://math.stackexchange.com/questions/4407569",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/922398/"
] | Is there a such thing as a free group generated by a free group?
Let <span class="math-container">$F(A)$</span> be a free group generated by the elements of a set <span class="math-container">$A$</span>. If we momentarily consider <span class="math-container">$F(A)$</span> to be simply a set of words on elements of <sp... | Suppose <span class="math-container">$A=\{x\}$</span>. Then <span class="math-container">$F(A)$</span> is just the set of words on <span class="math-container">$x$</span> of varying length, where two words are equal iff their lengths are equal.
Now consider <span class="math-container">$F(F(A))$</span>, which looks sim... | Let <span class="math-container">$A=\{a\}$</span>. So <span class="math-container">$F(A) \simeq \mathbb{Z}$</span>. Then <span class="math-container">$F(F(A))=F(\mathbb{Z})$</span> which is definitely not <span class="math-container">$\mathbb{Z}$</span>. It is a free group on a countable number of generators.
The probl... | https://math.stackexchange.com |
576,777 | [
"https://stats.stackexchange.com/questions/576777",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/293648/"
] | According to Wikipedia, Ensemble of models tends to yield better results when there is a significant diversity among the models. Many ensemble methods, therefore, seek to promote diversity among the models they combine. Using a variety of strong learning algorithms has been shown to be more effective than using techniq... | <strong>Your first question</strong>: This is probably intentionally formulated very vaguely on Wikipedia. But, as an example, you could think of Bayesian predictions as the weighted average of many models which differ continuously in their parameters. And often the weights are only large in a confined region, so the r... | <blockquote>
Ensemble of models tends to yield better results when there is a significant diversity among the models
</blockquote>
Let me rephrase this: iff there is high variance between the submodels (or their predictions), ensemble methods help.<br />
(This is very similar to what we routinely do e.g. with measureme... | https://stats.stackexchange.com |
438,324 | [
"https://stats.stackexchange.com/questions/438324",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/263667/"
] | So I have this question where you are given two random variables, <span class="math-container">$X$</span> and <span class="math-container">$Y$</span>. <span class="math-container">$X$</span> is a continuous random variable (represented as a mean) with a distribution of <span class="math-container">$Exp(1)$</span> (expo... | Let me clear the notation. <span class="math-container">$X\sim\exp(\lambda=1)$</span>, and given <span class="math-container">$X$</span>, <span class="math-container">$Y$</span> is Poisson distributed with <span class="math-container">$\lambda=X$</span>. By the definition of conditional probability, we have:<span class... | The <span class="math-container">$Y$</span> with parameter <span class="math-container">$X$</span> just means: <span class="math-container">$Y | X = x$</span> (where <span class="math-container">$x$</span> is constant). <span class="math-container">$Y$</span> is distributed as <span class="math-container">$Pois(X = x)$... | https://stats.stackexchange.com |
163,298 | [
"https://security.stackexchange.com/questions/163298",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/151901/"
] | The basic premise of SELinux seems to control which activities system allows each user, process and daemon, everything beyond the allowed set is block as a default.
Does it mean SELinux effectively overrides conventional DAC or does DAC still play a first role?
| SELinux complements DAC, It is an enhancement to DAC. An optional add-on to DAC. Its a patch to DAC with the aim to address various modern day challenges. DAC is old and needed an overhaul. In practice SELinux sits below DAC. So first DAC is enforced and after that SELinux is enforced. Which means that SELinux eventual... | SE Linux implements Mandatory Access Control, plus trusted path and a few other things, that work in parallel to DAC. If you have read permission to, for example, foo.txt, you must also have a MAC level and category that allows you to access foo. In a sense it overrides DAC, but then DAC can override MAC, so you pays y... | https://security.stackexchange.com |
342,367 | [
"https://softwareengineering.stackexchange.com/questions/342367",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/262838/"
] | I'm a computer science student at some college out there but i'm a little confused with using the SRS and various diagram such as activity diagram or use-case diagram. I know the objective of the SRS is to minimizes the time and effort required by developers to achieve specific goals and to reduce the development cost ... | To me, the fundamental objective of the SRS is <em>to tell the software team what the software is supposed to do</em>. This is an alternative to just making it up as you go along (aka "agile").
If you're going object-oriented, then you need to take an object-oriented analysis and design approach. Most likely, the fi... | Don't make things more complicated than they are. The SRS is simply a document describing what the software is supposed to do, but not how it is going to do it. It can be plain text but often it makes sense to include diagrams. Often it's a good idea to use standardized UML diagrams like Use Case or Activity. But this ... | https://softwareengineering.stackexchange.com |
350,319 | [
"https://physics.stackexchange.com/questions/350319",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/165553/"
] | I am trying to calculate the total magnetic flux through the surface of a current loop. I feel that this flux should be finite and nonzero -- so far any attempt in calculating failed. Can this really not be done?
For example: We know
\begin{equation}d\textbf{B}=\dfrac{\mu_0}{4\pi}\,\dfrac{I\,d\textbf{l}\times\hat{\tex... | You almost have it. At least if what you actually are trying to calculate is not the instantaneous force (which anyway can't be obtained with the information provided), but the <em>average force</em>.
You're calculating the force on one of the walls, right? Well, that means the time between collisions of the particle ... | I am not going to solve the question completely, but I will give you idea on how to solve it. If you still get stuck, then comment down below.
Since it is not mentioned, I am going to assume the collision of the particle with the wall to be elastic.
Now think what will be the change if momentum of the particle after ... | https://physics.stackexchange.com |
112,145 | [
"https://softwareengineering.stackexchange.com/questions/112145",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/66/"
] | It seems that frequently in large projects the software is still released with the bug tracker full of bugs. Now I can understand feature requests, but several times I've seen large numbers of bugs still unresolved, not reviewed, or not finished but a release is still pushed out.
Why? Why would an open source project... | Any number of reasons, including:
<ol>
<li>Company had made commitment to user base to release at a particular time</li>
<li>Bugs were not mission-critical, or even major</li>
<li>New feature development was viewed as more important (whether correctly or not)</li>
</ol>
To a small extent, this is like asking why you ... | Ultimately, it's a business decision, even for free and open source software. There's a point where the defects that exist are of a low impact that it's better to release, get your software into the hands of the user, and get feedback (including, but not limited to, feature requests and new bug reports of defects not f... | https://softwareengineering.stackexchange.com |
561,311 | [
"https://electronics.stackexchange.com/questions/561311",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/20711/"
] | Assume that a system level test setup needs to be created for a design. This shall require use of power supply with multiple outputs, signal sources that can output sinusoidal or arbitrary signals and measurement equipment that can measure frequency, spectrum or magnitude of signals at different points in the device u... | There are many approaches. Depends on volume and the type of technology involved, also whether 100% coverage and long term reliability are of high importance. In some markets (a cheap gadget for teh mass market) a certain level of field failures can be deemed acceptable, it's a trade off between replacement value and m... | Many modern bench instruments come standard with LXI these days, which uses Ethernet. Before that the standard was GPIB IEEE-1488.
One way to control disparate test instruments is with Labview. There are other ways.
Last time I did a temporary test setup for radiation testing I used some Python programs.
| https://electronics.stackexchange.com |
197,290 | [
"https://softwareengineering.stackexchange.com/questions/197290",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/90312/"
] | My team is just getting started integrating agile practices (we've chosen kanban) into our dev, test and design teams, but we have a lot of bug cases and feature cases not written in user stories left over from the old system and we're trying to find a good way to take care of the bugs but still keep the devs that need... | Place the bug items on your Kanban board like everything else (in prioritized order of course) and then let the team decide who should implement the next item in the queue.
I believe the team knows best how to handle this, rather than having someone else distribute the items among specific team members. At least that... | Finish the old bug cases and feature requests as usual and slowly begin to implement the kanban system as new bug cases and feature requests come in.
<strong>OR</strong>
Have some devs or other people in the office create user stories for the old bugs before progressing.
| https://softwareengineering.stackexchange.com |
482,053 | [
"https://physics.stackexchange.com/questions/482053",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/205249/"
] | Suppose I have two capacitors of different capacitance <span class="math-container">$C_1$</span>, <span class="math-container">$C_2$</span>and they have been charged prior connecting by voltage of <span class="math-container">$V_1$</span> and <span class="math-container">$V_2$</span> respectively the positive plate of ... | <blockquote>
The two plates which have been connected are at different potentials , I'm interested to know what happens next , what changes will occur in the wire and all the plates , will a change be even there or not ?
</blockquote>
Once you disconnect the individual capacitors from their respective voltage source... | When you remove the battery there will be nowhere for the charge at the lead ends to go, so it will stay the same. As there is no redistribution on the lead ends, by symmetry there will be no redistribution internally.
You can also thinking of it as the capacitors charging up while current is flowing. Once equilibrium... | https://physics.stackexchange.com |
3,891,091 | [
"https://math.stackexchange.com/questions/3891091",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/804723/"
] | This question came up in my textbook, and I simply couldn't get my head around it. The question is as follows:
What is the probability that the fourth coin that is taken out is a nickel and the seventh is a quarter?
I tried listing cases, but I soon found out that the process was far too tedious. Does anyone have any i... | the probability that a coin is drawn at the first, second, third....last draw is always the same, it cannot change.
Same reasoning for the rest of the questions.
<hr />
You can verify my statement in an easy way:
<ul>
<li>Penny drawn at first draw:</li>
</ul>
<span class="math-container">$$\frac{2}{13}$$</span>
<ul>
<l... | In absence of any new information, the probability would remain the same as it was at the beginning.
One way to look at it is as below.
To start with, you have <span class="math-container">$4$</span> quarters, <span class="math-container">$7$</span> nickels, <span class="math-container">$2$</span> pennies (ratio of <sp... | https://math.stackexchange.com |
8,274 | [
"https://dsp.stackexchange.com/questions/8274",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/3420/"
] | I have a output signal $Y(t)= \sum_{n=-\infty}^{\infty} Z_n \delta (t-n\tau) h(t)$ and $Z_n$ is a random variable with equal probability to be $+-1$ and h(t) is $sinc(\frac t {\tau})$
and the Expected value of $Y(t)$ is
$E(Y(t)) = E[\sum_{n=-\infty}^{\infty} Z_n \delta (t-n\tau) h(t)]$
$=\sum_{n=-\infty}^{\infty}h(n... | Your second equation $E[Y(t)] = \int_{-\infty}^\infty tY(t)dt$ is wrong; that won't calculate the expected value of $Y(t)$. The equation you are thinking of is $E[Y(t)] = \int_\Omega Y(t)P[Y(t)]$, where you would determine $P[Y(t)]$ by a joint probability of the $Z_n$'s. That's why they don't match.
In any case, @Di... | If $h(t)$ is continuous at $a$, then $h(t)\delta(t-a) = h(a)\delta(t-a)$. Since the
$\operatorname{sinc}$ function is
continuous everywhere,
$$\begin{align}
Y(t) &= \sum_{n=-\infty}^{\infty} Z_n\delta(t-n\tau)h(t)\\
&= \sum_{n=-\infty}^{\infty} Z_n\delta(t-n\tau)h(n\tau)\\
&= \sum_{n=-\infty}^{\infty} Z_n... | https://dsp.stackexchange.com |
2,150,580 | [
"https://math.stackexchange.com/questions/2150580",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/15183/"
] | Let $G$ be a group and let $\pi: G\rightarrow Aut_\mathbb{C}(V)$ be a finite dimensional irreducible representation of $G$.
I have two related questions
<ol>
<li><strong>If I have two different hermitian inner products on $V$ with respect to which $\pi$ is unitary, does one have to be a scalar multiple of the other?... | Let $\left< \cdot, \cdot \right>_1, \left< \cdot, \cdot \right>_2$ be two Hermitian inner products on $V$ with respect to which $\pi$ is unitary and let $T \colon V \rightarrow V$ be the (unique) operator satisfying
$$ \left< Tv, w \right>_2 = \left< v, w \right>_1 $$
for all $v,w \in V$. Then... | The first one is surely false. Just take the trivial representation. Nevertheless, if $h_1,h_2$ are two invariant hermitian forms then $h_2(x,y)=h_1(Tx,y)$ for some invariant linear operator $T$, so by Schur's lemma they are proportional if your representation is irreducible.
Proof of the fact claimed in the proof: he... | https://math.stackexchange.com |
371,150 | [
"https://stats.stackexchange.com/questions/371150",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/161265/"
] | <strong>Background</strong><br />
Let's say we have an alphabet of <code>A,B, C, D</code>, then we look through some data and find a "word" which is <code>DDDDDDDDCDDDDDD</code> the chance of finding this random seems low to me whereas finding <code>BABDCABCDACDBACD</code> seems less random.<br>
<strong>Quest... | <blockquote>
the chance of finding this random seems low to me whereas finding BABDCABCDACDBACD seems less random.
</blockquote>
Why would that be? If the overall proportion of letters A...D is equal to 0.25 for each letter, and each letter is independent of the other one, then both words are exactly equally probabl... | You could try Shannon information:
<span class="math-container">$$
H = -\sum_{i = 0}^n {P_{i}\log_{2}(P_{i})}
$$</span>
where, <span class="math-container">$P_{i} = \frac{c_{i}}{n}$</span>, <span class="math-container">$c_{i}$</span> is the count of some letter <span class="math-container">$c$</span> in the word and ... | https://stats.stackexchange.com |
288,702 | [
"https://softwareengineering.stackexchange.com/questions/288702",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/139925/"
] | I have the following graph that I need to simulate a depth-first search of; starting at <code>g</code>:
<img src="https://i.stack.imgur.com/UtNS4.png" alt="Graph">
My question is: How definite of an order is there when performing a depth-first search? When doing a DFS of a tree, I always see the left-most child search... | <blockquote>
Am I right that there are many possible answers to this question? And is my trace of the DPS correct?
</blockquote>
Yes, there is no 'natural' ordering of the nodes of a graph. So there is also no 'natural' ordering in the result of the DFS of a graph.
Of course, in the example above, you could sort t... | Yes, the exact path of the search does depend on what starting point you choose and--every time you hit a node with multiple unvisited children--what order you choose to visit the children in. Most implementations of DFS will always choose the same order, but which order that is depends on details of the algorithm impl... | https://softwareengineering.stackexchange.com |
524,259 | [
"https://electronics.stackexchange.com/questions/524259",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/243157/"
] | I saw a video where power lines touched due to high speed air and created huge arcs. In another video, a person throws a wire in air, it touches a wire and he gets shocked. Also it is said that birds are not electrocuted because they do not short +ve and -ve wires. Why shouldn't the answer be power lines are insulated ... | Powerlines in the air are not insulated.
If hung properly they shouldn't be able to touch.
In really heavy rain and wind you might be able to see some arcs and sparks between the wires, but that is not supposed to happen.
| High voltage (>1KV) overhead lines are nearly always bare wire. Instead insulation is achieved through spacing of the wires and mounting them on insulated supports. This works fine most of the time, but sometimes either support structures break or high winds cause problems by either blowing wires into each other or ... | https://electronics.stackexchange.com |
163,173 | [
"https://mathoverflow.net/questions/163173",
"https://mathoverflow.net",
"https://mathoverflow.net/users/8385/"
] | <strong>NOTATION</strong>: $O_x$ -- the product of all odd primes $\le x$.
E.g. $O_7=3\cdot 5\cdot 7 = 105$.
<strong>QUESTION</strong>: Are the three ordered pairs $\ (d\ p)=(1\ 3)\ \ (2\ 3)\ \ (4\ 5)\ $ the only solutions of the equation:
$$|O_p-2^d|=1$$
in natural numbers $d$, and odd primes $p$?
(I don't know a... | There is no solution for $O_n=2^d-1$ with $n \geq 7$.
If 5 divides $2^d-1$ and 7 divides $2^d-1$, then 9 divides $2^d-1$. [Because 4 divides $d$ and 3 divides $d$; 6 divides $d$ and hence $2^{d}-1$ is divisible by 9.]
| Let's complete the answer following The Masked Avenger: modulo $7$ the powers of $2$ are $2,4,1$ and then repeat cyclically, so that $1+2^d$ is never divisible by $7$.
| https://mathoverflow.net |
166,461 | [
"https://softwareengineering.stackexchange.com/questions/166461",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/49882/"
] | I notice that someone in my organization programs comparisons like:
<pre><code>if (100 == myVariable)
</code></pre>
rather than:
<pre><code>if (myVariable == 100)
</code></pre>
He claims the former is quicker in languages like C++. I can't find any evidence. We program in C#.
Is this true for any programming lan... | No, it is not "quicker": compilers will translate both expressions into the same code.
Some time ago the first pattern has been suggested to people coming to C from other languages where comparing objects required a single <code>=</code>. The idea was to protect them from making this mistake:
if (myVariable = 100)
T... | Compare disassembly:
<pre><code>if (cmdline == NULL)
cmp dword ptr [ebp-138h],0
jne ........
</code></pre>
To:
<pre><code>if (NULL == cmdline)
cmp dword ptr [ebp-138h],0
jne ........
</code></pre>
No difference whatsoever.
The sole reason for "if (const == variable... | https://softwareengineering.stackexchange.com |
217,537 | [
"https://stats.stackexchange.com/questions/217537",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/119036/"
] | I am carrying out a study into the handedness of racehorses. There are clockwise and anti-clockwise racecourses. I want to test to see if 1) horses are more likely to win if they are left handed on anti-clockwise (left hand) courses than those who are right handed and 2) if they are more likely to win if they are righ... | As you are looking into the winners, the numbers lend themselves to be displayed in a 4 fields contingency table, which usually calls for a chi-square test for independence or a Fisher test.
However, you should consider, whether your data are i. i. d. enough. If there is one horse, that's left-handed and wins a lot of... | As opposed to restricting to just one handedness of the course, another possibility is to measure wins and losses where group A is horses of same-handedness of course versus group B being horses with different-handedness of course. But you may want to use mantel-haenszel statistic where you stratify upon the handedness... | https://stats.stackexchange.com |
12,165 | [
"https://mechanics.stackexchange.com/questions/12165",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/6894/"
] | I drive a 1999 Chrysler 300M, V6 3.5L engine. I am about to start a water pump replacement repair. I've discovered that the water pump is driven off of the timing belt, rather than either of the two fan belts on the front. This obviously complicates the repair quite a bit. What is the advantage to running it off of the... | Engine safety. If you lose an accessory belt driven water pump, you're likely to keep driving, thinking the "oh, I just don't have an alternator" while you're busy cooking your engine beyond repair (normally with no temperature notification/change, if anything it'll read cold). When the water pump is on with the timi... | I think the main reason for this is convenience. It's an easy place to run the water pump. If you ran it out to a fan belt, it would be in the way of the timing belt while doing it, or it would be a really awkward mess trying to work around it. The second reason is for compactness. With the water pump stuck out of the ... | https://mechanics.stackexchange.com |
16,852 | [
"https://physics.stackexchange.com/questions/16852",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1429/"
] | In Hartle's General Relativity book ("Gravity"), one of the problems (chapter 8 problem 6) is to prove that $g_{\mu\nu}u^\mu u^\nu$ is conserved along geodesics (really not hard to show), where $u^\mu$ is the 4-velocity. My question is: Isn't it true that $g_{\mu\nu}u^\mu u^\nu$ is equal to $-1$ for <em>any</em> timeli... | I emailed my TA and here was his answer, which I think makes sense:
While it <em>is</em> true that a curve which is everywhere timelike can be parametrized so that its tangent vector has unit norm, it is also possible to draw a curve which starts out timelike and then becomes null or spacelike, so its norm won't be th... | Indeed, you are absolutely right, and this is a terrible exercise. The quantity v dot v (using the metric) is the length of the tangent to a curve, and this depends on the parametrization. In an arclength parametrization of timelike curves, as you use to derive the geodesic equation, it is always minus one (in your con... | https://physics.stackexchange.com |
2,852,478 | [
"https://math.stackexchange.com/questions/2852478",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/300848/"
] | Let $f(z)=x^2+iy^2$ find where it is differentiable and where it is analytic in $\mathbb{C}$
For a function to be differentiable at a point it should fulfil C-R equations, we have
$u(x,y)=x^2$ and $v(x,y)=y^2$
So $u_x=2x=2y=v_y$ and $u_y=0=0-v_x$
So the function is differentiable iff $2x=2y\iff x=y$
So the functi... | First we will make some required transformations to assure that the formula $(b+c)x^2+(c+a)y^2+(a+b)z^2=0\;$ represents a real cone.
A real cone with circular base over the $x \times y$ plane and vertice at the origin should be represented as
$$
K\to m x^2+n y^2+p z^2 = 0
$$
with $m = n$ and $m > 0, n > 0, p &... | As an alternative solution,
Let <span class="math-container">$/$</span>=<span class="math-container">$/$</span>=<span class="math-container">$/$</span> be normal of plane ++=0. Now the normal is generator of given cone. So we get condition <span class="math-container">$(+)^2$</span>+<span class="math-container">$(+)^2$... | https://math.stackexchange.com |
1,371,589 | [
"https://math.stackexchange.com/questions/1371589",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/184004/"
] | $y=x^x$
Use $\frac{d}{dx}(a^x)=a^x \ln a$
My answer is: $x^x \ln x$
The book has the answer as $x^x\ (1+ \ln\ x)$
Am I missing a step?
| Take logs first so that you have $$\ln y =x\ln x$$
Then $$\frac 1y \frac{dy}{dx}=1+\ln x$$
And the result follows
| If $f(x) = x^x$ then taking the natural logarithm of both sides and making use of the power rule for logarithms yields $$\ln f(x) = x \ln x$$ Implicitly differentiating with respect to $x$ gives us $$\frac{f'(x)}{f(x)} = \ln x + 1$$
So, by multiplying through by $f(x)$, we have $$\bbox[10px, border: blue 1px solid]{f'... | https://math.stackexchange.com |
338,790 | [
"https://stats.stackexchange.com/questions/338790",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/127724/"
] | I have not seen the following notation before (the 1 with a subscript in the density):
<blockquote>
Consider the problem of sampling from the truncated normal
distribution $\mathcal{N}_t (\mu, 1, a)$, given by the random variable $X ∼ \mathcal{N} (\mu, 1)$ conditional on the event $\{X \geq a\}$. Its density is pr... | $\mathbb{1}_{x\ge a}$ is an indicator function, that is equal to $1$ when $x\ge a$ and zero otherwise. Multiplying by it is a fancy, math way of saying that everything else is equal to zero. In this case, it says that only cases greater or equal to $a$ can be observed.
| The I in the formula is the indicator function. In this case it equals 1 when x>=a and zero otherwise.
| https://stats.stackexchange.com |
55,205 | [
"https://mathoverflow.net/questions/55205",
"https://mathoverflow.net",
"https://mathoverflow.net/users/6761/"
] | Finite simple groups (non-abelian) can generated by two elements.
Let $G=\langle x,y|x^l=y^m=(xy)^n=1,...\rangle$ be a finite simple group (non-abelian), and $\langle x,y|x^p=y^q=(xy)^r=1,...\rangle$ be another presentation of $G$. <em>(Here, "..." means possibly more relations).</em>
1) If $(1/l)+(1/m)+(1/n)<1$... | <blockquote>
<strong>No</strong>. The simple group of order 60 is a counterexample to (1) and (3).
</blockquote>
If {x,y} is a generating set of G, call its signature 1/|x| + 1/|y| + 1/|xy|. It appears that the signature of most generating sets of non-abelian simple groups are less than 1.
I'll assume that l,m,n ... | This is an attempt to explain Jack's answer geometrically, and to argue that $A_5$ is the only possible interesting (ie non-abelian) example.
We are interested in actions of finite simple groups on surfaces $\Sigma$. We are looking for simple groups $G$ that act on surfaces of different curvatures. The quotient $\Si... | https://mathoverflow.net |
15,178 | [
"https://dsp.stackexchange.com/questions/15178",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/-1/"
] | let us suppose that we have following signal values,which consists by deterministic components and random noise(white noise)
<pre><code>56.69
75.24
13.77
8.56
-12.88
-65.34
-45.33
-48.78
-22.23
54.12
83.77
11.84
2.31
39.59
-32.09
-88.86
5.45
50.24
-37.39
-35.69
38.62
7.06
-30.01
22.36
60.71
30.96
5.90
-38.91
-58.15... | To answer inside the framework you set:
In the CWT domain the frequencies will stay the same, the wavelet will behave just like any other filter. It will only filter out frequencies, not change them. You can see banded regions in the image where the peaks are. Since you picked a wavelet that does not have a very steep... | A simple (hanning-windowed) FFT reveals four peaks that stand out far beyond the noise. This appears to be what you are looking for.
<img src="https://i.stack.imgur.com/gqjAO.png" alt="enter image description here">
| https://dsp.stackexchange.com |
462,049 | [
"https://electronics.stackexchange.com/questions/462049",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/223693/"
] | I have this function to read key press from a <em>4x3 key-board</em>:
<pre><code>uint8_t GetKeyPressed()
{
uint8_t r,c;
KEYPAD_PORT|= 0X0F;
for(c=0;c<3;c++)
{
KEYPAD_DDR&=~(0X7F);
KEYPAD_DDR|=(0X40>>c);
for(r=0;r<4;r++)
{
if(!(KEYPAD_PIN & (0X08>>r)))
... | In an abstract manner the code does this:
<pre><code>for each pin PA6 to PA4 (column)
set pin as output, driving '0'
for each pin PA3 to PA0 (row)
if pin reads '0' then
return key code calculated as row*3+column
return 0xFF as key code, meaning "no key"
</code></pre>
<ul>
<li><code>KEYPAD_... | Here is your code with the comments that it should have had all along added in, plus tables showing exactly what the shift operations are doing (the latter shouldn't be necessary for any experienced C programmer):
<pre><code>#define KEYPAD A
#define KEYPAD_PORT PORT(KEYPAD)
#define KEYPAD_DDR DDR(KEYPAD)
#define K... | https://electronics.stackexchange.com |
15,878 | [
"https://dba.stackexchange.com/questions/15878",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/6141/"
] | I have a table of <code>Producers</code> and a table of <code>Products</code>, both of which are of the form:
<ul>
<li><code>Id</code> - int, Primary key</li>
<li><code>Name</code> - nvarchar</li>
</ul>
A Producer can carry multiple Products, so I was going to create a table called <code>ProducerDetails</code> that wou... | For a many-to-many relationship, your best bet is to use a join table.
<pre><code>create table Producer
(
id int identity(1, 1) not null primary key clustered,
Name varchar(100) not null
)
go
create table Product
(
id int identity(1, 1) not null primary key clustered,
Name varchar(100) not null
)
go
c... | No, there is no value in adding an additional "primary key" to this table. Your joins are only ever going to refer to <code>ProducerID</code> and <code>ProductID</code>, so it is just dead weight. IMHO.
Though I agree with @Shark that the join table doesn't even seem to be needed here, unless you are going out of your... | https://dba.stackexchange.com |
227,720 | [
"https://softwareengineering.stackexchange.com/questions/227720",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/63589/"
] | I'm refactoring code and have reached a horribly gigantic switch statement. Every single API method available to end users is represented as an enum and we have a switch statement iterating over the enum and responding to each possible API call.
Each individual enum option has only a few lines of code. Any sufficien... | My advice would be to leave well alone.
A switch is the most efficient possible branching mechanism especially when coupled with an enum.
Anything else will incur a performance hit.
It may well be worth factoring out the inline code into separate methods for readability ( The JIT compiler will probably just inline t... | You say each <code>case</code> in your big <code>switch</code> corresponds to a public (also published?) API method. From this, I deduce that calls to those API <em>methods</em> are, in reality, calls to some common function with the corresponding enum parameter. I also assume you have the capability to change this pub... | https://softwareengineering.stackexchange.com |
100,411 | [
"https://cs.stackexchange.com/questions/100411",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/-1/"
] | In a programming class I take, we briefly (very briefly) touched lambda calculus. I think I have a pretty good grasp of the basics now, but one example given I just don't understand. Am I missing something or is the example possibly false?
<span class="math-container">$\lambda x.x \; (\lambda y.2*y) \; square \; 3$</s... | The problem is in (most likely wrongly) parenthesising expressions.
<span class="math-container">$\lambda$</span> abstraction goes as far right as it can, so your whole example is <strong>just one abstraction</strong> with body <span class="math-container">$x\ (\lambda y. 2 \cdot y)\ \texttt{square}\ 3$</span>, mean... | In <span class="math-container">$\lambda$</span>-calculus, every abstraction (= function) is unary.
For this reason, <span class="math-container">$square$</span> is the argument replacing <span class="math-container">$x$</span> and once it only remains the body of the function, 3 can be supplied as argument, replacing... | https://cs.stackexchange.com |
104,730 | [
"https://electronics.stackexchange.com/questions/104730",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/39440/"
] | Common emitter amplifier gives an amplified inverted output. So if I fed the inverted output to a speaker, would it sound fine ? If not, how do I get an amplified but non inverted output from a common emitter biased transistor ?
| In general, the absolute phase of audio signals doesn't matter.
But if it's a problem, just reverse the leads to the speaker!
| You could get an inverted vocal signal by rotating a microphone 180 degrees - does this sound bad? Given all the reflections going on when you record live music AND all the reflections and acoustic reverb you get when you listen to music, it should be no surprise that doing a single electrical inversion has no audible ... | https://electronics.stackexchange.com |
6,876 | [
"https://cstheory.stackexchange.com/questions/6876",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/1159/"
] | Below is a short informal proof that NP=co-NP implies NP=PSPACE. What's wrong with the proof?
Assuming NP=co-NP, an instance F of TQBF can be solved by a polynomial NDTM this way:
<blockquote>
Non-deterministically guess the values for all the variables corresponding to existential quantifiers in F.
The resultin... | A totally quantified boolean formula consists of an alternating sequence of quantifiers. This sequence is not of length 2, but arbitrarily long. That is the mistake you're making: an instance can be represented as a pair (P, phi) where phi is a propositional formula and L = (X_1, ..., X_k) is a partition of the set of ... | The problem is the part which you deduce "an instance F of TQBF can be solved by a polynomial NDTM" from "NP=co-NP."
Note that NP=co-NP means that you can solve the TAUTOLOGY problem using a polynomial-time NDTM, where the TAUTOLOGY problem is the following: Given a <strong>propositional</strong> formula φ, is it alwa... | https://cstheory.stackexchange.com |
48,952 | [
"https://dsp.stackexchange.com/questions/48952",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/10514/"
] | I have a continuous-time system that I want to fit via least squares. I just send $N$ digital samples $x[n]$ through the system and receive (via analog signal chain, ADC etc) $N$ digital samples $y[n]$. My system can be described as
$$
\mathbf{y} = \mathbf{X} \mathbf{c}
$$
where $\mathbf{X}$ is a matrix composed of $... | RLS is derived using the Woodbury Identity for rank-1 update.
I would go back and re-derive the RLS approach in light of Woodbury and generalize it to the block update case. I vaguely recall doing this before, but I can't recall when/what-for at the moment.
Here's the identity:
$$
(A+UCV)^{-1} = A^{-1} - A^{-1}U(C^... | If you have a good guess at the inverse of $A$ called $G_0$ to begin with, the approach you might be thinking of looks like this:
$$ P_n = G_n A = I + E_n $$
$$ ( I - E_n ) G_n A = ( I - E_n )( I + E_n ) = I - E_n^2 \approx I $$
Note that:
$$ ( I - E_n ) = ( 2 I - P_n ) $$
Therefore:
$$ G_{n+1} = ( 2 I - P_n ) ... | https://dsp.stackexchange.com |
4,449 | [
"https://physics.stackexchange.com/questions/4449",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1390/"
] | I have a particle at rest. At $t = 0$ a periodic force like $F_0 \sin\omega t$ starts acting on my particle. Can such a force transport my particle to infinity when $t \to \infty$? Please answer this question without solving the mechanical problem, just by intuition.
| Kostya has provided an excellent mathematical proof that it can. I will try to give a more intuitive explanation. Suppose the particle started with zero initial speed. Since the force is given as $F_0\sin(\omega t)$, the time for which the particle accelerates and decelerates would be the same (think about the graph of... | Here is what my intuition says:<br>
$m\ddot{x} = F_0\sin\omega t, x(0)=0, \dot{x}(0)=0$
$\dot{x}(t)=\frac{F_0}{m\omega}-\frac{F_0}{m\omega}\cos\omega t$
$x(t)=\frac{F_0}{m\omega^2}\left(\omega t - \sin\omega t\right)$
Hmmmm... Yes it can!
| https://physics.stackexchange.com |
427,947 | [
"https://physics.stackexchange.com/questions/427947",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/74/"
] | There is a famous problem which asks:
<blockquote>
Suppose an object is held at 1 au from the Sun and released from rest. How long does it take to fall into the Sun (neglecting the size of the sun)?
</blockquote>
The trick solution is to imagine the trip into the sun as the limit of an elliptical orbit where the se... | If you let the sun have its actual size and density structure (or its actual size but a uniform density), but imagine that your object can pass through without interacting, then it is true that it would shoot out the other side, but this would not be a Keplerian orbit--the object spends time inside the sun, and thus no... | <blockquote>
If we drop the object straight at the sun (and imagine that it can pass through the sun), then it should pass through the sun in a straight line, continue out the other side, and eventually wind up 1 au away from the sun on the opposite side.
</blockquote>
You need to be more precise about how you "imag... | https://physics.stackexchange.com |
189,181 | [
"https://physics.stackexchange.com/questions/189181",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/78980/"
] | I was going through <strong>fluid dynamics</strong> and I came upon this section on the <strong>shape of a liquid surface in a rotating cylindrical vessel</strong>. The working in the book is something like this:
It considers <strong>a mass $m$ of water</strong> on the surface of the rotating liquid at a distance $x$... | Imagine a little piece of water on the top surface at radius $x$. The height of the water is $y(x)$.
By moving inward $\mathrm{d}x$, the water would reduce its energy by $m g \mathrm{d}y = m g y' \mathrm{d}x$. It therefore feels a force of magnitude $m g y'$ towards the center.
This force causes the water to accelera... | Although Mark Eichenlaub's answer is perfectly fine, I will post this answer, so that the time I spent writing it won't go to waste, and someone might find its detailedness useful.
<img src="https://i.stack.imgur.com/E18kx.jpg" alt="Conical pendulum">
To understand what happens when you change back and forth between ... | https://physics.stackexchange.com |
96,348 | [
"https://dba.stackexchange.com/questions/96348",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/49056/"
] | I'm trying to drop all databases but one on my test server. For this, I'm using the below script but it gives error:
<pre><code>EXEC sp_MSforeachdb
'
USE [?]
IF (DB_ID(''?'') > 4 AND DB_NAME()!=''ABC'')
BEGIN
ALTER DATABASE ''?'' SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE ''?''
END
'
</code></pre>
Here... | Would you like to try this?
<pre><code>DECLARE @cmd1 nvarchar(2000)
SET @cmd1 = 'IF ''?'' NOT IN(''Name of your database'')' + 'BEGIN '
+ 'drop DATABASE [?] '
+ 'END'
EXEC sp_MSForEachdb
@command1 = @cmd1
GO
</code></pre>
it worked here.
PAY ATTENTION TO NOT DROP MASTER AND ETC. Put then on that list.
| After setting the db to singleuser you have to switch back to master. I added a use master statement but I don't want to test this....
<pre><code>EXEC sp_MSforeachdb
'
USE [?]
IF (DB_ID(''?'') > 4 AND DB_NAME()!=''ABC'')
BEGIN
ALTER DATABASE ''?'' SET SINGLE_USER WITH ROLLBACK IMMEDIATE
**use master;**
DROP DATAB... | https://dba.stackexchange.com |
121,907 | [
"https://stats.stackexchange.com/questions/121907",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/59570/"
] | I'm new to statistics, and I'm currently trying to solve an assignment for my course.
The assignment is to calculate the linear regression analysis/regression equation for a data set containing years and the percentage of unemployment in the population at that time.
While I'm not <em>entirely</em> sure how to do thi... | In principle, it doesn't matter - only the intercept term will be affected. Say that you want to estimate the regression Y = a + b<em>X + e. Remember that the slope coefficient can be calculated as b = Cov(Y, X) / Var(X), and a = Ym - b</em>Xm, where Ym and Xm are the sample means of the respective variables. Now, let'... | The second series can be written as the first one minus 2008.
<ol>
<li><em>Ought</em> it to make a difference to how we think unemployment changes over time when we start counting years from—the birth of Christ or the start of the data series?</li>
<li>Look at the least-squares equations & try to work out th... | https://stats.stackexchange.com |
75,713 | [
"https://softwareengineering.stackexchange.com/questions/75713",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/25092/"
] | I am trying to set up some sort of collaboration app/forum with unlimited threading; no difference between posts, threads, or forums. Any post can be answered an unlimited amount of time, and the same post can have several children, themselves having several children, and so on. Each post can also have several parents.... | If you're willing to go for adjacency lists, then why doesn't a simple foreign key to the parent of each post do the trick for you?
At any rate, stay away from nested sets for situations with many insertions. Anything you do to try to keep it efficient will make things complex and lose any advantage that the elegant ... | Why are we stuck on SQL-based, table-focused databases to solve a triangular problem? I would definitely go with something schema-less and document based here, especially for the proof of concept stage where you won't be doubling up every major change as you won't have a schema to modify.
| https://softwareengineering.stackexchange.com |
258,191 | [
"https://electronics.stackexchange.com/questions/258191",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/123884/"
] | I have solved full adder and it gives me carry:
\$A\$\$.\$\$Cin\$+\$B\$\$.\$\$Cin\$+\$A\$\$.\$\$B\$
But in some books I found that carry is written as:
\$A\$\$.\$\$B\$\$+\$\$(\$\$A\$\$\bigoplus\$\$B\$\$)\$\$.\$\$Cin\$
How to derive second equation from first?
| This is a classic <i>diff amp</i> circuit. In this case the circuit measures the voltage across R33, which is proportional to the current thru it.
The diff amp gives a single-ended voltage proportional to the difference between two input voltages. This is useful in that it allows the two input voltages to "float", m... | You should ask your hardware team to provide you the transfer function (ADC voltage as a function of current). This is an entirely reasonable request and better than asking a bunch of strangers on the Internet.
R42 adds an offset of 454mV to the amplifier non-inverting input, which is multiplied by 11 (5.00V out at ... | https://electronics.stackexchange.com |
282,294 | [
"https://electronics.stackexchange.com/questions/282294",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/136142/"
] | I guess I get confused because things don't work like they would in an RL circuit. In that case the emf at first 'jumps' to match the source's voltage and decays over time reaching zero eventually.
When we have a motor though it's the opposite. Why is that? My guess is the induction of the emf is not 'directly' relat... | Just like it's simplest to learn about a lossless inductor first, so let's start with more or less lossless motor. We'll take account of losses when we have to, but they are not essential for basic understanding.
A motor is also a generator. Spin it, and it generates volts on the armature. It doesn't matter whether i... | There are two parts that go into equilibrium in a motor: There is electrical balance and there is mechanical balance.
Electrically the voltage connected to the motor equals the counter emf and the losses because of the resistance of the armature on a DC motor (or the voltage drop because of the AC impedance on an AC m... | https://electronics.stackexchange.com |
104,345 | [
"https://mathoverflow.net/questions/104345",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25615/"
] | Hello,
Let $B$ and $n$ be positive integers. Let $p_i \ge 0 $ be such that $\sum_{i=0}^{2B} p_i= 1$.
I am interested in asymptotics (in terms of $B$, $n$, and $p_i$) for the coefficients of
$
(p_0 + p_1 x + p_2 x^2 + \dots + p_{2B}x^{2B})^n.
$
Of particular interest to me is the central coefficient, i.e., that of... | Since you ask specifically for an <em>easy</em> example (not a natural, useful, etc., one), I suggest taking any category in which there are two objects $A$ and $B$ for which Hom$(A,B)$ is not a one-element set (i.e., the category is equivalent to neither the initial nor the terminal category) and giving it the topolog... | You want a topology that is not "subcanonical", the definition of which is precisely that there are representable functors that are not sheaves. You could of course take a very fine topology, for instance the discrete topology in which every sieve is a covering sieve, and then most schemes are not sheaves (if you are ... | https://mathoverflow.net |
7,285 | [
"https://cs.stackexchange.com/questions/7285",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/5020/"
] | So we can prove that the language say $A = \{ \langle M,w \rangle \mid \text{M is TM that accepts } w^R \text{ whenever it accepts } w \}$ is undecidable by assuming it is decidable and use that to construct a $TM$ deciding $A_{TM}$. So by contradiction $A$ is undecidable. But what if the language was $\{ \langle M,w \... | Let $ A = \{\langle M, w \rangle \mid M \text { is a TM, } M \text { accepts } w \text { and on input } w^R \text { halts and rejects} \} $.
We prove that $A$ is not decidable by showing $\text{HALT}\le_m A$. The reduction works as follows. Let $\langle M, w \rangle $ be an instance of $\text{HALT}$, then we constru... | You can construct a recognizer that simply simulates M on w and then simulates M on $w^R$. This will halt in finite time for all that are in A (by definition), and then you can accept if the first simulation accepted and the second rejected. That suffices for the language being recognisable (recursively enumerable).
... | https://cs.stackexchange.com |
1,774,958 | [
"https://math.stackexchange.com/questions/1774958",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/294365/"
] | <blockquote>
Is $M_a=\{f\in \mathcal C[0,1]:f(a)=0\}$ where $\mathcal C[0,1]$ denotes the ring of continuous functions in $[0,1]$ a Principal ideal?
</blockquote>
<strong>My try</strong>:
Let $M_a=\langle f_1\rangle$
.Consider $f(x)=\sqrt {|f_1(x)|}$ then $f(x)=g_1(x)f_1(x)$ .
Now $|g_1(x)|\le M$ since image of a ... | The idea is right, and little modification is needed.
For any given $\epsilon\gt 0$, there is a neighbourhood of $a$ such that if $x\ne a$ is in that neighbourhood, then $0\ne |f_1(x)|\lt \epsilon$.
Let $x\ne a$ be in that neighbourhood, and suppose that $|f_1(x)|=\theta$. Then $\sqrt{|f_1(x)|}=\sqrt{\theta}$ and t... | It is not principal.
Suppose $M_a$ is generated by $f_1$, then $f_1$ has only one zero, $a$ since if it has another zero $b\in [a,b]$ there exists $g:[a,b]\rightarrow R$ continuous such that $g(b)\neq 0$ and $g(a)=0$. Without restricting the generality, we can suppose:
$f_1$ has a constant sign, in this case I adapt... | https://math.stackexchange.com |
339,371 | [
"https://electronics.stackexchange.com/questions/339371",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/165573/"
] | Making a hot wire foam cutter, Using 24 Swg gauge Nichrome wire.
Resistance of wire is 4.39 Ohm/M. I'm using 5cm so divided the amount of resistance as per cm respectively that would be 0.219 Ohms and did a testing with a multi meter. I'm using a 12 volt 1 amp adapter. Fitted up the whole circuit and powered it up but ... | If R = 0.219 Ohms to reach >1000'C may need > 12W ~ 15W
<ul>
<li>Since V²/R=P , V=√(R*P) = √(0.22Ω*15W) = 1.82V </li>
<li>Since I=V/R , I = 8.3A</li>
</ul>
Consider using AWG 30 to 36 with 5V to 12V or use an ATX power source 3.3V 20A supply with current limiting.
Industrial foam cutters prefer to use smaller gaug... | At 12V your current would be 54A, so the current protection is definitely kicking in, and your voltage will not be anything close to 12V.
If your current is 1A, your heat will be 200mW, which should at least be warm.
It's possible that your power supply is deciding that the resistance is so low that there must be a ... | https://electronics.stackexchange.com |
53,801 | [
"https://cs.stackexchange.com/questions/53801",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/47124/"
] | I am a sophomore taking a course in algorithm analysis. We were asked by our professor to calculate time-complexity of several C functions, but some of them were incorrect and would result in a compile error. As far as I know time complexities of correct algorithms are calculated and then we choose which one to impleme... | On a more practical level, it sounds like this probably just stems from a typo on the instructor's part. If this is in the context of a big-O exercise, I'd just fix the typos and move on. Instructors do make mistakes too!
Getting a bit more abstract, if a program won't run, it doesn't really make sense to speak of its... | Not obviously - if complexity is below the lower bound - it is probably wrong (e.g. summing N elements require to read N, cannot get lower), but N^2 tells this is not optimal, but this is unknown from that stat whether it works in fact.<br>
If there are simple loops - you can calculate complexity without executing it.<... | https://cs.stackexchange.com |
1,177,428 | [
"https://math.stackexchange.com/questions/1177428",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/178859/"
] | So I am new to cycle notation and needless to say I am finding it a bit confusing.
I know that when computing these, I need to work right to left=.
Compute each of the following:
a. $$(12)(1253)$$
1→2, 2→5, 5→3
1→2
So I think this equals (33) because the second term will send both 1 and 2 to 3
$$(12)(1253)=(1253)$... | The permutation $\pi = (12)(1253)$ can be written as disjoint cycles the following way. Let $\sigma = (12)$ and $\tau = (1253)$. Thus, our permutation $\pi$ is the composition $\sigma \circ \tau$, which we'll write as $\sigma\tau$.
To see what $\pi(1)$ is, we need to know that
$$\pi(1) = \sigma(\tau(1)) = \sigma(2) ... | Use the expansion $(ab)(bcd)=(abcd)$, so $(12)(1253)=(12)(12)(253)=(253)$.
| https://math.stackexchange.com |
681,472 | [
"https://physics.stackexchange.com/questions/681472",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/321384/"
] | When reading <em>Concepts in Thermal Physics (second edition)</em> by Stephen and Katherine about the concepts of the third law, I met with such a problem. The text reads as follows:
<blockquote>
Consider a perfect crystal composed of <span class="math-container">$N$</span> spinless atoms. We are told by the third law ... | Escape velocity is a minimum velocity a body at a given point must have to escape the gravitational field of some other body.
Escape velocity depends on initial location of the body. If the initial position is very far from this other body you only need to push it a little bit and it will fly away and never return. The... | I think there is some confusion in the phrasing of your question - there are 2 interpretations:
<ol>
<li>If you are at an infinite distance from a body then you have already 'escaped' - so 0 velocity is required to achieve that.
</li>
<li>However - I THINK you mean why does the escaping body HAVE zero velocity when it ... | https://physics.stackexchange.com |
2,112 | [
"https://mechanics.stackexchange.com/questions/2112",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/891/"
] | Earlier today while driving out East on Long Island I stopped to fill my tank with gas, and at the station, all the pumps had the usual Regular, Mid, Premium on one pump, but on the 2nd pump which typically holds Diesel, there was a sticker for Racing Fuel.
The button for the fuel indicated a 100 Octane level, whereas... | A lot of performance Japanese cars are tuned for higher octane fuels from the factory, and will often pink badly on anything less than 97. I suspect the "Racing Fuel" will have other additives as well. If your car is tuned for 93 it would probably still run on 100, but certainly won't run well. (out of interest, what r... | <blockquote>
... I'm curious about if such fuel is safe to use in your typical
stock engine on a passenger car
</blockquote>
If they've added lead, no. I suspect that it's very unlikely that anyone is selling leaded gas at a common access pump (at the race track, maybe).
If no lead, then it's quite likely fine b... | https://mechanics.stackexchange.com |
209,882 | [
"https://physics.stackexchange.com/questions/209882",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/94203/"
] | I'm having problems calculating acceleration for the following variables. I would have thought it would be extremely straight forward, except I am getting two different answers and do not know which one is correct.
I have the following variables:
<span class="math-container">$$\begin{align}d &= 229.75\ \mathrm{cm... | The current flows through <strong><em>both</em></strong> resistors.
What works for me is to use the analogy of fluid through pipes under pressure.
Imagine two huge tanks, connected by two small pipes of different sizes. The pressures in each of the two tanks are analogous to the two voltages. The pipes are analogou... | Consider resistors $R_1$,$R_2$,$R_3$ connected in parallel (voltage $V$ is across them, $I$ is the total current from $V$. and $I_1$,$I_2$ and $I_3$ are currents in each resistor)
The voltage across each resistor is same, which is $V$. So current would be same through it, even hundreds of resistances are connected in p... | https://physics.stackexchange.com |
517,617 | [
"https://physics.stackexchange.com/questions/517617",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/228579/"
] | I understand the principles of relativity. I understand why we need relativity if we are to have the laws of physics be the same in all inertial frames. But physically speaking, how does relativity actually work? In particular, I was thinking about length contradiction, and I don't understand <em>how</em> moving object... | The object does not physically shrink. Its length appears to change when viewed from a moving reference frame. You must remember that the effects of relativity are symmetrical. If a fast moving spaceship, and all the people in it, seem to have contracted in length from your perspective, from their's it is you who is fa... | It shrinks for simultaneous (according to your own clock) readings of a your meter stick at both ends. Given that the object is in a different frame, the measurement cannot be simultaneous to it's clock, and will furthermore be of a not contracted length. So you have a "shorter" time displacement and you should have as... | https://physics.stackexchange.com |
39,020 | [
"https://chemistry.stackexchange.com/questions/39020",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/21883/"
] | As far as I understand $\ce{SO4^2-}$ structure, sulfur makes two coordinate bonds with two oxygen atoms and two double bonds are formed with oxygen after sulfur expands it's valance shell to 6. At this point calculating formal charge of those two coordinate bonded oxygen gives total formal charge of −2 and the formal ... | The ion is not one S atom and 4 O atoms together. The ion on the whole is having two negative charges, Thus it is somewhat like 1Sulphur + 4 Oxygen+2 electrons. It is not as though there was one sulphur and four neutral oxygen atoms, and they became negatively charged during bond formation. The bond must have formed in... | Tho sulfur and oxygen are not neutral atoms. The oxidation state of sulfur is 6+, and of each oxygen is 2-. It slightly helps to think about it as being bonded ionically, even though the bond nature is rather covalent. Together it all ends up being 2-.
| https://chemistry.stackexchange.com |
2,264,619 | [
"https://math.stackexchange.com/questions/2264619",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/272329/"
] | <ul>
<li>I need to compute the probability of getting more than $x$ "successes" in a large number of trials $\left(\,10^{11}\,\right)$ of an event with a small probability $\left(\,10^{-7}\,\right)$.</li>
<li>Exact Binomial won't work, and the Poisson approximation does not seem appropriate. </li>
</ul>
Than... | <em>As requested in comments:</em>
You could use R: for example the probability of being strictly more than $9876$ could be about
<pre><code>> pbinom(9876, size=10^11, prob=10^-7, lower.tail=FALSE)
[1] 0.8917494
</code></pre>
This compares with the normal approximation with continuity correction of being above $... | I'm guessing that if the Poisson approximation does not seem appropriate, it's because the expected value and the variance (which, for the Poisson distribution, is the same as the expected value) are so big. In that case, approximating it by a normal distribution can serve.
If $X\sim\operatorname{Poisson}(\lambda)$ th... | https://math.stackexchange.com |
94,020 | [
"https://physics.stackexchange.com/questions/94020",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/37510/"
] | I think this is a question about the mathematical axioms of quantum mechanics...
Consider the following operators $\tilde{x}$ and $\tilde{p}$ on Hilbert space $L^2(R)$, defined for fixed $\delta>0$:
$$
(\tilde{x}\psi)(x) = (n+1/2) \delta\ \psi(x)
$$
when $n\delta \leq x <(n+1)\delta$ for some integer $n$; and
$... | Concerning $\tilde{x}$, it is self-adjoint (the proof is easy) if it is defined on its natural domain $D(\tilde x)$. For $\gamma_n(x):= (n+1/2)\delta$ if $n \delta \leq x <(n+1)\delta$ and $n \in \mathbb Z$
$$D(\tilde{x}) = \left\{\psi\in
L^2(\mathbb R) \:\left|\:\int_{\mathbb R} |\gamma_n(x)\psi(x)|^2 dx < +\i... | <blockquote>
Is there some requirement that observable operators should map C∞ functions to C∞ functions? In any case, I'd be grateful if someone could tell me why the above is ruled out.
</blockquote>
By defining the position operator in the way you've indicated, you would introduce $artificial$ lattice of preferre... | https://physics.stackexchange.com |
212,624 | [
"https://dba.stackexchange.com/questions/212624",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/132952/"
] | I have a following table structure in Postgres:
<pre><code> id | account_id | plan_id | active
----+------------+---------+--------
1 | 0cYd7Ak | 1 | f
2 | Uk02q1d | 1 | t
3 | eRlk810 | 2 | f
4 | Uk02q1d | 2 | t
5 | 0cYd7Ak | 1 | t
6 | ... | Your query seems correct (although it may not be the most efficient).
There are many ways to write this type of query. For example, you could use <code>EXISTS</code> to avoid counting in the correlated subquery:
<pre><code>select * from table_name t1
where exists
(select 1 from table_name t2
where t1.... | You can also try with <code>HAVING</code> clause.
<pre><code>select account_id, count(id) as repetita
from t1
group by account_id
having count(id) > 1 ;
</code></pre>
with this solution remember to add the field you want to output to <code>group by</code> also
| https://dba.stackexchange.com |
9,213 | [
"https://cardano.stackexchange.com/questions/9213",
"https://cardano.stackexchange.com",
"https://cardano.stackexchange.com/users/6733/"
] | Is this even possible?
<pre><code>traceIfFalse ("A"++show(scriptContextTxInfo)) FoundIt
</code></pre>
As logging onchain is just possible with this traceIfFalse ... I'm not finding a solution to make that line work
| What I've done to debug <code>Integer</code>s is to write a function that converts them into a <code>BuiltinByteString</code> and then decodeUtf8 it into a <code>BuiltinString</code> which is passed to any of the available <code>trace</code> functions.
I assume it could work for more complex data as well, but I have no... | This is probably not possible as the redeemer code is manipulated/examined from within a template haskell splice and you are running into what is called the "template haskell stage restriction".
| https://cardano.stackexchange.com |
322,008 | [
"https://softwareengineering.stackexchange.com/questions/322008",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/220574/"
] | I have a problem how to go about naming my namespaces and classes. I already figured they shouldn't both have the same name, as it causes all kinds of problems. Most notable problem for me is that I need to fully qualify the class or make an alias. Here is what I have:
<pre><code>Model.DataSource.DataSource
Model.Data... | You're right that you shouldn't name the namespace the same as a type it contains. I think there are several approaches you can use:
<ul>
<li>Pluralize: <code>Model.DataSources.DataSource</code>
This works especially well if the primary purpose of the namespace is to contain types that inherit from the same base type o... | .NET design guidelines requires <code>I</code> prefix for interfaces. It recommends singular form for classes (<code>Collection</code> suffix for everything implementing <code>IEnumerable</code>) and plural form for namespaces.
| https://softwareengineering.stackexchange.com |
3,393,092 | [
"https://math.stackexchange.com/questions/3393092",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/701318/"
] | Let <span class="math-container">$X$</span>, <span class="math-container">$Y$</span>, <span class="math-container">$Z$</span> be random variables such that <span class="math-container">$X \sim N(0,1)$</span> and conditional on <span class="math-container">$X = x$</span>, <span class="math-container">$Y$</span> and <spa... | <blockquote>
But how do I find <span class="math-container">$E[XZ]$</span>, <span class="math-container">$E[XY]$</span>, <span class="math-container">$E[YZ]$</span>, ...?
</blockquote>
<ol>
<li><span class="math-container">$E(XX) = E(X^2) = Var(X) + E(X)^2 = 1.$</span></li>
<li><span class="math-container">$E(XY)= ... | In effect you have <span class="math-container">$X,V,W$</span> i.i.d. <span class="math-container">$N(0,1)$</span> with <span class="math-container">$Y=X+V, Z=X+W$</span>, with <span class="math-container">$Y$</span> and <span class="math-container">$Z$</span> having identical but not independent distributions
so
<u... | https://math.stackexchange.com |
348,112 | [
"https://physics.stackexchange.com/questions/348112",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/139680/"
] | Why does $P=i^2R$ apply only to transfer of electrical potential energy to thermal energy in a device with resistance while $P=iV$ apply to electrical energy transfers of all kinds?
| <blockquote>
Why does P=i^2R apply only to transfer of electrical potential energy to thermal energy in a device with resistance
</blockquote>
How would you expect a formula involving a term "R" to apply to something that doesn't have any characteristic called "R"?
<blockquote>
while $P=iV$ apply to electrical e... | Remember the definition of voltage as energy change upon moving a charge. So you know the energy changes by QV for every charge that moves across. That gives a rate IV. It didn't have to be an Ohms law resistor in this derivation.
| https://physics.stackexchange.com |
262,506 | [
"https://stats.stackexchange.com/questions/262506",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/112088/"
] | Bayes' rule is given by:
$$P(\theta|X) = \frac{P(X|\theta)P(\theta)}{P(X)}$$
Where $X$ are observations and $\theta$ is some model parameter. I would like to use an alternate notation to more strongly differentiate between the prior $P(\theta)$ and posterior $P(\theta|X)$ distributions. Is it appropriate to write:
$... | If you want to distinguish them, you can use subscripts on the probability mass (or density) functions directly (as you have done in your second example). For simplicity, this is usually written using conditional notation, i.e.
$$
P_{\theta|X}(\theta|X) = \frac{P_{X|\theta}(X|\theta)P_\theta(\theta)}{P_X(X)}
$$
This ... | $\theta$ is the same random variable in both the posterior and the prior. The difference is that in the posterior you are conditioning on the data. It's your understanding of the values $\theta$ can take after you've considered the data whereas the prior is your understanding before considering the data. The $|X$ is al... | https://stats.stackexchange.com |
24,718 | [
"https://electronics.stackexchange.com/questions/24718",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/1877/"
] | Idea:
Run a 68000 emulator on a PC, and connect the PC to an existing 68000 system, replacing the CPU with a ribbon cable going to the PC.
I realize the emulation would not be cycle exact, but that is not the goal.
Question: how much would it take in terms of glue logic between the systems, minimum?
I have some cra... | Get a PCI style FPGA board that you can use generic IOs for the target 68000 connection. Implement your control system in the FPGA, and write software to tell it what to do. That's basically making your own ICE kit. If the commercial ICE kits are horrendously expensive (check and find out if they are, I don't know), th... | I would imagine this would be nigh on impossible to do.
Firstly, timing is critical in a CPU.
The CPU, while the master "device" in the system, is not the absolute master of all.
It is slave to the system clock.
Your PC and it's interface, and the emulator, would all be required to be slave to this master clock.
T... | https://electronics.stackexchange.com |
126,614 | [
"https://softwareengineering.stackexchange.com/questions/126614",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/11107/"
] | I write business applications for a living. Often, for whatever reason, an interviewer asks me to write up a program to solve some kind of game like problem. I find this to be an inappropriate question for two main reasons:
<ol>
<li>Games often deal with constructs that are rarely used in business dev. E.G. Multi-d... | It's one of those "We want to inteview like Google/Facebook/Amazon/etc" questions. Unless you're actually interviewing for a position at a game company, it wouldn't be useful to ask such questions. It would be more valuable to discuss/test something related to the problem domain of the company. For example, if I wanted... | I have used them in my interviews and I have been asked similar question in interviews. Most of these questions are designed to gauge how well can you break a task into smaller components and how "neatly" for the lack of the better word can you make interactions between the components.
Normally I don't hover over the... | https://softwareengineering.stackexchange.com |
65,052 | [
"https://dba.stackexchange.com/questions/65052",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/29903/"
] | In SQL Server 2005, I would like to make one query that checks if all record columns of 2 tables are the same,
Example:
<pre><code>declare @tbl1 table(col nvarchar(50))
declare @tbl2 table(col nvarchar(50))
insert into @tbl1
select '11' union select '22'
insert into @tbl2
select '22'
--should return false
</... | I think this will work:
<pre><code>SELECT CASE WHEN NOT EXISTS
( SELECT * FROM table1
EXCEPT
SELECT * FROM table2
)
AND NOT EXISTS
( SELECT * FROM table2
EXCEPT
SELECT * FROM table1
)
THEN 'True' ELSE 'False'
... | The code below will convert all the values of a column to a string which it then hashes. Running this code on both tables and comparing the two hashes will tell you if they are identical or if there is a difference.
<pre><code>SELECT HASHBYTES('MD5', CONVERT(VARCHAR(20), col))
FROM @tbl1 FOR XML PATH('')
</code></pr... | https://dba.stackexchange.com |
9,522 | [
"https://security.stackexchange.com/questions/9522",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/5941/"
] | I which forms can visiting certain sites compromise one's system security, taking into account that browsers keep a sandbox for each opened page?
Nowadays, can a malicious -or attacked- site really, for instance, steal all stored passwords from a client or infect him with a virus?
| You raise several issues.
<h2>Server trust</h2>
You never know what the server will do with your password once you send it
<h2>Password reuse</h2>
Password reuse can be prevented by <em>you</em>: don't use the same password at multiple places.
<h2>Hashing</h2>
If you were to hash the password before sending it to... | Unless the service provider lets you see the database, no, there is no way to guarantee it. This has proven to be a risk in the past and no doubt will again.
You can't do much in this scenario before the server to pre-hash your password, as that basically makes your pre-hashed password the target that your password wo... | https://security.stackexchange.com |
335,136 | [
"https://softwareengineering.stackexchange.com/questions/335136",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/136084/"
] | There are some things I am pretty strict about, but <code>const</code> has not been one of them.
For example, I might make a local variable that I use three times in a function, that does not get changed, and yet I do not bother making it const.
Is this something that I should be more strict about? Are there any tang... | <blockquote>
Is this something that I should be more strict about? Are there any tangible benefits that I should be aware of?
</blockquote>
As @JerryHeremiah points out, after some point it doesn't add anything for compiler optimization, but it can improve readability.
I tend to do this (use const when possible, fo... | <blockquote>
Make interfaces easy to use correctly and hard to use incorrectly
</blockquote>
<code>const</code> allows you to do just that. If your function returns a set of items that the caller of the function isn't allowed to modify, don't rely on the caller reading the documentation, just return <code>const</cod... | https://softwareengineering.stackexchange.com |
368,800 | [
"https://softwareengineering.stackexchange.com/questions/368800",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/19962/"
] | I am designing a library that abstracts a typical CRUD http service named FooService.
In this library I am throwing different exceptions like <code>FooServiceClientException</code> for network related errors or <code>FooServiceObjectNotFound</code> when trying to retrieve an object by a non-existing id. I also have a ... | Throwing a generic exception like <code>FooServiceException</code> makes your method signature easy to read, but you're also assuming the caller is not likely going to want to differentiate. If he did, he could still do so, but he'd have to pilfer through your code to find out which specific implementations of <code>F... | The exception specification is an addendum to the return value, so it should follow similar guidelines.
I would suggest that you use the <em>least specific type</em> that satisfies the needs of the consuming code. In your case that might be <code>FooServiceException</code>, but it's equally plausible that <code>Except... | https://softwareengineering.stackexchange.com |
177,829 | [
"https://mathoverflow.net/questions/177829",
"https://mathoverflow.net",
"https://mathoverflow.net/users/459/"
] | For an additive category $\mathcal C$ there is the notion of a Serre functor on $\mathcal C$, i.e. a an autoequivalence $S$ of $C$ such that there exist isomorphisms
$$Hom(A, S(B)) \cong Hom(B, A)^*$$
natural in $A,B \in \mathcal C$.
If $\mathcal D$ is a full subcategory of $\mathcal C$ that is preserved by $S$, when ... | It's not true that $D^b(\mathcal{O}^{\mathfrak{p}})$ is a full subcategory of $D^b(\mathcal{O})$. Think about the case $\mathfrak{g}=\mathfrak{p}=\mathfrak{sl}_2$. The category $\mathcal{O}^{\mathfrak{p}}$ is finite-dimensional modules and thus semi-simple, whereas in $D^b(\mathcal{O})$, we have that $\mathrm{Ext}^2(... | I never looked into [1], so I cannot comment on it, let me write only some generalities about the Serre functors.
I will assume that the categories $C$ and $D$ are triangulated. Then if you know that both $S$ and $S^{-1}$ preserve $D$ then you can conclude that $S_{|D}$ is the Serre functor of $D$. Indeed, $S_{|D}$ is... | https://mathoverflow.net |
179,858 | [
"https://dba.stackexchange.com/questions/179858",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/73085/"
] | I have installed Oracle 12c R2 on my local Windows 10 (64 Bit) machine. For the installation I choose only to install the software.
After the installation I have used the tool that comes with the installation to create databases. After the first database was created and started I was able to connect to it without any... | I have found the problem which was that the databases started by the Windows service manager were started with a user that appears not to have sufficient permissions.
This is confusing since I have selected the default setting while installing to use Oracles virtual user. This virtual user seems not to have write per... | I ran into the same problem. The database did not start with the service. First I checked the setting for the service using the Oracle Administration Assistant for Windows and configured the DB to start with the service start (by the way, I prefer the database to shut down immediately when the service is shut down).
B... | https://dba.stackexchange.com |
174,391 | [
"https://electronics.stackexchange.com/questions/174391",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/77662/"
] | I'm not electronics savvy and am a complete newbie. So I'm in the middle of a project and am trying to stick a potentiometer through an aluminum casing and I placed a 1/16" piece of rubber between the fairly thick aluminum (A Hammond 1560BB enclosure) and the base of the potentiometer.
However, there is a little piec... | You drill a second, much smaller hole. That protrusion keeps the pot in place when it gets turned past one of its ends and the screw isn't enough to hold it tight.
| That little tab is an anti-rotation device. It normally goes into an extra hole in the panel.
I often just snap it off or bend it out of the way for many of my one-off projects. An internal-tooth lock-washer installed between the pot and the panel prevents the pot from rotating.
| https://electronics.stackexchange.com |
395,242 | [
"https://softwareengineering.stackexchange.com/questions/395242",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/305765/"
] | Consider these two approaches:
<strong>Configuration dictionary within class</strong>
<pre><code>DEFAULT_PARAMETERS = {
"name": "Generic Room",
"description": "This is a sample description."
}
class Room:
"""Base class for a room"""
def __init__(self, parameters=DEFAULT_PARAMETERS):
for key,... | Make a .net web service that receives the data submitted by the form.
Add that data to a database, using transactions to maintain consistency
After adding the data to the Database call a second FileExport
FileExport reads the database, generates the file and writes it to the s3 bucket.
FileExport also buckets incom... | I think it is best not to append the files while uploading. You could upload the different files. Then you could have a lambda trigger on new files in S3 which does the concatenation.
But in any case there will be a short moment where no file is available while the concatenated file is being uploaded.
| https://softwareengineering.stackexchange.com |
375,019 | [
"https://electronics.stackexchange.com/questions/375019",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/137828/"
] | I am planning on making a musical instrument where I require the conversion of vibration of a material to voltage. The idea is to make a percussion instrument where I hit a plate made of a certain type of material. Based on the different areas on which I hit the plate, the vibrations will be different and after convert... | There are basically two ways to transmit energy under water:
<ol>
<li>without any contact, through a dielectric like plastic, using induction with AC currents. I've seen a lot of devices charging like that.</li>
<li>through pins which are encrusted inside plastic (so only the extremity points outside). Of course, you ... | Those pins are only connected to the battery or whatever when the power chip senses a charging current available - otherwise there is no real connection...
| https://electronics.stackexchange.com |
200,081 | [
"https://dba.stackexchange.com/questions/200081",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/146623/"
] | We saved the timestamp with <strong>UTC</strong>. However, we would like to choose user to their own time zone. There is no problem at display. But problem at the date range query.
<blockquote>
<strong>Asia/Singapore</strong> : 13/03/2017 0:00 AM (0:00)
<strong>UTC</strong> : 12/03/2017 4:00 (16:00) PM
</blockquote>
Si... | I found <code>CONVERT_TZ</code> and it's working fine now.
<pre><code>SELECT * FROM re_registers WHERE CONVERT_TZ(created_at,'+00:00','+08:00') between "2018-01-24" and "2018-01-25";
</code></pre>
| The TZ is <em>not</em> stored in either datatype.
If you want a picture of the clock on the wall, use <code>DATETIME</code>. Everyone will see the same hour. That is, the bits on the disk represent <em>localtime</em>
If you want to store an instant in time, use <code>TIMESTAMP</code>. Different users in different ... | https://dba.stackexchange.com |
45,889 | [
"https://stats.stackexchange.com/questions/45889",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/17112/"
] | What exactly is the difference between the Region of Rejection and P-value, when doing Hypothesis Testing?
Read this online:
<blockquote>
To find a rejection region, work backwards from the level of significance (α) to a value of the test statistic (call it $z^*$). Values of the test statistic that are farther f... | The significance level is the probability of getting a result in the rejection region, given the null hypothesis is true.
Note that the alternative puts an ordering on your test statistic - the values of the test statistic <em>most</em> in keeping with the alternative are the ones you want in your rejection region.
... | First, remember that you need to specify your null hypothesis and alternative hypothesis before you can calculate any of these quantities.
Simply put, <strong>critical value</strong> is to <strong>test statistic</strong> as <strong>significance level</strong> is to <strong>p-value</strong>. As a reminder, the critica... | https://stats.stackexchange.com |
336,701 | [
"https://softwareengineering.stackexchange.com/questions/336701",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/254660/"
] | Where is the figurative line drawn for using static services in a project? I am a coop student working and learning how to write .net MVC projects. I've been developing <em>trying</em> to stick to TDD. In my project I'm using ninject for dependency injection. I have written an abstract and a class implementing that for... | Static methods are problematic because they prevent dependency injection for users of that static method.
First, let me be clear that this is not always an issue. If a function is pure (maintains no state across calls, and does not perform any I/O), then you can just test it directly once, and then use it in other cod... | Testing static classes can be done with a trick: design your static class such that it is actually some kind of wrapper around an instance: all calls to the static class are forwarded to an instance which actually does the job. Then add a static method <code>void SetInstanceForTesting(IInterfaceOfTheInstance instance)<... | https://softwareengineering.stackexchange.com |
361,081 | [
"https://mathoverflow.net/questions/361081",
"https://mathoverflow.net",
"https://mathoverflow.net/users/123075/"
] | Consider the following adjacency matrix of a complete graph:
<span class="math-container">$$A=(e^{-|i-j|})_{1\leq i\neq j\leq n}$$</span>
with 0 on the diagonal. Let <span class="math-container">$D=diag\{d_1,...,d_n\}$</span> be the degree matrix where <span class="math-container">$d_i=\sum_{j\neq i}e^{-|i-j|}$</span>.... | <strong>Edit:</strong> This turns out to be quite simple. Observe that <span class="math-container">$a_{1i} / a_{2i} = q$</span> does not depend on <span class="math-container">$i \in \{3, 4, \ldots, n\}$</span>. Thus, if <span class="math-container">$x_1 = 1$</span>, <span class="math-container">$x_2 = -q$</span> and ... | This is not an answer, but too long for a comment.
<hr>
Consider a <em>doubly infinite</em> matrix <span class="math-container">$L = (q_{ij})_{i,j \in \mathbb{Z}}$</span> with entries <span class="math-container">$q_{ij} = -e^{-|i - j|}$</span> when <span class="math-container">$i \ne j$</span>, and <span class="mat... | https://mathoverflow.net |
142,683 | [
"https://physics.stackexchange.com/questions/142683",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/31340/"
] | The Sun probably easily dominates in its impact on the atmospheric temperature of Earth. However, for roughly half of each day, each side of Earth faces away from the Sun. Combined, the time spent facing toward the Sun and away from the sun result in the somewhat varying but generally stable temperature levels we exper... | As you can see, $\rho$ only depends on a single variable: $r$. Thus, it should be intuitive that one can do this problem by integrating only over the variable $r$.
To see what you are supposed to do, consider what happens if you fix $r$: You obtain a spherical shell (as was pointed out in the comments). The moment of ... | This solution uses multiple integrals but you don't need to compute them. The final computation is a single integral.
The ball has spherical symmetry so its momentum of inertia is the same with respect to the $x$-axis, the $y$-axis and the $z$-axis $I=I_x=I_y=I_z$ with
$$I_z=\iiint \rho(r)\left(x^2+y^2\right)\mathrm ... | https://physics.stackexchange.com |
41,915 | [
"https://electronics.stackexchange.com/questions/41915",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/8769/"
] | We know the frequency of a direct current is zero. The reason is that there is no repetitive pattern.
But I was stumbled when I noticed, why can't that straight line be cut into smaller pieces, and can we treat it as infinite frequency? I have included a picture below as an example
<img src="https://i.stack.imgur.co... | Very clever, but that's not how it works.
By your reasoning you should not only be able to make the frequency infinite, but also 4 Hz, or 100 Hz, or \$\sqrt{2}\$ Hz, all at the same time, with the same signal. And that's why you can't do that: a repeating signal <em>can have only 1 fundamental frequency</em>, which ... | Yes you can treat an infinite line as a repeating segment of some arbitrary wavelength to obtain a periodic signal. However, the function within this period is a flat zero. So if we look into the frequency domain of this periodic signal, we will see that it has no amplitude at its fundamental, nor any harmonics. They a... | https://electronics.stackexchange.com |
370,398 | [
"https://physics.stackexchange.com/questions/370398",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/167873/"
] | I’ve looked at the answers given to the previous times this question has been asked, but I still don’t seem to understand how this holds in the case of a closed circuit. Here’s an explanation given before:
“Think of the wire as a horizontal cylinder. If you apply an electric field pointing to the left, the electrons i... | Maybe there is confusion between the static case and the non-static case? The first statement applies to a static situation for any conductor of finite conductivity. For example, if a closed copper circuit is placed between the plates of a capacitor, the charges will move and finally the electric field within the coppe... | You can think of voltage as the force the battery is applying to force charges through other things. Ideal wires don't resist the movement of charge at all, so none of the voltage is wasted in the wire: all of it will be applied to whatever other elements are in the circuit, which actually require something to push cha... | https://physics.stackexchange.com |
2,299,049 | [
"https://math.stackexchange.com/questions/2299049",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/450065/"
] | This questian I encountered in a book named MATHEMATICAL ANALYSIS by Savita Arora .This comes under convergence test.
$$\sum\frac{1}{\sqrt{n}}\tan\frac{1}{n}$$ what series must be used to compare this.I used $\dfrac{1}{\sqrt{n}}$ to compare $$\dfrac{1}{\sqrt{n}}<\frac{1}{\sqrt{n}}\tan\frac{1}{n}$$ So since $\sum\d... | Use the limit comparison test. We know that
$$
\lim_{x\to 0}\frac{\tan x}{x}=1.
$$
In particular
$$
1=\lim_{n\to \infty}n\tan (1/n)=
\lim_{n\to \infty}\frac{\frac{1}{\sqrt n}\tan(1/n)}{\frac{1}{n^{3/2}}}.
$$
Since $3/2>1$ the series converges.
| Hint:
$$x<\tan x<\tan(1)x\quad\forall 0<x<1$$
let $x=\frac1n$ and apply the comparison test.
| https://math.stackexchange.com |
722,443 | [
"https://physics.stackexchange.com/questions/722443",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/342970/"
] | In QM we work with <span class="math-container">$H=L_2(\mathbb{R}^3)$</span> as a Hilbert space of square-integrable complex-valued functions. Now we define a special set of three operators <span class="math-container">$L_x, L_y, L_z$</span> by <span class="math-container">$L_i = \varepsilon_{ijk} \hat{x}_j \hat{p}_k$<... | It depends on the precise rigorous definition of a vector of selfadjoint operators. Usually, there is a dense invariant subspace for the operators and the generators of rotations, where all linear combinations of the three operators are essentially selfadjoint. In that domain, the exponentials of the angular momenta c... | If you multiply <span class="math-container">$A_k$</span> by the same <em>scalar</em> function <span class="math-container">$f(r)$</span>, then <span class="math-container">$f(r)\vec A$</span> remains a vector so since <span class="math-container">$f(r)$</span> is otherwise pretty arbitrary there are (up to some techni... | https://physics.stackexchange.com |
1,855,748 | [
"https://math.stackexchange.com/questions/1855748",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/298824/"
] | <blockquote>
<blockquote>
Find a solution of the differential equation: $$\frac{d\left(x^2\frac{dy}{dx}\right)}{dx}=x\frac{dy}{dx}-y+5$$
</blockquote>
</blockquote>
<hr>
What I have attempted:
Consider: $$\frac{d\left(x^2\frac{dy}{dx}\right)}{dx}=x\frac{dy}{dx}-y+5$$
$$ \frac{d}{dx} (x^2 \frac{dy}{dx}) =x\... | $$\frac{\text{d}}{\text{d}x}\left(x^2\cdot\frac{\text{d}}{\text{d}x}\left(y(x)\right)\right)=x\cdot\frac{\text{d}}{\text{d}x}\left(y(x)\right)-y(x)+5\Longleftrightarrow$$
$$x(xy''(x)+2y'(x))=xy'(x)-y(x)+5\Longleftrightarrow$$
<hr>
The general solution will be the sum of the complementary solution
and particular solut... | <strong>Hint:</strong>
set $x=e^{t}$ we have
$$\frac{dy}{dx}=\frac{dy}{dt}\frac{dt}{dx}=\frac{1}{x}\frac{dy}{dt}$$
$$\frac{d^2y}{dx^2}=\frac{d}{dx}\left(\frac{1}{x}\frac{dy}{dt}\right)=-\frac{1}{x^2}\frac{dy}{dt}+\frac{1}{x^2}\frac{d^2y}{dt^2}$$
we have
$$\frac{d^2y}{dt^2}+y=5$$
| https://math.stackexchange.com |
41,492 | [
"https://electronics.stackexchange.com/questions/41492",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/10067/"
] | <img src="https://i.stack.imgur.com/plFx8.jpg" alt="The problem">
* source transformation is just a combining and rearranging voltage or current sources. I don't think its a universal term.
<img src="https://i.stack.imgur.com/CDk1C.jpg" alt="My approach so far: ">
and I'm stuck. any hint?
| <img src="https://i.stack.imgur.com/hVMOj.png" alt="enter image description here">
<img src="https://i.stack.imgur.com/6Gfag.png" alt="enter image description here">
Now solving the circuit using mesh analysis:-
For Left Loop:-
<blockquote>
160 I<sub>m</sub> +200 I<sub>m</sub>+120 (I<sub>m</sub>-I<sub>s</sub>)
... | You are forgetting to "connect" the resistor back once you're transforming your sources, that's the problem.
V <strong>IN SERIES</strong> with R = I<sub>s</sub> <strong>PARALLEL</strong> with R
For example, on the right part of your circuit, you can swap the 0.2A source and the 160Ω resistor with a V<sub>s</sub>=(0.2... | https://electronics.stackexchange.com |
49,960 | [
"https://dba.stackexchange.com/questions/49960",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/28322/"
] | I think I've got a very simple model and query, but I cannot find a way to make use of indexes to boost performance.
I wonder if there is a trick in my model, or MySQL query, to speed up the execution time to get an overview of my population at a specific time.
I have the following table which holds the status (histo... | Ok, i tried to reproduse your case:
<pre><code>mysql> insert into status values (1,'a','NEW',NOW(),'test'); Query OK, 1 row affected (0.00 sec)
mysql> insert into status values (2,'b','NEW',NOW(),'test2'); Query OK, 1 row affected (0.00 sec)
mysql> insert into status values (3,'c','NEW',NOW(),'test3'); Quer... | Thanks to netneladno I have the solution:
I have to force the index (although I don't understand exactly why).
Without the forced index I'm not getting the desired result, as shown before:
<pre><code>mysql> explain SELECT MAX(id) FROM `status` WHERE timestamp <= NOW() GROUP BY user_id;
+----+-------------+----... | https://dba.stackexchange.com |
1,348,263 | [
"https://math.stackexchange.com/questions/1348263",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/202361/"
] | I have two independent variables: $X$ follows from standard Gaussian distribution $N(0,\sigma^2)$; $Y$ follows from Rademacher distribution, i.e., $Y$ can be either $-1$ or $1$ with the same probability.
My question is:
For a new random variable of $Z=XY$, What is the probability density function? Or can we have so... | If $X$ and $Y$ are independent and $Y$ takes values in $\{-1,1\}$ while the distribution of $X$ is symmetric about $0$, then
$XY$ has the same distribution as $X$. Hint: condition on $Y$.
| Since $X$ has a symmetic distribution about $0$, you have $P(X-0 \le x) = P(0-X \le x)$, i.e. $P(X \le x) = P(-X \le x)$.
Now consider the cumulative distribution function $P(Z \le x)$.
This is $P(XY \le x)=P(XY \le x|Y=1)P(Y=1)+P(XY \le x|Y=-1)P(Y=-1)$ which is $P(X \le x|Y=1)P(Y=1)+P(-X \le x|Y=-1)P(Y=-1)$ which... | https://math.stackexchange.com |
35,920 | [
"https://cs.stackexchange.com/questions/35920",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/22390/"
] | where can i find very old books about old operating systems like CP/M and DOS and other OS that worked on the 8086 ??
second question isn't old books 20 year before and older should have an expired patent ??
where in general can i find books of expired patents ...
thanx
| The language $L$ accepted by the CFG can be written of the form,
$$ L = \{x^nyz^n | n \gt 0\}$$
You can verify this, by looking at members of $L$
Now there are various definitions of $PDA$ (accept by final state, accept by empty stack), the most simple definition that is suitable for this problem is to user a $PDA$ ... | Keep pushing every x you read. When a y is read, then start reading z's. For every z you read pop an x. If the letter read is lamda and the letter popped is also lambda, go to accept state, otherwise if letter read is lambda and letter popped is not lambda or vice versa go to reject state.
| https://cs.stackexchange.com |
202,385 | [
"https://mathoverflow.net/questions/202385",
"https://mathoverflow.net",
"https://mathoverflow.net/users/70317/"
] | I'm reading one of the classical theorems presented in Bowen's lecture notes, "Equilibrium States and the Ergodic Theory of Anosov Diffeomorphisms." I'm trying to figure out a very short line of reasoning that's eluding me in the proof of the following:
<blockquote>
Let $f$ be a transitive $C^2$ Anosov diffeomorphi... | There is indeed a typo. The correct normalisation should be $h= e^{-u}$ and thus $Jac(f)=h/h\circ f$. Then we get for all $g$
$$
\int g\ h\ dm = \int g\circ f\ h \circ f\ Jac(f)\ dm = \int g\circ f\ h\ dm
$$
See the book of Katok-Hasselblatt, introduction to the modern theory of dynamical systems, theorem 19.2.7 (sam... | So it looks to me like there's a typo in the LHS, which I think should be $f^*(h \ dm )(x)$. Let's see what happens if we evaluate at $x$ instead of $fx$. And maybe it will help to put the arguments in square brackets and write evaluation points as subscripts, viz. $(f^*(h \ dm))_x[X] = (h \ dm)_{fx}[df_x(X)] = (h(fx) ... | https://mathoverflow.net |
129,675 | [
"https://electronics.stackexchange.com/questions/129675",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37879/"
] | If resistance is fixed in a DC circuit, can voltage still be controlled and changed from one value to another?
Imagine this circuit, that has a fixed resistance of 1 Ohm, and the desired current is 20A, If the power supply is 100W, what would the voltage be? 5V?
If so, what about ohms law? V = IR? And P = IV?
I'm con... | Usually power supplies are designed to try to output a constant voltage (to approximate an ideal voltage source). If the resistance is also constant then you can predict the current from Ohm's law. Usually if a wattage is specified, that's a maximum input or output wattage.
It's also possible to design a power supply... | You cannot put 20A through the resistor, since this would require \$20\text{A}\times1\Omega = 20\text{V}\$ and hence a \$20\text{A}\times20\text{V}=400\text{W}\$ power supply.
The most current you can put through the resistor is \$\sqrt{100\text{W} \over 1\Omega} = 10\text{A}\$. Any deviation above or below \${100\tex... | https://electronics.stackexchange.com |
8,066 | [
"https://dsp.stackexchange.com/questions/8066",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/3793/"
] | I have recorded my own voice in Matlab and I intend to add some echo to it.I came up with one solution for getting the desired echo effect:
<ul>
<li><strong>Delay the sampled audio in the time domain and adding it to the original sample</strong>.</li>
</ul>
In order to do this I'm using Matlab and I have basically do... | Here is the code for adding the two signals(the delayed and not-delayed):
<pre><code> x = getaudiodata(recObj); n1 = 1:size(x,1);%audiodata of original signal
y = time_delay(x , 50000 ); n2 = 1:size(y,1);%audiodata of delayed signal
mixed = sigadd(x,y,n1,n2); %audiodata of mixed signal
mixrecObj = audi... | To record, it may be easier to use a simple recording program to get a. wav file, and then import that in to Matlab.
If Mathworks didn't remove the sound function, I would use that. It should just take a vector and a sampling rate to play a sound.
For implementing the delay, I would just make an h[n] that contains ... | https://dsp.stackexchange.com |
73,992 | [
"https://mathoverflow.net/questions/73992",
"https://mathoverflow.net",
"https://mathoverflow.net/users/17467/"
] | Let $E$ be a (complete) topological vector space, and $u:E\to E$ be continuous. Is it always true that if ${\rm Im}(u)$ is of finite codimension in $E$, then it is closed in $E$ or do we have to assume something on $E$? (It is OK if $E$ is Frechet by the open mapping theorem applied to ${\rm id}\oplus u:F\oplus E\to E... | No. For $E$ take $X\oplus \ell_2$, where $X$ is the direct sum of continuum many copies of the scalar field under the direct sum topology. This is the largest locally convex topology on $X$ and any linear mapping from $X$ into a locally convex space is continous. Write $X=X_1 \oplus X_2$ with each $X_i$ isomorphic to ... | Bill: The existence of Hamel basis in (all) vector spaces is equivalent to the axiom of choice (see Blass, Andreas "Existence of bases implies the axiom of choice". Contemporary mathematics 31, 1984). For the existence of a Hamel basis in $l_2$ it is enough to have a well-ordering of the reals.
Also, it is consistent ... | https://mathoverflow.net |
94,781 | [
"https://softwareengineering.stackexchange.com/questions/94781",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/32394/"
] | This isn't a programming question per se - more about application management. I work for what started out as quite a small company, which has grown rather quickly and become very succesful in a relatively small period of time. Nearly all trade happens online, and our IT team is very small relative to the amount of mone... | I am disappointed at the number of answers here that suggest that the OP should get paid for his after hours support when he clearly states in the question that management will not not only leave it up to them to determine how after hours support will be handled, but also that they will NOT reimburse them extra in anyw... | What does your contract say? Does it state working hours? If so, then this is an alteration of contract, which cannot be enforced unless you agree to it (at least here in the UK it is).
Many companies have paragraphs in there stating that you may need to work occasionally out of hours. This is not occasionally.
Havin... | https://softwareengineering.stackexchange.com |
192,532 | [
"https://dba.stackexchange.com/questions/192532",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/114915/"
] | I'm trying to convert long data:
<pre><code>ID|SchoolID|Section|RepScore|SportsScore|PartyScore
1 |20 |1 |23.2 |70.2 |42.3
2 |20 |6 |65.2 |75.8 |52.3
3 |20 |7 |77.2 |72.2 |66.3
4 |21 |10 |13.2 |40.2 |72.3
5... | This is how I ended up doing it.
<pre><code>DECLARE @cols VARCHAR(2000)
DECLARE @sqlquery2 VARCHAR(2000)
DECLARE @sqlquery3 VARCHAR(2000)
DECLARE @sqlquery4 VARCHAR(2000)
DECLARE @sqlquery5 VARCHAR(2000)
DECLARE @sqlquery VARCHAR(2000)
SELECT @cols = STUFF(( SELECT distinct '], [' +cast([Section] as var... | are you looking for this,
<pre><code>CREATE TABLE #T(ID INT,SchoolID INT,Section INT,RepScore DECIMAL(5,2)
,SportsScore DECIMAL(5,2),PartyScore DECIMAL(5,2))
INSERT INTO #T VALUES
(1,20,1 ,23.2,70.2,42.3)
,(2,20,6 ,65.2,75.8,52.3)
,(3,20,7 ,77.2,72.2,66.3)
,(4,21,10,13.2,40.2,72.3)
,(5,21... | https://dba.stackexchange.com |
112,137 | [
"https://mathoverflow.net/questions/112137",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4528/"
] | I'm guessing the answer to this question is well-known:
Suppose that $Y:C \to P$ and $F:C \to D$ are functors with $D$ cocomplete. Then one can define the point-wise Kan extension $\mathbf{Lan}_Y\left(F\right).$ Under what conditions does $\mathbf{Lan}_Y\left(F\right)$ preserve colimits? Notice that if $C=P$ and $Y=id... | The pointwise left Kan extension of F along Y is a coend of functors $Lan_{Y}(F) = \int^{x}P(Yx,-).Fx$ where each functor $P(Yx,-).Fx$ is the composite of the representable $P(Yx,-):P \to Set$ and the copower functor $(-.Fx):Set \to D$. As a coend (colimit) of the $P(Yx,-).Fx$ the left Kan extension preserves any coli... | $F$ preserving colimits doesn't imply that $\text{Lan}_Y(F)$ preserves colimits, even if all the categories are cocomplete.
Consider, for example, the case $C = D$ and $F = 1_C$. Then the left Kan extension $\text{Lan}_Y(1_C)$ exists if and only if $Y$ has a right adjoint, and if it does exist, it <em>is</em> the ... | https://mathoverflow.net |
135,877 | [
"https://physics.stackexchange.com/questions/135877",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/59282/"
] | It seems to me that we could change all the current spin values of particles by multiplying them by two. Then we could describe Bosons as even spin particles and Fermions as odd spin particles. Is there some consequence or reason why we can't simply change 1/2 as the smallest unit of spin into 1?
It just seems prettie... | The "spin" tells us how the wavefunction changes when we rotate space (or spacetime). Just because I double all charges by convention, the behaviour of the wavefunction will not be any different. What will happen is that the "doubling" or charges will lead to the "halving" of your definition of angles such that the phy... | I would like to point out that the accepted answer is not correct, there is no need to halve the physical angles.
In the language of representation theory, the Lie algebras <span class="math-container">$\mathfrak{su}(2)$</span> and <span class="math-container">$\mathfrak{so}(3)$</span> of infinitesimal rotations are is... | https://physics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.