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 |
|---|---|---|---|---|---|
19,220 | [
"https://robotics.stackexchange.com/questions/19220",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/22284/"
] | I saw the expression "robot state" in many articles and resources, but I could not understand what that exactly mean.
What does state of a robot exactly refers to ?
| To extends the answer from the_parzival a bit:
There are different kind of robots so that 'robot state' can have different meanings. If you have a drone or Roomba-robot, the most important state is related to its pose (position, orientation, speed, acceleration, ...). Other states are the Battery state, Motor speeds (... | The state of the Robot refers to the properties of the robot that you want to estimate. If you take a 2D robot as an example, then you might be interested in its 2d position which refers to
<span class="math-container">$$
X(t) =
\begin{bmatrix}
x(t) \\
y(t) \\
\end{bmatrix}
$$</span>
If you also want to estim... | https://robotics.stackexchange.com |
31,923 | [
"https://dsp.stackexchange.com/questions/31923",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/15030/"
] | I have been studying IIR filters and know that a rational transfer function:
$$
H(z) = \frac {b_0 + b_1 z^{-1} + ... + b_N z^{-N}}{1 + a_1 z^{-1} + ... + a_N z^{-N}}
$$
has a finite difference equation:
$$
y[n] = b_0 x[n] + b_1 x[n - 1] + ... + b_n x[n - N] - a_1 y[n - 1] - ... - a_N y[n - N]
$$
What I am confused ... | From Matt's answer, I think I've deduced the working I was interested in.
Let:
$$
H(z) = \frac {Y(z)} {X(z)}
$$
Which gives:
$$
Y(z) + Y(z)a_1z^{−1} + ... + Y(z)a_Nz^{−N} = b_0 X(z) + X(z)b_1z^{−1} + ... + X(z)b_Nz^{−N} \tag{1}
$$
Given that the inverse z-transform is defined as the contour integral (this is the b... | You do not really need the inverse $\mathcal{Z}$-transform to derive the difference equation corresponding to a given rational transfer function. You just need to know that $z^{-k}$ corresponds to a delay of $k$ samples. The inverse $\mathcal{Z}$-transform of $H(z)$ would give you the corresponding impulse response, bu... | https://dsp.stackexchange.com |
9,097 | [
"https://earthscience.stackexchange.com/questions/9097",
"https://earthscience.stackexchange.com",
"https://earthscience.stackexchange.com/users/6905/"
] | The diameters of Venus (7,520.8 miles) and Earth (7,917.5 miles) are comparable, but the disparity of the length of the day for each planet - as expressed in terrestrial hours - is enormous; a day on Venus lasts 2802 hours vs. an Earth day lasting 24 hours (its 116.750 times that of Earth).
How can there be such a gre... | I can't quantify the answer, but intuitively, nearly all of a burning tree's carbon is converted to <span class="math-container">$\small\mathsf{CO_2}$</span> - assuming the fire is hot enough. You are correct in assuming that termites and bacteria convert some of the carbon to other organic species, as do fungi, yeasts... | The key word in your query is the word "essentially". Termites and bacteria die too. So whatever carbon was initially converted from the tree into termites or bacteria ends up mostly going to <span class="math-container">$\small\mathsf{CO_2}$</span> also.
Of course some carbon gets converted to carbonate and that can... | https://earthscience.stackexchange.com |
206,391 | [
"https://physics.stackexchange.com/questions/206391",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/92488/"
] | I am taking part in a robotics competition, where the challenge is to create a pair of robots which successfully navigate a series of obstacles. However, the rules state that of the two robots, only one must have a driving actuator. The other must somehow be moved by the other robot, WITHOUT PHYSICAL CONTACT.
I could ... | The average <em>vector</em> momentum of an electron bound to an atom is exactly zero. (Otherwise, the electron would leave the atom!)
The average <em>magnitude</em> of the momentum can't be zero, because of the uncertainty principle. So Feynman is using the approximation $\vec p = \vec 0 + \Delta p \hat p$, where th... | This might be a bit helpful.
The uncertainty in the momentum of an electron in an atom is defined as: <span class="math-container">$(\Delta P )^{2}= \langle P^{2}\rangle-\langle P\rangle^{2}$</span>. An electron bounded by the nucleus, has an average momentum of zero, which means (<span class="math-container">$\Delta... | https://physics.stackexchange.com |
2,243,113 | [
"https://math.stackexchange.com/questions/2243113",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/344351/"
] | I came across this question :
<blockquote>
A class consists of $80$ students, $25$ of them are girls and $55$ boys, $10$ of them are rich and the remaining poor, $20$ of them are fair complexioned. What is the probability of selecting a fair complexioned rich girl? Now consider the following events: $A =$ selecting... | We have<br>
$$\frac{S}{5} = \frac{3}{5^2}+\frac{10}{5^3}+\frac{21}{5^4}+\frac{36}{5^5}+\frac{55}{5^6}+\cdots$$
Hence
$$S_1 = \frac{4S}{5} = S - \frac{S}{5} = \frac{3}{5}+\frac{7}{5^2}+\frac{11}{5^3}+\frac{15}{5^4}+\frac{19}{5^6}+\cdots$$
$$\frac{1}{5}S_1 = \frac{3}{5^2}+\frac{7}{5^3}+\frac{11}{5^4}+\frac{15}{5^5}+\frac... | These seem to be alternate triangular numbers: is this the case?
If so the series is
$$\sum_{n=1}^\infty\frac{n(2n+1)}{5^n}.$$
This is $f(1/5)$ where
$$\sum_{n=1}^\infty n(2n+1)x^n.$$
If you can sum $\sum_{n=1}^\infty nx^n$ and $\sum_{n=1}^\infty n^2x^n$
then you can sum this.
| https://math.stackexchange.com |
34,248 | [
"https://dba.stackexchange.com/questions/34248",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/18875/"
] | I have a backup that's about 6Gb. It's a "light" backup of the original (with the log tables purged), which is about 14Gb.
I try to restore the backup on my SQL Express local server. It fails with a message like : <code>System.Data.SqlClient.Error: insufficient disk space</code>. It asks for 227,891,019,776 bytes, whi... | Note that the backup size does not include empty pages, but when you actually perform the restore, the data and log files <em>will</em> be over 200 GB, because it has to restore exactly what the source system had (including a 200+ GB log file, regardless of how full it was).
If you don't want to risk data loss, you n... | DBCC TRACEON(3104) will bypass disk space checks for restore processes.
| https://dba.stackexchange.com |
63,355 | [
"https://chemistry.stackexchange.com/questions/63355",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/36007/"
] | I learned about acid strength, that the strength of an acid increases with it's degree of ionization when solvated. So, in water, a strong acid is one where $\ce{[H_3O^+]}$ is large, which is equal to a low pH: $\mathrm{pH=-log[H_3O^+]}$.
Considering extreme cases, such as superacids, I have found out that other metho... | Any acid-base reaction is always an equilibrium:
$$\ce{HA^1 + (A^2)- <=> (A^1)- + HA2}\tag{1}$$
and for each pair of acids $\ce{HA^1}$ and $\ce{HA^2}$ you could calculate a $K_\mathrm{a}$ value to determine one acid’s strength with respect to the other. This $K_\mathrm{a}$ value is typically calculated accordin... | You pretty much answered your own question, but perhaps I can help clarify: (1) Two very (but not equally) strong acids will both be effectively 100% dissociated in water, so the concentration of hydronium ion will be equal to the starting concentration of acid for either acid. Hence, the measured pH will be the same f... | https://chemistry.stackexchange.com |
403,148 | [
"https://stats.stackexchange.com/questions/403148",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/138973/"
] | I was reading Andrew Ng's CS229 lecture notes (page 12).
The target function y<sup>(i)</sup> can be written as:
y<sup>(i)</sup>=θ<sup>T</sup>x<sup>(i)</sup>+ϵ<sup>(i)</sup>
where,
e<sup>(i)</sup> is the error term that captures unmodeled effects and random noise. Further assume that this noise is distributed as ϵ<... | To put it correctly, he uses <span class="math-container">$p(\epsilon)$</span> for writing <span class="math-container">$p(y|x,\theta)$</span>, because <span class="math-container">$y=\theta^Tx+\epsilon$</span>, and given <span class="math-container">$x$</span> and <span class="math-container">$\theta$</span>, the only... | I looked into the lecture notes you references and the author points out that
<span class="math-container">$$
y^{(i)} \, | \, x^{(i)}; \theta \sim \mathcal{N}(\theta^Tx^{(i)}, \sigma^2)
$$</span>
which differs from the density of the errors (having mean 0). The distribution of <span class="math-container">$y^{(i)}$</sp... | https://stats.stackexchange.com |
77,750 | [
"https://softwareengineering.stackexchange.com/questions/77750",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/13846/"
] | FWIK Java can run on 64-bit system, no problem. I'd like to know how Java support 64-bit features, e.g., <code>System.identityHashCode()</code> returns a 32-bit int, it's common to see the object pointer (memory address) is returned. Should 64-bit Java returns long instead? If not, how would Java scale to 64-bit system... | <blockquote>
FWIK Java can run on 64-bit system, no problem.
</blockquote>
Correct.
<blockquote>
I'd like to know how Java support 64-bit features.
</blockquote>
Java supports 64 bit in a way that introduces no behavioural differences. A Java program will run on 32 bit or 64 bit platforms without change. All ... | The basic understanding of the JVM is incorrect.
The behaviour of the JVM is very strictly defined in the Java Language Specification and the exact details of the underlying platform is irrelevant as long as the JVM behaves as specified.
Basically you can expect any well-written Java program to run on any JVM, bein... | https://softwareengineering.stackexchange.com |
72,191 | [
"https://dba.stackexchange.com/questions/72191",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/44285/"
] | <pre><code>SELECT name FROM sys.databases
WHERE
name
not in
('master','model','msdb','tempdb','ReportServer','ReportServerTempDB','1303VISBOC')
AND
CASE WHEN state_desc = 'ONLINE'
THEN OBJECT_ID(QUOTENAME(name) + '.[dbo].[_LOOK_UP_TABLE]', 'U')
END IS NOT NULL
</code></pre>
I'm using the above to populate a combo... | The query is pretty simple and ought to run fast enough.
My guess is that you have a long running transaction performing DDL in one of the databases and your query is getting blocked waiting on a lock.
Unfortunately the metadata functions such as <code>OBJECT_ID</code> don't take account of the transaction isolation ... | Would This work?
Got rid of case statement in where clause...
<pre><code>SELECT name, OBJECT_ID(QUOTENAME(name) + '.[dbo].[_LOOK_UP_TABLE]', 'U') AS [LookUpID]
FROM sys.databases
WHERE name NOT IN ('master','model','msdb','tempdb','ReportServer','ReportServerTempDB','1303VISBOC')
AND state_desc = 'ONLINE'
AND ISNULL... | https://dba.stackexchange.com |
146,125 | [
"https://chemistry.stackexchange.com/questions/146125",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/64075/"
] | From Wikipedia:
It is an extremely reactive element and a strong oxidising agent: among the elements, it has the highest electron affinity and the third-highest electronegativity on the Pauling scale, behind only oxygen and fluorine.
I am confused....
P.S.: I naively assumed that 'electronegativity' was the same thing... | Electronegativity is a rather slippery thing, really. Roughly speaking, it depends on both electron affinity (the tendency to take on a negative charge) and ionization enthalpy (the tendency <em>not</em> to assume a positive charge). Chlorine has the highest electron affinity among halogens, true; but fluorine has a ... | Fluorine is a rather small atom. The incoming electron is put into a region of space already crowded with electrons. So there is a significant amount of repulsion, which lessens the attraction the incoming electron feels, and so lessens the electron affinity. A similar reversal happens between Oxygen and Sulfur. The fi... | https://chemistry.stackexchange.com |
160,318 | [
"https://softwareengineering.stackexchange.com/questions/160318",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/61552/"
] | I'm creating a video player, like a custom YouTube player.
All of the GUI elements (progress bar, video player, play button, ...) are different classes, but I obviously need them to communicate. When the progress bar is clicked, or the slider is moved, it needs to send a "seek(x)" command to the video player. Similarl... | You should combine events, states and methods.
Events should only inform that the event happened, not more.
States of the application should make you decide what can and cannot be done at that moment.
Methods should do the job like starting/stopping playing the video etc.
Events should not be used instead of method... | My rules of thumb for using events:
<ul>
<li>can you imagine these components existing separately, used not only in conjunction with each other? If yes, most likely go with events.</li>
<li>do you need from this component some information in response to the event sent? If you don't, then, once again, most likely, you'... | https://softwareengineering.stackexchange.com |
99,595 | [
"https://electronics.stackexchange.com/questions/99595",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37096/"
] | The microcontroller we use on our boards have been out of stock for an extended period of time with all the major players, we had enough stock to cover us for 4 months but it's running dry. After pushing digikey a bit they used the 'expediter' to ask Atmel ( i assume ) for some stock.
They found some with date code 2... | They ought to be fine.
If you are soldering with a reflow process (infra-red, hot air or wave) rather than hand soldering, then moisture absorption is a real problem, and after 4 years I would have my doubts however well they are stored.
However this has a solution, whose specific details ought to be documented by th... | Chips don't go bad like banannas do. 2010 is actually pretty recent. Think of all the products that have been in the field that long with microcontrollers in them. How old is your TV, VCR, dishwasher, or car? Really, there is nothing to worry about here.
About the only issue is for some types of packages that can ... | https://electronics.stackexchange.com |
81,900 | [
"https://physics.stackexchange.com/questions/81900",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/31570/"
] | So I need to find the possible energies and the probabilities of these using the eigenvalues of a Hamiltonian.
Once I obtain the eigenvalues, are those the energies E_n in and of themselves?
Or do they simply give me the n values, i.e. n = 1, 2, 3, that I would then plug in to the equation
<img src="https://i.stack.i... | Just "plug into the equation" is always a bad idea. So here is a short overview:
<ul>
<li>Given a Hamiltonian, the possible energy levels correspond to the eigenvalues of the Hamiltonian (no "plugging in" needed). More precisely, we have $H|\psi\rangle=E|\psi\rangle$ for every eigenvector. </li>
<li>Given a normalized... | If you have the Hamiltonian, first you find the eigenvalues (which are the $E_n$s as Martin pointed out). Then you find the eigenvectors or eigenfunctions associated with each eigenvalue by plugging each eigenvalue in "$H|\psi_n> =E_n|\psi_n>$" and solving the equation.<br/>
Then, if I'm right and you have been g... | https://physics.stackexchange.com |
2,227,021 | [
"https://math.stackexchange.com/questions/2227021",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/394221/"
] | Let $p_{2n-1} = \frac{-1}{\sqrt{n}}$, and $p_{2n} = \frac{1}{n}+\frac{1}{\sqrt{n}}$.
Prove $\prod_1^\infty (1+p_n)$ converges.
By numerical simulations, it appears to converge (to something around $0.759$). However, I'm not sure how to prove this. I know we can skip the first term since it's $0$. Then we can write i... | Note that
$$\prod\limits_{k=2}^{2n}(1+p_k) = \prod\limits_{k=2}^{n}(1+p_{2k-1})(1+p_{2k}) = \prod\limits_{k=2}^{n}\left(1-\dfrac{1}{\sqrt{k}}\right)\left(1+\dfrac{1}{k} +\dfrac{1}{\sqrt{k}}\right) = \prod\limits_{k=2}^{n} \left(1- \dfrac{1}{k\sqrt{k}}\right)$$
It is also known that for any sequence $\{a_k\}$ such th... | I'm not 100% sure if this can be made rigorous, but maybe you can take it as a starting point.
\begin{align*}\log \Pi(1+p_n)= \sum \log((1+\frac{1}{2n}+\frac{1}{\sqrt{2n}})(1-\frac{1}{\sqrt{2n+1}}))\\\approx\sum \log((1+\frac{1}{\sqrt{2n}})(1-\frac{1}{\sqrt{2n}}))\approx\sum \log(1-\frac{1}{2n})\approx \sum -\frac{1}{... | https://math.stackexchange.com |
65,347 | [
"https://math.stackexchange.com/questions/65347",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | I am suppose to differentiate $(x^2 +4x +3)/ \sqrt{x}$ I know that a square root is equal to $x^{1/2}$ but I still am not able to properly differentiate this problem. I ended up with $(2x+4)/ (1/2)x^{1/2})$ which I know is wrong.
| Dividing through, your expression equals
$$
x^{3/2}+4x^{1/2}+3x^{-1/2}.
$$
Now you can use the power rule.
| You can also exercise your quotient rule: $\left( \dfrac{f}{g}\right)^'=\dfrac{f'g-gf'}{g^2}$.
| https://math.stackexchange.com |
179,526 | [
"https://security.stackexchange.com/questions/179526",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/170425/"
] | I want to import a lone public key (.pem) into a Java keystore (.jks). I don't have the private key. As I understand, the public key must be wrapped as a certificate, so that I can import it into a java keystore.
The .pem content looks like:
<pre><code>-----BEGIN PUBLIC KEY-----
key_content....
-----END PUBLIC KEY--... | The standard (or at least conventional) certificate request process does require the privatekey matching the publickey to be certified. The pre-packaged operations of Java's <code>keytool</code> utility and the <code>openssl</code> commandline are limited to this standard process, as are several other existing Qs.
How... | Everyone seems to not be answering the poster's original question: which is can you add a publicKey to a keystore. Yes. but its not as straight forward as adding a privatekey, trustedCertificate or secretkey
You need to call
<pre><code>setKeyEntry("youralias",PublicKey.getEncoded(), null)
</code></pre>
When y... | https://security.stackexchange.com |
505,633 | [
"https://electronics.stackexchange.com/questions/505633",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/255351/"
] | I want to record video inside a microwave, is it possible?
What if it was hid behind a shield or the same galvanized material as the door? The detailed structure may completely ruin visibility tho
| <blockquote>
<em>Can you convert your comment into an answer? – Stefan</em>
</blockquote>
I expect that the increase in resistance is due to the emerging eddy current losses as frequency rises and, the decrease in inductance is due to eddy currents forming parallel inductances hence they reduce the net inductance.
| Universal motor have brushes. You should take it a part before measuring.
Anyway measuring value can depend on frequency due to parasitic element. you must use measure frequency to match working frequency for accuracy.
| https://electronics.stackexchange.com |
57,103 | [
"https://mathoverflow.net/questions/57103",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4800/"
] | Waterhouse in his thesis (Abelian varieties over finite fields, Ann. scient. \'Ec. Norm. Sup., t. 2, 1969, p 521-560) seems to use without comments the following fact:
Let $k$ be a finite field, and let $A$, $B$ be two abelian varieties over $k$ that are $k$-isogenous. Consider the set $I(A,B)$ of all the $k$-isogenie... | Let me describe a natural straightforward generalization of Chris Wutrich's counterexample.
Let $B$ be a $g$-dimensional abelian variety over a field $k$ and assume that $End_k(B)$ is a principal ideal domain. Let $A$ be another abelian variety over $k$ that is not $k$-isomorphic to $B$ but $k$-isogenous to it. Then... | As the comments and the answer above explain, the answer to my original question is NO. For completeness, I include the (very easy) proof of the statement in the second edit of my question (whose notation will be adopted) which is a weaker statement than that I was asking in the first place.
The group of homomorphisms... | https://mathoverflow.net |
256,132 | [
"https://dba.stackexchange.com/questions/256132",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/71225/"
] | EDIT: I was incorrectly assuming that all COW filesystems have a WAL. IT seems that BTRFS doesn't, so this question essentially applies only to ZFS.
Typical COW filesystems, like ZFS, have their own form of WAL (ZIL, in the case of ZFS).
On a non-COW filesystem, the DB WAL makes sense for both performance (because it... | No, because the WAL is also used for restoring from backups -- for example, in case of user error. In combination with a prior full backup, it allows restoring to any point in time -- presumably prior to when the user did something bad.
| Also no because a transaction may require changing hundreds of different locations in a file, and copy-on-write does nothing to make that faster. But write-ahead logging allows all the changes to be written in a minimal number on IOs, and applied to the data files later. The later writes are asynchronous, and benefit... | https://dba.stackexchange.com |
363,915 | [
"https://stats.stackexchange.com/questions/363915",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/148882/"
] | I have a question that I think will be quite basic to a lot of users.
Im using linear regression models to (i) investigate the relationship of several explanatory variables and my response variable and (ii) predict my response variable using the explanatory variables.
One particular explanatory variable X appears to... | When a particular predictor is statistically significant doesn't really mean that it also considerably improves the predictive performance of a model. Predictive performance is more related to the effect size. As an example, the function below simulates data from a linear regression model with two predictors <code>x1</... | This is a fairly normal thing to happen in multiple regression. The most common reason is that your predictors are related to one another. In other words, you can infer X from the values of the other predictors. Therefore, while it's useful for predictions if it's the only predictor you have, once you have all the othe... | https://stats.stackexchange.com |
475,872 | [
"https://electronics.stackexchange.com/questions/475872",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/240049/"
] | I'm sure it's obvious as day, but i'm having a hard time convincing myself with all these carries and conversions...
Given that i'm operating on the <em>same</em> number (say, <code>0xA451</code>) in different representations(<strong>0x</strong> and <strong>0b</strong>), is it always safe to use "16's complement" (n... | There is no functional difference in reality. However, your simulation software is stupid and needs to do calculations, so you need to tell it which node you want to represent zero and will become the reference to which every other node is measured (remember that voltage is a potential DIFFERENCE).
The circuit with a ... | Here, as in most electronics, "Ground" simply marks the point in the circuit that we want to call "Zero Volts", and use as a reference when measuring voltages elsewhere in the circuit. It does not usually imply a connection to the earth - we can talk about Ground in portable equipment, or in battery-powered circuits on... | https://electronics.stackexchange.com |
313,751 | [
"https://softwareengineering.stackexchange.com/questions/313751",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/119333/"
] | Controller:
<pre><code>function indexAction()
{
if ($condition)
$this->renumPosition($id); //LINE #1
}
//Redirect only - function's sole purpose is to call another function
function renumPosition($id)
{
$this->repository->renumPosition($id);
}
</code></pre>
Repository:
<pre><code>functio... | Yes, you did the right thing by removing the function <code>renumPosition</code> from your Controller.<br>
Functions must have a reason to exist and just the fact there was a legitimate function before you started to refactor is not a valid reason to keep the function around after you have refactored its reasons for ex... | I am not entirely sure what are you trying to achieve here. If your reason is code duplication in Controller Actions, you should look into a Service layer that sits between your controller and repository.
From your controller you would call a service function <code>_userService.GetUser(5)</code> and then you can use ... | https://softwareengineering.stackexchange.com |
354,285 | [
"https://physics.stackexchange.com/questions/354285",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/167650/"
] | I am confused about the possible nature of work that a conservative and non conservative force can do.
<ol>
<li>Do Non conservative forces like friction only do negative or zero work and not positive?</li>
<li>Can conservative force also do negative work, I know Gravitational Force is conservative force and it can do ... | Work done $W$ is the dot product of a force $\vec F$ and the displacement of the force $\vec s$.
$W=\vec F \cdot \vec s$
The work done is positive if the force and the displacement are in the same direction and negative if they are in opposite directions.
You watch a lorry accelerating.<br>
A box on the back of ... | Yes force of friction can do positive work
Work done by conservative forces may be positive.negative or zero
| https://physics.stackexchange.com |
432,831 | [
"https://physics.stackexchange.com/questions/432831",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/179737/"
] | Let’s say we have a scenario of a ball being released from the top of the building. This can be modeled simply with the kinematics equation <span class="math-container">$S=ut +\frac{1}{2}at^2$</span>, which reduced to <span class="math-container">$S=\frac{1}{2}at^2$</span>. We are given <span class="math-container">$... | The way you "derive" them in real life is that you know about them from <em>classical</em> mechanics.
It is absolutely astonishing that history seems to have forgotten this.
<h2>Classical harmonic oscillator in Hamiltonian form</h2>
Consider a classical undriven and undamped harmonic oscillator.
Generally speaking, i... | <blockquote>
I want to know if there is a way to derive them
</blockquote>
One can solve for the energy eigenstates <span class="math-container">$|E_n\rangle$</span> of the quantum harmonic oscillator (QHO) without the use of ladder operators and find that
<span class="math-container">$$H|E_n\rangle = (n + 1/2)\,\h... | https://physics.stackexchange.com |
367,075 | [
"https://electronics.stackexchange.com/questions/367075",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/184958/"
] | I am a total newbie at electrical stuff. I have been reading a while about voltage, current and resistance. I have many doubts but I will try to summarize them:
<ol>
<li>What happens with the current in a circuit that is not consumed by any device? I explain myself: imagine I have an electric circuit with one battery... | <blockquote>
What happens with the current in a circuit that is not consumed by any device?
</blockquote>
If it is not consumed then it doesn't flow in the first place.
<blockquote>
Imagine I have an electronic circuit with one battery of 1,5 volts. I put a small light bulb of 1,5 volts too in the circuit that ne... | Your bulb has a power limit and a resistance.
Let's imagine that the nominal power is 15mW and its resistance is 150 ohms.
[In actual bulbs, the resistance is dependant on temperature, it is not a constant]
Most of it goes into heat, a LED gives more light and less heat than a incandescent bulb.
Now you need to con... | https://electronics.stackexchange.com |
44,527 | [
"https://dba.stackexchange.com/questions/44527",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/14724/"
] | We are setting up a PostgreSQL 9.1 database at work. There are no classified data in the database, but we want to know who is doing what. We are using LDAP authentification on the network, so we would like to use that for the database as well, but according to the documentation, all users anyhow need to be defined as d... | Trace flag 3604 simply redirects DBCC command output to the client (instead of the error log).
It looks like someone has been running the DBCC PAGE command to take a closer look at individual database pages, but forgot that output gets redirected to the error log, and then ran in the 3604 trace flag to view the output.... | @Eric213 already answered your question. To add more to it :
-- find out what traceflags are enabled on the instance
<pre><code>dbcc tracestatus(-1)
</code></pre>
--- to Turn off the traceflag :
<pre><code>dbcc traceoff (traceNumber)
</code></pre>
--- To disable the trace flag globally, you have to use
<pre><co... | https://dba.stackexchange.com |
258,586 | [
"https://dba.stackexchange.com/questions/258586",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/184516/"
] | First good evening every body.
assume that you are logged in as a super user and you want to create a user.
<pre><code> CREATE USER 'user1'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*483EC567DF968A6AD5E279257828E7CC4A12F0C2' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK;
</code></pre>
and you want to cr... | In MySQL <code>CREATE TABLE</code> syntax, the statement
<pre><code>CREATE TABLE user1.user1Table
</code></pre>
… attempts to create the table user1Table <strong>in the database user1</strong>. The value before the period in that create statement is the database name, not anything related to the user account that th... | <code>CREATE TABLE {database}.{tablename}</code>
creates a table in the specified database. As such you'll need a user only table
<code>CREATE TABLE user1Table...</code>
To give a user access to the table:
<code>GRANT ALL ON {database}.user1Table TO 'user1'@'%'</code>
Where {database} is the database in which the t... | https://dba.stackexchange.com |
100,872 | [
"https://mathoverflow.net/questions/100872",
"https://mathoverflow.net",
"https://mathoverflow.net/users/24769/"
] | A regular language over an alphabet $\Sigma$ is a subset of the set of all words over $\Sigma$ that can be accepted by some finite automaton. A regular language identifies a certain property of strings of $\Sigma^*$.
One can then define a regular predicate over $\Sigma^*$
as an n-ary relation on $\Sigma^*$ such that ... | I think I found a reference for the answer. It should be in the following paper:
S. Eilemberg, C.C. Elgot, J.C. Shepherdson, Sets recognized by n-tape automata, Journal of Algebra, vol. 13, (1969), pp. 447-464.
Unfortunately I cannot download it from the internet.
| That is a central point about automatic structures: By projection (“existential quantification”) you get another regular predicate, and regular predicates are also closed under intersection and complementation. Consequently, the first-order theories of automatic structures are decidable (because you can decide for a gi... | https://mathoverflow.net |
161,550 | [
"https://security.stackexchange.com/questions/161550",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/138096/"
] | Is there any restriction on the CAs signature algorithm with respect to the public algorithm in the actual server/device certificate? For example, can a ECDHE_ECDSA_* certificate be signed by a CA with RSA and still be within spec? Is this mentioned in any of the RFCs?
Also, If the above is true, is there any provisi... | The signature created by the issuer of the certificate is fully independent of the algorithm used in the certificates public key. The signature algorithm instead depends on the issuers key and not the certificates key. It is actually common to have certificates containing an ECC key signed with RSA.
| Key exchange and certificate verification are independent operation.<br>
"an a ECDHE_ECDSA_* certificate be signed by a CA with RSA and still be within spec."<br>
First part i.e ECDHE is for key exchange<br>
ECDSA is for digital signature verification of server certificate<br>
so ECDHE certificate is actually signed by... | https://security.stackexchange.com |
24,167 | [
"https://datascience.stackexchange.com/questions/24167",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/20903/"
] | For example I have the following data structure:
<pre><code>user: Chris
age: 32
income: 60.000
basket value: 45
</code></pre>
I want predict the basket value, and my features are the age and income.
With a linear regression I get a regression function as the result of the fitting for example: $$y = 0.5x + 0.785$$
N... | Yes. It is also a function, but not an affine transformation of the input but a relatively complex sum of products of indicator functions of the input. Usually, this function is represented by the fitted tree and not as a formula.
So e.g. if you learn a tree of depth one and the split is at age 40 with mean response o... | Decision trees solve different types questions.
E.g. will someone with Age A, Gender G, Income I buy product X or Y.
There is no fitting involved, but the model might internally calculate/come up with an Age boundary or Income boundary that would switch the decision from X to Y.
| https://datascience.stackexchange.com |
152,808 | [
"https://stats.stackexchange.com/questions/152808",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/70432/"
] | I am doing a cluster analyis and I was wondering whether it is possible to remove duplicates from the data set - in order to increase performance.
I work on tables where objects are in rows and variables are in columns.
If two rows are identical, is it possible to delete them? Would this change the result?
I am work... | It changes the results. With k-means this should be straightforward to see: the mean of 0, 0 and 1 is different from 0 and 1. Usually this will also be the case for hierarchical clustering, but it depends on the linkage criteria, For example, complete linkage shouldn't be affected.
Speaking generally, I would argue fo... | If you remove duplicates, you need to <strong>add weights</strong> to your data instead, otherwise the result may change (except for single-linkage clustering, I guess).
If your data set has few duplicates, this will likely cost you some runtime.
If your data set has lots of duplicates, <strong>it can accelerate the ... | https://stats.stackexchange.com |
510,269 | [
"https://math.stackexchange.com/questions/510269",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66639/"
] | So, I need you to solve one of these limits for me, so I can see how it's done, so I can do the rest myself.
<img src="https://i.stack.imgur.com/b00oQ.png" alt="enter image description here">
| OK, one. Here comes:
$$
\frac{\sqrt{u}-\sqrt{v}}{\sqrt[3]{u}-\sqrt[3]{v}}
=
\frac{u-v}{\sqrt{u}+\sqrt{v}}\cdot\frac{\sqrt[3]{u^2}+\sqrt[3]{uv}+\sqrt[3]{v^2}}{u-v}=
\frac{\sqrt[3]{u^2}+\sqrt[3]{uv}+\sqrt[3]{v^2}}{\sqrt{u}+\sqrt{v}}\underset{u,v\to1}{\longrightarrow}\frac{1+1+1}{1+1}.
$$
Equivalently, when $x\to0$, $(1\p... | You could multiply by the conjugate over the conjugate (or the appropriate generalization for the nth roots), and do some asymptotics.
eg: $\lim\limits_{x\rightarrow\infty} (x- \sqrt{x^2-5x} * \frac{x+\sqrt{x^2-5x}}{x+\sqrt{x^2-5x}})$
$= \lim\limits_{x\rightarrow\infty} \frac{x^2 - x^2+5x}{x+\sqrt{x^2-5x}}$
$= \lim\l... | https://math.stackexchange.com |
145,902 | [
"https://softwareengineering.stackexchange.com/questions/145902",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/52662/"
] | I have spent some time studying Django and I've done some applications. But I really don't know what is the best approach while developing an application, I mean, there are several options: Make all the models, then all the urls, the views and then make all the templates.
Other people recommend using an agile approach... | Agile only, unless you're working for NASA :-)
It's either you or your customer/employer who has ideas about what IT should be. I've never seen people who're absolutely about what they're expecting to get. On the other hand, I do know a lot of people who have new ideas every day. So, in my opinion, the waterfall model... | well, in my opinion, since you are choosing django you are already reinforcing a beautiful MTV design. things would be quite different if you use java frameworks or even start from scratch.
agile is definitely recommended, but I would also like to remind you that: pre-mature optimization is the root of evil.
as long ... | https://softwareengineering.stackexchange.com |
1,858 | [
"https://dsp.stackexchange.com/questions/1858",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/697/"
] | At work we were smoothing a signal by convolving with either
<pre><code>f1=[0.2000 0.2000 0.2000 0.2000 0.2000]
</code></pre>
or
<pre><code>f2=[0.1111 0.2222 0.3333 0.2222 0.1111].
</code></pre>
A colleague noticed that f1 smoothed "stronger" than f2 and suggested a new filter:
<pre><code>f3=[0.2727 0.1818 0.0909 ... | As to your point 1, F1 appears to smooth more because it is wider, in terms of its 2nd moment width, an thus has a slightly lower and sharper transition. But a rectangular filter will have terrible stop-band ripple in exchange.
Low stop band ripple does require a filter not to have any sharp transitions, at the ends ... | Yes, in general, your #2 is correct. That being said, both of the filters stink (with your triangle filter being a little better).
No, f3 does not have the same frequency response as f4. To get an idea of why that is so, you generally have to zero-pad the impulse response before DFT'ing it to get a reasonable idea o... | https://dsp.stackexchange.com |
355,626 | [
"https://mathoverflow.net/questions/355626",
"https://mathoverflow.net",
"https://mathoverflow.net/users/78/"
] | If I had a vector space with a linear endomorphism <span class="math-container">$D$</span> satisfying <span class="math-container">$D^2 = 0$</span>, I might call it a <em>differential</em> and study its <em>(co)homology</em> <span class="math-container">$\operatorname{ker}(D) / \operatorname{im}(D)$</span>. I might say... | Many years ago, when I was a graduate student, I remember seeing a couple of papers on the homologies of operators satisfying <span class="math-container">$\partial^p=0$</span>, generalizing the case <span class="math-container">$p=2$</span>. I seem to remember that they were by somebody like Steenrod, and it might ev... | I would just call it a module over the truncated polynomial algebra <span class="math-container">$k[D]/D^3$</span>. Your two flavors of homology appear as positive odd-degree and even-degree groups in <span class="math-container">$\operatorname{Ext}^*_{k[D]/D^3}(k,M)$</span>. (This is <span class="math-container">$2$</... | https://mathoverflow.net |
76,894 | [
"https://cs.stackexchange.com/questions/76894",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/71722/"
] | I have difficulty understanding the halting problem. I know that for all possible Turing machines and strings w, we don't have a Turing machine that can decide whether a TM M halts on input w. Now suppose we have a program p that, for example, solves the Hamiltonian path problem. Can we conclude from the halting proble... | The halting problem is the following problem:
<blockquote>
Given a Turing machine $M$ and an input $x$, decide whether $M$ halts on $x$.
</blockquote>
This version of the halting problem is undecidable. For a given Turing machine $M$, the problem might well be decidable. For example, suppose that $M$ is a machine t... | <blockquote>
In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running or continue to run forever.
</blockquote>
The Halting problem for a specific (narrow) class of programs (Turing machines) ... | https://cs.stackexchange.com |
150,660 | [
"https://electronics.stackexchange.com/questions/150660",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/52617/"
] | I have a comparator with open collector output (LM311) and a gate with open drain output (SN74LVC1G06). I want join these two outputs to make a wired-or, with a pull-up resistor tied to +3.3V.
In a general way, is it appropriate to join an open-drain output with an open-collector output?
| There really isn't an issue with that. Open drain and open-collector are essentially the same in this application.
Two things to watch out for:
<ol>
<li>Make sure you get your polarities right and that you need an OR gate and not a NOR gate because the open-collector/open-drain style often invert your signal. If the... | Yes, you certainly can wire the two outputs together. Open drain and open collector just reflect the different technologies used inside the chips.
Keep in mind that 'wired or' is assuming input and output signals are inverted, so it's really an AND gate (both outputs must high-Z for the combined output to go high).
| https://electronics.stackexchange.com |
3,973,700 | [
"https://math.stackexchange.com/questions/3973700",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/603537/"
] | Consider the limit
<span class="math-container">$$\lim_{n\to +\infty} \frac{2^{\sqrt{n}}}{n!}\left(\frac{n}{e}\right)^n.$$</span>
How to show that this limit is <span class="math-container">$+\infty$</span>? I just tried square criterion but it doesn’t work. Moreover, Stirling’s formula is not allowed (requested in the... | It holds that
<span class="math-container">\begin{align*}
\log n! & = \log n + \sum\limits_{k = 1}^{n - 1} {\log k} \le \log n + \sum\limits_{k = 1}^{n - 1} {\int_k^{k + 1} {\log tdt} } \\ & = \log n + \int_1^n {\log tdt} = \log n +n\log n - n,
\end{align*}</span>
i.e.,
<span class="math-container">$$
n! \le ... | Recall that for <span class="math-container">$n\ge 1$</span> the following inequlity holds:
<span class="math-container">$$
n^ne^{-n}\le n!\le n^{n+1}e^{-n+1}.
$$</span>
You don't need Stirling's approximation here, this inequlaity can be proved by induction on <span class="math-container">$n$</span> (for the step the ... | https://math.stackexchange.com |
255,891 | [
"https://physics.stackexchange.com/questions/255891",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/116029/"
] | I was thinking the other day of a system in which you eject mass. And then I wonder whether it was more efficient to throw a big mass or many little. Let me put it in other terms.
Suppose you are moving at a constant speed $v_0$ in a car with a total mass $M$. Then you decide to throw a ball of mass $m$ with an exit v... | He meant that the "energy" function
$$
E_\textrm{art}(C) = - \frac{1}{2}CV^2
$$
is introduced solely for the purpose of getting the right result with the "principle of virtual work". It is not really EM energy in the usual sense as energy stored in the capacitor, available for use. If there is potential difference $V... | As we know the work done by a battery is <span class="math-container">$W=QV$</span> which is equal to <span class="math-container">$CV^2$</span>, and as we know energy available to use in a capacitor is half of <span class="math-container">$W$</span>, which means that half of the work done by battery cannot be used or ... | https://physics.stackexchange.com |
145,310 | [
"https://physics.stackexchange.com/questions/145310",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/63779/"
] | An aeroplane flying with constant speed releases a bomb. Neglecting air resistance, where will the bomb land?
<ol>
<li>Below the aeroplane</li>
<li>Behind the aeroplane</li>
<li>In front of the aeroplane</li>
</ol>
| Please state air resistance clearly in the problem.
$v_{plane,x-direction}=v_{bomb,x-direction}$ before the release of the bomb.
$v_{plane,x-direction}>v_{bomb,x-direction}$ after the release of the bomb, due to the air resistance.
Therefore, after some period $t$, when the bomb hit the ground, it will be left beh... | If you are neglecting air resistance and the velocity of the plane remains constant after the bomb is released, then the bomb's horizontal velocity remains the same and it must land directly under where the plane has moved to when it impacts the ground.
If you include air resistance then the horizontal velocity of th... | https://physics.stackexchange.com |
80,568 | [
"https://electronics.stackexchange.com/questions/80568",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/22518/"
] | I'm a total newbie at this, and I'm trying to make my Arduino-mini work on batteries.
Is it 100% safe if my arduino (or other components) receive like the minimum current to the point it's about to shutdown, but keeps working ? Can this damage anything in the long run ?
| The amount of current the Arduino will draw is based on its circuitry and your added components, not the power source. (Although if the power source cannot provide at <em>least</em> that amount, it may not operate correctly.) In other words, the Arduino draws whatever current it needs based on the supplied <em>voltage.... | Poorly designed products can trash their non-volatile memory in brownout conditions.
Although that's "soft" damage, from the outside user's point of view, a bricked product is as good as damaged- it may need the program and/or bootloader reloaded or it may have lost its calibration values.
Poorly designed swi... | https://electronics.stackexchange.com |
110,880 | [
"https://dba.stackexchange.com/questions/110880",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/22724/"
] | I have an application which uses a PostgreSQL table. The table is very big (billions of rows) and has a column which is an integer.
The <code>integer</code> can be up to 6 digits, i.e. 0-999,999 , no negatives.
I thought about changing it to be <code>numeric(6,0)</code>.
Would this be a good idea? Would <code>numeri... | <blockquote>
Would this be a good idea?
</blockquote>
No.
<blockquote>
would <code>numeric(6,0)</code> take less bytes?
</blockquote>
No.
<pre><code>test=> SELECT pg_column_size(INT4 '999999'), pg_column_size(NUMERIC(6,0) '999999');
pg_column_size | pg_column_size
----------------+----------------
... | The definitive answer is no to all of your questions. Integer is always the way to go for anything you can use it for. (Money, for instance)
Think about it for a minute. When the database engine encounters an integer, it handles it very efficiently because there is not much interpretation to it. It is a whole numbe... | https://dba.stackexchange.com |
86,448 | [
"https://datascience.stackexchange.com/questions/86448",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/108567/"
] | Principal components analysis need standardization or normalization?
After some google, I get confused. pca need the scalar be same. So which should I use.
Which technique needs to do before PCA?
Does pca need standardization? standardized values will always be zero, and the standard deviation will always be one.
Does... | Purpose of PCA is to find directions that maximizes the variance. If variance of one variable is higher than others we make the pca components biased in that direction.
So, best thing to do is make the variance of all variables the same. One way of doing this is by standardizing all the variables.
Normalization does no... | I believe <em>Normalization</em> refers to scaling the variable in between 0 and 1. <em>Standardization</em> refers to making the empirical distribution <span class="math-container">$Y\sim N(0,1)$</span>. Principal component analysis, and similar methods such as Ridge Regression and Partial Least Squares regression, re... | https://datascience.stackexchange.com |
58,688 | [
"https://softwareengineering.stackexchange.com/questions/58688",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/8675/"
] | Which of these designs is better? What are the pros and cons of each? Which one would you use? Any other suggestions of how to deal with methods like is are appreciated.
It is reasonable to assume that Draw() is the only place that the other draw methods are called from. This needs to expand to many more Draw* method... | I don't think you can have a blanket rule for this sort of thing, it depends on the situation.
In this case, I would suggest having the if clauses outside the methods because the names of the Draw methods imply that they just draw the things without any special conditions.
If you find that you have to make the checks... | I say the second.
Methods should have the same level of abstraction.
In the second example, the responsibility of the <code>Draw()</code> method is to act like a controller, calling each of the individual drawing methods. All of the code in this <code>Draw()</code> method is at the same level of abstraction. This gui... | https://softwareengineering.stackexchange.com |
1,085,271 | [
"https://math.stackexchange.com/questions/1085271",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Let $(E_n)$ be a sequence of sets. I was giving the following definitions:
$$ \limsup_{n \to \infty} E_n = \bigcap_{k=1}^{\infty} \bigcup_{n \geq k} E_n $$
$$ \liminf_{n \to \infty} E_n = \bigcup_{k=1}^{\infty} \bigcap_{n \geq k} E_n $$
I am having hard time trying to understand this definitions. I was thinking on a... | Look at the intervals $$A_n = \left[-\frac{1}{n},\,\,\,\,\, 1+\frac{1}{n}\right]$$ Well, they clearly "converge" to $$A=\mathrm{''lim''}A_n=\left[0,\,1\right]$$ Unfortunately, not all sequences of sets converge so "cleanly" to a "limit". Look at this example:
$$
B_n=\begin{cases}
\left[0,\,\,1-\frac{1}{n}\right] &... | This may help:
$x\in \lim\sup E_n$ if and only if $x$ is in infinitely many of the $E_n$;
$x\in \lim\inf E_n$ if and only if $x$ is in $E_n$ for all sufficiently large $n$ (i.e., it is in all but finitely many of the $E_n$).
| https://math.stackexchange.com |
29,553 | [
"https://softwareengineering.stackexchange.com/questions/29553",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/5095/"
] | Should error messages ever be presented to an end user and if so what rules or advice should you have about what should be in them?
| <h1>Yes</h1>
Error messages (when needed) should be presented to the user.
<blockquote>
What rules or advice should you have about what should be in them?
</blockquote>
Present an error to the user when:
<ol>
<li>What they need to know. Don't include errors that they won't understand. <em>"SQL connection failed"<... | Error messages should be presented to the user if:
<ul>
<li>The user initiated the error condition (for example, <code>"you did not include a password on the input form"</code>)</li>
<li>The user can do something about the error condition (for example, <code>"there is no network connection"</code>)</li>
<li>A critical... | https://softwareengineering.stackexchange.com |
31,550 | [
"https://stats.stackexchange.com/questions/31550",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/12236/"
] | I got AIC values of all models to identify the best model using R language. As I heard, best model produce the smallest AIC value, but maximum likelihood estimation procedure optimizer should converge.
How can I check whether maximum likelihood estimation procedure optimizer has converged or not in R language?
| If you're using the <code>arima</code> function as
<pre><code>mod <- arima(rates,c(p,d,q))
</code></pre>
then the convergence status from the underlying <code>optim</code> routine is
<pre><code>mod$code
</code></pre>
If this is 0 then you converged, at least as far as <code>optim</code> was concerned. See <co... | Assuming you have a globally convex likelihood and a regular parameter space, then the optimizer <em>may have not</em> converged when it reaches a boundary of the parameter space. This yeilds parameter estimates which explode and information matrices which are singular. Usually any graphical method is good at diagnosin... | https://stats.stackexchange.com |
126,969 | [
"https://mathoverflow.net/questions/126969",
"https://mathoverflow.net",
"https://mathoverflow.net/users/32952/"
] | Let $N\geq 1$ be an integer and let $S_2(\Gamma_0(N))$ be the cusp forms of weight 2 for the usual congruence subgroup $\Gamma_0(N)\subset SL_2(\mathbb Z)$.
Let $a_n(f)$ denote the n-th Fourier coefficient of $f\in S_2(\Gamma_0(N))$, $n\geq 1$.
Let $X_0(N)$ be a smooth projective model over $\mathbb Q$ of the modular... | It's not hard to see that the answer to (a) is yes. There is a basis of $S_2^{\textrm{new}}(\Gamma_0(N))$ consisting of newforms. These newforms come into Galois orbits $\{f^\sigma\}_{\sigma}$. Here $\sigma$ runs through the embeddings of $K_f$ into $\mathbf{C}$, where $K_f$ is the field generated by the Fourier coeffi... | I typed a comment but the formatting wouldn't come out right, so here it is as an answer!
I cannot work out why you expect the "Plancherel or Parseval type" formula to work. Does it not bother you a little that $a_n(f)$ and $a_n(g)$ are perfectly capable of being integers for all $n$, so your series is obviously diver... | https://mathoverflow.net |
1,461,915 | [
"https://math.stackexchange.com/questions/1461915",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/276364/"
] | There are 26 red cards and 26 black cards on the table which are randomly shuffled and are facing down onto the table. The host turns up the cards one at a time. You can stop the game any time (even at the beginning of the game). Once you stops the game, the next card is turned up: if it is red, you get $1; otherwise ... | You don't really have the precise definition of $\Theta$ notation. Given two functions $f$, $g$ defined on $\mathbb N$, we say that $f(n)\in\Theta(g(n)$ if there exist constants $c$, $C$ and a positive integer $n_0$ such that $n\geqslant n_0$ implies that $$ cg(n) \leqslant f(n) \leqslant Cg(n).$$
Since $$\max\{f(n),g... | I think this is the solution.
We know that $f(n) = \Theta(g(n))$ means $f(n) = O(g(n))$ and similarly $f(n) = \Omega(g(n))$
$m\{f,g\} = O(f+g)$ letting $c>0$
$f + g = O(m\{f,g\})$ letting $c \ge 2$
So basically without getting bogged in notation:
$f = O(g)$ where $ c >0$
Similarly: $g = O(f)$ where $c \ge... | https://math.stackexchange.com |
379,522 | [
"https://softwareengineering.stackexchange.com/questions/379522",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/316894/"
] | I'm writing an API in JavaScript, and I'm confused whether or not I should check if the API user is passing me the correct type on which the API expects to work. Actually not the type, but if you are passing me the object with the properties on which API will work. Is it a good practice for me to issue an error if the ... | You're indeed correct to deduce this is a very bad idea (indicative of design smell). Using "-1" as a "special" ID/Primary Key is horrible and should never be used in any legitimate or production database. Implementing such a practice means you (or your team) have a design problem that you don't want to address correct... | I think you need to separate "groups" from "permissions" completely. What you seem to be after is role and permission based authorization.
<ul>
<li>A user has many roles</li>
<li>A role has many permissions</li>
<li>There should be 1 permission for each action a user can perform on each entity in the system, be it a r... | https://softwareengineering.stackexchange.com |
260,607 | [
"https://electronics.stackexchange.com/questions/260607",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/106040/"
] | I am working on a vehicle which has electronics equipment inside it. A neutral electrical charge of the ground connection is desired.
When I measured the negative terminal, which is connected to chassis and batteries negative, compared to the ground/earth wire in the wall socket, the voltmeter read ~ +6V DC. I also tr... | Aswer to a:
The car is not earthed trough the tires. Remember that sometimes someone get a static shock when leaving a car.
Answer to b:
Some people purchase and install a special flexible wire (carbon strap) that lays on the ground removing static charge. You can most probably find it in a car shop.
Answer to c:
... | In addition to the earlier answers, don't assume that the ground terminal of a wall socket is at 0V relative to true ground. If you want a true ground reference, hammer an earth spike into the dirt (such as a flower bed or lawn), well away from any electrical installations.
(If you don't have a proper earth spike han... | https://electronics.stackexchange.com |
69,237 | [
"https://stats.stackexchange.com/questions/69237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14156/"
] | I came across a simple question on comparing flexible models (i.e. splines) vs. inflexible models (e.g. linear regression) under different scenarios. The question is:
In general, do we expect the performance of a flexible statistical learning method to perform better or worse than an inflexible method when:
<ol>
<li>... | In these 2 situations, comparative performance flexible vs. inflexible model also depends on:
<ul>
<li>is true relation y=f(x) close to linear or very non-linear;</li>
<li>do you tune/constrain flexibility degree of the "flexible" model when fitting it.</li>
</ul>
If relation is close to linear and you don't constrai... | Of course it depends on the underlying data which you should always explore to find out some of its characteristics before trying to fit a model but what I've learnt as general rules of thumb are:
<ul>
<li>A flexible model allows you to take full advantage of a large sample size (large n).</li>
<li>A flexible model wi... | https://stats.stackexchange.com |
14,813 | [
"https://mechanics.stackexchange.com/questions/14813",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/7938/"
] | Every dirt bike i know has a single cylinder engine. I myself ride a Yamaha XT660Z which has a huge 660 cc cylinder.
What are the characteristics of those engines? what are the benefits of such design?
Another interesting topic is that a lot of the engines used in dirt bikes are 2 stroke engines. What are the pro... | The main reason for the use of a 2-stroke engine is it accelerates much faster than a similarly sized 4-stroke engine. The obvious reason for this is a 2-stroke cylinder fires on every revolution of the crank shaft, while a 4-stroke does it every <em>other</em> revolution. Also because the 2-stroke fires on every revol... | Subaru fires each cylinder 1 at a time but the Subaru is a boxer design which means that the cylinders are opposed to each other in pancake manner like Volkswagon, Porche and Corvair.... This allows them to have higher frequency vibration with less weight because they do not have to use counterbalance weights within th... | https://mechanics.stackexchange.com |
4,288,004 | [
"https://math.stackexchange.com/questions/4288004",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/369315/"
] | From what I can tell, every lattice is a sublattice of a lattice with unique complements (Dilworth). A Heyting algebra is a distributive lattice. The only remaining step, then, would be to know whether the extension with unique complements preserves distributivity. If that is true, then every Heyting algebra would be a... | Every distributive lattice is isomorphic to a lattice of sets, so in particular it is a sublattice of a Boolean algebra. Since Heyting algebras are distributive lattices, the answer to your question is affirmative.
| Heyting Algebra is not a sublattice for Boolean Algebra.since Heyting Algebra weakens x\vee x'. Boolean Algebra is asublattice for Heyting Algebra.
| https://math.stackexchange.com |
175,006 | [
"https://dba.stackexchange.com/questions/175006",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/125870/"
] | I have a database which has a user's real age and the age that people have guessed them to look like in an uploaded photo.
I want to find the photos which have the greatest difference between guessed age and actual age. What Query could I run?
For example, the two rows that I am interested in are as follows.
<pre><... | This is not going to look pretty, especially given the more than 300 columns and unavailability of <code>LAG</code>, nor is it likely to perform exceedingly well, but just as something to start with, I would try the following approach:
<ul>
<li><code>UNION</code> the two tables.</li>
<li>For each PK in the combined se... | If you unpivot the data to a temp table
<pre><code>create table #T
(
PK varchar(12) not null,
UpdateDate datetime not null,
ColumnName nvarchar(128) not null,
Value varchar(max),
Version int not null
);
</code></pre>
You could match the rows to find new and old value with a self join on <code>PK</code>, <co... | https://dba.stackexchange.com |
11,441 | [
"https://cs.stackexchange.com/questions/11441",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/7809/"
] | I have the following CFG,
$S \rightarrow CB$<br>
$C \rightarrow aCa \text{ }|\text{ } bCb \text{ }|\text{ } \text{#}B$<br>
$B \rightarrow AB \text{ }|\text{ } \varepsilon$<br>
$A \rightarrow a\text{ }|\text{ }b$
This is the CFG for the following language:
$$L= \left\{w \text{#} x\mid w^R \text{ is a substring of }\ ... | There is a general method to convert any CFG into a PDA. That's what jmite meant. You can find more details on that in wikipedia, or by searching this site.
But once you realized the language is $L=\{w\#x \mid w^R \text{ is a substring of }x\}$, you can forget about the grammar and directly construct a PDA.
The PDA w... | You follow an algorithm similar to a "shift-reduce" parser. You only need one state. From this state, you can read the empty symbol and pop symbol X off the stack and replace it with the right side of any of its productions. Alternately, if the top of the stack is a terminal, and that terminal is next on the input tape... | https://cs.stackexchange.com |
143,855 | [
"https://softwareengineering.stackexchange.com/questions/143855",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/21461/"
] | I have been working on a website containing 3d maps, virtual 3d tours, etc. All of the content is large like images and video.
The problem is the site performs well under normal speed connections but it take more time to load if network is busy or the internet connection is slow. How can I describe this to the custom... | Your website has minimum requirements to run correctly. Detail those requirements in a document and give those to the client. If they deem the requirements to be to much, ask them what features to remove to help the speed issue.
| You could use client-side timers that alert a "bear with us" message when redirecting to a page takes long (generally 10+ seconds is experienced as "long"). Use ajax to have animations running when retrieving data from the database and on the server-side, if it's possible, write the buffer to the client once a certain ... | https://softwareengineering.stackexchange.com |
21,961 | [
"https://mathoverflow.net/questions/21961",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4423/"
] | In the Euclidean plane, is the circle the only simple closed curve that has an axis of symmetry in every
direction?
| A slightly different argument is as follows. Choose two symmetries $\sigma,\tau$
with axes
intersecting at a point $P$ and forming an angle of $2\pi \lambda$ with $\lambda$ irrational.
The composition $\rho=\sigma\circ \tau$ is then a rotation of infinite order generating
a dense subgroup of the group of all rotations ... | If a figure had an axis of symmetry in three non-parallel
but non-concurrent axes, then composing these suitably would
give a translative symmetry, which is impossible if the figure
is bounded. So all the axes of symmetry of your putative curve
are concurrent through a point $O$ which we shall call a centre.
Then all r... | https://mathoverflow.net |
713 | [
"https://mechanics.stackexchange.com/questions/713",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/448/"
] | I've got an '85 Corvette, and the steering wheel is really beat up so I'm looking to replace it with a more modern and sporty wheel.
What I'm looking to find out:
<ul>
<li>Is this a safe repair to do myself? </li>
<li>I've got basic sockets, wrenches, etc but what tools will I need, anything specific or unusual? </l... | The specific thing to watch out for is the splines on the steering column. The way most aftermarket wheels I have seen work is that the wheel has 6-12 small socket-head bolts in the centre that attach it to a mounting boss, which is splined to fit onto the column. The wheel manufacturers then generally sell different b... | As long as there's no airbag, and no other electrical connections (cruise control, radio, etc) then it should be pretty easy to change as long as you get a replacement designed for the car.
You may not have a large-enough socket to get the nut off, but there shouldn't be any other special tools required.
I've changed... | https://mechanics.stackexchange.com |
423,052 | [
"https://softwareengineering.stackexchange.com/questions/423052",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/183131/"
] | My <code>SmsRecipientDetails</code> class constructor accepts <code>String</code> value as recipient phone number.
I would like to accept number with spaces:
<pre><code>assertDoesNotThrow(() -> new SmsRecipientDetails("123456789 "));
assertDoesNotThrow(() -> new SmsRecipientDetails(" 123456789 &quo... | You could use a desktop virtualization software like Citrix. That way their personal computers are just dumb terminals while the actual development environment runs on a server your control.
But keep in mind that:
<ul>
<li>Developers will be far more productive when they can work on their own machines using their own t... | There is no way to avoid giving developers access to the code. If they can see it they can always copy paste it.
That being said, there are <em>potentially</em> valid reasons to have code be remote. Say you trust your developers to not "steal" the code, but you don't trust that their machines have hard drives... | https://softwareengineering.stackexchange.com |
301,153 | [
"https://dba.stackexchange.com/questions/301153",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/70834/"
] | Sometimes I need to keep state, like an IsVerified flag.
There are two options:
<strong>boolean</strong> (or bit)
Advantage: smallest and fastest
...but in theory "over-optimization" and thus a bad argument.
<strong>nullable datetime</strong>
IsVerifiedOn -> NULL is not verified, any value means verified.
... | I believe you might be "over thinking" it. I've never heard the phrase "<em>over-optimization is an anti-pattern</em>" and I would <em>generally</em> disagree with that.
Rather than worrying too much about anti-patterns, architect to your use cases and be <strong>reasonable</strong>. If you know you... | You may need NULL in the IsVerifiedOn date for another purpose later. If a situation ever arises where you know that something has been verified, but you don't know the date on which it was verified, you will be in trouble, because you can't say that. In general, NULL in a field always means "no data here&quo... | https://dba.stackexchange.com |
24,378 | [
"https://scicomp.stackexchange.com/questions/24378",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/20906/"
] | I am trying to solve the following problem via a finite difference approximation:
$u_t = k \, u_{xx}$, on $0 < x < L$ and $t > 0$;
$u(0,t) = u(L,t) = 0$;
$u(x,0) = f(x)$.
I take $u(x,0) = f(x) = x^2$ for my problem.
Programming is not my forte at all, so I am having some issues with the implementation. He... | So your first big issue is one you bring up in point <strong>(4)</strong>, where you say you get the error '<em>u(0, t[m]) = 0 "can't assign to function call"</em>'. You're trying to store data by assigning data to a function. That won't work. The way you're implementing this code, you actually should make <code>u(x,t)... | Don't worry about programming skills, everyone's a beginner at some point. It's a good start actually. I'm just going to give some hints assuming that this is an exercise. Actually, choward's answer is complete, this is just a rephrasing of his suggestions in, I hope, a more beginner friendly language. So, if you do ac... | https://scicomp.stackexchange.com |
546,635 | [
"https://stats.stackexchange.com/questions/546635",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/301555/"
] | Suppose I am estimating one of the parameter. Now if we plot the biased estimator of that and unbiased estimator of that can we say for sure that biased one has less variance than unbiased one always.
My thought: my analysis somehow tells me that it is true because if we check bias variance trade off then obviously if ... | <strong>NO</strong>
Remember that just about anything can be an estimator, even silly estimators. Let’s consider two estimators for <span class="math-container">$k$</span> of <span class="math-container">$\chi^2_k$</span>. Take an <span class="math-container">$iid$</span> sample <span class="math-container">$X_1,\dots,... | I don't think there's an answer as to which will have more variance. Take the case of the sample variance. The unbiased estimate
is <span class="math-container">$\sum_i (x_{i} - \bar{x})^2/(n-1)$</span>. It has variance
<span class="math-container">$\left(\frac{1}{n-1}\right)^2$</span> Var<span class="math-container">... | https://stats.stackexchange.com |
67,693 | [
"https://softwareengineering.stackexchange.com/questions/67693",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/18741/"
] | I am creating use cases for my web application and I was wondering if a representation of the DB should be listed as an actor. For example a user can check his profile and edit it (assuming that he is logged in). The two use cases would be:<br>
- User can view his profile<br>
- User can edit his profile<br>
Would the ... | I would say if the DB is internal to your app (i.e. it is used solely by this app and the external world doesn't interact with it directly in anyway, only via your app), you shouldn't represent it as a separate actor.
If the DB is shared and used directly by external users/systems, it is probably better to represent i... | When You define Your use cases, You need to think about <strong>behavior</strong> of Your actors instead of structure.
Database is static reflection of actor. If we use anthropomorphizing, calling database an actor is like calling photography or memories of beloved one as real human.
| https://softwareengineering.stackexchange.com |
52,959 | [
"https://dba.stackexchange.com/questions/52959",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/30237/"
] | Is it possible to force SQL Log Shipping to run from a given .trn file onward?
I have two databases, where one ships to another this was working fine. However I had to restore the primary database and in the interim another .trn file was created. (This would be rubbish given the DB was restored and so couldn't be appl... | I have manually reset the log shipping by updating the <code>last_restored_file</code> column in the <code>log_shipping_monitor_secondary</code> table on the standby server to the last transaction log that was successfully restored.
Something like this:
<pre><code>UPDATE lsms
SET lsms.last_restored_file = '{transact... | I would advise to just recreate logshipping from scratch using the wizard. Also, if your database is huge, then compress the backup (depending on what version you are using) and then initialize the secondary from backup.
| https://dba.stackexchange.com |
184,865 | [
"https://dba.stackexchange.com/questions/184865",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/133728/"
] | I'm having a little trouble understanding how to select a DISTKEY for a table I'm working on.
Consider the following table:
<pre><code>create table test_table (
country char(2) encode zstd,
record_time bigint encode zstd not null,
ip bigint encode zstd,
identifier v... | Two options here:
In keeping with your <strong><code>MAX</code></strong>:
<pre><code>SELECT
MAX(CASE WHEN confis = 'red' THEN randarfield END) AS Red
,MAX(CASE WHEN confis = 'purple' THEN randarfield END) AS Purple
FROM @BlueBonnet
</code></pre>
But if you really want the <strong>first</strong> (not the ... | As many people have already mentioned, it depends on if you need <strong>The First</strong>, <strong>The Min</strong> or <strong>The Max</strong>.
Here is a solution using <strong><code>IDENTITY</code></strong>, <strong>better test data</strong>, <strong><code>PIVOT</code></strong> and <strong><code>ROW_NUMBER()</code... | https://dba.stackexchange.com |
618,325 | [
"https://electronics.stackexchange.com/questions/618325",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/312702/"
] | I know that power stations can generate an electromagnetic field, but is that field strong enough to disrupt nearby wireless signals, such as Wi-Fi, Bluetooth, cell service, etc?
I'm sure that, in practice, this isn't an issue. But if you had a communication facility full of extremely sensitive equipment (think militar... | Not generally. Power stations generate signals at 60 (50) Hz, while 'wireless' signals start from AM radio (~ 1 MHz) up to many GHz. A sensitive radio will have a front-end filter that prevents any 60 Hz signals from getting through upsetting the processing of the desired signals.
There are some harmonics and noise gen... | If one really cares about protecting sensitive equipment, they make Faraday Cage and place all the equipment inside it.
Alternatively, if one had equipment that produces lots of electromagnetic interference (EMI) they could place the equipment in a Faraday Cage to contain any radiated EMI.
Typically, one can convert an... | https://electronics.stackexchange.com |
3,791,142 | [
"https://math.stackexchange.com/questions/3791142",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/816379/"
] | I need to solve this problem as homework, but neither I nor my classmates have seen through this.
The task is:
Prove the following statement through induction.
given: <span class="math-container">$n\in\Bbb N,\,n\ge4$</span>,<br />
to prove: <span class="math-container">$2^n\ge n^2$</span>
i've came so far: <span c... | Consider any <span class="math-container">$c$</span> such that <span class="math-container">$f(c) \neq c$</span>. WLOG, let <span class="math-container">$f(c) < c$</span>
Now, <span class="math-container">$f(f(c)) = c > f(c)$</span>.
Now, since <span class="math-container">$f(x) - x$</span> is continuous on the d... | If <span class="math-container">$f$</span> is assumed to be continuous, then it will be sufficient to find values <span class="math-container">$x_1,x_2$</span> such that <span class="math-container">$f(x_1)-x_1\leq 0$</span> and <span class="math-container">$f(x_2)-x_2\geq 0,$</span> and then apply IVT to show there mu... | https://math.stackexchange.com |
489,866 | [
"https://math.stackexchange.com/questions/489866",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | <blockquote>
Show that $\operatorname{Hom}_R(M, -)$ is a functor from the category of $R$-modules to the category of abelian groups.
</blockquote>
Let $F$ be the functor.
Every $R$-module is also an additive abelian group, so we can send every $R$-modules $M$ to itself viewed as an additive abelian group (let's de... | There are a few problems here. A small one first - $M^*$ and $f^*$ already mean (lots of) other things, so this notation is a little confusing. I think for this argument there's no real reason to distinguish between $M$ as an $R$-module or as an abelian group, and similarly for the morphisms, so I'd just continue calli... | Here is a little bit more conceptual answer.
The following fact is important: If $\mathcal{C}$ is an arbitrary category, and $M \in \mathcal{C}$, then there is a <em>covariant Hom functor</em> $\mathrm{Hom}(M,-) : \mathcal{C} \to \mathsf{Set}$. It maps an object $N$ of $\mathcal{C}$ to the set of morphisms $M \to N$, ... | https://math.stackexchange.com |
4,250 | [
"https://quant.stackexchange.com/questions/4250",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/2609/"
] | Just was just looking at the various interest rates and noticed this:
<pre><code> Tenor Rate
LIBOR:
3M 0.3585%
6M 0.6359% <-- sticks out above others
ED Futures:
Z2 (Dec 12) 99.680 => approx 0.320%
H3 (Mar 13) 99.675 => appr... | The main problem is that you cannot achieve Libor in the markets. So the old-fashioned method of discounting at Libor doesn't work any more. As an example, if you compound up the 3m Libor with today's price on a 3x6 FRA, you won't get 6m Libor. Traditionally, that would mean arbitrage, but these days it's just a fact o... | If a bank lends 6m Libor and finances it by borrowing 3m Libor and borrowing forward 3x6 libor, this is not arbitrage, as the bank is assuming 6m credit risk whilst his financing is 3m credit risk. (There are also other factors like regulatory capital, tying up balance sheet for 6m, etc.) So the text book case where th... | https://quant.stackexchange.com |
2,481,336 | [
"https://math.stackexchange.com/questions/2481336",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/389194/"
] | Given a convex set $C$. The distance function is defined for any $C$ as
$$ \textrm{dist}_{C} \left( x \right) = \inf\limits_{z \in C} \left\lVert x - z \right\rVert . $$
Then the function
$$ d \left( x \right) = \dfrac{1}{2} \left[ \textrm{dist}_{C} \left( x \right) \right] ^{2} . $$
is convex and continuously differen... | If $p\neq3$, $p$ a prime, then $p^2\equiv1\pmod3$. So if $3\notin\{a,b,c\}$ then $3\mid a^2+b^2+c^2$.
| If $p\ge 5 $ is a prime then it is always of the form $6n\pm 1 ~, n \ge 1$.
Let $a,b,c$ be primes $\ge 5$. Then we've ;
$$(6n_1\pm 1)^2+(6n_2 \pm 1)^2+(6n_2 \pm 1)^2 = \text{prime}$$
$$36(n_1^2+n_2^2+n_3^2)+12(\pm n_1\pm n_2 \pm n_3)+3 =\text{prime}$$
But in the above equation, LHS is clearly divisible by $3$ and ... | https://math.stackexchange.com |
252,966 | [
"https://math.stackexchange.com/questions/252966",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/29189/"
] | I can't find out a function <code>f(x)=y</code> that would map my x's to required y's. It is OK to write it in a programming language. Notation in mathematics is also OK.
It must be something simple enough but I can't find a solution.
<pre><code>X: >> Y:
1 1
2 1
3 2
4 2
5 ... | So note that the $y$s are powers of 2 and that for $k \in \mathbb N$ the numbers $2k$ and $2k - 1$ are mapped to $2^k$. that is if we divide $x$ by $2$ and round towards the next bigger integer, that is consider $\lceil \frac x2\rceil$, this gives $k$ for both cases. So $f \colon \mathbb N \to \mathbb N$ is given by
$... | Note that $f(2i-1)=f(2i)=2^{i-1}$ for $i\in\mathbb{N}$. So $f(x)$ can be given by $$f(x)=2^{x/2-1}\mbox{ when $x$ is even }$$ and $$f(x)=2^{(x-1)/2}\mbox { when $x$ is odd }$$ for all $x\in\mathbb{N}$
| https://math.stackexchange.com |
3,991,328 | [
"https://math.stackexchange.com/questions/3991328",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/610712/"
] | I am trying to solve this congruence system :
<span class="math-container">$$\begin{cases}
3x+7y\equiv 5[11]\\
8x+4y\equiv6[11]
\end{cases}
$$</span>
I multiply first by <span class="math-container">$8$</span> and <span class="math-container">$3$</span> both equations resp.
<span class="math-container">$$\begin{cases}
... | Since upon elimination the two equations results in <span class="math-container">$44y \equiv 0 \pmod {11}$</span> which is true for all integers <span class="math-container">$y$</span>, the two equations are not independent. As a result, we must express the values of <span class="math-container">$x$</span> in terms of ... | A note on reducing <span class="math-container">$\quad ax\equiv b\pmod m\quad$</span> and a divider <span class="math-container">$\quad d$</span>
<ul>
<li>if <span class="math-container">$\gcd(m,d)=1$</span> then you can divide <span class="math-container">$a,b$</span> by <span class="math-container">$d$</span> and kee... | https://math.stackexchange.com |
126,179 | [
"https://stats.stackexchange.com/questions/126179",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/61802/"
] | I've been using R to analyze my data (as shown in example below) and <code>lm.beta</code> from the <code>QuantPsyc</code> package to get the standardized regression coefficients.
My understanding is that the absolute value of the standardized regression coefficients should reflect its importance as a predictor. I was... | For the standard linear regression model the absolute value of the coefficient estimates and the p-value are not related in the way you describe. It is very possible to have absolutely large coefficients which are insignificant and absolutely small coefficients which are very significant. What your missing in your in... | Standardized regression coefficients do not work for categorical variables or for nonlinear effects. You are assuming everything has a linear effect, which is unlikely. Standardization also assumes that the SD is the right scaling constant.
To me standardized coefficients are harder to interpret than the original co... | https://stats.stackexchange.com |
371,042 | [
"https://softwareengineering.stackexchange.com/questions/371042",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/105003/"
] | I've recently watched a few Pluralshigh courses on DDD by Vladimir Khorikov. He was encouraging to create a <em>rich</em> instead of <em>anemic</em> domain models. It all looked very nice in a small test-project, however I still have no idea how to put <strong>extensive</strong> business logic inside <em>rich domain mo... | <blockquote>
The logic was supposed to be implemented inside the entities
</blockquote>
Yes, although it's usually more specific than that - the logic that computes the new state of an entity is supposed to be "inside" the entity.
<blockquote>
Employees are hidden inside the Employer aggregate root
</blockquote>
... | <blockquote>
In rich domain model we are supposed to put domain logic into entities
</blockquote>
The problem with this sentence is, people interpret it wrong as
<ul>
<li><em>"we are supposed to put <strong>all</strong> domain logic into entities"</em>. </li>
</ul>
A better interpretation would be:
<ul>
<li><em>... | https://softwareengineering.stackexchange.com |
3,693,019 | [
"https://math.stackexchange.com/questions/3693019",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/791969/"
] | I'm asked to prove that <span class="math-container">$$\lim_{n\to\infty}\int_{0}^{2}\frac{x^n}{x+1}=\infty$$</span> I've tried using the fact that for every <span class="math-container">$$x\in[0,2], \frac{x^n}{x+1}\ge\frac{x^n}{3}$$</span> but I can't seem to be able to calculate <span class="math-container">$\int_{0}^... | Hint: <span class="math-container">$ \int_0^2 \frac{x^n}{1+x}dx \geq \int_{3/2}^2 \frac{x^n}{1+x}dx \geq \int_{3/2}^2 \frac{(3/2)^n}{1+2}dx = (1/6)(3/2)^n $</span>.
| Why do you need Darboux sums? Is it a requirement? You can just note that <span class="math-container">$\frac{x^n}{x+1}$</span> is continuous and thus integrable in <span class="math-container">$[0,2]$</span>, so you can form the sequence
<span class="math-container">$$
a_n = \int_0^2 \frac{x^n}{x+1}\,dx \ge \int_0^2\... | https://math.stackexchange.com |
79,931 | [
"https://softwareengineering.stackexchange.com/questions/79931",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6153/"
] | I've been having a debate within my team on what constitutes a Data Access Layer vs Data Functions vs Business Layers.
My thoughts is all database access is done in a data access layer with Repository classes. The DAL contains utility classes & methods that populate a DataSet, List<>, POCO, Execute SQL, but as ... | There's no use for a BAL if all it is going to do is feed database access strings. You may also find that there is too much business logic contained in the stored procedures.
If you want data access in you business logic, call it something else.
| When you're dealing with an architecture that has a separate DAL and business logic layer, stored procedures and SQL do not belong in the business logic layer. Strictly speaking, that layer should be agnostic to how the data is stored and retrieved, and should only be responsible for manipulating the instances returned... | https://softwareengineering.stackexchange.com |
416,553 | [
"https://stats.stackexchange.com/questions/416553",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/165057/"
] | I am learning <span class="math-container">$k$</span>-fold cross validation. Since each fold will be used to train the model (in <span class="math-container">$k$</span> iterations), won't that cause overfitting?
| K-fold cross validation is a standard technique to <em>detect</em> overfitting. It cannot "cause" overfitting in the sense of causality.
However, there is no guarantee that k-fold cross-validation <em>removes</em> overfitting. People are using it as a magic cure for overfitting, but it isn't. It may not be enough.
Th... | On the contrary, cross-validation is a good way to combat overfitting!
<hr>
<h2>Why <span class="math-container">$k$</span>-fold CV?</h2>
Suppose you have a model and you want an estimate of its out-of-sample performance...
You could assess the prediction error on the same data used to fit the model (i.e. the trai... | https://stats.stackexchange.com |
392,649 | [
"https://physics.stackexchange.com/questions/392649",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/70392/"
] | Spontaneous symmetry breaking can be defined as follows (Teresa & Antonio, 1996; pg89):
<blockquote>
A physical system has a symmetry that is spontaneously broken if the interactions governing the dynamics of the system possess such a symmetry
but the ground state of this system does not.
</blockquote>
I am s... | I would like to offer a contrasting answer to that of @tparker. I want to emphasize the fact that it is actually not necessary to introduce any symmetry-breaking field, provided you use the proper setup. (Of course, you <em>can</em> use symmetry-breaking fields, or suitable boundary conditions to achieve that, but I be... | Three comments:
<ol>
<li>It's true that at some point you need a tiny symmetry-breaking field. But it doesn't need to act on every site uniformly - even a field that acts on a <em>single</em> site is enough to break the symmetry. Realistically, you can't be expected to be able to able keep track of these tiny fields i... | https://physics.stackexchange.com |
8,027 | [
"https://robotics.stackexchange.com/questions/8027",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/482/"
] | I'm implementing an extended Kalman filter and I'm facing a problem with showing the covariances to the user.
The covariance matrix estimate contains all the information we have about the current value estimate, but that is too much to display.
I would like to have a single number that says "our estimate is really goo... | It's tough to say anything about a really large covariance matrix. This is because (presumably) the matrix includes the uncertainty about a whole bunch of features, not just the robot pose. Typically what matters in real life is the uncertainty in the position of the robot (and possibly orientation). So with only three... | You want to display $\frac{n(n+1)}{2}$ values of a symmetric $n \times n$ matrix, where $n=26$, which means you have 351 values.
It doesn't make too much sense to display all those numeric values. After all you want to display them to a human being, which is unlikely able to oversee all these values if displayed as nu... | https://robotics.stackexchange.com |
14,908 | [
"https://bioinformatics.stackexchange.com/questions/14908",
"https://bioinformatics.stackexchange.com",
"https://bioinformatics.stackexchange.com/users/9868/"
] | I am working on a project and am having issues with the following code that I have written in <code>nano</code>:
<pre><code>from Bio import SeqIO
import sys
import re
fasta_file = (sys.argv[1])
for myfile in SeqIO.parse(fasta_file, "fasta"):
if len(myfile) > 250:
gene_id = myfile.id... | You might consider changing the code to make the whitespace a little more consistent (as it was, it failed when i tried to run it).
Also, why are you using regular expressions? You have already extracted the <code>gene_id</code> using Biopython. The following works for me:
(updated to handle the underscore delimiting)
... | You wrote,
<pre><code>mylist = re.match(H149xcV\_\w+\_\w+\_\w+)
</code></pre>
try...
<pre><code>myregex = re.compile(r'H149xcV\_\w+\_\w+\_\w+')
mylist = myregex.match(myfile.id)
</code></pre>
or
<pre><code>mylist = re.match(r'H149xcV\_\w+\_\w+\_\w+',myfile.id)
</code></pre>
Watch your indentation it should be 4 spaces.... | https://bioinformatics.stackexchange.com |
222,400 | [
"https://electronics.stackexchange.com/questions/222400",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/-1/"
] | Just like the title says; does kinking the cable from a psu(2.5A 5v) to the socket affect the noticeable peformance of a psu? It is just slightly kinked at multiple places.
| No. Electricity isn't like water, it doesn't mind going round corners (at least not on that scale), and a piece of copper cable can't collapse and close off the way a hosepipe can.
Kinking a cable still isn't a great idea though. Bends over sharp edges, or repeatedly bending and straightening a cable can damage the ... | Not only can it damage the insulation but the wires inside can crack and break from the bending back and forth. Less wires means less ability to handle current. They could heat up more and possibly cause a fire depending on the amount of damage.
| https://electronics.stackexchange.com |
221,710 | [
"https://softwareengineering.stackexchange.com/questions/221710",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/74130/"
] | I have always wondered about this, especially in C/Java style languages. For example, consider the first 3 lines of this C# code:
<pre><code>lock (serviceLock)
using (var client = new ServiceClient())
try
{
// Do something
client.DoSomething();
}
catch (System.ServiceModel.FaultException ex)
{
// Handle e... | The <code>lock</code> and <code>using</code> blocks are for programmer convenience, but are not required. If you find <em>less indented</em> code easier to read. You can write the same thing using the <em>non-code-block</em> version of the same C# features.
<pre><code>Monitor.Enter(serviceLock);
var client = new Servi... | I would strongly suggested you use three levels of nested indentation. When I look at this code quickly, I only see the catch(){} block, see a match try{} block, and ignore the fact that there is a lock and using statement. Now, when I look at the code more carefully, I noticed that there are keywords hanging out above... | https://softwareengineering.stackexchange.com |
238,898 | [
"https://stats.stackexchange.com/questions/238898",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/94196/"
] | I have trained a neural network to model a system and I want to use that neural network to optimize a cost function with only a subset of features. My hypothesis function is parameterized by one subset of the features and the other subset of features is the feature set for the hypothesis function. In order to find the... | I do not do neural networks, but logically the standard approach should be something like this:
$$F[x] = f_n\circ f_{n-1} \circ \cdots \circ f_1[w_1 x+b_1] \implies F'[x]=w_1\frac{\partial F}{\partial b_1}$$
In other words, use standard backprop to get the derivative with respect to the bias $b_1$ on the first layer.... | Still not quite understand the question, so my answer may be wrong... From my point of view, you may have 2 choices
<ul>
<li>Only use a subset of feature to neural network</li>
<li>Use all features, and get the gradient respect to all features, but only focusing on the components related to the feature you are interes... | https://stats.stackexchange.com |
685,886 | [
"https://physics.stackexchange.com/questions/685886",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/324033/"
] | I have been hearing a lot about Newton's First Law of Motion, where an object will continue to be at rest or in motion unless it is compelled to change its state by external forces. So my question is, <strong>is it really possible for an object to be completely stationary in reality?</strong> Or is it identical to the ... | In the theory of classical mechanics, objects have exactly defined speeds, so any object has a speed of exactly zero in its own reference frame.
However, in reality, classical mechanics has limitations. In particular, it breaks down at very small scales, which becomes relevant when you start talking about things being ... | In order to define an object's speed you need to pick a reference frame.
If you pick the object's reference frame, than it is always going exactly <span class="math-container">$0.0000...$</span> mph, case closed.
If you pick another object's reference frame, then they'll only be going the same speed if some there is so... | https://physics.stackexchange.com |
390,699 | [
"https://softwareengineering.stackexchange.com/questions/390699",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/334288/"
] | Assume you have a library in which every function is public. Sooner or later developers who use your library will come up with a stable pattern of usage. In that terms external information of how developers are using you library already defines the public interface.
If your function is dealing with only inner context... | The main purpose of encapsulation is to hide complexity from the user of a class to make his life easier. This implies that there is such internal information that is irrelevant to the user.
While this is probably not always the case in practice, I do believe that there are such things as good abstractions where the u... | <blockquote>
Interface of the library should be defined by a user not by the creator. And user defines it by pattern of usage.
</blockquote>
Exactly the opposite is true. The library provider has the job of understanding the domain of the library to the maximum extent possible, with every minute detail possible, and... | https://softwareengineering.stackexchange.com |
705,870 | [
"https://physics.stackexchange.com/questions/705870",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/323520/"
] | I teach IB physics and recently attempted explain to a student where the Fermi Radius formula comes from in response to a question. For those unaware the fermi radius formula is shown below.
<span class="math-container">$$
R = R_0 A^{1/3}
$$</span>
Where <span class="math-container">$R_0$</span> is the Fermi Radius (1.... | The proton is a complicated object and doesn’t have a single “radius” like a ball of yarn does.
Your value for the “proton radius”, <span class="math-container">$r_p \approx 0.8\,\rm fm$</span>, is the proton’s “charge radius,” a parameter that describes the distribution of electric charge in the region surrounding the... | <blockquote>
Why is the Fermi Radius not equal to proton radius?
</blockquote>
Very roughly, it's similar to why a structure made of closely-packed spheres has a volume different from a single sphere of the same mass. But there are other complications...
<blockquote>
Assuming all nuclei have equal density you get....
<... | https://physics.stackexchange.com |
66,010 | [
"https://dba.stackexchange.com/questions/66010",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/39094/"
] | I am building a website on MySQL with php, and I have 400+ products in a table. I have three columns with comma separated values, each has 1-3 values separated by commas in each row.
I was wondering if my db would be faster if I make separate tables for those three columns?
| It may or may not be <em>faster</em>, depending on your data distribution and the queries you execute. What it <em>will</em> be is <em>better</em>.
Normalisation isn't a goal in itself. It's a series of processes one applies to remove potential errors while changing data. The output is a schema which is resilient t... | No, your db weren't probably faster because of multiple causes:
<ul>
<li>400 record is much fewer which were needed for optimization on the table structure. Probable your whole db will be in the ram (block cache), thus it will be enough fast even if only linear queries will be run.</li>
<li>Multiple tables are needed ... | https://dba.stackexchange.com |
49,434 | [
"https://dba.stackexchange.com/questions/49434",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/26002/"
] | I'm trying to figure out how many times in my database a particular grouping has occurred. I have two relevant tables.
<pre><code>mysql> describe logins;
+-------------+-------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra ... | You are much better off using the EAV (entity-attribute-value) approach for a product feature catalog. The approach is transportable to any SQL platform as it doesn't rely on a particular feature of Postgresql (JSON columns).
All of the usual arguments against EAV don't apply to a product feature catalog, since produ... | You actually have two options here.
The first is to go with your second schema. This would work very well when you have a limited number of categories, and it makes things easier to manage or enforce data constraints.
However you have another, simpler option as well if the extended data isn't really critical. You c... | https://dba.stackexchange.com |
6,368 | [
"https://mechanics.stackexchange.com/questions/6368",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/3301/"
] | The content is pretty much contained in the title. When I went to replace the brake pads, one pad was completely gone and the other was almost like new.
Now that I have replaced the pads, the wheel heats up quickly when driving even short distances.
I did notice that one of the guide pins seemed stuck - it did not m... | If your guide pins are stuck, the caliper won't be able to slide properly.
With a sliding caliper, when you apply the brake, the piston pushes one pad against the disc (rotor), and simultaneously pushes back against the caliper (Newton's equal and opposite reactions), causing the caliper to slide along the guide pins... | With the brake piston fully compressed the pads should have a little clearance, enabling minor "play." When replacing brake pads it is important to make sure that the caliper itself moves freely in the horizontal direction (i.e., perpendicularly to the disc.) If not, one pad will wear quickly due to the fact that it wi... | https://mechanics.stackexchange.com |
11,409 | [
"https://dba.stackexchange.com/questions/11409",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/5201/"
] | What I am looking to do, is schedule a copy of data from my production database to my dev/test database.
The dev/test database will be newer than the production database in terms of schema, but the production database has current data. I'm in a bit of a bind as I need to test my database changes against production siz... | Here is what I would recommend:
<ol>
<li>If you do not already do this, create a regular backup process for your production database. To make life simple, make it a full backup and include all database objects (tables/schema/data/users). The Microsoft website has a lot of information on how to achieve this.</li>
<li>W... | SSIS is probably your best tool for this situation. Create a package performing your copying and schedule it using SQL Agent. You can very easily copy data from one environment to another. You can set it to either redirect or ignore errors and inconsistencies in your copying operations, depending on your need.
I re... | https://dba.stackexchange.com |
42,232 | [
"https://engineering.stackexchange.com/questions/42232",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/32338/"
] | It is considered best practise to specify free draining backfill material (eg gravel) to be placed immediately behind a retaining wall. Supposedly, this alleviates hydrostatic pressure on the wall, allowing more economical designs to be achieved. But the free draining material typically only extents 300mm behind the wa... | The common denominator is that both "machines"/devices are transformers of some kind. What they do is transform energy from one form to another. However the total energy (if you ignore losses) remains the same before and after the transformation.
In both of your examples there energy (or more precisely Power ... | <h3>There is no general concept except for proportionality</h3>
All you have discovered is that ratios are used throughout science and engineering. Simple machines (gears are only one example, you also have levers, pulleys, inclined planes, etc.), transformers, gas laws (PV/T=PV/T), optics...
The use of ratios is a fa... | https://engineering.stackexchange.com |
6,460 | [
"https://engineering.stackexchange.com/questions/6460",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/4049/"
] | I have two columns of water at different (but constant) temperatures. If I calibrate a pressure transducer using the first column at differing heights, when I measure the second column how do I account for the change in temperature (and water density)?
I want to measure pressure in megapascals (MPa) so for the calibra... | You can either compensate for it in your measurement or neglect it and lump it in with the other error.
First though, you need to decide if the error would even be worth correcting. At 4 °C, the density of water is 1000 kg/m^3 and 958 kg/m^3 at 100 °C. That's a maximum of 4.2% at those temp extremes. Over small variat... | The pressure will be the same regardless of the temperature. So, the two columns will have the correct pressure recording. However, the height of the column will vary.
i.e. - Say you have your pressure transmitter reading for calibration a 10C column (999.7 kg/m^3). The results are:
0.5m - 4.9 kPa - 7 mV; 1m - 9... | https://engineering.stackexchange.com |
200,721 | [
"https://softwareengineering.stackexchange.com/questions/200721",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/62683/"
] | <strong>The situation:</strong>
In my program, there are a list of cues. To call a cue at a certain time, there are objects called Triggers. Cues have many public methods that allow them, among other things, to be "fired" (which causes them to perform an action). Triggers "fire" cues when they are activated. They do t... | You seem to have the dependency between your Model and your View the wrong way around. <strong>A Model does not know about the existence of a View</strong>, at most the model knows that some other component in the system might want to know about changes to the model.
In the MVC pattern, either the Controller informs t... | <strong>A model is view-agnostic</strong>, so your feelings are pointing you into the right direction.
The controller decides, which model and which view to use. It injects the model into the view, and optionally registers the view as an Observer for the model. Then the controller passes control to the view.
Then the... | https://softwareengineering.stackexchange.com |
19,271 | [
"https://cs.stackexchange.com/questions/19271",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/140/"
] | The PARTITION problem is NP-complete:
INSTANCE: finite set $A$ and a size $s(a) \in \mathbb{Z}^+$ for each $a \in A$<br>
QUESTION: Is there a subset $A' \subseteq A$ such that $\sum_{a \in A'} s(a) = \sum_{a \in A \setminus A'} s(a)$
The problem remains NP-complete even if the elements are ordered as $a_1,a_2,...,a_... | Let $b_i = a_{2i} - a_{2i-1}$. The problem is then finding $\sum \varepsilon_i b_i = 0$. Here $\varepsilon_i = 1$ if $a_{2i} \in A'$ and $-1$ otherwise. Let $B' = \{b_i \mid \varepsilon_i = 1\}$. Note that $\sum_{b \in B'} b = \sum _{b \in B \setminus B'} b$. Thus solving PARTITION of $B$ would solve EVEN-ODD PARTITION... | Another quick reduction is the following:
Let $2^k > \sum_{a \in A} s(a)$. Then
for each element $a_i \in A$ add to $B$ two elements:
$b_{2i-1} = 2^{2k+2i} + a_i$and <br>
$b_{2i} = 2^{2k+2i} + a_i 2^k$.
The two consecutive elements cannot be contained in the same subset (due to the $2^{2k+2i}$ common "bit"), and ... | https://cs.stackexchange.com |
120,124 | [
"https://security.stackexchange.com/questions/120124",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/66678/"
] | There is a requirement to setup a SFTP server. This will be used by some of user b2b agents to upload files.
Such kind of setup is always doubtfully risky in production environment where user can upload the malicious content, I am not sure how this could be achieved but I'd rather not take any risk.
I need recommend... | Anywhere you provide the facility to upload content, there is a risk of uploading malware. Either manage the risk or don't allow uploads.
Regarding the protocol, unlike HTTP(S) and SMTP servers, I'm not aware of any SFTP server which allows you to deal with the files as a synchronous operation triggered by the upload.... | Provided that any type of external access given to third parties may imply some level of security risk, the real danger may occur when both SSH (shell/command execution) and SFTP (file transfer, especially upload) are enabled <strong>at the same time</strong>.
Basically if you only allow SSH and the server is hardened... | https://security.stackexchange.com |
2,900,372 | [
"https://math.stackexchange.com/questions/2900372",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/482390/"
] | Let $R=\mathbb{Z}[\sqrt{-2}]$
<blockquote>
1) Is it true that for every free $R-$module $M$ of rank=$n$ that $M$ is a free $\mathbb{Z}-$module of rank=$2n$?
2) Find two non-isomorphic $R$-modules with $19$ elements each.
</blockquote>
For (1) I tried to begin with a basis $\{m_1,...,m_n\}$ of $M$ as a $R-$modu... | Let $M = [m_1,...,m_n]$. Then, every element of $M$ can be written uniquely as $\sum a_im_i$ where $a_i \in \mathbb Z[\sqrt -2] = b_i + c_i \sqrt{-2}$.
Clearly, $M$ is then generated by $[m_i, m_i\sqrt{-2}]$ over $\mathbb Z$.The question is : is this set linearly independent over $\mathbb Z$?
Well, let $\sum c_im_i ... | For $2$ look for modules $R/I$ where $I$ is an ideal of $R$. As $R$
is a principal ideal domain, $I=\left<\alpha\right>$ for some $\alpha=a+b\sqrt{-2}$. Then $|R/\left<\alpha\right>|=|\alpha|^2=a^2+2b^2$. If we
have $\alpha=\eta\beta$ where $\eta$ is a unit in $R$. Then $\left<\alpha\right>
=\left<... | https://math.stackexchange.com |
1,092,644 | [
"https://math.stackexchange.com/questions/1092644",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/202187/"
] | What is the motivation behind the , convex and concave closures of submodular functions?
Also, my understanding is that the submodularity condition is somewhat like concavity which makes it counter intuitive to me that maximizing them is hard. Does anyone have any intuition on this?
| Let us do it step by step: With $x \subseteq A \Leftrightarrow x\in PA$, your conclusion is equivalent to:
$$
(x \subseteq A \setminus B) \wedge (x\not\subseteq A \vee x \subseteq B)
$$
And with $\alpha \to \beta \Leftrightarrow \neg\alpha \vee \beta$ also to:
$$
(x \subseteq A \setminus B) \wedge (x\subseteq A... | Here is a more 'logical' and 'calculational' version of this proof. Note how the $\;\emptyset\;$ automatically falls out of the calculation.
$
\newcommand{\calc}{\begin{align} \quad &}
\newcommand{\calcop}[2]{\\ #1 \quad & \quad \unicode{x201c}\text{#2}\unicode{x201d} \\ \quad & }
\newcommand{\endcalc}{\e... | https://math.stackexchange.com |
22,323 | [
"https://electronics.stackexchange.com/questions/22323",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3552/"
] | When a fully loaded elevator is moving down its potential energy is decreased and I guess is somehow converted by the elevator traction motor into heat.
How exactly does it happen? What exact elements of the motor or other parts do the conversion and how?
| A typical three-phase induction motor has a synchronous speed and direction at which applied voltage will be precisely canceled by back EMF, and can operate in several modes:
<ol>
<li>When the shaft is turning at precisely the synchronous speed (and direction) for a supplied voltage, as noted, no current will flow.
<l... | First, elevators have counterweights, so for some mid range load there is no net potential energy change in the elevator going up or down. However, a maximally loaded elevator probably has more potential energy than the fixed counterweights, so your question still stands.
In any case, the friction in the pulleys, mot... | https://electronics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.