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 |
|---|---|---|---|---|---|
159,885 | [
"https://softwareengineering.stackexchange.com/questions/159885",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/57792/"
] | If you have a class which inherits from two distinct classes, does not this mean that your subclass automatically does (at least) 2 things, one from each superclass?
I believe there is no difference if you have multiple interface inheritance.
To be clear, I believe that if subclassing multiple classes violates SRP, the... | In a very narrow sense, the answer is "Yes": assuming that your base classes or interfaces are designed for a single purpose, inheriting both of them does create a class with multiple responsibilities. However, whether or not it is "a bad thing" depends on the nature of the classes or interfaces tha... | The SRP is a guideline to avoid god-classes, which are bad, but it also can be taken too literally and a project starts balloon with tons of classes that can't really do anything without a handful being combined. Multiple inheritance/multiple interfaces can be a sign a class is getting too big, but it could also be a s... | https://softwareengineering.stackexchange.com |
263,157 | [
"https://stats.stackexchange.com/questions/263157",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/142505/"
] | I find that:
$$\Big(\sum_{i = 1}^n y_i\Big)^2 = \sum_{i=1}^m y_i^2 + \sum^m_{i\neq j}y_iy_j$$
where $m=(n^2-n)=n(n-1)$, the first part of the right side is the sum of the main diagonal of the matrix, and the second part is the sum of the upper and lower part of the matrix.
Then it is write that the second part can b... | You have a good notion about diagonal and lower/upper part of matrix but your equations are wrong. Let $Y = [y_1, \dots, y_n]^T$, and
$$YY^T =
\begin{pmatrix}
y_1^2 & y_1y_2 & \cdots & y_1y_n \\
y_2y_1 & y_2^2 & \cdots & y_2y_n \\
\vdots & \vdots & \ddots & \vdots \\
y_... | J should go like this - $ j = (i+1) \rightarrow n $
You don't have to use it like this, but this summation order insures the two values will multiply only once (think of it as the upper triangle of a matrix)
| https://stats.stackexchange.com |
359,858 | [
"https://softwareengineering.stackexchange.com/questions/359858",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/286982/"
] | I have recently come across the idea of persistence ignorance, the idea that your domain model should be ignorant of the persistence layer of the application, and that got me thinking.
I have been doing my best to keep different parts of the application loosely coupled, wrapping things like the ORM in interfaces so th... | I think perhaps part of what you are struggling with here is that ORMs are designed to sit in the same spot in the design where the persistence layer would decouple the storage and the domain model. If you want to use an ORM and do this, the only effective solution is to push the ORM down and treat it as the underlyin... | In my view it’s not worth the effort. In the late 90s I worked for a non-profit and they had a dbase IV based application— I don’t even remember what the app code was written in. Pascal? COBOL? I don’t remember. Anyway it got rewritten for the next technology, MS Access and VB.
Every project I’ve been involved with h... | https://softwareengineering.stackexchange.com |
208,335 | [
"https://mathoverflow.net/questions/208335",
"https://mathoverflow.net",
"https://mathoverflow.net/users/39552/"
] | Consider an extension of groups $$(E)\ :\ 1\to N\to G\stackrel{\pi}{\longrightarrow} Q\to 1$$ and assume
<ol>
<li>$N$ is abelian,</li>
<li>$Q$ is finite,</li>
<li>for any Sylow subgroup $S_p$ of $Q$, the pullback $(E_p)\ :\ 1\to N\to \pi^{-1}(S_p)\to S_p\to 1$ is split.</li>
</ol>
Then $(E)$ is split.
[A proof can... | This didn't seem likely, so I looked for a counterexample and found one after a short search. Clearly $Q$ must not have any normal Sylow subgroups, so the first example to try is $Q=S_4$. Then $N$ must not be abelian, so I tried $N=Q_8$ and found an example.
The example is $\mathtt{SmallGroup}(192,988)$ in GAP or Magm... | In case anyone is interested, here is what happens for extensions
$$(E)\ :\ 1\to H\to G\to \mathfrak S_4\to 1$$
when $H$ is $D_8$ or $Q_8$. There are 24 of these.
We begin with $D_8$. The set $F:=Hom(\mathfrak S_4, Out(D_8))$ has order two. For each $f\in F$, the set of extensions $E$ affording $f$ is non-empty, and... | https://mathoverflow.net |
302,601 | [
"https://dba.stackexchange.com/questions/302601",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3787/"
] | When I bulk <code>INSERT</code> into an <code>Aria</code> table, it creates a copy of the <code>INSERT</code> in a series of log files (aria_log.%). It can lead to full disk and crash of MySQL.
As I understand, Aria keeps a redo log for <code>TRANSACTIONAL=1</code> only, and the default behaviour is <code>TRANSACTIONAL... | Found an answer to my problem.
<pre><code>SELECT allPacks.id_pack, allPacks.name, allPacks.price, allPacks.user, allPacks.discount, allPacks.preview_url, allPacks.type, allPacks.description,
CASE
WHEN allPaid.status = 'paid' THEN 'Paid'
WHEN allPaid.status = 'pending' THEN 'Available'
WHEN a... | You could aggregate the status2. You would want to keep the max value (in most collations, maybe in all). Your join to users doesn't seem to do anything.
<pre><code>select p.id_pack,
max(CASE
WHEN pa.status = 'paid' THEN 'Paid'
WHEN pa.status = 'pending' THEN 'Available'
WHEN pa.status ISNU... | https://dba.stackexchange.com |
321,328 | [
"https://dba.stackexchange.com/questions/321328",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/-1/"
] | What would be the most optimized mariadb settings for my server below?
E5-2699 V4 CPU(8 Core)-
16GB DDR4 -
100GB NVME SSD
Current
<pre><code>[mysqld]
performance-schema=ON
slow_query_log = 1
query_cache_size = 32M
innodb_additional_mem_pool_size = 10G
innodb_buffer_pool_size = 10G
log-error=/var/log/mysqld.log
max_al... | Fixed it. There were two issues :
<ol>
<li>For some reasons, if I want to check if string "3" is present in the array, I need to give JSON_CONTAINS '"3"' as second argument, and not '3'
However, for JSON_ARRAY_APPEND '3' is enough.
</li>
<li>I had my IF statement's 2nd and 3rd argument switched up. ... | I think you forget to add <code>!</code>, check the below example it adds any new number except [1-4].
<pre><code>SET @list = '["1","2","3","4"]';
# try existing number(1,2,3, and 4), they won't add to the list
SET @item_list = '["5"]';
SET @item = '5';
select IF(!JS... | https://dba.stackexchange.com |
199,816 | [
"https://physics.stackexchange.com/questions/199816",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/29870/"
] | This is a layman's question. The only thing I know about quantum physics is from casual reading and documentaries. I can imagine electrons being probabilistic waves.
Their position is an infinite number of weighted points and only upon observing the actual position do we know which of those points was its actual positi... | It is worse than lazy evaluation.
<blockquote>
Haskell I can treat a lazy value as if it were already there and manipulate it as such.
</blockquote>
In quantum mechanics you can't do that. What you have is something that tells you the relative frequency of getting lots of results for different interactions if you ... | Let me try to use a programming analogy.
A quantum mechanical object is like a <em>class</em>.
It has certain <em>attributes</em>, which would be physical attributes, e.g. position, momentum.
It also has certain <em>methods</em>, which are physical operations that can change or modify the object or modify the envir... | https://physics.stackexchange.com |
94,017 | [
"https://mathoverflow.net/questions/94017",
"https://mathoverflow.net",
"https://mathoverflow.net/users/6301/"
] | Is there a direct way to seeing that $B{\mathbb{N}}\simeq S^1$, i.e. the classifying space of the monoid of natural numbers is homotopy equivalent to the circle?
Here, since the natural numbers ${\mathbb{N}}$ is not a group, some care is needed to define the classifying space $B{\mathbb{N}}$ properly. One way to do t... | Method I: Symmetric products.
Contained inside the simplicial set $N\mathbb{N}$ is a copy of the simplicial circle $S^1$, generated by the zero-simplex and the 1-simplex $[1]$. This consists of all simplices of the form $e_i = (0,\ldots,0,1,0,\ldots,0)$, together with the basepoint $(0,\cdots,0)$, in the simplicial o... | I am not sure if this is the type of direct proof that you are looking for, but here it goes. I will start with a more general theorem: Let $M$ be a CANCELABLE monoid, and $K$ be the left adjoint to the forgetful functor, $U:GROUP\rightarrow MONOID$. Then $BM$ is homotopy equivalent to $BK(M)$. The way I like to see t... | https://mathoverflow.net |
443,911 | [
"https://softwareengineering.stackexchange.com/questions/443911",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/426808/"
] | I’m currently tackling a programming challenge to schedule a series of “performances” (a set of dancers together on a stage for a period of time, concretely) that each involve a set of “participants” (the set of dancers who form the group for a performance). Each performance involves some subset of all the participants... | There is nothing inherently wrong in adding purely technical attributes to entities (or other domain objects) which are exclusive required for implementing things like persistence or concurrent access. Depending on
<ul>
<li>your organizational environment</li>
<li>your tooling</li>
<li>the way you use to talk with your... | One possible way to keep your domain model "pure" from persistence-related implementation details is not to persist your domain classes directly. Instead, you define a persistence model, and map between both models accordingly. Then, instead of defining repositories for your domain classes, you would define t... | https://softwareengineering.stackexchange.com |
4,170,779 | [
"https://math.stackexchange.com/questions/4170779",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/882120/"
] | I have a question about homeomorphic spaces. Two topological spaces <span class="math-container">$(X, τ_{x})$</span> and <span class="math-container">$(Y, τ_{y})$</span> are called homeomorphic iff there exists a bijection <span class="math-container">$f:X \rightarrow Y$</span> such that both <span class="math-containe... | An even more concrete counter example:
Consider <span class="math-container">$\mathbb{N}_1=\{1\}$</span> and <span class="math-container">$\mathbb{N}_3=\{1,2,3\}$</span> both with the indiscrete topology, so <span class="math-container">$$\mathcal{T}_{\mathbb{N}_1}=\{\emptyset,\{1\}\}\text{ and }\mathcal{T}_{\mathbb{N}... | The two are not equivalent :
If there is a homeomorphism <span class="math-container">$f:X\to Y$</span>, then <span class="math-container">$U\in\tau_X \mapsto f(U) \in \tau_Y$</span> is a bijection which satisfies all your hypotheses.
However, the converse is not true. Take <span class="math-container">$X = \mathbb R$<... | https://math.stackexchange.com |
361,219 | [
"https://softwareengineering.stackexchange.com/questions/361219",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/75631/"
] | I'm looking through some legacy code and I've come across a case where the developer has 'extended' an existing class with additional members, using inheritance as his weapon of choice. Essentially it reduces to something like this:
<pre><code>struct A
{
int something_old;
};
struct B : public A
{
int somethi... | It all depends on what <code>A</code> and <code>B</code> are and mean.
Because base class subobjects can do things that member subobjects cannot (being empty not disturbing the layout of the type, automatically exposing their member functions as the owners, etc), there are times when inheriting from a class makes sens... | In addition to @NicolBolas excellent answer; we can do that sequence using constructors and without casting.
<pre><code>...
A aa = GetA();
...
B bb(aa); // instead of: B bb; *(A*)&bb = aa;
...
</code></pre>
For this, A and B need appropriate constructors (and note that those constructors also won't require awk... | https://softwareengineering.stackexchange.com |
534,785 | [
"https://physics.stackexchange.com/questions/534785",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/175031/"
] | Can someone provide me a numerical simulation of Feynman path integral? Where the contribution of each path is added individually so that I can understand how much do the paths outside the light cone actually contribute and how they actually interfere destructively with each other?
| I'm not sure why you would think all (pseudo-)Goldstone bosons have to be CP odd. This would be the result if the spontaneously broken symmetry is a chiral symmetry (<span class="math-container">$SU(2)_A$</span> for pions, <span class="math-container">$U(1)_{\text{PQ}}$</span> for axions), but of course you can spontan... | The quantum numbers carried by a Goldstone Boson (GB) are determined by the quantum numbers of the spontaneously broken current <span class="math-container">$J^\mu$</span> because of the non-vanishing matrix element
<span class="math-container">$$
\langle 0|J^\mu(0)|\pi(p)\rangle = i f p^\mu
$$</span>
which defines th... | https://physics.stackexchange.com |
18,775 | [
"https://security.stackexchange.com/questions/18775",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/12257/"
] | I have installed an antivirus, but as no antivirus is perfect, what can I do to diagnose if my PC is getting infected?
For example, keeping a close eye on what programs and tasks run when I turn my PC on. And after installing new programs, see if there are changes, etc... If there is a change that I cant justify, I wi... | The short, pithy answer is that you don't. There is some extremely stealthy malware out there. Look at stuxnet, flame, and some of the banking trojans as examples. If a sophisticated enemy is out to get you chances are you won't know you've been hacked.
That being said it's extremely unlikely that you are ever going ... | You can never know if your PC is already infected or not. Anti virus will only go so far and malicious code can be hidden in many parts of the hard drive. You might be able to tell by listening to the traffic coming from your computer.
A good way to know when your system has been compromised to:
<ol>
<li>Install a ... | https://security.stackexchange.com |
132,329 | [
"https://electronics.stackexchange.com/questions/132329",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/54756/"
] | I've made a couple of simple PCBs as a hobbyist, and for the first time now I want to add a ground plane pour but I'm having some issues.
As I have currently understood I need to:
<ul>
<li>Create a polygon along the outline of my board with the polygon tool</li>
<li>Rename it to GND</li>
<li>Set a clearance</li>
<li>... | For a simple two-sided board, start by creating a ground polygon on the whole bottom layer. The trick then is to get Eagle to route most of the connections on the top layer. To do this, make the cost of routing within a polygon high and the via cost low. Actually you want to start with parameters more likely to find... | The "holes" or "islands" that you are seeing are due to the fact that there is no connection that can be made with your current clearance tolerances given the position of traces and pads.
If you move traces to allow the pour to exist between them, within the constraints of your clearance settings, the pour will fill t... | https://electronics.stackexchange.com |
287,410 | [
"https://softwareengineering.stackexchange.com/questions/287410",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/113632/"
] | Our db is optimized for minimum join count (partially denormalized). E.g. our <code>User</code> entity contains account data (nickname, facebook id, etc), user numerical statistics (total games played, total wins, etc), guild related user information (guild id, membership type, etc) and so on - everything in the same t... | <blockquote>
Is there any documented preference, in Java, for either of these conventions?
</blockquote>
The preference is that the end user has <em>no idea</em> what the backing primitive is for your type. This is encapsulation at its essence.
Now, if your object exposes an interface to get a <code>double</code> (... | Let's tackle this:
<blockquote>
Would it be most appropriate to return a double value as I've mentioned, or provide public <code>multiply()</code>, <code>add()</code>, etc. methods?
</blockquote>
Should said class <em>know</em> how to multiply and add? Sounds like you are building a calculator implementation... I w... | https://softwareengineering.stackexchange.com |
80,320 | [
"https://softwareengineering.stackexchange.com/questions/80320",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/8486/"
] | Normally, the company where a programmer works has corporate licensed tools which are useful for programmer (ex: proprietary IDEs, reflectors, diagramming tools, office tools and PDF makers, etc.)
Can I :
<ul>
<li>Install it at home and use it for company projects?</li>
<li>Install it at home and use it for personal ... | Disclaimer: I am not a lawyer, and this is not legal advice.
<blockquote>
<ul>
<li>Install it at home and use it for company projects?</li>
</ul>
</blockquote>
This would depend on the license (whether the license is a per-user license or a site-based license), and also whether the employer allows the use of co... | <blockquote>
But is it a right thing to do in general?
</blockquote>
No unless:
<ol>
<li>Your employer has explicitly granted you the right to do so, better at his own initiative</li>
<li>The tool license does not object against 1</li>
</ol>
If !(1 && 2), please do not.
Having said that, there are tools w... | https://softwareengineering.stackexchange.com |
59,942 | [
"https://electronics.stackexchange.com/questions/59942",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/19781/"
] | I'm having some problems understanding the timing behaviors I observe in Logisim. I've isolated some cases which illustrate the problem.
Say I have a register (1-bit, to keep it simple), which is being fed a logical 1 on its input D. Upon the clock the register is set to 1, as expected:
<img src="https://i.stack.imgu... | I've never used Logisim, but I have an idea of what it may be doing:
Some of your circuits lack pull-up/down at the clock input. It may be that it defaults to one (implicit weak pull-up). If that is the case, then a floating input is equivalent to a weak one.
With this in mind, in the circuit with the n-gate (or th... | Short answer for new-commers : Logisim DOES NOT simulates signal level timing. Only state changes simulated via components.
| https://electronics.stackexchange.com |
41,004 | [
"https://physics.stackexchange.com/questions/41004",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/14095/"
] | Please give answer that, whether electricity in our home comes directly after it is generated e.g. at a dam or nuclear plant or first it is stored somewhere and then distributed as it is needed.
| Storage of electricity per se can only happen with batteries. The electricity consumed in the towns villages and cities, megawatts, is so large that even considering batteries is ludicrous.
Electricity comes directly at practically the speed of light from the generators to the houses.
| We can store electricity directly, only in a system with a decent amount of capacitance. i.e. in capacitors. Hoever, in general, electricity grids have next-to-no capacitance; so the electricity comes straight from the generator to you.
There are lots of ways to store electricity <strong>indirectly</strong>, and on ... | https://physics.stackexchange.com |
145,099 | [
"https://softwareengineering.stackexchange.com/questions/145099",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/886/"
] | I'm not a graphic designer. I'm pretty bad at drawing anything. I struggle to build things that look even as nice as "sample" applications bundled with development tools; primarily because I don't have squat in the way of art assets.
What strategies might I take to mitigate this?
| I personally <strong>do not think you have to be good artistically to create pleasing user interfaces</strong>.
What makes a good UI is not up to creativity, but is more related to a couple of well-established guidelines. If you follow these guidelines and practice some you can create great interfaces yourself.
I wo... | My art ability is about 5th grade on a good day:). I employ a graphic designer, either
professionally when at work, or my wife, who has excellent art skills and loves using them.
Note that in my mind Graphics design is not UI/UX design. I either do a majority of UX, or employ a UX expert to retain control of UX, who... | https://softwareengineering.stackexchange.com |
23,006 | [
"https://security.stackexchange.com/questions/23006",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/15295/"
] | <em><strong>Edit</strong>: Updated to put more emphasis on the goal - peace of mind for the user, and not beefing up the security.</em>
After reading through a few discussions here about client side hashing of passwords, I'm still wondering whether it might be OK to use it in a particular situation.
Specifically I wo... | Hashing on the client side doesn't solve the main problem password hashing is intended to solve - what happens if an attacker gains access to the hashed passwords database. Since the (hashed) passwords sent by the clients are stored as-is in the database, such an attacker can impersonate all users by sending the server... | There are few time when client-side hashing is worthwhile. One such circumstance is when the hash process is computationally intensive, which <em>can</em> be the case with PBKDF2.
Addressing your concerns:
<ol>
<li>Also avoid unvalidated suggestions about cryptography you find on the internet. (Disclaimer: I am not B... | https://security.stackexchange.com |
369,870 | [
"https://math.stackexchange.com/questions/369870",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/3208/"
] | I got stuck reading the proof of the following theorem:
<blockquote>
<strong>Theorem</strong> (Heinz Hopf) Let $X: S^2\to \mathbb R^3$ be a constant mean curvature immersion. Then $X(S^2)$ is a round sphere.
</blockquote>
Proof: Let $g_{S^3}$ denote the round metric on $S^2$ (such that the area is $4\pi$). By the u... | Since all constant functions are Borel measurable, the cardinality of the set of all real, Borel-measurable functions on $\Bbb R$ must be at least $|{\Bbb R}|=2^{\aleph_0}$. Going the other way, a real-valued function $f$ is determined by the sequence of sets $(f^{-1}(r,\infty)\mid r\in {\Bbb Q})$. If $f$ is Borel me... | One method is to show that every Borel measurable function can be constructed as an iteration of pointwise convergence starting from continuous functions, the construction is analogous to the construction of the Borel $\sigma$-algebra internally from the open sets by taking intersections and complements repeatedly $\al... | https://math.stackexchange.com |
215,706 | [
"https://softwareengineering.stackexchange.com/questions/215706",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/11932/"
] | Working on a statically typed language with type inference and streamlined syntax, and need to make final decision about syntax for variable declaration versus assignment. Specifically I'm trying to choose between:
<pre><code>// Option 1. Create new local variable with :=, assign with =
foo := 1
foo = 2
// Option 2. ... | There are many more aspects one should consider when settling for assignment/declaration syntax, than simple <code>=</code> vs. <code>:=</code> bikeshedding.
Type inference or not, you <em>will</em> want a syntax for explicit type annotations. In some type systems, inference may not be possible without occasional expl... | <strong>Both alternatives are bad.</strong> The first because it is far from obvious that a <code>:=</code> operator creates a local variable, and the second because it means you have two different meanings for the <code>=</code> operator. Learn Dennis Ritchie's lesson, and don't have two operators that <em>appear</e... | https://softwareengineering.stackexchange.com |
57,700 | [
"https://physics.stackexchange.com/questions/57700",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/7325/"
] | I would like to compare my result in an order of magnitude. So, How can I estimate the strength of the electric field in a typical Si PN-junction?
| The maximum electric field develops near the depletion layer around the p-n interface. The maximum value, which occurs at $x=o$ (the interface) is given by the equation
$E_{max}=\frac{2(V_{bi}-V-kT/e)}{W}$
where:
$W$: is the width of the depletion layer,
$V_{bi}$: is the difference between the highest and lowest va... | You can estimate this quantity by dividing the order of magnitude of the potential difference (e.g. a volt) by the order of magnitude of the width of the depletion region (e.g. a micron).
You may be surprised regarding how large the correct value is.
| https://physics.stackexchange.com |
338,363 | [
"https://electronics.stackexchange.com/questions/338363",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/167243/"
] | <img src="https://i.stack.imgur.com/FfRac.jpg" alt="enter image description here">
I have noticed the use of two different formulas i.e P=V²/R (in the 3rd line) and P=I²R (5th line from below). Since the bulbs are in series, how can the resistance be inversely proportional to power as shown? Is anything wrong with my ... | You only need to remember two formulas. The rest can be worked out.
$$ V = IR \tag 1 $$ $$P = VI \tag 2 $$
From (1) we can say that \$ I = \frac {V}{R} \$ so popping that into (2) we get $$ P = V \frac {V}{R} = \frac {V^2}{R} \tag 3$$
Alternately we pop (1) straight into (2) and say $$ P = VI = IR \cdot I = I^2R \ta... | Both the bulbs have different Power rating, but they are assumed to have the same voltage rating in this question. So it's obvious that the bulb with less power have more resistance, from the equation P = V^2/R. Now in series connection, the current is same in both the bulbs. So you can apply P= I^2*R formula now. Thus... | https://electronics.stackexchange.com |
306,937 | [
"https://mathoverflow.net/questions/306937",
"https://mathoverflow.net",
"https://mathoverflow.net/users/116870/"
] | John Derbyshire in his book <A HREF="http://tomlr.free.fr/Math%E9matiques/Fichiers%20Claude/Nombres/Derbyshire%20-%20Prime%20Obsession%20-%20Bernhard%20Riemann%20and%20the%20Greatest%20Unsolved%20Problem%20in%20MathematicsAAA.pdf" rel="noreferrer">PRIME OBSESSION</A> says on page 343:
<blockquote>
"I’ll round off w... | <A HREF="https://wstein.org/edu/2010/414/projects/stueve.pdf" rel="nofollow noreferrer">Monte-Carlo Approximation of the Prime Counting Function</A>
This is a numerical study of the dependence of the error $\delta\pi(x)$ in the prime counting function when $N$ zeros $\rho$ of the zeta function are used in the sum $\su... | This is a rough estimate , about 101157 zeros . Using Zeta zeros and not zeros that are calculated by XI function or functional equation !
| https://mathoverflow.net |
15,713 | [
"https://quantumcomputing.stackexchange.com/questions/15713",
"https://quantumcomputing.stackexchange.com",
"https://quantumcomputing.stackexchange.com/users/14494/"
] | Concerning the Hadamard gate and the Pauli <span class="math-container">$X$</span> and <span class="math-container">$Z$</span> gates for qubits, it is straightforward to show the following relationship via direct substitution:
<span class="math-container">$$ HXH = Z.\tag{1}$$</span>
And I would like to demonstrate this... | The appropriate <span class="math-container">$d$</span>-dimensional analogue of <span class="math-container">$H$</span> turns out to be the Quantum Fourier Transform. This is obscured by the fact that even though <span class="math-container">$(1)$</span> is conjugation the inverse is written implicitly since <span clas... | The correct generalization is the discrete Fourier transform <span class="math-container">$F_d$</span> over <span class="math-container">$d$</span> dimensions defined as
<span class="math-container">$$
F_d = \sum_{jk} e^{i2\pi jk / d} |j\rangle \langle k|
$$</span>
up to a sign convention. I'll show <span class="math-c... | https://quantumcomputing.stackexchange.com |
148,146 | [
"https://softwareengineering.stackexchange.com/questions/148146",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/40631/"
] | Years ago somebody created a bunch of really awesome and popular scripts. But they were not updated for a long, now they no-longer work (target platform were updated, and some changes are needed).
He hasn't released it under any license. I want to fix the bug (currently, many of the target users can't use it), and po... | Short answer: absolutely not.
Everything a person writes, whether it is software or text, is automatically under copyright. The default state of any text is that it is completely owned by the author and no one has rights to do anything with it without express permission of the author. A few decades ago, an author us... | <blockquote>
It is clearly open source
</blockquote>
and
<blockquote>
he hasn't released it under any license
</blockquote>
conflict. Just because you can see and even modify the source, doesn't mean it is open source. You cannot take this work and just give it a license, as it is not your work and you have n... | https://softwareengineering.stackexchange.com |
449,653 | [
"https://math.stackexchange.com/questions/449653",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/54670/"
] | Let $f(x,y)\in C^3(\mathbf{R}^2)$ and let $u=x+y$ and $v=y$.
Express $f'''_{xxx} and f'''_{yyy}$ in terms of $f'''_{uuu} and f'''_{vvv}$.
I'm supposed to use the chain rule, how do I go about?
Thanks!
Alexander
| Substitute $r=\tan{t}$; $dr = \sec^2{t} \, dt$. Then the integral is equal to
$$\int_0^{\arctan{R}} dt \, \sec^2{t} \, \frac{\tan^2{t}}{ \sec^4{t}} = \int_0^{\arctan{R}} dt \,\sin^2{t}$$
which is then straightforward to evaluate:
$$\frac12 \left [t - \sin{t} \cos{t} \right ]_{0}^{\arctan{R}} = \frac12 \left [\arcta... | Denominator containing $1+r^2,$ let us set $r=\tan x$. Then
$$\begin{multline}
\int_0^R\frac{r^2}{(1+r^2)^2}\,dr
=\int_0^{\arctan R}\frac{\tan^2x}{\sec^4x}\sec^2x\,dx
=\int_0^{\arctan R}\sin^2x\,dx\\
=\int_0^{\arctan R}\frac{(1-\cos2x)}2\,dx
=\frac12\left(x-\frac {\sin2x}2\right)_0^{\arctan R} \\
=\frac12\left(\arctan ... | https://math.stackexchange.com |
749,637 | [
"https://physics.stackexchange.com/questions/749637",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/358104/"
] | A fuse wire repeatedly gets burnt when used with a good heater. It is advised to use a fuse wire of:
<ul>
<li>A) More length</li>
<li>B) Less radius</li>
<li>C) Less length</li>
<li>D) More radius</li>
</ul>
I think the correct answer is <code>option(B)</code> as <strong>Heat ∝ 1/R</strong> when the voltage is constant... | (a) The resistance of a short piece of wire (the fuse) will be much less than that of the heater. Therefore the current through the fuse will be determined by the heater's resistance; the fuse's resistance (as long as it is much less than the heater's) will have almost no effect on the current, <span class="math-contai... | Oh no! This is a terrible question. You should always use a fuse of the designed amperage, never lower and especially never higher. A lower amperage fuse will break the circuit during safe operation and a higher amperage fuse will not break the circuit during unsafe operation!
So the only correct answer is “E) use only... | https://physics.stackexchange.com |
69,892 | [
"https://softwareengineering.stackexchange.com/questions/69892",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/21746/"
] | Almost every advanced programmer says that it's very useful to read the code of other professionals. Usually they advice open source.
Do you read it or not? If you do, how often and what's the procedure of reading the code? Also, it's a bit difficult for newbies to deal with SVN - a bunches of files. What's the solut... | <blockquote>
Do you read it or not?
</blockquote>
Yes.
<blockquote>
If you do, how often
</blockquote>
Daily. Constantly. I work with numerous open-source projects (mostly Python-related) and <strong>must</strong> read the source because it's the most accurate documentation.
<blockquote>
and what's the pr... | There's several layers to the conundrum you have. First, start at the high level, a birds-eye view so to speak. Once you check out a project there will be a bunch of files in a directory structure. That's the same whether you are looking at open source or closed source (source code is source code after all). So sta... | https://softwareengineering.stackexchange.com |
131,268 | [
"https://physics.stackexchange.com/questions/131268",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/48904/"
] | For some systems, discrete intermediate compounds rather than solid solutions may be found on the phase diagram, and these compounds have distinct chemical formulas; for metal–metal systems, they are called intermetallic compounds. e.g. Mg2Pb has 33 at% Pb
For binary isomorphous system like copper-nickel, if we get 33... | The way to distinguish intermetallics (or any other phases) is to used the commonly accepted phase description, such as Mg$_{2}$Pb as you did above. This phase descriptor than points people to information on the crystal structure, thermodynamics of the phase, etc. The point is that these are thermodynamically distinct ... | When referring to a solid solution, you can write it generally as Cu1-xNix, and for 33% Ni: Cu<sub>0.67</sub>Ni<sub>0.33</sub>. At least in my mind, this is different from Cu<sub>67</sub>Ni<sub>33</sub>, which is how an intermetallic (if it existed) would be written. That would be a huge unit cell, but there are inter... | https://physics.stackexchange.com |
2,434,606 | [
"https://math.stackexchange.com/questions/2434606",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/408489/"
] | $$f(x)=e^x\cdot x^3$$
How do i know if there exists global max and min if domain is from $-\infty$ to $+\infty$? Does there exist global max and min?
| $f \in K[x]$ irreducible $\implies$ $K[x]/(f)$ field only works when $K$ is a field.
| Your mistake is thinking that irreducible elements in integral domains give you fields/maximal ideals. This isn't true in general.
Let $R$ be an integral domain, and let $0 \neq \omega \in R$. Then $\omega$ is irreducible if and only if $(\omega)$ is a proper ideal and maximal in the set of principal ideals of $R$. ... | https://math.stackexchange.com |
8,113 | [
"https://mathoverflow.net/questions/8113",
"https://mathoverflow.net",
"https://mathoverflow.net/users/158/"
] | What are interesting, illustrative examples of Borel sets, situated in Borel hierarchy higher than $\Sigma^{0}_{2}$ /$\Pi^{0}_{2}$?
| The Borel hierarchy is, of course, strictly increasing at
every step, so there will be sets of every countable
ordinal rank. Furthermore, all of these sets are relatively
concrete, obtained as countable unions of sets having lower
rank. But you asked for natural examples, so let me give a
few.
1) The collection of tru... | This is certainly a standard and very well-known reference, but let me metnion Section 23 of Kechris's Classical Descriptive Set Theory which has lots of examples of $\Pi_3^0, \Sigma_3^0$ and some more complicated Borel sets. Here are some of them
{$x \in \mathbb{N}^\mathbb{N} : \lim x(n) = \infty $} is $\Pi_3^0$ com... | https://mathoverflow.net |
218,277 | [
"https://dba.stackexchange.com/questions/218277",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/161244/"
] | The calculation <code>select (75/979.86)*979.86</code> in Teradata SqL gives 78.3888. In excel, it would give 75 simply and that is logically correct. I get it that SQL is rounding off 75/979.86 to 0.08 ie the number of decimal digits in 979.86. And hence the result is different.So, I can simply do (75*979.86)/979.86 i... | Teradata rounds after each calculation based on the resulting datatype (Standard SQL compliant), to get the expected reault you can either CAST the 1st operand to a NUMBER (no need to think about precision) and finally back to DECIMAL:
<pre><code>Cast((Cast(75 AS NUMBER)/979.86) *979.86 AS DECIMAL(10,2))
</code></pre>... | So, here is what I did.. We can use something like cast as( number as decimal(18,5)) to convert the data type of numbers to have 5 decimal digits. And then, again use cast as with the number of decimal digits we need our results to be rounded upto which in my case is 2. So, something like this
<code>select cast((cast(... | https://dba.stackexchange.com |
18,117 | [
"https://physics.stackexchange.com/questions/18117",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/6587/"
] | Is a object that’s white with the lights on, still white although it looks different under a different light or in total darkness?
| What makes an object white is its property to re-emit and scatter nearly all the frequencies (colours). During scattering, the directional information of the light that illuminated the object also changes; that is, the incoming light is scattered into a distribution of angles. To answer your question, an object's prope... | The answer depends on what you understand to be "a white object". Typically, we think an object is white if it looks white with normal illumination. Since the object doesn't change when you use a red light, or when you turn off the lights, it still is a white object. You just see it red or gray (or don't see it at all)... | https://physics.stackexchange.com |
89,952 | [
"https://stats.stackexchange.com/questions/89952",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/41888/"
] | I am not well versed in statistics. I wanted to know why we use the determinant of the covariance matrix instead of having the covariance matrix itself when writing down the multivariate normal distribution. Why do we do this and what is the intuition behind it?
I have noticed that for a basic Maximum Lkikelihood esti... | Instead of jumping to the multivariate case in matrix form, look at the bivariate case first:
<img src="https://i.stack.imgur.com/tTXLC.png" alt="enter image description here">
Can you recognize the portion of the denominator that is the determinant of the variance-covariance matrix below?
<img src="https://i.stack.... | Here another practical way to feel more confident about the vector and matrix notation of the multivariate normal. How did the transformation to the multivariate case work and generate $\Sigma_\mathcal{E}$ and $\mathbf{(y-\mu)}'(\Sigma_\mathcal{E}^{-1})(\mathbf{y-\mu})$ in the new joint density? We will show this brief... | https://stats.stackexchange.com |
177,329 | [
"https://mathoverflow.net/questions/177329",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1837/"
] | Let $\{P_i\}$ be a subset of $SU(n)$ such that for any $U$ in another subset (or perhaps subgroup) $H$ of $SU(n)$: $$P_1UP_2U\cdots P_mU=I$$ where $I$ is the identity element. Is there a sequence $\{P_i\}$ such that $H$ be enlarged to the whole $SU(n)$? Also (perhaps more interesting): how large can $H$ be made?
Perha... | I can show that it is impossible to achieve $H=SU(n)$. More generally, if $G$ is a compact connected Lie group, I will show that the map $U \mapsto P_1 U P_2 U \cdots P_m U$ is surjective, and therefore the preimage of the identity can't be all of $G$.
<b>Proof</b> Such a $G$ is a compact connected orientable manifold... | <strong>New answer:</strong> I now have an answer for the subgroup case that the OP originally asked about. In fact, one has the following result: Let $G$ be a connected compact Lie group and let $p = (p_1,\ldots,p_m)$ be an $m$-tuple of elements of $G$. Define the set
$$
H(p) = \{ g\in G\ |\ (p_1g)(p_2g)\cdots(p_m... | https://mathoverflow.net |
557,870 | [
"https://physics.stackexchange.com/questions/557870",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/265411/"
] | In Michelson's Interferometer (1881 experiment), even though the arm length for both the perpendicular arms was taken as the same (say <span class="math-container">$L$</span>) and a compensatory plate was used to removed optical path differences, we still get a proper interference pattern despite both the rays reachin... | Your metric (2) is just a coordinate reparametrization of Minkowski space. Writing it with a different time variable <span class="math-container">$ds^2 = -c(T)^2 dT^2 + d{\bf x}^2$</span> to avoid confusion, they're equivalent when <span class="math-container">$t = \int_{T_0}^T c(T) dT/c_0$</span> (for some arbitrary c... | It makes perfect sense when you think about it this way: your equation implies that the maximum permitted speed of causality, <span class="math-container">$c$</span>, is slowing down with time. That means that <em>everything</em> is confined to move "slower and slower" - shorter distances, longer times.
Every... | https://physics.stackexchange.com |
77,222 | [
"https://electronics.stackexchange.com/questions/77222",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/25870/"
] | While working with circuit simulators, I often come across two separate grounds:
<ol>
<li>Ground</li>
<li>Digital Ground</li>
</ol>
What is the difference between these two?
| Digital Ground usually refers to the reference voltage of digital logic ICs. This means that no analog signals are coupled into this reference plane.
You can often see analog and digital ground where digital ground will be the reference for any logic and analog ground will be the return path for any analog circuits.
... | It's not uncommon to see multiple grounds in a circuit and it's normal for these to be joined together at some point: either directly, or with a zero ohm resistor, or small ferrite.
The reason you have multiple grounds is to control the return path for various currents. Digital circuits for example may contain fast e... | https://electronics.stackexchange.com |
66,898 | [
"https://dsp.stackexchange.com/questions/66898",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/46320/"
] | I'm not good with signal processing but i've looked around and have got no clue how to approach this.
My Question is, If there is a Static value present - that is being corrupted by percentage uniform noise, is there a way to estimate the original static value given N corrupted measurements.
i.e
<pre><code>For a C... | The <strong>sample mean</strong> can be a choice for the estimator with the following pros and cons
<strong>Pros</strong>:
it is unbiased
<strong>Cons</strong>:
1. The variance of the estimator increases with increase in absolute value of <span class="math-container">$x$</span>
<ol start="2">
<li>The estimator wi... | Taking the average values of these measurements should work. The estimator is
<span class="math-container">$$
\hat{X}=\frac{1}{L}\sum_0^{L-1}K=\frac{1}{L}\sum_0^{L-1}(X+X*N)
$$</span>
.To show that it is the unbiased estimator,
<span class="math-container">$$
E(\hat{X}) = \frac{1}{L}LX + \frac{1}{L}XL\times 0 = X
$$</... | https://dsp.stackexchange.com |
679,868 | [
"https://physics.stackexchange.com/questions/679868",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/273770/"
] | I hope you are excellent. I'd like you to help me make sense of the integral <span class="math-container">$ \oint PdV \neq 0 $</span> for some thermodynamic process. What can it mean for the integral to be nonzero? I can only interpret it as if there is work, however my deep understanding is very limited. I appreci... | In thermodynamics, the differential work done on a system is defined as the following:
<span class="math-container">$$\delta W= -P dV.$$</span>
Work done is an <strong>inexact</strong> differential, denoted by the symbol <span class="math-container">$\delta$</span>. This means that the total work depends not only on th... | Given integral repersent the work done to a closed path . Which is non zero means think as a non conservative force you will get intuition. Since force is directly related to pressure and then work done work done. hope this answer might help you to why work done through a closed path is non zero.
| https://physics.stackexchange.com |
65,940 | [
"https://quant.stackexchange.com/questions/65940",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/19992/"
] | I have a strange question. For example, I have 95% VaR (1Y, delta-normal) for portfolio with one stock in same currency (for example, USD). What minimal information should I have for recalculation this VaR from USD to RUB? USD_RUB and this portfolio stock are correlated.
| It's not a strange question at all. It's actualy quite common for firms doing business in different countries to need to calculate VaRs in multiple currencies.
Case 1: your exposure to the price of the stock is linear (i.e. no options). You simply own some shares. It does not matter whether you own U.S. shares (e.g. IB... | Consider stock <span class="math-container">$S$</span> and <span class="math-container">$X$</span> the currency rate. You want to calculate VaR for <span class="math-container">$SX$</span>.Assume that <span class="math-container">$S$</span> and <span class="math-container">$X$</span> follows:
<span class="math-containe... | https://quant.stackexchange.com |
519,354 | [
"https://physics.stackexchange.com/questions/519354",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/249499/"
] | I'm working on a problem that asks about doubling the charge on an LC capacitor:
<blockquote>
An ideal capacitor, with initial charge <span class="math-container">$Q$</span>, is connected in series to an ideal inductor to form a series LC circuit. The oscillation frequency of this circuit is <span class="math-contai... | The capacitance of a capacitor is based on its physical properties according to
<span class="math-container">$$C=\frac{\varepsilon A}{d}$$</span>
Where <span class="math-container">$\varepsilon$</span> is the absolute permitivity of the dielectric material between the plates, <span class="math-container">$A$</span> ... | Capacitance of a capacitor is a fundamental property of the capacitor and depends only on the geometry and material of the capacitor. It is the voltage that will change when you change the charge, not the capacitance.
| https://physics.stackexchange.com |
126,784 | [
"https://mathoverflow.net/questions/126784",
"https://mathoverflow.net",
"https://mathoverflow.net/users/5090/"
] | Let $X =$ {0, 1, 2, ...} and $T$ = { $\emptyset$, $X$, {0}, {1}, {0,2}, {0,1,3}, {0,1,2,4}, {0,1,2,3,5}, ... } $\cup$ {{0,1,2}, {0,1,2,3}, {0,1,2,3,4}, ... }. It is easily verified that $T$ forms a topology on $X$. Burdick has shown (Amer. Math. Monthly January 2006 p. 83) that the singleton {0} generates infinitely m... | [corrections applied, per Ilya and Anton]
Consider the formal series
$$
f(x) = \sum_{k=0}^\infty (\sum_A A^k) x^k
$$
where $A$ runs through $p \times p$ matrices. It is equal to $\sum_A (I - Ax)^{-1}$, a rational function with values in scalar matrices. Thus, for some $d$, if the first $d$ coefficients vanish all co... | The sum is zero for all $k<p^2-1$.
Assume that $k$ is a multiple of $p-1$ and $k<p^2-1$. Divide all matrices into classes of the form $\{A,A+1,A+2,\dots,A+(p-1)\}$ . Summimg the $k$th powers over such a class yields
$$
\sum_{s=0}^k A^{k-s}\binom ks \sum_{j=0}^{p-1} j^s
$$
where $0^0=1$. If $s=0$ or $s$ is not ... | https://mathoverflow.net |
103,282 | [
"https://electronics.stackexchange.com/questions/103282",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35143/"
] | I performed fft in matlab on y=sin(2*pi*t), with a time period of T=0.015. Now I want to get the original function back in the time domain, but I'm not sure how I can use ifft to do that. It gives me the wrong answer each time. Could someone please explain to me how to go about this?
| Well, here's a bit of MATLAB code that does work (16,384 point FFT on a 240 second sample, padded with zeros).
<pre><code>dt = 0.015;
tmax = 240;
x = 0:dt:tmax;
y = sin(2*pi*x);
N = 2^14;
transformed_y = fft(y,N)*dt;
ft = 1/dt;
f = (0:(N-1)/2)/N*ft;
recovered_y = ifft(transformed_y,N,'symmetric')/dt;
x_recovered = 0:... | You're starting with a 1-Hz sine wave, but you're sampling it with a period of 0.015 seconds, which corresponds to a sample rate of 66.667 samples/second.
Because of this non-integer relationship between the signal frequency and the sample rate, your "signal" (the sine wave) doesn't fall squarely into a single "freqeu... | https://electronics.stackexchange.com |
57,153 | [
"https://stats.stackexchange.com/questions/57153",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/24807/"
] | I'm working on a school project and have decided to use SVM for stock market prediction. I have a 1000x5 matrix of stock quotes containg data for open, close, high, low, volume data.
From what I know, the labels should consist of +1/-1, for either up or down. How do I get this label data?
I'm using python and I am so... | <strong>This problem requires only one simple calculation;</strong> namely, that half the balls in the box are odd and half even.
One principle of random selection from a box is that only the <em>proportion</em> matters: the behavior (of sampling with replacement) of a box with 100 balls is the same as that with just ... | I think it is very reasonable to quickly come to 1/2 by a similar process to what you suggest. Obviously if you pick one ball the answer is 1/2 as there are 50 odd numbers and 50 even to choose from. Now, assume you have picked one ball and hence have a equally chanced random odd or even number. After replacement yo... | https://stats.stackexchange.com |
1,778,497 | [
"https://math.stackexchange.com/questions/1778497",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/211463/"
] | <blockquote>
True or false (if true justify):
<ol>
<li>if $\{x_n\}$ and $\{x_ny_n\}$ are bounded sequences then $\{y_n\}$ is bounded.</li>
<li>if $\{x_n\}$ and $\{y_n\}$ are sequences such that $x_ny_n \rightarrow 0$ then one of the sequences converges to $0$</li>
</ol>
</blockquote>
Attempt:
1. I know i... | Are there any conditions on the sequences? Because if not:
<ol>
<li>Take $x_n = 0$ for each $n \in \mathbb{N}$ and let $y_n$ be any unbounded sequence.</li>
<li>Take $x_n$ to be $1, 0, 1, 0, 1, \dots$ and $y_n$ to be $0, 1, 0, 1, 0, \dots$</li>
</ol>
| The pair of sequences $x_n=\frac1n(1-(-1)^n)$, $y_n=n(1+(-1)^n)$ provide a counterexample to both claims.
| https://math.stackexchange.com |
510,717 | [
"https://physics.stackexchange.com/questions/510717",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/236156/"
] | <ol>
<li>I have heard that our ear pops at high altitude cause of change in air pressure, air pressure outside your eardrums needs to equalize with air pressure inside your eardrums, however, gravity pulls the air inside our ear drums with the same force it pulls air outside our ear drums, so our ears shouldn't pop?</l... | Your two equations are the same for a system of point particles. I will show how.
First, let's consider a point charge <span class="math-container">$q_i$</span> at the origin. The field <span class="math-container">$\mathbf E(\mathbf r)$</span> produced by this charge is given by
<span class="math-container">$$\mathbf... | Potential energy is defined for a system i.e two or more charges. Since electric field is conservative, the work done by it is the change in the potential energy of the system. Using work energy theorem, work done by field is the negative of the work done by external force. Since work done by a conservative field is th... | https://physics.stackexchange.com |
105,317 | [
"https://dba.stackexchange.com/questions/105317",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/69451/"
] | <pre><code>create table test(id INT, value DECIMAL(25,6));
insert into test values (16, 10e16);
insert into test values (17, 10e17); -- Works till here
insert into test values (18, 10e18); -- Fails here. Data truncation: Out of range value for column 'value'
insert into test values (19, 10e19);
</code></pre>
How is ... | A DECIMAL(25,6) stores 25 digits, 6 of them fractional, i.e. a value up to <code>9,999,999,999,999,999,999.999999</code>
<code>10e18</code> is <code>10,000,000,000,000,000,000.000000</code>
| What is <code>DECIMAL(25,6)</code> ?
<ul>
<li>19 digits to the left of the decimal</li>
<li>06 digits to the right of the decimal</li>
</ul>
<strong><code>10e18</code> is not a 19-digit number. It's a 20-digit number</strong>
<pre><code>mysql> select 10e18 ActualValue;
+-------------+
| ActualValue |
+-----------... | https://dba.stackexchange.com |
294,684 | [
"https://mathoverflow.net/questions/294684",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1358/"
] | Note: this question was updated (2) after GNiklasch's answer was posted, and taking Gro-Tsen's comment into account. The initial question (1) dealt with $\mathbb{Q}_3$.
<hr>
<b> Original post (1).</b> Let's try to solve the equation $x^2 - 2 = 0$ with $x = \frac{a}{b} \in \mathbb{Q}$. We can't have $x^2 \neq 2$, so t... | Here is a full solution for the modified problem, inspired by Gro-Tsen's valuable comment.
<strong>1.</strong> There are infinitely many rational numbers $a/b\in\mathbb{Q}$ in lowest terms such that
$$ \left|\frac{a^2}{b^2}-2\right|_\infty\ll\frac{1}{b}\qquad\text{and}\qquad
\left|\frac{a^2}{b^2}-2\right|_7\ll\frac{1}... | Squares of elements of the $3$-adic integers $\mathbb{Z}_3$ are congruent to $0$ or $1$ modulo $3$, thus they are all at $3$-adic distance $1$ from $2$.
Squares of elements of $\mathbb{Q}_3 \setminus \mathbb{Z}_3$ are $3$-adically even further away from the target.
Thus in $\mathbb{Q}_3$, you cannot approximate a squ... | https://mathoverflow.net |
137,662 | [
"https://softwareengineering.stackexchange.com/questions/137662",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/-1/"
] | I just want to make sure I'm using the right license for my open source API wrapper project for some social networks and also make sure I understand it. Could you just describe the basics of that license? What I can and can't do, etc? Does these things suit the GPLv2 license:
<ul>
<li>Open Source'ness</li>
<li>Ability... | Basically you're saying:
<ul>
<li>Please feel free to do whatever you want with this.</li>
<li>As long as you give me credit for my work.</li>
<li>And as long as you make the source code available to anyone you distribute whatever you build on top of my work to.</li>
<li>And as long as you extend these same rights to ... | GPL may or may not be for you depending on what you mean by
<blockquote>
Have control over it as in if you don't like how someone is using your code, you can report it somewhere after contacting the developer.
</blockquote>
the GPL allows you to "have control" in the sense that you can force people to not distribut... | https://softwareengineering.stackexchange.com |
80,484 | [
"https://mechanics.stackexchange.com/questions/80484",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/2095/"
] | The plastic on my Accord's indicator stalk snapped at the base after 32 years of use. Electrics seem fine and I think I could glue it back together, but I'm just worried about it breaking again.
What's the best adhesive I could use for this job?
| No adhesive or resin out there is going to solve this problem by itself. Plastic is non-porous, and a snapped piece of plastic won't have much surface area to bond, so you won't get much strength even with a high-strength 2 part epoxy resin. Even with epoxy you may be able to get it to stay in place but it will simply ... | Drilling and inserting a headless screw or even a bit of welding rod can work.
| https://mechanics.stackexchange.com |
2,498,733 | [
"https://math.stackexchange.com/questions/2498733",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/105804/"
] | In my textbook, the inequality $$|a+b|^r\leq 2^{r-1}(|a|^r+|b|^r)$$ for any real number $a$, $b$ and $r\geq 1$, is called "elementary". It is not elementary to me, how do you prove it? I see that the inequality reduces to the triangle inequality if $r=1$ so I am more interested in $r>1$.
| Since $x\mapsto |x|^r$ is convex when $r\geq 1$, Jensen's inequality implies $$\left| \frac{a+b}2\right|^r \leq \frac 12 |a|^r + \frac 12 |b|^r$$
which easily transforms into what you're looking for .
| Also, by Holder
$$\left(|a|^r+|b|^r\right)(1+1)^{r-1}\geq\left(\left(|a|^r\cdot1^{r-1}\right)^{\frac{1}{1+r-1}}+\left(|b|^r\cdot1^{r-1}\right)^{\frac{1}{1+r-1}}\right)^{1+r-1}=\left(|a|+|b|\right)^r$$
| https://math.stackexchange.com |
518,185 | [
"https://electronics.stackexchange.com/questions/518185",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/261557/"
] | When manufacturers create power labels for AC electrical devices, what value to they use for the current and voltage? Do they use the RMS of the sine wave? Or do they use the peak of the sine wave? Is peak current/voltage negligible when considering the safety of an AC circuit?
In general, when trying to determine whi... | <blockquote>
When manufacturers create power labels for AC electrical devices, what value to they use for the current and voltage? Do they use the RMS of the sine wave?
</blockquote>
RMS as that's what will give the measure of heating.
<blockquote>
Or do they use the peak of the sine wave?
</blockquote>
No.
<blockquote... | <blockquote>
When manufacturers create power labels for AC electrical devices, what value to they use for the current and voltage? Do they use the RMS of the sine wave? Or do they use the peak of the sine wave? Is peak current/voltage negligible when considering the safety of an AC circuit?
</blockquote>
Labels for AC ... | https://electronics.stackexchange.com |
240,893 | [
"https://softwareengineering.stackexchange.com/questions/240893",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/73423/"
] | Let's say we're writing a simple JSON parser and we've fully covered the code with unit tests:
<ul>
<li>it can parse primitives <code>"0", "123", "-456", '""', '"asd"', true, false</code></li>
<li>it can parse arrays <code>"[]", "[1, 2, 3]"</code></li>
<li>it can parse nested arrays <code>"[[]]"</code></li>
<li>it can... | (The terms 'recursive' and 'inductive' pretty much mean the same thing, mathematically speaking, although 'recursive' is more common among the computing crowd. Even more common for data structures is 'dynamic', which comes down to the same thing, since the possible shapes of dynamic data structures are invariably defin... | The question I intend to answer is one about the value of random testing in general, and of inductive/recursive data structures in particular, not about JSON.
Random testing has value in several different settings. The primary purpose of random testing is to tackle cases where the test space is immensely large so that... | https://softwareengineering.stackexchange.com |
8,816 | [
"https://mathoverflow.net/questions/8816",
"https://mathoverflow.net",
"https://mathoverflow.net/users/942/"
] | What is the result of multiplying several (or perhaps an infinite number) of binomial distributions together?
To clarify, an example.
Suppose that a bunch of people are playing a game with k (to start) weighted coins, such that heads appears with probability p < 1. When the players play a round, they flip all thei... | It is not always true that the automorphism group of an algebraic variety has a natural algebraic group structure. For example, the automorphism group of $\mathbb{A}^2$ includes all the maps of the form $(x,y) \mapsto (x, y+f(x))$ where $f$ is any polynomial. I haven't thought through how to say this precisely in terms... | This is really a comment on Pete's comment for Mikhail's answer, but I am making it an answer because it raises a question which I think should be more widely known.
The construction of Aut-scheme uses the entire Hilbert scheme, which has countably many components (due to varying Hilbert polynomials), and it is not ob... | https://mathoverflow.net |
83,963 | [
"https://softwareengineering.stackexchange.com/questions/83963",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/19231/"
] | If you were tasked with performing due diligence for a software product/IP you/your company was considering buying. What would be your steps to make sure the purchase was acceptable from a technical risk level? The scenario is one company has a product you or your company is interested in buying in it's entirety (IP ... | Since I didn't get a true answer to my question I though I'd follow up with what I did.
I ended up putting together a combination of a Due Diligence Checklist and a Software Quality Assessment in a combined document along with a list of questions and answers received from the various communications with the company we... | I'd add actually looking at the code to see if it makes you want to vomit.
How's the documentation?
Build without errors/warnings?
Have access to their bug database? What's that look like?
Never done it before though. Most I've done is evaluate the use of 3rd party libs in our own development efforts. For that I... | https://softwareengineering.stackexchange.com |
1,614,716 | [
"https://math.stackexchange.com/questions/1614716",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/238156/"
] | I was wondering if there exists a constant $C$ such that
$| \int_I e^{2 \pi i z^2} dz | \leq C $ for any interval $I$ of $\mathbb{R}$?
Here I want $C$ to be independent of the choice of the interval $I$.
Also $I$ is not necessarily a finite interval.
I would any appreciate hint! Thank you!
| Since $\left|\sin(x)\right|\le\min\!\left(|x|,1\right)$, integration by parts yields
$$
\begin{align}
\left|\int_0^xe^{2\pi iz^2}\mathrm{d}z\right|
&=\left|\int_0^x\frac1{4\pi iz}\,\mathrm{d}\!\left(e^{2\pi iz^2}-1\right)\right|\\
&=\left|\frac{e^{2\pi ix^2}-1}{4\pi ix}+\int_0^x\frac{e^{2\pi iz^2}-1}{4\pi iz^2}... | So we should prove
$$
\left|\int_0^x e^{2\pi i z^2}\,dz\right| < \frac{1}{2}
$$
for all $x$. Then we get ${} < 1$ for all intervals.
| https://math.stackexchange.com |
709,483 | [
"https://physics.stackexchange.com/questions/709483",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/157860/"
] | We make light making a charge oscillate, or heating a body. Are there differences between the two processes?
But, above all, are there other ways in which we can produce em radiation?
| If the engine produces more power, that has to go somewhere, and in the situation you describe, it will go into kinetic energy, meaning to accelerate the car.
If it produces less power, the friction will get its missing power from kinetic energy, thus decelerating the car.
Only if the engine power matches the friction ... | You loos energy by heating the surrounding by friction. Your engine has to produce (at least) that energy every second, and energy=power times time.
| https://physics.stackexchange.com |
86,230 | [
"https://mathoverflow.net/questions/86230",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2530/"
] | Given a field $k$ of characteristic $0$. For every $k$-bialgebra $A$, let $\mathrm{Prim} A$ denote the $k$-vector subspace of $A$ consisting of all primitive elements of $A$.
What conditions can we put on two $k$-bialgebras $A$ and $B$ to ensure that $\mathrm{Prim}\left(A\otimes B\right) = k\otimes \left(\mathrm{Prim}... | Well first when we restrict to the case when $A, B$ are filtered (see Bourbaki for example), in this case $\log_{*}$ always converges at $Id$ (as $Id=e+I_+$, $e$ being the unit for the convolution, it suffices to remark that $I_+^{*N}(h)=0$ for $N=N(h)$ large enough).
Now, in the general case, you can adapt the follo... | Hi Darij, Hi Gérard,
Here is an elementary proof of $Prim(A \otimes B)=Prim(A)\otimes 1_B+1_A \otimes Prim(B)$, using the counities $\epsilon_A$ and $\epsilon_B$.
Let $X$ be a primitive element of $A \otimes B$. It can be written as :
<strong>(1)</strong> $X=\lambda 1_A \otimes 1_B+x\otimes 1_B+1_A \otimes y+ \sum x... | https://mathoverflow.net |
357,343 | [
"https://softwareengineering.stackexchange.com/questions/357343",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/121022/"
] | I'm a software intern and I am assigned bugs to fix as well as features to add to the software. When I add features, everything works well. My problem is more with fixing bugs. I'm working on an extremely large codebase (span of millions of lines) with poor documentation (There are no comments, tons of magic numbers... | You cannot be solely responsible for these kinds of defects. You are human, and it is impossible to think about large systems as a whole.
To help prevent "regression bugs" -- bugs that are unintentionally created when modifying the system, you can do the following:
<ul>
<li>Develop a comprehensive suite of automated ... | You cannot eliminate this in any full sense. Here are some steps to lessen the impact and lessen the likelihood:
<ol>
<li>Add a unit test and regression test for the functionality or bug you are changing or fixing. If you don't have any testing framework or harness set up for your project, set it up so that its part o... | https://softwareengineering.stackexchange.com |
122,775 | [
"https://softwareengineering.stackexchange.com/questions/122775",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/21891/"
] | I'm probably over-thinking this and it might not matter in the scope of things, but I'm wondering how people build up initial versions of their projects in source control? I'm talking about when you start with nothing but an idea, so no forking an existing project or anything.
<ul>
<li>When do you do your commits befo... | <strong>When do you do your commits before having an official or even unofficial version?</strong><br>
Follow the philosophy of committing as often as possible. I use Subversion most of the time. As soon as I have any code that I wouldn't want to lose, and I would want to revert to if I screw something up, I do my fi... | I typically just start using a local mercurial repository and committing to default. If it grows legs, I'll push it over to the central repository and setup continuous integration and such.
Branching is much more of a tactical decision. If the development is linear, I'll often just stick with default until I need to h... | https://softwareengineering.stackexchange.com |
1,528,511 | [
"https://math.stackexchange.com/questions/1528511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66639/"
] | How are these two equal? My teacher said it is obvious, am I missing something?
$$\prod_{k=1}^{n}(\cos{kx}+i\sin{kx})=\cos{(1+2+...+n)x}+i\sin{(1+2+...+n)x}$$
| Remind that: $$\forall k\in\mathbb{N},\forall x\in\mathbb{R},\cos(kx)+i\sin(kx)=e^{ikx}.$$
| <strong>Hint</strong> It is the repeated use of De Moivre's theorem. Note that when trigonometric ratios are multiplied angles are added.
| https://math.stackexchange.com |
183,807 | [
"https://softwareengineering.stackexchange.com/questions/183807",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/78649/"
] | I've written a recursive search algorithm to find the boundaries of a voxel data structure in order to render it more efficiently. I've looked around, and either it's such a simple and obvious technique that nobody's bothered to patent it, or it's novel and nobody's done it this way before.
It's openly "published" on ... | <strong>Disclaimer:</strong> I am not a lawyer. If you are concerned enough, seek professional legal advice.
Assuming we are dealing with US law, it would be very difficult for someone to patent it now because the code on GitHub would be prior art. However, someone may have already filed a patent before you first publ... | Having read @akton's answer, it is important to recognize how software patents are playing out at the moment.
While it <em>shouldn't</em> happen, a lot of bad software-related patents get issued in the United States. Patents with overly broad or indefinite claims, patents that where there is clear prior art, and pate... | https://softwareengineering.stackexchange.com |
274,595 | [
"https://physics.stackexchange.com/questions/274595",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/127358/"
] | For a dipole, the potential is zero at any point on the perpendicular axis, but the electric field isn't zero along that axis. Now, how do I get $E$ from $V=0$ (at that point/axis) from the relation:
$$E = -\nabla V.$$
| While I agree with the other answers (confusing value of a function and the gradient as stated by @jayjay as well as the helpful image by @john-rennie), I am missing the dipole and/or the axis description, though. The Potential of an (electric) dipole with stength and direction $\vec P$ is given by:
$$V(\vec r)=-\frac... | You are making the mistake of thinking of the gradient as a regular one dimensional function where you pop in a value and it throws out an output. You can't take the gradient of a <strong>number</strong> (in your case, $0$). You take the gradient of a <strong>function</strong> (which can have as many dimensions as you ... | https://physics.stackexchange.com |
3,610,922 | [
"https://math.stackexchange.com/questions/3610922",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/562758/"
] | I am trying to find a"good" book (or a series of "good" books) which covers the following parts in cryptography:
<ol>
<li>Some background (such as Number Theory, Finite Fields, )</li>
<li>Classical cryptography (I would say private key cryptography)</li>
<li>Public key cryptography</li>
<li>The security models (In par... | It is not the case that <span class="math-container">$\int_1^\infty x^{-1} \; dx$</span> converges. So your next integral doesn't exist for <span class="math-container">$n=2$</span>. You have <span class="math-container">$n<2$</span> not <span class="math-container">$n\leq 2.$</span>
| Incidentally, your original integral can be evaluated, for all <span class="math-container">$n\in\Bbb C$</span> satisfying <span class="math-container">$\Re\frac1n>\frac12$</span>, with your chosen substitution <span class="math-container">$x=\tan\phi$</span> (followed by <span class="math-container">$t=\sin^2\phi=\... | https://math.stackexchange.com |
241,522 | [
"https://stats.stackexchange.com/questions/241522",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/135621/"
] | <ol>
<li>I have <strong>309 samples</strong> [tumors] and <strong>3234 features</strong> [genes]. I used scikit-learn python library to run random forest with one parameter <strong>n_estimators=100</strong>.</li>
<li>I also used <strong>train_test_split</strong> to spit my dataset into <strong>70-30</strong>. </li>
<li... | From the preface to the first edition of "Markov Chains and Stochastic Stability" by Meyn and Tweedie:
<blockquote>
We deal here with Markov Chains. Despite the initial attempts by Doob and Chung [99,71] to reserve this term for systems evolving on countable spaces with both discrete and continuous time parameters, ... | One method of classification of stochastic processes is
based on the nature of the <code>time parameter</code>(<strong>discrete</strong> or <strong>continuous</strong>) and <code>state space</code>(<strong>discrete</strong> or <strong>continuous</strong>). This leads to four categories of stochastic processes.
If the ... | https://stats.stackexchange.com |
48,992 | [
"https://electronics.stackexchange.com/questions/48992",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/15955/"
] | As far as I have read, the I2C pins are Open Drain or Open collector, but in the PIC18F2550 the datasheet doesnt say anything about those pins, and even says they are a digital output if you select them to be one.
Do I need to add a pullup resistor to the pins so to use them as a digitial output?
If I dont, how do th... | You can do open drain on any digital pin on the PIC yourself, it's easy! I'll show through a quick chunk of example code using RB0.
<pre><code>_TRISB0 = 1; // Set the pin to high impedance
_LATB0 = 0; // Set the output low (this would be _PORTB0 on some pics)
// As long as you're using pin RB0 as a open-drain, don't... | The PIC has a built-in peripheral (the MSSP) that allows hardware-based i2c operation. The open-drain behavior results from the fact that it operates the direction control (aka "TRIS") automatically for these pins. If the MSSP is disabled, the port pins become ordinary I/O pins and now they're controlled the convent... | https://electronics.stackexchange.com |
347,069 | [
"https://softwareengineering.stackexchange.com/questions/347069",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/261967/"
] | Pretty much what the title says. I'm asking with Java in mind; however, I'm not limiting the premise to java. Would it be considered counter-intuitive to have a cloned object not pass equals function?
| It depends. For most classes, the value of the object determines equality, so a cloned object should be equal to the original. There are classes where the identity of the object determines equality, that is objects are equal if and only if they are the same object. In such cases, a cloned object is a different object a... | A cloned object is supposed to bear the same characteristics as the original, so in general it should be <code>equal</code> to it. The only stronger criterion would be <em>identity</em>, and most programming languages already have a <code>==</code> operator for that. Therefore, it would make no sense to have a second, ... | https://softwareengineering.stackexchange.com |
423,561 | [
"https://math.stackexchange.com/questions/423561",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/82960/"
] | In the following example I am told that angle x is 60° and that I have to prove it is (without a calculator). What is the simplest way of showing that it is true?
<img src="https://i.stack.imgur.com/TV1yh.jpg" alt="Angle x = 60, adjacent = 4 * root 3 - 5, opposite = 12 - 5 * root 3">
| $12-5\sqrt{3}=\sqrt{3}*(4\sqrt{3}-5)$
| Or, you could avoid trigonometry completely, by using a calculator and Pythagoras to calculate the numerical value of the length of the hypotenuse and of the side adjacent to the angle x.
| https://math.stackexchange.com |
609,506 | [
"https://physics.stackexchange.com/questions/609506",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/286645/"
] | I'm a mathematician trying to understand a paper in mathematical physics (Alfven Reflection and Reverberation in the Solar Atmosphere, by Paul Cally), and although I understand most of the pde theory required I'm struggling with the physics behind it. I'm sure many of these questions are basic for people who work in th... | <blockquote>
My question is where the majority of the heat is coming from if it
let's say heats an object overhead the fire?
</blockquote>
This is very hard to call, without some seriously complicated math.
But we can make some general observations.
Heat radiation (infrared) is emitted by a hot object in roughly random... | Here's a fun experiment you can do. Take a marshmallow and hold it a fixed distance r, horizontally from the fire, and measure the time <span class="math-container">$t_h$</span> it takes to cook it to your preference. Take a second marshmallow and do the same at a distance r above the fire to get a cook time <span clas... | https://physics.stackexchange.com |
459,544 | [
"https://physics.stackexchange.com/questions/459544",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/169019/"
] | There's a person in my class who thinks that the formula for gravitational potential (-GM/r) represents the work done by gravity to move an object from infinity to any point in the gravitational field.
I know it's actually the work done by the object as it goes towards the earth. That's consistent with the formula W=... | So you are both wrong, but the other person is off by a sign while you seem to have some larger misconceptions.
<blockquote>
I know it's actually the work done by the object as it goes towards the earth. That's consistent with the formula W=Fd (gravity would be doing positive work, hence negative work by the object ... | My answer is in two parts.<br>
The first part tries to explain in terms of energy and work done what is going on when a mass falls towards the Earth and the second part is a commentary on the statements made by the OP in the question.
There are two things that you should be clear about.
In such a discussion you mus... | https://physics.stackexchange.com |
2,275,479 | [
"https://math.stackexchange.com/questions/2275479",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/296377/"
] | I have been wondering what would happen if someone had to solve an inequality like this <br>
$$2 \sin2x \le\sqrt{3}$$ <br>
And 'interpreted' it that way <br>
$$2\sin(2)x \le\sqrt{3}$$ $$\sin(2) > 0 $$$$x\le\frac{\sqrt{3}}{2sin(2)}$$
Do you think that the author of the test should have used parentheses and that the ... | If we don't assume an adversarial context (!), then we should try to understand the intent, context, and sense of the question. Seems highly unlikely that $\sin 2$ often arises as a constant, while $\sin(2x)$ is very common. Thus, we conclude that it is the latter. If the writer intended the unusual $(\sin 2)\cdot x$, ... | Functions in general are parenthesized and in cases where they are not I believe the student's hypothetical interpretation is sound, especially since there is a really nasty habit of doing this with trig functions in particular, e.g. $sin^2x$. Nevertheless, it is almost certain that such a question would be a problem b... | https://math.stackexchange.com |
410,280 | [
"https://electronics.stackexchange.com/questions/410280",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/206246/"
] | I have a power supply with two output capacitors in parallel. 16v 2700uf.
Theoretically, couldn't they be replaced with one 16v or higher 5400uf or do they form some kind of quasi LC circuit via the copper traces?
| <blockquote>
I have a power supply with two output capacitors in parallel. 16v 2700uf. Theoretically, couldn't they be replaced with one 16v or higher 5400uf
</blockquote>
In theory yes, but the parallel caps may offer some advantages:
<ul>
<li>Cost, stock management... Maybe the manufacturer uses the same model o... | I have never heard of a power supply being designed with that in mind. However, there might be a significant difference is total ESR with two small cps vs one large one. Also, two small caps would probably have a significantly lower total induction. Those things might or might not be important for your circuit.
| https://electronics.stackexchange.com |
30,527 | [
"https://quant.stackexchange.com/questions/30527",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/20360/"
] | For $X_t$ a brownian motion defined for $t\in[0,T]$,<br>
How to show the equality of following events:
$$
\{ \displaystyle \max_{[\tau,T]}(X_t)\ge 2u-d, \tau\leq T \}=\{\displaystyle \max_{[0,T]}(X_t)\ge 2u-d\}
$$
where,
$\tau=min\{t:X_t=u\} $ and $0<d <u $
I Thank You in advance.
| Let $\max_{[0, T]} \left( X_t \right) = M_T$. We have $2u - d > u$ and thus $M_T \geq 2u - d$ implies that $M_T > u$. Note that $X$ is a continuous process with initial value $X_0 = 0 < u$. Then, in order for a path of $X$ to start at $X_0 = 0$ and reach a point $M_T > 2u - d$ it has to cross the level $u$ ... | My idea to answer is:
Since $2u-d>u$, then
$$\{ \displaystyle\max_{[\tau,T]} (X_t)\ge 2u-d \}=\{\displaystyle\max_{[0,T]} (X_t)\ge 2u-d \}$$
because the random variable $\tau$ is the time of the first crossing of the barrier $u$ by the process $X$.
In addition, we have the following equality:
$$\{\tau \le T\}=\{... | https://quant.stackexchange.com |
45,581 | [
"https://mechanics.stackexchange.com/questions/45581",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/29480/"
] | I have a 2016 Toyota Venza. This is the last year of the Canadian model and I know there was not a US model that year. I park it outside and do not have anywhere to park it inside.
When air conditioning season started this year I heard a strange fluttery noise from the vents that I did not hear when heating. Since I w... | The cabin air filter is meant to just protect your lungs. It keeps out dust pollen and what not. In the great scheme of things cars only recently got them (in the last 10 to 15 years).
A suggestion is to get a piece of metal screen material. Similar to what window screens use but metal (older windows used this). Cut i... | "<strong>Does the cabin air filter protect anything other than my lungs?</strong>"
Yes, it protects the Evaporator from contamination that reduces cooling performance. Best thing they ever did for AC-Heater systems in motor vehicles.
| https://mechanics.stackexchange.com |
243,517 | [
"https://dba.stackexchange.com/questions/243517",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/50270/"
] | We have items of three types to be stored and queried according to some business logic.
<pre class="lang-sql prettyprint-override"><code>create table a_table
(
item_a varchar2(30),
item_b varchar2(16),
item_c varchar2(2),
-- other columns
);
</code></pre>
And the indexes
<pre class="lang-sql pretty... | I think, from performance perspective, it will be very close.
But some thoughts:
<ol>
<li>One column indexes do not store NULL values. So individual indexes will be smaller. Composite index (item_type, item ) size will be bigger than sum of individual indexes. In extreme cases even the height of indexes may differ.<... | I don't speak Oracle, but I can't see any advantages, logical or performance-wise - with your first scenario. As @brian-leach suggests in his comment, you should enforce the mutual-exclusivity, but that will slow down inserts.
Using this scenario, not only would I be worried about adding item_d to the collection, wha... | https://dba.stackexchange.com |
436,747 | [
"https://softwareengineering.stackexchange.com/questions/436747",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/410755/"
] | I'm working with a legacy codebase that has a lot of functions with a nullcheck on the same object. Example:
<pre><code>std::vector<SessionNode*> * SessionManager::SessionMap;
Session * getSession(int SessionId)
{
//Try to find the Session
//And get the lock
int index1 = getIndex1FromSessionId();
int ind... | Modern C++ fans will probably hate me for this, but I think your best bet here is to go route #3 - just not with a function, but with an old-style preprocessor macro:
<pre><code>#define GetSessionOrReturn(SessionID) auto ptr = getSession((SessionId));\
if (ptr == nullptr)\
{\
LOG(__func__, "SessionPtr ... | If you are willing to do some refactoring, one way is to return the session as a reference (instead of a pointer to it). This implicitly guarantees to each caller that it is valid, and removes the need to test for nullptr.<br />
Inside the method, you would <code>throw</code> if it fails, catching this on a much higher... | https://softwareengineering.stackexchange.com |
541,986 | [
"https://stats.stackexchange.com/questions/541986",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/319077/"
] | I'm working through Probability and Statistics by DeGroot, and I'm on page 276; reading through the paragraph on 'Determining a Sample Size'.
I'm slightly confused here as I'm unsure of the two approaches taken, and why they differ and would really appreciate some clarification!
<ol>
<li>Suppose that a random sample of... | First Question: the standard deviation is the square root of the variance, and the formula for a <span class="math-container">$Z$</span> statistic uses the standard deviation, not the variance. Hence, you must have
<span class="math-container">$$Z
=\frac{\overline{X}_n-\mu}{\sqrt{\sigma^2/n}}
=\frac{\overline{X}_n-\mu}... | There is a difference between the standard deviation (<span class="math-container">$\sigma$</span>) and the standard error <span class="math-container">$\frac{\sigma}{\sqrt{N}}$</span>. If the variance of the total is <span class="math-container">$\sigma^2$</span>, then the variance of mean values of samples drawn from... | https://stats.stackexchange.com |
482,785 | [
"https://electronics.stackexchange.com/questions/482785",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/70512/"
] | Recently I had to build a h-bridge driver for my project, wireless power transmission. I learnt that I needed to have dead-time in my PWM signal given to IR2110, which doesn't have any dead-time control function. As my model only requires below 200kHZ, I had to code the arduino uno which I used to generate the pwm sign... | MOSFET load drivers are much, much larger than the FETs used on a CPU chip: they have to be to deal with the voltage and current they’re designed to drive. As a consequence of their size they have large gate capacitance and so take longer to change their gate voltage from ‘on’ to ‘off’ state. Also, to achieve low Rds(o... | The construction of the MOSFETS in a logic chip is generally very different from the construction of discrete MOSFETs. A typical discrete MOSFET will actually be constructed as a very large number of MOSFETs wired in parallel, which will be arranged with the drain and gate contacts on one side, bulk contact on the oth... | https://electronics.stackexchange.com |
186,469 | [
"https://physics.stackexchange.com/questions/186469",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/82304/"
] | Given a normalised wavefunction say $$\psi(x) = A\sin(n\pi x),$$ (where $A$ is a normalisation constant) I can calculate the probability of finding the particle being between a position $x$ and $x + dx$ as $$\int_{x}^{x+dx} \psi(x)^*\psi(x) dx.$$ Likewise I can calculate the expected value of the energy $$\langle E \ra... | $\newcommand{\d}{\;\mathrm{d}}$
Elaborating on the answer of zeldredge, I want to say why the following expression works:
$$P(E_0) = \left| \int_{-\infty}^{\infty} \ \Phi^* \psi \d x \right|^2 \tag{1}$$
Notice that the eigenfunctions of the Hamiltonian spans the space. That is you can write any function $\psi$ as ... | You have to know the energy eigenstates. Suppose you know that $\Phi (x)$ is an energy eigenstate with $E = E_0$. Then the probability that your state $\psi(x)$ will be measured to have energy $E_0$ is:
$$
P(E_0) = \int_{-\infty}^{\infty} \mathrm{d} x \ \Phi^*(x) \psi(x)
$$
You can do this for the full set of eigenst... | https://physics.stackexchange.com |
352,884 | [
"https://softwareengineering.stackexchange.com/questions/352884",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/210790/"
] | Disclaimer: I think about the <em>agile values</em> a lot, and happily support them.
After almost 20 years of "non-agile" software development projects, and a couple of years in Scrum and alleged "XP" projects, I'm sorry to say that:
<ul>
<li>the non-agile projects worked out pretty well (they were <= 1000 man-day... | Disclaimer: what follows are merely my own opinions, with my limited experience of 4 workplaces.
<blockquote>
First, I think the most important is the people you work with. I kind of like the term "peopleware". Because in the end <em>we</em> do the software, not some methodology. And the results highly depend... | I have worked in successful and non-successful projects, some of which used agile and some of which didn't. Overall, I would say what differentiates satisfying projects from those that aren't is the presence or lack of good project management. So, the successful non-agile projects had regular team meetings (not necessa... | https://softwareengineering.stackexchange.com |
40,775 | [
"https://mechanics.stackexchange.com/questions/40775",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/7623/"
] | My vehicle is a 1999 Saturn SC2 with a coolant capacity of 7 liters.
I attempted to start flushing my coolant before changing the water pump. I drained the coolant from the bottom of the radiation. Then I closed petcock and put in some radiator flush and cleaner into the reservoir then topped it off with distilled wat... | Some vehicles don't have any other means of draining other than the petcock, and given your problem with the thermostat housing, you should probably leave that alone unless you want to replace it, which might be a good idea if it has mineral build up.
It would be better to drain from the radiator, and fill with the c... | To drain the coolant fully you will need to both open the drain (probably the petcock, but check for something around the lower radiator hose as well) and open the cap so that you allow air in. You could also pull off the bottom radiator hose. Be sure to catch the coolant as it comes out, many are both attractive and t... | https://mechanics.stackexchange.com |
168,762 | [
"https://mathoverflow.net/questions/168762",
"https://mathoverflow.net",
"https://mathoverflow.net/users/27456/"
] | Conjecture - no natural number $k$ exists such that:
<ol>
<li>$P$ is the sequence of all primes starting from the $k$th prime</li>
<li>$A$ is a sequence of natural numbers such that:
<ul>
<li>$\forall n : A_n<P_n<A_{n+1}$</li>
<li>$\forall n : F(A_n) \leq F(A_{n+1})$, where $F(x)$ is the number of primes in the... | Indeed, as Tony Huynh expects, your conjecture follows from the prime triples conjecture. That conjecture imples that there exist infinitely many $k$ such that $k,6k-1,6k+1$ are all prime, and infinitely many $m$ such that $12m-1,12m+1$ are both prime. Whenever $P_n$ is one of these $6k+1$ primes, you're forced to take... | I'd guess that there are infinitely many pairs $(p,p+2)$ of twin primes such that $p+1$ has four prime factors (or at least that this can't be ruled out even on heuristic grounds) but that sometimes there are more than four.
There is no proof that there are infinitely many twin primes, but there is every reason to ex... | https://mathoverflow.net |
132,125 | [
"https://electronics.stackexchange.com/questions/132125",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/54633/"
] | I'm given a full bridge rectifier circuit with values for power, industance, and RMS input voltage: [P = 380 W, L = 85 uH, Vs = 115 V].
<img src="https://i.imgur.com/SatC5P5.png" alt="Full Bridge">
The question states to 'select' output resistance for a simulation, but I am unsure if it's possible to calculate this. ... | Assuming negligible losses in the inductor and rectifier and a low value for C, your calculation is good.
As the source is 115V I'm assuming the frequency is 60Hz, so L has a reactance of 0.032Ω - insignificant compared to R. Assuming silicon diodes with suitable ratings the rectifier should be dropping about 1.4... | Or you could just read the number on the resistance. It's not the output impedance you are looking for but the value of the load resistor.
| https://electronics.stackexchange.com |
39,404 | [
"https://electronics.stackexchange.com/questions/39404",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3920/"
] | <img src="https://i.stack.imgur.com/iUpH1.png" alt="enter image description here">
This schematic appears in a recent question. The triangle may be an op-amp or a comparator, because they both have the same connections. (Why) isn't there a separate symbol for a comparator? The functions of op-amp and comparator are ve... | I've never seen a different symbol for comparators, so I had to make up this one:
<img src="https://i.stack.imgur.com/C9oDM.png" alt="enter image description here">
The hysteresis symbol refers to the hysteresis which is often built-in into the IC, or otherwise is almost always needed in the circuit. Does this make... | I'm not an expert on using op-amp or comparators but from my understanding, many op-amps can be used as comparators, the main difference is that the op-amp uses feedback to define the amplification value and the comparator doesn't care much about a linear output since usually we only need a high or low value from it bu... | https://electronics.stackexchange.com |
110,746 | [
"https://electronics.stackexchange.com/questions/110746",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/38252/"
] | As I understand it, digital multiplexers contain multiple inputs (2^N), one output, and N selector lines. The selector lines are used to select which input is mapped to the output line. I then understand that a demuxer takes a single input line and based on the selector lines maps the input to one of multiple outputs.
... | There are three scenarios that I see:
<ol>
<li>The selector lines would either to run <strong>with</strong> the data line (as you suggested)</li>
<li>The selection comes from an external entity that feeds into <strong>both</strong>, the MUX and DMUX</li>
<li>The selection lines are controlled by a synchronised entity ... | Assume that I have an 4-bit counter at both the ends with the output lines of these counters connected to the select lines. Now what I need is a synchronous clock to do what I want.
This is called time division multiplexing (TDM) and for proper communication, the clock rate should be at least 16x times greater than t... | https://electronics.stackexchange.com |
25,416 | [
"https://softwareengineering.stackexchange.com/questions/25416",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/934/"
] | The question might not be as simple as it sounds, as we have struggled with this a bit.
If there are 5 separate bugs, which can be taken care of with a single fix, then it is wasteful to take this approach. One bug might slip through the cracks, and would take away from a complete picture, or just be hidden for some ti... | 5 bugs = 5 bug reports; the fact that they can all be fixed at once is not QA's concern.
in other words, <em>guessing</em> that all 5 bugs stem from the same problem is putting the cart ahead of the horse.
| In general, I agree with @Steven Lowe, but on the other hand I don't want to get 10 bug reports, one for each thing that's spelled wrong. I think that the right approach is for QA to use their heads - if they think it's likely that the things are all one big bug, they should be allowed to put them into one bug report. ... | https://softwareengineering.stackexchange.com |
128,283 | [
"https://electronics.stackexchange.com/questions/128283",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/27365/"
] | I am building a non-isolated buck converter with a N channel MOSFET(2SK4017), I am using the FAN7382 High and low side gate driver. I just want to verify if my wiring is correct before I construct the circuit.
<img src="https://i.stack.imgur.com/p85oW.png" alt="schematic from datasheet">
Since I only need the ... | <blockquote>
Since I only need the high side output
</blockquote>
It is OK to use only the high side output and use a freewheeling diode at the low side. But keep in mind that, a significant amount of losses in Buck Converter occurs on the freewheeling diode. If you use a MOSFET with sufficiently low R<sub>ds,on</sub> ... | No the pin 3 that is LIN must be connected to vcc by 10k resistor to deactivate low side.
Also do not connect LO to GND this will work fine.
| https://electronics.stackexchange.com |
28,673 | [
"https://dsp.stackexchange.com/questions/28673",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/19413/"
] | According to Sampling theorem, in order to reconstruct a signal we need to sample it at the rate => twice the highest frequency component of that signal. (provided signal is band limited).
Let's say, we have a signal with f= 2MHz (highest freq component), so we will be sampling it at 4MHz or more as Sampling theorem s... | Interpolation using a Sinc function kernel. This assumes that the sampled signal was perfectly bandlimited to below half the sampling rate.
Note that perfectly bandlimited signal are infinite in extent. For finite-length "real world" signals, using a windowed Sinc interpolation kernel (thus a finite computation with... | Another way to do it (eg: converting N samples to 2N): take the N point FFT of the signal, then zero pad the frequency domain result to 2N. Then compute the 2N sized inverse.
But note that when zero padding the N point frequency domain result, the zero padding is done in the middle of the spectrum, and the Fs/2 bin i... | https://dsp.stackexchange.com |
422,106 | [
"https://math.stackexchange.com/questions/422106",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/12963/"
] | My textbook has this definition in it (actually, the textbook gives a definition for a modal language with arbitrary modal operators, but i believe the simple language with a single binary operator is enough to demonstrate what i want); a set of formulas $\Lambda$ is a normal modal logic iff all of the following is tru... | <strong>No, it isn't.</strong>
The basic idea of the proof is this: We can define an alternative interpretation for the logic such that the logic is correct with respect to said interpretation, but $\triangledown(\top, \top)$ isn't valid in the interpretation, therefore implying that $\triangledown(\top, \top)$ can't ... | So I think that $\triangledown(\top,\top)$ does follow for all normal logics in the sense you have defined. The following would be a proof in any extension of the logic you have given.
A $\vdash\top$ by 1
B $\vdash\triangledown(\top,\bot)$ by 6
C $\vdash\triangledown(\top,\bot)\to(\triangledown(\top,\bot\to\top)\to\... | https://math.stackexchange.com |
106,949 | [
"https://physics.stackexchange.com/questions/106949",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | I am studying magnetic flux linkage in an ac generator and it appears to be that magnetic flux linkage is negative half the time, how can this be?? Also with lenz's law why is emf defined as negative when magnetic flux is increasing and how does this relate to the direction of the current?
| Yes, magnetic flux can be negative. It just depends on where the field is going. Say there is a sheet and magnetic field is going through it from front to the back, we can call the flux there as positive and negative when it's the other way round.
It is pretty clear from the statement of Lenz's Law why the emf defined... | Magnetic flux is a scalar quantity and its positive/negative sign indicates the direction of the magnetic field.
And the Faraday's law of induction is a quantitative version of Lenz's law, which may help your understanding:
$\oint_{\partial \Sigma} \mathbf{E} \cdot \mathrm{d}\boldsymbol{\ell} = - \frac{d}{dt} \iint_{... | https://physics.stackexchange.com |
26,619 | [
"https://mechanics.stackexchange.com/questions/26619",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/13651/"
] | I have been reading in a few places that air filters get better with age, is this true? And how much better?
Would it have any effect on quality of the oil or make oil dirty faster?
Or is there not a great deal of difference between new and used filters?
Thank you for your time.
| I don't have any empirical evidence for this, but would say no for two reasons:
<ul>
<li>An air filter will collect more dust, dirt, and debris until it gets so full that it starts pushing the older dust, dirt, and debris through the filter, which is what you are trying to prevent in the first place. </li>
<li>As the ... | It all depends on what you mean by getting better.
It is possible that, as the very small holes in the filter that let air through start to trap particles, the places where air can get through will get smaller and smaller. Therefore the filter will start to trap smaller and smaller particles. The air filter may get ... | https://mechanics.stackexchange.com |
388,994 | [
"https://softwareengineering.stackexchange.com/questions/388994",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/331528/"
] | I'm approaching the TDD methodology for software development, reading guides and writing simple applications, because a client of my company wants a software and asked to develop it using TDD methodology.
So I was wondering, besides "trusting" the documentation and reports we'll create, how can one understand and be... | Objectively, there is no way to find out if the tests were written test-first or test-after.
But my personal opinion is that someone who is truly experienced with TDD will recognize if code was written test-first or test after. As they produce noticeably different structures and code. Also I have found that writing te... | You can't prove that a particular methodology was applied to arrive at a particular result.
However, in the specific case of work-for-hire, where the customer owns the resulting IP rights, they could ask for the whole history of development as recorded by your source control tool.
If that history shows that you add... | https://softwareengineering.stackexchange.com |
172,303 | [
"https://electronics.stackexchange.com/questions/172303",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/64356/"
] | Please take a moment to look at the diagram below:
<img src="https://i.stack.imgur.com/o571U.png" alt="enter image description here">
The question is if the lightbulb will momentarily flash when the switch is closed. I think it will but I get the feeling I am wrong.
The reason why I think it will flash is because wh... | Yes, there will be a brief pulse of current through the bulb as the portion of the transmission line (i.e., its capacitance) to the right of the bulb charges to the supply voltage.
| There will be a slight current pulse at switch on even if you consider the circuit a lumped element circuit, i.e. without resorting to transmission line theory. Just keep in mind that in a real circuit stray capacitance is always present, therefore you might model the open end of the transmission line as a capacitor (w... | https://electronics.stackexchange.com |
125,552 | [
"https://stats.stackexchange.com/questions/125552",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/24446/"
] | I was asked to draw a histogram with normal distribution overlay over our data and I'm quite a noob in statistics and require help in this. Our data is an array of floating point values, and the histogram should show the distribution of those. I wrote a small piece of code that does this:
<ol>
<li>Split all my values ... | That curve looks fine to me, in the sense that the curve looks to me like the best possible fit of a normal distribution to your data. Though "least bad" fit would probably be a better way of describing it.
I suspect what is going on is that the large bin > 30 increased the variance, thus making the normal curve wide... | For me it looks fine. Compare a histogram made in R on real data:
<pre><code>hist(mtcars$mpg, freq=F, breaks=12)
lines(density(mtcars$mpg), col="red")
lines(seq(10, 40, by=.5), dnorm(seq(10, 40, by=.5),
mean(mtcars$mpg), sd(mtcars$mpg)), col="blue")
</code></pre>
<img src="https://i.stack.imgur.com/SzEYG.png" a... | https://stats.stackexchange.com |
324,877 | [
"https://electronics.stackexchange.com/questions/324877",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/160484/"
] | I'm working on a project to design Buck Converter with following Criteria
Vin: 4.5-60V
Vout:8-15V
Iout:6-12Amps
| <blockquote>
Is this a good idea, a bad one or an unnecessary one?
</blockquote>
It's likely that there will be some path through the case of the motor to the lathe to the controller anyway — so adding the ground wire will just make that more guaranteed and predictable, which is good.
Two general good reasons to gr... | I was going to post this as a comment to @KevinReid's excellent response, but didn't want to hijack all the comment space.
I work with 180vDC motors regularly, and they (and their controllers) always have some sort of grounding. Grounding the motor case is usually sufficient, as what it is mounted into is typically me... | https://electronics.stackexchange.com |
549,548 | [
"https://physics.stackexchange.com/questions/549548",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/134777/"
] | In the chapter <em>Electric fields in matter</em>, Purcell says,
<blockquote>
The line integral of the field, reckoned over any internal path from <span class="math-container">$A$</span> to <span class="math-container">$B$</span>, must be just <span class="math-container">$\phi_{B} - \phi _{A}$</span>.
</blockquote... | Yes, there's a missing minus sign. The electric field is <span class="math-container">$\mathbf{E} = -\nabla \phi$</span>, So, for any path <span class="math-container">$\gamma$</span> starting from the point <span class="math-container">$A$</span> to the point <span class="math-container">$B$</span>, the correct equati... | Considering <span class="math-container">$\phi_B$</span> and <span class="math-container">$\phi_A$</span> refer to the values of electric potential at <span class="math-container">$A$</span> and <span class="math-container">$B$</span>,
The difference in potential between two points is the negative of the integral of ... | https://physics.stackexchange.com |
310,337 | [
"https://dba.stackexchange.com/questions/310337",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/24112/"
] | When I try
<pre><code>RESTORE DATABASE [foo] FROM DISK = 'C:\foo.bak'
</code></pre>
the restoration procedure will try to put the dat and log in a location that was available on the system where the backup was done (like G:\MSSQLDB), but there is no such location on my computer.
I therefore need to MOVE that locations,... | You can add 6 weeks to your getutc...
<br>and then test that particular day (flightDateLatest) to be greater or equal to <code>DATEADD(week,6,Convert(Date, GETUTCDATE()))</code>
<br>and less then next day <code>DATEADD(DAY,1,DATEADD(week,6,Convert(Date, GETUTCDATE())))</code>
<pre><code>SELECT
*
FROM
(
SELECT CAST... | <h2>computed</h2>
Another potential solution is adding a computed column to your table and indexing that instead, but that's probably overkill here. It makes more sense in situations when your date math is based on two columns.
<pre><code>ALTER TABLE
app.application
ADD
flightDateLatestComputed AS
... | https://dba.stackexchange.com |
383,446 | [
"https://electronics.stackexchange.com/questions/383446",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/103599/"
] | Does VHDL specify how intermediate calculations are handled? For example, I have the following constant defined in one of my entities.
<pre><code>constant MAX_ADDR : integer := (1024*1024*1024*8)/64;
</code></pre>
In Aldec's ACTIVE-HDL simulator the constant correctly evaluates to 134,217,728. On the other hand, in V... | VHDL only guarantees a minimum of 32 bits to represent a (signed) integer. Trying to cram a 34-bit unsigned value into it, even as an intermediate value, is just asking for trouble.
You were careless and got bit. Get over it.
| I guess Dave meant that 32 bits is <strong>maximum</strong> to represent an integer. Instead of <code>integer</code> you can try <code>signed</code> or <code>unsigned</code>. Or, if you are sure about accuracy and that value would not be greater than 2^31-1, you can put division first and then multiplication and it wo... | https://electronics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.