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
142,584
[ "https://dba.stackexchange.com/questions/142584", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/98895/" ]
When running an <code>ALTER TABLE ... ADD COLUMN ...</code> I get: <pre><code>Error Code : 1878 Message : Temporary file write failure. </code></pre> And on log_error (/DATA/mysql/.err) <pre><code>2016-06-29 17:27:01 7f11f08a7700 InnoDB: Error: Write to file (merge) failed at offset 3145728. InnoDB: 1048576 bytes...
It's likely the disk space is the root cause. Watch the space free in the tmpdir location whilst the ALTER is running.
if you are using docker and docker-compose you can add a line to your volumes to a spot where you have more disk space. E.g., <pre><code>volumes: - /data/mysql_tmp:/tmp </code></pre> Again, this will allow you to get more than the default tmp space you need and is helpful if that table you are ALTER-ing is big (ove...
https://dba.stackexchange.com
232,706
[ "https://dba.stackexchange.com/questions/232706", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/55628/" ]
I am connecting to Oracle server using PLSQL,this is my <code>tnsnames.ora</code>(<code>C:\Oracle\ora90\network\ADMIN</code>) config: <pre><code> MY_ERP = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ...
If those lines really start with spaces in <code>tnsnames.ora</code>, that will not work. Remove the leading spaces in the first line (<code>MY_ERP =</code>), becasue an alias can not start with a space. You can also try setting <code>TNS_ADMIN</code> to <code>C:\Oracle\ora90\network\ADMIN</code>, because <code>ORA-12...
You actually have two problems. First, you are getting an ORA-12154 (at least that's what your subject line says), but in trying to find the text to report the error message, oracle cannot find the message file. This latter problem should be solved first,and in my 20+ years experience, it is invariably due to ORACLE_...
https://dba.stackexchange.com
287,385
[ "https://mathoverflow.net/questions/287385", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
suppose $X$ is a proper and smooth rigid analytic variety over $\text{Spa}(k)$, with $k$ a non-archimedean field of characteristic zero. One has the de Rham complex of analytic differential forms on $X$, $\Omega^{\bullet}_{X/k}$, say on $X_{et}$. We call $C$ the sheaf $\ker(\mathcal{O}_X\xrightarrow{d}\Omega^1_{X/k})...
In the simplest case where $X$ is smooth and projective, and $k$ is discretely valued, then the answer to Q3 should be no. <strong>EDIT</strong>: While waiting for the bus I realized there is a technical error here, which is that the etale topos of the Berkovich space is <em>not</em> the etale topos of the rigid/adic ...
On Q3, maybe an additional geometric remark. First, to take the non-torsion field $k$ as coefficients, you should use the pro-étale topology, not the étale one, as Scholze does (see Scholze and Bhatt's paper on pro-étale cohomology). This may correct partly the well identified problem with Galois cohomology that appear...
https://mathoverflow.net
197,766
[ "https://security.stackexchange.com/questions/197766", "https://security.stackexchange.com", "https://security.stackexchange.com/users/49767/" ]
U2F is touted as a new 2 factor authentication standard that has built in defense against phishing attacks. As I understand it, this works by registering the device with each service, thereby creating a unique keypair. If a phishing site pretends to be someone, they will fail that cryptographic check and the key fob wo...
No, and they are <em>not</em> saying that they can prevent the phishing of passwords. They are saying that phishing the password alone will not give the attacker access to your account. You can enter your Gmail password in your question above and U2F will not prevent that. In the same way, a phishing site can gather ...
No, U2F does not at all prevent phishing of any kind (password or otherwise). Resilience to phishing and U2F are 2 entirely separate concerns. The first is human (learning how to identify and avoid being phished) and the second is technical (making a product that's more hardened in cases of password compromise). Esse...
https://security.stackexchange.com
33,057
[ "https://stats.stackexchange.com/questions/33057", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4263/" ]
I have the following set of results for one of the factors (birth weight) with different levels and their corresponding Odds ratios for survival. I am using the first level (&lt;1.25) as the reference level: Birth weight (kg): <pre><code>Levels Number/level Odds Ratio &lt;1.25 1615 1.00 1.25-...
The fact that these are coefficients are represented entirely by factors in R means that the Intercept is the log-odds for the event, i.e log(the proportion with event / proportion without) for subjects who all have their factor values at the lowest level. We know that of the 1615 in level 1 of the factor under scrutin...
Odds <em>ratios</em> are a measure of difference in rate between two groups. So, it doesn't make sense to talk about just the "odds ratio" for a single group, you have to say what you're comparing that group with. You might find it easier to start with more fundamental quantity, odds - actually this is just another wa...
https://stats.stackexchange.com
446,405
[ "https://physics.stackexchange.com/questions/446405", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/215578/" ]
imagine if I have hot metal piece I want to cool it as fast as possiple, should I put it in strong circulated water bath or just stick it between 2 thick copper plates ? the calculated heat diffusivity of copper is : thermal conductivity x specific heat x density = 385 x 0.385 x 8960 = 1328096 m²/s while for water i...
<blockquote> If it is indeed true that for light we have <span class="math-container">$ds^2=0$</span> does that mean that in 4d spacetime total "distance" is zero for light? </blockquote> Yes, but the scare quotes on the word “distance” are exceptionally important. The spacetime interval is not just a distance in sp...
The length of a null curve is indeed zero, as can be easily computed by hand from the metric tensor with the world function : <span class="math-container">$$s = \int_\gamma \sqrt{\operatorname{sgn}(g(\gamma', \gamma')) g(\gamma', \gamma')}$$</span> In the case of a null curve, <span class="math-container">$g(\gamma'...
https://physics.stackexchange.com
5,642
[ "https://quantumcomputing.stackexchange.com/questions/5642", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/5742/" ]
I saw that the Pauli matrices really work, that's rotating a state by 180 degrees, only if you take the density matrix for example with X it only works if first we take X <span class="math-container">$|\psi\rangle$</span> and multiply it by itself dagger. Then you can see it rotating around the X-axis. Same with Y and...
Describing the Pauli-<span class="math-container">$X$</span> matrix as a rotation by <span class="math-container">$\pi$</span> about a particular axis is specifically referring to how you would visualise the action of the gate with regards to the Bloch Sphere picture. This most naturally maps to the density matrix, whi...
Most error correction schemes suppose that the transmitted vector state becomes mixed on the receiver end. For example, the transmitted state <span class="math-container">$|00\rangle$</span> can turn to <span class="math-container">$|11\rangle$</span> with probability <span class="math-container">$p^2$</span>, to <span...
https://quantumcomputing.stackexchange.com
17,914
[ "https://dba.stackexchange.com/questions/17914", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/8790/" ]
I have no idea of what I have done here, but my InnoDB engine seems to have gone from my MySQL server. I recently upgraded it from the dotdeb repository, then installed <code>mysql-server</code>. There is no mention of InnoDB in my <code>my.cnf</code> except some comments which explain InnoDB is enabled by default, w...
Since you have done the following: <ul> <li>SHOW VARIABLES LIKE 'innodb%';</li> <li>No InnoDB-related variables exist in my.cnf</li> </ul> and nothing comes up, please place this in my.cnf <pre><code>[mysqld] innodb </code></pre> and start mysql and see if it comes up <h2><strong>UPDATE 2012-05-15 15:59 EDT</strong></h...
mysqld.err will say what is wrong. Usually it is an unexpected change in innodb_log_file_size. Did you change my.cnf? If that is it, set it back to the size of the iblog files on disk, and it should start up.
https://dba.stackexchange.com
45
[ "https://scicomp.stackexchange.com/questions/45", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/119/" ]
Physical quantities like pressure, density, energy, temperature, and concentration should always be positive, but numerical methods sometimes compute negative values during the solution process. This is not okay because the equations will compute complex or infinite values (typically crashing the code). Which numerical...
The most common method is to reset negative values to some small, positive number. Of course, this is not a mathematically sound solution. A better general approach that may work and is easy, is to reduce the size of your time step. Negative values often arise in the solution of hyperbolic PDEs, because the appearan...
Assuming we are solving hyperbolic equations without any source terms and assuming we provide physical initial conditions, making sure the numerical scheme we use is <strong>Total Variation Diminishing</strong> is a good way of ensuring the "physicality" of the computed solution. Since a TVD scheme preserves monotonici...
https://scicomp.stackexchange.com
194,446
[ "https://softwareengineering.stackexchange.com/questions/194446", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/35382/" ]
I've worked in some projects where most of the business logic was implemented on the database (mostly through stored procedures). On the other side, I've heard from some fellow programmers that this is a bad practice ("Databases are there to store data. Applications are there to do the rest"). Which of these approache...
<h3 id="business-logic-doesnt-go-into-the-database-2zeb">Business logic doesn't go into the database</h3> If we're talking about multi-tier applications, it seems pretty clear that business logic, the kind of intelligence that runs a particular enterprise, belongs in the Business Logic Layer, not in the Data Access Lay...
I am a strong believer in keeping business logic out of the database as much as possible. However, as my company's performance developer, I appreciate that sometimes it's necessary to achieve good performance. But I think it is necessary far less often than people claim. I dispute your pros and cons. You claim that...
https://softwareengineering.stackexchange.com
107,040
[ "https://electronics.stackexchange.com/questions/107040", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1276/" ]
I am designing a simple 'junk box parts' adjustable constant-current dummy load. The following schematic seems to be the most promising design, where R4 and R3 are part of a current adjust potentiometer. <img src="https://i.stack.imgur.com/8vBLG.png" alt="Constant current sink schematic"> I would like to add overtemp...
The maximum voltage at the non-inverting input of U1 is about 0.15Vcc, so you need only bring the inverting input higher than that to ensure the output is low. Assuming a minimum Vcc of 5V, Vcc-4V is enough. So, you could add a series resistor as in your solution 3, and a 1N4148 from the comparator op-amp output to th...
If you go for shunting R5 down to ground at least the opamp remains in control and not saturated. Then add a load resistor to the output of the opamp to ground so that it does pull all the way down to within 50mV of ground, the leakage problem you mentioned should disappear. Let me know if you try this out and it's sti...
https://electronics.stackexchange.com
326
[ "https://computergraphics.stackexchange.com/questions/326", "https://computergraphics.stackexchange.com", "https://computergraphics.stackexchange.com/users/56/" ]
To render an image for use with red &amp; blue 3d glasses, the usual way to do it is to render from one point of view, convert it to a single intensity (greyscale) value per pixel, and then put that into the red color channel. Render from a slightly different point of view, convert that to greyscale again and put that...
I've done some VR research; this comes up a lot since rendering the scene multiple times (especially at predicted VR resolutions) is expensive. The basic problem is that two views provide more information than only one. In particular, you have two slices of the light field instead of one. It's related to depth-of-fi...
Yes, this is essentially the same problem that occours in paralax mapping. What you basically have is a colored height field. That needs to be rendered from a second view. There are several ways in which you can approach this. You could cheat and just shift pixels by their depth and ignore occlusion. Or you could just...
https://computergraphics.stackexchange.com
73,095
[ "https://electronics.stackexchange.com/questions/73095", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/25341/" ]
Thank you for considering my general question, which I assure you is serious! I want to build -- or have built -- a magnificent shoe that can convert taps (front of the shoe) into Morse code and transmits it (two taps of the heel) to a remote computer to then run a "define: " query in Google. Then, upon automatically ...
It would take a lot of engineering to make this work properly and effectively, and that won't be cheap, but the basic operation you describe should be achievable.
Magicians sure like hiding things in shoes! About a year ago I built a signal processor for a remote control switch hidden in a shoe for a magic trick. What you ask for is certainly possible, but as Olin said, be prepared for a big bill. Google "Electronics for Magicians." If you don't already have that book, it's a ...
https://electronics.stackexchange.com
37,158
[ "https://electronics.stackexchange.com/questions/37158", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6138/" ]
I have two IC chips. On one chip I have one 10K ohm pull-up resistor and on another chip I have three 10K ohm pull-up resistors. At first I was using four through hole pull-up resistors. Then I moved to an array of SMD resistor. Could I simplify the design by attaching all four pins of the ICs to the same pull up r...
If these pullups are permanent (ie the only connection is from the input pin to the resistor) then there's no problem. If not, but all of the inputs should have simultaneously the same level, then it's OK too. I assume that's what you intended. About the resistance, it theoretically should be lower, not higher, becaus...
That depends. If the pins are just inputs you could connect them together and maintain the 10KΩ resistor, but if there is a chance that any of the pins would be an output you will better use an individual resistor per pin to avoid that some pin that eventually turns to be an output drives the others to an undesirable s...
https://electronics.stackexchange.com
693,952
[ "https://physics.stackexchange.com/questions/693952", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/327883/" ]
Why is <span class="math-container">$\psi = e^{i(kx - \omega t)}$</span> a valid wavefunction since it isn't finitely integrable on <span class="math-container">$\Bbb R$</span>? I'm studying derivations of the Schrödinger Equation, which start with a simple wave function of the form <span class="math-container">$e^{i(k...
So first of all, the interpretation of <span class="math-container">$|\Psi(\mathbf{r})|^2$</span> as a probability density function came after the development of wave mechanics by Schrödinger. The question Schrödinger tried to answer is: What is the wave equation for the particle-wave postulated/developed by de Broglie...
I believe you answered your question with the point made in the Edit part! As it is quite often the case, we use some informality -- even if it does not make sense on the face of it -- to guess what the solution should be, in this case, the plane wave. Then we proceed to see how it can be fixed. As a rule, unfortunatel...
https://physics.stackexchange.com
310,753
[ "https://mathoverflow.net/questions/310753", "https://mathoverflow.net", "https://mathoverflow.net/users/128952/" ]
Let $\mathcal{E}'(\mathbb{R})$ be the space of all compactly supported distributions on $\mathbb{R}$. For $f\in \mathcal{E}'(\mathbb{R})$, let $\widehat{f}$ denote the entire extension of the Fourier transform of $f$. <strong>Question:</strong> If $f_n\stackrel{n\rightarrow\infty}{\longrightarrow}f$ in $\mathcal{E...
Let me expand Nate Eldredge's comments. A more elementary proof than the one provided by Jochen Wengenroth, still requiring no computations, is as follows: $\mathcal{E}'$ is the dual space of $C^\infty$, which is endowed with the Fréchet space topology given e.g. by the seminorms $\|f\|_k:=\|f\|_{C^k(B_k(0))}$. The fa...
Besides the direct approach to such continuity questions as in Nate Eldredge's comment one can try to use a closed graph argument. The closed graph theorem holds for <em>ultrabornological</em> domain spaces (like the space $\mathcal E'(\mathbb R)$ of compactly supported distributions endowed with the topology of unifor...
https://mathoverflow.net
2,131
[ "https://cstheory.stackexchange.com/questions/2131", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/10/" ]
What's the minimum diameter of a connected undirected graph with |V| vertices and O(|V|) edges?
A line graph has O(V) edges and diameter V-1. A star graph also has O(V) edges and diameter 2. So it seems that the constraint that a graph has O(V) edges places almost no restriction at all on what the diameter can be. Of course, 2 is the minimum, since only a complete graph has diameter 1.
In general I would say the biggest lower bound is 1, as the graph <pre><code>a---b </code></pre> has diameter 1 and has |V|/2 = O(|V|) edges. The same holds for <pre><code>a---b---c +-------+ </code></pre> and <pre><code> +-------+ a---b---c---d +-------+ </code></pre> which have exactly |V|, and |V|+1 = O(|V...
https://cstheory.stackexchange.com
352,436
[ "https://mathoverflow.net/questions/352436", "https://mathoverflow.net", "https://mathoverflow.net/users/78554/" ]
Let <span class="math-container">$G$</span> be a real, connected, semisimple Lie group and <span class="math-container">$\Gamma &lt; G$</span> a torsion-free lattice. Then does there exist a finite <span class="math-container">$CW$</span>-model for <span class="math-container">$B\Gamma$</span>? I know this to be true ...
<ol> <li>As written your definition doesn't quite make sense because <span class="math-container">$\bigsqcup_{n \in \mathbb{N}} \Sigma_n$</span> doesn't contain nearly enough sets (e.g., <span class="math-container">$X \mathrel{:=} \bigsqcup_n X_n$</span> itself is not in it). It seems better to me just to set <span c...
The first issue: In order to talk about a coproduct / disjoint union we need a category for our objects to live in. A natural candidate seems to be the following category (result of a grothendieck construction): <ul> <li><strong>Objects</strong> are triples <span class="math-container">$X=(S_X, \Sigma_X, \mu_X)$</spa...
https://mathoverflow.net
1,565
[ "https://mathoverflow.net/questions/1565", "https://mathoverflow.net", "https://mathoverflow.net/users/2/" ]
Let XX be a Deligne-Mumford stack and let XX \to X be a coarse moduli space. Suppose that X is smooth. Is XX smooth? If not, what is an example? What if XX is of finite type over C (the complex numbers)? What are conditions we can put on XX to make this true?
The answer is yes, a singular DM stack can have a smooth coarse space. Let U=Spec(k[x,y]/(xy)) be the union of the axes in <b>A</b><sup>2</sup>, and consider the action of G=<b>Z</b>/2 given by switching the axes: x&rarr;y and y&rarr;x. Then take XX to be the stack quotient [U/G]. This is a singular Deligne-Mumford sta...
I think if the coarse moduli space is smooth, so is the DM stack, because XX --> X is a gerbe, which is always smooth (since smoothness can be checked fppf locally on X, and B(G/X) is smooth over X). A stack (or a morphism of stacks, not necessarily representable) is defined to be smooth if one can find a presentation ...
https://mathoverflow.net
46,325
[ "https://stats.stackexchange.com/questions/46325", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/8067/" ]
I have a time series of proportions, $x_t = \frac{a_t}{b_t}$ i.e. $x_1 = 2 / 30, x_2 = 1/10$, ... I want to smooth $x_t$. Should I apply a smoothing function directly to $x_t$, or should I smooth $a_t$ and $b_t$ individually, then recompute the proportions? My gut tells me you should smooth the individual time se...
<strong>It would be erroneous to compute the ratios of the smoothed counts,</strong> because it's possible many of the ratios would not be true proportions--they could (easily) wind up outside the valid range from $0$ to $1$. (This happens in the example described below.) Since the denominators $b_t$ vary substantial...
I am no expert in time series, but no one has answered so.... A little playing on a Thursday afternoon: <pre><code>#MAKE UP DATA set.seed(16549678) time &lt;- 1:100 a &lt;- round(runif(100, 5, 10) + rnorm(100,0,1)) b &lt;- round(a*4+rnorm(100)) x &lt;- a/b #PLOTS OF RAW DATA, RED IS FOR B plot(time, a, ylim = c(0,50)...
https://stats.stackexchange.com
29,239
[ "https://stats.stackexchange.com/questions/29239", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/11572/" ]
We are trying to create auto-correlated random values which will be used as timeseries. We have no existing data we refer to and just want to create the vector from scratch. On the one hand we need of course a random process with distribution and its SD. On the other hand the autocorrelation influencing the random pr...
I actually often run into that problem. My two favorite ways to generate a time series with auto-correlation in R depend on if I want a stationary process or not. For a non stationary time series I use a Brownian motion. For example, for a length 1000 I do: <pre><code>x &lt;- diffinv(rnorm(999)) </code></pre> For a ...
If you have a given autocovariance function, the best model (in terms of tractability) I can think of is a multivariate gaussian process, where, given the autocovariance function $R(\tau)$ at lag $\tau$, you can form the covariance matrix easily, $$\Sigma=\left[ \begin{array}{cccc} R(0) &amp; R(1) &amp; ... &amp; R(N)...
https://stats.stackexchange.com
333,314
[ "https://electronics.stackexchange.com/questions/333314", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/33445/" ]
I’m using LPC1788 MCU with KeilV5 compiler. I Have a Timer ISR in which I read a value form specific ADC channel and write it into a SD-Card using FATFS library. Here is my Timer ISR code: <pre><code>void TIMER1_IRQHandler(void){ if (TIM_GetIntStatus(LPC_TIM1, TIM_MR1_INT)== SET){ ADC_Init(LPC_ADC,838); ADC...
It is usually a very, very bad idea to use FatFS from interrupts. <strong>The most common pattern is to acquire the data in the ISR, store is somewhere and have a main loop task that stores that queued data somewhere.</strong> If your SPI driver uses interrupts and you don't enable nested interrupts (advanced topic), ...
+1 for @filo, who correctly addressed the problem of nested interrupts either not enabled (or having the same priority, therefore not being triggered). However the problem is not with the SPI (which typically is not used with interrupt on the FatFS, unless some heavy modifications are done in the code. The SPI is used...
https://electronics.stackexchange.com
70,765
[ "https://softwareengineering.stackexchange.com/questions/70765", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/20128/" ]
What are the consequences of leaving work on time in software companies? What's the professional way to deal with this? [Editorial addition] The question is about working standard hours and not putting in extra hours without being explicitly asked to. Is working extra hours a norm or an expected work attitude in sof...
The consequence? You get home on time... That's about it. <em>edit</em> In response to some of the commenters: This answer is directly related to a conversation I had with my manager very recently. I have weekly 1x1 meetings with my manager, and a few weeks ago it went something like this: <blockquote> Me: I have a con...
The professional way to do this is to... well, leave more or less on time. Give it 1-15 extra minutes perhaps in order not to be perceived clockwatching then go. If you have a task that is about to get finished in these 1-15 minutes, do it, otherwise shift it for tomorrow. It's important to demonstrate from the beginn...
https://softwareengineering.stackexchange.com
161,500
[ "https://electronics.stackexchange.com/questions/161500", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/70777/" ]
One paper clip for the left opening and one paper clip for the right opening of one single U.S. outlet. The paper clip on the left in my left hand and the paper clip on the right in my right hand.
Keeping the left hand cap at 1uF is the problem. Just do the math - it has an impedance of 398 ohms at 400Hz and in your original circuit you had a 100k load. No problem here but, dropping the load to 1kohm means you should increase the left hand capacitance appropriately in order to counter the loading effects. Or inc...
This is an old question, but I can't across this exact thing tonight with a different solution! I was using a soundcard as the source and found the same result: lower loads lowered output. In my case, the output impedance of the soundcard was 1kOhm, so once the impedances of the capacitors and the load was on the order...
https://electronics.stackexchange.com
1,851,544
[ "https://math.stackexchange.com/questions/1851544", "https://math.stackexchange.com", "https://math.stackexchange.com/users/183661/" ]
For a group $G$, the commutator of two elements is defined as $[a,b]=aba^{-1}b^{-1}$, and is usually said to measure the extent to which the elements $a$ and $b$ fail to commute. I'm having some trouble making sense of the last bit: I understand that if $a$ and $b$ commute, then $[a,b]=e$. But if $a$ and $b$ don't com...
We can't really say "how non-commutative" $a$ and $b$ are, without some corresponding notion of "how much not the identity" any given element of a group $G$ is, as you point out. For some groups, we may be able to do this, but in general, there's no "universal" way. The real value in this, is not the individual commut...
To begin to make some sense it is convenient to see that the commutators subgroup $G'$ makes the quotient $G/G'$ be abelian. It is like killing the non-commutativity in $G$.
https://math.stackexchange.com
11,048
[ "https://chemistry.stackexchange.com/questions/11048", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/3955/" ]
In mineralogy class, I was taught that metallic and ionic bonds are weaker than covalent bonds and that's why quartz and diamond have such a high hardness value. However, in organic chemistry class, I learned that covalent bonds are weaker than metallic and ionic bonds, thus organic substances have a much lower melting...
Quartz and diamond are stronger substances because their molecules form network covalent structures. These structures form a lattice-like structure, much the same as ionic compounds. This molecular network is also the reason that diamond and quartz form a crystalline structures, just like you'd see in ionic substances...
What you learned in your mineralogy class was correct; bond strength decrease in the following order covalent > ionic > metallic. The reasoning for this is as follows. In covalent bonds such as those in methane and oxygen, the valence electrons are shared between the atoms involved in the bond and they (the electrons...
https://chemistry.stackexchange.com
40,967
[ "https://quant.stackexchange.com/questions/40967", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/35087/" ]
Leverage helps the trader to trade with more than what is available in the trader's account. Lets say I trade long 10 BTC/USD at 7000 USD using leverage of 1:10 (i.e i deposited 7000 USD). Now if the rate increases to 8000 USD I make a profit on 10 BTC/USD. But what if the rate drops to 6000$ then in essence I lost 100...
Adding to Attack68 answer- you can do a few things: <ol> <li>calculate total and average pnl over a given time.</li> <li>calculate skew, kurtosis etc. as suggested above.</li> <li>calculate hit rate.</li> <li>calculate max drawdown.</li> <li>SR using daily pnl is fine but ideally the returns should be in %.</li> </ol...
If you have a time series of accumulated/on going PnL figures, $X_t$, you should be careful to convert these into a more stationary data series of period PnL changes (probably daily changes): $Y_t = X_t - X_{t-1} = (1-L)X_t \; , \text{for L the lag opertaor}$ Then you can consider the traditional ex post Sharpe Ratio...
https://quant.stackexchange.com
334,074
[ "https://electronics.stackexchange.com/questions/334074", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/158124/" ]
This question is related to general software embedded system practice. I want to have a blinking led as a status led for my MCU. How correct is it to implement it with the timer interrupt? With that given the lowest priority. How about using a PWM with some set frequency? Which method may have advantages over the oth...
I generally drive a status LED with various blink patterns, depending on the status of the system. Each blink pattern lasts 1 second. To define the patterns, I break the 1 second interval into time slices. A mask of bits somewhere then defines whether the LED is supposed to be on or off for each time slice of each p...
The advantage of using a hardware peripheral, such as PWM or a timer, is that it does some of the work in hardware and frees up the MCU from having to do the work with instructions. The disadvantage of using a hardware peripheral to indicate software status is that the hardware peripheral may continue to work after th...
https://electronics.stackexchange.com
1,200,314
[ "https://math.stackexchange.com/questions/1200314", "https://math.stackexchange.com", "https://math.stackexchange.com/users/207162/" ]
Given a unit $n$-sphere $\mathbb{S}^n = \{x \in \mathbb{R}^{n+1} : \langle x,x \rangle = 1\}$, we define the set $\mathbb{P}^n = \{[x] : x \in \mathbb{S}^n\}$, where $[x] = \{-x, x\}$, and a function $d: \mathbb{P}^n \to \mathbb{R}$ given by $$d([x],[y]) = \min\{\|x-y\|, \|x+y\|\}.$$ I am to prove that $d$ is a distan...
<ol> <li>Let $z$ be any representative of $[z]$.</li> <li>Let $x$ be a representative of $[x]$ such that $d([x],[z])=\|x-z\|$.</li> <li>Let $y$ be a representative of $[y]$ such that $d([z],[y])=\|z-y\|$.</li> </ol> Now the desired inequality becomes $$d([x], [y]) \leq \|x-z\| + \|z-y\|$$ and the rest should be clear...
<em>No need to check for special cases.</em> First note that <span class="math-container">$|x-z|=|x+y-(z+y)|\leq|x+y|+|z+y|$</span>. Then, <span class="math-container">\begin{align*} 2\cdot d([x],[z])&amp;\leq|x-z|+|x+z|\\ &amp;\leq|x+y|+|y+z|+|x-y|+|z-y|\\ &amp;=\big(|x+y|+|x-y|\big)+\big(|z+y|+|z-y|\big)\\ &amp;\le...
https://math.stackexchange.com
2,639,563
[ "https://math.stackexchange.com/questions/2639563", "https://math.stackexchange.com", "https://math.stackexchange.com/users/521239/" ]
<blockquote> Let $a, b, m,$ and $n$ be integers and suppose that $am+bn = 36$. What can you say about $gcd(m, n)$? </blockquote> The professor said the question has <strong>one answer</strong> and he gave me this hint. <strong>HINT:</strong> $gcd(m, n)$ has the property that it divides both $m$ and $n$. What doe...
The answer is $$\gcd(m,n)|36$$ This is because $am+bn$ is divisible by $\gcd(m,n)$.
No. It's the other way around. Since $gcd(m,n)$ divides both $m$ and $n$, it divides $36$. That's about all that can be said...
https://math.stackexchange.com
221,900
[ "https://softwareengineering.stackexchange.com/questions/221900", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/112269/" ]
I'm a Mac user, but I need to write a script on Windows, and I'm not sure how I should go about that. Here's the scenario: Someone adds photos to a USB drive. The drive is then inserted into a digital picture frame. In order for the photos to autoplay, a 'playlist.asb' file must be present on the drive. <strong>I wa...
@user61852 is on the right track, but his solution has the drawback that it will not work with a different drive letter. And you don't know the drive letter beforehand. Everytime you insert the usb stick, it may get a different drive letter assigned to. As a solution, one should put the script directly in the main fo...
Assuming flashdrive will allways be mapped to, e.g., G: letter, and all images are jpgs, then this should work: <pre><code>echo. &gt; g:\slideshow\playlist.alb dir /b g:\slideshow\*.jpg &gt;&gt; g:\slideshow\playlist.alb </code></pre> Create a file with the .bat extension with that instruction in it. If no jpg file ...
https://softwareengineering.stackexchange.com
2,491,475
[ "https://math.stackexchange.com/questions/2491475", "https://math.stackexchange.com", "https://math.stackexchange.com/users/328169/" ]
Let $I = [a, b]$ be an interval in $\mathbb{R}$. We consider $C(I)$ with the maximum norm and define a subset of $C(I)$ $$M_c=\left\{f \in C^1(I): \int_a^b\vert f(x) \vert ^2dx + \int_a^b\vert f'(x) \vert ^2dx \leq c \right\}.$$ The goal is to show $\bar{M_c}$ is compact in $C(I)$. My idea is to show that $M_c$ is ...
Since in the case of complex functions analytic and holomorphic is equivalent (this is a major theorem of complex analysis) we can try to calculate $\dfrac{\partial g}{\partial\bar z}$. We have $f(z)=h\circ g(z)$ where $h(z)=z^3$. <br/> If we suppose $g$ at least $C^1(\mathbb R^2)$ then we can derivate $\dfrac{\part...
We need $n \neq 0$ of course, since $g^0$ is the constant, hence analytic, function $z \mapsto 1$, whatever $g$ is. For $n \neq 0$, we can conclude that $g$ is analytic if $f$ is. If $f \equiv 0$, then clearly $n &gt; 0$ and $g \equiv 0$. Otherwise, $f$ has only isolated zeros, and for $n &lt; 0$ it can't have any. If...
https://math.stackexchange.com
40,165
[ "https://dsp.stackexchange.com/questions/40165", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/27883/" ]
I have the function $$(1-e^{-2n})u[n-1]$$ where $u[n]$ is the step input. I want to find the $z$-transform for this function. I know that the transform of $1-e^{-2n}$ will be $$\frac{z}{z-1} - \frac{z}{z-e^{-2}}$$ Now do I shift each element by one unit to the left to get the entire $z$-transform?
Your mathematical derivation is correct, your $H[k]$ is the single-tap equalizer (i.e. one tap for each subcarrier, and the subcarriers do not mix with each other. That's the <strong>orthogonal</strong> in OFDM). Let me try to explain this a bit more general, without going into coherence bandwidth and flat fading. To...
There's a lot of very valid aspects that you touch, but from what I've learned (and experienced having fun with OFDM SDR transceivers), the main reasoning to do OFDM is having a narrow-channel multicarrier system with low complexity. Let me elaborate: <ul> <li>Multi-carrier is, as you mentioned, very handy because you...
https://dsp.stackexchange.com
179,653
[ "https://electronics.stackexchange.com/questions/179653", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/66784/" ]
When you form a PN junction you're basically closing a circuit so why don't the free electrons in the N and the holes in the P diffuse completely as they would in any other circuit? <img src="https://i.stack.imgur.com/Tx16E.jpg" alt="why is the depletion layer so thin">
Your first pictures show only the 'free moving' things: both parts are electrically neutral: they contain an amount of kernels (with a lot of layer-layer electrons) that compensate the free moving parts. The electrostatic force forces the free moving thingies and their kernels together. (But the kernels can't move, so ...
Electrons need free electrons near by to more. In the depletion layer all the atoms are complete and have no free electrons left within. To over come this the electrons require extra energy, which is absent and the absorption stops
https://electronics.stackexchange.com
179,455
[ "https://softwareengineering.stackexchange.com/questions/179455", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/75116/" ]
Currently we have code stored on a shared network drive and do not use any kind of VCS. The code stored on our shared network drive is always being backed up. We would like to keep things as close to they are now as possible, while using some kind of VCS software. I am envisioning a centralized workflow with each ...
Well, you tagged eclipse, so I would go with git, since its pretty well integrated with the IDE (with EGit). Also you can push on a network drive without having to set up a server like SVN. Plus if you ever decide to use more feature of your VCS you will have a pretty powerful and modern tool at your disposal.
Most, if not all, version control systems will be able to cope with your workflow. You'll simply check out from a main trunk and check back into it when each development is finished. The developers will just need to get into the habit of doing a "get latest/head" at regular intervals. It would be better to take a bra...
https://softwareengineering.stackexchange.com
277,625
[ "https://electronics.stackexchange.com/questions/277625", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/39947/" ]
Maybe this is a dumb question, but I am trying to get my units straight. I have an electrical system which has its consumption metered every hour, so I need units that are graduated in hours. So, given SI units, should I base it in "Joule hours" which would be Watts * 3600? In other words, let's say I have a 100 Wat...
<blockquote> In other words, let's say I have a 100 Watt light bulb and it runs for 3 hours. Then energy consumption would be 100 * 3600 * 3 = 1,080,000 Joule-hours. Is that right? </blockquote> No, there is no need to say anything other than joules. Your lightbulb has consumed, over the 3 hour period, 1,080,00...
Watts are units of power. Watts multiplied by time gives energy. Joules are energy units. 1 Joule is 1 Watt multiplied by one second. If you multiply Watts by a time period in seconds, then you have the energy in Joules. Your example is 100 Watts for three hours. That is 100 * 3600 * 3= 1080000 Joules. It is ...
https://electronics.stackexchange.com
386,034
[ "https://physics.stackexchange.com/questions/386034", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/180969/" ]
I know that momentum would be conserved. I am not looking for this in a homework problem help format because this is not a homework problem. If one person of mass $M$ pushed off of someone with mass $ (2/5)M$ in a frictionless environment, and both started moving, would they have equal or different kinetic energy? Why?...
By Newton's Third Law, the two people would experience equal forces for equal time. However, the person with lower mass would experience more acceleration, and so would travel a farther distance. Since work is the product of force and distance, the lower-mass person would receive more work, and thus more kinetic energy...
No. As mentioned above, look at $KE=\frac{p^2}{2m}$. Because momentum is conserved, both people will have the same value of $p^2$, but since their masses are different, the denominator the kinetic energy term (as written above) will be different for each person.
https://physics.stackexchange.com
375,901
[ "https://softwareengineering.stackexchange.com/questions/375901", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/12893/" ]
If I do this <pre><code>import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; </code></pre> Then why don't I do this, it's more convenient <pre><code>import android.graphics.*; </code></pre> Do you agree that the latter is a risk that I...
It is not a bad idea, but it does have some consequences you should be aware of. It's a tradeoff. Its simpler and shorter, and less programmer overhead typing crap. And its probably less likely to include stray includes that are not needed (though now modern IDEs detect/fix that for you so maybe that doesn't matter). ...
Bad idea. You rely on a kind of smartness inappropriate at the compiler level. Import statements serve a documentation purpose: the reader gets an idea about the covered domains of the class. This is partly killed by the wildcard, you are not likely to actually use every namespace that fits the *. Using a wildcard mak...
https://softwareengineering.stackexchange.com
370,176
[ "https://softwareengineering.stackexchange.com/questions/370176", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/293148/" ]
I can see the benefits of mutable vs immutable objects like immutable objects take away lot of hard to troubleshoot issues in multi threaded programming due to shared and writeable state. On the contrary, mutable objects help to deal with identity of object rather than creating new copy every time and thus also improve...
I think the importance is best demonstrated by comparing to an OO approach eg, say we have an object <pre><code>Order { string Status {get;set;} Purchase() { this.Status = "Purchased"; } } </code></pre> In the OO paradigm the method is attached to the data, and it makes sense for that data to...
The key to understanding why immutable objects are beneficial doesn't really lie in trying to find concrete examples in functional code. Since most functional code is written using functional languages, and most functional languages are immutable by default, the very nature of the paradigm is designed to avoid what you...
https://softwareengineering.stackexchange.com
64,124
[ "https://dba.stackexchange.com/questions/64124", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/37708/" ]
I'm getting the error: 'ORA-00979: not a group by expression' when I try to run this query. <pre><code>select empno, empname from emp.employee group by empno, empname having empmsal &gt; avg(empmsal); </code></pre> I'm attempting to find employees with a salary above the average. Can you see anything wrong with the q...
Because the group by on empno and empname has basically no point (supposing they're unique in the table), a better way to do this would be: <pre><code>select empno, empname from emp.employee where empmsal &gt; (select avg(empmsal) from emp.employee) </code></pre> The thing is that <code>(select avg(empmsal) from emp....
Assume the following employee table <pre> +-------+---------+--------+-------+-------+ | empid | empname | sal | depid | jobid | +-------+---------+--------+-------+-------+ | 11 | smith | 2500 | 2 | 6 | | 32 | doe | 3500 | 3 | 6 | | 17 | clark | 3000 | 2 | 4 | | 24...
https://dba.stackexchange.com
366,044
[ "https://softwareengineering.stackexchange.com/questions/366044", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/296322/" ]
Let's say my user requests my ES/CQRS system to open a support ticket: <ul> <li>The controller sends an <strong>ask-support</strong> command, this command checks if the user has enough credit to do that, then emits an <strong>asked-support</strong> event.</li> <li>Somewhere, a listener responsible for side-effects get...
I'm not sure how you could prevent the asynchrony from propagating all the way to the client. The controller could return a <code>201 Created</code> immediately, along with the URI of the support ticket that has an <code>Asked</code> status at first. The client then polls the resource (automatically or from user initi...
You could assign <em>your</em> token to the request supplied by the controller, and return this. When the client asks "What is the status of request X?" it will hand you <em>your</em> token. This approach has several useful properties. First, you can return the token <em>immediately</em> which is what you want. Second...
https://softwareengineering.stackexchange.com
80,773
[ "https://physics.stackexchange.com/questions/80773", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/30522/" ]
I understand (supposedly) the mathematics concerning the relativity of simultaneity in Special Relativity, but I have a nagging question regarding the original example given by Einstein supporting it (I'm only disagreeing with this specific example, not the concept). It is normally given as a person on an embankment a...
<blockquote> I agree that the person on the embankment will say that the person on the train shouldn't see them as simultaneous </blockquote> Well, then the person on the train shouldn't see them as simultaneous. Some things change between reference frames, but conclusions of the form "in frame $S$, an observer will...
The relativity of simultaneity is entirely symmetrical between two moving frames. This means that two events that are simultaneous in the frame of the platform will not be simultaneous in the frame of the train <I>and</I> that two events that are simultaneous in the frame of the train will not be simultaneous in the fr...
https://physics.stackexchange.com
126,536
[ "https://physics.stackexchange.com/questions/126536", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/41996/" ]
I tried to mimic the mechanism of typical screens to produce white color out of red, green and blue. What I did is displayed the attached image on the screen, and moved far away as to let the diffraction effects take place, so that the three colors appear as if they're coming from the same point. Nonetheless, quite p...
What you are seeing at a distance is not black. It is a darkish shade of gray, RGB gray 85,85,85. The reason you aren't seeing "white" is because each of those three rectangles has an HSV value of only 33% and you are seeing that merged square against a white background. That merged square will appear to be whitish if...
While David Hamman's answer is correct, I wanted to expand a little bit on his answer: When you use a CRT, you are looking at <em>emitted</em> light. In the case of emission, there is no "absolute" white - something will only look gray in comparison to something else with the same color ratio but brighter. When you tu...
https://physics.stackexchange.com
480,944
[ "https://electronics.stackexchange.com/questions/480944", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/233421/" ]
I have a magnetically permeable element (98% pure iron) vibrating at 3-5Hz between two electromagnets (with iron cores) which is experiencing too much damping, presumably due to eddy current losses. I know I can reduce this damping by constructing my vibrating element from thin laminated layers, or by using an electri...
<blockquote> "The algebraic sum of currents in a network of conductors meeting at a <strong>point</strong> is zero." </blockquote> It's a <em>point</em>, so no charge can get 'stuck' there because there is no place for it to get stuck in. This point has no capacitance, inductance, resistance or length, so any curr...
The economist George Box once said that "all models are wrong; some are useful". If you asked a physicist they might be able to describe a particular set of circumstances...electric field, magnetic field, quantum effects, whatever...that would cause a temporary nonuniformity in the carrier concentration in a wire. But...
https://electronics.stackexchange.com
16,992
[ "https://mathoverflow.net/questions/16992", "https://mathoverflow.net", "https://mathoverflow.net/users/7/" ]
I've read in (abstracts of) papers that there are abelian varieties over fields of positive characteristic that admit no prinicipal polarization. Apparently its not the easiest thing to find an example of, but I was thinking it should be much easier over the complex numbers. All abelian varieties of dimension 1 are ...
Here is another construction, followed by some comments on how to solve the existence problem in general. <blockquote> If $A$ is a $g$-dimensional principally polarized abelian variety over $\mathbf{C}$ with $\operatorname{End} A = \mathbf{Z}$, and $G$ is a finite subgroup whose order $n$ is not a $g$-th power, then...
I've always meant to sit down and figure out some examples. OK, got it. I think the following works over any field (including finite fields and numbers fields) and so must be standard (unless I've overlooked something). Let $E$ and $E'$ be non-isogenous elliptic curves over a field $k$ (i.e., no nonzero maps between t...
https://mathoverflow.net
487,259
[ "https://physics.stackexchange.com/questions/487259", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/161019/" ]
As far as I know, Erwin Schrodinger used this thought experiment to show the absurdity of the interpretation of the quantum mechanics. But many times I encounter on web even famous physicists say things like "When we observe this happens and we do not observe this does not happen ..." But in the experiment there is a...
The "quick and dirty", "immediate" way to understand why that any proposed, particularly electromagnetic, "free energy" device or scheme won't work is this: <ul> <li>Virtually <strong>all</strong> of the electromagnetic phenomena you have access to in any combination of magnets, wires, coils and other elementary elect...
John Searl claims to have invented an antigravity device too. There is no such thing as free energy. The "Searl Effect" is fradulent science. Normally I'd provide references for this sort of thing, but I don't want to give this guy a search engine boost by linking to him.
https://physics.stackexchange.com
116,695
[ "https://electronics.stackexchange.com/questions/116695", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/16173/" ]
What difference between peak-power, average power and true RMS power in RF measurement? I have read a peak-power measurement can calculate average power measurement also. Does any of these needs signal to be demodulated?
Without resorting to what Xilinx is reporting in their GUI, your VHDL code is not valid. "Half-Subtractor" is not a valid entity name: <code>token_test Half-Subtractor 00001 IDENTIFIER_TOKEN (128) Half 00001 DELIM_MINUS ( 14) - 00001 IDENTIFIER_TOKEN (128) Subtractor</code> An identifier in...
It looks to me that 'subtractor' is not properly added to your project. Try to create a new project and then <strong>add a new VHD module to the xa3s50-4vqg100</strong> (right click on xa3s50-4vqg100). Then, place your code in it.
https://electronics.stackexchange.com
725,245
[ "https://physics.stackexchange.com/questions/725245", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/244704/" ]
From Boltzmann distribution: <span class="math-container">$P_{j}=\frac{e^{\frac{-mv^{2}}{2kT}}}{Z}$</span> with partition function in the form, <span class="math-container">$Z=\int e^{\frac{-mv^{2}}{2kT}} d\bar{v}^{3}$</span>, where <span class="math-container">$ d\bar{v}^{3} =dv_{x}dv_{y}dv_{z}$</span> we get the Maxw...
The key point is the word <em>distribution</em>. The distribution of velocities is a function <span class="math-container">$P( \vec v)$</span> giving the probability of finding a molecule in a velocity space volume according to the formula: <span class="math-container">$$ {\mathrm {Probability~of~velocity~in~a~volume~d...
<ol> <li>p(v) is the velocity distribution: understand the speed. Velocity and speed are only for high school. In real Life, nobody cares about the distinction. </li> <li>P(v) is not a probability, but a distribution: i.e it is a density of probability. P(v) dv is a probability. </li> <li>idem than 1 </li> </ol>
https://physics.stackexchange.com
3,986,807
[ "https://math.stackexchange.com/questions/3986807", "https://math.stackexchange.com", "https://math.stackexchange.com/users/766785/" ]
Let <span class="math-container">$\mathcal C$</span> a category. We define the <em>category of cones</em> <span class="math-container">$\text{Con}(\mathcal C)$</span> in the following way: <ul> <li><strong>Objects:</strong> quadruples <span class="math-container">$(\mathcal Z, \underline{M}, M, m)$</span> consisting of...
Your idea to take the cone over an empty category to represent objects is basically good, however, as was noted in the comments, a morphism from a cone over shape <span class="math-container">$\mathcal Z$</span> to a cone over <span class="math-container">$\mathcal Y$</span> involves a contravariant part, namely the fu...
I've tried to show the statement for <span class="math-container">$S(C) = (\underline{1}, F_{C}, C, 1_C)$</span> (where <span class="math-container">$F_C$</span> is the functor <span class="math-container">$\{*\} \to C$</span>) as recommended by Berci and I wanted to know everything is good in the justification, let me...
https://math.stackexchange.com
1,883,750
[ "https://math.stackexchange.com/questions/1883750", "https://math.stackexchange.com", "https://math.stackexchange.com/users/233349/" ]
Consider the following function in n-dimensional space $$f(x_{1},x_{2},...,x_{n})=x^{2}_{1}+x_{2}^{2}+...+x_{n}^{2}$$ What are the minimum and maximum values of $f$ in the region $$x_{1}^{2}+2x_{2}^{2}+3x_{3}^{2}+...+nx_{n}^{2}\leq 1$$? I think the minimum value is 0 when all $x_{1}=x_{2}=...=x_{n}=0$. What is the...
You can start with the inequality \begin{equation} \begin{split} x_1^2+2x_2^2+3x_3^2+ \ldots +nx_n^2 &amp;\leq 1\\ \mbox{i.e., } x_1^2+x_2^2+x_3^2+ \ldots +x_n^2 &amp;\leq 1-\sum_{k=2}^n(k-1)x_k^2 \end{split} \end{equation} In other words, the value of $f\leq 1-\sum(\mbox{+ve terms})$. The max is attained when $x_2=...
The maximum value occurs at some point such that $x_1^2+2x_2^2+\cdots +nx_n^2=1$. This is because the maximum clearly does not occur at the origin. And if it occurred at some $(a_1,\dots,a_n)$ with $0\lt a_1^2+2a_2^2+\cdots +na_n^2\lt 1$, we could by multiplication by a suitable $\tau$ obtain a larger sum of squares us...
https://math.stackexchange.com
157,133
[ "https://security.stackexchange.com/questions/157133", "https://security.stackexchange.com", "https://security.stackexchange.com/users/123434/" ]
I understand that cookies with the secure flag should be transmitted over a HTTPS connection. It also means that these cookies should be protected from adversaries (private cookie). Thus, it is important to set the HttpOnly flag on this kind of private cookie to prevent XSS. Is a private cookie with the secure flag bu...
The <code>secure</code> flag ensures that the setting and transmitting of a cookie is only done in a secure manner (i.e. https). If there is an option for http, secure flag should prevent transmission of that cookie. Therefore, a missing secure flag becomes an issue if there is an option to use or fall back to http. <c...
These two flags mitigate two completely different attack vectors. <ul> <li>HttpOnly - mitigates successful Cross-Site Scripting attacks.</li> <li>Secure - mitigates against Man-In-The-Middle attacks.</li> </ul> One without the other means you've only mitigated that particular vector. That is, it depends what threats ...
https://security.stackexchange.com
99,907
[ "https://stats.stackexchange.com/questions/99907", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/28218/" ]
I need an <strong>advice/ best method</strong> on how to rigorously test the <strong>influence of categorical predictors</strong> (states), or their duration (duration of war/peace in this case) <strong>on time series</strong>. <strong>How to prove that the increase in prices of oil is caused by war?</strong> I would ...
The data suggests a possibly useful model <img src="https://i.stack.imgur.com/x27fC.png" alt="enter image description here">. TH Actaul and Fitted values are graphed here<img src="https://i.stack.imgur.com/pDUnl.jpg" alt="enter image description here">. Th residual plot does not indicate non-randomness <img src="https:...
strucchange package in R (Zeileis et al. 2003) - with this you can identify changes or significant breaks in your time series and study and possibly relate significant break points to war events. Denisiar
https://stats.stackexchange.com
1,993,764
[ "https://math.stackexchange.com/questions/1993764", "https://math.stackexchange.com", "https://math.stackexchange.com/users/384669/" ]
$$ \lim_{x \to \infty} 5 x \tan{\frac{3}{x}} $$ I have found out a way to prove L'Hospital's rule with the evaluation in this form: $$ \lim_{x \to \infty} \frac{5x}{\frac{1}{\tan{\frac{3}{x}}}} $$ or $$ \lim_{x \to \infty} \frac{\tan{\frac{3}{x}}}{\frac{1}{5x}} $$ after this point I am confused on which to choose.
Do a change of variables to make things easier $$\lim_{y\to 0^+}{5\tan(3y)\over y}$$ apply L'Hôpital: $$=\lim_{y\to 0^+}{15\sec^2(3y)\over 1}=15$$
L'Hospital is not necessary. Simply write $$5x\tan(3/x)=15\sec\frac3x\cdot\frac{\sin\frac3x}{\frac3x}$$
https://math.stackexchange.com
9,188
[ "https://biology.stackexchange.com/questions/9188", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/158/" ]
This question is out of curiosity. The life expectancy of a red blood cell (RBC) is approximately 3 months, and then RBCs are disposed of. Why does the body opt to build new red blood cells rather than using the existing ones? Do RBCs lose functionality/efficiency as they get older?
They are recycled, the iron and other components are broken down and then absorbed. Adaptations of the RBC prevent the same RBC being used. They lack a nucleus to make them highly efficient oxygen carriers (pack as much haemoglobin as possible). Without a nucleus and other organelles they're unable to synthesise the st...
RBCs do lose their functionality as they get older. In addition to the free radical damage they receive, the cells also become smaller over time which increases the effective concentration of the haemoglobin which causes other problems like hemolysis or rigidity.
https://biology.stackexchange.com
105,381
[ "https://softwareengineering.stackexchange.com/questions/105381", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/35784/" ]
<strong>The context:</strong> <ul> <li>it's an internal project (that I don't think a lot of people use)</li> <li>it's old</li> <li>we're updating it</li> </ul> <strong>The issues:</strong> <ol> <li>it abuses the mvc framework (no use of models, business logic in views, etc)</li> <li>what we're being asked to do is ...
OK Here goes. You think the application is badly structured and badly written. The customer thinks it does the job. You want to rewrite it for no other reason than to improve its "internal beauty". So you are asking the customer to spend money on getting the application to do exactly what it does now -- only the pa...
Propose your changes. Be <em>clear</em> on the business case for each: Why will your proposed change help the system as a whole? If it doesn't, expect push back. Why spend money fixing something that ain't broke? Reasons such as making the system more extensible and separations of concern <em>may</em> be valid (dependi...
https://softwareengineering.stackexchange.com
943,918
[ "https://math.stackexchange.com/questions/943918", "https://math.stackexchange.com", "https://math.stackexchange.com/users/178076/" ]
I have to prove: There exists a real number $x$ such that if $x^2 ≥0$ then $x=0$. I have no idea what should I proceed. I tried to come up with the contrapositive, and it doesn't help. I have this so far (and I am sure this is not valid): <blockquote> Suppose $x ∈ \mathbb{R}$. Thus we can also say that $x^2 ∈\ma...
I suppose the problem feels strange because there isn't much to prove. It might help to introduce extra notation to disambiguate between the roles of the different utterances of the equation $x=0$. For example: <blockquote> Let $p(x)$ be the statement that $x^2\geq 0$, and let $q(x)$ be the statement that $x=0$. We ...
$0\in\mathbb R$ and $0=0$ is true. So $0^2\geq 0 \implies 0=0$ is true, so $\exists x\in\mathbb R(x^2\geq 0\implies x=0)$.
https://math.stackexchange.com
212,152
[ "https://softwareengineering.stackexchange.com/questions/212152", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/102757/" ]
During 1990s when there were no advanced frameworks/paradigms available for S/W development , knowledge on data structures was critical... which I can comprehend. But nowadays, for most of the problems (at least from Java/Android development) we can rely on an existing class to provide solution. As such I believe, an ...
You are partially right. Nowadays, only a few people need to be able to correctly and efficiently implement algorithms and a lot of tasks can be completed successfully without knowing all that much about algorithms. On the other hand, knowing about the different algorithms that are commonly used in the kind of softwar...
It's still vital to know about data structures. What collection implementation should you store your data in? Do you want it to be Mutable or Immutable? What BigO characteristics do you want for inserting entries, searching for entries, reading entries out? What memory limitations are you under? Is that data structu...
https://softwareengineering.stackexchange.com
4,169,719
[ "https://math.stackexchange.com/questions/4169719", "https://math.stackexchange.com", "https://math.stackexchange.com/users/734748/" ]
I am trying to calculate the <span class="math-container">$\phi$</span> gradient of the scalar <span class="math-container">\begin{align*} F = \sum_{i=0}^nf^T\dfrac{\partial h_i}{\partial \theta}^T\lambda_i \tag{1} \end{align*}</span> <span class="math-container">$f, \theta \in \mathcal{R}^{m}$</span>, <span class="ma...
For any <span class="math-container">$n \times n$</span> matrix <span class="math-container">$A$</span>, the product of the eigenvalues is equal to the determinant. This is because the characteristic polynomial is <span class="math-container">$det(A-xI)$</span> and roots of the characteristic polynomial are the eigenva...
Specifically for a <span class="math-container">$3\times 3$</span> matrix you can relate the characteristic polynomial to matrix elements via <span class="math-container">$$p(x)=x^3-\operatorname{tr}(A)x^2-\frac 12\left(\operatorname{tr}(A^2)-\operatorname{tr}(A)^2\right)x-\det(A)$$</span> And you get <span class="math...
https://math.stackexchange.com
135,417
[ "https://dba.stackexchange.com/questions/135417", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/15834/" ]
How to create <code>INSERT INTO</code> statements, using <code>SELECT</code> statement? I need it because I want to delete 10k of records from a table, but if someday some of that record need to be restored I want to do that easily. I don't want to backup the whole table, because I just need to restore some of deleted ...
You can use <code>pg_dump</code> with the <code>--inserts</code> option. You should also check the manual of your SQL client. Some can export data as <code>INSERT</code> statements. Another option is to just copy the rows that you delete into a new table: <pre><code>create table _backup as with deleted as ( delete...
If you really needs the insert statement using a query: <pre><code> select 'INSERT INTO table values ('||bla_integer||', '''||bla_string||''')' from thetable; Where bla_string and bla_integer are example columns from thetable... </code></pre>
https://dba.stackexchange.com
168,059
[ "https://dba.stackexchange.com/questions/168059", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/18592/" ]
I connect to a VPN. I open SSMS from my local computer. I connect my local computer SSMS to the SQL instance on the VPN I execute a long running SQL Update from my local computer, and during this a VPN error occurs. All progress now with the SQL Update is lost. Is there a way to use local computer to connect to re...
As far as I know, if the connection between the computer issuing the query batch and the server executing the batch is broken, the server will terminate the batch. As the comments have noted, your best solutions are executing the command from a computer that won't be likely to lose its connection; executing the comman...
2 options: Apart from the SQL Agent job (which is fine, as long as you do not have to follow the current status, nor debug), I use a desktop PC in the office, which is not far from the server room. I use Remote Desktop to work on the Desktop PC, when working from home via VPN. In my previous job, we had a Citrix solu...
https://dba.stackexchange.com
832,503
[ "https://math.stackexchange.com/questions/832503", "https://math.stackexchange.com", "https://math.stackexchange.com/users/64309/" ]
How many arrangements are there when you put $n$ distinguishable balls into $k$ buckets? Each bucket must contain at least one ball. What if the balls are indistinguishable?
The derivative is $$ - h'(t){e^{ - h(t)}}(z(t) - a) + {e^{ - h(t)}}z'(t)$$ which you can write as $$e^{-h(t)}(z'(t)-h'(t)(z(t)-a))$$ But you know that $$h'(t)=\frac{z'(t)}{z(t)-a}$$ whenever $z'(t)$ is continuous. So...? It is also a fact that $e^z=1$ iff $z=2\pi i k$. If you don't know this, prove it! Set $z=h(\bet...
If $z=x+iy$ and $x,y\in\mathbb R$, then $$ e^z = e^{x+iy} = e^x(\cos y + i\sin y). $$ This can be equal to $1$ only if its absolute value is $1$. The absolute value of $\cos y + i\sin y$ is $1$ regardless of which real number $y$ is, so the absolute value is that of $e^x$, and that is $e^x$ itself. Hence $x$ must be ...
https://math.stackexchange.com
62,492
[ "https://mathoverflow.net/questions/62492", "https://mathoverflow.net", "https://mathoverflow.net/users/14576/" ]
Is there an explicit example of non-Kahler manifold $M$ such that $M$ satisfies the dd^c lemma ?
Here is an example of a Moishezon manifold which is easy to visualize. Take a high degree (e.g. a quintic) hypersurface $Z$ in $\mathbb{P}^{4}$ which has a single ordinary double point. Let $X$ be a small resolution of $Z$. Explicitly, a small analytic neighborhood of the singularity can be identified with the vertex o...
This does not answer your question, but it seems interesting to point out. A non-example would be any complex threefold diffeomorphic to the six-sphere (if such a manifold exists). To see this, first note that the $dd^c$-lemma holds for $(1,1)$-forms on a compact complex manifold iff $b_1=2h^{0,1}$ (see for example t...
https://mathoverflow.net
167,893
[ "https://security.stackexchange.com/questions/167893", "https://security.stackexchange.com", "https://security.stackexchange.com/users/157258/" ]
As above, we were planning to do the following: <ul> <li>Access our HSM (Luna SA)</li> <li>Generate CSR</li> <li>Send CSR to 3rd Party CA</li> <li>Add critical key usage of Non Repudiation on 3rd Parties portal</li> <li>Send the now signed CSR (public key to our trading partner) which has the key usage</li> </ul> Doe...
When the client is verifying a certificate, there are three possibilities: <ul> <li>The certificate is signed by a CA that the client already trusts (and for which it knows the public key). In this case the client treats the certificate as valid.</li> <li>The certificate is signed by a CA about which the client has no...
It doesn't. It will be treated just as if it were an invalid certificate. For example, anyone can self-sign a certificate, essentially acting as a CA for yourself - but such are not trusted by browsers, so users get warnings to that effect.
https://security.stackexchange.com
3,680,578
[ "https://math.stackexchange.com/questions/3680578", "https://math.stackexchange.com", "https://math.stackexchange.com/users/553563/" ]
Let <span class="math-container">$f$</span> be the minimal polynomial of <span class="math-container">$x\in \Bbb{Q}(x)$</span> over <span class="math-container">$\Bbb{Q}(x^6)$</span>. How to find the Galois group of <span class="math-container">$f$</span>? Here is my thought, <span class="math-container">$f(t)=t^6-x^6...
It is preferable to say that the splitting field is <span class="math-container">$L=K(x,\zeta_6)$</span>, where <span class="math-container">$\zeta_6$</span> is a primitive <span class="math-container">$6$</span>-th root of <span class="math-container">$1$</span> and <span class="math-container">$K=\mathbb{Q}(x^6)$</sp...
The splitting field for <span class="math-container">$ f $</span> is <span class="math-container">$ \mathbb{Q}(x, \sqrt{3}ix) = \mathbb{Q}(x, \sqrt{3}i) $</span>, and the extension degree is <span class="math-container">$ [\mathbb{Q}(x, \sqrt{3}i) : \mathbb{Q}(x^6)] = [\mathbb{Q}(x, \sqrt{3}i) : \mathbb{Q}(x)][\mathbb{...
https://math.stackexchange.com
610,770
[ "https://electronics.stackexchange.com/questions/610770", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/308690/" ]
I am currently use nucleo-board and I try to poll a pin until 100ms. I activated timer interrupt. So basically if pin is not high (digital '1') until 100ms the function must returns false. I share my algorithm below. All I need is to know where to check if interrupt is occur or not. <pre><code>pin = HAL_GPIO_ReadPin(GP...
Most likely you are already running the systick timer which ticks every 1ms, so you can just use the HAL_GetTick() to read the millisecond count.
Most basic implementation of this doesn't need an interrupt. You can set your timer to 100ms (trigger update event every 100ms, prescaler, reload value and counter values of the timer must be selected accordingly). Here is some idea of how to change algorithm (pseudo-code): <pre><code>if(timer_update_event_occurred()) ...
https://electronics.stackexchange.com
35,785
[ "https://electronics.stackexchange.com/questions/35785", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10873/" ]
I have a car console that i wanna test on my work bench. It's rated at 10A DC max @ 12v, but I don't plan on driving any speakers, so the draw should remain fairly low. My power supply can only provide 3A DC @ 12 volts. If the console DOES exceed the 3A draw, will it just not function properly, or could i stand a chanc...
It depends on the power supply. Some have protection against overcurrent, and some don't - it should advise in the manual/datasheet (if it has one).<br> Most decent quality supplies will have some form of protection (current limiting, thermal cutout, fuse) and withstand at least temporary overcurrents, and a good bench...
Your bench supply may get hot and electro. caps degrade quickly and have must shorter lives. If exceeded they can fail. Consider using a small SLA or lead acid in parallel to charge and operate the surges. As long as battery charge V = 14.2 max, it will operate like a car.
https://electronics.stackexchange.com
2,713,656
[ "https://math.stackexchange.com/questions/2713656", "https://math.stackexchange.com", "https://math.stackexchange.com/users/253633/" ]
How to calculate the sum of the integers from $m$ to $n$? Is this correct?<br> $$ \frac{n (n+1)}{2} - \frac{m (m+1)}{2}$$
Assuming $m\le n$, you are rather subtracting the sum from $0$ to $m-1$ to the sum from $0$ to $n$, so $\frac{n(n+1)}{2}-\frac{m(m-1)}{2}=\frac{(m-n+1)(m+n)}2$. This "incidentally" works when $m&lt;0$ or $n\le0$ as well.
This is a special of the sum of consecutive terms of an arithmetic progression $(a_n)$: such a sum is equal to the <code>arithmetic mean of the first and the last terms</code>, multiplied by the <code>number of terms</code>: $$a_m+a_{m+1}+\dots+a_n=\frac{a_m+a_n}2(n-m+1).$$ In the present case, you obtain $$m+(m+1)+\...
https://math.stackexchange.com
57,759
[ "https://physics.stackexchange.com/questions/57759", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/21146/" ]
I'm trying to solve a problem that involves finding the electric field due to a uniformly cylinder of radius $r$, length $L$ and total charge $Q$. Well, my thought was: if I am to use Gauss' Law, I'll have to use a gaussian surface enclosing the cylinder. Then here arises my doubt: My try was to enclose the cylinder w...
Symmetries! Your system system has radial symmetry. You can use cylindrical coordinates, with the $z$ axis being the charged cylinder axis; you will easily observe that, due to the symmetry of the system, every quantity depends only on $r=x^2+y^2$ and $z$, rather than $x$, $y$, $z$. The answers to your questions can be...
For external points, cylinder behaves like a line of charge. So you just have to put the distance in the formula of electric field of a point charge as (radius + distance from the cylinders surface)
https://physics.stackexchange.com
364,758
[ "https://stats.stackexchange.com/questions/364758", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
Suppose we have a probability function like: $$ p(x|y,z) $$ Does it mean it is a <strong>joint distribution</strong> with $x|y$ and $z$ or it is a <strong>conditional distribution</strong> of $x$ given $y,z$ ? Intuitively, I think it is the second one, which is conditional distribution of $x$ on $y,z$ jointly. What...
It is the second one. In the probability notation $p(\cdot|\cdot)$, normally whatever comes after the bar $|$ is assumed to be the events that occurred. In the case of $p(x|y,z)$, it can be interpreted as 1. the probability of $x$ given $y$ and $z$ or 2. the probability of $x$ when both $y$ and $z$ occurred.
If you expand the notation using the definition, we have: $p(x | y, z) = \frac{p(x, y, z)}{p(y, z)} = \frac{p(X = x,\, Y = y, Z = z)}{p(Y = y,\, Z = z)}$, where I have made things a little more explicit in the last equality. For simplicity of explanation, let's assume that each of the random variables is discrete. Th...
https://stats.stackexchange.com
566,359
[ "https://physics.stackexchange.com/questions/566359", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/226508/" ]
I'm currently going through Matthew D. Schwartz book <em>Quantum Field Theory and the Standard Model</em>, p. 23. For free (non interacting) field theories we are able to quantise the field by expanding our field operator as a Fourier transform of ladder operators for each mode, i.e. <span class="math-container">$$\phi...
&quot;Satisfy the same algebra&quot; means that the equal time commutation relations <span class="math-container">$$ [a_p(t), a^\dagger_{p'}(t)]= 2E_p (2\pi)^3 \delta^3(p-p') $$</span> continue to hold. The <span class="math-container">$a_p(t)$</span> are no longer ladder operators for the interacting-theory Hamiltoni...
QFT (quantum field theory) describes the scattering of incoming states <span class="math-container">$\vert i \rangle$</span> to outgoing states <span class="math-container">$\vert f \rangle$</span> in terms of asymptotic in- and out-states. In the asymptotic past, <span class="math-container">$t \to −\infty$</span>, th...
https://physics.stackexchange.com
63,126
[ "https://mechanics.stackexchange.com/questions/63126", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/45229/" ]
Here in Minnesota we're looking at 3 days in a row with temperatures dipping into the negative 30s (Fahrenheit) next week. Obviously this is brutal for humans, but I do not own a garage and typically park outside. My question is, are there any preventative actions that I can take for my car? I'm planning to make su...
Several additional things that need consideration: <ul> <li>The battery should be fully charged. If not charged fully, the electrolyte may freeze. Don't try charging a frozen battery! If you have any reason to believe it's not fully charged, drive a really long trip (ideally 2 hours), or purchase a charger. Do note th...
Greetings from another Minnesotan! For the most part, cars are designed to be able to take weather conditions, so I personally wouldn't be too worried. There are a few things to watch out for in exceptionally cold conditions like the next few weeks here: <ul> <li>Starting the car. The problem here is that batteries...
https://mechanics.stackexchange.com
13,542
[ "https://chemistry.stackexchange.com/questions/13542", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/6823/" ]
I am working on a chemistry assignment and can’t figure out part of the problem. <span class="math-container">$\pu{0.2 mol}$</span> of a compound with a molecular weight of <span class="math-container">$82$</span> contain <span class="math-container">$\pu{9.6 g}$</span> of carbon, <span class="math-container">$\pu{1.2...
If you have $0.2\ \mathrm{mol}$ of a compound with $M_\mathrm{r}=82$, then you have $16.4\ \mathrm{g}$ of material. If there is only carbon, hydrogen and nitrogen present, and the carbon and hydrogen total up to $10.8\ \mathrm{g}$, then the amount of nitrogen must be $16.4\ \mathrm{g}-10.8\ \mathrm{g}=5.6\ \mathrm{g}$....
ron's answer starts out with 0.2 mole substance. If instead you start out with 1 mole of substance, you can get the molecular formula directly. One mole would contain 48 g of carbon and 6 g hydrogen (five times more than 0.2 mole would). That would be 4 moles of carbon and 6 moles of hydrogen, i.e. <span class="math-c...
https://chemistry.stackexchange.com
1,627,694
[ "https://math.stackexchange.com/questions/1627694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308159/" ]
I am revising for one of my Computer Science exams, and a repetitive question keeps coming up; however it's very maths based. And I suck at mathematics. <em>Question $3)$</em> Consider the following two modular linear equations separately, which are to be solved for the variable $x$: $$\begin{align} 6 + 4x &amp;\eq...
Consider the topology on $\Bbb R$ in which the set is open iff it's empty or contains $1$. To prove scalar multiplication is discontinuous, let $\alpha$ be any scalar different from $0,1$. Then letting $f:x\mapsto \alpha x$, the preimage of open set $\{1\}$ is $\{\frac{1}{\alpha}\}$, which isn't open. To prove additi...
Take $\mathbb R$ with the topology generated by the intervals of the form $[a,b)$.
https://math.stackexchange.com
12,642
[ "https://stats.stackexchange.com/questions/12642", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4714/" ]
I am having trouble understanding the following. Let $\mu$ and $\sigma^2$ be the true mean and variance, $\bar{x}$ and $s^2$ the measured mean and variance for a random variable $x$, where $$\displaystyle s^2 = \frac{1}{N+k}\sum_i (x_i-\bar{x})^2.$$ <ul> <li>If $s^2$ is an unbiased estimate of variance then $k=-1$....
The idea of the unbaised variance estimate, is to have $E(s^{2})=\sigma^{2}$ where the expectation is with respect to the sampling distribution of $s^{2}$ or equivalently, with respect to the sampling distribution of $x_1,\dots,x_N$. So if we knew the true mean and the true variance, but not the value of $s^{2}$, then...
What's the problem with just dividing by $N$? You don't take into account that you aren't subtracting the true population mean off of each $x_i$, but rather than estimate of it. One way that I like to think about it is, suppose that I gave you the sample mean $\bar{x}$. How many data points $N-k$ would I have to give ...
https://stats.stackexchange.com
167,752
[ "https://softwareengineering.stackexchange.com/questions/167752", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/61423/" ]
The development team that I'm a member of has recently adapted to work according to Agile practices. This has personally highlighted the fact that I can't stop myself gold-plating code (and documentation) and I consequently exceed original estimates, when I could've delivered solutions that meet the requirements much e...
<em>The best is the enemy of good enough.</em> You can always do more testing, write better documentation, ferret out those corner cases, fill in what you think are missing features, make the architecture cleaner. It's never ending. However, it has to end. There are due dates that have to be met, external constraints ...
First off, I wish more developers had this problem, not because software would end up being released later than expected but because it would likely be a higher-quality release. If you are exceeding your own original estimates, perhaps you need to include your "gold-plating" steps as part of your estimates. If they ar...
https://softwareengineering.stackexchange.com
161,319
[ "https://stats.stackexchange.com/questions/161319", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
First let me start off by saying I know the consequences that come with removing/ignoring outliers.. but for this particular case I am just looking at weekly trends in the equipment I collect data from (a little over 100 sensors). I need to ignore "leverage points" that ruin R sqd values. I need to see if any of my sen...
I persist in my belief that this is probably not a meaningful exercise, but this is a method of allowing you to avoid the error that is thrown when you try to regress <code>wt</code> on <code>wt</code>. The error has nothing to do with outliers, but rather your choice of functions, BTW, so you probably do need to amend...
The error comes from trying to do: <pre><code>lmrob(mtcars$wt ~ mtcars$wt) </code></pre> You'll need to remove <code>wt</code> from the dataframe. In <code>lm</code> it doesn't throw an error, it simply throws a warning and keeps going.
https://stats.stackexchange.com
4,039,504
[ "https://math.stackexchange.com/questions/4039504", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
<blockquote> Given that <span class="math-container">$\frac{a}{1-x}+\frac{b}{1+2x}\approx-3+12x$</span> for small values of <span class="math-container">$x$</span>, find the value of <span class="math-container">$a$</span> and <span class="math-container">$b$</span>. </blockquote> This question is very hard i am on the...
Using <span class="math-container">$\displaystyle\frac{1}{1+y}\approx 1 - y$</span> for small <span class="math-container">$y$</span>, we wish to find <span class="math-container">$a$</span> and <span class="math-container">$b$</span> such that: <span class="math-container">$$\frac{a}{1-x} + \frac{b}{1 + 2x} \approx 12...
As a (fill the gap) re the other responses: <span class="math-container">$(1-x)(1 + x + x^2 + \cdots + x^n) = 1-x^{(n+1)} \approx 1$</span>, for small values of <span class="math-container">$x$</span>. In fact, when <span class="math-container">$|x| &lt; 1$</span>, the infinite series <span class="math-container">$(1 ...
https://math.stackexchange.com
124,843
[ "https://cs.stackexchange.com/questions/124843", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/120120/" ]
I am trying to construct a context-free grammar for the language <span class="math-container">$$ L = \{ w \in \{a,b,c\} \mid w \text{ contains an odd amount of } a \text{ and there are exactly two } c \}. $$</span> I am currently stuck with this and any help would be appreciated, thanks in advance!
The phrase <blockquote> Every context-free language is decidable </blockquote> has the following meaning: <blockquote> If the language <span class="math-container">$L$</span> is context-free, then <span class="math-container">$L$</span> is decidable </blockquote> or in other words <blockquote> If <span class...
It means for every context free language there is an algorithm that can correctly decide if any string S is in the language or not. We can actually say something a lot stronger: There is actually a known algorithm that can take an arbitrary context free language and a string as input and decide in polynomial time whe...
https://cs.stackexchange.com
257,618
[ "https://dba.stackexchange.com/questions/257618", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/196044/" ]
It is a simple question, but i could not find the answer. I want to select all the columns in my table with a <code>SELECT *</code> statement, but i also need to alias a UUID column this way: <code>BIN_TO_UUID(ID) as ID</code>. I need something like this: <pre><code>SELECT BIN_TO_UUID(ID) AS ID, * FROM TABLE_NAME </...
I figured out the solution. I simple had do repeat the table name, as follows: <pre><code>SELECT bin_to_uuid(id) as uuid, table_name.* FROM table_name </code></pre> But if you have a solution that does not require to repeat the table name i will upvote your answer, since repeating all the table names in all the queri...
<blockquote> I want to select all the columns in my table with a SELECT * statement </blockquote> This is a Bad Idea. Databases are intrinsically <em>shared</em> resources and, typically, are maintained over time, by <em>more than one</em> person. You write a query today, using "select *" that pulls back all thr...
https://dba.stackexchange.com
702,054
[ "https://physics.stackexchange.com/questions/702054", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/305256/" ]
<blockquote> The minimum number of non-coplanar forces that can keep a particle in equilibrium is: (a) 1 (b) 2 (c) 3 (d) 4 </blockquote> Answer given is option <span class="math-container">$(d)$</span> , i.e <span class="math-container">$4$</span>. But can’t it be <span class="math-container">$(c)$</span> , i.e <span c...
Actually, the forces <span class="math-container">$\vec{F_1}, \vec{F_2}, \vec{F_3}$</span> defined by the points <span class="math-container">$(3,4,0)$</span> , <span class="math-container">$(-3,0,5)$</span> and <span class="math-container">$(0,-4,-5)$</span> are coplanar. Even though <span class="math-container">$\vec...
The question seems to be worded incorrectly. <ul> <li>If there is a known applied force, then 3 force magnitudes are linearly independent directions are needed to oppose the force. I can see that 3+1 would be the answer <em>if you include the applied force</em>. </li> <li>Or one single force in opposite direction and ...
https://physics.stackexchange.com
18,136
[ "https://physics.stackexchange.com/questions/18136", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/3622/" ]
These questions are linked, so I've asked them in a single post: Why is a critical one-dimensional many-body system a two-dimensional conformal field theory?- Why the switch from 1D to 2D? What does 2+1 dimensional mean? Two dimensions of space and one of time? Or is it a strange way of saying three dimensional? Ca...
What you say is not possible with interference. Interference of light does not produce new colors of light. Light would have to scatter inelastically off of some molecules to produce a down-shifted frequency (Raman scattering or some type of wave-mixing phenomena). The point is, the light should interact with matter to...
You'd have more luck using two infrared lasers - if you shone two infrared lasers at your eye (or at a camera) with frequencies that are half that of a visible photon, a small percentage of them would undergo two-photon absorption; two photons each with half the energy needed would be absorbed by a sensor element at th...
https://physics.stackexchange.com
14,036
[ "https://security.stackexchange.com/questions/14036", "https://security.stackexchange.com", "https://security.stackexchange.com/users/9272/" ]
For the last three months I have thousands of real visitors to a single page on my website. Those visits are recorded in Google Analytics and count as page views in adsense reports, but they are fake: <ul> <li>They are not generated by spam software / prox5yy or a BOT.</li> <li>All are real IPs from US, Canada, Europe...
It is a Trojan affects Windows PCs , named TROJ_OBVOD.TA or Trojan.Obvod . Discovered: July 14, 2012. This Trojan connects to the following sites to obtain a list of URLs where the malware accesses/visits for pay-per-click scheme: <pre><code>{BLOCKED}3.*.in </code></pre> The list contain a hundred URLs including ...
I have a suggestion. Why don't you pick one of those web pages that gets visited by these weird visitors and that you don't use for any legitimate purpose, and replace it with a landing page that asks anyone who sees the page to provide information about how they got to that page? Perhaps you could frame it as a user...
https://security.stackexchange.com
15,326
[ "https://physics.stackexchange.com/questions/15326", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/4/" ]
Ignoring that you can't survive in a vacuum. If you were to jump of a ledge in a vacuum (in a vertical tube eg). While falling would you feel weightless? Surely the earths gravity is still pulling down on you and you therefore feel your weight? Now if you travelling upwards on a platform which suddenly stops, and it ...
Break your own question to find the answer. <ol> <li>What is the meaning of your weight?</li> <li>Why do not you fall (sink) into a firm floor?</li> <li>But you cannot stand on muddy land.</li> <li>You cannot walk on the water.</li> <li>You cannot float on air.</li> <li>You fall in your imagined tube.</li> </ol> Your...
If you are falling you feel weightless even though you are still being affected by gravity - the sensation of weightlessness is just that there is nothing around you to press against you. An astronaut in orbit is effected by gravity almost as much as you are (being 10% further from the centre of the earth doesn't make...
https://physics.stackexchange.com
36,517
[ "https://mechanics.stackexchange.com/questions/36517", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/22502/" ]
The tailpipe of my 1988 Toyota pickup truck was rusted and it broke off of the muffler (the muffler itself is fine), so now the exhaust leaves out of a pipe that is near the rear axle and underneath the bed of the truck (not underneath the cab). I am planning on driving around 200 miles soon, so my questions are: Wha...
The purpose of the rubber cup is to allow for a seal on the master cylinder reservoir, and then to allow for fluid to escape down into the slave cylinder as needed. It allows the fluid to easily change levels while still allowing the reservoir to be sealed (yes, that statement is redundant). It works the same way for t...
think of the "rubber cup" as a thin film of rubber floating on top of the clutch fluid, and acting as a barrier to prevent ingress of dirt and moisture from the atmosphere entering the fluid. As the fluid level falls due to clutch plate wear and slave cylinder extension, the rubber lowers with the fluid level, still pr...
https://mechanics.stackexchange.com
196,346
[ "https://mathoverflow.net/questions/196346", "https://mathoverflow.net", "https://mathoverflow.net/users/40734/" ]
Assume $x$ and $y$ are two vectors in $\mathbb{R}^3$ and we want to compute the acute angle $\alpha\in(0,\pi/2]$ between these two (noncolinear) vectors. There are (at least) two possibilities: <ol> <li>In the <em>naive approach</em>, we compute the absolute value of the dot product of the normalized vectors $x$ and $...
It's easy to see why this is: $\cos(\alpha) \sim 1 - \alpha^2/2$ for $\alpha$ near $0$, so an error of $\delta$ in $\cos(\alpha)$ can produce an error of about $\sqrt{2\delta}$ in $\alpha$ as computed using $\arccos(\cos(\alpha))$.
For some background on these sort of issues, this might be interesting: R.W. Sinnott, "Virtues of the Haversine", Sky and Telescope, vol. 68, no. 2, 1984, p. 159
https://mathoverflow.net
9,634
[ "https://dba.stackexchange.com/questions/9634", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2574/" ]
I have a few tables I'm going to create for a website, Literature, video, and image. Is there a good reason why I shouldn't use the file name as a primary key. For instance... "someimage.png" as the PK for table image. The only downside I can think of is if I had named someimage.png in multiple directories and each ...
The PRIMARY KEY, or any index for that matter, would be accessed much faster if the length of the PRIMARY KEY was smaller. It is easier to put a 4-byte integer as a unique identified for a fullpath image name than the fullpath filename (of various and ridiculous lengths). Think of the Clustered Index, where the PRIMAR...
In general, surrogate PKs are preferable compared to natural. Usually, primary key columns never get updated; in your case renaming file will require updating primary key which in turn may cause cascade updates. Aside from that, having a long primary key is never a good idea from storage and performance point of view. ...
https://dba.stackexchange.com
58,890
[ "https://datascience.stackexchange.com/questions/58890", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/38091/" ]
I have a Dataframe, i need to drop the rows which has all the values as NaN. <pre><code>ID Age Gender 601 21 M 501 NaN F NaN NaN NaN </code></pre> The resulting data frame should look like. <pre><code>Id Age Gender 601 21 M 501 NaN F </code></pre> I used d...
The complete command is this: <pre><code>df.dropna(axis = 0, how = 'all', inplace = True) </code></pre> you must add <code>inplace = True</code> argument, if you want the dataframe to be actually updated. Alternatively, you would have to type: <pre><code>df = df.dropna(axis = 0, how = 'all') </code></pre> but that'...
This should do it: <pre><code>df.dropna(axis = 0, how = 'all') </code></pre>
https://datascience.stackexchange.com
131,732
[ "https://physics.stackexchange.com/questions/131732", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/1792/" ]
While studying the Heat Equation, I got stuck in a statement in my book. It says: <blockquote> We have seen that the combination of variables $\displaystyle \frac{x}{\sqrt{Dt}}$ is not only invariant with respect to parabolic dilations but also dimensionless. <strong>It is then natural to check if there are solution...
Let's say your goal is to describe the shape of some object, such as a box. You could create a completely arbitrary ruler and measure the three axes of the box, coming out for example with lengths of 11.72, 23.44, and 35.16 of your arbitrary ruler units. Or you might look at your results more closely and think hmm, s...
Dimensionless equations have the advantage that they work for any value of the parameters. They are scale invariant. So the solution in terms of a single dimensionless variable applies to all values of $D$ and $t$. It also allows the definition of characteristic values for the dynamic variables. In your example,...
https://physics.stackexchange.com
129,912
[ "https://electronics.stackexchange.com/questions/129912", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/51417/" ]
We all know that the source transformation shown in the first picture below is valid. But does it also work in reverse, as shown in the second picture? (because I use proteus to draw second picture, so you are regardless of value of current,voltage and resistor in second picture) <img src="https://i.stack.imgur.com/jk...
<blockquote> But is it ok for source transformation in second picture </blockquote> No, the left-most source is indistinguishable from a 1A current source and the right-most source is indistinguishable from a 1V voltage source. Placing a resistor in series with a current source does not change the overall source im...
A constant current source has infinite impedance - that is to say it looks like an infinite impedance in series with an infinite voltage source. Adding 10k in series with an infinite impedance makes no difference - it's still a constant current generator and unrecognizable (electrically) from the same source with nothi...
https://electronics.stackexchange.com
20,028
[ "https://robotics.stackexchange.com/questions/20028", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/24539/" ]
I am training Turtlebot 2 to move around the office. I come from robotics hardware background but relatively new to computer vision and robotic mapping. Here are my two fundamental questions related to localization and mapping. <ol> <li>The algorithm we are using to mapping is SLAM. This makes sense but my question ...
<blockquote> Is SLAM in general used only for first time mapping within an environment? </blockquote> Yes, SLAM is used only once to build map of the environment before navigation operation. Also, In case of significant change in the environment. <blockquote> If there is no mapping at all, can bots be trained t...
<ol> <li>SLAM is a recursive algorithm with no base case. I suppose you could have a termination criteria for the algorithm stating that "This Map is Sufficient", and then change your algorithm to localization. If you already have a map of your environment, then no, SLAM is not necessary. So to answer your first questi...
https://robotics.stackexchange.com
45,637
[ "https://electronics.stackexchange.com/questions/45637", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/4940/" ]
I'm using a microcontroller to simply turn on and off an LED, but I want it to fade in and out. I set up the circuit in this way: <img src="https://i.stack.imgur.com/PFLND.png" alt="enter image description here"> When the pin goes high, the capacitor would instantaneously draw a large amount of current as it starts t...
There are lots of reasons why you shouldn't do this. Here are the ones that I can think of: <ol> <li>It won't make the LED fade in. As others mentioned, the RC time constant is too short to be noticed.</li> <li>You run the risk of exceeding the current on the output buffer and damaging the part.</li> <li>You run the...
It won't do any damage, but it won't work. PWM is the usual way to fade an LED.
https://electronics.stackexchange.com
2,336
[ "https://quantumcomputing.stackexchange.com/questions/2336", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/2559/" ]
What conditions must a matrix hold to be considered a valid density matrix?
If a matrix has unit trace and if it is positive semi-definite (and Hermitian) then it is a valid density matrix. More specifically check if the matrix is Hermitian; find the eigenvalues of the matrix , check if they are non-negative and add up to $1$.
Suppose someone has prepared your quantum system in one of an orthogonal set of states $\{|\psi_j\rangle\}$. You don't know which of these states they've prepared it in, but you do know that they prepared state $|\psi_j\rangle$ with probability $p_j$. Your system is then described by the density matrix, $\rho = \sum_j...
https://quantumcomputing.stackexchange.com
2,652,781
[ "https://math.stackexchange.com/questions/2652781", "https://math.stackexchange.com", "https://math.stackexchange.com/users/422194/" ]
The question asks to calculate the limits where they exist, then the following limit is given: $$\lim_{x\rightarrow2}(\lfloor x\rfloor +\left\lfloor -x\right\rfloor), \text{where}\lfloor x\rfloor \text{is the floor function.} $$ Thus I approach it from the left hand side and then from the right hand side: $$\lim_{...
From the left, it should be $$(1)+(-2) = -1$$ and from the right, it should be $$(2)+(-3) = -1$$ so the limit is $-1$. Explanation: <ul> <li>If $x$ is a little less than $2$, strictly between $1$ and $2$, then $-x$ is strictly between $-2$ and $-1$. <li>If $x$ is a little more than $2$, strictly between $2$ and $3$, ...
The floor enjoys an integer translation property: $$\lfloor x+n\rfloor=\lfloor x\rfloor+n.$$ Then $$\lfloor \epsilon+2\rfloor+\lfloor-\epsilon-2\rfloor=\lfloor \epsilon\rfloor+\lfloor-\epsilon\rfloor+2-2=\lfloor \epsilon\rfloor+\lfloor-\epsilon\rfloor$$ is independent of the sign of $\epsilon$ and the limit exists....
https://math.stackexchange.com
60,285
[ "https://dba.stackexchange.com/questions/60285", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/35252/" ]
I have a doubt about the use of oracle tablespaces. I've decided to define for each schema of the datababase two different tablespaces (one for data, and another one for indexes). The problem is that some time has passed, and my developers had mixed the tablespaces creating indexes in the data tablespace and creating ...
In reality, on the modern devices the impact on performance is likely to be minimal. The old "tablespace for index, tablespace for data" mantra comes from a time when storage tended to be made up of sets of single devices. I.E. if you said that you wanted to put a tablespace on a certain disk, it went onto a particul...
We can talk about performance only if: <ol> <li>Your tablespaces are stored on different devices which are not RAID-connected</li> <li>In the same query the table and index on this table are used</li> </ol> That's how I see this with a real-life example: Just imagine a big queue (queries/read-write operations) in a ...
https://dba.stackexchange.com
207,824
[ "https://softwareengineering.stackexchange.com/questions/207824", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/44521/" ]
I have an object that I am downloading over HTTP, that has approximately 50 attributes. What is the proper way to store this information in Objective-C? Should I have an NSObject with a property for each attribute (if so, what would be a good way to initialize this object?)? Should I use an NSDictionary with 50 key-val...
I'd probably use a NSDictionary. The code will probably be cleaner &amp; easier to maintain. If you get an unexpected attribute, you'll crash if you didn't define a property for it.
As Mike suggested, an NSDictionary is an easy way to store a ton of key/value pairs quickly. The downside to this approach is you lose convenience of access after the fact. You have to remember what every key was in order to access any values. This may mean going back to the web service API or the JSON response to get ...
https://softwareengineering.stackexchange.com
114,738
[ "https://mathoverflow.net/questions/114738", "https://mathoverflow.net", "https://mathoverflow.net/users/8008/" ]
I'll jump into the question and then back off into qualifications and context <blockquote> Using the definition of a definite integral as the limit of Riemann sums, what is the best way (or the very good ways) to establish the results <span class="math-container">$\int_a^bx^pdx=\frac{b^{p+1}-a^{p+1}}{p+1}$</span> witho...
Here is a very simple proof for nonnegative integer $p$. By elementary combinatorial reasoning, we have $$ \sum_{j=0}^{n-1} \binom{j}{p} = \binom{n}{p+1}, $$ which is the same as $$ \sum_{j=0}^{n-1} j(j-1)\cdots(j-p+1) = \frac{n(n-1)\cdots(n-p)}{p+1}.$$ After scaling that becomes a lower bound for $\int_0^1 x^p dx$. ...
This may not be in the spirit of what you want, but... by scaling arguments it suffices to establish that $\int_0^1 x^p dx = \frac{1}{p + 1}$. Consider the following probabilistic argument (not entirely rigorous but very suggestive): the integral describes the probability that if you choose $p + 1$ points uniformly at ...
https://mathoverflow.net
97,506
[ "https://softwareengineering.stackexchange.com/questions/97506", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/32847/" ]
Setup: We've got a form with default text values present within the text box itself which "goes away" when I click on them and enter a value (not if I dont enter a value). Currently the 'default' value or the user inputted value gets POSTed to the PHP script. Should I have the javascript code check if the value being...
You need to do it on the server side w/ PHP. You cant rely that javascript was enabled on the client, or that nothing went wrong with it, or that the data sent to the server from the wilds of the interweb is in any way valid. Ideally, you'd do it both in JavaScript on the client and in PHP on the server. Doing it ...
You should do both. Having to wait for the form to submit back and PHP do the processing and then re-perform a whole page load just to tell you, you forgot to enter something in a box is very poor user experience. Firstly validate your form inputs in JavaScript, either manually or by using a jQuery Validate plugin to...
https://softwareengineering.stackexchange.com
62,129
[ "https://dba.stackexchange.com/questions/62129", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/29750/" ]
I am using Mysql 5.6.12 under Wamp server environment. Now I want to log All queries into ".log" file, the queries which are running by PHP or from PHPMyAdmin, I want to log them...
<pre><code>[mysqld] # Set Slow Query Log long_query_time = 1 slow_query_log = 1 slow_query_log_file = /usr/log/slowquery.log log_queries_not_using_indexes = 1 #Set General Log general_log = on general_log_file=/usr/log/general.log </code></pre> Note that enabling <code>general_log</code> on a production server has ov...
Since this is the type of thing you probably only want to do temporarily, it may be useful to do this from the shell instead of via the config file: <pre><code>&gt; set global general_log_file = "/var/log/mysql/queries.log"; &gt; set global general_log = "ON"; [wait some time, hit some pages, whatever] &gt; set global...
https://dba.stackexchange.com
369,859
[ "https://physics.stackexchange.com/questions/369859", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/174025/" ]
The equation for the Doppler effect is given by $$f_L = \frac{v+v_L}{v+v_S}f_S$$ where the velocities of both the source and the listener matter. My question is, how does this fit into Galilean relativity? For instance, if a source was moving and the listener is also moving, if I take the reference frame to be that o...
Most waves travel in a medium, which has a preferred reference frame. Both velocities are measured with respect to this medium. This breaks the equivalence of the reference frames: in the reference frame of the listener, the medium itself is moving.
The equation you have provided is incorrect . You should have a difference of velocities in the denominator of the fraction. This is important because it means that in Special Relativity the frequency of a moving wave source, measured from a stationary observer is always larger than the frequency of the emitted wave. ...
https://physics.stackexchange.com
20,293
[ "https://softwareengineering.stackexchange.com/questions/20293", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/3110/" ]
Is there any compelling reason a programmer would host on a shared platform versus just having a VPS account somewhere?
<h1>Advantage Shared Hosting</h1> <ol> <li>Generally cheap so ideally for doing development or running smaller sites with low traffic</li> <li>A lot of features are pre setup among other a basic security model (hopefully)</li> <li>In general you get a lot of extra goodies like one-click installs that have been tested i...
A Shared platform frees you from responsibility for the OS. not having to apply OS patches, not having to pay for software licences for the installed software, anti-virus, firewalls, backups are all your providers responsibility. Now the flip side to this is that living on a shared server means your use of the server...
https://softwareengineering.stackexchange.com