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
66,460
[ "https://electronics.stackexchange.com/questions/66460", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/19145/" ]
I am using a dsPIC33E MUC to interface an UART camera(VGA) at 115.2Kbps. The purpose is to save an image to a SD card. The program I wrote works well except that it's inside a loop checking if the buffer(512 bytes buffer is for one sector) is full or not. If the buffer is full, it will be written to a SD card. I am w...
<blockquote> Buffer = sector RAM buffer. UART buffer = UART internal buffer. </blockquote> "Just a matter of programming" :-) I've not looked at the fine detail of your method or specific device resources - the following general solution applies as long as the available RAM is not crucially limited: Arrival ra...
Well, code looks almost ok. But, while storing the buffer to SD card, if new byte arrived, you will have a problem. To be on a safe side, you could create a ring buffer of larger size of needed buffer and flush it every xy values. <pre><code>int head = 0, tail = 0, cnt = 0; bool overflow = false; #define BUFFSIZE 1024...
https://electronics.stackexchange.com
26,089
[ "https://mechanics.stackexchange.com/questions/26089", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/10471/" ]
'04 Cavalier, 120K mi. We've had it for 6 years, driven every winter. Now, this winter, we occasionally get an ABS fault. This probably always occurs under slipping conditions. When it happens, the 'Low Trak' light also comes on. So, it would be a 'Yeah, so?' thing, except it didn't happen before, and, I don't see...
It appears that as soon as the vehicle detects a wheel has locked up, the ABS goes into failure mode. This would suggest to me that you may have a fault in the abs module. If it was a wheel bearing or sensor that was at fault, I would expect occasional false activation of the ABS and also normal activation where the ...
In my experience intermittent ABS issues are not solely but often caused by a worn wheel bearing. This is speculation but it may be that the spinning wheel is effecting the wheel bearing. The worn bearing allows the hub to move enough to miss a sensor pulse and light the fault light.
https://mechanics.stackexchange.com
10,227
[ "https://scicomp.stackexchange.com/questions/10227", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/6693/" ]
I have the same single thread problem, which is something like a simple <pre><code>#include&lt;stdlib.h&gt; #include&lt;iostream&gt; #include&lt;stdio.h&gt; #include&lt;time.h&gt; //#include&lt;ctime.h&gt; int main(){ clock_t start=clock(); for (int i=0;i&lt;100 000 000; i++){ //do something here } double duration ...
There are so many variables that play into the speed with which a program runs that it is impossible to tell from just your description. For example: <ul> <li>Did other programs run at the same time?</li> <li>What is the clock speed of your processor?</li> <li>How was the program compiled and which processor was it op...
The faster CPU may be more than made up for by the heavier operating system. If you wanted a true comparison, you'd run the test with the same operating system on both computers. Moreover, depending on what you're actually doing inside that loop, the program may spend more time on memory reads/writes than floating poi...
https://scicomp.stackexchange.com
122,172
[ "https://physics.stackexchange.com/questions/122172", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/35591/" ]
In one of my homework questions, I was given the following setup. I was asked to determine if the induced current flows from X to Y, or from Y to X. <img src="https://i.stack.imgur.com/Ie7uM.jpg" alt="enter image description here"> From Lenz's Law I know that the current in the tube flows in the direction opposite to...
Faraday's law fails here. Let's go back to basics. We use the Lorentz force. And what is happening is as the rod rotates, the charges in it rotate too. However, the rod is neutral so there is no net current flowing. Now field of the bar magnet is towards left in the wire, the lorentz force applies on the protons and e...
The Lorentz force appears to supply the solution. It acts in the direction q${\bf v} \times {\bf B}$. Recall though that conventional current acts in the opposite direction to electron flow and that electrons are negatively charged! And Faraday's law doesn't fail, just hard to apply. If you construct a long line integ...
https://physics.stackexchange.com
2,557,581
[ "https://math.stackexchange.com/questions/2557581", "https://math.stackexchange.com", "https://math.stackexchange.com/users/498214/" ]
Let G be a group and recall that the non-negative powers of an element x in G are defined as follows: $x^{0} = e, x^{1} = x, $and $x^{n+1} = x^{n}x$ for n > 0. Now, let x and y be elements in G and, using induction, show that $ (x y x^{-1}) ^{n} = x y^{n} x^{-1}$ holds for $ n &gt; 0.$ can someone help me start this p...
Base case: when $n=1$, we have of course $$(xyx^{-1})=xyx^{-1},$$ which is true. For the inductive step, assume it's true for $n=k$, that is $$(xyx^{-1})^k=xy^kx^{-1},$$ and let's see what happens for when $n=k+1$. We have $$(xyx^{-1})^{k+1}=xyx^{-1}(xyx^{-1})^k=xyx^{-1}xy^kx^{-1}=xyy^kx^{-1}=xy^{k+1}x^{-1},$$ which is...
Hint: $$(xyx^{-1})^2=(xyx^{-1})(xyx^{-1})$$
https://math.stackexchange.com
21,341
[ "https://quant.stackexchange.com/questions/21341", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/7117/" ]
When we say Bond prices are martingale under T-Forward measure, do we mean their Clean Price is a martingale or is it their dirty price. I guess it should be dirty price, as clean price is just a convenient representation while dirty price is the actual price of the bond. But it will be great if somebody could please...
Your question is not really clear. Why do you need the bond price to be a martingale under the $T$-forward measure? The $T$-forward measure is used mainly for modelling the LIBOR rate. Note that, the bond price itself is not a martingale; instead, the bond price relative to the $T$-maturity zero coupon bond price is a ...
Gordon has the correct answer. When you talk about a certain measure, it is associated with a certain numeraire. In this case, it is the zero coupon bond that matures at T. So the bond price is denoted in terms of this numeraire. To price a bond with coupon, you should price it as two parts: (a) the principal to be rep...
https://quant.stackexchange.com
27,134
[ "https://softwareengineering.stackexchange.com/questions/27134", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/2210/" ]
As the Internet is pretty much ubiquitous, can we as developers assume that all users have Internet access? Now I don't mean that the code is written in such a way that if there is no connection then the whole program crashes due to lack of error code. What I mean is, can programs today be developed under the assumptio...
Bad idea, for three reasons. First off, even though everyone has Internet access these days, which is basically true, they don't always have it available at all times. My primary machine is a laptop, and it's connected a lot of the time, but not when I'm on the bus, for example. Second, and sort of related to the fi...
<ul> <li>Not all users have usable internet access. For example, outside of small and medium cities (and their suburbs) and university towns, the US has almost no broadband infrastructure. Small town and rural users are generally on satellite or dialup (and their phone lines aren't always the best, so dialup is often...
https://softwareengineering.stackexchange.com
126,495
[ "https://dba.stackexchange.com/questions/126495", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/84874/" ]
I have a piece of <code>SQL</code> that creates a <code>TABLE</code> form a <code>SELECT</code> statement in PostgreSQL ; I want to add constraints to the table so that for example a column cannot be <code>null</code>. I cannot find valid SQL for this in the Postgres Documentation, so it seems it is not possible. Wha...
A variation on @a_horse_with_no_name's answer would be to first create the table with the constraint and then insert into the table, still using a transaction, so everything rolls back in case of constraint violations. This is something you should consider if the rows to be inserted are a lot (i.e. in the hundreds of t...
You need to do that with two statements: <pre><code>create table new_table as select ....; alter table new_table add constraint ...; </code></pre> Make sure you run this in a single transaction (e.g. by turning OFF auto commit in your SQL client, or wrapping that with a <code>begin transaction ...</code> If the <c...
https://dba.stackexchange.com
308,928
[ "https://softwareengineering.stackexchange.com/questions/308928", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/74674/" ]
Is there a design pattern that would allow a class from a hierarchy to 'subscribe to' concrete methods? For example, say you have an abstract base class that requires the implementation of a method. <pre><code>Public MustInherit Class Rule ' Common properties shared between sub classes Public MustOverride Fun...
I do not know the pattern name (but it's probably using the Reflection pattern, see below), but many Web frameworks natively implement what your are trying to do here. For example if you look at Ruby on Rails, ActiveRecord and Mongoid are the components used to represent a Database entity, and programmers usually impl...
This sounds like combination of strategy and composite patterns. Individual validators are strategy pattern. Then, composite is used to invoke multiple strategies as single one.
https://softwareengineering.stackexchange.com
464,208
[ "https://physics.stackexchange.com/questions/464208", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/220554/" ]
In a fluid mechanics course I found that an incompressible fluid flow means literally: <span class="math-container">$$\rho = \text{constant} \quad \forall \vec r,\, \forall t$$</span> Where <span class="math-container">$\vec r = (x, y, z)$</span> In my understanding, this means <strong>literally</strong> that the flu...
The definition of incompressible is often unclear and changes depending on which community uses it. So let's look at some common definitions: <strong>Constant density</strong> This means the density is constant everywhere in space and time. So: <span class="math-container">$$ \frac{D\rho}{Dt} = \frac{\partial \rho}{\...
The general definition of an <em>incompressible flow</em> is <span class="math-container">$\frac{D\rho }{Dt}=0$</span> : the density of a fluid particle does not change along its path. For example, if <span class="math-container">$\overrightarrow{v}=v(x)\overrightarrow{{{e}_{x}}}$</span> and <span class="math-containe...
https://physics.stackexchange.com
46
[ "https://mathoverflow.net/questions/46", "https://mathoverflow.net", "https://mathoverflow.net/users/1/" ]
What is the universal property of normalization? I'm looking for an answer something like <blockquote> If X is a scheme and Y&rarr;X is its normalization, then the morphism Y&rarr;X has property P and any other morphism Z&rarr;X with property P factors uniquely through Y. </blockquote>
I've realized that my answer is wrong. Here's the right answer: if $Z$ is a normal scheme and $f: Z \to X$ is a morphism such that each associated point of $Z$ maps to an associated point of $X$, then $f$ factors through $n$. A counterexample that shows why what I said previously doesn't work: let $f$ be the inclusio...
Normalization is right adjoint to the inclusion functor from the category of normal schemes into the category of reduced schemes. In other words, if $n:Y\rightarrow X$ is the normalization of $X$ and $f:Z\rightarrow X$ is any morphism where $Z$ is a normal scheme, then $f$ factors uniquely through $n$.
https://mathoverflow.net
416,366
[ "https://physics.stackexchange.com/questions/416366", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/200422/" ]
I am trying to teach myself Electrodynamics by following Griffiths' book. This is probably what's considered a "homework question", but as I don't have an instructor to ask for help, I'm hoping someone here can do so. If this is really not permitted here, please close this with my apologies Griffiths Introduction to...
You went wrong in cancelling out the $r^2$. This works only if $r\neq 0$. But at $r=0$, the interesting stuff is happening, as the field diverges and is not well defined there. Taking the divergence will actually result in a term with a delta spike, like derived in what you showed.
This is the equivalent of the Coulomb potential for massive electromagnetism. Gauss's law takes a different form for this case, something like $\Delta V + m^2 V = \rho / \epsilon_0$. (No guarantees on the signs).
https://physics.stackexchange.com
459,194
[ "https://electronics.stackexchange.com/questions/459194", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/180997/" ]
I'm testing the <strong>Seeeduino v4.2</strong> board with the <strong>ADCInOutSerial</strong> code in the <strong>Arduino IDE</strong> and the lowest voltage the board can read is <strong>18&nbsp;mV</strong>, showing an equivalent ADC of 4 on the serial monitor. The chip that the board uses is the <strong>ATmega328P</...
See data sheet section 28.8 ADC Characteristics: typical offset error 2 LSB and typical gain error 2 LSB. Absolute accuracy (INL, DNL, gain error, offset error, etc) could be typically 4.5 LSB under some operating conditions. These are Typical, not Min/Max guaranteed specs. So yes it’s pretty much normal behavior. You ...
Aside from the theoretical and worst-case chip specs mentioned elsewhere, there's also a possible source of error in the voltage drops across copper traces. Grounds are not equipotential at mV level with currents in the mA level or higher flowing through typical 1oz copper, so you could be reading that voltage drop. ...
https://electronics.stackexchange.com
18,939
[ "https://chemistry.stackexchange.com/questions/18939", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/1888/" ]
<blockquote> <strong>Question</strong><br> If a metallic oxide has $40\,\%$ oxygen, find the equivalent weight of the metal. </blockquote> This amounts to finding the atomic weight of the metal and the charge on the cation (in effect identifying the metal itself). I didn't know how to do this, so I looked up t...
Your question is a good one, and no, you can't assume that the metal is $\ce{MO}$ necessarily. However, you can find the equivalent weight of the metal without <em>any</em> assumptions about its formula. The equivalent weight of a metal combining with oxygen is the mass that reacts with 8g of oxygen. We know that ...
40% O2 So, 40/16 = 2.5 60% M So, 60/24 (given for metal M) =2.5 Therefore, metal M: oxygen= 2.5: 2.5 =1:1 So, the formula is MO
https://chemistry.stackexchange.com
24,657
[ "https://cs.stackexchange.com/questions/24657", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/17363/" ]
We are given a directed graph, the number of vertices and edges. We need to decide, whether there is a [starting] vertex where we can get started and visit all the vertices. You can revisit vertices, but can't "use" edges twice or more time. All this in linear time. I was thinking about DFS - if the number of vertices...
Actually, you can use DFS to solve this problem. Let's denote the set of all roots in graph $G$ as $R_G$ <strong>Lemma:</strong> for every run of DFS, the last DFS tree contains $R_G$. Let $ T_1, T_2, ..., T_t $ be the DFS trees found in a DFS run, such that $T_i$ is the ith tree that was discovered. Assume that the...
The first question you need to ask yourself, is when does it happen that there is <em>no</em> such vertex. For undirected graphs the answer is easy: such a vertex exists if and only if the graph is <em>connected</em>. DFS/BFS allow us to decompose the graph into connected components, and in particular we can find out w...
https://cs.stackexchange.com
382,774
[ "https://mathoverflow.net/questions/382774", "https://mathoverflow.net", "https://mathoverflow.net/users/173383/" ]
Let <span class="math-container">$(L_k)_{k\geq 0}$</span> be the Laguerre polynomials. These polynmials are orthogonal with respect to the inner product: <span class="math-container">$$\langle f,g\rangle = \int_0^\infty f(x)g(x)\mathrm e^{-x}\,\mathrm dx.$$</span> Hence, the functions <span class="math-container">$\psi...
OK, here is the argument. We want to show that the partial integrals of <span class="math-container">$u(x)=L_n(x)e^{-x/2}$</span> are not (much) larger in the absolute value than the full integral. We'll just use the differential equation <span class="math-container">$$ xL_n''+(1-x)L_n+nL_n=0\,. $$</span> Plugging <spa...
There is a simple proof of your assertion that <span class="math-container">$\Psi_k(x)$</span> tends to <span class="math-container">$(-1)^k\sqrt{2}$</span>. One has <span class="math-container">$$ \Psi_k(x)=\sqrt{2}\int_0^xL_k(2t)e^{-t}dt=\sqrt{2}\sum_{j=0}^k{k \choose j}\frac{1}{j!}(-2)^j\int_0^x t^je^{-t}dt. $$</spa...
https://mathoverflow.net
232,630
[ "https://dba.stackexchange.com/questions/232630", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/175098/" ]
I only want to update the comment if a description for the event is found in the TagDescLookup Table. If the Tag isn’t in the Lookup table then don’t change the existing Value for the comment column. The current trigger will update the comment column with the correct value unless the value isn't found in the lookup t...
I added the a second where condition (WHERE E.ConditionName NOT like '%log%') to exclude the items I didn't want updated. Tested and works well so far... Thanks for the other suggestions and help <pre><code> ( SELECT [Description] FROM TagDescLookup WHERE Tag = I.NameOfParameter AND Description...
You could change the trigger to only update when the <code>NameOfParameter</code> matches the <code>Tag</code> from <code>TagDescLookup</code> <pre><code>SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER [dbo].[TagDescTrigger] ON [dbo].[EventLog] AFTER INSERT AS BEGIN SET NOCOU...
https://dba.stackexchange.com
436,391
[ "https://mathoverflow.net/questions/436391", "https://mathoverflow.net", "https://mathoverflow.net/users/119875/" ]
I wonder if one can write the following matrix in the form <span class="math-container">$A = \begin{pmatrix} 0 &amp; B \\ B^* &amp; 0 \end{pmatrix}.$</span> The matrix I have is of the form <span class="math-container">$$ C = \begin{pmatrix} 0 &amp; a &amp; b &amp; 0 &amp; 0 &amp; 0 \\ \bar a &amp; 0 &amp; 0 &amp;b &am...
The general recipe to accomplish the block off-diagonalization is as follows. The matrix <span class="math-container">$C$</span> has eigenvalues <span class="math-container">$\pm\lambda_1,\pm\lambda_2,\ldots \pm\lambda_3$</span>. Define <span class="math-container">$\Lambda=\text{diag}\,(\lambda_1,\lambda_2,\lambda_3)$...
The <span class="math-container">$C$</span> is a particular block matrix, <span class="math-container">$C\in \mathbb{M}_3(\mathbb{M}_2(\mathbb{C}))$</span>. For <span class="math-container">$V$</span> unitary let <span class="math-container">$V\begin{pmatrix}0&amp;a\\\bar a&amp;0\end{pmatrix}V^*=\begin{pmatrix}s&amp;0\...
https://mathoverflow.net
146,518
[ "https://physics.stackexchange.com/questions/146518", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/64266/" ]
There are two similar and hypothetical robots that move with wheels powered by motors, Robot A and Robot B. Robot A has a gear ratio of 3:1 (The gear connected to the motor is three times larger than the gear connected to the wheel), while Robot B has a gear ratio of 1:3. A spring balance is connected to each of the...
<blockquote> However, Robot A moves at a speed 9 times faster than Robot B. </blockquote> Are you stating this as a given, or do you presume it arises from the consequence of the gearing? If so, it is incorrect because an engine does not deliver a constant speed, but instead a maximum power. The higher geared robo...
The force of the robots will determine the winner. If you think of the two robots as vectors when they are ramming together sumo style it is essentially vector addition. Since Robot B has more force the net force vector will be in the direction of Robot B's travel and thus, Robot B wins.
https://physics.stackexchange.com
4,971
[ "https://mathoverflow.net/questions/4971", "https://mathoverflow.net", "https://mathoverflow.net/users/1672/" ]
Let $F$ be a free group, and $w$ an element of $F$. In any group $G$, a $w$-word is the image of $w$ or $w^{-1}$ under a homomorphism from $F$ to $G$. The subgroup of $G$ generated by $w$-words is denoted $G(w)$. For any $g \in G(w)$, the $w$-length of $g$, denoted $l(g|w)$, is the minimum number of $w$-words in $G$ w...
Here are some weak observations that don't quite answer any of your questions. Let $g$ be a positive integer, and consider the free group $F_{2g}$ generated by $a_k$ and $b_k$ for $k = 1$ to $g$. Consider the word: $$w_g = [a_1,b_1][a_2,b_2][a_3,b_3] \ldots [a_g,b_g].$$ Suppose that $\lambda_g = sl(w_g,w_g)$. I claim...
In case any one is still thinking about this question, it turns out one can say a lot. For example, $sl(w|w)=1/2$ whenever $w$ is a word of the form $[a,b^n]$ (and several other examples), one has $2/3 \le sl(w|w) \le 4/5$ when $w=[a,b]^2$, and if $\gamma_n$ is the iterated commutator $[x_1,[x_2,\cdots[x_{n-1},x_n]\cdo...
https://mathoverflow.net
327,694
[ "https://electronics.stackexchange.com/questions/327694", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/147125/" ]
Typical CPU instruction set: the CPU has several functional units, and when each instruction is read, some bits specify which functional unit is to be activated, while others specify the details of the operation. Today's CPUs tend to spend some of their large transistor budgets on out of order execution, where they ha...
Go read the book, "Bulldog: A Compiler for VLIW Architectures," by John R. Ellis. It is absolutely superb. As you might suspect, one of the huge problems with VLIW is about the compilers themselves. How do you get compiler authors (I've been one of them for a short period of my life) to decide to add in all the needed...
Don't underestimate the importance of cache... Cache memory is much faster and much more expensive per byte compared to SDRAM. When a branch prediction fails, you'll get a pipeline stall, but if the instruction being branched to is in cache, it's a small loss. If it is in SDRAM though... an it wasn't prefetched... it'...
https://electronics.stackexchange.com
256,903
[ "https://electronics.stackexchange.com/questions/256903", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/122577/" ]
I am simulating a BLDC model and one of the parameters I need to enter in my simulation is Viscose Damping (in units of [N.m.s]). I am not familiar with this term, and after some research, I came across a formula that defines it as the ratio of a) the product of the constant torque and back emf constant, and b) the mo...
<blockquote> 1) what is viscose damping - in intuitive terms? What is it dependent on, and how does it affect the current consumed by the motor? </blockquote> Viscose damping, aka rotation damping is the mechanical rotational equivalent of resistance. It restricts rotational freedom. The bearings, additional mag...
Ideally, for viscous damping the force (torque in your case) is a constant times the (angular in your case) velocity. You can calculate the coefficient from other motor parameters. To find the viscous damping torque at a given RPM you must convert from RPM to radians/second so a factor of \$\frac{2\pi}{60}\$ (about...
https://electronics.stackexchange.com
59,470
[ "https://mathoverflow.net/questions/59470", "https://mathoverflow.net", "https://mathoverflow.net/users/1363/" ]
If $f:X \rightarrow S$ is locally of finite type, there is unique largest open subset $U$ in $X$ such that $f|U$ is etale. Suppose $f$ is finite and $U$ is nonempty. Is it true that $f|U$ is finite etale? Thanks in advance.
No, because $U\to S$ finite implies that $U\to X$ is finite (at least when $X\to S$ is separated), so $U$ would be closed in $X$. If you want an example, take a non-trivial morphism from a projective smooth curve $X$ to the projective line over $\mathbb C$. You might ask whether $U\to f(U)$ (if the latter is open i...
No. If $f^{-1}(f(U))\neq U$, then $f|_U$ is not proper and hence not finite. This can easily happen if there are unramified points mapping to a branch point. (In other words if there are unramified and ramified points mapping to the same image).
https://mathoverflow.net
178,352
[ "https://softwareengineering.stackexchange.com/questions/178352", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/51345/" ]
I find myself pondering over this question from time to time, again and again. I want to do things the right way: to write clean, understandable and correct code that is easy to maintain. However, what I end up doing is writing patch upon a patch; just because there is no time, clients are waiting, a bug should be fixe...
Actually, this is a very difficult question because there is no absolutely right answer. In our organization we have been putting better processes in place to produce better code. We updated our coding standards to reflect how we, as a group, write code, and we have instituted a very strong test/refactor/design/code lo...
One thing I've realized in my career is that there is <strong>always</strong> time to do it right. Yeah, your manager might be pushing. The client might be pissed. But they don't know how long things take to do. If you (your dev team) don't do it, it's not getting done; you hold all of the leverage. Because you know w...
https://softwareengineering.stackexchange.com
1,009,110
[ "https://math.stackexchange.com/questions/1009110", "https://math.stackexchange.com", "https://math.stackexchange.com/users/190384/" ]
I'm trying to find oblique asmyptotes for the function $\sqrt{x^2+x+1}$ and I manage to caclculate that the coefficient for the asymptote when x approaches infinity is 1. But when i try to find the m-value for my oblique asymptote by taking the limit of: $$ \lim_{x\to\infty}\sqrt{x^2+x+1}-x=m $$ I'm stuck. How d...
Your last expression simplifies to $${x+1\over\sqrt{x^2+x+1}}$$ There are now various ways to proceed. One is to divide numerator and denominator by $x$, bringing the $x$ in the denominator inside as an $x^2$: $${x+1\over\sqrt{x^2+x+1}}={1+{1\over x}\over\sqrt{1+{1\over x}+{1\over x^2}}}$$ Do you see where this is...
Don't do the difference, divide! $\lim_{x-&gt;\infty}\dfrac{\sqrt{x^2+x+1}}{x}=1$ very easily For $\dfrac{\sqrt{x^2+x+1}}{x}=\dfrac{\sqrt{x^2+x+1}}{\sqrt{x^2}}=\sqrt{1+\dfrac{1}{x}+\dfrac{1}{x²}}$ EDIT: It is not over, of course, since the asymptote does not necessarily goes through the origin... You have to make th...
https://math.stackexchange.com
278,579
[ "https://softwareengineering.stackexchange.com/questions/278579", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/173920/" ]
If a library licensed under MIT licence is copied and extended on, should new additions contain the copyright notice as well? Considering that the additions may at some point overwhelm the initial library, could the initial MIT licence ever change to some other licence?
In C# it is trivial to provide optional dependency injection without coupling yourself to your dependency too tightly: <pre><code>public class SomeOtherClass { private readonly ISomeClass _someClass; public SomeOtherClass(ISomeClass dependency = null) { _someClass = dependency ?? new SomeClass(); ...
There's a development principle along the lines of DRY and SOLID called YAGNI that is designed to help streamline your development efforts in getting things done and not getting paralysed with indecision over what to do. If you later find that you need to enhance your class, then you will. YAGNI says not to worry so m...
https://softwareengineering.stackexchange.com
746,783
[ "https://physics.stackexchange.com/questions/746783", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/356441/" ]
Imagine a rocket of mass <strong>m</strong> that is at a constant altitude. Gas velocity <strong>v</strong>. It is necessary to find the power <strong>P</strong> of the engine. I have a problem: to find the power, you need to divide the work by the time, but the work is zero, since the displacement of the rocket is ...
The rocket is subjected to two forces : the gravity <span class="math-container">$\vec{F}_g = -mg\,\hat{e}_z$</span>, where <span class="math-container">$\hat{e}_z$</span> is the vertical unit vector pointing upwards, and the motor traction <span class="math-container">$\vec{F} = F\,\hat{e}_z$</span>. As the rocket doe...
It is probably a &quot;trick question&quot;, with obvious but non-intuitive answer. When the rocket stays at the same position, mechanical power is indeed zero. There may be another answer if the question is about fuel energy (as opposed to mechanical work) released per unit time. But to get that, we need to know more ...
https://physics.stackexchange.com
82,429
[ "https://physics.stackexchange.com/questions/82429", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31775/" ]
In lab, my TA charged a large circular parallel plate capacitor to some voltage. She then disconnected the power supply and used a electrometer to read the voltage (about 10V). She then pulled the plates apart and to my surprise, I saw that the voltage increased with distance. Her explanation was that the work she did...
Toby, I agree that this is really counter intuitive and I was also quite surprised as well when I first saw this very demonstration. I am an undergraduate TA and this is how I explained it in my lab section. I hope this helps. I see two parts to a full explanation: (1) Why is the electric field constant and (2) why doe...
Here is my understanding: When you increase the distance between electrodes - capacitance drops, but stored charge remains the same, as electrons have nowhere to go. Same charge in lower capacitance means higher voltage potential. Without that part of stored energy would just vanish :-)
https://physics.stackexchange.com
285,191
[ "https://dba.stackexchange.com/questions/285191", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/198065/" ]
I have query that uses a subquery (<code>select min/max(date) from stage.stage_net_subscription_010_filter_and_net_pds</code>) to find min and max dates of a table. It seems that the subqueries are repeated very often. <ol> <li>Is there a way to rewrite the query <em>without CTEs</em> such that the subqueries do not ge...
You can use a lateral cross join, although I don't understand why you want to avoid a CTE: <pre><code>SELECT dim_date.date AS &quot;date&quot;, stage_net_subscription_020_classes.client_id AS client_id, stage_net_subscription_020_classes.product_id AS product_id FROM star.dim_date dim_date CROSS JOIN s...
<pre><code>WITH cte AS (select MIN(date) mindate , MAX(date) maxdate from stage.stage_net_subscription_010_filter_and_net_pds) SELECT dim_date.date AS date , stage_net_subscription_020_classes.client_id AS client_id , stage_net_subscription_020_classes.product_id AS product_id F...
https://dba.stackexchange.com
443,204
[ "https://softwareengineering.stackexchange.com/questions/443204", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/425201/" ]
This problem is quite &quot;a classic&quot;, but I can't find a good solution to it. I am using <code>CreateFile</code> to open a file. Sometimes I would want it to be read-only, sometimes write-only and sometimes I would want the same file to support both read and write. Of course I would like to follow RAII principle...
<blockquote> If I define <code>ReadFile</code> and <code>WriteFile</code> that inherit from File, how would I define <code>ReadWriteFile</code>? </blockquote> Exactly the same: as a direct derivation from <code>File</code>. And your next question will be probably how to avoid the code duplication. This can be achieved ...
<blockquote> I think it is pretty evident that a basic <code>File</code> class will be necessary. <code>File</code> will call <code>CreateFile</code> and hold the handle returned from it. How should I proceed from there? </blockquote> Taking some inspiration from <code>fstream</code>, I would add some very basic file o...
https://softwareengineering.stackexchange.com
133,288
[ "https://physics.stackexchange.com/questions/133288", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/51979/" ]
The cross product $\vec{a} \times \vec{b}$ can be written as the determinant of the matrix: $$\left| \begin{matrix} \vec{i} &amp; \vec{j} &amp; \vec{k} \\ a_i &amp; a_j &amp; a_k \\ b_i &amp; b_j &amp; b_k \end{matrix}\right|$$ Is there any physical significance to this matrix, or is it just some mathematical trick?
<blockquote> Is there any physical significance to this matrix </blockquote> The physical (geometric) relevance to the matrix $$\left| \begin{matrix} \vec{i} &amp; \vec{j} &amp; \vec{k} \\ a_i &amp; a_j &amp; a_k \\ b_i &amp; b_j &amp; b_k \end{matrix}\right|$$ with regard to the cross product $\vec{a} \times \ve...
The cross product is defined to be the vector which is perpendicular to both vectors, so for instance the force exerted on a rod moving in a magnetic field is perpendicular to both its velocity and the field, hence is given by their cross product. Now if you work out which vector is perpendicular to both vectors you...
https://physics.stackexchange.com
51,033
[ "https://stats.stackexchange.com/questions/51033", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/21339/" ]
I am testing for difference several different groups, i.e. <blockquote> <strong>A</strong> vs <strong>B</strong> <strong>C</strong> vs <strong>D</strong> </blockquote> Is it okay to run multiple t-test, one for each couple, since no group is tested twice? Thank you <em>very very</em> much, [EDIT] A, B, C, D...
I tried simulating something slightly different: <ol> <li>Assume sellers price items uniformly in the right below hundred mark; i.e. 91-99</li> <li>Assume integer prices </li> <li>Every project has 100 items and project value is a sum of all those 100 items. </li> </ol> The distribution of the last two digits seems n...
Could you look at other corpuses of project values as a benchmark? I bet the US-gov, Worldbank, UN etc. must have some public project values information.
https://stats.stackexchange.com
235,425
[ "https://softwareengineering.stackexchange.com/questions/235425", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/73575/" ]
I am trying to improve performance of my ASP.net Web Api by adding a data cache but I am not sure how exactly to go about it as it seems to be more complex than most caching scenarios. An example is I have a table of Locations and an api to retrieve locations via search, for an autocomplete. <pre><code>/api/location/L...
Since you want to follow best practices then using search engine like ElasticSearch or Solr. Not only they are fast and manage their own caches, they're also better equipped with different kinds of search methods. Using/managing your own cache is a good idea too but I'd leave that as an optimisation rather than soluti...
If you're building the SQL statement as a string, you can take a hash of that and use it as a key in a distributed cache. Depending on how many variations there are and how much memory you have, you might want to include a "time to live" or a "least used algorithm" to keep the amount of memory within limits. However ...
https://softwareengineering.stackexchange.com
152,470
[ "https://mathoverflow.net/questions/152470", "https://mathoverflow.net", "https://mathoverflow.net/users/1516/" ]
It is known that minimality does not imply unique ergodicity (Furstenberg example). I ask whether the implication holds in following particular situation: <blockquote> Suppose $X$ is a compact space, $f:X \to X$ is a minimal and uniquely ergodic homeomorphism. Suppose $p: Y \to X$ is a <strong>2-to-1 covering map</s...
I think there is a counter-example. We'll build a subshift on 2 symbols, 0 and 1. Given a word $W$ with symbols 0 and 1, $\overline W$ will denote the word with all symbols flipped. Let $W_0=1$ and $W_{n+1}=W_n^{2^n}\overline{W_n}W_n^{2^n}$. The orbit closure of $W_\infty$ gives a minimal, but not uniquely ergodic ...
To put Anthony's example in a more general context, if you are familiar with Vershik maps on Bratteli diagrams and dimension groups, then you can find lots of minimal uniquely ergodic actions on Cantor sets that come from the $Z_2$-orbit space of a minimal action action with two ergodic probability measures, with an in...
https://mathoverflow.net
201,516
[ "https://softwareengineering.stackexchange.com/questions/201516", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/55890/" ]
I am coding a system where I have objects which represent a set of resources. These resources are identifiable (they have an ID). There can only be one resource with the same ID, and so multiple objects with the same ID really should have the same values.<br> My problem is with the <strong>equality</strong> concept in ...
One thing you can do is to look at how ORM frameworks, like Hibernate handle these situations. I believe by default 'domain objects' (objects that can be persisted) get an id as well as an <code>equals()</code> and <code>hashCode()</code> (that use the provided id for equivalence) by default. They do suggest however ...
You should actually go one step further and consider it an error if there are two distinct objects that both represent the resource with ID X. This means that if you have two references to the object for ID X, then the two references should compare equal with the <code>==</code> operator (which compares reference equal...
https://softwareengineering.stackexchange.com
1,695,248
[ "https://math.stackexchange.com/questions/1695248", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66158/" ]
This is problem 16, Section 6.B from Linear Algebra Done Right, 3rd Edition. Suppose the field is $\mathbb{C}$, $V$ is finite-dimensional, $T \in \mathcal{L}(V)$, all the eigenvalues of $T$ have absolute value less than 1, and $\epsilon &gt; 0$. Show that there exists a positive integer $m$ such that $||T^m v|| &lt;...
Here is what I had in mind when I added that exercise to the third edition of <em>Linear Algebra Done Right</em>: By Schur's Theorem (which is in the same section as this exercise), there is an orthonormal basis of $V$ such that $T$ has an upper-triangular matrix $A$ with respect to that basis. Orthonormality is impor...
I am going to suppose you are allowed to use the direct sum decomposition of the vector space into generalised eigenspaces for$~T$, which I believe is something Axler treats fairly early. The norm of a vector cannot exceed the sum of the norms of its components along this direct sum decomposition, so it will suffice t...
https://math.stackexchange.com
296,889
[ "https://physics.stackexchange.com/questions/296889", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/136225/" ]
When a pot of water starts boiling, does that mean that the top surface of the water was heated <em>repeatedly</em> by <em>convection</em>? Meaning that it was initially at the bottom of the pot, then it rose up to the top when heated, then circulated back down and then up again until it reached 100C? (Is that what act...
To answer your first question, depending on the circumstance around the water, yes convection is what heats the pot. To your second question: Hot objects rise because of what 'heat' is. How hot object is depends on how fast the molecules/atoms which make it up are moving, with the hottest objects having the most movem...
The idea that water heated at the bottom of a pot rises to the top and returns to the bottom by convection is correct. The convection happens because hot water has a lower density and thus rises up to the surface where it cools and sinks down to the bottom again. When water starts boiling there is the additional effect...
https://physics.stackexchange.com
58,271
[ "https://dba.stackexchange.com/questions/58271", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2583/" ]
I have a Postgresql 9.2 database. Two users are created on this database. When I perform the following query as superuser, I can see everything. <pre><code>select * from pg_stat_activity </code></pre> However, is it possible to acheive the same result without being connected as superuser ? Which privilege/role shoul...
At this point, there's no right to grant, it's hardcoded to superuser. That's been discussed on the mailing list lately, and may change in 9.5 if someone finds the time to work on it. As a workaround, you can create a <code>SECURITY DEFINER</code> function that is owned by the superuser, and runs the query you want. T...
Starting with PostgreSQL 10 you can grant the role <code>pg_read_all_stats</code> in order to achieve the desired result.
https://dba.stackexchange.com
226,229
[ "https://softwareengineering.stackexchange.com/questions/226229", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/11068/" ]
If my code contains a known defect which should be fixed, but isn't yet, and won't be fixed for the current release, and might not be fixed in the forseeable future, should there be a failing unit test for that bug in the test suite? If I add the unit test, it will (obviously) fail, and getting used to having failing t...
The answer is yes, you should write them and you should run them. Your testing framework needs a category of "known failing tests" and you should mark these tests as falling into that category. How you do that depends on the framework. Curiously, a failing test that suddenly passes can be just as interesting as a pas...
I think you should have an unit test with the current behaviour and in the comments, add the right test and right behaviour. Example: <pre><code>@Test public void test() { // this is wrong, it should be fixed some time Assert.assertEquals(2, new Calculator().plus(2,2)); // this is the expected behaviour, replace...
https://softwareengineering.stackexchange.com
605,703
[ "https://physics.stackexchange.com/questions/605703", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/264321/" ]
I was just wondering what it would be like if there was a car moving forwards with some velocity in vaccum and someone was to shine a flashlight inside the car, would the speed of light appear faster than c from outside, I am just a middle school student and I have just started studying special theory of relativity so ...
If the one way speed of light in vacuum varies in such a way that the 2 way speed of light is c, then the one way speed of light in a medium will necessarily vary in such a way that this measurement will get a null result. The one way speed of light is not a physical fact. It is a convention. We choose the one way spee...
To expand the explanation of Dale's answer a little: To measure a one-directional speed of anything you need to be able to define what 'at the same time' means between two locations because you need to agree what the start time was in order to measure a duration. Unfortunately, in a relativistic universe, there is no...
https://physics.stackexchange.com
153,066
[ "https://electronics.stackexchange.com/questions/153066", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/66221/" ]
I am extremely new to this and I'm learning by building stuff myself so please let me know if this is too vague and I'll elaborate if I can. I'm sure this is something very simple, but can't figure out how to do it. I have built radios before and know how to modulate a signal as ASK but now I'm trying to send a simple...
No, a DC <i>induction</i> motor is not possible. Induction implies causing current thru a magnetic field. Only varying magnetic fields can do that. This is also the same reason that transformers don't pass DC. There is no on-going power associated with a fixed magnetic field, just some fixed energy to hold it there...
No (well ... sort of but it is a waste) All electrical machines need an AC flux to couple the magnetic energy. DC brushed machines produce this via commutators. Basically these are also AC, just expose a DC accepting connection. So why can't you have a "DC induction machine" Well the defining characteristics of an i...
https://electronics.stackexchange.com
172,652
[ "https://stats.stackexchange.com/questions/172652", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/89548/" ]
Let's assume I'm selling a product at two price points, A and B and I'm alternating the displayed price to each visitor for a period of time. I receive a specific number of orders, O(a) and O(b) at each price point after time T. If I compare the profit after time T of the orders at each price point, is there a way ...
What you do is 'over sample' on the 'failures' and as you conclude, this biases your estimates. When you do not draw a random sample, but a sample based on the values of the binary outcome, then you are doing a so-called 'choice based sampling'. The correction of King and Zeng is one option, another option is to us...
This approach definitely does corrupt the model. The output of logistic regression is meant to convey the probability of an event given some configuration of independent variables. Explicitly removing large amounts of data <em>because of the value of the dependent variable</em> will definitely harm this aspect of the...
https://stats.stackexchange.com
186,868
[ "https://stats.stackexchange.com/questions/186868", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/96731/" ]
In rejection sampling or Markov chain Monte Carlo methods, we usually have a target distribution $p(x)$ whose form makes it difficult or impossible to draw samples directly, but we can evaluate $p(x)$ up to a normalising constant. We then sample from a simpler distribution which is proportional to $p(x)$. My problem ...
I think what you have in mind is to evaluate $p(x), \forall x \in \Omega$ and then treat it as a discrete distribution and pick an outcome at random and according to the probabilities (which we know how to do for a discrete distribution). The problem with that, however, is that $|\Omega|$ is often extremely large and ...
The method is extensively used to sample from a posterior distribution in Bayesian statistics. The following refers to that situation. Following Bayes' theorem, the posterior distribution is proportional to the prior times the likelihood. In notations: $$ p(\theta | x) \propto p(\theta) \times p(x | \theta) $$ Somet...
https://stats.stackexchange.com
81,054
[ "https://chemistry.stackexchange.com/questions/81054", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/402/" ]
I'm reading about protein folding on Wikipedia and I stumbled on a bit about a class of proteins called chaperones that aid in the folding of proteins by: <blockquote> ...reducing possible unwanted aggregations of the polypeptide chain that might otherwise slow down the search for the proper intermediate... </blockq...
I don’t think you are wrong. Actually molecular chaperones have been named enzymes in some texts. The molecular chaperones comprise several unrelated classes of proteins that have rather different functions. <blockquote> Most molecular chaperones are ATPases (enzymes that catalyze ATP hydrolysis), which bind to un...
There are quite a few reasons why one would say that chaperones are not catalysts. For one, they only assist by shielding away unwanted influences. They don’t really actively assist in folding a protein — if you have an image of a chaperone perfoming some kind of origami, that is inaccurate to the best of my knowledge....
https://chemistry.stackexchange.com
246,405
[ "https://stats.stackexchange.com/questions/246405", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/107111/" ]
In country A, during the ten-year period $2002 - 2012$ judges sentenced convicts to the death penalty 45 times. In contrast, the number of such penalties in 2013 was $19$ and in $2014$ it was $4$. An analyst claimed that the evident change in the rate of conviction is not statistically significant because of the sample...
The simplest approach that I can think of that is theoretically valid would be to assume that these convictions are generated by a Poisson process - meaning that each death sentence is a rare event, independent of other death sentences and that the probability distribution for the time between two such sentences is giv...
Let me suggest a different approach that is simpler and relies on fewer assumptions than Heitz Chi Square approach. Going back to your data set, you essentially have a time series of annual death penalties running from 2002 to 2014. And, except for 2013 in the other years the average is about 4 per year. Now, 2013 i...
https://stats.stackexchange.com
26,058
[ "https://softwareengineering.stackexchange.com/questions/26058", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/9952/" ]
Does anyone practice the "code review" process for functional tests? Do you find it useful? The way that my current employer practices SCRUM we include functional testing as part of our "must have done" stuff in any given sprint.
We also practice SCRUM. And the same as you, we also include functional testing as part of our definition as done. From my experience, I find it incredibly useful. We have significantly reduced the number of bugs in our code by simply forcing the functional testing. A second nice thing about the code review, is it gi...
Good heavens yes (I try not to use expletives on SO ;p). Peer reviewing your functional tests is basically peer reviewing your requirements and analysis, it's incredibly important, and if you use a BDD language like cucumber you can involve non programmers as well! It's awesome when our end users spot issues with our...
https://softwareengineering.stackexchange.com
81,245
[ "https://dba.stackexchange.com/questions/81245", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/48130/" ]
Is there any built-in function/stored procedure/query which is helpful to retrieve information about the size of <code>MyTable</code> in the SQL Server database?
For single table you can use <pre><code>sp_spaceused MyTable </code></pre> For all tables in a database you can use it with <code>sp_msforeachtable</code> as follwoing <pre><code>CREATE TABLE #temp ( table_name sysname , row_count INT, reserved_size VARCHAR(50), data_size VARCHAR(50), index_size VARCHAR(50), unused...
If you don't want to write a script, you can also open the much underused 'Object Explorer Details' in SSMS (Shortcut key F7). <img src="https://i.stack.imgur.com/zqWwB.png" alt="Top Level of Object Explorer Details"> From the Top-Level, open the Tables folder to get a list of all the tables in your database. You ma...
https://dba.stackexchange.com
463,681
[ "https://stats.stackexchange.com/questions/463681", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/146552/" ]
Suppose I sample <span class="math-container">$n$</span> times from a distribution <span class="math-container">$$ x_1, \ldots, x_n \sim p_\theta(x) $$</span> is the mean of the samples <strong>always</strong> a valid sample from the target distribution? I.e. is <span class="math-container">$\overline{x}$</span> a vali...
No, <span class="math-container">$\bar x$</span> has its own sampling distribution. Take, for example, the variances of <span class="math-container">$\bar x$</span> and <span class="math-container">$x_i$</span>, in which the former is always lower (<span class="math-container">$\leq$</span>) than the latter, which mean...
Good examples so far but consider <span class="math-container">$$X_i \sim Bernoulli(.5)$$</span> In that case the distribution of the data will only have support on 0 and 1. But the sample mean will have an ever decreasing probability of taking a value of 0 or 1 as the sample size gets larger and larger. That alone ...
https://stats.stackexchange.com
32,191
[ "https://dsp.stackexchange.com/questions/32191", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/10792/" ]
In machine learning, we often see the expression "end-to-end" learning (or training). However, I do not know that it means. When is a network called end-to-end training? How to recognize a network is end-to-end learning?
From feature extraction to learning the desired result, deep learning algorithms can act as full pipelines for solving tasks at hand. End-to-end learning usually refers to omitting any hand-crafted intermediary algorithms and directly learning the solution of a given problem from the sampled dataset. This could involve...
Most neural networks perform end-to-end learning, in the sense that you do not need any intermediary or post-processing steps, that have been traditionally used to solve that problem. Your neural network will try to reproduce the target function directly, without performing any series of specific steps to get there.
https://dsp.stackexchange.com
172,081
[ "https://mathoverflow.net/questions/172081", "https://mathoverflow.net", "https://mathoverflow.net/users/1106/" ]
Warning: I am not a differential geometer, so some of the following might not make sense. Background: Let $w: (T\Omega)^k \to \mathbb{R}$ be a $k$-tensor on $\Omega$, an open subset of $\mathbb{R}^n$. We can define the "derivative" of this tensor as follows. $Dw:(T\Omega)^{k+1} \to \mathbb{R}$ is a $k+1$-tensor...
Let me try to describe a slightly more general situation and hopefully prove my comment above. Let $V$ be a vector bundle on a manifold $M$ with connection $D : \Gamma(V) \to \Gamma(V \otimes T^*M)$. Let $Z(V)$ be the group of sections $\omega \in \Gamma(V \otimes T^*M)$ where, for an open covering $U_i$ of $M$, there...
I'm not sure I have a direct answer to your question, but here are some thoughts. I would suggest you investigate some of the literature on "flat" connections. It is precisely the flatness condition that allows you to obtain a cochain complex for computing cohomology. More explicitly, suppose that $E\rightarrow X$ is ...
https://mathoverflow.net
368,808
[ "https://softwareengineering.stackexchange.com/questions/368808", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/226041/" ]
<h1>Situation</h1> I am currently refactoring existing web code. The code currently revolves around a <code>ServerConfiguration</code> object. It looks something like this: <pre><code>string UrlBase = "https://myserver.com/api" string UrlLogin = "/v1/login"; string UrlProjects = "/v1/projects?api_token={0}"; public ...
<pre><code>string UrlLogin = "/v1/login"; string UrlProjects = "/v1/projects?api_token={0}"; </code></pre> These are both part of the API definition and can be hardcoded into the client library. Its up to the client to know which endpoint to call when the <code>Login</code> method is called <pre><code>string UrlBase ...
As already stated by Ewan, the base URL belongs to the application settings. Even if you don't use different URIs for different environments and even if you're sure the URI won't change (such as, for instance, when you access Amazon S3), it is still a good idea to keep it in the settings, in order to make it explicit w...
https://softwareengineering.stackexchange.com
37,460
[ "https://mechanics.stackexchange.com/questions/37460", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/12281/" ]
While doing a timing belt service on my 17 year-old, 57K-mile truck (DOHC), I was having a very hard time getting it to let go of the front oil seals on the intake camshafts.<strong><sup>1</sup></strong> I eventually realized that, since I was also needing to replace my leaking valve cover gaskets, I might as well ju...
<blockquote> There is now 57K of wear on those camshafts, which wasn't present when the factory worker torqued them down. That means that stresses could have built up in the intervening 17 years </blockquote> I don't see how stresses would build up anywhere in the top end. If anything, bolts would lose stress throug...
edit: I'm sorry I thought you had removed the cam. It doesn't matter in what order you torque the bearing cap bolts. The purpose of the order is to ensure that the cam and bearing caps are not moved unevenly. If the bolts are already partially torqued, then it should be fine to re-torque them in any order. But I will k...
https://mechanics.stackexchange.com
99,922
[ "https://stats.stackexchange.com/questions/99922", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/29911/" ]
I am trying to understand the meaning of the null distribution in Fisher Exact Test. Suppose I have a contigency table: <pre><code> Stat1 Stat2 Group1 18 2 Group2 3 40 </code></pre> If I want to know if <code>Stat1</code> is <em>enriched</em> significantly in <code>Group1</code>, have I ...
You want a one-sided test from the phrasing of your question. Your “null hypothesis”: Stat1's proportion of Group1 is greater than Stat2's proportion of Group1, is directional. You point out the reason why you might not want the two-sided test. On the other hand, if you do this, you are essentially saying that you kno...
From what I understood, the null hypothesis is that the probability of belonging to group1 or group2 is not correlated with the value of stat1 or stat2, and the one-sided distribution considers the more extreme arrangements of table (i.e. with lower probability of happening by chance) than the one considered. If that...
https://stats.stackexchange.com
753,545
[ "https://physics.stackexchange.com/questions/753545", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/262313/" ]
I am not understanding a passage that our professor wrote: those are the lines. <span class="math-container">$e_0 \cdot \hat\sigma$</span> is an operator, whose eigenvalues are <span class="math-container">$\pm 1$</span>. He applied this to a ket <span class="math-container">$|e_0, \pm 1 \rangle$</span>: <span class="m...
The issue of superconductors comes into play for &quot;the peripherals&quot; on the board, so to speak, but at a fundamental level, computation is done by representing bits with a voltage threshold, and the manipulations of computation are done by raising and lowering those voltages. For the sake of argument, if <span ...
Unfortunately, this question misses the point of computer circuitry. Yes, conductors are important, but what makes a computer do computations is not the conductors but rather the transistors. There is no such thing as a supertransistor. It is unlikely that you could design a computer without components that consume ene...
https://physics.stackexchange.com
12,900
[ "https://datascience.stackexchange.com/questions/12900", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/21659/" ]
I'm new here. I'm about to have a final interview for a data scientist position for a company (it's in the e-commerce field) that is new for data science. It's a pretty new position for the company, and from the interviews I had so far, I noticed that they don't fully understand what they want from a data scientist. Th...
I tell you what has worked for me: practical examples. They have probably already read about what data science is in general and which are the standard procedures. What they have not seen is someone in front of them explaining how innovative (and useful for business!!!) the data science really is. Follow the "Say what ...
I have not worked as a data scientist. But managing expectations is something we've all done. Considering you're referring to the company CEO, tact is especially required. There are three practices that have helped me a lot over the years: <ul> <li>Never say "it can't be done" right away. Many, many, many times I h...
https://datascience.stackexchange.com
25,667
[ "https://security.stackexchange.com/questions/25667", "https://security.stackexchange.com", "https://security.stackexchange.com/users/3339/" ]
I had a problem presented today which I found quite interesting. You have an application with a management panel. You know some of the accounts as they are standard. You want two things: <ul> <li>You want to prevent bruteforce attacks</li> <li>You want to prevent a denial of service </li> </ul> At the moment, the u...
For admin accounts, you were right, requiring a VPN is the right direction.<br> Better yet, require multi-factor authentication for admin users. These are always good ideas. <hr> That said, if for whatever reason it is not feasible, and you are stuck with regular public password logins, all is not lost. Ass...
For a simple solution I would say to implement an exponentially increasing delay per user per IP address. Required delay between attempts 1 and 2 from IP <em>a.b.c.d</em> for user <em>x</em>: 1 seconds ...attempts 2 and 3: 2 seconds ...attempts 3 and 4: 4 seconds ... ...attempts 7 and 8: 1 minute 4 seconds That w...
https://security.stackexchange.com
119,003
[ "https://softwareengineering.stackexchange.com/questions/119003", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1996/" ]
Here's a common situation: <ul> <li>You need to implement a bulk operation in an application that uses an ORM framework.</li> <li>After the first pass, you've noticed significant performance problems.</li> </ul> Here's my question: <ul> <li>In this situation, should you <em>favor</em> a solution that includes raw ...
ORMs are not intended to completely take over access to your database. Use them for that 80% of code that's CRUD, the stuff that's too tedious to write on your own. Use stored procedures, dynamic SQL, or whatever you want for the remaining 20% that needs to be carefully optimized.
I use an ORM (nHibernate) in an application that requires high performance and handles billions of records. With time we noticed that most significant performance problems were related to our own way of using the ORM rather than due to the ORM alone. The ORM should not replace your mandatory database knowledge. It's a...
https://softwareengineering.stackexchange.com
204,767
[ "https://mathoverflow.net/questions/204767", "https://mathoverflow.net", "https://mathoverflow.net/users/72350/" ]
If $E$ is an elliptic curve over a number field $K$ and $E^{F}$ is a quadratic twist of $E$. Then it is stated in ``Ranks of twists of elliptic curves and Hilbert’s tenth problem" due to Mazur and Rubin, Remark 2.4, that as $Gal(\bar{K}/K)=G_{K}$-module $E[2]=E^{F}[2]$. I do not quite see the proof.<br/> More generally...
The conceptual way to look at it is to use the fact that there is an isomorphism $$ f : E \xrightarrow{\;\sim\;} E^F $$ defined over $KF$ that intertwines the representation $\chi : G_K\to\mbox{Gal}(KF/K)\to\{\pm1\}\subset\mbox{End}(E)$ via $$ f(P)^\sigma = \chi(\sigma)f(P^\sigma). $$ If you restrict $f$ to the 2-tors...
Let's write down equations. $y^2=x^3+ax+b$ is $E$, and $dy^2=x^3+ax+b$ is $E^{F}$. Now we know that two torsion points have zero $y$ coordinate, and so the identity map is an isomorphism of $E[2]$ with $E^{F}[2]$.
https://mathoverflow.net
25,804
[ "https://stats.stackexchange.com/questions/25804", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/10346/" ]
I am fitting an <code>lm()</code> model to a data set that includes indicators for the financial quarter (Q1, Q2, Q3, making Q4 a default). Using <code>lm(Y~., data = data</code>) I get a <code>NA</code> as the coefficient for Q3, and a warning that one variable was exclude because of singularities. Do I need to add ...
NA as a coefficient in a regression indicates that the variable in question is linearly related to the other variables. In your case, this means that $Q3 = a \times Q1 + b \times Q2 + c$ for some $a, b, c$. If this is the case, then there's no unique solution to the regression without dropping one of the variables. Add...
I found this behavior when attempting to fit observations vs time, where time was given as POSIXct. lm and lsfit() both determined that the x's were co-linear. The problem was solved by subtracting the mean of the time datum to do the fit. This appears to be a deficiency in the underlying code -- there must be some sin...
https://stats.stackexchange.com
6,917
[ "https://security.stackexchange.com/questions/6917", "https://security.stackexchange.com", "https://security.stackexchange.com/users/2666/" ]
In the hypothetical scenario where someone has managed to gain unlawful access to a SOHO router (any of the consumer wifi models will serve nicely), what steps can you take to verify this, so as to present evidence to a court? These devices don't seem to have much logging built in, and even if they do how can you show...
I'd point out that just because they don't have much logging doesn't mean that they don't have any. Assuming you recognized the intrusion before the log rolled over, I believe that you would see evidence of it on most of the consumer-grade SOHO routers I've used if logging was enabled. I was able to detect intrusion ...
To clarify I think you are asking about consumer grade <em>home broadband routers</em> with built-in wireless (802.11a/b/g/n), right? Out of the box, you are going to have a very difficult time proving any kind of intrusion using these devices. Besides the fact there is nothing authenticating your valid users. How...
https://security.stackexchange.com
338,267
[ "https://stats.stackexchange.com/questions/338267", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/49090/" ]
Consider an <em>Erdos-Renyi</em> random graph $G=(V(n),E(p))$. The set of $n$ vertices $V$ is labelled by $V = \{1,2,\ldots,n\}$. The set of edges $E$ is constructed by a random process. Let $p$ be a probability $0&lt;p&lt;1$, then each unordered pair $\{i,j\}$ of vertices ($i \neq j$) occurs as an edge in $E$ with pr...
Let $Y_{ijk}=1$ iff $\{i, j, k\}$ form a triangle. Then $X=\sum_{i, j, k}Y_{ijk}$ and each $Y_{ijk}\sim Bernoulli(p^3)$. This is what you have used to calculate the expected value. For the variance, the issue is that the $Y_{ijk}$ are not independent. Indeed, write $$X^2=\sum_{i, j, k}\sum_{i', j', k'}Y_{ijk}Y_{i'j'k'...
I provide a slightly different approach of deriving <span class="math-container">$\mathrm{X}^{2}$</span>. With the same case distinction as Robin Ryder did: <ul> <li>If <span class="math-container">$\{i, j, k\} = \{i', j', k'\}$</span> i.e. the 3 vertices are the same, thus we must pick 3 vertices out of n possible <...
https://stats.stackexchange.com
358,113
[ "https://electronics.stackexchange.com/questions/358113", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2134/" ]
This might sound like a stupid question, but I'm kinda interested in a detailed explanation. So while inductive charging is rather ubiquitous, things like electric toothbrushes and Qi chargers come to mind, as well as to a lesser extent, wireless charging pads for cars, the are all inductive charging systems, basicall...
First point: A transformer has a built-in return path, so you have a complete circuit. That is to say, it has two wires on each side, so current can flow out through one and back through the other. To make an equivalent device with capacitors, it would be need to have two of them, one for out and one for return. Next ...
<blockquote> But would it be technically possible to make such a charging setup, using a large capacitor? </blockquote> Yes and almost commercially cheaper than inductive charging (but that's what makes it unattractive). If you had two parallel plate capacitors (for forward and return current) of 1" cross sectio...
https://electronics.stackexchange.com
4,581
[ "https://physics.stackexchange.com/questions/4581", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/293/" ]
Taking off from the Rutherford-Bohr model, <img src="https://i.stack.imgur.com/R8c0f.png" alt="Rutherford-Bohr model"><br> <strong>Figure 1.</strong> <em>Rutherford-Bohr model.</em> when an electron absorbs energy (from light, heat, or otherwise) it jumps to a higher energy level, or shell. Then when the electron los...
The Rutherford model of the atom didn't respect any quantization: it was a classical planetary model. The Bohr-Sommerfeld model had the quantization of the allowed orbit from your first picture; however, you conflated these two models and spoke about "Rutherford-Bohr" model which has never existed. The third thing tha...
<h3>Using orbitals to describe multi-electron atoms:</h3> Hydrogen (and hydrogen-line atoms like $He^+$) is a two-body system and for it we can solve the Schrödinger equation <em>analytically</em> and thus obtain wavefunctions for electron orbitals that are known as 1s, 2s etc. It is a natural idea to use these orbita...
https://physics.stackexchange.com
51,921
[ "https://electronics.stackexchange.com/questions/51921", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/17146/" ]
I am a logic circuits beginner. We are asked to draw a circuit which takes a four-bit word as input, and outputs true if the word is greater than or equal to 10. Symbolizing the word as (b1b2b3b4), this translates to (b1 | b2 | b3). Now b4 is completely useless in the circuit. What is the drawing convention for a com...
Firstly, it's conventional to number bits like digits, from the right, and from zero: <pre><code>b3 b2 b1 b0 </code></pre> Secondly, you should test your circuit with some testcases, as it doesn't act as a >=10 comparator. For example, it reports true for 9 (1001 binary). Thirdly, you can just leave things disconnec...
You don't say if your 10 is a decimal Ten or a Binary value = decimal two. I'll assume the former. Ten = 1010 which DOES require the 4th input. If the questions was greater than or equal to 7 you'd be right in not needing that input. b&lt;3:0> is another representation. a 4 bit value is also known as a nybble
https://electronics.stackexchange.com
341,944
[ "https://physics.stackexchange.com/questions/341944", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/155172/" ]
Is the Schrödinger operator $$H~=~-\Delta+V$$ bounded from below? For example, I would like to analyze the case where $V\in L^{2}_\mathrm{loc}(\mathbb{R}^{n})$ is a locally square integrable function, but what about other situations, are there general results?
The operator $H$ is bounded from below if all of its inner products $\langle\psi,H\psi\rangle$ are bounded from below. Thus, we can easily compute $$\langle\psi,H\psi\rangle=\int_{\mathbb{R}^n}\mathrm{d}\textbf{x}\,\psi^*(\textbf{x})\left(-\Delta+V(\textbf{x})\right)\psi(\textbf{x}).$$ Integrating this expression by ...
A locally square integrable potential function $V\in {\cal L}^{2}_\mathrm{loc}(\mathbb{R}^{n})$ does not guarantee that $H$ is bounded from below. Consider e.g. a linear potential $$V(\vec{r}) ~=~ -\vec{E}\cdot \vec{r}, \qquad \vec{E}~\neq~\vec{0}.$$
https://physics.stackexchange.com
226,252
[ "https://softwareengineering.stackexchange.com/questions/226252", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/69316/" ]
Scrum master is a facilitator for the delivery team and acts as a bridge between Project Management and the team. In course of time if he realizes that his team is not delivering the deliverables perfectly possible w.r.t competency of his team, can he question his team members why it is not happening? It is more like ...
A Scrum master doesn't reprimand. He or she sees problems and facilitates the team to tackle them. <br /> If the team struggles, it's his or her job to articulate the problems and try to get the team to do a root cause analysis on those problems. <br /> To elaborate on your example: spending time on social network site...
They certainly can. Not everything that a team does is perfect or acceptable in any sense of the word. Scrum masters should enable a culture of open communication, and scrum masters... are part of the team! So, why would they <em>not</em> point out problems with the team? Some teams are excellent, self-organizing, in...
https://softwareengineering.stackexchange.com
92,798
[ "https://security.stackexchange.com/questions/92798", "https://security.stackexchange.com", "https://security.stackexchange.com/users/79877/" ]
I have Security Onion installed and doing full packet capture on my home network. I also have a firewall (pfSense) which does my routing. I have Security Onion sitting just behind my firewall and mirrored from a switch. It works great except I want to decrypt my SSL traffic. I would very much prefer to have the decrypt...
You can filter or view parameterised requests (either GET or POSTs). These are shown in the site map. These will show you where input could possibly lead to an XSS or CSRF vulnerability. However, be aware that XSS attacks can also happen via HTTP headers or cookies, or any other external source of data to the applicat...
Are you saying that you want a list of request parameters? If so, I don't think it's possible, though you can filter requests containing parameters and requests that don't. <blockquote> What is the best way to filter that list (or otherwise) so I can get an idea around what points to look at protecting for XSS and C...
https://security.stackexchange.com
550,377
[ "https://electronics.stackexchange.com/questions/550377", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/277860/" ]
I want to know if there's a way to operate a normal (250 VAC primary rating) transformer at higher primary voltage levels, as I have an AC voltmeter project using a microcontroller (currently using Arduino Uno), with over voltage detection. The controller will perform a specific task for undervoltage case, a specific t...
This is another way to implement your ADC to temperature function: <pre><code>/* * File: AppLoop.c * Author: dan1138 * Target: PIC18F24K22 * Compiler: XC8 v2.31 * IDE: MPLABX v5.45 * * Created on March 7, 2021, 11:37 AM * * PIC18F24K22 * +---------:_:---------+ * ...
The loop is very fast, but when you do both channels it is still very fast but the motor rate is being updated only half as fast, but even so could be something like every 40 microseconds (12kHz). It is possible that updating the pwm (CCPR5L= store) is interfering with the pwm itself. You said you put in a delay, but d...
https://electronics.stackexchange.com
127,975
[ "https://cs.stackexchange.com/questions/127975", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/112457/" ]
Given any problem <span class="math-container">$P$</span> that we know of being in <span class="math-container">$NP-\text{complete}$</span>, where is the flaw in the following proof? Given a problem <span class="math-container">$Co-P$</span> which is the co-problem of <span class="math-container">$P \in NP-\text{comple...
A problem is in NP if for all instances where the answer is “Yes” you can guess a hint and verify it in polynomial time. Nothing at all is said for instances where the answer is “No”. That distinction between “Yes” and “No” answers is essential. What your proof attempt shows is that if a problem X is in NP, then the co...
The problem with your proof is the fact that a TM for <span class="math-container">$NP$</span> would be non-deterministic. The non-determinism allows the machine to split up into branches of computation, and your machine will accept iff <strong>there is a branch</strong> in which the computation accepted. In order to k...
https://cs.stackexchange.com
669,177
[ "https://physics.stackexchange.com/questions/669177", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/16027/" ]
I have a parabola equation <span class="math-container">$y = ax^2 + bx + c$</span> with vertex at (vertexX, vertexY)) which draws the object's moving trajectory (from point <span class="math-container">$A(0;0)$</span> to <span class="math-container">$B(X;Y)$</span>). Also, I have a gravity vector (<span class="math-con...
Let initial velocity be <span class="math-container">$(u_x,u_y)$</span> differentiating the parabolic equation w.r.t. x gives <span class="math-container">$\frac{dy}{dx} = b$</span> when <span class="math-container">$x=0$</span> so <span class="math-container">$$\frac{u_y}{u_x} = b$$</span> Also from the equations of m...
First you have <span class="math-container">$x(0)=y(0)=0$</span>. <span class="math-container">$v_y/0)/v_x(0)=b$</span>, second you have <span class="math-container">$v_y(vertex)=0, and , v_y(t)=v_y(0)-g*t , y(vertex)=v_y(0)*t-g/2*t^2, x(t)=v_x(0)*t$</span> this should be enough to find a,b,c
https://physics.stackexchange.com
207,460
[ "https://softwareengineering.stackexchange.com/questions/207460", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/98914/" ]
I am thinking of using JIRA + GreenHopper for my project management. I have seen that Green Hopper is for making User stories, sprints. I am not able to find how do i need to add tasks, or how to break user stories in to sub stories. Do I first need to create project in JIRA and then use Green Hopper or I can use u...
You need a JIRA project created with the GreenHopper template as a base. There you can create different "tickets" (Epics, Stories, Tasks, Defects etc) and follow through with your project by estimating story points, moving them on the SCRUM board and having reports like burndown charts. JIRA has a standalone installe...
Greenhopper is a pure agile process tool, with the main focus on planning for the sprints, ordering the backlog and tracking the work using the computerized agile boards. We've been trying to use it as a project tracking tool, but it's not really suitable for that. Also we've been using Jira plugin called Structure to...
https://softwareengineering.stackexchange.com
85,403
[ "https://security.stackexchange.com/questions/85403", "https://security.stackexchange.com", "https://security.stackexchange.com/users/31356/" ]
Yesterday I tried to recover the password for a Gmail account that I have created few months ago and during the process it asked me for the last password I remember. Why would it ask for that? <img src="https://i.stack.imgur.com/SS28r.png" alt="enter image description here"> <ul> <li>I'm 100% sure that I have used on...
It looks like GMail knows the hashes of earlier passwords for users. While this is not true in your case, treating it as a special case would cost the developers time, and it would provide attackers a clue about your password habits. It is a good thing that GMail doesn't advertise that you never changed your password.
Beyond the obvious "don't make it more complex that you have to", there are tow reasons why a password recovery process shouldn't attempt to tailor the challenge to the known data: <ul> <li>It is a form of information disclosure (in your case, it would indicate that the password has not been changed since it was creat...
https://security.stackexchange.com
3,336,312
[ "https://math.stackexchange.com/questions/3336312", "https://math.stackexchange.com", "https://math.stackexchange.com/users/435705/" ]
<blockquote> Let <span class="math-container">$V$</span> be the vector space of polynomials in the variable <span class="math-container">$t$</span> of degree at most <span class="math-container">$2$</span> over <span class="math-container">$\mathbb{R}$</span>. An inner product on <span class="math-container">$V$</span>...
For the first, use <span class="math-container">$a^2-b^2=(a+b)(a-b)$</span>, so: <span class="math-container">$$(x+\sqrt{2})^2-8=(x+\sqrt2+2\sqrt2)(x+\sqrt2-2\sqrt2)=(x+3\sqrt2)(x-\sqrt2)$$</span> For the second case pick a <span class="math-container">$a$</span> and use the same rule as the previous answer, so: <span ...
<span class="math-container">$$(x + 3 \sqrt{2})(x - \sqrt{2})$$</span> <span class="math-container">$$7 a (2 - 7a) + (10 b + 1)(10 b - 1)$$</span>
https://math.stackexchange.com
263,929
[ "https://electronics.stackexchange.com/questions/263929", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/126908/" ]
If I understand this right, making robots like the Nao robot or drones or making the iPhone is made by the process of electrical engineering. Is this right? I don't know if I should be using the word 'process' but I hope you understand what I meant.
Welcome to the real world! The "mathematically perfect" transform you show at the top, with the "discrete" harmonics is generated assuming that the rise and fall times of the waveform are zero, and that you're doing a continuous transform &mdash; no discrete sampling in the time domain. It assumes that the integration...
I am admittedly under-educated in the relevant math, and can easily be humiliated by some elegant formulas with transforms, operators, matrices of functions etc. but let me present what I know in lay man vocabulary - perhaps I'm the right person to try, for exactly that reason: I would guess that in your first "theore...
https://electronics.stackexchange.com
611,286
[ "https://physics.stackexchange.com/questions/611286", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/183301/" ]
<blockquote> So I have to prove that the d'alembertian of the associated green's function <span class="math-container">$G(t,t',\vec{r},\vec{r}')$</span> is equal to zero when given that <span class="math-container">$\vec{r}\neq\vec{r}'$</span> <span class="math-container">$$\left(\frac{1}{c^2}\partial^2 t-\Delta\right)...
Consider the transformation <span class="math-container">$$|\psi'\rangle=e^S|\psi\rangle$$</span> We are looking for the transformed Hamiltonian <span class="math-container">$H'$</span> such that <span class="math-container">$$H'|\psi'\rangle=i\hbar{d\over dt}|\psi'\rangle \ \Leftrightarrow\ H|\psi\rangle=i\hbar{d\over...
The idea is to transfer all time dependence into part of H which contains small parameter. In general S will then be time dependent as well. I think the origin of this term can be traced back to the principle of least action and canonical transformations. It can no longer be assumed that Hamilton's equations are uncha...
https://physics.stackexchange.com
1,559,506
[ "https://math.stackexchange.com/questions/1559506", "https://math.stackexchange.com", "https://math.stackexchange.com/users/295813/" ]
See question title. The series is as follows: $$\sum_{n=1}^\infty{2n+\sin{n}\over {e^n-\cos n}}$$ Now, common sense dictates that the numerator "goes to infinity" much slower than the denominator, therefore the series is convergent. How to show this in more formal terms? Thanks in advance for any and all advice.
Use \begin{align}\lim_{n\to\infty}\frac{a_{n+1}}{a_n}&amp;=\lim_{n\to\infty}\frac{{2(n+1)+\sin{(n+1)}\over {e^{n+1}-\cos (n+1)}}}{2n+\sin{n}\over {e^n-\cos n}}\\ &amp;=\lim_{n\to\infty}\frac{2(n+1)+\sin{(n+1)}}{2n+\sin{n}}\times\frac{e^{n}-\cos n}{e^{n+1}-\cos (n+1)}\\ &amp;=\lim_{n\to\infty}\frac{2n(1+\frac{1}{n}+\fra...
We have $$\sum_{n\geq1}\frac{2n+\sin\left(n\right)}{e^{n}-\cos\left(n\right)}\leq\sum_{n\geq1}\frac{2n+1}{e^{n}-1}\sim\sum_{n\geq1}\frac{2n}{e^{n}}=\frac{2e}{\left(e-1\right)^{2}}.$$
https://math.stackexchange.com
130,803
[ "https://physics.stackexchange.com/questions/130803", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/42047/" ]
First of all, I'm genuinely sorry if this question isn't "serious" enough for this forum! A common cliche in movies and tv is that a very tough object (eg the villain) is frozen, and then hit with something, shattering into a million pieces. I've seen a demo of a flower being put into liquid nitrogen, then being crum...
As far as I remember, yes, everything becomes brittle at low enough temperatures. This is due to the brittle-to-ductile transition (BDT - or sometimes referred to in reverse as DBT, ductile-to...). This transition is temperature dependent (amongst others (strain-rate ...)). Can every composition actually reach low enou...
Many organic substances will become brittle at the temperature of liquid nitrogen, but there are plenty of material choices left for e.g. vacuum seals, pipes, containers, etc., which are not. Indeed, we have constructed entire rocket fuel systems at the temperature of liquid hydrogen, which retain most of their mechani...
https://physics.stackexchange.com
82,081
[ "https://electronics.stackexchange.com/questions/82081", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/688/" ]
In the picture below, there are 4 green components. Does anybody know what kind of component they are? Some information: <ul> <li>When the circuit is live, I measure no voltage drop.</li> <li>My multi-meter measures 0 ohms in either direction.</li> <li>The context is the power input stage of the whole pcb.</li> </...
Three possibles in order <ol> <li>Ferrite Inductors, used sometimes to reduce conducted noise on power supplies. DC Resistance is zero, but 10-1000 ohms at high frequency.</li> <li>'Poly Fuses' 'PTC Resistors' 'Resetable Fuse' Often have low resistance. When they heat up the resistance goes up which limits the curren...
It all points to them being fuses. The polarity appearance is probably an artifact of their construction, and they don't really have any polarity. The two bottom ones are in parallel, doubling up the current capacity. The two top ones are not really in parallel, it looks like they branch out to different parts of th...
https://electronics.stackexchange.com
122,056
[ "https://security.stackexchange.com/questions/122056", "https://security.stackexchange.com", "https://security.stackexchange.com/users/109318/" ]
I am a noob as stated in title. I didn't know how to disable Javascript before visiting some not-so-legit sites. So what can I do? I was using tor, I know this is not enough so I have tails ring a persistent volume on a USB stick as added security. Can I go back, with javascript disabled, and create a new user name and...
The sequence to check-up is just exactly the same as if you were browsing from unsafe place, like public open wifi : full system scan, log checking, anti-malware tools risen to the maximum protection level. Tor/darknet is <em>just</em> a network, no darknet-specific problems there so far : you can leak your data with t...
Tor should have noscript installed. You simply click on the NoScript extension and click disable javascript on all sites. Unfortunately, once you've done something on the internet you can't change it. You can't go back and do it again differently, just like you can't in real life. Consider refraining from doing thing...
https://security.stackexchange.com
60,364
[ "https://softwareengineering.stackexchange.com/questions/60364", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/12569/" ]
I have a distributed data collection system where I have first layer as regional Databases where all collected data is initially stored and master database where all the data is consolidated, what are you thoughts on schema design of this situation, also important thing here is I could have overlapping Ids and dictiona...
If the natural keys are hard to identify, you can still use surrogates for both regional databases and the master one. For example, regional database schema: <pre><code>CREATE TABLE main_table ( region_id INT NOT NULL AUTO_INCREMENT, region_name CHAR(30) NOT NULL, [other fields], PRIMARY KEY (region_id) ); </...
Try to identify natural keys from your data, they will not cause the same problems as surrogates when you come to merge your data.
https://softwareengineering.stackexchange.com
515,031
[ "https://physics.stackexchange.com/questions/515031", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/158449/" ]
Let's say you have a house with natural gas atmospheric heater water radiator system. Does it matter in terms of natural gas expenditure, if the house is kept at higher or lower temperature, assuming the outside temperature is always lower than inside? Let's say you have the thermostat which regulates the heating syst...
<blockquote> Is it right or am I missing some basic physics here? Or perhaps it is dependant on actual temperature differences between inside and outside? </blockquote> I like Gonzonator's answer but want to add a bit of math to it. The heat loss of the house can be described by Newton's Cooling Law: <span cla...
I'm afraid your instinct is wrong, thermal transfer rate is very much dependent on the thermal gradient. In a given environment, hotter things cool at a faster rate. It's quite easy to test this. Make two cups of coffee. Add cold milk to one immediately, and the same volume of cold milk to the other one after two minu...
https://physics.stackexchange.com
139,002
[ "https://dba.stackexchange.com/questions/139002", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/94998/" ]
I am trying to map a drive to a UNC path where the UNC Path is a variable, but I keep getting an error saying: <blockquote> Incorrect syntax near '+' </blockquote> I execute this script: <pre><code>DECLARE @UNCSourcePath nvarchar(255) = '\\OTHER_SERVER\C$\Program Files' EXEC xp_cmdshell 'NET USE S: ' + @UNCSourceP...
It looks like it only accepts one argument. So try doing this... <pre><code>DECLARE @UNCSourcePath nvarchar(255) = 'NET USE S: "\\OTHER_SERVER\C$\Program Files"' EXEC xp_cmdshell @UNCSourcePath </code></pre>
I had to run this on a SQL 2005 Instance since my newer instances do not allow xp_cmdshell execution, which is why the parameters do not have their initial values set with the declare statements. I added a second parameter and then executed that. Remove the comments from the --EXEC (@MappingCommand) statement to exec...
https://dba.stackexchange.com
145,961
[ "https://mathoverflow.net/questions/145961", "https://mathoverflow.net", "https://mathoverflow.net/users/17188/" ]
Let $C = \{1,...,n\}$ be a set of $n$ colors. Let $S_1,...,S_k$ be non-empty subsets of $C$, that is, $S_i \subseteq C$ for all $i \in \{1,...,k\}$. It is helpful to think of the $S_i$ as urns with colored balls. We now draw one ball from each $S_i$. Given $b_1,...,b_n$ with $b_1 +...+ b_n = k$. How many ways are the...
The answer is the coefficient of $x_1^{b_1}\cdots x_n^{b_n}$ in $$\prod_{i=1}^k \biggl(\sum_{j\in C_i} x_j\biggr).$$ It's unlikely that anything more useful can be said in the general case.
Define a 0-1 matrix $A=(a_{ij})$ of order $n\times k$, where $a_{ij}=1$ iff $i\in S_j$. Then the task is to count the number of ways of choosing a 1 in each column so that the row sums are $b_1,\ldots,b_n$. For $k=n$ and $b_1=\cdots =b_n=1$, this is the same as computing the permanent of $A$, and so is #P-hard. A pol...
https://mathoverflow.net
153,835
[ "https://softwareengineering.stackexchange.com/questions/153835", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
There are a lot of manuals. I am trying to create an database to hold information of these documents. But, there is a small problem. How can I give meaningful id to the manuals? Are there any standard or logic behind the giving meaningful id to the documents? If there is no standard, can you tell me how I should do th...
Usually, one might first try to find a natural key, coming from the problem domain; e.g. an EAN/UPC code for products or the SSN for people. When there is no obvious natural key, the artificial ID is just a number counting up, and those gaps after deleting are not considered problematic, because the ID is meaningless ...
What's the problem with gaps in your database when using IDs from 1 to n? If you really mind the gaps, you could add new manuals inside those. (In your example the next new manual would get the ID 2, 3, ... , 32, 34). Or you could save a list/stack of the IDs from the deleted manuals and every time you add a new you po...
https://softwareengineering.stackexchange.com
7,544
[ "https://electronics.stackexchange.com/questions/7544", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2189/" ]
I've got a PCB (from a multimeter) that apparently has 2 traces on the PCB burned away. How they did it, I don't exactly know, but the traces are really gone completely. The problem is however, that these traces disappeared up to a via they were connecting to... So little graphical representation("=" = trace, "-" = di...
Scrape any solder mask away from the via and solder to the via itself. Use very thin wire, since this trace is acting as a fuse. Or throw this meter in the trash before someone gets hurt. There's probably something you can do with conductive glue, but I have no experience with it. Where else does the trace go? You...
The burnt traces are a symptom. Something shorted out and caused them to burn. Unless you can find and fix the root cause, there is no sense in repairing the traces.
https://electronics.stackexchange.com
18,328
[ "https://physics.stackexchange.com/questions/18328", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/6694/" ]
I think about position, its time derivative speed, and its second time derivative, acceleration. I would like to identify a single word that can be used as a handle for the second time derivative of energy (i.e., the time derivative of power). If there is a widely used term, I'd prefer to use it. If not, I'd like to ge...
Within power systems such as regional or national electricity grids, $\frac{\mathrm{d}^2E}{\mathrm{d}t^2}$ is called the <strong>slew rate</strong>: it's used to denote the rate of change of power demanded from, or supplied to, electricity grids. It's typically either expressed as MW/s or GW/h, being two time periods o...
The quantity itself, $\frac{\mathrm{d}^2E}{\mathrm{d}t^2}$, is not widely used (as a matter of fact I can't think of any equation in which it appears off the top of my head), so correspondingly there is no widely used term for it. You can just say "second time derivative of energy" or "rate of change of power" or some ...
https://physics.stackexchange.com
155,754
[ "https://security.stackexchange.com/questions/155754", "https://security.stackexchange.com", "https://security.stackexchange.com/users/142970/" ]
Some websites lock out a user after a series of incorrect password attempts for example for 15 minutes. If a malicious actor knows this, can they deliberately try logging in with incorrect passwords every 15 minutes to prevent the real person from logging in? Is this a real threat and if so how can websites protect aga...
Login brute-force protection can be enforced in three ways: <ul> <li>Temporary Lockout </li> <li>Permanent Lockout </li> <li>CAPTCHA</li> </ul> In my perspective, CAPTCHA is the most reasonable solution to avoid the risk of bruteforce as well as denial of service due to account lockout. You might have seen a CAPTCHA ...
Yes, some websites do that in order to prevent bruteforce or password guessing attacks. Instead of banning the user, the website should ban the IP address from accessing the website. If the attacker is hopping from one IP address to another and doing the brute force attack, then in that case the website can ban the u...
https://security.stackexchange.com
135,104
[ "https://softwareengineering.stackexchange.com/questions/135104", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/47726/" ]
In a test I was asked: <blockquote> What elements present in the general form of a rendezvous are not present in Ada language? </blockquote> I was a bit stumbled as I thought Ada fully supported rendezvous. Now it seems it doesn't. Can anyone tell me what are those elements?
<em>I'll assume that you are only storing profiles for users.</em> This is an easy decision. The user has a "has a" relationship to the profile and thus the profile should be encapsulated in its own class and exposed as a component of the User class (e.g. a property). So your second approach is the cleanest one. Opti...
<blockquote> Write the code for the profile into the User class. I am dismissing this right away. </blockquote> Why? This is the simplest solution. I would do this until the pain appeared. That moment may come very soon. So what if it does? Just extract the profile data into a separate class.
https://softwareengineering.stackexchange.com
303,552
[ "https://physics.stackexchange.com/questions/303552", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/141366/" ]
Specifically, part of the question states: <blockquote> "The electric field at all points between the electrodes is equal to the electrode voltage difference divided by L" </blockquote> I always thought that Voltage is the same as potential difference, and potential difference is just the difference in potential e...
Short answer: yes, voltage difference is the same as voltage A little more insight: dealing with circuits, in general there is a well-defined zero of the potential: the ground, therefore we have a sort of "absolute scale" and this is the reason to use improper expressions in this context.
Contrary to other answers, the zero potential energy of a circuit isn't the ground, which some would use to short circuit, but sum of all potential differences around any closed loop in a circuit is zero (it's a completely relative term, not at all like there is say in temperature). It's a measurement of differences...
https://physics.stackexchange.com
32,437
[ "https://physics.stackexchange.com/questions/32437", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7437/" ]
i am studying for a physics exam and came across an exercise i cannot seem to crack. I have read through Feynmans lecture books &amp; a lot of the internet but i am somewhat stuck. first the question, and then what i have got so far: (Note the problem is originally in German, I hope my translation does not change the ...
The way you would manually find the wave functions is more complicated than this. At first, you would need to describe better the one-particle scenario. I don't really understand your concept of the spin-state function, so I'll use mine, I hope it won't make my answer unusable. <em><strong>One particle</em></strong> ...
Your answer to 1 is correct. The rest is wrong. For two spin 1/2 fermions, there is only one states at each level, the two fermions must be in an antisymmetric spin state, regardless of the level. This means that they are forced to have opposite spin to be at this level. For spin 1, there are 6 symmetric spin states pe...
https://physics.stackexchange.com
818
[ "https://cs.stackexchange.com/questions/818", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/106/" ]
I have been reading this site with a great deal of interest, but I find a lot of it goes over my head. This has made me wish to learn a lot more about algorithms and CS in general. As far as I can tell from my research, there are 2 main ways of doing this. <ol> <li>I can by a nice thick heavy book and work my way thr...
I learned about algorithms in a university course years ago. But if you are to do algorithms using a book, then you need a good one. Two books stand out for me as the way to get into algorithms: <ul> <li>The Algorithm Design Manual <strong>by</strong> Steven S. Skiena</li> <li>Introduction to Algorithms <strong>by</st...
<strong>Teach an algorithms class.</strong> Or perhaps even better: <strong>write an algorithms textbook.</strong>
https://cs.stackexchange.com
440,126
[ "https://math.stackexchange.com/questions/440126", "https://math.stackexchange.com", "https://math.stackexchange.com/users/17980/" ]
I'm writting something. However I'm not good at English writting. Suppose that $X=D^\mathfrak c$. I want to express this : <blockquote> Let $x$ be the unique point of $X$ such that $x(\gamma)=1$ and for any other $\alpha &lt; \mathfrak c$, $x(\alpha)=0$. </blockquote> Is there a better way to write it? Thank...
I would write almost what you have written, but change the order at the end, so the sentence would read: <blockquote> Let $x$ be the unique point of $X$ such that both $x(\gamma)=1$ and $x(\alpha) = 0$ for all $\alpha &lt; \mathfrak{c}$ with $\alpha \neq \gamma$. </blockquote>
In this case you can legitimately avoid having to write much English at all: <blockquote> Define $x\in X$ by $$x(\xi)=\begin{cases}1,&amp;\text{if }\xi=\gamma\\0,&amp;\text{otherwise}\;.\end{cases}$$ </blockquote>
https://math.stackexchange.com
80,508
[ "https://electronics.stackexchange.com/questions/80508", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8219/" ]
Just a theoretical question more than anything. Does the clock signal have to have the same width between peeks and troughs? A normal clock signal with data (below): <img src="https://i.stack.imgur.com/8FiUQ.png" alt="Normal Clock"> A random clock signal with data (the data is still in sync with the clock) (below): ...
Your clock signal is edge-triggering, in your examples on the positive edge. You can tell because the data has to be stable a short time before the clock edge (<strong>setup time</strong>), and if the clock would latch on the falling edge it would coincide with your data changing. Except for the setup time there are f...
A chip will behave normally as long as you operate it within the 'normal operation parameters' as specified in the datasheet. Most chips have only requirements about the minimum time between clock edges, and the setup time (data stable to active clock edge). Neither are violated by stretching the clock. In practice, a...
https://electronics.stackexchange.com
189,880
[ "https://physics.stackexchange.com/questions/189880", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/58918/" ]
Suppose we have an infinite amount of a non viscous liquid (No boundary). Inside that liquid works a rotating impeller. Can the impeller agitate the liquid at all? The question arise from thinking about "What is quantum about a super fluid?". I mean in a super fluid, the impeller does agitate the liquid, but that ...
Yes the impellor can agitate the fluid. When dealing with fluid flow there are two things to consider: viscous forces and inertial forces. By setting the viscosity to zero you make all the viscous forces zero, but you would still have inertial forces. As your impellor blade (or whatever) rotates it pushes the liquid....
Nothing that moves inside a classical inviscid fluid can generate vorticity, but if you are willing to accept irrotational flows as being agitated, that certainly happens. There is a concept of added mass. Suppose I try to accelerate a sphere that is immersed in an inviscid fluid. I will also have to accelerate the flu...
https://physics.stackexchange.com
334,172
[ "https://mathoverflow.net/questions/334172", "https://mathoverflow.net", "https://mathoverflow.net/users/360/" ]
Suppose that <span class="math-container">$k$</span> is a commutative ring and that <span class="math-container">$A$</span> is an Azumaya <span class="math-container">$k$</span>-algebra. Then there is a well-known morphism from <span class="math-container">$Aut_{Alg_k}(A)$</span>, the group of algebra automorphisms, to...
It seems to me that the involution of <span class="math-container">$Q \otimes Q$</span> that exchanges <span class="math-container">$a \otimes b$</span> and <span class="math-container">$b\otimes a$</span> is inner, which means that the homomorphism you describe should always be trivial. Here is the argument, I hope i...
Here is another way to see that the given map should be zero. It corresponds to a map of sheaves of grouplike <span class="math-container">$\mathbb{E}_\infty$</span>-spaces <span class="math-container">$K(\mathbb{G}_m,2)\rightarrow K(\mathbb{G}_m,1)$</span>. All such maps are nullhomotopic (for example by delooping to ...
https://mathoverflow.net
201,565
[ "https://softwareengineering.stackexchange.com/questions/201565", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1560/" ]
From the texts I have read so far, the conventions talk about organizing <code>constructors</code>, starting with the <code>default</code>, if any. I am wondering, should all classes have a <code>default constructor</code> anyway. This will at least help to create a simple instance of the <code>class</code> on the fly,...
Generally speaking, you should have constructors for classes that take enough parameters to properly initialize the object being created into a valid state. If your class is able to provide sane defaults for all fields that comprise a valid state for objects of that class, then a default constructor is most likely a g...
The reason that some classes opt to have only a complex constructor is often that they cannot work usefully without knowing core information about an instance. Being able to create a trivial instance is not benefit in this case - in fact, it is probably a disadvantage, because then all methods must be able to deal with...
https://softwareengineering.stackexchange.com
1,293
[ "https://chemistry.stackexchange.com/questions/1293", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/701/" ]
Applying pressure can result in chemical changes, does this hold true for an avocado?
Your title and question are a bit different. <blockquote> Is crushing an avocado a chemical or physical change? </blockquote> Physical. Crushing (or any other physical manipulation of) any substance is, by definition, a physical change. However, those physical changes can affect the conditions for a chemical chang...
I don't think so. A chemical change implies changing molecular-level structure usually accompanied by transferring electrons. When you squish an avocado you're only rearranging the fats, carbohydrates, and fiber in it - I don't think a chemical reaction occurs. If you left it out, and it turned brown (oxidized), t...
https://chemistry.stackexchange.com
11,981
[ "https://quantumcomputing.stackexchange.com/questions/11981", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/7598/" ]
I want to do a circuit with more than 1 million shots. How do I change the number of max_shots of Aer qasm_simulator in Qiskit? When I run it, it said <code>Number of shots specified: 1000001 exceeds max_shots property of the backend: 1000000.'</code>. Can someone help me? Thanks!
<code>backend._configuration.max_shots= ...</code> Will do what you want.
I don't think that this parameter can be altered, I can't see a situation where you should need this many shots. You can pass more than one circuit to the execute function, so if you do <code>execute([qc, qc], shots=100)</code> each circuit will be run for 100 shots, giving you a total of 200 shots. You could use a met...
https://quantumcomputing.stackexchange.com
162,768
[ "https://dba.stackexchange.com/questions/162768", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/116348/" ]
I have to implement some safety authentication rules on postgresql DB with a windows server. For example, rules may be "users not used for a period longer than three months will be locked" or "postgres enforces account lockout after a set number of failed login attempts." Using authentication "standard" ( md5 on pg_h...
With the intention of describing how you <em>could</em> do this with a hierarchical key/value pairs table, supporting foreign keys, I've built the following tiny test-bed of code that allows exploring how the structure might work. Do this in tempdb, to avoid killing anything "interesting": <pre><code>USE tempdb; IF O...
There are a couple of things that can reduce the number of primitive tables. One is to group things Logically at a "near-primitive" level. Your example includes OS, OS version, (and could be broken down to OS patch level to capture the Service Packs...). You could build an OS table that includes these primitives group...
https://dba.stackexchange.com
481,011
[ "https://physics.stackexchange.com/questions/481011", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/232405/" ]
When a neutron is added to the nucleus of Uranium-238, it becomes Uranium-239. Now, the Uranium-239 undergoes a β-decay and becomes Neptunium-239. This Neptunium-239 again undergoes another β-decay and becomes Plutonium-239. Now the question is, what causes the β-decay in Uranium-239 and Neptunium-239?
It is all about stabilising <span class="math-container">$n/p$</span> ratio. Atoms tend to stable when their <span class="math-container">$n/p$</span> ratio approaches 1. Heavier elements usually have more neutrons than protons. By emitting a <span class="math-container">$\beta$</span> particle, their proton count inc...
In the nucleus of large atoms, the strong nuclear force must overcome or match the electrostatic repulsion between protons in order to remain stable. Thus if the nucleus is too large due to an abundance of neutrons, the strong force will be unable to keep the nucleus stable for long. This requires a change in the numbe...
https://physics.stackexchange.com