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 |
|---|---|---|---|---|---|
61,840 | [
"https://mathoverflow.net/questions/61840",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14312/"
] | Do you believe P=NP?<br>
I've seen some mathematicians say that if P=NP their work would be worthless and restricted to enunciating theorems. They seem to believe that there exist an almost philosophical impediment to P=NP. Do you agree with that? Does the possibility of P=NP bother you?
| Contrary to a popular misunderstanding: if P = NP, then the proof of any statement $A$ can be found by an algorithm in time polynomial <em>in the length of the shortest proof of $A$</em>, not in the length of $A$ itself. Moreover, the exponent of the polynomial could easily be so large as to make this algorithm practic... | "Do you believe P=NP?" - no.
"...Do you agree with that? Does the possibility of P=NP bother you?" - no.
But what I believe does not matter very much...
| https://mathoverflow.net |
143,262 | [
"https://physics.stackexchange.com/questions/143262",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/58610/"
] | I've been trying to work the following problem:
<blockquote>
If a system has a time-independent Hamiltonian with spectrum $\{E_n\}$, prove that the probability of measuring the energy $E_k$ is also time-independent.
</blockquote>
To approach this, I differentiated the amplitude $\langle E_k\lvert\psi\rangle$ with t... | Your derivation is not correct, since $c_k=\langle E_k|\psi\rangle$ is the coefficient of the expansion of $|\psi\rangle$ in the basis $\{|E_k\rangle\}$:
$$|\psi\rangle=\sum_kc_k|E_k\rangle$$
and your derivation is implying that $\dfrac{dc_k}{dt}=0$, that is, $|\psi\rangle$ is a stationary state. But that cannot be tru... | <ol>
<li>As far as I can tell, you haven't used <span class="math-container">$\partial \hat{H}/\partial t = 0$</span>. If you know that the statement in the question should <em>not</em> hold for a time-dependent Hamiltonian, that's a big clue that this proof isn't valid. Otherwise you could apply the proof to any arbit... | https://physics.stackexchange.com |
84,189 | [
"https://softwareengineering.stackexchange.com/questions/84189",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/19700/"
] | I hope this question isn't too broad. In the future I may need to add some accounting and financial-tracking systems to some applications (mostly web-based applications, but my questions pertains to desktop apps as well).
Now, creating a simple record of financial transactions is theoretically easy. One database tabl... | You will get many answers to this I am sure, many idealist answers too, I can only answer from my experience with financials and what actually goes on.
You have already covered the majority of issues.
Rounding precision tends to not actually be much of an issue in my experience. The majority of large financial organ... | <strong>The considerations are mostly legal ones</strong>. If you just look on it from a safety/reliability perspective, an excel sheet may not be inherently less secure than a sheet of paper in some drawer. Access' transactional integrity may be better than that of a clerk who gets interrupted by a call.
But, in orde... | https://softwareengineering.stackexchange.com |
53,962 | [
"https://security.stackexchange.com/questions/53962",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/42567/"
] | Can I get MAC addresses of devices (mobile phones) which are near to my network but not connected to it? (Linux)
I have been trying to get the MAC addresses of devices connected to my network through <code>nmap</code> command... but how can I get devices which are not connected to my network?
| If it's not in the same network, you most likely won't be able to.
MAC addresses are hardware addresses and are usually hidden behind a router unless you are on the same network or have direct access to the device. In other words, once you leave the network, unless the device(s) in question is/are directly connected ... | It is possible to find the MAC addresses of devices that are physically close to you if they have wifi enabled.
When a device sends data packets over wifi they are stamped with the sender's MAC address and the destination MAC address (typically a wireless router). The contents of the packet will most likely be encryp... | https://security.stackexchange.com |
3,381,426 | [
"https://math.stackexchange.com/questions/3381426",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/630118/"
] | <span class="math-container">$$
\sum_{k=1}^{\infty}\frac{(k!+1)!}{((k+1)!)!}
$$</span>
I have to discover whether this series is convergent or divergent. I already tried ratio test and Stirling's approximation. In both cases I struggled with difficult calculations that did not lead me to the answer. Perhaps there is an... | Observe that <span class="math-container">$$(k+1)!-1>k!+1\forall k\geq 2$$</span>
<span class="math-container">$$\Longrightarrow \sum_{k=1}^\infty \frac{(k!+1)!}{((k+1)!)!}=1+\sum_{k=2}^\infty \frac{(k!+1)!}{((k+1)!)!}$$</span>
<span class="math-container">$$=1+\sum_{k=2}^\infty \frac{(k!+1)!}{(k+1)!((k+1)!-1)!}$$</... | This series is convergent because <span class="math-container">$((k+1)!)!$</span> is much bigger than <span class="math-container">$(k!+1)!$</span> so we can compare it :
Notice that if <span class="math-container">$a_n > b_n$</span>, then <span class="math-container">$a_n! \ge b_n! \times a_n$</span>, and so we ge... | https://math.stackexchange.com |
388,584 | [
"https://softwareengineering.stackexchange.com/questions/388584",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/315183/"
] | Right now I'm doing this:
<ol>
<li>Update the readme to include the new version number and what it does.</li>
<li>Commit the version number in git commit message (i.e git commit -m "1.2.1: this does that").</li>
<li>Push the repository.</li>
</ol>
Is this the proper way of doing it? I had a hunch that this is wrong, ... | Your code doesn't have a version. It's your compiled program which has a version.
Create the version number when you do the build and have a build step which tags the git repo at the point at which it pulled the source, with that version number
| You almost certainly want your version number to be somewhere in your source code (counting "source code" generously), so that your compiled / executable code knows its own version number - even to just be able to display it to a user. So if your program is version 2.1.4 then this should be somewhere in your source co... | https://softwareengineering.stackexchange.com |
36,024 | [
"https://electronics.stackexchange.com/questions/36024",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3639/"
] | I have this three keypad connection sketches, all of which i've seen in various application, and some i've also used, but i want to know if there is any advantage of one over the other.
<img src="https://i.stack.imgur.com/IGt4i.jpg" alt="enter image description here">
The keypad will be connected directly to DIO pins o... | Number 1 can be destructive for your controller. If you would use push-pull outputs for the columns, and the rows as inputs, then pressing two keys on the same row will short circuit the power supply through the microcontroller's outputs. If the microcontroller's outputs can be configured as open-drain, then there's no... | You could just add diodes to the first schematic if your microcontroller has built-in pull-ups or pull-downs.
<img src="https://i.stack.imgur.com/H7LZc.png" alt="Keypad connection">
The example shown assumes you have pull-ups on your inputs (to select a column you have to drive it low) and the state of the key is inv... | https://electronics.stackexchange.com |
105,327 | [
"https://physics.stackexchange.com/questions/105327",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/43355/"
] | In Weinberg's book <em>The Quantum Theory of Fields, Volume 1</em> on p.388 (Chapter 9), the following identity is used (with <span class="math-container">$f$</span> being any "reasonable" function):
<span class="math-container">$$f(+\infty) + f(-\infty) = \lim_{\epsilon \rightarrow 0^+} \epsilon \int_{-\infty}^{+\inf... | I can understand the identity qualitatively now:
If the function f(t) has a well defined value at $t = \pm\infty$, then for large values of $|t|$ the function f is essentially constant with values $f(-\infty)$ for $t < 0$ and $f(+\infty)$ for $t > 0$.
For tiny $\epsilon$ the Exponential factor $e^{-\epsilon |t|... | \begin{equation}
\begin{split}
I &= \lim_{\epsilon\to0} \epsilon \int_{-\infty}^{\infty} \mathrm{d} \tau \, f(\tau) e^{- \epsilon |\tau| } \\
&= \lim_{\epsilon\to0} \epsilon \int_{-\infty}^{0} \mathrm{d}\tau \, f(\tau) e^{\epsilon \tau } + \lim_{\epsilon\to0} \epsilon \int_{0}^{\infty} \mathrm{d}\tau \, f(\tau)... | https://physics.stackexchange.com |
1,948,885 | [
"https://math.stackexchange.com/questions/1948885",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/371933/"
] | In a text with deals with a type of objects $x$, I define a set like
$\mathcal{S}=\{x\in\mathcal{K}\mid p(x)\}$. Someone I know claims this is wrong because $\mathcal{S}$ will 'inherit' properties that are defined for $x$ elsewhere in my text. In particular, it may very well be the case that $x\notin\mathcal{K}$. The ... | <strong>Formally</strong>, the $x$ in $\{x\in K\mid p(x)\}$ is <em>bound by</em> the set builder notation, so it is "not visible" from outside the set builder and is completely distinct from any uses the letter $x$ may have outside it.
So for example,
$$ \bigl\{x\in\mathbb R \bigm| x-1 \in \{ x\in \mathbb R \mid x+x=x... | This question is very similar to asking what is the difference between:
$$x^2+3x+2=0$$
$$y^2+3y+2=0$$
And the answer is, <strong>absolutely nothing!</strong>.
| https://math.stackexchange.com |
178,921 | [
"https://softwareengineering.stackexchange.com/questions/178921",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/12893/"
] | How many bits of address is required (for the program counter for example) in a byte-addressed computer with 512 Mbyte RAM?
What does the formula look like?
How is this connected with the fact that 32 bits can address no more than 4 GB RAM?
| You need log2(n) bits to address n bytes. For example, you can store 256 different values in an 8 bit number, so 8 bits can address 256 bytes. 2<sup>10</sup> = 1024, so you need 10 bits to address every byte in a kilobyte. Likewise, you need 20 bits to address every byte in a megabyte, and 30 bits to address every byte... | You need the log (base 2) of the N bytes in order to address N bytes of RAM directly.
<pre><code>4 GB = 2^32 bytes
log_2( 2^m ) = m
</code></pre>
so
<pre><code>log_2( 2^32 ) = 32
</code></pre>
So a 32-bit address lets you directly reference 2^32 bytes (4 GB). A 64-bit address lets you directly reference 2^64 byte... | https://softwareengineering.stackexchange.com |
1,178,265 | [
"https://math.stackexchange.com/questions/1178265",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/69961/"
] | I'm supposed to be able to determine <strong><em>without calculations</em></strong> the determinant, inverse matrix, and n-th power matrix of the rotation matrix :
$\begin{pmatrix}
cos\theta & sin\theta \\
-sin\theta & cos\theta
\end{pmatrix} $
Can someone explain to me how I can do that ?
| <strong>HINTS</strong>
The determinant tells you by how much a linear transformation transforms areas (for $2\times 2$)/ volumes (for $3\times 3$)/ etc. So by what factor does this transformation change the area of say a square in the plane? That'll be your determinant.
The inverse matrix is the matrix which does t... | The matrices you wrote is a rotation in the plane by an angle of $\theta$. Therefore its inverse can be obtained by replacing $\theta$ by $-\theta$ as a rotation can be undone by a rotation with the opposite angle. Similarly its $n$th power will be a rotation by the angle $n\theta$. Finally as the determinant measures ... | https://math.stackexchange.com |
2,580,844 | [
"https://math.stackexchange.com/questions/2580844",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/516472/"
] | I have a series of 2D points $q_i$. I also have a convex quadrilateral defined by $P =(p_1,p_2,p_3,p_4)$. I would like to find a way to map these points into the coordinate space defined by $P$ such that new $\hat{q}_i$ would be in the range $\{0,1\}$ where $\{0,0\}$ is the bottom left corner of the quad, $\{0,1\}$ is ... | We start with
\begin{align}
y'+y&=x^2y^2\\
\frac {y'}{y^2}+\frac{1}{y}&=x^2
\end{align}
Let $$z=\frac 1y$$
then you have
$$z'=-\frac{y'}{y^2}$$
So
$$-z'+z=x^2$$
The integrating factor is
$$e^{-\int dx}=e^{-x}$$
So
$$(e^{-x}z)'=-x^2e^{-x}$$
Using integration by parts,
\begin{align}
e^{-x}z&=\int{-x^2e^{-x}}... | This is a Bernoulli equation. Divide by $y^2$ and set $u=\dfrac1y$, $u'=-\dfrac{y'}{y^2}$ to get a linear DE.
| https://math.stackexchange.com |
30,243 | [
"https://quant.stackexchange.com/questions/30243",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/11723/"
] | Do vega and gamma always have the same sign (ie both positive or both negative)? Under what circumstances can they have opposite signs?
| Usually vega and gamma go in the same direction, but you can have opposite exposure in a calendar spread.
For an ATM option, vega decreases closer to maturity while gamma increases. If you implement the following:
-long a 1 month ATM option
-short a 2 months ATM option
you should be long gamma and short vega.
| In the Black Scholes model, for an European option, we have
$$\text{Vega}=Ke^{-r\tau}\phi(d_2)\sqrt{\tau}$$
and
$$\Gamma=Ke^{-r\tau}\phi(d_2)\frac{1}{S^2\sigma\sqrt{\tau}}$$
thus
$$\frac{\text{Vega}}{\Gamma}=S^2\sigma{\tau}>0$$
| https://quant.stackexchange.com |
979,053 | [
"https://math.stackexchange.com/questions/979053",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/42323/"
] | Ok, so I stumbled upon the question on the title these days, when going over Apostol's Calculus I. Now, because of the placement of the question in the exercises section, I'm convinced that the book wants the reader to use the well known identity $${n \choose l} = {n \choose n-l}$$ So, I thought about the following: if... | $$\binom{14}{k} = \binom{14}{k-4}$$ implies that $$\frac{14!}{k! \, (14-k)!} = \frac{14!}{(k-4)! \, (18-k)!},$$ hence $$\frac{k!}{(k-4)!} = \frac{(18-k)!}{(14-k)!}.$$ Now note $$\frac{k!}{(k-4)!} = k(k-1)(k-2)(k-3)$$ and similarly, $$\frac{(18-k)!}{(14-k)!} = (18-k)(17-k)(16-k)(15-k).$$ By inspection, what integer va... | $$
{14 \choose k} = {14 \choose k-4} = {14 \choose 14 - (18-k)}
$$
So $k = 18-k$ and you get the answer.
| https://math.stackexchange.com |
24,934 | [
"https://electronics.stackexchange.com/questions/24934",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/7489/"
] | I have a car active subwoofer, 550w RMS, 1600w peak, which I would like to use in my home, and power it from 220v mains.
~133A is a fairly large ask from a transformer, I think, and even 46A seems quite high. I have a couple of computer PSUs knocking about, and I was wondering would it be possible to use a pair of t... | There is only one good reason to power a 500+ Watt car amp from AC mains: to save money by using what you have. From an electrical and practical point of view, it's silly.
Assuming you want to save money then the best way would be to use a car battery plus battery charger. The battery provides energy storage for the ... | Sounds like you need a 12V supply that can source at least 46A continuously (for the 550W), with capability to give out 133A for brief periods of time (for the 1600W). That's a lot of juice at 12V.
Computer power supplies are what's known as 'switching' regulated power supplies. They are a fair bit more complicated t... | https://electronics.stackexchange.com |
405,688 | [
"https://softwareengineering.stackexchange.com/questions/405688",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/300601/"
] | I am new to design patterns and working my way through the Factory Method and Strategy patterns. I understand that Factory is a creational pattern and Strategy is behavioral but I struggle to understand when to use which one. For example, I have the following classes that updates client details based on the company spe... | You are correct that these have a lot of similarities. As mentioned in other answers, the difference is about goals.
The Strategy pattern is often misunderstood but it's also one of them most valuable patterns for simplifying code. The key to the pattern is that it allows you to have objects that change their behavi... | <blockquote>
My question is - am I understanding the patterns correctly?
</blockquote>
Mostly. Your factory implementation, while correct, is a little odd because the only difference is <code>UpdateDetails</code>. This sort of thing would be better done as a strategy (a simple lambda in C#). In practice, factories t... | https://softwareengineering.stackexchange.com |
7,691 | [
"https://cs.stackexchange.com/questions/7691",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/5271/"
] | I have a recursive algorithm with time complexity equivalent to choosing k elements from n with repetition, and I was wondering whether I could get a more simplified big-O expression. In my case, <span class="math-container">$k$</span> may be greater than <span class="math-container">$n$</span> and they grow independe... | <strong>Edit:</strong> This answer is for $k<n$. Without bounding $k$ in terms of $n$ the expression is unbounded.
If $k=n-1$ then your expression becomes
$O\left ({{2(n-1)}\choose{n-1}}\right)$. Notice that by Stirling's formula for any $0<\alpha<1$
$${m \choose {\alpha m}}= \Theta(m^{-{1/2}} 2^{H(\alpha)m}... | Wolfram says Sondow (2005)[1] and Sondow and Zudilin (2006)[2] noted the inequality:
$$\frac{1}{4rm}\left[\frac{(r+1)^{r+1}}{r^r}\right]^m < {(r+1)m \choose m} < \left[\frac{(r+1)^{r+1}}{r^r}\right]^m$$ for $m$ a positive integer and $r\ge 1$ a real number.
We can then use
$${n+k-1\choose k} < {n+k\choose k}... | https://cs.stackexchange.com |
1,508,025 | [
"https://math.stackexchange.com/questions/1508025",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/279202/"
] | How can I prove that $(A+B)^n = A^n + B^n$ for all integers $n \geq 1$ ?
I have been thinking about induction? Start for example with basecase 2 and then assume it's true for n = k, which would imply it's true for n = k + 1. But exactly how would this look, could someone help me please? I guess something like $(A+B)^{... | Once you establish $AB = BA = 0$ the induction is easy:
We will take as our base case $n = 2$ (so we may assume later $n$ is at least $2$ -the case $n = 1$ is trivial).
$(A + B)^2 = (A + B)(A + B) = A^2 + AB + BA + B^2 = A^2 + 0 + 0 + B^2 = A^2 + B^2$.
Suppose $(A + B)^{n-1} = A^{n-1} + B^{n-1}$.
Then $(A + B)^n = ... | Your matrices have the property
$$AB = BA = 0$$
We can use <strong>commutativity</strong> of your matrices and binomial theorem to write
$${\left( {A + B} \right)^n} = \sum\limits_{i = 0}^n {\left( {\begin{array}{*{20}{c}}
n\\
i\end{array}} \right)} {A^i}{B^{n - i}}$$
But since $AB=0$ all of the terms in the above ... | https://math.stackexchange.com |
56,776 | [
"https://physics.stackexchange.com/questions/56776",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/3183/"
] | I am teaching a multivariable calculus course and we are starting to go over surface integrals. I am a math professor with little knowledge of physics. At one point the book discusses fluid flow. It is trying to convince me that the surface integral of a velocity field is the flow of the fluid across the surface. I... | Let's first assume that "how much fluid" means "the mass of fluid." Let $\rho(t, \mathbf x)$ denote the volume mass density of the fluid at time $t$ and position $\mathbf x$ in space and let $\mathbf v(t, \mathbf x)$ denote the velocity vector field of the fluid. The vector field
$$
\mathbf j = \rho\mathbf v
$$
giv... | I could imagine, the word "across" is poorly choosen. It seems one could confuse it with the flow along the surface, parallel to it.
However, the surface intergral as you described above gives you the flux or flow through the surface, entering one side and leaving the other side of the surface.
"how much the fluid w... | https://physics.stackexchange.com |
169,702 | [
"https://chemistry.stackexchange.com/questions/169702",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/31881/"
] | I'm looking at <em>Elements of Physical Chemistry</em> by Atkins and de Paula. In section 1A.3, they state Dalton's law as
<blockquote>
The pressure exerted by a mixture of perfect gases is the sum of the pressures that each gas would exert if it were alone in the container at the same temperature:
<span class="math-co... | After discussion with other commenters and answers, here is a summary of the issues with the text quoted in the question.
First, there are two non-equivalent definitions of the partial pressure <span class="math-container">$p_i$</span> being used.
<h3>Definition 1</h3>
The first is given only in the text immediately pr... | There is no inconsistency as far the pasted text goes. Before studying <em>any</em> derivation or law, we should know their assumptions. <em>Once</em> we accept those conditions and the assumptions, the derived equations become valid. With the following assumptions, Equation (1) and (2) are perfectly consistent as long... | https://chemistry.stackexchange.com |
312,379 | [
"https://dba.stackexchange.com/questions/312379",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/252803/"
] | This has probably been asked before, but I couldn't find the answer.
I have a complex datamodel in sql-server-20XX (more likely to be something old) in which cascade delete has been turned off (by design).
A large chunk of our database has been sold (I can make the distinction on the top-level) and there are reasons wh... | SQL Server doesn't let you <code>ALTER CONSTRAINT</code> to alter an existing constraint to cascade on delete. However, SQL Server will happily let you create identical Foreign Key constraints. So rather than having to mess with your existing FK constraints, you can simply create some new ones, which will help you do y... | There is no syntax for that, I'm afraid. I.e., there's no "ALTER CONSTRAINT" in SQL Server.
You can ALTER TABLE and DROP CONSTRAINT and then ADD CONSTRAINT to add the new one. If you feel that you trust the data, and aren't afraid that somebody modified while you do this, you can add it back (first time with ... | https://dba.stackexchange.com |
1,527,014 | [
"https://math.stackexchange.com/questions/1527014",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/262120/"
] | <blockquote>
Q) A circle $C_{1}$ is drawn having point P on x-axis as its centre
and passing through the centre of the circle $C:x^2 +y^2=1$. A common
tangent to $C_{1}$ and $C$ touches the circles at Q and R
respectively . Then $Q(x,y)$ always satisfies $x^{2}=\lambda $ , then
find $\lambda$ ?
</blockquote>
... | Slope form of tangent equation of circle with centre $(a,b)$, slope $m$ and radius $r$ is: $(y-b)=m(x-h)+r\sqrt{1+m^2}$
let tangent to $C$ be: $y=mx+\sqrt{1+m^2}$
Tangent to $C_1$: $y=m(x-h)+h\sqrt{1+m^2}$
$(h,0)$ is the centre of $C_1$
Since the tangents represent the same line, $$-mh+h\sqrt{1+m^2}=\sqrt{1+m^2}$$
... | $\boldsymbol{r\lt1}$
Using similar triangles, we get the $x$-coordinate of $Q$ to be $r+(1-r)=1$.
<img src="https://i.stack.imgur.com/uaPVm.png" alt="enter image description here">
The sum of the orange and lavender segments times $r$ should be the length of the lavender segment; that is,
$$
\frac{\color{#C00000}{r}... | https://math.stackexchange.com |
426,572 | [
"https://softwareengineering.stackexchange.com/questions/426572",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/385136/"
] | Assume a Person has a <strong>Phone</strong> and a <strong>Phone</strong> has <strong>Contacts</strong>. Assume in the real world the Contacts of a Phone are sorted by their first name.
When I <code>phone.add(Contact c)</code>, the phone sorts its contacts. Then this contact has its first name changed. How can phone kn... | Contacts should only be sorted upon retrieving them. The call to <code>getContacts()</code> should sort contacts and then return the sorted list. The sorted collection could be an independent object from the original list of contacts, allowing you to make it unmodifiable.
Since a list of contacts is typically small (le... | Not quite language agnostic, as it relies on functions being first-class values, but you could provide a modify operation.
As a sketch
<pre><code>public void modifyContact(Id id, Function<Contact, Contact> modifier) {
Contact old = find(id);
removeContact(old);
Contact new = modifier(old);
addCont... | https://softwareengineering.stackexchange.com |
195,964 | [
"https://electronics.stackexchange.com/questions/195964",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/89264/"
] | I have been reading a number of articles about current. They seem to suggest that "conventional current" flows from the positive terminal to the negative terminal but actual current flows from the negative terminal to the positive terminal.
Since the direction of current merely seems to be a matter of convention and c... | There are indeed MCUs that will use a 32.768 kHz crystal to run their primary oscillator that then can get stepped up to a much higher frequency using a PLL for the main CPU clock. The primary reason for operating in this manner comes from two usage scenarios:
The first one is where the MCU has an built in RTC that u... | Different crystals have different jobs. A RTC crystal is designed for reduced long term drift. This allows for accurate time tracking over extended periods.
| https://electronics.stackexchange.com |
1,342,202 | [
"https://math.stackexchange.com/questions/1342202",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/251125/"
] | I have a very simple question. Suppose I want to evaluate this limit:
$$\lim_{x\to \infty} \frac{x}{x-\sin x}$$
It is easy to evaluate this limit using the Squeeze theorem (the answer is $1$). But here both the numerator and the denominator are going to infinity as $x\to \infty$ so I tried using L'Hospital's rule:
$$... | Another condition, very often forgotten, is that in some neighbourhood of $a$ (here $a=+\infty$), except perhaps at $a$, $g'(x)\neq 0$. This is not the case here: $1-\cos x$ is $0$ infinitely many times.
This is a good illustration why L'Hospital's rule is dangerous. One of the first things I learnt when I was a stude... | A precondition in l'Hospital's Rule is that in order for it to apply, the limit
$$
\lim_{x\to\infty}\frac{f'(x)}{g'(x)}
$$
must exist (but is allowed to be $\pm \infty$). In this case, the limit does not exist, so it does not apply.
| https://math.stackexchange.com |
6,890 | [
"https://physics.stackexchange.com/questions/6890",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | The question is hard for me to put into one sentence so please try to completely read the example :
<blockquote>
If I had a stick that is <span class="math-container">$1000 \ \mathrm{Km}$</span> long and I would push it forward with <span class="math-container">$1 \ \mathrm{mm}$</span> in lets say... <span class="math-... | There is no such thing as an incompressible stick. When you push on your end, a compression wave travels down the stick at the speed of sound, which is much slower than the speed of light. The other end of the stick does not move until this compression wave reaches it.
I think the rest of your problems disappear witho... | Here's the answer to your first example:
Though it might take you only 10 ms to push your end of the stick, it would still take a much longer time for the effect of that to reach the other end. This is because there are no perfect rigid bodies. An impulse at one end has to travel at the speed of sound in the material,... | https://physics.stackexchange.com |
28,496 | [
"https://electronics.stackexchange.com/questions/28496",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/2473/"
] | For example, if a Pick and Place machine accidentally drops a component, will it realize this and grab an identical replacement?
The only reason I can think of as to why it wouldn't do this is to save time.
| The machine will detect failure to pick a part up to the point where the vision system sees it, but not usually afterwards.
The normal process is for PCBs to be visually inspected, either manually or automatically as a seperate process after placement, to detect misplaced or dropped parts.
Most P&Ps will probably n... | Visual inspection is getting ever harder with parts becoming smaller and smaller. Note that an 01005 resistor or capacitor is only 0.4mm long, and a camera can't always tell whether the part is there or whether it's looking at the bare soldering pads.<br>
Also: visual inspection after each placement is expensive. A P&a... | https://electronics.stackexchange.com |
437,245 | [
"https://softwareengineering.stackexchange.com/questions/437245",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/411852/"
] | When writing tests for TDD is it good (or bad) practice to write multiple test for the same requirement ? If it's good how many times should it be repeated? If it's bad is it it the QA engineers work to do so?
E.g. Testing a calculator that adds 2 numbers.
<pre><code># import stuff here
def test_Cal(self):
self.a... | Classic TDD suggests writing a <em>single</em> example, then writing the code that makes the example work. If there are more requirements that are not covered by this example, then adding new examples and writing more code makes sense. By itself, adding more examples doesn't demonstrate anything useful. But more exampl... | In TDD, you usually start with <em>one</em> test:
<pre><code>def test_Cal(self):
self.assertEqual(Calculator.cal(self,1,2),3)
</code></pre>
(Let's assume your goal is to make <code>cal</code> just to add its inputs).
Next, you start implementing the function so it makes the test succeed. In case you implement it as ... | https://softwareengineering.stackexchange.com |
234,344 | [
"https://mathoverflow.net/questions/234344",
"https://mathoverflow.net",
"https://mathoverflow.net/users/7646/"
] | Let <span class="math-container">$f$</span> be a compactly supported <span class="math-container">$C^{\alpha}$</span> function (that is Holder continuous with exponent <span class="math-container">$\alpha$</span>) and let <span class="math-container">$g$</span> be a compactly supported <span class="math-container">$C^\... | The statement is actually true. I guess it is possible to prove in many different ways. For the purpose of generality, and because it is the only proof that I came up with by chance, my proof will refer to Hölder-Besov spaces over a torus $\mathbb(T)$.
Let us suppose that $f \in \mathcal{C}^{\alpha} = \mathcal{B}^{\a... | While the proof given by Kore-N is very nice and easy to extend to more general scales of function spaces, I thought someone may find it useful to have a more direct argument. So here it is.
<hr>
Write <span class="math-container">$\Delta_h f(x) = f(x + h) - f(x)$</span>. Suppose that <span class="math-container">$f ... | https://mathoverflow.net |
124,297 | [
"https://mathoverflow.net/questions/124297",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25455/"
] | Suppose you are on a manifold. Suppose you have a trivial bundle and a trivial subbundle of it. If you divide this trivial bundle with its trivial subbundle, do you get a trivial bundle as a quotient? The answer is generally no. What are the conditions on the manifold (s.c. etc.) and bundles (codim e.g.) to get a trivi... | No. A ring $R$ for which $R$ is projective as a left $R\otimes_{\mathbb Z}R^{op}$-module is sometimes called separable over ${\mathbb Z}$.
This is equivalent to the splitting, as a surjection of $R\otimes_{\mathbb Z}R^{op}$-modules, of the multiplication map $R\otimes_{\mathbb Z}R\to R$. So applying $-\otimes_R M$, th... | I'm not sure what hypothesis you intend, but I don't think there's any reasonable interpretation under which it implies your conclusion.
Let $R=M={\mathbb Z}[X]$, acting on itself by multiplication from both the left and the right. Then $R\otimes R^{op}\approx {\mathbb Z}[X,Y]$ is a domain, and $(X-Y)$ annihilates $M... | https://mathoverflow.net |
1,758,008 | [
"https://math.stackexchange.com/questions/1758008",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/213802/"
] | I am working on the following exercise:
Find a matrix B and an invertible matrix P such that
$$A = \begin{bmatrix} 1 & -2 & 1 & 0 \\ 1 & -2 & 1 & 0 \\ 1 & -2 & 1 & 0 \\ 1 & -1 & 0 & 0 \\ \end{bmatrix}$$
is in Jordan Canonical Form.
This is my working so far:
I calc... | If one knows some theory of subharmonic functions, one can argue that $z \mapsto \lvert f(z)\rvert^2$ is subharmonic if $f$ is a holomorphic function, and strictly subharmonic unless $f$ is constant. Since the sum of subharmonic functions is constant, it follows that $\phi$ is subharmonic, and strictly subharmonic unle... | If $f(z) = \sum_{k=0}^{\infty}c_k(z-a)^k$ in $D(a,R),$ then the orthogonality of the exponentials shows
$$\tag 1\int_0^{2\pi}|f(a+re^{it})|^2\,dt = \int_0^{2\pi}|\sum_{k=0}^{\infty}c_kr^ke^{ikt}|^2 = 2\pi\sum_{k=0}^{\infty}|c_k|^2r^{2k}$$
for $0\le r <R.$ Note that $(1)$ is an increasing function of $r.$ Furthermore... | https://math.stackexchange.com |
426,565 | [
"https://softwareengineering.stackexchange.com/questions/426565",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/372608/"
] | I am currently working solo on a very small simple python microservice. I started building this app, mostly by habit, in a virtual environment. As I started to get closer to the point where deployment considerations needed to be made, I started to realize that all of the dependencies I'd need to include in the containe... | Absolutely, virtual envs are a great option for isolating dependencies. But only for dependencies that are Python packages. You also need configuration management on the server: for the available Python versions, for native libraries, and for other tools that might be needed. And I don't think you should copy a virtual... | There are limits how much the Python virtual environment can do. You cannot install the needed version of CUDA or Oracle database just with pip.
| https://softwareengineering.stackexchange.com |
388,554 | [
"https://math.stackexchange.com/questions/388554",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/70328/"
] | I got the following question:
How many numbers between 1 and 10,000,000 don't have the sequence 12? This is an inclusion-exclusion problem. Sadly I didn't fully understand its concept, so I tried solving it logically. I would like to know if my solution is correct, and if possible, how to solve it using the inclusion-... | So you have at most a 7-digit number (since 10,000,000 isn't a possibility): X-X-X-X-X-X-X, and the 12 can be in 6 different positions, so you have 1-2-X-X-X-X-X, X-1-2-X....,X-X-X-X-X-1-2. That is a total of $6*10^5 = 600,000$ different numbers. Now the hard part like I said above is finding the overlaps.
Suppose 12 ... | Keep track of the amount of $n$-digit numbers ending in $1$ and not ending in $1$, starting with $n=1$
$$
v_1 = \begin{pmatrix} 1 \\ 8 \end{pmatrix}
$$
so $1+8 = 9$ numbers in total. The vector for $(n+1)$-digit numbers ending in $1$ and not ending in $1$ that do not contain the sequence "$12$" can be obtained by a ... | https://math.stackexchange.com |
19,056 | [
"https://electronics.stackexchange.com/questions/19056",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/2824/"
] | I brought a clap activated switch project to practise my soldering. I realised clap activated was really sound activated. Is there a way I can get it to be able to tell the difference between me talking to myself and clapping?
I was assuming I can some how get it to only work within certain frequency.
| Take a look at a clap signal and a normal talking signal on the scope. Probably the biggest difference will be the sudden spike from the clap. There is probably a frequency content difference too, but I suspect it will be easier to detect a clap in the time domain.
One way to test this is to record a few samples of ... | What's typical for clapping hands is that it's a sudden short, but strong sound.<br>
A possible way to detect it is to trigger an MMV (Monostable MultiVibrator) with the input signal if it's higher than a certain threshold, and see if this high level is still present when the MMV times out. If it isn't it was probably ... | https://electronics.stackexchange.com |
279,459 | [
"https://mathoverflow.net/questions/279459",
"https://mathoverflow.net",
"https://mathoverflow.net/users/91903/"
] | Looking for an example of a symplectic manifold $(M,\omega)$ that is not symplectomorphic to $(M,-\omega)$.
In particular this means that $M$ must be chiral (i.e. doesn't admit an orientation-reversing diffeomorphism).
For a topological obstruction, I think it would be enough to find $(M,\omega)$ such that $\mathrm{D... | Let $n \geq 2$ be a natural number and $M$ a torus of dimension $2n$. Then a generic element of $H^2(M, \mathbb R)$ comes from a symplectic form, because we can take a $2$-form invariant under the torus action representing it, and it is a symplectic, and a generic such form is nondegenerate.
Thus it is sufficient to s... | The following answer was a suggestion of Ivan Smith's. It seems like a very nice argument, although the proof is quite high-tech.
Suppose $X$ is a compact symplectic manifold. By adding a small generic 2-form, we can ensure that the coefficients of $\omega$ with respect to a basis of $H^2(X;\mathbb{Z})$ are linearly ... | https://mathoverflow.net |
14,119 | [
"https://scicomp.stackexchange.com/questions/14119",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/9466/"
] | I run Python/C simulations for biological problems, so the range of computational tasks can be broad. Here are some examples:
1) continuum model simulations: FEM type
2) agent-based simulations: each agent may be a 2D polygon, on whose vertices ODEs are defined, modelling the time evolution of interesting variables, ... | <em>Disclaimer: most of this is purely opinion.</em>
In the $600 range for a whole computer, I'm not sure that processor matters all that much, as long as the architecture is x86. If you want to run simulations locally, memory would probably be the first thing that I'd look at spending money on, and since the main use... | <em>(Turning a previous comment into an answer, because I want to say a bit more.)</em>
One thing you should keep in mind is that your time is significantly more valuable than any hardware (at least in the workstation range). So if you spend three days assembling your own machine (or fiddling with the voltages and mem... | https://scicomp.stackexchange.com |
30,193 | [
"https://physics.stackexchange.com/questions/30193",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/8795/"
] | I came across this problem. Please help me solve it.
<blockquote>
A radioactive sample S1 having an activity of <span class="math-container">$5\ \mathrm{\mu Ci}$</span> has twice the number of nuclei as another sample S2 which has an activity of <span class="math-container">$10\ \mathrm{\mu Ci}$</span>. The half lives ... | The decay rate is
$$\left|\frac{\mathrm{d}N}{\mathrm{d}t}\right| = \lambda N.$$
Half-life is
$$\tau_{1/2}=\frac{\ln 2}{\lambda}.$$
I think you can figure it now.
| Activity is the rate of nuclear events from a sample, measured in something like disintegrations per second. Think about how this would change with the amount of material, and also how it would be affected by a different half-life.
| https://physics.stackexchange.com |
167,515 | [
"https://dba.stackexchange.com/questions/167515",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/88366/"
] | I have a Django web application with postgresql 9.3.10 backend (sitting in a Linux OS). I ran into disk full error, such that even if I try to truncate a table, I get errors of the sort:
<pre><code>ERROR: could not extend file "base/30137/33186048": No space left on device
HINT: Check free disk space.
</code></pre>
... | Because PostgreSQL must write WAL before making any changes to tables, it needs free disk space in order to delete things and release more disk space.
If you let the disk fill up, you can't recover from within PostgreSQL. Even <code>TRUNCATE</code> still has to write to WAL.
So you <em>must</em> free some space on th... | A few more ideas on freeing up disk space in an emergency:
<hr />
<ul>
<li>If possible, prevent <em>new</em> client connections from being made.</li>
</ul>
<hr />
<ul>
<li>If possible, cancel non-critical running commands (<code>SELECT</code>, <code>COPY IN</code>, <code>COPY OUT</code>, <code>CREATE INDEX</code>, ...)... | https://dba.stackexchange.com |
302,229 | [
"https://stats.stackexchange.com/questions/302229",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/125475/"
] | I feel like there's no link between P(A) and P(A|B), where A and B are random events. For example, P(A) can be 0.3 and P(A|B) can be 0.9.
However, I'm not so sure of this when P(A) is either 0 or 1.
I mean:
<ol>
<li>P(A)=0 => P(A|B)=0, for every random event B ?</li>
<li>P(A)=1 => P(A|B)=1, for every random event B ?... | P(A) and P(A|B) are linked, since the occurrence of B does affect the probability of the occurrence of A.
example:
<ul>
<li>P(A) = You pass your exam = 0.3</li>
<li>P(B) = You study for you exam</li>
<li>P(A|B) = You studied, so there is a higher chance of passing your exam = 0.9</li>
</ul>
However, point 1 and 2 ar... | You have issues when $\mathbb P (B)=0$ but is not impossible
Consider for example $X$ a random variable with a standard Gaussian distribution $\mathcal N(0,1)$
<ol>
<li>Let $A$ be the event $X^2=4$ and $B$ the event $X=-2$. Then $\mathbb P (A)=0$ but $\mathbb P (A\mid B)=1$</li>
<li>Let $A$ be the event $X^2 \not... | https://stats.stackexchange.com |
61,273 | [
"https://dba.stackexchange.com/questions/61273",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/35872/"
] | I am moving data from one SQL Server to another. lets call them source and destination SQL server.
The source SQL Server has collation <strong>SQL_Latin1_General_CP1_CI_AS</strong> and the destination has collation <strong>Hebrew_CI_AS</strong>.
The destination's SQL Server's <strong>tables</strong> and their <strong... | would this script use a temporary table? Then the table will have the server default collation.
If it just a quick one-time solution, then I would modify the source query to provide the data in the correct collation, here Hebrew_CI_AS
| If you do not specify a collation when creating a table (regular or temporary or variable), then the database's default collation is used. When creating a temporary table (<em>not</em> table variable), it exists in tempdb, so tempdb's default collation is used. TempDB's default collation is derived from the server defa... | https://dba.stackexchange.com |
28,757 | [
"https://mechanics.stackexchange.com/questions/28757",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/9164/"
] | <h1>Moar Horsepower?</h1>
<strong>The 1979 Mazda RX7 - Desireable Track Car</strong>
It seems this platform is very popular in club racing today. You see them as prized possessions at SCCA gatherings to simple track days. The Wankel engine can be punished time and time again and doesn't suffer from the same weaknes... | I agree with your praise for this car, I had one back in the day and I have never loved a car as much since.
To get more from this Wankel powered beauty, it's all about two things:
<ul>
<li>Getting it to breath better</li>
<li>Replacing parts that won't take the higher RPM</li>
</ul>
The good news is that the only p... | Just like with any other internal combustion engine, there are two ways to increase power output: add more cubic inches of displacement; make the motor <em>think</em> it has a larger displacement.
<h2>More Displacement</h2>
The rotary engine (Wankel) is a different breed. You cannot just bore/stroke the engine like w... | https://mechanics.stackexchange.com |
319,889 | [
"https://softwareengineering.stackexchange.com/questions/319889",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/230480/"
] | I have a feature where scanned exam answer books need to be digitally annotated and marked.
The scanning portion of the work is with another vendor who refuses to scan in any format other than PDF as it's more secure and unalterable.
I need to develop code that can show the 20-odd pages in the PDF on screen using a w... | Well, see it this way: your input scan is already a raster image (the fact those raster grafics are in embedded in PDF is mostly irrelevant), so a raster image based process is all you can expect. Utilizing OCR might be an option, but it would probably only complicate the process with no real benefit and an additional ... | Adobe Acrobat (and other PDF software, as well) has many annotation features. The one that I would recommend is the "rubber stamp". You could have a red X and a green check mark defined as stamps, as an example. You can then plop them down on the PDF image where you want and then re-save the PDF.
| https://softwareengineering.stackexchange.com |
111,161 | [
"https://physics.stackexchange.com/questions/111161",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/38122/"
] | I have a few issues with making the transition between these:
$\phi(x)=\int{\frac{d^3p}{2\pi^3}\frac{1}{\sqrt{2\omega_{\vec{p}}}}(a_{\vec{p}}e^{i \vec{p} \vec{x}}+ a^{\dagger}_{\vec{p}}e^{-i \vec{p} \vec{x}}})$
$\pi(x)=\int{\frac{d^3p}{2\pi^3}(-i)\sqrt{\frac{\omega_{\vec{p}}}{2}}(a_{\vec{p}}e^{i \vec{p} \vec{x}}- a^{... | The answer depends on whether you represent the operators in the Schrödinger or Heisenberg picture. In the Schrödinger picture, there is no explicit time-dependence of the operators. Hence, the conjugate momentum is <em>not</em> given by the time derivative of the field. The concrete form is rather given by analogy to ... | I think your confusion arises from a misunderstanding of the mode expansion of the field.
For a real scalar field we usually write the Fourier expansion as
$$\phi(x)=\int \frac{d^3k}{(2\pi)^3}a^\dagger v_k e^{i\vec{k}\cdot\vec{x}}+a v_k^* e^{-i\vec{k}\cdot\vec{x}}$$
However, now we still have to find the mode function... | https://physics.stackexchange.com |
8,909 | [
"https://computergraphics.stackexchange.com/questions/8909",
"https://computergraphics.stackexchange.com",
"https://computergraphics.stackexchange.com/users/6496/"
] | I am integrating imgui into my app using glfw + vulkan example.
The function vkCreateSwapchainKHR() is also called by imgui setup logic in addition to my app on the same device and it fails with "internal drawable creation failed".
Under what circumstances, if any, would this be a valid approach?
Should my app and i... | The Vulkan specification is very clear on this:
<blockquote>
A native window <strong>cannot</strong> be associated with more than one non-retired swapchain at a time.
</blockquote>
You can create a new swapchain for a surface, but only by passing the old swapchain as the <code>oldSwapchain</code> parameter, which w... | Dear ImGui doesn't attempt to create a swapchain for your main window.
The <strong>example</strong> code (main.cpp) in the Vulkan back-end calls a helper <code>ImGui_ImplVulkanH_CreateWindowSwapChain()</code> which calls <code>vkCreateSwapchainKHR()</code>... well, because it is an example app.. you should probably no... | https://computergraphics.stackexchange.com |
138,465 | [
"https://electronics.stackexchange.com/questions/138465",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/52466/"
] | I have been using this fuse blown indicator circuit for a bit, it basically works perfectly fine with positive voltages no matter if there is or nor a load connected
<img src="https://i.stack.imgur.com/KeqVT.jpg" alt="enter image description here">
The problem starts when I feed the circuit with negative voltages, as... | Alongside the theory hopefully someone can confirm this to me
i had to sit for a while and read about how mosfets work, basically get activated by a voltage above 2.5v between Source and gate, this allows the current to flow from Source to Drain
in my circuits, using the PMOS for positive voltage and NMOS for negati... | Replace the PMOS with an NMOS and flip the LED around.
| https://electronics.stackexchange.com |
175,956 | [
"https://physics.stackexchange.com/questions/175956",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/57925/"
] | What is a good and easy way to compute and/or measure the force of a hammer blow, not using any fancy or specialized equipment?
If the hammer is swung by hand through an arc, it is not obvious to me how to measure the speed the hammer will be when it strikes the metal.
Also, when the hammer strikes the metal, the hea... | I did some more research on this question and read some old books on the subject written back in the days when America still had blacksmiths.
What I found out is that there are two basic stages in understanding the problem. The first is to compute the energy of the hammer, which proportional to mass times velocity squa... | Of course the force changes during the impact - so to get close to an answer, you need both the time of the impact and the magnitude of the momentum transfer.
As user77567 pointed out, a fairly simple way to measure momentum transfer is with a ballistic pendulum. This would be a heavy steel ball (much heavier than the... | https://physics.stackexchange.com |
124,622 | [
"https://dba.stackexchange.com/questions/124622",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/83371/"
] | I am filling my table in my SQL Server database with some data and I have partitions. I have one clustered index in the table. The problem I am facing is that I am not getting any fragmentation which I need in order to test. After reading some articles, I came to conclusion that I need to use file groups, but I am not ... | If you're trying to artificially induce fragmentation, insert the data "backwards". That is, if your clustering key is an integer column ascending, load the data in descending order by that same integer column. You should get page splits aplenty.
| Answering my own question might not be a good thing to do, but after testing "backwards" insert which works, this code in which I am using file groups works as well.
<pre><code>USE [mydb]
GO
CREATE UNIQUE CLUSTERED INDEX [myindex] ON [dbo].[mytable]
(
[my1] ASC,
[my2] ASC,
[my3] ASC
)WITH (DROP_EXISTING =... | https://dba.stackexchange.com |
563,925 | [
"https://electronics.stackexchange.com/questions/563925",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/277327/"
] | When we perform open circuit test, we measure the core losses and we neglect the copper loss resistance (and also the leakage flux inductance?). But when we perform the short circuit test we measure the copper losses neglecting the core losses.
What are the things that make that possible?
And also why only apply rated ... | In an open circuit test, the current flowing in the secondary is zero hence copper loss is zero in the secondary. In the primary, the only current is the magnetization current and, it is this current that causes core saturation. It's usually a small fraction of full load primary current hence, those copper losses assoc... | In open circuit test the current in the primary winding is small and the secondary has zero current. Losses happen mainly in the core assuming the primary is properly designed for the voltage.
In short circuit test the voltage is low. The core magnetization is low because the coupled primary and secondary currents caus... | https://electronics.stackexchange.com |
77,253 | [
"https://softwareengineering.stackexchange.com/questions/77253",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/17438/"
] | We all get them. What do you do when you are supposed to write a functional spec from a woolly proposal? You can write a ton of questions about the proposal but answers are not always forthcoming. Sometimes for political reasons you cannot make someone firm them up. How do you deal with a vague software proposal, when ... | I do as much as I can with what is <em>not</em> vague (which in some cases has been nothing, if you don't include setting up the workspace and naming the project), and then send an email to supervisors say "I need to get details regarding requirements X, Y, and Z or I cannot proceed". If the supervisor says "do it anyw... | You wouldn't expect someone to build an office building with <strong>vague</strong> requirements, why should someone expect you to build software with equally <strong>vague</strong> requirements.
Without concrete feature requirements, <strong>you are guaranteed to fail!</strong> Because you will never be able to meet ... | https://softwareengineering.stackexchange.com |
17,478 | [
"https://math.stackexchange.com/questions/17478",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/4366/"
] | If I can make two tools which would serve the same purpose and I need 10 times less time to make first tool but work with this tool is a half time slower than work with the second tool, after what period of time I will get advantage by making the tool with which I will work faster by 2 times (the second tool).
| If it takes $x$ hours to make the first tool then it will take $10x$ hours to make the second tool. Also, if a job takes $y$ hours with the first tool it will take $\frac{1}{2}y$ hours with the second tool. So you are asking when
$$
x+y\geq 10x+\frac{1}{2}y.
$$
Rearranging this inequality indicates
$$
y\geq 18x... | <strong>HINT</strong> $\:$ If the slow tool takes $\rm\:T\:$ hours to build, then the fast tool takes an extra $\rm\: 9\ T\:$ hours to build. For the double-speed tool to make up for this lost time in a job of $\rm\ J\ $ hours, its saved time of $\rm\ J/2\ $ hours must equal the lost build time $\rm\ 9\ T\:,\ $ i.e. $... | https://math.stackexchange.com |
482,382 | [
"https://electronics.stackexchange.com/questions/482382",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/33120/"
] | Is there a risk to connect different signals to a single oscilloscope input (without using suming amplifier)?
In my case, I need to measure a signal that can be triggered by 2 different triggers, the problem is that I do not have any free oscilloscope channels. So it would be practical for me to connect 2 triggers on ... | Installing Quartus ii 13sp1 solved the issue. I got by using the newer software+newer driver.
| I found out while using Quartus Standard, the answer is to disconnect other USB devices and the blaster is seen again by Quartus
| https://electronics.stackexchange.com |
279,222 | [
"https://mathoverflow.net/questions/279222",
"https://mathoverflow.net",
"https://mathoverflow.net/users/103722/"
] | Since the natural logarithm, i.e. with base $e$, is very commonly used in research papers and that both $\ln(x)$ and $\log(x)$ are used to denote it, it is natural* to ask which of these notations to use when preparing a paper. The fact that both are used in literature concerning the same topics gives rise to unnecess... | In number theory, the notation $ \log $ is commonly used, especially when asymptotics are considered. One also frequently uses the notation $ \log_{k} $ for the $ k $ -th iterate of this function. Indeed the natural logarithm is essentially the only one that matters. This may not be true for other subfields of math... | I would divide it into two cases:
<ol>
<li>If you care about the base being $e$, use $ln$ or state that $log$ is supposed to have base $e$.</li>
<li>If you only want a logarithm but don't care about which one, use $log$ (and maybe state that you don't care about the base). This case often arises when talking about gro... | https://mathoverflow.net |
108,238 | [
"https://electronics.stackexchange.com/questions/108238",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37902/"
] | I'm doing a thought experiment/napkin design for <strong>low cost</strong> cluster processor system. Some low cost, high MIPs CPUs chained together on a backplane. My first thought for a backplane is ethernet, because its ubiquitous and fairly easy to implement and run over short/medium distances and has good throughpu... | There's no real difference between "choice 1" and "choice 3", except for the drive mechanism.
There is no real "DC bias", since it only lasts for a half-period of the output waveform. This is no worse than driving the transformer with an actual sinewave.
Note that the transformer needs to be constructed so that it ca... | Dave answered your question nicely, but I want to point out a additional issue with choice 3.
Choice 3 is a perfectly viable alternative, but the voltages are usually flipped around. The main advantage of driving a center-tapped primary is that both switches can be on the low side, which generally makes them easier t... | https://electronics.stackexchange.com |
177,754 | [
"https://softwareengineering.stackexchange.com/questions/177754",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/29559/"
] | As a developer, can you tell your project manager that an application is <em>unworkable</em>? Or, if you're a project manager, how would you need this presented to you in order to be compelled? This isn't about "how to work on a poor project", it's assuming you cannot.
I can provide an example of the situatio... | When I read responses, I have the feeling many people underestimate how bad and unmaintainable a codebase can be.
Just to illustrate this, I'm working at place where the whole Project originated from one "main" file of hundreds of thousands of LOC. ...the worst part is that the beast got bigger and bigger over time:
... | Very rarely there is a case where there is an unworkable requirement, usually it's a "I don't want to", being phrased "I can't".
Never use absolutes like "Can't" and "Unworkable" unless you can prove it and are absolutely certain you have exhausted all options. You look like an idiot or a lair when it does get done. ... | https://softwareengineering.stackexchange.com |
190,403 | [
"https://dba.stackexchange.com/questions/190403",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/47638/"
] | I understand that if you don't pool database connections at all, then you bear the overhead of establishing a new database connection every time you need to query the database, which will make your app slow, and that you save that overhead by pooling.
If you set your max pool size too small - let's say, to 1 connectio... | <blockquote>
I understand that if you don't pool database connections at all, then you bear the overhead of establishing a new database connection every time you need to query the database, which will make your app slow, and that you save that overhead by pooling.
</blockquote>
Generally, but <em>it depends</em>... ... | The default max pool size is 100 and one should generally stick with that unless there are special requirements. Setting the max connection pools size higher than that means you could have that many queries against the database concurrently and exacerbate problems like long-term blocking or long-running queries.
Unuse... | https://dba.stackexchange.com |
134,168 | [
"https://math.stackexchange.com/questions/134168",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/27203/"
] | I'm dealing with an issue dividing polynomials, I have:
Determine the value of $a$ to make: $x^2 + 2x - a$ divisible by $x + 4$
I don't know even where to start, this $a$ confuses me a lot;
Thanks in advance;
But I'm still confused, I'm trying to divide it in the longer way, I've multiplied with an $x$ coefficient ... | Gerry's comment will lead you to consider something like this: If $x+4$ really does divide $x^2+2x-a$, then $$x^2+2x-a=(x+4)(x+c)$$ for some $c$ that we don't really know or care about. What happens if you plug in $x=-4$?
| The easiest way is to use the fact that $-4$ is a root of the polynomial $P(x)$ iff $x+4$ divides $P(x)$.
| https://math.stackexchange.com |
21,547 | [
"https://stats.stackexchange.com/questions/21547",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/8694/"
] | Some where I read a note that if you have many parameters $(x_1, x_2, \ldots, x_n)$ and you try to find a "similarity metric" between these vectors, you may have a "curse of dimensioality". I believe it meant that most similarity scores will be equal and not giving you any useful information. In other words almost all ... | Some classic observations on distances in high-dimensional data:
<ul>
<li>K. Beyer, J. Goldstein, R. Ramakrishnan, and U. Shaft, ICDT 1999: "When is Nearest Neighbors Meaningful?"</li>
<li>C. C. Aggarwal, A. Hinneburg, and D. A. Keim, ICDT 2001: "On the Surprising Behavior of Distance Metrics in High Dimensional Space... | <ul>
<li>Aggarwal C. C., Hinneburg A., Keim, D. A. (2001), ”On the
Surprising Behavior of Distance Metrics in High
Dimensional Space”</li>
<li>Beyer K., Goldstein J., Ramakrishnan R., Shaft U. (1999),
”When is Nearest Neighbors Meaningfull?”, ICDE
Conference Procedings.</li>
</ul>
| https://stats.stackexchange.com |
98,671 | [
"https://dba.stackexchange.com/questions/98671",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/64027/"
] | I have a C# application that communicates with SQL Server.
When I try to drop a user that recently had a connection with SQL Server, it gives me an error that I can't delete them because they have connections open in the database.
All SQL queries are appropriately wrapped in using statements but when I run sp_who, ... | Killing the connection processes did not work for me since the clients do not have permission to see process ID's.
In hopes that this might help someone else, this is what I ended up doing; call into SqlConnection.ClearAllPools immediately prior to trying to delete a User. This will truly disconnect any remaining conn... | <blockquote>
When I try to drop a person that recently had a connection with SQL Server
</blockquote>
Why are you doing this? What drove the need to have to do this?
It sounds like you're running into connection pooling. But connection pooling is there to help you, it's a great optimization. By clearing the pool... | https://dba.stackexchange.com |
130,962 | [
"https://electronics.stackexchange.com/questions/130962",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/50265/"
] | If the impedance at the load has the form of \$Z = R + jX\$, where \$R\$ and \$X\$ are positive real numbers, then then network is called inductive. If \$Z = R - jX\$, then the network is called capacitive.
Why is this the case and what do we do when there is both capacitance and inductance present at the load (i.e. \... | A capacitance \$C\$ has impedance
$$Z_{C} = \frac{1}{j\omega C}$$
But note that
$$\frac{1}{j} = -j$$
so equivalently
$$Z_{C} = -j\frac{1}{\omega C}$$
A capacitor's impedance therefore has a negative imaginary part.
An inductor \$L\$ has impedance
$$Z_{L} = j\omega L$$
and therefore has a positive imaginary par... | At any given frequency the network has an impedance that is just a single (complex) number, and if the imaginary part is negative then it's capacitive (at that frequency) and if the imaginary part is positive then it's inductive (at that frequency). If the real part is much bigger than the imaginary part, then it behav... | https://electronics.stackexchange.com |
93 | [
"https://physics.stackexchange.com/questions/93",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/71/"
] | Coulomb's Law states that the fall-off of the strength of the electrostatic force is inversely proportional to the distance squared of the charges.
Gauss's law implies that the total flux through a surface completely enclosing a charge is proportional to the total amount of charge.
If we imagine a two-dimensional world... | Yes, absolutely. In fact, Gauss's law is generally considered to be the fundamental law, and Coulomb's law is simply a consequence of it (and of the Lorentz force law).
You can actually simulate a 2D world by using a line charge instead of a point charge, and taking a cross section perpendicular to the line. In this c... | I would say yes !
Actually some theories explaining quantum gravity use also this reasoning: gravity is a very weak interaction at a quantum level because it "leaks" into other dimensions, not observable at our scale, but that are present at this scale.
The mathematical tools are different, but if you just think abou... | https://physics.stackexchange.com |
16,111 | [
"https://chemistry.stackexchange.com/questions/16111",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/5084/"
] | <img src="https://i.stack.imgur.com/ugtzI.png" alt="enter image description here">
I have been told that the first of the two acids is the <em>stronger</em> acid. According to this person,deprotonation for both occur at the nitrogen.The resulting conjugate bases include,respectively a neutral amine group,and a negativ... | The first compound is more acidic. The ammonium functionality is inductively electron withdrawing, stabilizing the conjugate base (carboxylic acid).
This answer is assuming that we are talking about the drawn structures exactly. User137 is correct that it's not possible to have the second compound, because the amine i... | Compound 1's conjugate base IS compound 2. The positive NH3 loses a proton to become the neutral NH2, but deprotonation of the NH2 group is extremely unlikely. Compound 2 will lose a proton at the carboxylic acid group first, so your friend is wrong to say deprotonation will occur at the nitrogen in both.
This will l... | https://chemistry.stackexchange.com |
50,431 | [
"https://dsp.stackexchange.com/questions/50431",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/20808/"
] | I am interested in the equation that depicts the resolution of an FMCW radar. I write the same below.
$\Delta d = \frac{c}{2b}$
First I would like to have an intuitive explanation to the above derivation.
Secondly, if possible, I would like to know why the chirp's gradient doesn't play a role in determining the r... | Definitions:
<ol>
<li>$\tau$: round-trip delay. $\Delta \tau$ = delay resolution.</li>
<li>$r$: range. $r=c\tau/2$. Range resolution $\Delta r = c \Delta \tau / 2$.</li>
<li>$B$: chirp bandwidth</li>
<li>$T$: chirp sweep time</li>
<li>$R$: chirp rate. $R=B/T$</li>
</ol>
Basic steps:
<ol>
<li>We estimate the dela... | The range resolution represented by the equation that you wrote in your question describes the capability of a radar to distinguish between two closed targets, so if the BW is much large then the resolution is better. by increasing the BW we enhance radar performance in tems of range resolution.
| https://dsp.stackexchange.com |
2,671 | [
"https://mathoverflow.net/questions/2671",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1057/"
] | Hello,
homotopic maps induce isomorphic pullback bundles, and so isomorphism classes of vector bundles over X correspond to homotopy classes of maps from the grassmannian to X. But I think, in the case of X = S^1 (the 1-sphere), the isomorphism classes of 1-bundles correspond to (the generators of) π___{1}(S^1), since... | The answer is no; Allen Hatcher sent me the following:
An example where this fails is the projection of the letter L onto its horizontal base, which I'll call B. The deformation retraction of L onto B is a fiberwise homotopy equivalence. The homotopy lifting property fails: Map a point to the left endpoint of B, th... | I think this can be extracted from Spanier's book. In Chapter 2.7, his Theorem 13 says that if B is a paracompact Hausdorff space, then a map p:E-->B is a fibration if and only if it is a local fibration. By a local fibration, he means that there is a covering {U_{\alpha}} of B such that for all \alpha, the map p res... | https://mathoverflow.net |
205,618 | [
"https://dba.stackexchange.com/questions/205618",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/72592/"
] | I am trying to run a query like the one below across multiple databases
<pre><code>select ParamValue from Table1 where paramname = 'SYSTEM_LICENSE'
</code></pre>
Each DB is named something like the one below and some DB should be excluded.
<blockquote>
"Customer_123"
</blockquote>
I looked at using sp_MSforeachdb... | Here's the "do something on each db" template I use, slightly adapted to your example:
<pre><code>--Create a table to hold the query results
CREATE TABLE #licenselist
(dbid smallint, dbname sysname, system_license varchar(99));
DECLARE @fixedname nvarchar(150);
--Include or exclude whatever databases you want
DE... | Thanks again, slightly modified to only query the DB I wanted and output only results with YES.
<pre><code>--Create a table to hold the query results
CREATE TABLE #licenselist
(dbname sysname, system_license varchar(99));
DECLARE @dbname SYSNAME;
DECLARE @fixedname nvarchar(150);
--Include or exclude whatever da... | https://dba.stackexchange.com |
197,806 | [
"https://security.stackexchange.com/questions/197806",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/37642/"
] | Is there anything against this TLS-configuration in Apache:
<pre><code>SSLProtocol TLSv1.2
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256
</code></pre>
There are lots of examples that use a more complicated setup, but I believe this configuration is both secure and easy to understand.
We expect our users to have a fairl... | There are no known vulnerabilities in TLS 1.2 or that cipher suite. If it works for you from a compatibility and performance standpoint, it's fine to use.
| This configuration is fine, although I recommend also offering one of the ChaCha20-Poly1305 suites and making that suite the preferred option. I would suggest that you offer <code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</code> if you are using RSA certificates, or <code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256... | https://security.stackexchange.com |
12,187 | [
"https://electronics.stackexchange.com/questions/12187",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3634/"
] | I'm coming from a stock Dodge headunit, which has regular analog output that goes up to 10 volts. Nothing fancy, when I had it going straight to the amp it worked fine. It's going into a regular JL amplifier, with a max input of 4v. I was sold a Raptor LOC15 converter to bring the voltage down.
Here's a diagram of wh... | Ok, so here's the deal. First you need to determine if the output of the head unit is balanced or unbalanced. This is fairly easy to figure out. First, find a GND connection. This could be a signal on another connector, or use the chassis ground. With the unit off, measure the resistance from GND to the negative o... | Put a capacitor between the input return ground and your system ground, and also put a high value resistor (1 Mohm probably) as well. That way, each ground can stay at their respective ground potential, but the high-ohm resistor will "pull down" either grounds that might be floating. The capacitor will allow signal... | https://electronics.stackexchange.com |
21,454 | [
"https://biology.stackexchange.com/questions/21454",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/8059/"
] | Problem
A transmembrane protein has 1000 aa. The 5th aa is found on the external side of the cell membrane. It interacts with the aqueous environment outside the cell. Amino acid 90 is inside the membrane bilayer. Aa 100-600 are intracellular, and 200-400 make a tight ball with minimal exposure to the aqueous cytoplasm... | I made a quick sketch on the basis of the information you gave (this is not to scale):
<img src="https://i.stack.imgur.com/3T6gO.png" alt="enter image description here">
Aminoacid 5 (aa5) of the protein is on the outside, aa90 is inside the membrane. What we don't know here where the transmembrane part starts (direct... | Membrane proteins are usually drawn as topological digrams with two parallel horizontal lines representing the membrane. lines as 'extracellular' and below the lines as 'intracellular' for instance, but that is not what is being asked for here.
Its not clear to me that the number of transmembrane spans are fully des... | https://biology.stackexchange.com |
319,061 | [
"https://stats.stackexchange.com/questions/319061",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/83134/"
] | The time between events in a Poisson process is described by the pdf $f(t; T_0)=\frac{1}{T_0}e^{-t/T_0}$.
I'm interested in estimating how long we would have to observe this process before we see two events separated by <em>at least</em> a specified time $T_{min}$. In other words, how long do I need to observe the pr... | This answer requires solving three subproblems:
<ol>
<li>How many bus arrivals $N$ do I expect to suffer through <em>before</em> experiencing a time between bus arrivals $> T_{min}$?</li>
<li>How long is the expected wait between buses $\mathbb{E}T_s$ given that $T_s \leq T_{min}$?</li>
<li>How long is the expected... | Think first about the number of events you expect to observe, think next about the amount of time it will take to observe those events.
Letting $N$ be the number of events before an inter-arrival time of at least $T_{min}$, see that $N$ is geometric with parameter $p=P(T_i>T_{min})$. Now let $T$ be the amount of ti... | https://stats.stackexchange.com |
372,976 | [
"https://math.stackexchange.com/questions/372976",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/74420/"
] | We have the formula $$5^k - 2^k$$
I have noticed that every answer you get from this formula is divisible by 3. At least, I think so. Why is this? Does it have to do with $5-2=3$?
| Yes, it does!
It's because in general you have the factorization:
$$
x^k-y^k = (x-y)(x^{k-1}+x^{k-2}y+\dots+y^{k-1})
$$
Substituting in $x=5$ and $y=2$ should show you why that works.
| Recall that $$a^k - b^k = (a-b)(a^{k-1} +a^{k-2} b + \cdots + a b^{k-2} + b^{k-1}) \tag{$\star$}$$
One way to see this is, to notice that
$$(a^{k-1} +a^{k-2} b + \cdots + a b^{k-2} + b^{k-1})$$ is the sum of first $k$ terms of a geometric progression with first term $a^{k-1}$ and common ratio $\dfrac{b}a$. We hence get... | https://math.stackexchange.com |
438,889 | [
"https://mathoverflow.net/questions/438889",
"https://mathoverflow.net",
"https://mathoverflow.net/users/419791/"
] | This question came about when I was naively considering to what extent generating sets for finitely-generated groups are unique.
Let <span class="math-container">$G$</span> be a group and let <span class="math-container">$\phi_1, \phi_2 : F_k \to G$</span> be two surjective homomorphisms from a free group on <span clas... | The answer is <span class="math-container">$K=2k$</span>, which is an exercise. Here is a sketch: Let <span class="math-container">$f\colon \langle x_i\rangle\to G$</span> be a surjective homomorphism, and <span class="math-container">$h\colon \langle x_i\rangle*\langle y\rangle\to G$</span> the map defined by <span cl... | The keyword here is "Nielsen equivalence". Two size-<span class="math-container">$n$</span> generating sets for a group <span class="math-container">$G$</span> are called Nielsen equivalent if the associated surjections <span class="math-container">$F_n \rightarrow G$</span> differ by an automorphism of <spa... | https://mathoverflow.net |
1,999,014 | [
"https://math.stackexchange.com/questions/1999014",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/58951/"
] | Recently I solved this following problem using greedy algorithm.
<blockquote>
There are $100$ students who participate at exam.Also there are $25$ members of jury.Each student is checked by one jury.Known that every student likes $10$ jury. Prove that we can make this every student will be checked by the jury that ... | I read your proof and I believe it is correct.
As a minor nit, it isn't right to say the algorithm will "each time pick $10$ students" - it might pick fewer in step 2.
The argument can be simplified substantially. Once you have defined $b_1,\dots,b_{10}$, we know there must have been $10$ other students picked from e... | I wonder if the following is correct proof? Can someone check please. (I need a jury!)
Take first $25$ students. Take any subset $X$ of this students and let $Y$ be the set of jury the students in $X$ like. Then since each student likes exactly $10$ jury and each jury checks at most $10$ students, we have for $ 10|X|\... | https://math.stackexchange.com |
2,074,406 | [
"https://math.stackexchange.com/questions/2074406",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/365239/"
] | <blockquote>
<strong>Question</strong>: Consider a coin which is flipped Heads with probability $p$ and Tails with probability $1-p$. Let $C_n$ be the number of tosses until we observe $n$ consecutive Heads or $n$ consecutive Tails (for the first time). Compute $\mathbb{E}[C_n]$.
</blockquote>
I am able to determine... | Let $H=1$ iffwe get $n$ consecutive heads before $n$ consecutive tails and $0$ otherwise. We can calculate $A_n=\mathbb{E}[C_n|H=1]$ by conditioning on the flip on which the process of collecting $n$ heads is interrupted by a tail. In other words, if we are interrupted on our first flip, the expected value is now $1+A_... | Suppose we use $z$ for heads and $w$ for tails. We introduce
two generating functions starting with $f_1(z,w):$
$$f_1(z, w) = (1+z+z^2+\cdots+z^{n-1})
\\ \times \left(\sum_{q\ge 0}
(w+w^2+\cdots+w^{n-1})^q
(z+z^2+\cdots+z^{n-1})^q\right) w^n
\\ = \frac{1-z^n}{1-z}
\\ \times \left(\sum_{q\ge 0}
w^q z^q
\frac{(1-w^{n-... | https://math.stackexchange.com |
193,584 | [
"https://security.stackexchange.com/questions/193584",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/186481/"
] | I was recently asked if MFA was leveraged for authentication on endpoint devices. My gut reaction is that given MFA is something you have, know, are, and you need to have the laptop to log into it and you need to know the password that laptops are inherently MFA. Is this incorrect?
<strong>EDIT:</strong> I'm realizing... | In the MFA model, it is understood that the multiple factors come from <strong>outside</strong> the authenticating process itself. Else all authenticating processes are inherently MFA (itself plus the user's credentials).
So, to the laptop, it does not count itself as a factor. There would need to be more <strong>exte... | Generally, having access to the laptop isn't considered MFA. What would likely be considered a part of MFA is having <strong>authenticated</strong> access to the laptop.
In the case of logging on to the laptop, every user who attempts to log in will have access to the laptop, so whether you want to consider that acce... | https://security.stackexchange.com |
486,041 | [
"https://math.stackexchange.com/questions/486041",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/85575/"
] | I have the following problem:
Is the function $f:\mathbb{C}\to\mathbb{C}$ defined by $f(z)=\dfrac{\overline z}{z}$ continuous over $\mathbb{C}$?
I don't understand. I think $f$ isn't even a function (what is $f(0)$?)
What would you answer?
| Well, $\overline{z}$ is a continuous function and $z$ is a continuous function, so it follows that $$f(z)=\frac{\overline{z}}{z}$$ is continuous everywhere in $\mathbb{C}-\{0\}$. We only need to consider continuity at zero. Lets analysis limits approaching this point on the real and imaginary axis. $$\lim_{x\to 0} \fra... | You're right; we need to define $f(0)$ for this to make sense. But if the intended domain for $f$ is $\mathbb{C} \setminus \{0\}$, then it's continuous.
Writing $z = a + bi$, we have $$f(z) = \frac{a - bi}{a + bi} = \frac{a^2 - b^2 - 2abi}{a^2 + b^2} = \frac{a^2 - b^2}{a^2 + b^2} + \frac{2ab}{a^2 + b^2} i$$
To show ... | https://math.stackexchange.com |
284,613 | [
"https://physics.stackexchange.com/questions/284613",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/132277/"
] | I have a hopefully interesting yet simple question.
I want to plot the velocity vs time curve of a motor decelerating. The interesting bit is that the acceleration is going to be directly connected to the velocity of the motor, and I cannot figure out how to incorporate that into the equation.
<strong>Information kno... | Assuming I understand correctly, then the braking force is given by (with $v$ the velocity):
$$F=\frac{AB}{R}v$$
Where:
$$A=46.5\:\mathrm{N/A}$$
$$B=50\:\mathrm{V/m/s}$$
$$R=0.9\:\mathrm{Ohm}$$
Or:
$$F=kv$$
During braking the equation of motion is then (with $m$ the mass of the object):
$$ma=-kv$$
$$m\frac{dv}{dt}=-kv... | Let the inital velocity be $v_0$ and the constant Force $F$, then the deceleration $a$ is
$$a=F/M$$
so the velocity $v(t)$ at a given time $t$ is
$$v(t)=a\cdot t + v_0$$
In your case $a$ is negative.
If $a$ is not constant but a function of $v$ and $v$ is a function of $t$ you will have to define your $a$ in terms... | https://physics.stackexchange.com |
371,568 | [
"https://electronics.stackexchange.com/questions/371568",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/163536/"
] | I'm trying to debug a hardware issue where I am only seeing the feedback voltage on the output of a regulator that is part of a PMIC. The voltage divider that goes into the feedback pin have the correct resistor values. The inductor is properly placed onto the board and the switching frequency looks comparable to the d... | The supply for the op-amp must come from the input voltage. Note that the simulated circuit is not really an LDO regulator since the highest a perfect op-amp could possibly swing is the input supply voltage and the output will be at least one diode drop below that.
Of course simulated circuits don't even necessarily ... | It comes from the input voltage to the LDO, unless Vin specifications and process limitations require a pre-regulator to condition the voltage prior to powering the error amp.
| https://electronics.stackexchange.com |
198,667 | [
"https://softwareengineering.stackexchange.com/questions/198667",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/91247/"
] | I'm going to try to make this as concise and concrete as possible, but apologies since I can think of multiple ways to make it work. This question might also relate to handling production workflows or manufacturing, but I have no experience in these areas.
I have a problem where I need to move an Object, O, from diff... | Your different states sound more like activities. If they were states you would use <code>Nouns</code> to describe them (example; "full", "empty", "box", "container"). If they were activities then you would use <code>Adjectives</code> to describe them (example; "opening", "processing", "making").
Your object can be at... | <blockquote>
2. Have a larger Superclass that handles which states O is in, and handles the interactions.
</blockquote>
That sounds like an awful lot of logic from what you are describing. Do you want the same class defining that 30% complete parts in Atlanta have to be shipped to Dallas as the class that handles 99... | https://softwareengineering.stackexchange.com |
28,635 | [
"https://cs.stackexchange.com/questions/28635",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/11424/"
] | I've been asked the following question:
<blockquote>
Given a connected undirected graph $G=(V,E)$ and a weight function $w: E \to \{1,2\}$, suggest an <strong>efficient</strong> algorithm that finds an MST of the graph.
</blockquote>
After a few clarifications, the algorithm should run in time $O(|V|+|E|)$. I belie... | Since you have only 2 possible edge weights you can perform a linear time sort on the edges, then perform Kruskal's algorithm. The complexity of Kruskal's algorithm comes from its need to sort the edges in terms of weight, which previously had to be done in $O(ElogE)$ time, now however, you can sort the edges in linear... | Alternatively use Prim's algorithm. No need to keep track of components. Prim considers each edge once (assuming adjacency-lists). The most costly part of Prim is looking for the next vertex to add: the one of the remaining vertices that has the cheapest connection to the tree already constructed. Here we only have to ... | https://cs.stackexchange.com |
69,933 | [
"https://chemistry.stackexchange.com/questions/69933",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/39588/"
] | Nitrogen has oxides like $\ce{N2O}$, $\ce{NO}$, $\ce{NO2}$, $\ce{N2O3}$, $\ce{N2O5}$, but as far as I know, phosphorus has probably only $\ce{P2O3}$ and $\ce{P2O5}$.
Why does nitrogen have so many oxides in the first place?
Also why doesn't phosphorus have the analogous oxides?
| The best starting orbitals for a CASSCF calculation are optimised orbitals of another CASSCF (or RASSCF) calculation. That sounds a bit ridiculous, but this is probably the best way to figure out the active space.
At first you are probably choosing something quite small, like CAS(2,2) to CAS(4,4). For these calculatio... | <strong>Hartree-Fock Orbitals are Always the Wrong Choice for CAS Calculations</strong>
In Hartree-Fock (HF) theory, only the occupied orbitals contribute to the electronic energy. Due to the presence of Fock exchange, the Fock operator is different for occupied and virtual orbitals. For occupied orbitals, the Fock exc... | https://chemistry.stackexchange.com |
284,401 | [
"https://dba.stackexchange.com/questions/284401",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/223059/"
] | Given a table containing a few hundred records with a <code>venueId</code> non-unique indexed UUID column and a <code>number</code> column which is uniquely incrementing per each <code>venueId</code> and running these two queries in order to get the highest <code>number</code> for a given <code>venueId</code>, which at... | This is one of several good reasons for using explicit "Join" syntax instead of the [more compact] "Comma" syntax.<br />
Let's re-write your poorly performing query and see if we can spot a difference. Here's the original:
<pre><code>SELECT MAX("order"."number") as "number&... | These queries are substantially different.
The first one contains a cross join of <code>order</code> with itself: each result row in <code>order</code> will be paired with each row in <code>Order</code>, which will result in n times as many result rows, where n is the number of rows in <code>Order</code>. You don't not... | https://dba.stackexchange.com |
62,965 | [
"https://softwareengineering.stackexchange.com/questions/62965",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/-1/"
] | I'm writing the Software Requirement Specification document for a piece of software that I am developing. A part of the SRS is the identification of the user class.
Can somebody please give or refer me to definition of a user class as it relates to a software product?
| User classes will differ based on the type of software you are writing, and the audience it is designed for. For example, I created a database application which had two user classes: traders and administrators. Your SRS might include other classes - maybe "general user", "power user", "executive", etc...
Basically, yo... | Please don't get too lost the theoretical world. If this is an application that you are developing and designing then you are the best ( only ) person who can do this properly.
All this requires is common sense.
It is very easy to fall into the trap of trying to fill out a template with the hope that if you do enou... | https://softwareengineering.stackexchange.com |
65,436 | [
"https://electronics.stackexchange.com/questions/65436",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/22538/"
] | I would like to trigger a PIR sensor using an infrared LED. Is that possible? My goal is to simulate motion in front of the PIR, when there otherwise is none. I tried using a handheld remote control, but that didn't seem to work.
| People often use imprecise terms to describe InfraRed and it is further complicated in that with respect to Infrared <em>"that word infrared ... I don't think it means what you think it means"</em> in a lot of cases.
PIR - AKA Passive infrared sensors are pryoelectric devices that are optimized to detect Mammalian bod... | You may be able to cause it to trigger if you place two filament bulbs operated under-voltage at a dim glow in front of it, you may have to tune the positioning a bit to get it right. Then switch them on alternately hoping that they will illuminate the alternate parts of the sensor. The spacing of the bulbs should be... | https://electronics.stackexchange.com |
1,818,911 | [
"https://math.stackexchange.com/questions/1818911",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Question:-
<blockquote>
Let $$f(x) = \left(\frac{k \cos(x)}{\pi - 2x}\right)$$ Where $$x\ne \frac{\pi}{2}$$
And $$f\left(\frac{\pi}{2}\right) = 3$$
if $$\lim_{x \to \frac{\pi}{2}}f(x) = f\left(\frac{\pi}{2}\right)$$
Then find the value of $k$
</blockquote>
My attempt :-
<blockquote>
$$\lim_{x \to \frac{\p... | You want to compute
$$
\lim_{x\to\pi/2}\frac{k\cos x}{\pi-2x}
$$
Use the substitution $x=\pi/2-t$, so $t=\pi/2-x$ and $\pi-2x=2t$; then the limit becomes
$$
\lim_{t\to0}\frac{k\cos(\pi/2-t)}{2t}=
\lim_{t\to0}\frac{k}{2}\frac{\sin t}{t}=\frac{k}{2}
$$
If you are given that the limit is $3$, then $k=6$.
| Check out L'Hospital's rule here.
$$\lim_{x \to \frac{\pi}{2}}\left(\frac{k * \cos(x)}{\pi - 2*x}\right)$$
$$=\lim_{x \to \frac{\pi}{2}}\left(\frac{{d\over dx}(k * \cos(x))}{{d\over dx}(\pi - 2*x)}\right)$$
$$=\lim_{x \to \frac{\pi}{2}}\left(\frac{-k * \sin(x)}{- 2}\right)$$
$$={k\over 2}=3(given)$$
$$\therefore k=6... | https://math.stackexchange.com |
1,236 | [
"https://mechanics.stackexchange.com/questions/1236",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/743/"
] | I have a 1999 Audi A4. Recently there is a burning smell when driving that is noticeable when stopped after driving. At night I noticed a faint white smoke blowing out of the front in the headlights. I mentioned the smell when it was in the shop last time and they didn't find any leaks but I'm now concerned after seein... | Sounds you have a small leak. A fluid collects somewhere and then makes itself to the exhaust manifold or headers and because that's hot, it burns/evaporates causing the smoke you are seeing
Does it smell like burnt plastic? If yes, then its probably engine oil. I'm not sure if antifreeze would produce a distinct b... | Recently my Audi A4 97 1.8 also is leaking oil. I have been noticing the top valve gasket for a while. When I tried to tighten up the nut on it, I found the nut was loose. Then I decided to change the valve gasket. After I replaced it, I kept my engine running. I found also some white smoking coming from exhaust pipe s... | https://mechanics.stackexchange.com |
10,960 | [
"https://bioinformatics.stackexchange.com/questions/10960",
"https://bioinformatics.stackexchange.com",
"https://bioinformatics.stackexchange.com/users/4595/"
] | I have a very big matrix like
<pre><code>> head(mat[1:4,1:4])
Tumor_Sample_Barcode Chromosome Start_Position End_Position
1: LP6005334-DNA_H01_vs_LP6005333-DNA_H01 chr1 1026918 1026918
2: LP6005334-DNA_H01_vs_LP6005333-DNA_H01 chr1 15772155 15772155
3: LP600533... | If your data is in a dataframe you can make use of <code>plyr</code>. Using <code>mapvalues()</code> from this library, you can rename provide a list of keys and a list of values. Instead of explicitly listing the keys, we can just use <code>unique(mat$Tumor_Sample_Barcode)</code> [credit to @dc37]. I use the <code>pas... | Change to <em>factor</em> then to <em>numeric</em>:
<pre><code>mat<span class="math-container">$Tumor_Sample_Barcode <- as.numeric(as.factor(mat$</span>Tumor_Sample_Barcode))
</code></pre>
Using @dc37 example data:
<pre><code>as.numeric(as.factor(df$vect))
# [1] 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
</code></pr... | https://bioinformatics.stackexchange.com |
167,613 | [
"https://mathoverflow.net/questions/167613",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4556/"
] | It seems that for any prime number $p$ and for any non-zero element $a$ in the finite field $\mathbb F_p$, the polynomial $x^p-x+a$ is irreducible over $\mathbb F_p$. (It is of course obvious that there are no linear factors.)
Are there any general irreducibility criteria which can help to prove such a result?
(More ... | This is true. Pass to an extension field where the polynomial has a root <span class="math-container">$r$</span>, notice that the other roots are of the form <span class="math-container">$r+1$</span>, <span class="math-container">$r+2$</span>, ..., <span class="math-container">$r+p-1$</span>. Suppose that <span class="... | Here is an alternate proof of the OP's first conclusion, based on the same idea as David's, but which avoids consideration of coefficients. Let $r$ be a root of $h(x):=x^p-x+1$, so that $r\notin\mathbf{F}_p$. Since $h(x+c)=h(x)$ for every $c\in\mathbf{F}_p$, the other roots of $h(x)$ are $r+1,r+2,\dots,r+p-1$. Let $... | https://mathoverflow.net |
113,309 | [
"https://datascience.stackexchange.com/questions/113309",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/138956/"
] | I have pandas dataframes - test & train,they both have <code>text</code> and <code>label</code> as columns as shown below -
<pre><code> label text
fear ignition problems will appear
joy enjoying the ride
</code></pre>
As usual, to run any Transformers model from the HuggingFace, I am conver... | This is a coding style issue, so people may well have different opinions! But I don't see any problem with the way you've coded it.
If you really want to reduce the number of lines of code you could combine the two assignments to traindts into one statement, and the same with testdts:
<pre><code>traindts = Dataset.from... | <ol>
<li>you can combine data of test and train in a single data frame.</li>
<li>Then you should split data frame using scalar test train split</li>
</ol>
| https://datascience.stackexchange.com |
49,775 | [
"https://mathoverflow.net/questions/49775",
"https://mathoverflow.net",
"https://mathoverflow.net/users/10909/"
] | In classical logic plus ZF, the field of real numbers admits infinitely many isomorphic realizations as a numeral system --- as the radix varies. The intuitionistic status of these systems seems less clear however. First of all, the notion of "field" has several
distinct intuitionistic interpretations (e.g. non-zero ... | No, and actually, you cannot realise any non-trivial equivalence relation this way. If any of the (non-trivial) pairs of radix systems are isomorphic, they all are. It is "well-known" that not every real number has a decimal expansion. This extends to this situation.
Specifically, for any pair n and m (unless one divi... | First note that there are several inequivalent definitions of real numbers. The two most usual ones appearing in intuitionistic mathematics are:
<ol>
<li><strong>Cauchy reals:</strong> constructed as a quotient of the space of rapidly converging Cauchy sequences of rational numbers. (A sequence $(a_n)_n$ is said to co... | https://mathoverflow.net |
76,995 | [
"https://stats.stackexchange.com/questions/76995",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/16496/"
] | I have a large text and I need to select words randomly in proportion to their frequencies.
A raw method is to put all the words in an array (N indexes) and to use a random (uniform) generator to generate numbers between 0 to N.
For example, a word $w_1$ occurs 5000 times in the text and the word $w_3$ occurs 100 t... | Your method should be effective (or you've got a problem with your random number generator). Whether it is efficient is a separate question.
You might scale better by taking weighted samples from the $V$ possible word types rather than unweighted samples from all $N$ tokens. As documents get longer, Heaps Law sugge... | You assume that your word frequencies follow a multinomial distribution. The code below is in R but should be easy to implement in any language. I used letters instead of words but the same principle applies.
<pre><code>words <- c("a", "b", "a", "b", "c", "a", "b", "a")
c <- count(words)
</code></pre>
Determin... | https://stats.stackexchange.com |
71,543 | [
"https://mathoverflow.net/questions/71543",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1465/"
] | Let $M$ be a smooth submanifold of the 4-sphere $S^4$. I'm going to demand that $M$ be diffeomorphic to $S^1 \times S^1 \times S^1$. By Jordan-Brouwer separation, $M$ separates the 4-sphere into two compact 4-manifolds $V_1$ and $V_2$, i.e. $V_1 \cup V_2 = S^4$, $V_1 \cap V_2 = M$, $\partial V_1 = \partial V_2 = M$.... | No. Suppose that the rank of $H^1(V_1)$ is zero, so that the rank of $H^1(V_2)$ is three and (by looking at the Mayer-Vietoris sequence again) the rank of $H^2(V_2)$ is zero. Take two independent elements of $H^1(V_2)$. Their product in $H^2(V_2)=0$ is trivial, but its image in $H^2(M)$ is nontrivial, being the product... | No embedding of a product $M=T_g\times{S^1}$ in $S^4$ can have one complementary component
$X$ with $H_1(X)=0$.
For otherwise, the other component $Y$ would have $H_2(Y)=0$.
But then the inclusions of $M$ and of a wedge of $2g+1$ circles into $Y$ would induce
isomorphisms on the lower central series quotients of the fu... | https://mathoverflow.net |
23,389 | [
"https://dba.stackexchange.com/questions/23389",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/11232/"
] | I've been looking all over for any description of an issue like this and I haven't found anything so far.
I am trying to update my MySQL database using MySQL Workbench (5.2.40 CE). I am using the Synchronize Model option just as I have always done before to update the database with the changes I've made to the model. ... | MySql Workbench is powerful, but not perfect.
Some time in similar case, I've done the following to resolve the problem:
<ul>
<li>create a blank project</li>
<li>require a model update FROM db source</li>
<li>then I'll reapply the mod. </li>
</ul>
Often this happen if you just change a 'comma' [a small thing] in the... | If you are sure your db is identical to your model, you can update your model instead your db.
<strong>UPDATE</strong>
I had faced the same problem with MySQLWorkbench. In my case I'm using Workbench v8.014 and test and production db server at v8.0.12 and v5.6 respectively.
Below is the algorithm to fix the synchron... | https://dba.stackexchange.com |
261,625 | [
"https://electronics.stackexchange.com/questions/261625",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/99124/"
] | I'm a beginner in EE. Lastly I read a lot about this field and I want to jump in.
I think of a toy PCB design, to experiment essentially.
I picked the different hardware so that all the components have digital outputs, which is what I want to stick with (less complex, no type mixing, less costly). As well, the power s... | @Larry you think that because this is a DC circuit then there is no need for decoupling caps. But if you have outputs that are going to do something useful then they have to switch on/off. Each time that an IC switches it creates a momentary increase in the current consumed by the IC, which in turn creates a small volt... | <blockquote>
Given these elements: Is it still needed to put a decoupling capacitor to each ground on this DC circuit? Isn't it useful to filter high frequencies (AC) only? Do we really care about the noise a ground may have?
</blockquote>
The way I would look at this is: "<em>The chip manufacturers recommend them. ... | https://electronics.stackexchange.com |
4,103,171 | [
"https://math.stackexchange.com/questions/4103171",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/732165/"
] | So, about the following limit:<br />
<span class="math-container">$$\lim_{n\to\infty} \left( \frac{1+\cos(\frac{1}{2^{n}})}{2} \right)^n$$</span><br />
I tried several things to evaluate it, namely looking at it as <span class="math-container">$\cos(\frac{1}{2^{n+1}})^{2n}$</span> instead or as <span class="math-contai... | Continuing where you left off with L'Hopital's:
<span class="math-container">$$L = \lim_{n \to \infty} n\ln\left(\cos\left(\frac{1}{2^{n+1}}\right)\right) = \lim_{n \to \infty} \frac{\ln(\cos(2^{-n-1}))}{\frac{1}{n}} = \lim_{n \to \infty} \frac{-\tan(2^{-n-1})\cdot2^{-n-1}\ln2}{-\frac{1}{n^2}}$$</span>
Supposing the li... | <span class="math-container">\begin{align*}
\left(\dfrac{1+\cos(1/2^{n})}{2}\right)^{n}\leq\left(\dfrac{1+1}{2}\right)^{n}=1.
\end{align*}</span>
Now <span class="math-container">$\cos u\geq 1-u^{2}/2$</span> for small <span class="math-container">$u\geq 0$</span>, then
<span class="math-container">\begin{align*}
\left... | https://math.stackexchange.com |
572,581 | [
"https://stats.stackexchange.com/questions/572581",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/356280/"
] | Given a model where <span class="math-container">$ x_i | \mu \sim \mathcal{N} ( \mu, \sigma^2 ) $</span> where <span class="math-container">$ \mu \sim \mathcal{N} ( \mu_0, \sigma_0^2 ) $</span>, is there a closed form formula for the PDF of <span class="math-container">$ x_i $</span>? Namely, what's <span class="math-c... | One way to model this would be by a sum of 2 variables:
<span class="math-container">$$ {x}_{i} = {y}_{i} + {z}_{i}, \quad {y}_{i} \sim \mathcal{N} \left( 0, {\sigma}_{2}^{2} \right), \; {z}_{i} \sim \mathcal{N} \left( {\mu}_{0}, {\sigma}_{0}^{2} \right) $$</span>
Since <span class="math-container">$ {z}_{i} \perp {y}_... | Do it with moment-generating functions and iterated expectations. We have:
<span class="math-container">$$
\begin{align*}
M_X(t) & = \mathbb{E}[\exp(tX)] = \mathbb{E}[\mathbb{E}(\exp(tX)|\mu)] \\
& = \mathbb{E}[\exp(\mu t + \sigma^2 t^2 / 2 )] = (\sigma^2 t^2 / 2) \, \mathbb{E}[\exp(\mu t)] \\
& =(\sigma^2 ... | https://stats.stackexchange.com |
365,176 | [
"https://softwareengineering.stackexchange.com/questions/365176",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/173291/"
] | I have a quite large private codebase which has evolved for about ten years now. I'm not using phpDocumentor but since using docblock sections has become quite the standard in open source projects I have adopted writing docblocks for all public methods in my repository as well. Most blocks just contain a small descript... | Information that can be found in the code should not be duplicated in comments.
At best, it's wasted effort to keep them synchronized. More likely, they will get out of sync eventually. At that point, they are just confusing.
If you look at the DocBlock equivalent in statically typed languages (e.g. Java, C#), you wi... | Yes, docblocks have become redundant with php 7.
Most time in coding is spent reading, so having to read the same thing twice impacts your productivity. Furthermore, it makes it easy to miss actually important comments.
I don't write docblocks anymore, except when I want to type hint an array of a certain type (e.g. ... | https://softwareengineering.stackexchange.com |
373,670 | [
"https://physics.stackexchange.com/questions/373670",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/178230/"
] | UPDATE: This was tagged as off-topic with it being more of an engineering issue. I disagree in that I don't want to know how to pull a vacuum on a safe but instead from a physics point of view what would happen. I've accepted the answer from @akhmeteli.
thx for the insights.
ORIGINAL Question:
With all of the ho... | As @Philip Wood mentioned, vacuum does not prevent eventual increase of the temperature of the safe contents, however, full vacuum may prevent burning of the contents due to lack of oxygen. On the other hand, filling the safe with nitrogen can serve the same purpose, and it may be advantageous to have no or little pres... | The contents of the safe will reach the temperature of its walls, even if there is a vacuum between the contents and the walls. This will happen because electromagnetic radiation (mostly infrared) will pass between walls and contents (and vice versa). The vacuum (as opposed to air) will slow down the rate at which the ... | https://physics.stackexchange.com |
90,732 | [
"https://electronics.stackexchange.com/questions/90732",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13877/"
] | When trying to program a project in MPLAB X IDE using the PICkit 3 programmer, it fails as MPLAB X shows this error:
<img src="https://i.stack.imgur.com/2qBPQ.png" alt="enter image description here">
I have connected the PICkit3 with USB.
I'm using OS X 10.9 and the latest version of MPLAB X.
Hovering over the PICki... | I had installed MPLAB X to a custom directory instead of the default one, which seems to have caused the problem.
Uninstalling it and installing it again in the default directory fixed the issue.
| Your Pickit 3 must be as MPLAB mode, you can change it in PICKIT 3 standalone aplication.
| https://electronics.stackexchange.com |
440,993 | [
"https://stats.stackexchange.com/questions/440993",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/246447/"
] | Can you remove a conditional variable by multiplying by the probability of it?
| We know that
<span class="math-container">$$
P(A,B)=P(A|B)P(B)
$$</span>
and this remains true when conditional on <span class="math-container">$C$</span>:
<span class="math-container">$$
P(A,B|C)=P(A|B,C)P(B|C).
$$</span>
You'll notice that the <span class="math-container">$C$</span> conditioning seems to be "alon... | With a little probability algebra, we have:
<span class="math-container">$$\begin{equation} \begin{aligned}
\mathbb{P}(A|B,C)
&= \frac{\mathbb{P}(A,B,C)}{\mathbb{P}(B,C)} \\[6pt]
&= \frac{\mathbb{P}(C) \cdot \mathbb{P}(A|C) \cdot \mathbb{P}(B|A,C)}{\mathbb{P}(B,C)} \\[6pt]
&= \mathbb{P}(A|C) \times\frac{\... | https://stats.stackexchange.com |
81,104 | [
"https://dba.stackexchange.com/questions/81104",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/50973/"
] | Can somebody please help me with a query that lists the most used tables in a MySQL database? Or how can i find out the most used tables in the database?
Thanks
| <ol>
<li>UDFs in interpreted languages are pretty much always slower than UDFs written in C or built-in functions, all other things being the same.</li>
<li>Each language binding has different code to connect PostgreSQL to the language, with different degrees of optimisation, different ways of passing some data types, ... | this is pretty hard to tell. it really depends on what you are doing. for example: PL/pgSQL is wonderful if you got large SQL statements in it - it really goes crazy if you got all kinds of branching, substring management and all that.
you really got to test from case to case.
| https://dba.stackexchange.com |
58,402 | [
"https://dsp.stackexchange.com/questions/58402",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/3918/"
] | I understand the principle of image convolution. Maybe. I think it is this:
You use a small matrix with numbers in it, then take a sample of an image with as many pixels as you have numbers in your matrix, then do a dot product, then add up all the terms, and then use the result as the new value for the pixel located i... | Yes there are image filter kernels whose coefficients may change with location of the processing, and further based on the local image data.
One prime application of such filtering is the <em>edge adaptive, noise reduction</em> where the kernel coefficients are determined based on a statistical analysis of a local grou... | A convolution is, by definition, linear and shift-invariant. If the kernel changes according to the location in the image, then the filter is no longer shift-invariant, and therefore not a convolution.
When the kernel changes based on image content, then the filter is no longer linear. It is possible to construct such ... | https://dsp.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.