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
390,105
[ "https://mathoverflow.net/questions/390105", "https://mathoverflow.net", "https://mathoverflow.net/users/39304/" ]
Let <span class="math-container">$X$</span> be a projective variety over a field <span class="math-container">$k$</span> equipped with a very ample line bundle <span class="math-container">$\mathcal{O}_X(1)$</span>. Suppose that <span class="math-container">$E, F$</span> are locally free sheaves of finite rank on <span...
This fails even on curves, where one has more line bundles to play with. Let <span class="math-container">$X$</span> be a curve of genus <span class="math-container">$&gt;1$</span>. Let <span class="math-container">$i=1$</span>. Take <span class="math-container">$E$</span> a stable vector bundle of rank <span class="ma...
The answer is no. For instance, let <span class="math-container">$X = \mathrm{Gr}(2,4)$</span> and consider the tautological exact sequence <span class="math-container">$$ 0 \to S \to \mathcal{O}^{\oplus 4} \to Q \to 0 $$</span> of vector bundles. It represents a nontrivial extension class <span class="math-container">...
https://mathoverflow.net
592,978
[ "https://physics.stackexchange.com/questions/592978", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/149395/" ]
Given that <span class="math-container">$\hat{H}\Psi = \hat{E}\Psi$</span> and that <span class="math-container">$E=\frac{p^2}{2m}$</span> Assuming a non-relativistic, system, does this mean that any eigenfunction of Energy is also an eigenfunction of momentum? Or does it work the other way and every eigenfunction of m...
Since you don't specify <span class="math-container">$\hat H$</span>, the general answer is a resounding no. If there is a potential, say: <span class="math-container">$$ V(x) = -\frac k r $$</span> then the energy eigenstates are definitely not momentum eigenstates. Any potential other than <span class="math-container...
An eigenfunction of <span class="math-container">$\hat p$</span> is an eigenfunctions of <span class="math-container">$\hat p^2$</span> but not necessarily the other way round. An eigenfunction of <span class="math-container">$\hat p^2$</span> can be a linear combination <span class="math-container">$\alpha |p\rangle...
https://physics.stackexchange.com
160,624
[ "https://dba.stackexchange.com/questions/160624", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/114726/" ]
I am using TSQL. I have a set of data in a table. I have a stored procedure that runs every day that populates this table. The thing is I need the order of the data to change each day of the month. This data needs to dynamically split up into 7 groups. For example: I have 300 pieces of data, I run the query on the f...
Usually that refers to Stored routines with <code>PREPARE</code> + <code>EXECUTE</code> + <code>DEALLOCATE_PREPARE</code>. Have you done all three of those, in that order? Optionally, <code>EXECUTE</code> can be repeated. If you are referring to stringing together statements with <code>;</code>, don't do that; it is...
The answer is you can't; so don't do that. Also, as Rick James pointed out, multi-statement SQL is a security hole that can allow a hacker to terminate your SQL and execute his own. In my case, I solved the immediate problem by having my exception dialog display the entire multi-statement SQL that caused the error, f...
https://dba.stackexchange.com
3,205,732
[ "https://math.stackexchange.com/questions/3205732", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
I recently came to know that primes are of form <span class="math-container">$6k+1,6k-1$</span> for primes greater than three. Why is this so? I tried my hand on it could not really understand about it. I have also heard of Dirichlet's theorem but can there be any elementary such way to show this?
What are the other possibilities? Numbers of the form <span class="math-container">$6k$</span>, <span class="math-container">$6k+2$</span>, or <span class="math-container">$6k+4$</span> are all divisible by <span class="math-container">$2$</span>, while numbers of the form <span class="math-container">$6k+3$</span> are...
<span class="math-container">$6k,6k+2,6k+3,6k+4$</span> cannot be prime for <span class="math-container">$k&gt;0$</span> because they are divisible by <span class="math-container">$6,2,3,2$</span> respectively. Thus only <span class="math-container">$6k+1$</span> and <span class="math-container">$6k+5$</span> are left....
https://math.stackexchange.com
560,649
[ "https://electronics.stackexchange.com/questions/560649", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/156324/" ]
My question is given a, for example, a quartz oscillator on a MCU board, how is the system clock generated? I'll break down this question into several parts below: <ol> <li>I always have the impression that oscillator generates a sinusoidal wave. But digital circuits use square wave as clock signal. So is there always ...
PC clocking uses a reference oscillator of about 25MHz (a popular choice for Ethernet and PCIe). This starts as a crystal sine wave that is ‘squared up’ by a buffer to make a digital signal. That square wave then is used to generate the various frequencies (CPU, DRAM, PCIe, etc.) using PLL multipliers and dividers. The...
<ol> <li>yes. A square/rectangle wave is required. </li> <li>not necessarily. For example a base model 8051 microcontroller divides the oscillator frequency by 12. Thus the counter/timer clock is oscillator/12. Compare this with an AVR mega328 - The default internal oscillator is 8MHz and assuming the div8 fuse is not ...
https://electronics.stackexchange.com
389,100
[ "https://physics.stackexchange.com/questions/389100", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/158666/" ]
I’m not sure if the reason is in the field of biology or more towards physics but as my reasoning is based on the physics part being that perfectly black bodies are perfect absorbers of heat and light while white is a perfect reflector but we have darker skinned humans near equator and lighter skinned people (as well a...
This is a bio question. The biggest threat to fitness is not lack of cooling, but damage from UV rays. A pigment in black (actually all skin to differing degrees) absorbs the UV so that skin cells don't. Fair skinned people, from higher latitudes, have another risk to their fitness which is a lack of vitamin D whic...
The skin color is due to the skin pigment melanin which absorbs and thus protects the skin against the damaging UV-radiation of the sun. The other side of the coin is that UV-radiation of the sun also produces the vitamin D in the skin which is essential for bone development and growth and also the immune system. Orig...
https://physics.stackexchange.com
77,487
[ "https://cs.stackexchange.com/questions/77487", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/63313/" ]
Is "Rice's theorem for the computable reals" -- that is, no nontrivial property of the number represented by a given computable real is decidable -- true? Does this correspond in some direct way to the connectedness of the reals?
Yes, Rice's theorem for reals holds in every reasonable version of computable reals. I will first prove a certain theorem and a corollary, and explain what it has to do with computability later. <strong>Theorem:</strong> <em>Suppose $p : \mathbb{R} \to \{0,1\}$ is a map and $a, b \in \mathbb{R}$ two reals such that $...
No. Or, at least, the proof isn't trivial, since you can choose among the (generally many) possible ways to compute a real, and may be able to choose one with a structure that is total w.r.t. the chosen property so that you don't reduce testing the property to the halting problem. Also, I think I need a better unders...
https://cs.stackexchange.com
3,219,872
[ "https://math.stackexchange.com/questions/3219872", "https://math.stackexchange.com", "https://math.stackexchange.com/users/249018/" ]
Given a sequence of events <span class="math-container">$A_n, $</span> defined by inclusion, for example <span class="math-container">$A_k\subset A_{k+1}, \forall k\in N $</span>, then the sequence is an increasing or decreasing one and thus convergent. Is the converse also true, i. e. a convergent sequence of events ...
A sequence of sets converges if <span class="math-container">$$ \lim\inf A_n=\bigcup_{n=1}^\infty\bigcap_{k=n}^\infty A_k=\bigcap_{n=1}^\infty\bigcup_{k=n}^\infty A_k=\lim \sup{A_n} $$</span> Consider the sequence of events <span class="math-container">$A_n\subset \mathbb{R}$</span> given by <span class="math-containe...
On the sample space of positive integers, consider the events <span class="math-container">$A_n = \{n\}$</span>. Then none of the events is included in any other, but the sequence converges to the empty set (in the sense that every outcome is eventually not in <span class="math-container">$A_n$</span>).
https://math.stackexchange.com
8,793
[ "https://electronics.stackexchange.com/questions/8793", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1637/" ]
I have a DC motor that is controlled by a PWM output on an Ardiono and I want to know if I can safely assume that by setting the output to 50% duty cycle, the current in the motor will be 50 % as well The output is connected to the base on an BC338 transistor through a 1K resistor that I use as a driver.
No. It can be anywhere from 0% to 100% depending on load &amp; motor specifics. If you need 50%, you need some feedback, like shunt with opamp. //RPM counting using optical-interrupter
Average current may well be half (not always), but instantaneous current could also be (not always) 100%. I had some 3V motors I was PWMing from a 12V supply a couple of years back. PWM'ing them worked well in staying within the RPM range of those motors, but the instantaneous voltage/current wore out the brushes pre...
https://electronics.stackexchange.com
3,720,769
[ "https://math.stackexchange.com/questions/3720769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780638/" ]
Prove that for any positive integer <span class="math-container">$a$</span>, <span class="math-container">$a^{561} \equiv a \pmod{561}$</span>. (Hence, <span class="math-container">$561$</span> is a pseudoprime with respect to any base. Such a number is called a Carmichael number.) This obviously works for <span class=...
Since <span class="math-container">$$a^{561}-a=\left(a^{560}-1\right)a,$$</span> we see that <span class="math-container">$a^{561}-a$</span> is divisible by <span class="math-container">$a^3-a$</span>, by <span class="math-container">$a^{17}-a$</span> and by <span class="math-container">$a^{11}-a$</span>, which says th...
Fermat's theorem implies that <span class="math-container">$a^{(p-1)n+1} \equiv a \bmod p$</span> for all primes <span class="math-container">$p$</span>, all <span class="math-container">$a$</span> and all <span class="math-container">$n$</span>. Since <span class="math-container">$561=3\cdot 11\cdot 17$</span>, apply ...
https://math.stackexchange.com
431,912
[ "https://softwareengineering.stackexchange.com/questions/431912", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/397636/" ]
As we know HTTP codes are used in HTTP response. Usually with this code we can have an idea about what happened. For example if I make a get request and I obtain a 404 I can figure out that the resource that I requested doesn't exist on the server side. Suppose that I want to encode the status of an object in the DB. F...
I would advise against it. The most likely result is that you will create confusion with future developers/maintainers. <ul> <li>You are using the codes outside of the context of HTTP, so you will probably get questions about what happened to the status codes with values 0 to 199. In the database, the fact that the cod...
In a multi-tiered architecture, the business layer should have no knowledge of the transport. That allows the same code to run in a web service, on a desktop, or on a phone. Or possibly in your thermostat. Let me give you a practical example of this. Let's say you want to use HTTP status codes in your business layer, s...
https://softwareengineering.stackexchange.com
16,665
[ "https://chemistry.stackexchange.com/questions/16665", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/7621/" ]
<blockquote> How many atoms of carbon are needed to produce $\pu{0.45 mol} ~\ce{Al}$? $$\ce{3C + 2Al2O3 -&gt; 4Al + 3CO2}$$ </blockquote> I am not sure where to start, whether or not I convert moles straight to atoms or convert moles to grams of $\ce{Al}$, then to moles of $\ce{C}$ and then to atoms? I tried the ...
The key to this is by examining the mole ratio. Your balanced equation shows that 4 mols aluminium: 3 mols carbon If you are familiar with ratios from maths, you can therefore find the specific number of moles of carbon in this reaction. $4\ce{Al}: 3\ce{C}\implies0.45\ce{Al} :~?$ I think you should be able to get t...
You can't reduce aluminium oxide to aluminium using carbon; aluminium, like many metals, forms a stable carbide. The equation looks like this: $\ce{2 Al2O3 + 9 C \rightarrow Al4C3 + 6 CO}$ That's why in real life aluminium is prepared through the Hall–Héroult process. Before the electrochemical process was discovere...
https://chemistry.stackexchange.com
103,099
[ "https://cs.stackexchange.com/questions/103099", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/113705/" ]
Given is an alphabet <span class="math-container">$\Sigma = \{ a, b, c \}$</span>, and a language <span class="math-container">$A4 =\{ w \mid w \in \Sigma^* \wedge |w|_a \operatorname{mod} 2 \ge |w|_b \operatorname{mod} 2 \}$</span> whereas <span class="math-container">$|w|_a$</span> is the number <span class="math-co...
<blockquote> I know that the only words that do not belong in <span class="math-container">$A4$</span> are the words where the number of <span class="math-container">$b$</span>'s is odd and the number of <span class="math-container">$a$</span>'s is even. </blockquote> This characterization of words not in <span clas...
Your language is regular. It contains all words over <span class="math-container">$\{a,b,c\}$</span> with either an even number of <span class="math-container">$b$</span>’s or an odd number of <span class="math-container">$a$</span>’s (or both).
https://cs.stackexchange.com
1,884,462
[ "https://math.stackexchange.com/questions/1884462", "https://math.stackexchange.com", "https://math.stackexchange.com/users/24563/" ]
A pre-additive category with a single object $\bullet$ is simply a ring $R = \mathrm{Hom}(\bullet,\bullet)$: pre-additivity makes this Hom-space an abelian group and with bilinear composition, i.e. a distributive product. Out of idle curiosity I am wondering what happens to the ring if we ask for the category to be ad...
Since an additive category has a zero object it follows that an additive category with one object is the trivial ring (i.e. the ring with only one element).
If the category is additive, then $\bullet\oplus\bullet=\bullet$. It follows that $M_2(End(\bullet))\cong End(\bullet)$ as ring. More generally, we have $M_n(End(\bullet))\cong End(\bullet)$ for all $n$. This tells us that thering $End(\bullet)$ is a bit weird... There are examples, though.
https://math.stackexchange.com
272,576
[ "https://softwareengineering.stackexchange.com/questions/272576", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/32045/" ]
I have two tables with different structure. I should compare ID from 1st table with ID of the intermediate table and then comapre TXT field of the intermediate table with TXT field of the 2nd table. If there are missing records, or different values for TXT field in 1st and 2nd table I should add flag to the record in...
Unless you have something which the application must supply all the time, I think it would be best to let the database related stuff be handled by the database itself. This will allow you to have the DB to do all the heavy lifting, while allowing the application to remain as lightweight as possible so that it can han...
<blockquote> what way is correct ... </blockquote> Being cynical just for a moment, <em>none</em> of them. Try as we might; we never get it <em>completely</em> right. But we can try. <blockquote> ... for performance ... </blockquote> Database. For raw data processing power, leverage your DBMS. You don...
https://softwareengineering.stackexchange.com
115,111
[ "https://security.stackexchange.com/questions/115111", "https://security.stackexchange.com", "https://security.stackexchange.com/users/12778/" ]
If email sent by my bank included S/MIME signatures that my mail client can verify, then I would have the assurance that the mail was not tampered with or sent by some malicious third-party. Most prominent mail clients have S/MIME support (Outlook, iOS, Thunderbird, Mail.app) so why aren't S/MIME signatures more preva...
It's usually a costs vs. benefits decision. Costs: <ul> <li>Create your own CA infrastructure or buy a public certificate for each sender</li> <li>Teach employees how to use it</li> <li>Teach employees how not to use it, especially how to make sure that the secret key is really kept secret</li> <li>Teach the customer...
My bank never sends e-mails. Instead, there's a messaging service inside my online banking interface I can use. Furthermore, it is stated on both the bank's site and the printed materials I receive by mail that my bank NEVER uses e-mail for communications. I understand this solution is good for the bank, because they ...
https://security.stackexchange.com
438,688
[ "https://math.stackexchange.com/questions/438688", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85443/" ]
To start off, I understand the proof behind this identity, and I can visualize it in my head with the unit circle. But I read this quote: <blockquote> They only need to remember three facts – that $\sin 30^\circ = ½$ , that $\tan 45^\circ =1$, and that $\sin^2x + \cos^2x =1$ . Just about everything else they need ...
The "special angles" in trig are $0^\circ$, $30^\circ$, $45^\circ$, $60^\circ$, and $90^\circ$ (and their counterparts in quadrants II, III, and IV). Presumably, the sines and cosines at $0^\circ$ and $90^\circ$ are obvious to the quoted author, so the quotation boils-down what's needed to remember values at the remai...
It's importance is in its equivalence to Pythagoras' Theorem. It shows that the curve $(\cos t,\sin t)$ traces the unit circle. It relates values of one function in terms of the other.
https://math.stackexchange.com
1,634,725
[ "https://math.stackexchange.com/questions/1634725", "https://math.stackexchange.com", "https://math.stackexchange.com/users/309604/" ]
It's bee a long time since I've worked with sums and series, so even simple examples like this one are giving me trouble: $\sum_{i=4}^N \left(5\right)^i$ Can I get some guidance on series like this? I'm finding different methods online but not sure which to use. I know that starting at a non-zero number also changes ...
Let $S = a + ar + ar^2 + ar^3 ...$ Then $S-Sr = (a + ar + ar^2 + ar^3 ... ar^n) - (ar + ar^2 + ar^3 + ar^4 ... ar^{n+1}) = a - ar^{n+1}$ Factoring out an S we have $S(1-r) = a-ar^{n+1}$ Finally, $$S = {(a - ar^{n+1})\over(1-r)}$$ In your case, you are trying to find $5^4 + 5^5 + 5^6 ... 5^n$ You can factor out a $...
The problem asks for a closed-form solution to: <span class="math-container">$$\sum_{i=4}^{N} 5^i = 5^4 + 5^5 + ... + 5^N$$</span> The OP's original intuition was correct: <span class="math-container">$$\sum_{i=4}^{N} = \sum_{i=0}^{N} 5^i - \sum_{i=0}^{3} 5^i$$</span> More generally, for summing a geometric series star...
https://math.stackexchange.com
178,727
[ "https://physics.stackexchange.com/questions/178727", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/60501/" ]
It is claimed that heat exchange, through the tube-suface, is best from within circular tubes versus either (not sure which is correct): <ul> <li>from outside of the tube itself</li> <li>other shapes like for example a square tube</li> </ul> What is the reasoning behind this claim? Let's say we are talking about a tu...
The incoming waves will terminate against each other in the corners of the square pipe, meaning there is a deficit of heat in the faces of the square. If that's true, we should add more corners, and waste less material. A square has 4 corners, with not a lot of heat on the center of the faces. An octagon has 8 co...
the shape and area of the cross section of the pipe can change flow property along the stream. The fluid velocity in a pipe changes from zero at the surface because of the no-slip condition to a maximum at the pipe center. In fluid flow, it is convenient to work with an average velocity which remains constant in incomp...
https://physics.stackexchange.com
71,434
[ "https://security.stackexchange.com/questions/71434", "https://security.stackexchange.com", "https://security.stackexchange.com/users/58802/" ]
I've been fiddling with the Windows firewall configuration of some computers within a VMWare based LAN (no domain). To aid in my testing and debugging, I created a small, self-hosted console application that will answer HTTP requests, an "answering machine" if you will, so that I can easily check connectivity between c...
We can understand your concerns. We do have the ability to ssh in to your router, yes, but access is limited to 4 people, and it is only done for trouble shooting purposes. The goal of BISmark is to enhance our understanding of broadband networks. We do not collect any personal (PII) information. We are simply not int...
Short answer: yes. Once someone has remote access to any node on your network, they could potentially reach out to the other nodes on the network.
https://security.stackexchange.com
3,512,534
[ "https://math.stackexchange.com/questions/3512534", "https://math.stackexchange.com", "https://math.stackexchange.com/users/154155/" ]
This problem is from the book, "Introduction to Probability" by Hoel, Port and Stone. It is problem 34 on page 25. Problem: Let <span class="math-container">$A$</span> and <span class="math-container">$B$</span> denote two independent events. Prove that <span class="math-container">$A$</span> and <span class="math-co...
<span class="math-container">$A=A\cap (B\cup B^c)=(A\cap B)\cup (A\cap B^c)$</span> implies <span class="math-container">$P(A)=P(A\cap B)+P(A\cap B^c)-P(A\cap B\cap B^c)$</span>, we deduce that <span class="math-container">$P(A)=P(A\cap B)+P(A\cap B^c)$</span>. <span class="math-container">$P(A\cap B^c)=P(A)-P(A\cap ...
Since <span class="math-container">$(A\cap B) \cup (A\cap B^c) =A$</span> and <span class="math-container">$B\cap B^c=\emptyset$</span> we have <span class="math-container">$$P(A\cap B) +P(A\cap B^c) =P(A) $$</span> Thus <span class="math-container">$$P(A\cap B^c) =P(A) - P(A\cap B) =P(A) - P(A) P(B) =P(A) (1-P(B))=P(A...
https://math.stackexchange.com
186,982
[ "https://electronics.stackexchange.com/questions/186982", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/70363/" ]
If you want to read from the I<sup>2</sup>C bus you have to: <ol> <li>Send start condition </li> <li>Send 7 bit slave address with R/W being a '0' which indicates a write </li> <li>Send register number where you want to read from </li> <li>Send start condition again </li> <li>Send 7 bit slave address with R/W be...
Michael gave you the formal response, which is how I2C is defined. The practical problem with your approach is that you fix the register address at 8 bytes. What if a slave <ul> <li>has only a single register? Sending 8 address bits would be a waste of time, and a waste of circuitry in the slave.</li> <li>has more tha...
It is not done as you propose because once the Slave Address Byte with R/W = 1 for READ is sent the bus is in read mode for data from slave to master. Trying to inject an additional output byte into the sequence with the register address is not a read mode transfer and so the bus mode protocol is broken.
https://electronics.stackexchange.com
450,883
[ "https://stats.stackexchange.com/questions/450883", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/144200/" ]
I am trying to formulate the following question. X and Y are IID , uniform r.v. with ~U(0,1) What is the probability of P( X-Y-0.5 > 0) = ? 0.5 is a constant here and can be different. I do respect the geometrical solutions but what i would like to see and understand is the generic approach since X and Y can be ot...
This kind of calculation is in general handled with using the <strong>joint</strong> distribution of the two variables <span class="math-container">$X$</span> and <span class="math-container">$Y$</span>. You state that <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> are i.i.d. <span...
The generic approach is to find the distribution of the rv <span class="math-container">$X-Y$</span>, denoted <span class="math-container">$Z$</span>, from the joint distribution of <span class="math-container">$(X,Y)$</span>, which is a convolution exercise. Since the change of variables from <span class="math-contain...
https://stats.stackexchange.com
71,387
[ "https://cs.stackexchange.com/questions/71387", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/65206/" ]
How can a polynomial such as $x^3 + 1$ be converted to its binary form of $1001$. Likewise, $10100001 = x^7 + x^5 + 1.$
Just put the value of $x=10$ then $$10^3+1=1001$$
The polynomial notation is a shortcut to write binary code while omitting the zeros, it's useful to crunch CRC communication checksum to verify electric signal quality with an XOR comparison operation. Then a binary code like 1 1000 0000 0000 0101 may be noted <span class="math-container">$x^{16} + x^{15} + x^2 +1$</sp...
https://cs.stackexchange.com
145,451
[ "https://physics.stackexchange.com/questions/145451", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/46239/" ]
<strong>Question:</strong> Suppose, a chemical bomb is stationary. Then it explodes into n parts in all direction. What is work done? <strong>My Efforts</strong> The bomb is stationary, so momentum and and kinetic energy is 0. After explosion total momentum $\overrightarrow{P} $ is 0. So $\overrightarrow{P_1} + \ov...
The work done was expended in moving all the components of the bomb away from it, largely dissipated as heat. Picture the process in microscopic slow motion: Chemicals transform from a solid to a gas + heat (which will increase the gas pressure some more). This isn't really "work" in the classical mechanics form (yet...
if we really see the scenario carefully......the work-kinetic energy theorem is applicable only when there are no non conservative forces involved in the process... IN MORE GENERAL SENSE;(1)'WORK' IS DEFINED AS THE CHANGE IN ENERGY OR (2) WE MAY CALL IT TRANSFER OF ENERGY FROM ONE PART OF A SYSTEM (ISOLATED SYSTEM........
https://physics.stackexchange.com
55,256
[ "https://mechanics.stackexchange.com/questions/55256", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/446/" ]
I've got a 2014 Toyota Corolla with a power steering system that doesn't kick in until 5-10 seconds after I've started the car. After sitting a few seconds, the power steering goes from nothing to fully operational, and I also feel the A/C blower crank up to full blast at the same time. Any ideas what's causing this sl...
Replace the battery and those issues will stop. Reason? The bad battery is so discharged after starting the engine the alternator takes a few seconds to bring the system voltage high enough for some electronics to work properly.
The same belt is possibly driving the power steering pump and the alternator. If the belt is slipping when you first start the engine, then the power steering will not work correctly and the alternator will not be providing power. Friction on the slipping belt may then make it heat up and start to grip. The power st...
https://mechanics.stackexchange.com
57,702
[ "https://electronics.stackexchange.com/questions/57702", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6585/" ]
I'm looking into interfacing standard PC form-factor SDRAM or DDR sticks to a microcontroller, but I can't find any definitive details on how they work in terms of how the bus works. I guess it's similar to how any standard SPI or I&sup2;C interface works - send some instructions to the device, then read back some resu...
Unless your microcontroller has a direct bus support for interfacing to DDR/DDR2/DDR3 type RAM or your microcontroller is interfaced through an FPGA which has been programmmed to provide the RAM interface then it is likely that futzing around with DIMMs is not a useful exercise. There are several strong reasons why thi...
Some single data rate (SDR) SDRAM can be run at slower rates - check the Clock Period (max) spec. However, you have to issues refresh commands on a regular basis, and if you clock at 1MHz you might find you have no time for anything else! DDR SDRAM typically has a minimum (yes, minimum) clock frequency in the high ten...
https://electronics.stackexchange.com
39,908
[ "https://electronics.stackexchange.com/questions/39908", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/12169/" ]
I am trying to understand switch-mode power supply fundamentals through a simulation in LTSpice. I wanted to build an excruciatingly simple boost converter circuit following a teaching model often given in textbooks, but I can't get this thing to behave at all as I expect it to, probably because things are very differ...
<img src="https://i.stack.imgur.com/qWGpQ.png" alt="enter image description here"> Your boost is operating in discontinuous conduction mode or DCM (inductor current goes to zero each switching cycle). The duty cycle becomes a function of load as well as the duty cycle. If you increase the load, the inductor value, or ...
With the components values that you have selected it is indeed more suitable to run with the 200kHz frequency. Even at 200kHz I find that a more suitable output capacitor may be more like 33 or 47uF. If you are using an ideal inductor with no equivalent series resistance specified then I would suggest that you try on...
https://electronics.stackexchange.com
1,797,012
[ "https://math.stackexchange.com/questions/1797012", "https://math.stackexchange.com", "https://math.stackexchange.com/users/218427/" ]
I want to find the solutions $z^6+7z^3-8=0$ but I don't know where to start because of the high degree of the equation. This is an exercise that involves complex numbers, so I have to transform the equation into trigonometric form and then use the de Moivre formula. Any hints?
$$(z^3 + 8)(z^3 - 1) {}{}{}{}$$
Using Mathematica <pre><code>poly = z^6 + 7 z^3 - 8; </code></pre> Factor the polynomial and solve the equations formed by setting each factor equal to zero <pre><code>factoredPoly = Factor[poly] (* (-1 + z)*(2 + z)*(4 - 2*z + z^2)*(1 + z + z^2) *) </code></pre> This reduces the problem to solving quadratic and ...
https://math.stackexchange.com
104,581
[ "https://cs.stackexchange.com/questions/104581", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/100185/" ]
The problem is to prove or disprove the existence of <span class="math-container">$C$</span>, s.t., <span class="math-container">$|c| = 6,\forall c\in C$</span>; <span class="math-container">$|C| = 32$</span>; <span class="math-container">$d(c_i,c_j)\geq2,1\leq i&lt;j\leq32$</span>. (<span class="math-container">$d$</s...
Yes, there is such a set. You are actually on the right track to find the following example. Let <span class="math-container">$C = \{c : |c|=6 \text{ and there are even number of 1's in c}\}$</span>. You can check the following. <ul> <li><span class="math-container">$|C|=32$</span>.</li> <li><span class="math-container...
All words of even parity from a linear code with <span class="math-container">$2^{n-1}$</span> codewords and minimum distance <span class="math-container">$2$</span>. More generally, if <span class="math-container">$A_2(n,d)$</span> is the maximum size of a code of length <span class="math-container">$n$</span> and mi...
https://cs.stackexchange.com
75,267
[ "https://electronics.stackexchange.com/questions/75267", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/24147/" ]
In case of timing diagrams of 8085, what I saw is that, always Opcode Fetch, Memory Read/Write, IO Read/Write is shown but execution is never shown. Is it because the execution time is too less compared to others? Thanks in advance. For example, In case of MVI A, 55H they show 4 T state for Opcode Fetch, 3 for M/m Rea...
In the history of microprocessors the start was with very slow processors and very fast memory (a 6502 did a fetch, then execute, and in the execute phase the memory was free to be used for other purpsoes, like DMA or video generation). The Z80 had similar 'idle' period in the instruction execute that could be sued for...
Probably such timing is not shown because it is irrelevant to using the processor. All you need to know is that the result of one instruction is available as input to the next, except when it is stated to the contrary. Where exactly in the cycle the operation takes place or finishes is irrelevant because there is not...
https://electronics.stackexchange.com
318,968
[ "https://physics.stackexchange.com/questions/318968", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/96101/" ]
The question asked was: <blockquote> A long straight current carrying wire passes normally through the center of a circular loop. If the current through the wire increases, will there be an emf induced in the loop? </blockquote> The answer I wrote was: <blockquote> Since the loop is assumed to be an ideal thin w...
The magnetic field is perpendicular to the current's direction, and the current is going normal to the loop, meaning that $B$ is parallel to the loop's plane. Because flux is the dot product of the magnetic field and the loop's normal "surface vector", and the angle is $90^\circ$, it is equal to $0$, thus not changing ...
According to me This concept is idealistic. Induced emf may be induced due to relative motion between the electrons. Force experienced by electrons in a loop is F=Bqv. Since the current is changing in the wire and hence the magnetic field at the electron in the loop will induce the emf induce in the coil. Here field ...
https://physics.stackexchange.com
568,018
[ "https://physics.stackexchange.com/questions/568018", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/261792/" ]
I know how the center of mass is <em><strong>defined</strong></em>, mathematically. It is the mass weighted average position of all the particles of a system. But calculating centers of mass and solving kinematic and dynamics problems related to them has only been plugging and chugging formulas so far, with no physical...
Consider a rigid body as a collection of particles moving together. The center of mass is the unique point in space where the following is true <span class="math-container">$$ \sum_i m_i \boldsymbol{r}_i = \left( \sum_i m_i \right) \boldsymbol{r}_{\rm COM} $$</span> But that does not look very intuitive, unless you tak...
Consider an object made of 5 points of masses <span class="math-container">$M_1$</span>, <span class="math-container">$M_2$</span>, <span class="math-container">$M_3$</span>, <span class="math-container">$M_4$</span>, <span class="math-container">$M_5$</span>. Now imagine that I place the object in midair (which is n...
https://physics.stackexchange.com
55,672
[ "https://softwareengineering.stackexchange.com/questions/55672", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/17396/" ]
Which do you like better? Class #1: <pre><code>public class SearchClass { public SearchClass (string ProgramName) { /* Searches LocalFile objects, handles exceptions, and puts results into m_Results. */ } DateTime TimeExecuted; bool OperationSuccessful; protected List&lt;LocalFile&gt; m_Results;...
As always, these things are a matter of taste. In this case, I'm not crazy about the second solution for a few reasons: <ol> <li>There's always a small intellectual burden when defining classes and their relationships. It's not clear what benefit the nested class provides aside from partitioning code. The one class ap...
I follow the KISS principle (Keep it simple, stupid) So the first one to me is the more preferable of the two. I don't like nested classes at all, plus I know having alot of methods in one class can get pretty long sometimes, but to me it's easier searching for those methods than looking in multiple sub-classes.
https://softwareengineering.stackexchange.com
244,382
[ "https://softwareengineering.stackexchange.com/questions/244382", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/135994/" ]
I'm wondering if there are any general guidelines or best practices regarding when to split data into a metadata format, as oppose to directly embedding it within the data. (Specific example below). My understanding of metadata is that it describes data (without the need to actually look at the data), allowing for dat...
I think saving the metadata inside the binary file and providing a specification so anyone can program an API has its advantages. Many binary types include the metadata inside the file itself, providing a public specification or API of how to access it. Examples could be the ID tags of the mp3 formats, the metadata of...
You have the distinction between data and metadata spot on. Two aspects come to mind for this. One is programming and the other is manageability. On the programming side I agree that "one file, one data" has its appeal. You can write a nice, clean handler for the bindary data without cluttering it with messy meta-s...
https://softwareengineering.stackexchange.com
328,784
[ "https://softwareengineering.stackexchange.com/questions/328784", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/198708/" ]
We plan to refactor our company system into a micro-service based system. This micro-services will be used by our own internal company applications and by 3rd party partners if needed. One for booking, one for products etc. We are unsure how to handle roles and scopes. The idea is to create 3 basic user roles such as ...
Authentication and authorization are always good topics I will try to explain to you how we deal with authorizations in the current multi-tenant service that I am working. The authentication and authorization are token based, using the JSON Web Token open standard. The service exposes a REST API that any kind of clien...
I think that no matter what, you'll want your services to accept an auth token that is provided by a authentication service that you write to validate users. This is the most straightforward/secure way to prevent misuse of your microservices. Also, in general, if you want a client to have a good experience, you shoul...
https://softwareengineering.stackexchange.com
3,002
[ "https://ai.stackexchange.com/questions/3002", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/5388/" ]
For example, for classifying emails as spam, is it worthwhile - from a time/accuracy perspective - to apply <em>deep learning</em> (if possible) instead of another machine learning algorithm? Will deep learning make other machine learning algorithms like <em>naive Bayes</em> unnecessary?
It's all about <em>Return On Investment</em>. If DL is "worth doing", it's not overkill. If the cost of using DL (computer cycles, storage, training time) is acceptable, and the data available to train it is plentiful, and if the marginal advantage over alternative algorithms is valuable, then DL is a win. But, as ...
Deep learning is powerful but it is <strong>not</strong> a superior method than bayesian. They work well in what they are designed to do: Use deep learning: <ul> <li>Cost for computation is much cheaper than cost of sampling (e.g: natural language processing)</li> <li>If you have highly non-linear problem</li> <li>If...
https://ai.stackexchange.com
309,066
[ "https://softwareengineering.stackexchange.com/questions/309066", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/181707/" ]
I'm writing a simple whitebox unit testing suite for a project I'm working on in C. The project is broken into modules (each has a <code>.c</code> file with an associated <code>.h</code> file), and all modules are compiled together into one <code>.so</code> file. Obviously, the <code>.h</code> file for each module con...
Unit tests are supposed to be for external functions only. Nevertheless, if you have a lot of "internal code", it should be tested too right? So how? Make smaller functions, separated from you code (another .c and .h), and use those functions as a library that can be unit tested. Then you should be able to test those...
Have you considered putting the functions into the module's header file, but putting them in a conditionally compiled block that is only enabled in build configurations that are tested? It would be analogous to having a C++ class with public and private functions. However, that's not a good option if you're shipping ...
https://softwareengineering.stackexchange.com
129,527
[ "https://cs.stackexchange.com/questions/129527", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/110697/" ]
Suppose we have 7 vertices, each of which corresponds to a different integer modulo seven. The edge exists between two vertices x and y if x + 3 ≡ y mod 7. For example, there is an edge between 0 and 3, and an edge between 5 and 2. What is the length of the shortest path between 0 and 1? My method to get the answer is ...
Let us consider the more general case in which you have <span class="math-container">$n$</span> vertices, and you connect <span class="math-container">$x,y$</span> if <span class="math-container">$x-y \equiv a \pmod{n}$</span> (in your case, <span class="math-container">$n = 7$</span> and <span class="math-container">$...
We can easily generalize this problem: Given a finite group G, two elements g and h in G, and a subset S of G, find the shortest path from g to h in the graph whose vertices are the elements of G and whose edges are the elements of S or the respective inverses of the elements of S, i.e., two vertices x and y are adjace...
https://cs.stackexchange.com
211,377
[ "https://softwareengineering.stackexchange.com/questions/211377", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/102124/" ]
I played with 8-bit machines (C64), I used 16-bit machines (Win 3.1), I enjoyed flat 32-bit address space (Linux). Every time as a user (which was also means being a developer for fun or profit) I felt the need for more bits and welcomed the next wider bit architecture. Accessing to bigger memory space got easier, gra...
It's important to distinguish between 64-bit architectures in general and the 64-bit architectures we commonly see. In an abstract sense, a 64-bit architecture just gives you wider registers (bigger numbers and more addressable memory). Looking at concrete examples of architectures, you see that the 32 to 64-bit jump...
One major benefit of having a huge address space is that you can represent <em>all</em> storage simply as an address. For example, my laptop has 16 GiByte of RAM and 1 TiByte HDD. With 64 bit addresses, you can easily address all that storage using a unified API. 32 bit wouldn't be enough. I could even individually add...
https://softwareengineering.stackexchange.com
114,033
[ "https://physics.stackexchange.com/questions/114033", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/27384/" ]
The tittle pretty much says enough. I have always been told so but no one really motivated it. So, I would like to know why do we use a tensor to describe the stresses in continuum mechanics.
It is a quite famous theorem due to Cauchy. Consider an internal portion $S$ of a continuous body $C$. There are two kinds of forces acting on it: Forces proportional to the mass, of the form $$\int_V \mu(x) \vec{f}(x) d^3x\tag{0}$$ where $\vec{f}(x)$ is the density of force acting on $x \in V$. And forces acting thr...
Applying a force in the $x$-direction might change the shape of the material in the $y$-direction. The only way to capture such an effect is through a tensor. If you have a general force acting on your body $$ \vec F = (F_x, F_y, F_z)^T$$ and you are interested in the reaction of the body by looking at its deformation...
https://physics.stackexchange.com
3,868,466
[ "https://math.stackexchange.com/questions/3868466", "https://math.stackexchange.com", "https://math.stackexchange.com/users/342242/" ]
A simple application of the Compactness theorem shows that for any first order theory <span class="math-container">$T$</span>, if it has aribtrarily large finite models, then it also has an infinite model. This is an interesting result, even surprising, one might say. However, I couldn't come up with any interesting ex...
I mostly see this result used in the contrapositive: if you have a class of objects for which there are arbitrarily large finite objects but no infinite object, then your class of objects is not the class of models of a first-order theory. For example, there is no first-order theory whose models are exactly the finite ...
Is there a group on which the maps <span class="math-container">$x \mapsto x^2, x \mapsto x^3, x \mapsto x^4, \dots$</span> are injective precisely if they are surjective? For example, <span class="math-container">$\mathbb{Z}$</span> is <em>not</em> such a group, since the map <span class="math-container">$x \mapsto x ...
https://math.stackexchange.com
1,581
[ "https://robotics.stackexchange.com/questions/1581", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/1629/" ]
I have a project which requires a robot to move around a room with a flat surface (concrete floor). The robot must carry a laptop. I estimated that the total weight would be 6-7kg (including motors, battery, laptop, motor controller board and other mics items). I would like it to move at about the same speed as a Room...
Roombas move slowly, below a walking pace, right? If that's so, then you probably want a geared DC motor. I'm guessing that on concrete you can get away with a motor that's 100W or less, particularly if it's geared down a whole bunch. You might want to figure out the highest incline or steepest step that you want to...
Or you could just do what I have done and scavenge two DC motors plus gearboxes from used cordless drillers. Mine are from 14.4v drillers and I am operating them using 3S LIPOs (11.1v). The LIPOs are not that expensive if you buy them rated at say 2200mAh (more current capacity = more cost). You don't even need a very ...
https://robotics.stackexchange.com
154,310
[ "https://electronics.stackexchange.com/questions/154310", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/66678/" ]
I want to measure voltage between points A and B. Let's assume that there's some obstruction/difficulty in simply attaching cables between those points. Is it possible to measure the voltage wirelessly somehow? I had an idea of a device that measures voltage at some point with reference to an on-board stable potential...
There's no such thing as an "on-board stable potential" with reference to the outside world. All voltages are relative - a voltage is a potential difference - so in order to measure the voltage between two points, you either need to compare them directly, or you need a common reference potential to compare each to. In...
Well, to measure the current wirelessly, one can utilize a clamp ampermeter. Although, details are not provided, I suppose this is not what you are looking for; as you can come to the voltage if you know the resistance in between and current is not divided on it's way between the points.
https://electronics.stackexchange.com
73,815
[ "https://cs.stackexchange.com/questions/73815", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/70335/" ]
I need to prove that $n^2$ is not $o(n^2+10^{10}n)$. I thought of the limit test: $$ \lim_{n \to \infty} \frac{n^2}{n^2+10^{10}n} = 1 \Rightarrow n^2 = \Theta(n^2+10^{10}n) $$ However I'm not sure if the result of the test rules out the possibility of $o(n^2+10^{10}n)$.
One definition $f(n)=o(g(n))$ is that $\lim_{n\to\infty} f(n)/g(n)=0$. If this is the definition you're using, then showing that the limit is&nbsp;$1$ already shows that $f(n)\neq o(g(n))$. The other definition is that, for every $c&gt;0$, there is an $n_0$ such that $f(n)\leq cg(n)$ for all $n\geq n_0$. The fact tha...
Without any limits: $(n^2 + 10^{10}n) / 2 ≤ n^2 ≤ n^2 + 10^{10}n$ whenever $n ≥ 10^{10}$. So for c &lt; 1/2, we don't have $n^2 &lt; c(n^2 + 10^{10}n)$ for all large n. Actually, not for any large n. And $f(n) = \Theta (g(n))$ does indeed rule out that $f(n) = o (g(n))$, but is not a necessary condition.
https://cs.stackexchange.com
123,585
[ "https://chemistry.stackexchange.com/questions/123585", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/85550/" ]
What will happen in an exothermic reaction if more than required energy is given? I mean, will it produce even more energy which will be highly dangerous or nothing will happen according to Le Chatelier's principle (as we are trying to carry the reaction in an opposite direction)?
There are two separate effects we need to consider here: thermodynamic and kinetic. Let's assume you are only providing the energy thermally. So providing more energy means increasing the temperature (<em>T</em>). Thermodynamically, if a reaction is exothermic, and you increase <em>T</em>, the reaction becomes less f...
The equilibrium constant depends on temperature, the only thing it depends on. For an exothermic reaction the equilibrium constant will decrease ie shift towards the reactants side Also consider kinetics as described above
https://chemistry.stackexchange.com
42,266
[ "https://chemistry.stackexchange.com/questions/42266", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/21838/" ]
I understood Le Chatelier's principle perfectly but my question is: Why should a system try to reverse any change that has been done to it? I understand equilibrium constant, mole concept and partial pressures but I do not understand quantum mechanics yet. If you use any other technical terms in your answer, please a...
Well, lets first write out the general equation of a chemical reaction: $$\ce{aA + bB &lt;=&gt; cC + dD}$$ As you obviously know, since this is at equilibrium, not all the reactants react to form the products. Hence in a solution which is at equilibrium, all species of $\ce{A, B, C, D}$ will be present. However the s...
For a simple reaction, we can derive the free energy change as $$\Delta G (T,p)=\Delta G^\circ(T)+k_\mathrm{B}T\ln K_\text{eq}$$ Here, $\Delta G (T,p)$ is the free energy change of the reaction, $\Delta G^\circ (T)$ is the free energy change at that temperature but 1 bar pressure or you can use any scale of absolute ...
https://chemistry.stackexchange.com
29,441
[ "https://mathoverflow.net/questions/29441", "https://mathoverflow.net", "https://mathoverflow.net/users/2622/" ]
I'm interested in a criterion that determines whether a linear scalar PDE (arbitrary order) has a unique solution given vanishing boundary conditions at spatial infinity. I'll try to formulate the question more precisely below. Consider a PDE of the form $L[u]=0$ where $u(t,x,y,z)$ is a scalar function of one time $(t...
Hi, I am adding another answer because this suggests a rather different approach then what I have outlined before, and this is targeted at the fact you are willing to grant smooth with compact support on any space-like hyperplane. If you are willing to let your solutions vanish in such a large set, then the proper to...
I am somewhat doubtful that the question as posed as any sort of reasonable answer. (Also, I don't really see how the Lorentzian metric even enter into the problem.) (a) ANY hyperbolic PDE in (1+3) dimensions will, by definition, not have unique solution for your problem. (b) Even elliptic PDEs are not guaranteed to...
https://mathoverflow.net
168,350
[ "https://security.stackexchange.com/questions/168350", "https://security.stackexchange.com", "https://security.stackexchange.com/users/157901/" ]
I'm setting up a site for internal use and it will be served over HTTPS with a self-signed server certificate. To increase security, I want to also secure the site with client certificates. Is there any reason to use a separate certificate authority to sign the client certificates instead of just using the server priv...
When you talk about security, all this self-signed SSL stuff has nothing common with security. In order to implement proper SSL configuration for internal network, you have to: <ul> <li>Create your own CA server (depending on a platform, different products may be used. For example, in Windows you can use Active Direct...
Crypt32 gave information about "how". Here's a reason to do this the "right way" -- The "right way" is likely less costly than running your own CA, distributing keys, etc. "Let's encrypt" is free. A wildcard from a "cheap" SSL provider is only about $100/year and can provide a cert for all sites in a domain. Eit...
https://security.stackexchange.com
474,871
[ "https://electronics.stackexchange.com/questions/474871", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/225886/" ]
I've been amassing a pretty large collection of these old scopes, and it's about time I got to trying to fix them. About half of the ones I run across and buy don't have traces. I don't need to get them in perfect working order again, but I'd at least like to get a trace on them. So what do I look for first? I know r...
Get ahold of the service manuals first. Make sure you are experienced enough to be comfortable working <strong>safely</strong> with multi-kV voltages such as all CRT scopes use. There is quite enough voltage and current capability in a CRT scope to be <strong>lethal</strong>. If not, then stop now. Check all the powe...
<blockquote> I can't really see a transformer just going bad, because you'd have to somehow manage to break one of the windings in it, correct? </blockquote> If moisture gets into the windings it can corrode the wires or break down the insulation. This doesn't usually happen in normal operation because heat keeps ...
https://electronics.stackexchange.com
31,850
[ "https://electronics.stackexchange.com/questions/31850", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/4711/" ]
What is the meaning of "combinational assignment" and "registered assignment" to signals? In particular what are the differences between these two types of assignments?
Essentially, the difference boils down to whether the signal gets assigned on a clock edge or not. Combinational code, like A &lt;= B + 1 would have A being assigned B+1 "immediately," whereas <pre><code> process(clk) begin if(rising_edge(clk)) then A &lt;= B + 1; end if; ...
Assignments in VHDL are neighter specified as registered or combinatorial. In VHDL the actual assignment type (the type of RTL logic generated) is just inferred. Registers in VHDL are created explicitly by assigning a signal on a clock edge, though just because a process has a clock it does not mean all signals in tha...
https://electronics.stackexchange.com
59,684
[ "https://cs.stackexchange.com/questions/59684", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/53643/" ]
I'm studying elementary data structures like Linked List, Doubly Linked List and Binary Trees like Binary Search Trees. Both runs in worst case O(n) in the same operations, so why don't we use only one data structure?
Aspects other than asymptotic worst case time are also important. For example <ul> <li>Actual speed in practice</li> <li>Memory consumption</li> <li>Implementation difficulty</li> </ul> Algorithmic analysis almost never tells you the complete story and never should be used to justify blanket statements like "this dat...
$O(n)$ in BST means it was case degraded to Single Linked List, but it still has two pointers per node, while linked list has only one. But for balanced or almost balanced tree, the operations are $O(\log n)$. You can keep it balanced (using for example AVL tree or Red Black Tree, where both differ in cost of insert an...
https://cs.stackexchange.com
2,289,659
[ "https://math.stackexchange.com/questions/2289659", "https://math.stackexchange.com", "https://math.stackexchange.com/users/447851/" ]
$$1-\frac{1}{\sqrt{10}}-\frac{1}{10}+\frac{1}{10\sqrt{10}}-\frac{1}{10^{2}}-\frac{1}{10^{2}\sqrt{10}}+\cdot\cdot\cdot$$ I personally have such an idea: try to make geometric series like this $$1-\frac{1}{\sqrt{10}}(1-\frac{1}{10}+\frac{1}{100}+\cdot\cdot\cdot)-\frac{1}{10}(1+\frac{1}{10}+\cdot\cdot\cdot)$$ using 3 5 7...
My idea: suppose that $$1-\frac{1}{\sqrt{10}}-\frac{1}{10}+\frac{1}{10\sqrt{10}}-\frac{1}{10^{2}}-\frac{1}{10^{2}\sqrt{10}}+\cdot\cdot\cdot$$ is a convergent serie. Let $S$ the sum of the serie $$S= 1-\frac{1}{\sqrt{10}}-\frac{1}{10}+\frac{1}{10\sqrt{10}}\left(1-\frac{1}{\sqrt{10}}-\frac{1}{10}+\cdot\cdot\cdot\right)=1...
Write your sum like: $$S = {S}_1 + {S}_2 + {S}_3$$ Where, $${S}_1 = 1 + \frac{1}{\sqrt{10}\cdot 10} + \frac{1}{10^{3}} + ... = \frac{1}{1 - \frac{1}{10 \cdot\sqrt(10)}} = \frac{10\sqrt{10}}{10\sqrt{10} - 1}$$ $${S}_2 = -\frac{1}{\sqrt{10}} - \frac{1}{10^{2}} - ... = -\frac{1}{\sqrt{10}} \cdot{S}_1$$ $${S}_3 = -\fra...
https://math.stackexchange.com
2,501
[ "https://dba.stackexchange.com/questions/2501", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/1579/" ]
I am using sp_helptext to list some stored procs instead of going through the ui. I am having a problem with the naming convention we have chosen to adopt. I have a stored proc nameed [Test.FooBar]. <pre><code>Execute sp_helptext [Test.FooBar] </code></pre> <blockquote> Msg 15009, Level 16, State 1, Procedure sp_h...
Maybe try: <pre><code>EXEC Foo..sp_helptext 'dbo.[Test.FooBar]'; </code></pre> Still having problems with sp_helptext? Ok, stop using it - it's not the only way to get the object's definition. <pre><code>SELECT OBJECT_DEFINITION(OBJECT_ID('dbo.[Test.FooBar]')); </code></pre> Next, please stop putting . and other sp...
How about trying the below? <pre><code>sp_helptext 'Test.FooBar' </code></pre>
https://dba.stackexchange.com
1,443,338
[ "https://math.stackexchange.com/questions/1443338", "https://math.stackexchange.com", "https://math.stackexchange.com/users/36398/" ]
I have to find a condition on a polynomial $f(x) \in \mathbb{Z}[x]$ such that $f(x)$ is reducible in $\mathbb{Z}[x]$ but irreducible over $\mathbb{Q}$.<br> My attempt: Let $f(x)$ be reducible over $\mathbb{Z}$ then for some $a(x), b(x) \in \mathbb{Z} [x]$, we have $$f(x)=a(x). b(x)$$ where $0\leq$deg...
The polynomial $f(x)=2x-2$ is reducible in $\mathbb{Z}[x]$, because both $2$ and $x-1$ satisfy the definition. On the other hand, $2x-2$ is irreducible in $\mathbb{Q}[x]$. So it should be easy to find the condition: can there be other cases? (Probably the book missed a “not”.) <hr> Let's assume that $f(x)\in\mathb...
It is true that the only way an irreducible polynomial over the rationals can be reducible over the integers is that it is not primitive. Maybe check if you did reproduce the question exactly. The answer in the textbook would answer: give a criterion for an irreducible polynomial over the rationals to be irreducible ...
https://math.stackexchange.com
106,031
[ "https://softwareengineering.stackexchange.com/questions/106031", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/19937/" ]
Lately I've been developing a web-based management system for a gym. Their previous app was developed in Visual Basic. For the new app, all the front-end scripting uses jQuery, the server is running PHP &amp; MySQL... you know, the typical el-cheapo linux based stack. Anyways, I was wondering why JavaScript's prompt, ...
<h2>1. UX: message boxes are mostly evil</h2> <strong>Alert boxes are bad in all cases from the UX point of view.</strong> In desktop apps. In web apps as alerts or inline JavaScript messages. Everywhere. You can read About Face 3 by Alan Cooper¹ if you want to know why; it explains very well how does this interrupt ...
You are only adding overhead if you don't need the fancy dialogs elsewhere, which you probably do. At that point it doesn't make much difference whether the functionality is included as part of the browser or as part of the framework you are using, and you may as well keep all your popups looking consistent. While you...
https://softwareengineering.stackexchange.com
343,999
[ "https://electronics.stackexchange.com/questions/343999", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/52303/" ]
I am trying to make a PCB stencil by etching thin Aluminum using a toner transfer method. I am using H2O2 3% and HCL 10% in a 1:1 ratio. I have also tried 3:1 and 1:2 ratios. The alu has been cleaned with acetone. I've tried room temp chemicals and putting them in a hot tap water bath. In all cases the reaction is ...
Simple PI where you regulate the temperature should do the trick. In normal operation, no overheat, your regulation loop saturates and provides full power to your system. If it starts getting too hot, the control loop does its job and turns the power down. If your PID is analog, no problem, if it is in software, you...
With an MCU you just feed the PI the maximum temperature as setpoint, Tlim.<br> The PI outputs a number between 0.0 and 1.0. (as in 0 to 100% floating point) You multiply this number with the LED driver output, whatever that might be. When Tlim, the PI outputs anything from 0 to 1. In the PI you skip the integrator a...
https://electronics.stackexchange.com
36,497
[ "https://math.stackexchange.com/questions/36497", "https://math.stackexchange.com", "https://math.stackexchange.com/users/3620/" ]
I want to prove that the group ring $\mathbb{Z}_2[G]$ is not semisimple when $G$ is the cyclic group of order two. I guess the simplest way would be to show that there exists a submodule that is not a direct summand. However I do not know exactly how I should go about showing this.
The group ring $\mathbb{Z}_2[G]$ has only four elements: $0$, $1$, $x$ and $1+x$. A proper submodule $M$ will have order $2$; if $a+bx\in M$, then so is $x(a+bx) = b+ax$; so if $M=\{0, a+bx\}$, with $a$ and $b$ not both zero, then $b+ax=0$ (so $a=b=0$) or $b+ax=a+bx$ (so $a=b=1$). Thus, the only proper submodule is $\{...
Is $\mathbb{Z}_2$ the field with two elements? If so, there's a non-split exact sequence $$ 0 \to \mathbb{Z}_2 \to \mathbb{Z}_2G \to \mathbb{Z}_2 \to 0 $$ where the first map sends 1 to $1+g$ ($G = \langle g \rangle$) and the second is the augmentation map.
https://math.stackexchange.com
415,100
[ "https://softwareengineering.stackexchange.com/questions/415100", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/278602/" ]
I am designing a REST service with multiple end points which will be servicing the following hierarchy: <code>Department</code> has many <code>Category Group</code>s<br /> <code>Category Group</code> has many <code>Category</code>(-ies)<br /> <code>Category</code> has many <code>Sub-Category</code>(-ies)<br /> <code>Su...
From your comment: <blockquote> ...If the SPA is only supposed to know about the root URI of the web service and only knows that the user ID is &quot;1&quot;, how is it supposed to know the route to the &quot;user&quot; endpoint... </blockquote> HATEOAS applies to a resource and not to the entire API, so it’s fine for ...
You just include the complete absolute url in an e-mail. That is an entry point to your app. <strong>It's a fantastic example of HATEOAS</strong>, because it allows an unknown application (email client) to continue a workflow that began in your application, essentially carrying state of that interaction through time an...
https://softwareengineering.stackexchange.com
160,387
[ "https://softwareengineering.stackexchange.com/questions/160387", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/53697/" ]
I'm new to the functional programming concepts in C#, but I have some experience with higher order functions via Haskell, Scala, Python and Ruby. I'm currently going through an old .NET 2.0 codebase with a LOT of duplication in it. Most of it is simple "copy/paste" with a few variables changed. I'm trying to condense a...
Your implementation seems reasonable to me. However, if most of the other people developing the software have limited advanced programming experience you might want to use a regular function instead of an anonymous one since it will be more obvious what's going on. When you're the senior developer and the rest of y...
This is not a higher-order function, so it should be easily understandable to any C# programmer. Although instead of using a custom delegate type, you could've used <code>Action&lt;string, string, string, CuttingParameters&gt;</code>. But I think a normal method would have been fine here too, and is probably more idi...
https://softwareengineering.stackexchange.com
126,667
[ "https://stats.stackexchange.com/questions/126667", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/13317/" ]
I am interested in generating zero-truncated negative binomial random variables using some sort of rejection sampling. My first thought was to simply draw from a negative binomial distribution, and then get rid of any zeroes that may arise. I'd then repeat said process until I reached $N$, the desired number of rando...
The basic approach* will produce zero-truncated negative binomials. *(I'm not checking your code, but commenting on the description of the algorithm) So as far as <em>correctness</em> goes, the approach is completely appropriate. If $p_0=P(X=0)$ is not large, it may be reasonably efficient. If that number gets much...
Here is an algorithm that avoids the for() loop, but still allows different means or probabilities: <pre><code>Y &lt;-rnbinom(n = n, mu = mu, size =Theta ) while( sum(Y==0) &gt;0 ){ # rejection sampling Y.new &lt;- rnbinom(n = sum(Y==0) , mu = mu[which(Y==0)], size =Theta ) Y[which(Y==0)] &lt;- Y.new }...
https://stats.stackexchange.com
222,179
[ "https://dba.stackexchange.com/questions/222179", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/164113/" ]
I have four global temp tables <code>(##A,##B,##C,##D)</code> on which I want to perform a <code>left join</code> in SQL Server 2008. By global temp tables I mean I created them using a code like this: <pre><code>SELECT * INTO ##A </code></pre> These four tables all have a column with same name 'key' and I want to pe...
It just has a slightly different name. It's "Creating tmp table", which also makes more sense. MySQL knows, that a temporary table will be needed, so it generates it on the fly. The state name "copying to tmp table" is just poorly chosen.
I usually find Profile to be useless. Usually "sending data" is the top entry. That gives no clue of what should be fixed to improve performance. Although there is no "copying to tmp table", there is a rather large "opening tables". But no clue as to whether it is <em>your</em> table, or a <em>tmp</em> table. Ther...
https://dba.stackexchange.com
391,304
[ "https://physics.stackexchange.com/questions/391304", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/146254/" ]
The generalized uncertainty principle says, $$\sigma_A^2\sigma_B^2~ \ge ~\frac14\langle i[A, B]\rangle^2.$$ But the complex field is not ordered, i.e, inequalities like $\le$, $\ge$, etc are absurd. For instance, is $i&gt;1$? Doesn't $i$ in there makes the whole inequation meaningless?
To elaborate on Yuzuriha's comment, if $A$ and $B$ are self-adjoint operators, then $$\langle [A,B]\rangle = \langle\psi,AB\psi\rangle - \langle\psi,BA\psi\rangle = \langle A \psi,B\psi\rangle - \langle B\psi,A\psi\rangle$$ but $$\overline{\langle [A,B]\rangle} = \overline{\langle A \psi,B\psi\rangle} - \overline{\...
During the proof, after using the Schwarz inequality <span class="math-container">$$\sigma_A^2\sigma_B^2\ge|\langle f|g\rangle|^2$$</span> We invoke the fact that, for any complex number <span class="math-container">$z$</span>, we have: <span class="math-container">$$|z|^2=[\mathrm{Re}(z)]^2+[\mathrm{Im}(z)]^2\ge [\mat...
https://physics.stackexchange.com
85,046
[ "https://electronics.stackexchange.com/questions/85046", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6638/" ]
I have the next problem: Determine \$v_{0}\$ for \$t&gt;0\$ where \$v_{s} = 20mV\$ in the next op amp circuit: <img src="https://i.stack.imgur.com/1IAym.jpg" alt="Circuit"> I proceed as follows: <ul> <li>At \$t&lt;0\$: \$v_{s}\$ is unplugged and the rest of circuit is dead. \$va=v_{0}=0V\$</li> <li>At \$t&gt;0\$: ...
This question is flawed because at the point when the switch closes \$V_O\$ is undefined by any of the circuit components. Nothing in the circuit prior to t=0 defines \$V_O\$. <blockquote> At t&lt;0 vs is unplugged and the rest of circuit is dead. va=v 0 =0V </blockquote> No this is not true. Just think about it. ...
<strong>Rule number 1</strong>: If the opamp works with negative feedback and is not saturated, the voltages on the two inputs are always equal. <strong>Rule number 2</strong>: The input current is always 0. So, the current through the resistor is equal to the current through the capacitor and is: $$ I_C = I_R = \fr...
https://electronics.stackexchange.com
20,749
[ "https://dba.stackexchange.com/questions/20749", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/10059/" ]
I have a sporadic problem, when upgrading SQL Server in a single-user mode, some other application somehow logs into the database and kicks my process out. Last time when that happened, I ran sp_who, and I could see that a process that took control of the database is "TASK MANAGER". <strong>EDIT</strong> By "took cont...
Any SPIDs below 50 are system processes. "TASK MANAGER" is one of these. I'm not sure exactly what it does but it is initiated only by the server itself, dealing with system level jobs. Seeing this on the database "sp_who" is nothing to worry about. I highly doubt this process is the reason why you are getting kicked ...
The "Task Manager" process is used by change tracking to do cleanup steps in change tracking. To make it stop, you can either disable change tracking, or you can disable change tracking cleanup.
https://dba.stackexchange.com
3,257,795
[ "https://math.stackexchange.com/questions/3257795", "https://math.stackexchange.com", "https://math.stackexchange.com/users/681129/" ]
I have this limit: <span class="math-container">$\displaystyle \lim\limits_{x\to \infty}\dfrac{1}{x}\int_{0}^x \dfrac{1}{2+\cos(\mathrm t)}\, \mathrm{dt}$</span> I said that Edit: <span class="math-container">$-1\leq \cos\mathrm{t}\leq 1 \Rightarrow \dfrac{1}{2+\cos\mathrm{t}} &gt; 0 \text{ and because that expressi...
Note that <span class="math-container">\begin{align} \int^{2\pi n}_0 \frac{dt}{2+\cos t} = n \int^{2\pi}_0 \frac{dt}{2+\cos t} \end{align}</span> which means <span class="math-container">\begin{align} \frac{1}{2\pi n}\int^{2\pi n}_0 \frac{dt}{2+\cos t} = \frac{1}{2\pi}\int^{2\pi }_0 \frac{dt}{2+\cos t}. \end{align}</sp...
Use the fact that <span class="math-container">$\cos x$</span> is periodic of period <span class="math-container">$2\pi$</span> (as per a comment). Thus, we are just getting the average area over an interval of length <span class="math-container">$2\pi$</span>. Using Wolfram alpha, say, we get <span class="math-conta...
https://math.stackexchange.com
390,378
[ "https://softwareengineering.stackexchange.com/questions/390378", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/333774/" ]
We have a web application that all update, insert and DB operation procedure handle via SQL Server DB 2017. What is the best way to handle and get error (in Web-app or SQL server error handler?). for example a foreign key error occurred, is it better to handle it via DB or Code? Update 1: for all operation from serv...
These errors tend to be unhandleable. In the sense that there's no automatic remedy you can apply. You simply have to log them and present the user with a friendly error message. As such the <strong>Data layer</strong> should: <ol> <li>Throw an exception, </li> <li>Let it bubble up to the application layer </li> </ol...
By far the most important part of <strong>Structured Exception Handling</strong> is the <em>last</em> part - the <em>Handling</em>. Catch Exceptions where you can do something <em>useful</em> with/about them. Ideally, that would be to take some corrective action, make the problem "go away" and then the caller never...
https://softwareengineering.stackexchange.com
2,700,126
[ "https://math.stackexchange.com/questions/2700126", "https://math.stackexchange.com", "https://math.stackexchange.com/users/525188/" ]
Given the set $B=\{\frac{1}{n}\mid n\in Z^+\}$, decide whether it's open or closed. So far, I worked out that it is closed since it contains all its limit points, starting at $1$. These limit points would be the discrete elements in the set itself, no? Thanks for help in advance!
I preassume that $B$ must be looked at as a subset of $\mathbb R$ and that $\mathbb R$ is equipped with its usual (order)topology. <hr> If $(a,b)$ is an interval with $0\in(a,b)$ then $0&lt;b$ so that - for $n$ large enough - we have $\frac1n\in(0,b)\subseteq(a,b)$. This makes clear that $0$ is a limitpoint of $B$ a...
The answer to both is no. Since $0\not\in B$, we have that $B$ is not closed. Since you cannot find some $r&gt;0$ such that $B_r(1)\subseteq B$ (because $1+\frac{r}{2}\not\in B$), we have that $B$ is not open in $\mathbb{R}$.
https://math.stackexchange.com
77,432
[ "https://physics.stackexchange.com/questions/77432", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
I can't seem to think of any way to envision electron spin. Can it be thought of as the uncertainty in angular momentum?
No. There are two different types of an angular momentum. First is connected with the coordinate representation, so it can be interpreted from classical mechanics point of view. Second isn't connected with coordinate representation, but it exist in every particle of the free field (i.e., is an own angular momentum) whi...
The intrinsic angular momentum of electrons, protons, neutrons etc cannot be explained in terms of rotating mass - but rotation may nonetheless be involved since h/4(pi) is a factor that can be related to angular momentum uncertainty
https://physics.stackexchange.com
160,823
[ "https://softwareengineering.stackexchange.com/questions/160823", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/26034/" ]
Simple question, what's more common / standard / won't make future developers look at me cross-eyed for unit testing: Displaying just the errors, or reporting every passed test?
I would say that showing every test and its pass/fail/skipped status is the best, because it gives positive feedback that each test was successfully run or purposefully skipped. However, if you are building your own tools, I recommend giving the user an option to choose what they want to see.
Depends what you want to see. It's always nice to have at least the <em>option</em> of seeing all the results (as in, a complete list of all tests that have been run, and their status), and if you run the tests as a developer, you are probably also interested in error details for the failed ones. You do want a way to b...
https://softwareengineering.stackexchange.com
102,776
[ "https://chemistry.stackexchange.com/questions/102776", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/-1/" ]
I was solving numericals on Kinetic Theory of Gases when I came across this question <blockquote> Two closed vessel of equal volume contain air at 105 kPa, 300 K and are connected through narrow tube. If one of the vessel is now maintained at 300 K and other at 400 K what will be the pressure in the vessel? </blockq...
<strong>Macroscopics</strong> Imagine the tube is initially closed. Then one vessel is heated up. As <span class="math-container">$V$</span> and <span class="math-container">$m$</span> are constant: <span class="math-container">$$p=k\,T$$</span> So if <span class="math-container">$T$</span> is increased, <span class=...
This experiment divides the container so that pressure (a "flow" of gas molecules against the walls) can be equalized thru the narrow tube but net flow of heat from hot molecules passing thru the narrow tube is seriously impeded (essentially does not occur because each section is maintained at 300 K or 400 K). This no...
https://chemistry.stackexchange.com
119,647
[ "https://physics.stackexchange.com/questions/119647", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/17364/" ]
Let us study the subgroup of the Poincare group that leaves the point $x=0$ invariant, that is the Lorentz group. The action of an infinitesimal Lorentz transformation on a field $\Phi(0)$ is $L_{\mu \nu}\Phi(0) = S_{\mu \nu}\Phi(0)$. By use of the commutation relations of the Poincare group, we translate the generato...
The LHS describes the transformation of $L_{\mu \nu}$ under "space-time translations". This is the natural generalization of how time evolution works in the Heisenberg picture. So instead of acting by just the generator of time translation $e^{-\frac{i H t}{\hbar}}$, you also have the $p_i$ in the exponent, which are t...
I am still not entirely sure what your question is, but I will try to explain the left-hand side of equation (1) in general. More information can be found in "Lie algebras in particle physics" by Georgi. A representation of matrix Lie group can in be written as: $$ D(g) = e^{i \alpha_a X_a} $$ where $X_a$ denotes a ge...
https://physics.stackexchange.com
1,132,518
[ "https://math.stackexchange.com/questions/1132518", "https://math.stackexchange.com", "https://math.stackexchange.com/users/188941/" ]
If X, Y are iid rvs, and U and Z are r.v.s that can each be written in terms of X and Y, does that mean that U and Z are independent?
You have by definition $$v=\frac{g(x+h)-g(x)}{h} - g'(x), \\ w=\frac{f(y+k)-f(y)}{k} - f'(y). $$ You are originally dealing with $$\frac{f(g(x+h)) - f(g(x))}{h}.$$ This means that the change in the input to $f$ should be $$k=g(x+h)-g(x).$$ If this isn't clear, it's because $$\frac{f(g(x+h))-f(g(x))}{h} = \frac{...
This is more a comment than an answer, but whatever. In Hardy's classic "A Course of Pure Mathematics" (the tenth edition (1960) just happens to be sitting on my shelf) he writes in chapter VI, section 114, page 217 about the chain rule that "The proof of this theorem requires a little care." The problem arises when g...
https://math.stackexchange.com
64,776
[ "https://mathoverflow.net/questions/64776", "https://mathoverflow.net", "https://mathoverflow.net/users/7845/" ]
Let $X$ be a noetherian integral scheme and let $f \colon X' \to X$ be the normalization morphism. It is known that, if non trivial, $f$ is <em>never</em> flat (see Liu, example 4.3.5). What happens if we suppose $X$ normal, and we take the normalization in a finite (separable) extension of the function field of $X$? ...
A characteristic zero example: Let $k$ be a field of characteristic zero (or anything not $2$.) Let $L$ be the field $k(x,y)$ and let $K$ be the subfield $k(x^2, xy, y^2)$, so $[L:K]=2$. Let $S \subset L$ be the ring $k[x,y]$, and let $R = S \cap K = k[x^2, xy, y^2]$. Then $S$ is the normalization of $R$ in $L$. I cl...
David's answer reminds me also of the following: For ordinary double points <span class="math-container">$R = k[[x,y,z]]/f$</span>, <span class="math-container">$\text{A}_n$</span>, <span class="math-container">$\text{D}_n$</span>, <span class="math-container">$\text{E}_6$</span>, <span class="math-container">$\text{...
https://mathoverflow.net
53,701
[ "https://dsp.stackexchange.com/questions/53701", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/39013/" ]
Let's say we have discrete-time stationary random signals with Gaussian PDF of mean value 0 and variance 1, whose individual signal values are uncorrelated. For such a signal, how can we determine ACF and the PSD?
In the following, I suggest that, before using the generic <span class="math-container">$T(\alpha_1 x_1+\alpha_2 x_2)$</span> versus <span class="math-container">$\alpha_1 T( x_1)+\alpha_2T( x_2)$</span>, it can be more informative to try with simpler partial tests, or try counterexamples, based on your intuition. I ...
Though Laurent gave the standard answer of the linear system. We shall also note that this is an incrementally linear system and it could be made linear by the following argumentation: Let the first system (your system) be given by the following I/O relationship: <span class="math-container">$$ y[n] = \mathcal{T}\{ x...
https://dsp.stackexchange.com
548,756
[ "https://stats.stackexchange.com/questions/548756", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/337046/" ]
I've noticed that some people argue that adding noise to training data equivalent to regularizing our predictor parameters. How is this the case? <ol> <li>Some of the examples listed on SE discussing this topic focus more on e.g. LSTMs and SVMs, but can we do this for simpler models like a multiple linear regression? <...
Adding noise to the regressors in the training data is similar to regularization because it leads to similar results to shrinkage. The linear regression is an interesting example. Suppose <span class="math-container">$(Y_i,X_i)_{i=1}^n$</span> is a set of i.i.d. observations and that <span class="math-container">$$ Y_i...
<strong>Overview:</strong> For linear regression, I'll show that <span class="math-container">$\ell_2$</span> regularization (a.k.a. ridge regression) arises from minimizing the expected squared error over random perturbations of the regressors. The distributional form of the perturbations doesn't matter beyond some mi...
https://stats.stackexchange.com
52,678
[ "https://mechanics.stackexchange.com/questions/52678", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/11037/" ]
My Toyota Vitz (Yaris) 2007 randomly gives PO171 (System Too Lean) when at idle. My mechanic has done following fixes so far, but problem still persists. <ul> <li>Replaced oxygen sensors.</li> <li>Replaced fuel filter.</li> <li>Cleaned injectors, spark plugs.</li> </ul> Also, mechanic checked for a vacuum leak by spr...
As stated, it definitely could be a belt. It also sounds like the bearings in your alternator are going out. I think it may be a combination of both. Being that the screeching increases when you turn anything on that would pull more power from your alternator, combined with the other symptoms you've stated, the alte...
The comment /u/CharlieRB posted is most likely the reason for this squealing. I would check your serpentine belt for excessive deflection and adjust your Idler and/or Tensioner Pulley(s).
https://mechanics.stackexchange.com
135,175
[ "https://physics.stackexchange.com/questions/135175", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/57866/" ]
The work done against gravity is $mgh$, well at least that's what my textbook says. I have a question: I can apply a force say 50N, so total work done = $mgh + mah$. Where $ma$ = Force. But the truth is irrespective of the force applied, the work done against gravity is always $mgh$. Why? For example, when I move an o...
If I take a mass $m$ and apply a force $F$ (greater than $mg$) to it for a distance $h$ upwards then I will do work of: $$ W = Fh \tag{1} $$ The force $F$ has to be greater than the force due to gravity, $mg$, or the object won't move upwards, so let's write the force I apply to the mass as: $$F = mg + F'$$ then eq...
You might want to change your question title to "Work done by gravity," because that is what is implied by the variables <em>mgh</em>. Of course, you can add a greater force than that of gravity, which would cause whatever object to which the force is applied to accelerate (since the forces are not in balance). No ma...
https://physics.stackexchange.com
561,124
[ "https://stats.stackexchange.com/questions/561124", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/288172/" ]
For the sake of simplicity, I just want to focus on single/level exponential smoothing. When alpha, the decay rate, is near 1, the most recent observation has the highest weight and influence of recent observations decay rapidly, lending to a high variance model. I'm curious how alpha can be optimized, returning a smoo...
If your previous smoothed number was <span class="math-container">$y_{n-1}$</span> and your new observation is <span class="math-container">$x_n$</span> then the new smoothed number <span class="math-container">$y_n$</span> which minimises <span class="math-container">$\alpha(x_n-y_n)^2+(1-\alpha)(y_n-y_{n-1})^2$</span...
Unfortunately, without a specific case in mind, it's a bit hard to answer! Reason simply being that as with many things, the true answer is &quot;it depends&quot;. I'll outline a couple of potential examples/uses/perspectives for you to consider. I will assume some kind of time series data that you're smoothing. <em>Sc...
https://stats.stackexchange.com
79,658
[ "https://mathoverflow.net/questions/79658", "https://mathoverflow.net", "https://mathoverflow.net/users/17492/" ]
My knowledge is very limited for complex geometry. I have the following question: If we have two complex vector bundles $E\to X$ and $F\to X$ such that we have an isomorphism $\mathcal O\left(E\right) \cong \mathcal O\left(F\right)$ between the sheaf of holomorphic sections, do we have an isomorphism $E \cong F$ ?
No. On $\mathbb P^1=\mathbb P^1(\mathbb C)$ we have $\Gamma(\mathbb P^1,\mathcal O_{\mathbb P^1}(-1))=\Gamma(\mathbb P^1,\mathcal O_{\mathbb P^1}(-2)=0$, but $O_{\mathbb P^1}(-1)$ and $O_{\mathbb P^1}(-2)$ are not isomorphic. However on an <em>affine algebraic</em> variety $X$, the answer is "yes". There is an amaz...
Yes, this is true as soon as you assume that the isomorphism of sheaves $\mathcal O(E)\cong\mathcal O(F)$ is $\mathcal O_X$-linear. To prove, pick a cover $(U_i)_{i\in I}$ of $X$ be opens which are trivializing both for $E$ and $F$. Now if you have an isomorphism of sheaves $\phi:\mathcal O(E)\to\mathcal O(F)$ then y...
https://mathoverflow.net
4,509,674
[ "https://math.stackexchange.com/questions/4509674", "https://math.stackexchange.com", "https://math.stackexchange.com/users/820245/" ]
In how many ways can you pick a group of <span class="math-container">$5$</span> people from <span class="math-container">$13$</span> people so that Mary and John are not together in the group at the same time? So, I have these cases: Mary + <span class="math-container">$4$</span> people John + <span class="math-contai...
<span class="math-container">$\binom{13}{5} - \binom{11}{3} = 1122 $</span> should be the one step answer by complementary counting. Or <span class="math-container">$2\binom{11}{4} + \binom{11}{5}$</span> according to your case work.
Clearly <span class="math-container">$\dbinom{13}{5}$</span> are all possible choices! The choices where Mary and John are in the same group is <span class="math-container">$\dbinom{11}{3}$</span>,. So the choices where Mary and John are NOT in the same group is <span class="math-container">$\dbinom{13}{5}-\dbinom{11}{...
https://math.stackexchange.com
376,212
[ "https://electronics.stackexchange.com/questions/376212", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/102846/" ]
I want to attach several accelerometer data loggers to different parts of the human body (i.e. my own, it's not gonna be a commercial product). The individual units save their data to sd card so they are mostly autonomous. Nevertheless I want to wire them, in order to centralize power supply (a commercial portable powe...
The lower input port dims (or turns off) the LED when high. The higher current (assuming the input is less than 0.5V or so) is set by R7 only. Whatever that port is used for, it can only dim the LED. So if you want the nominal maximum current to be 60mA, you need about 1.75 ohms for R7. (there is a small, about +...
<blockquote> Now I need to modify the circuit so the current is max. 60mA only. So is the only modification I have to do to change R7 to 1.75 Ohms? </blockquote> The FB pin reference voltage is 104 mV +/- 10 mV so, if 60 mA is a maximum limit then you should use 114 mV as the reference voltage and hence the refere...
https://electronics.stackexchange.com
52,209
[ "https://stats.stackexchange.com/questions/52209", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/13561/" ]
I just have 1500 data points in excel. However, I want to do a chi squared test to prove if the data is normaly distributed. My question is: How to calculate the expected range for such a large data set? <strong>UPDATE</strong> How to calculate the relative frequencies for such a large data set?
In my experience, the term outliers doesn't make sense without the context of the application. That is, if you want to exclude data points from your data set, you should be able to give reasons why this or that data point is removed. These reasons may suggest appropriate filtering rules. Therefore I think that someth...
An outlier is only an outlier with respect to some model. What's hugely discrepant under one set of assumptions is just an ordinary point under another, something to be expected in the ordinary course of events. If your data are often of a particular form, it might help to think about what you mean by 'outlier' for th...
https://stats.stackexchange.com
365,317
[ "https://mathoverflow.net/questions/365317", "https://mathoverflow.net", "https://mathoverflow.net/users/137242/" ]
We know that if <span class="math-container">$A$</span> is a separable <span class="math-container">$C^{*}$</span>-algebra then <span class="math-container">$K_1(A)$</span> is countable. Can anybody give an example of a C*-algebra for which <span class="math-container">$K_1(A)$</span> is uncountable?
There must be tons of ways to do this, but a simple one is to start with an uncountable set <span class="math-container">$X$</span>, equipped with the discrete topology, and consider <span class="math-container">$c_0(X)$</span>. There are uncountably many pairwise inequivalent minimal projections in this algebra, so it...
Nik's answer nails it but if you prefer something representable on a separable Hilbert space then you may consider the suspension <span class="math-container">$SM$</span> of any <span class="math-container">${\rm II}_1$</span>-factor <span class="math-container">$M$</span>. Indeed, as <span class="math-container">$M$</...
https://mathoverflow.net
126,751
[ "https://cs.stackexchange.com/questions/126751", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/100853/" ]
This is indeed a Computer Science Question. As far as I am concerned casting down (up) does not require any mathematical operation. It is just shrinking down (leveraging) the significant bits. e.g <pre><code>Long: 0x00000000ffffffff casts down to Int: 0xffffffff </code></pre> However, this does not work with the re...
This is really not a computer science question... First, you failed to distinguish between "casting" and "conversion". In many computer languages, "casting" is an explicit instruction to convert a value from some type to another type. For example in C, <pre><code>double d = 3.7; float f = d; // Automatic conversion,...
Casting is a semantic concept. When you cast the float 1.0 to double, you get a double 1.0. How these are represented are beside the matter. There are various complications that could happen: <ul> <li>Loss of accuracy.</li> <li>Overflow.</li> <li>Underflow.</li> </ul> The "complication" that you describe, however, i...
https://cs.stackexchange.com
604,920
[ "https://physics.stackexchange.com/questions/604920", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/256066/" ]
We've an EM wave <blockquote> <span class="math-container">$\vec{E_i}=\vec{E_0}e^{i(\omega t-kz)}$</span> </blockquote> As it reaches on the surface of the perfect conductor we know the electric field must be zero, so we deduce that another electric field must be produced which will cancel the original field on the sur...
It is true that the electric field inside a perfect conductor is zero. But consider what is happening on the surface of the conductor. <blockquote> We can only say that an induced field exists, which is opposite to that of the incident one and lives on the surface of the conduit conductor. </blockquote> The incident el...
The presence of a reflected wave is simply a consequence of Maxwell's equations and the boundary conditions imposed on their solutions. When a wave is incident upon the conducting interface, you are free to try any solution you like for what happens to the electromagnetic fields on either side of the interface. But tho...
https://physics.stackexchange.com
2,415,959
[ "https://math.stackexchange.com/questions/2415959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/477239/" ]
We know that if given sequences (xn), (yn), and (wn), if (xn) and (yn) converge to a and xn ≤ wn ≤ yn, then wn converges to a. Below is the proof Fix ε > 0. We need to find an N such that |wn − a| &lt; ε if n > N. Since (xn) → a and (yn) → a the definition of convergence ensures that there exists integers Nx and Ny so...
We can identify $V$ with $k^n$ where $k$ is the ground field. And then we can use $e_1=(1,0,\ldots,0),\ldots,e_n=(0,\ldots,0,1)$. Consider the map $T:V^n\to k$ defined as: $$T(v_1,\ldots,v_n)=\mbox{det}\begin{pmatrix}\alpha_{11} &amp; \cdots &amp; \alpha_{1n} \\ \alpha_{21} &amp; \cdots &amp; \alpha_{2n}\\ \vdots &amp...
$\textbf{Proposition}$. We have $v_1\wedge \ldots \wedge v_k=0$ if and only if the collection $v_1, v_2,\ldots, v_k$ is linearly dependent. $\textbf{Proof}$. Suppose $v_1, v_2,\ldots, v_k$ is linearly dependent. Without loss of generality, assume $v_1$ is in the span of $v_2,\ldots, v_k$. Then $$ v_1 = a_2 v_2 + \ld...
https://math.stackexchange.com
234,697
[ "https://softwareengineering.stackexchange.com/questions/234697", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/125451/" ]
I'm a self taught PHP programmer. Because I have no formal training in PHP, I often find my coding style to be considerably different than example code I find on the Internet. I've slowly started adapting some of the more common practices I find. However, before changing my habits, I try to find a good reason to use th...
I am no fan <em>at all</em> of embedding PHP inside HTML (like your first example). That just makes a huge mess of things and makes it difficult to separate the code from display. Some systems are set up to use PHP as a template engine so there's no avoiding it inside of views. But in systems I build from scratch, I...
The reason you see a lot of html templating is probably because of an "appearence driven" workflow. I.E. You start by coding up an HTML page that "looks right" then add in the dynamic php elements later. This works well if you also follow a classic Model View Controller pattern -- essentially you do all your business...
https://softwareengineering.stackexchange.com
92,947
[ "https://stats.stackexchange.com/questions/92947", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/34619/" ]
Suppose we have a linear regression model $Y_{it} = \beta_0 + \beta_1 X_{it} + \epsilon_{it}$, many times in literature it is assumed that $\epsilon_{it} \sim N(0,\sigma^2).$ This assumptions makes sense if we have a large data set due to the central limit theorem. My questions is that in certain situations I feel the ...
it seems that you're confused about relation of the sample size to CLT application. the distribution of $\epsilon_{it}$ has nothing to do with the sample size. I'm assuming that subscript $i$ refers to the subject (a person), and a subscript $t$ refers to the tume of othe observation. in a simple linear regression we ...
Depending on the nature of the response variable, I would suggest checking out either the GLM or Tobit models. GLM for when the response is non-normal (eg counts), and Tobit if it could be normal except it is getting censored (eg negative incomes get reported as zero).
https://stats.stackexchange.com
893,725
[ "https://math.stackexchange.com/questions/893725", "https://math.stackexchange.com", "https://math.stackexchange.com/users/168650/" ]
I want to find the relation of $p$ and $k$ such that the inequality $$ \|f(x)\|_{L^p(\mathbb R)} \le C_{&gt;0} \|(1+x^2)^{k/2} f(x)\|_{L^\infty(\mathbb R)} $$ holds when r.h.s $&lt;\infty$. Here $f$ is a real-valued function of $x\in\mathbb R$. It seems like $1\le p\le (\text{a function of }k)$.
Given $p$ and $k$, due to the Holder's inequality you can take $C$ as: $$ C=\left\|\frac{1}{(1+x^2)^{kp/2}}\right\|_q^{1/p},$$ or: $$ C=\left(\frac{\sqrt{\pi}\,\Gamma(\frac{kpq-1}{2})}{\Gamma(\frac{kpq}{2})}\right)^{\frac{1}{pq}}.$$
The answer is $kp&gt;1$. This yields the inequality with $$ C=\left(\int_\mathbb{R}\frac{dx}{(1+x^2)^{pk/2}}\right)^{1/p} $$
https://math.stackexchange.com
58,947
[ "https://mathoverflow.net/questions/58947", "https://mathoverflow.net", "https://mathoverflow.net/users/4721/" ]
Let $X$ be a non-compact holomorphic manifold of dimension $1$. Is there a compact Riemann surface $\bar{X}$ suc that $X$ is biholomorphic to an open subset of $\bar{X}$ ? <strong>Edit:</strong> To rule out the case where $X$ has infinite genus, perhaps one could add the hypothesis that the topological space $X^{\math...
You should probably check the following article: Migliorini, Luca, "On the compactification of Riemann surfaces". Here is the Mathscinet review about it: "In this paper the author studies some questions concerning the compactifications of Riemann surfaces. It is proved that if $X$ is an open connected Riemann surface th...
No. Take a surface of infinite genus.
https://mathoverflow.net
381,379
[ "https://mathoverflow.net/questions/381379", "https://mathoverflow.net", "https://mathoverflow.net/users/6101/" ]
Bernstein polynomials preserves nicely several global properties of the function to be approximated: if e.g. <span class="math-container">$f:[0,1]\to\mathbb R$</span> is non-negative, or monotone, or convex; or if it has, say, non-negative <span class="math-container">$17$</span>-th derivative, on <span class="math-co...
As noted by Paata Ivanishvili, if <span class="math-container">$f$</span> is concave on <span class="math-container">$[0,1]$</span>, then the Bernstein polynomials <span class="math-container">$B_n(f,p)$</span> are increasing in <span class="math-container">$n$</span>. Here is a probabilistic proof: Let <span class="m...
While nothing will beat the brilliant probabilistic proof given in Yuval Peres's answer, a more conventional argument goes as follows. Write <span class="math-container">$$a_{n,k} = \tbinom nk x^k (1-x)^{n-k} $$</span> and <span class="math-container">$$ p_{n,k} = \tfrac{k}{n} $$</span> Observe that <span class="math-c...
https://mathoverflow.net
1,454,334
[ "https://math.stackexchange.com/questions/1454334", "https://math.stackexchange.com", "https://math.stackexchange.com/users/274709/" ]
Let $R$ be a ring and $M$ and $R$-module. Let $M$ be finitely presented, i.e it is finitely generated with the surjective function $p: R^n \to M$ and $\ker(p)$ is also finitely generated. Consider the right $R$-module $\text{Hom}_R(M,R)$ and for an $R$-module $N$ consider the map $$a:\text{Hom}_R(M,R) \otimes_R N \to ...
First you want the find probability that at least one of the events happen, and then do $1$ minus that. Using the inclusion-exclusion formula: $$P(A \cup B \cup C) = P(A)+P(B)+P(C)-P(A \cap B) - P(A \cap C) - P(B\cap C)+P(A \cap B \cap C)$$ You have all these values.
<strong>hin</strong>t:$$P(A^c\cap B^c\cap C^c)= P((A\cup B\cup C)^c)= 1- P(A\cup B\cup C) = 1- P(A)-P(B)-P(C) + P(A\cap B) + P(A\cap C) + P(B\cap C) - P(A\cap B\cap C)=.....$$
https://math.stackexchange.com
155,703
[ "https://mathoverflow.net/questions/155703", "https://mathoverflow.net", "https://mathoverflow.net/users/17118/" ]
Let $p$ be a real number greater than $1$. It is well known (see Hall and Heyde's <em>Martingale limit theory and its applications</em>, Theorem 2.10) that there exists a constant $C_p$ such that if $(X_i)_{i=1}^n$ is a real valued martingale difference with respect to the filtration $(\mathcal F_i)_{i=1}^n$ (that is, ...
The result you want is mentioned in Remark 6 in Johnson, W. B.(1-TXAM); Schechtman, G.(IL-WEIZ) Martingale inequalities in rearrangement invariant function spaces. Israel J. Math. 64 (1988), no. 3, 267–275 (1989).
In any Banach lattice, a sufficient condition for the equivalence of the norm of a sum of elements and the norm of the square function is that the sequence be unconditional and the lattice has non trivial cotype. This is proved in many places, in particular in the introductory book of Albiac and Kalton and in volume 2...
https://mathoverflow.net
33,552
[ "https://electronics.stackexchange.com/questions/33552", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9605/" ]
I'm trying to build a simple temperature controller by using a thermistor and a potentiometer attached to a Schmidt trigger to control a relay. I realize that I have some serious design flaws in this circuit: <ol> <li>The power dissipated through the thermistor is to large (discovered after nicking my finger).</li> ...
<ul> <li>Main problem is 20r is far far far too low for thermistor value. Use of a 20k when cold thermistor is about right. Why use a 20r? (eg may be a special part etc).</li> <li>For temperature measurement thermistor self heating must be small - say 1 mW in a small package. You would need Vthermistor &lt;&lt; 1V if t...
You apparently have two problems:<ol> <li>Too much current thru the thermistor, which causes self-heating. Several solutions:<ol> <li>Use a higher resistance thermistor. There are many available with substantially higher value than 50 &Omega;. <li>Use a lower supply voltage. There are plenty of opamps with nearly...
https://electronics.stackexchange.com
2,475,298
[ "https://math.stackexchange.com/questions/2475298", "https://math.stackexchange.com", "https://math.stackexchange.com/users/410989/" ]
I just want to know if I went on the right direction. With induction Let $n=1$, then $2^1+1= 3$, which is divisible by $3$. Then show proof for $n+1.$ $2^n+1=3k$ So we get $2^{n+1}+1, \rightarrow 2^n+2+1, \rightarrow 3k+3= 3(k+1)$. Thus $2^n+1$ is divisible by $3$. Now if I wanted to show that $2^n+1$ is divisble ...
<ul> <li>$2^1+1=3$;</li> <li>$2^{2n+1}+1=3m\implies4(3m)-3=2^{2(n+1)+1}+1=3m'$.</li> </ul>
But it is not true, say $n=2$. :( If $n$ is odd then $2^n+1 = (2+1)(2^{n-1}-...+1) =3k$, then is true.
https://math.stackexchange.com
44,249
[ "https://mathoverflow.net/questions/44249", "https://mathoverflow.net", "https://mathoverflow.net/users/8157/" ]
I essentially understand (I think) how this ought to be done. Algebras in a monoidal 2-category $\mathcal{C}$, on the level of 0-cells and 1-cells, should appear as algebras in the 1-category truncation of $\mathcal{C}$. To lift these 1-level algebras we must of course weaken the usual diagrams and then describe (a zoo...
In a category $\mathscr{C}$ by finite limits you can have inside it all algebraic classical structures, for example about “Monoids” there is a category called “Monoid theory” $Mnd$ (see pioneristic works of Lawvrere) and the category of $\mathscr{C}$- monoids is the category of finite limits preserving $F: Mnd\to ...
You are looking for the notion of pseudomonoid. The canonical example of a pseudomonoid is a monoidal category (thought of as sitting in the cartesian monoidal 2-category of categories). You can work out the correct axioms for a pseudomonoid from the axioms for a monoidal category: we have a multiplication $m: \mathcal...
https://mathoverflow.net
214,886
[ "https://stats.stackexchange.com/questions/214886", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/29072/" ]
Suppose I'm doing regression with training, validation, and test sets. I can find RMSE and R squared (R^2, the coefficient of determination) from the output of my software (such as R's lm() function). My understanding is that the test RMSE (or MSE) is the measure of goodness of predicting the validation/test values, w...
The unadjusted $R^2$ is defined to be $$R^2 = 1 - \frac{\frac{1}{n}\sum_{i=1}^n (y_i - \hat y_i)^2}{\frac{1}{n}\sum_{i=1}^n (y_i - \bar y)^2} = 1 - \frac{MSE}{\frac{1}{n}TotSS}$$ Let's take the RMSE to be $$ RMSE = \sqrt{MSE}. $$ For a given data set $y_i$ and $\bar y$ are fixed, so as different models are considered...
Chaconne did an excellent job about defining the measures formulas and how they are very closely related from a math standpoint. If you benchmark or rank models using the same data set those two measures are interchangeable, meaning you will get the exact same ranking of your models whether you use R Square (ranking t...
https://stats.stackexchange.com
96,318
[ "https://dba.stackexchange.com/questions/96318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/15922/" ]
To save space on disk I want to compress some partitions of my tables: <pre><code>alter table TEST_TAB move partition TEST_TAB_2014 compress for all operations; </code></pre> I have also indexes on this partition.<br> Should I recreate indexes after compression, or is it not necessary?
This online compression is extra cost option. And moreover usually online compression has worse compression ratio, then offline one. It's because the 1st one work on row level while the latter one works on block level. So if you really want to spare some space in the database and your old data are mostly read-only you ...
You can rebuild the indexes after or use the <pre><code>WITH UPDATE INDEX </code></pre> when executing your statement. E.g. <pre><code>ALTER TABLE table_name MOVE COMPRESS FOR ALL OPERATIONS WITH UPDATE INDEX; </code></pre> <strong>Note.</strong> Your statement will not compress existing data: only future data ins...
https://dba.stackexchange.com
48,501
[ "https://mathoverflow.net/questions/48501", "https://mathoverflow.net", "https://mathoverflow.net/users/11363/" ]
(by $\{x\}$ I mean the fraction part of the real number $x$) If $a$ is an irrational number and $n$ is a integral number, what is the distribution of $\{na\}$? I'm asking for some continuous function $f:[0,1]\to\mathbb R$ such $\int_{\alpha}^{\beta}f(x)\;dx$ gives the probability that $\{na\}$ falls between $\alpha$ an...
The distribution is known to be uniform (a result due to Weyl, I believe). An excellent reference for this (and much else) is Dym and McKean's book on harmonic analysis.
For rational $a$ the answer (explicit bound for the error term) is given by Ostrowski's theorem (<em>Ostrowski A. Bemerkungen zur Theorie der Diophantischen Approximationen,-Abh. Math. Sem Hamburg, 1922, 1, s. 77-98</em>). It depends on the sum of partial quotients in continued fraction expansion of number $a$. For rea...
https://mathoverflow.net