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
49,709
[ "https://mathoverflow.net/questions/49709", "https://mathoverflow.net", "https://mathoverflow.net/users/10909/" ]
I'm assuming someone must have scooped me on this simple argument. Where does it (first) appear in the literature? Fix an ultrafilter $\mu$ on $\omega$, the natural numbers. Alice and Bob play a nim-like game. At the start each player "holds" the empty set and the the starting "position" consists of $\omega$. Beg...
Or just take all powers of $3$ and add to them all numbers that are congruent to $1$ modulo $3$.
This is false. We construct $A$ inductively, so that the following holds: <ul> <li>$A$ contains all powers of two larger or equal than $4$ and no other even numbers.</li> <li>The number of odd numbers in $A$ between $2^j$ and $2^{j+1}$ is $2^{j-2}$.</li> <li>No power of two is in a 3-AP contained in $A$.</li> </ul> W...
https://mathoverflow.net
3,045,344
[ "https://math.stackexchange.com/questions/3045344", "https://math.stackexchange.com", "https://math.stackexchange.com/users/569640/" ]
I have a book about group theory and there was the following question: <blockquote> Let <span class="math-container">$G$</span> be a set of all the real matrices in the following form: <span class="math-container">$\begin{pmatrix}a &amp; b\\ -b &amp; a \end{pmatrix}$</span> when <span class="math-container">$a^2+b^2...
The only potential problem with choosing <span class="math-container">$E$</span> so <span class="math-container">$0 &lt; \mu(E) &lt; \infty$</span> is that there are positive measures <span class="math-container">$\mu$</span> with sets <span class="math-container">$E$</span> such that <span class="math-container">$\mu(...
Here's one problem: Having <span class="math-container">$f\ne 0$</span> on <span class="math-container">$E$</span> doesn't imply that <span class="math-container">$$ \int_E f\, d\mu \ne 0. $$</span> For instance, the positive and negative part of <span class="math-container">$f$</span> could cancel each other on <span ...
https://math.stackexchange.com
594,479
[ "https://physics.stackexchange.com/questions/594479", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/257503/" ]
For an Intro. Thermal Physics course i am taking this year, I had a simple problem which threw me off-guard, I would appreciate some input to see where i am lacking. The problem is as follows: Does the entropy of the substance decrease on cooling? If so, does the <strong>total</strong> entropy decrease in such a proces...
Simple answer yes, Think about taking two extreme cases : How much does a slinky extend in a gravity-free space? None at all How much would it extend if it was on perhaps Jupiter or even a black hole ?It should extend by a large amount. Gravity does play a role.
If a slinky is hanging vertically in a gravitational field, the amount of stretch in any short section depends on the weight of the coil hanging below that section. Less gravity will produce less stretch.
https://physics.stackexchange.com
652,455
[ "https://electronics.stackexchange.com/questions/652455", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/248767/" ]
I was thinking about diamonds, and how they're excellent thermal conductors and yet at the same time very good electrical insulators. Does the opposite of diamond exist, i.e. are there commonly available, inert (as in, safe to use/handle) conductors with poor thermal conductivity?
<blockquote> <em>Does infinite magnetic permeability (e.g. for an ideal transformer) violate conservation of energy?</em> </blockquote> Infinite magnetic permeability produces infinite inductance (even for a single turn coil) and, the rate of change of current that can be produced through an infinite inductance when ap...
The piece would &quot;short out&quot; the H field. The energy in a unit volume of a magnetic core is B times H, and -- of necessity -- the H field would be zero. So the energy stored in the core would be zero. I'm not sure how this would work out with a solenoid core (i.e., an open core). For a toroidal core a simpl...
https://electronics.stackexchange.com
131,470
[ "https://security.stackexchange.com/questions/131470", "https://security.stackexchange.com", "https://security.stackexchange.com/users/119006/" ]
I recently had a call from whom I thought was my broadband company. As the call went on, I realised that it was someone who was trying to hack my bank details. They asked for a card reader, as they wanted to refund me. An amount of money which was not true, but cut the story short. They convinced me that I needed to lo...
I think your basically on the right track. Your client needs to provide some token which your server will recognise or accept as proof that the client is legitimate. How to do this depends on a number of factors and what the risks are you are trying to protect against. There is no one single solution. Some of the thi...
Most services do not validate the application being used as it is extremely hard to get a relatively reliable answer. Therefore what they can validate is the user through authentication and possibly their location through the IP address. That said, some servers do validate the application, but because there is <stron...
https://security.stackexchange.com
509,039
[ "https://physics.stackexchange.com/questions/509039", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/134777/" ]
Coulomb's law states that if we have two charges <span class="math-container">$q_{1}$</span> and <span class="math-container">$q_{2}$</span>, then <span class="math-container">$q_{1}$</span> will act on <span class="math-container">$q_{2}$</span> with a force <span class="math-container">$$ \textbf{f}_{12}=\frac{q_{1}q...
<blockquote> Suppose the only things we knew was that the repulsive forces vary like <span class="math-container">$r^{-2}$</span>, and that they depend on the magnitude of the charges involved. Can we infer from these two observations alone that <span class="math-container">$\textbf{f}_{21}=-\textbf{f}_{12}$</span>?...
It is worth repeating that <strong>laws</strong> in physics are <strong>axioms</strong>, there is no proof or derivation other than that the law is necessary, so that a physical mathematical theory can choose those solutions that will <strong>fit existing data</strong> and, important, will be <strong>predictive</stro...
https://physics.stackexchange.com
736,210
[ "https://physics.stackexchange.com/questions/736210", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/346417/" ]
My question is in regards to the variational principle in approximating the wavefunction of Helium. <strong>Some Background:</strong> <span class="math-container">$$\hat{H}=-\frac{\hbar^2}{2m_{e}}\nabla_{1}^{2}-\frac{\hbar^2}{2m_{e}}\nabla_{2}^{2}-\frac{Ze^2}{4\pi\epsilon_{0}r_{1}}-\frac{Ze^2}{4\pi\epsilon_{0}r_{2}}+\f...
<span class="math-container">$\newcommand{\bra}[1]{\langle #1 \rvert}$</span> <span class="math-container">$\newcommand{\ket}[1]{\lvert #1 \rangle}$</span> <span class="math-container">$\newcommand{\amat}[4]{\left(\begin{matrix}#1 &amp; #2 \\ #3 &amp; #4 \end{matrix}\right)}$</span> <blockquote> Why is the full Hamilto...
This is because the variational approach seeks an optimal wavefunction for a <em>fixed</em> Hamiltonian. What is unusual about the helium atom is that the guess function is a solution to the problem <em>with interactions</em> but its form is very closely related to the form of the exact solution <em>without inteaction<...
https://physics.stackexchange.com
1,562,294
[ "https://math.stackexchange.com/questions/1562294", "https://math.stackexchange.com", "https://math.stackexchange.com/users/244966/" ]
(Quant Job interviews Questions and Answers Q3.22) <blockquote> Suppose we have an ant travelling on edges of a cube going from one vertex to the other. The ant never stops and it takes it one minute to go along one edge. At every vertex the ant randomly picks one of the three available edges and starts going along th...
Look at the distance from the origin after an even number $2k$ of minutes. This distance can only be 0 or 2. In two minutes the ant can do the following : $0 \rightarrow 1 \rightarrow 0$ with probability $1\cdot1/3$ $0 \rightarrow 1 \rightarrow 2$ with probability $1\cdot2/3$ $2 \rightarrow 1 \rightarrow 0$ with pr...
To model this as a Markov chain, let $$S=\{(0,0,0),(0,1,0),(0,0,1),(0,1,1),(1,0,0),(1,1,0),(1,0,1),(1,1,1)\}$$ and $P$ an $8\times8$ matrix with $P_{ij}=\frac13$ if $i$ and $j$ vary in exactly one digit, $0$ otherwise. Let $\{X_n:n\geqslant 0\}$ satisfy $$\mathbb P(X_{n+1}=j\mid X_0=i_1, \ldots, X_{n-1}=i_{n-1},X_n=i)...
https://math.stackexchange.com
559,643
[ "https://electronics.stackexchange.com/questions/559643", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/248108/" ]
As an electronics hobbyist, I've already built a thing or two so this didn't seem like a complicated thing to do, but I was terribly mistaken. I wanted to build an FM modulated radio transceiver controlled by an Arduino board that would work anywhere between 86 and 520 MHz so that it'd include normal FM radio, VHF and ...
<blockquote> I expected there to be a miracle IC that would just require an audio and carrier wave input </blockquote> Ah, but FM actively modulates a carrier; you can of course use the external oscillation input as carrier for a superhet design, but then you'll still need to generate the FM-modulated IF <em>and</em> ...
Most of the answers are treating the transmit side. Basically however, the fundamental problem is that building such wideband tranceivers, fm, am or whatever is just very difficult. I suspect that you are not going to find any transceivers that cover a continuous range up to 500 MHz. If you did, they would probably inc...
https://electronics.stackexchange.com
9,302
[ "https://physics.stackexchange.com/questions/9302", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/1927/" ]
I think I saw in a video that if dark matter wasn't repulsive to dark matter, it would have formed dense massive objects or even black holes which we should have detected. So, could dark matter be repulsive to dark matter? If so, what are the reasons? Could it be like the opposite pole of gravity that attracts ordinar...
Lubos Motl's answer is exactly right. Dark matter has "ordinary" gravitational properties: it attracts other matter, and it attracts itself (i.e., each dark matter particle attracts each other one, as you'd expect). But it's true that dark matter doesn't seem to have collapsed into very dense structures -- that is, th...
Dark matter surely has to carry a positive mass, and by the equivalence principle, all positive masses have to exert attractive gravity on other masses. Also, from the viewpoint of phenomenological cosmology, we obviously want dark matter to attract itself. It has to attract visible matter because this is why dark mat...
https://physics.stackexchange.com
138,582
[ "https://cs.stackexchange.com/questions/138582", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/134947/" ]
I was looking to solve this reduction, but I dont see how to construct the new graph. It seems very simple but I'm not capable of do it. I give you the complete explanation about this reduction. We consider a variant of the independent set problem which we shall call, Independent Set with a Fixed Node, in which the inp...
As I understand, your problem is a decision problem defined as such: Independant set with fixed vertex (ISFV): <ul> <li>Input: a graph <span class="math-container">$G = (V, E)$</span>, a vertex <span class="math-container">$u \in V$</span>, an integer <span class="math-container">$k$</span>.</li> <li>Question: is there...
Suppose that we are given a graph <span class="math-container">$G$</span> and want to know whether it has an independent set of size <span class="math-container">$k$</span> containing <span class="math-container">$u$</span>. Such an independent set cannot contain any neighbor of <span class="math-container">$u$</span>,...
https://cs.stackexchange.com
337,385
[ "https://math.stackexchange.com/questions/337385", "https://math.stackexchange.com", "https://math.stackexchange.com/users/67928/" ]
Suppose we have matrices $A, B, C$ of dimensions $m \times n, m\times n, n \times l$ respectively. How can we prove $(A+B)\circ C = A\circ C + B \circ C$ (using the summation notation method?)
Tedious way...coefficientwise: $$ ((A+B)C)_{i,j}=\sum_{k=1}^n(A+B)_{i,k}C_{k,j}=\sum_{k=1}^n(A_{i,k}+B_{i,k})C_{k,j} $$ $$ =\sum_{k=1}^nA_{i,k}C_{k,j}+B_{i,k}C_{k,j}=\sum_{k=1}^nA_{i,k}C_{k,j}+\sum_{k=1}^nB_{i,k}C_{k,j} $$ $$ (AC)_{i,j}+(BC)_{i,j}=(AC+BC)_{i,j} $$ for all $1\leq i\leq n$ and all $1\leq j\leq l$. So $(A...
<strong>Hint:</strong> Look at the linear maps represented by $A$, $B$ and $C$.
https://math.stackexchange.com
330,602
[ "https://softwareengineering.stackexchange.com/questions/330602", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/82182/" ]
the QA team should ideally do their testing on an environment that almost exactly matches the prod env (to minimize uncaught bugs that arise due to setting differences). If that's true, does the QA team typically do the testing again on prod post deployment in the googles and amazons out there? If the answer is yes t...
Depends what you're doing, but often you can't test in production because the system is now attached to real resources. In the case of Amazon, would you run a real order with a real credit card and wait for the book to arrive? You often need to be careful about putting test data into a production system. Once it's gon...
You don't test in production because you won't find anything you don't find in a proper test environment. Maybe some kind of quick check if deployment went ok, but this is not a big part of testing. First you test your code (unit test). Then you test your code in the whole application (integration test). Then you te...
https://softwareengineering.stackexchange.com
964,509
[ "https://math.stackexchange.com/questions/964509", "https://math.stackexchange.com", "https://math.stackexchange.com/users/181674/" ]
In isosceles trapezoid $ABCD$, $AB=6$, $BC=9$, $CD=8$, and $AD=9$ find the distance from point $D$ to $BC$ (perpendicular).
Here are some questions you should be able to answer, which will help you to find the answer you're looking for. <ol> <li>What is the distance from $AB$ to $CD$? (<em>Hint</em>: Use Pythagorean Theorem.)</li> <li>What is the area of triangle $BCD,$ given the answer to the first question?</li> <li>If we consider $BC$ a...
A picture can help a lot: $\hspace{3cm}$<img src="https://i.stack.imgur.com/00Dtl.png" alt="enter image description here"> <strong>Hint:</strong> Find a couple of similar right triangles (one of which you know a couple of sides).
https://math.stackexchange.com
71,509
[ "https://physics.stackexchange.com/questions/71509", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/27232/" ]
The classic example of an indeterministic system is a radioactive isotope, e.g. the one that kills Schrödinger's cat. I get there are arguments against hidden variables in quantum mechanics, but how could they be so sure, back in the twenties, that the strong nuclear forces involved in radioactivity were not governed ...
Schrödinger came up with the cat in 1935, which was relatively late in the development of quantum mechanics. Back in the 1920's there had been a lot more uncertainty. The Copenhagen school had wanted to quantize the atom while leaving the electromagnetic field classical, as formalized in the Bohr-Kramers-Slater (BKS) ...
It was known that a nucleus existed back in the 20's. If you ever did experiments with nuclear decay you would see the hallmarks of a Poisson process. I am talking about simple undergraduate experiments, which, I guess, that in most countries even theoreticians specializing in other branches have to do before they get ...
https://physics.stackexchange.com
20,410
[ "https://dba.stackexchange.com/questions/20410", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2321/" ]
I am more experienced with SQL Server and Sybase than Oracle, and understand those products well. I've been asked to look for ways to reduce the server estate running Oracle. I understand that an instance in Oracle maps to a database hosting many tablespaces. I have a fairly good grasp of the fundamentals, however if I...
You have two options: <ol> <li>Run multiple Oracle instances on the same machine</li> <li>Consolidate all of your Oracle instances into a single instance, placing the data in separate schemas</li> </ol> Since you're familiar with SQL Server/Sybase, I'll explain the difference between them &amp; Oracle as far as datab...
It is fairly easy to consolidate multiple databases into one real database. In Oracle, a database is the collection of files. Users connect to the database by connecting to an instance. A database can be served by multiple instances, in which case you are running RAC. So for simply consolidating database into one sing...
https://dba.stackexchange.com
260,257
[ "https://mathoverflow.net/questions/260257", "https://mathoverflow.net", "https://mathoverflow.net/users/100898/" ]
Let $a,q$ be a positive integers. I am trying to evaluate the following sum: $\sum_{\substack{1&lt;a&lt;q \\(a,q)&gt;1 \\ (a+1,q)&gt;1}}1$. Is there a formula that exists to calculate such sums? Here is an example: Let $q=15$. We have the following multiple of divisors: 1,2,3,5,6,9,10,12,15. But since the two pair...
At first, we count the number of residues $a$ for which both $a$ and $a+1$ are coprime with $n$. Let $q=\prod p_i^{k_i}$ be a factorization of $q$. For any $p_i$, there exist $p_i-2$ admissible remainders modulo $p_i$ (forgotten remainders are 0 and $-1$), thus $(p_i-2)p_i^{k_i-1}$ admissible remainders modulo $p_i^{k_...
What you have written down is already a formula for calculating the sum, so really you need to be more precise about what the question is. But here are some comments which give a simpler formula in the case where $q$ is only divisible by a few primes. If $q$ is a prime power $p^e$, then the sum is zero, because $(a,q...
https://mathoverflow.net
59,062
[ "https://dba.stackexchange.com/questions/59062", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/9353/" ]
I have a table (not designed by me) which has 20 variably named columns. That is, depending on what type of record you are looking at, the applicable name of the column can change. The possible column names are stored in another table, that I can query very easily. Therefore, the query I'm really looking for goes so...
Try the following code: <pre><code>CREATE TABLE #Names ( [Type] VARCHAR(50), ColNum SMALLINT, ColName VARCHAR(50), ColDataType VARCHAR(20) ) INSERT INTO #Names VALUES ('Customer', 1, 'CustomerID', 'INT'), ('Customer', 2, 'CustomerName', 'VARCHAR(50)'), ('Customer', 3, 'CustomerJoinDate', 'DATE'), ('C...
This sounds prime for a front end display solution. Query 1 would pull back your data, Query 2 would pull back the column names and in code when you build what ever structure you use to display you set the headers from the second query. While a Pure SQL Method may be possible it will be dynamic SQL and code maintnenc...
https://dba.stackexchange.com
151,163
[ "https://stats.stackexchange.com/questions/151163", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
<blockquote> Implement an estimator using Monte Carlo integration of the quantity $$\theta=\int_0^1e^{-x^2}(1-x)dx$$ Estimate $\theta$ with a variance lower than $10^{-4}$ by writing the variance of this estimator depending on sample size. </blockquote> We can write $$\theta=\int \phi(x)f(x)dx$$ where $\phi(x...
The problem is that without knowing exactly what <span class="math-container">$\theta$</span> is, we cannot know the variance of its Monte-Carlo estimator. The solution is to <em>estimate</em> that variance and hope the estimate is sufficiently close to the truth. <hr /> <strong>The very simplest form of Monte-Carlo e...
<blockquote> Implement an estimator using Monte Carlo integration of $$\theta=\int\limits_0^1e^{-x^2}(1-x)dx$$ </blockquote> While you can use a $\mathcal{U}([0,1])$ distribution for your Monte Carlo experiment, the fact that both $$x \longrightarrow \exp\{-x^2\}\quad \text{and}\quad x \longrightarrow (1-x)$$ are ...
https://stats.stackexchange.com
47,476
[ "https://softwareengineering.stackexchange.com/questions/47476", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/14/" ]
In academia, it's considered cheating if a student copies code/work from someone/somewhere else without giving credit, and tries to pass it off as his/her own. Should companies make it a requirement for developers to properly credit all <em>non-trivial</em> code and work that they did not produce themselves? Is it use...
I'd say this is probably essential. For one thing, the company may need to deal with any license terms and other legal implications - just because it's "free" doesn't mean you can do what you like with it. However, there may be an exception with example code copied and adapted from reference books. After all, that's b...
I always do. I also link back to the original source. I do this more for reference then to give credit. (So I can go back and see the original authors notes and or updates) I think its good practice, but totally unenforceable, having a policy in place is almost worthless, as I don't think it will change anyones behavi...
https://softwareengineering.stackexchange.com
20,922
[ "https://electronics.stackexchange.com/questions/20922", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5651/" ]
I'm currently working on a project involving (I think 3mm, 1.5VDC) Infrared LEDs. However, due to my photoresistor, I think the current, voltage, or whatever (forgot) will vary greatly to minuscule amounts. So, do these LEDs need UVLOs? They are very, very sensitive and I've already wasted half the pack.
No. LEDs are not damaged by low voltages. If you are damaging LEDs, you must be driving them beyond their rated currents. Show your circuit to receive advice. In general, very few electronic components are damaged by undervoltage. Some microprocessors can mis-execute in a brownout condition, which could have undes...
LEDs cannot be damaged by "forward" voltages that are so low that they do not draw rated current. They <strong>can</strong> be damaged by voltages that are low by normal standards.<br> An infrared LED may easily be destroyed by a 3V3 or 5V power supply if current in excess of its maximum rated current flows. LEDs ...
https://electronics.stackexchange.com
336,231
[ "https://physics.stackexchange.com/questions/336231", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/120802/" ]
If you (hypothetically) had an infinitely cold ice cube (an ice cube that stays at absolute zero no matter how much heat it absorbs), how long would it take for the Universe to cool down to absolute zero?
There is no such thing as a infinity cold ice cube. The closest scenario I can think of is a system with a heat sink; a system coupled to a very large heat reservoir. You can them solve a heat equation. You should also take into account that only at $$t\rightarrow \infty $$ will the temperature of the system equal ...
Absolute zero means that the particles aren't moving at all. Any thermal energy will be absorbed by the cube. If we assume diffusion as the only method of heat transfer, there must be a direct chain of mass from the cube to all other objects in the universe for it to absorb energy from all of them. The second there is ...
https://physics.stackexchange.com
413,788
[ "https://electronics.stackexchange.com/questions/413788", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/194133/" ]
I am having a difficultly with producing <span class="math-container">\$S, P, Q \$</span> and <span class="math-container">\$D\$</span> from Instantaneous Power <span class="math-container">\$p(t)\$</span>. Let's say that both voltage and current are clear sine waves. Then: <span class="math-container">\$p(t) = Vsin...
I think I found the answer I am looking for. I am presenting it here, so it will be available to anyone that is interested. First consider: <span class="math-container">\$v(t) = V_1cos(ω_1t+φ_{V_1}) \\ i(t)=I_1cos(ω_1t+φ_{I_1})\$</span> then: <span class="math-container">\$p(t) = v(t)\cdot i(t) = \\V_1I_1cos(ω_1t+φ...
Starting with the <strong>definition</strong> for active power <span class="math-container">\$P = \frac{1}{T} \int_0^T v(t) \cdot i(t) \cdot dt = \frac{1}{T} \int_0^T p(t) \cdot dt\$</span> one gets the following expression for the power for linear networks (containing R, L, C, all constant): <span class="math-cont...
https://electronics.stackexchange.com
395,028
[ "https://physics.stackexchange.com/questions/395028", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/185504/" ]
I´ve searched about this but I cant really find an answer that satisfies me. What happens that determines " This wave has frequency value equal to x Hz and a value of wavelength equal to y " I cant seem to understand this... Does the wavelength has anything to do with length is there something moving up and down and...
<blockquote> Does the wavelength has anything to do with length is there something moving up and down and each cycle is a complete wave </blockquote> In classical EM, the answer is that the wavelength is the distance between the peak voltages in the electric field. When you think of a water wave, it's easy to see t...
My understanding is that what is moving up and down is the strength of the electric field at a particular point in space. EM radiation is generated by the mechanical vibration of charged particles. Remember a charged particle casts an electric field that decays as 1/r^2. When a charged particle moves, say in the +x d...
https://physics.stackexchange.com
8,423
[ "https://cardano.stackexchange.com/questions/8423", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/5844/" ]
I have a Daedalus wallet running which is a full node so in theory, I should get all the CLI functionality from that one install, how do I access it?
Daedalus has its own <code>cardano-node</code> instance, so you can specify the node's socket variable and use it for <code>cardano-cli</code> purposes. First, launch Daedalus, and click on Help &gt; Daedalus Diagnostics. Under the &quot;Core Info&quot; section, the &quot;Daedalus State Directory&quot; specifies the fi...
Go to the Deadalus menu, and you should see a menu item that says &quot;Open a Marlowe terminal&quot;, and a terminal will open with Marlowe Cli installed.
https://cardano.stackexchange.com
139,677
[ "https://mathoverflow.net/questions/139677", "https://mathoverflow.net", "https://mathoverflow.net/users/8133/" ]
DISCLAIMER: All pointclasses considered here are boldface. Most of the time, when doing descriptive set theory, we want the projective sets to "behave well;" for example, maybe we don't want there to be nonmeasurable projective sets, or projective well orderings of $\mathbb{R}$, etc. Generally, this means making some ...
Unless I am mistaken, it seems to me that $\Delta^1_2$ does have the uniformization property in $L$. For any set $A$ in $\Delta^1_2$, let $B$ select the $L$-least witness on each slice. So $B$ unifomizes $A$, and the graph of $B$ appears to be $\Delta^1_2$, by the following reasoning: <ul> <li>$x\oplus z\in B$ if an...
Assuming $V=L$ then we have $AC$ and $CH$, so every set of reals is at most $\aleph_1$ Suslin. So we can find scales for them and uniformize them.In particular every $\Delta^1_2$ set of reals can be uniformized. As Joel said in the comment above this works for all $\Delta^1_n$ under $V=L$.
https://mathoverflow.net
45,449
[ "https://mathoverflow.net/questions/45449", "https://mathoverflow.net", "https://mathoverflow.net/users/756/" ]
<strong>SymMonCat</strong> is the cartesian 2-category of symmetric monoidal categories, braided monoidal functors, and monoidal natural transformations. The terminal symmetric monoidal category <strong>1</strong> has one object $I$ and $I \otimes I = I$. A category enriched over a monoidal category $V$ assigns to ea...
[Ignore this first part, I'm just leaving it for the context to the comments below.] It is hard for me to understand why you would want to enrich in symmetric monoidal categories, have an identity, and also want this identity to <em>not</em> be the unit of the symmetric monoidal category. That said, you can always ...
I suppose that the monoidal structure for $ SymMonCat$ you mean is the cartesian one, and as braided functor you mean a pseudo-monidal symmetrical (funtors that commutes with the canonical isomorphism of symmetry, and the coherence morphism data are isomorphisms). Then $\mathcal{C}(X, X)\in SymMonCat$ has a internal...
https://mathoverflow.net
74,800
[ "https://cs.stackexchange.com/questions/74800", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/55524/" ]
We define $\mathbf P$ as the set of problems solvable in polynomial time. We define $\mathbf{NP}$ as the set of problems with a verifier $ \in \mathbf P$. Is there a name for problems whose verifiers are $\in \mathbf {NP}$ (e.g., $\mathbf{N(NP)}$)? I can't see this being a very <em>useful</em> complexity class, but, f...
Suppose you had a problem such that for any $x \in L$, there was a verifier $v$ such that $v$ could be checked against $x$ by a nondeterministic polynomial time algorithm. For a valid $(x, v)$ pair, there is some verifier $v'$ such that it takes polynomial time to check $((x, v), v')$ is a correct verification. But th...
If a problem has a verifier you can guess it with nondeterministic TM so it is automatically in NP.
https://cs.stackexchange.com
28,061
[ "https://quant.stackexchange.com/questions/28061", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/5641/" ]
I'm self studying for an actuarial exam and I am curious about a property of the antithetic variate method for increasing the Monte Carlo price accuracy (i.e. For every random draw of $z$, also include a draw of $-z$ in the simulation). <strong>Question:</strong> Assume the Black-Scholes framework and consider a Euro...
No, you can have $$ \frac{1}{2n}\sum_{i=1}^{2n} C(S^i_T,K,T) = 0 $$ First off, there's the obvious case where $n=1$ and $u_1 = 0.5$ More generally, for options way out of the money it is common to have $$ \frac{1}{n}\sum_{i=1}^{n} C(S^i_T,K,T) = 0 $$ even for very large $n$. Antithetic sampling does not change...
No. Antithetic variable method is usually for generating smaller standard error than your non-antithetic method, which is a direct result of the negative correlation between original variable and the antithetic variable. For OTM option, there definitely will be a lot of path ending up with value 0. What may be a choic...
https://quant.stackexchange.com
1,118,226
[ "https://math.stackexchange.com/questions/1118226", "https://math.stackexchange.com", "https://math.stackexchange.com/users/203535/" ]
I read that for $y=ax^2+bx+c$ is a quadratic function where $a\neq0$, but is it true that $a$ really can't be zero? I think it is because if $a$ <strong>was</strong> zero, there wouldn't be a parabola. There would just be a flat line, so then it wouldn't be quadratic because the $x^2$-term indicates if the parabola o...
If $a=0$, you no longer have a parabola. Instead, you have a line: $y = bx+c$, with slope equal to $b$, and a $y$-intercept at $c$.
I guess I'm right. If $a$ is zero, then $y=ax^2+bx+c$ would change to $y=bx+c$, leaving $b$ as the slope and $c$ as the y-intercept, leaving a flat line, not a parabola.
https://math.stackexchange.com
316,555
[ "https://softwareengineering.stackexchange.com/questions/316555", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/113314/" ]
In C++ I frequently see these two signatures used seemingly interchangeably: <pre><code>void fill_array(Array&lt;Type&gt;* array_to_fill); Array&lt;Type&gt;* filled_array(); </code></pre> I imagine there is a subtle difference, but I don't know what it is. Could someone explain when I might prefer one form over the o...
The first kind of signature is usually preferable. The difference is that the second signature requires the array to be created inside the function. In particular, the second signature effectively requires the array to <strong>outlive the scope in which it was created</strong>. So what we're really comparing are these...
It seems most likely that the second one returns <code>Array&lt;Type&gt;</code> and not <code>Array&lt;Type&gt;*</code>. In the first case, there is an <code>Array&lt;Type&gt;</code> somewhere and you pass a pointer to it, so the function can fill it. In the second case, the function creates an object and returns it (u...
https://softwareengineering.stackexchange.com
156,874
[ "https://dba.stackexchange.com/questions/156874", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/111846/" ]
My question is regarding database design/architecture, but I'll use a familiar example to explain it. Suppose there is a database for banking. This database has a table called <code>Customers</code> which stores <code>ID</code>, <code>Name</code>, <code>Address</code>, etc.. Now each of these customers can have their ...
The following should help with the execution time: <ul> <li>remove the <code>ORDER BY</code> if it isn't strictly necessary</li> <li>replace the join of <code>dr</code> table with <code>WHERE EXISTS (SELECT 1 FROM tms_door_record_raw As dr WHERE c.card_no = dr.card_no AND dr.record_time BETWEEN '2016-11-01' AND '2016-...
Remove the GROUP BY.<br> If you have (logicaly valid) duplicates remove them at early stage.
https://dba.stackexchange.com
169,485
[ "https://electronics.stackexchange.com/questions/169485", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/32541/" ]
I'm reading the first chapter of the AoE. I've come across this section on differentiator/integrator circuits and couldn't understand the math behind it. <img src="https://i.stack.imgur.com/pNe7M.png" alt="differntiator"> <img src="https://i.stack.imgur.com/2cM4z.png" alt="integrator"> For the first picture, it says...
What they mean is that a passive R/C filter can only approximate a differentiator/integrator so long as the time constant is much slower than the signal. The reason for this is that the true behavior of an R/C and R/L circuit is exponential in time e.g. from basic circuit theory, the general response of an RC circuit i...
As an alternative, you can watch the phase response of the circuits. Remember that an ideal differentiating (integrating) process requires a phase shift between input and output of +90deg (-90deg). A passive C-R resp. R-C combination allows these values for infinite frequencies only. Hence, only an approximation of the...
https://electronics.stackexchange.com
178,582
[ "https://physics.stackexchange.com/questions/178582", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/27123/" ]
I've previously learned that massive particles cannot achieve the speed of light. But recently I read that, concerning the gels that refract and bounce light within around enough that it can travel at worldly speeds, and by extension how electromagnetism propagates through matter, that pure photons are thought of as i...
First, we will look at the energy of a free relativistic particle of (rest) mass $m$ moving with velocity $v$: $$E = \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}}$$ where $E=mc^2$ when $v=0$. We now consider a few cases: <ol> <li>$m\ne0$: In this case, $E\rightarrow\infty$ as $v\rightarrow c$. Therefore, a massive particle th...
Every particle needs to have energy to be a particle (if it had none it wouldn't even exist). Since energy is equivalent to mass and therefore gravitates I would say YES, all particles that have a speed less than the speed of light must also have mass. Because the speed of the particle is less than the speed of light ...
https://physics.stackexchange.com
335,218
[ "https://softwareengineering.stackexchange.com/questions/335218", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/157012/" ]
From Wikipedia on Single responsibility principle SoC <blockquote> ... class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility cla...
<h2>General</h2> Single Responsibility has something to say about semantic redundancy and false semantic cohesion of code fragments (modules, classes, methods functions). The problem is (with all SOLID principles) <strong>it's not about applying them, it's about identifying a violation them</strong>. Once you think it...
The responsibility here is <code>dog</code>. Dog is as dog does. Many people read the Single Responsibility Principle as <em>"Must do only one thing."</em> That's not what it means. Bob Martin, author of the principle (and prolific source of mass confusion for inexperienced programmers everywhere) says it like th...
https://softwareengineering.stackexchange.com
62,265
[ "https://mathoverflow.net/questions/62265", "https://mathoverflow.net", "https://mathoverflow.net/users/2284/" ]
This semester, I teach an introduction to probability course tailored for students with no science background and so with very <em>very</em> little prerequisites. We started with the basics of analytic combinatorics then moved on to random variables and the study of common laws (binomial, hypergeometric, geometric, Poi...
What about the characterization of Poisson point processes ? Let us consider a counting process $(N(t))_{t \ge 0}$. That is, $N(0)=0$, $N(t)$ only increases by jump of height $1$, and is right continuous. You can see $N(t)$ as the number of points of a random set in $]0,t]$. Then $N(t)_t$ is a homogeneous poisson poi...
We can't expect a completely finite way for the Poisson distribution to arise, since the number $e$ must come from somewhere. On the other hand, it should definitely not be necessary to introduce Stirling's formula. I think the most natural approach is to define Poisson($\lambda$) as the limit distribution of the numb...
https://mathoverflow.net
28,118
[ "https://physics.stackexchange.com/questions/28118", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/9129/" ]
The theory I've recently come to postulates that: <ol> <li>The volume of space filling the universe is finite and is constantly growing, thus the boundaries of the universe are constantly expanding.</li> <li>The expansion of the universe's boundaries is caused by light that is converted into fresh space while reaching...
What you are describing looks like a hypothesis to me. A hypothesis is an idea. You have an idea. A theory, in the sense it is used by modern physics, is an idea about how the universe works which is supported by some rigorous elements, whether we're talking about some mathematical explorations (such as in the case of ...
The current theory for describing the large scale structure of the universe is General Relativity and in particular the FLRW metric. GR gives us a set of equations into which we can feed experimental data and from which get predictions. So far the predictions have agreed with every experiment we've done, and that's why...
https://physics.stackexchange.com
148,799
[ "https://softwareengineering.stackexchange.com/questions/148799", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/2673/" ]
<strong>When we say 'documentation' for a software product, what does that include and what shouldn't that include?</strong> For example, a recent question asked if comments are considered documentation? But there are many other areas that this is a valid question for as well, some more obvious than others: <ul> <li...
The goal of documentation is to describe and explain the software product, so you could define the documentation to be the set of artefacts that contribute to that description or explanation. You'd probably not consider related <em>actions</em> as part of the documentation: e.g. a week-long training course is not docum...
I think you took away the wrong part from your conversation at a conference. Modern software development methodologies advocate that the development team should be working closely with its customers (or a product owner who's acting as a customer proxy). For all work delivered, definition of "done" is something that is ...
https://softwareengineering.stackexchange.com
477,858
[ "https://physics.stackexchange.com/questions/477858", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/195488/" ]
Can someone in simple terms why you would use Nyquist frequency limits when processing a signal? What benefit does it provide, and how does it affect the results? And how does it relate to the Nyquist rate?
The Nyquist sampling theorem (sometimes called the Nyquist-Shannon sampling theorem) says, if you have a signal that is bandlimited with bandwidth <span class="math-container">$B$</span>, then if you sample it with a sampling period <span class="math-container">$T_s$</span> <em>strictly</em> less than <span class="math...
As suggested by a comment, you should give us some context. There a several ways to answer the question. I'll provide a partial answer that is particularly relevant to physics, esp discrete periodic systems such as atoms in a solid. But there are other aspects, especially as concerns continuous systems and time-doma...
https://physics.stackexchange.com
705,179
[ "https://physics.stackexchange.com/questions/705179", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/123113/" ]
My understanding of the flatness problem is that it says that if we leave out dark energy and inflation, then the density parameter <span class="math-container">$\Omega(t)$</span> tends to <span class="math-container">$\infty$</span> or <span class="math-container">$0$</span> unless we have <span class="math-container"...
Relation between curvature <span class="math-container">$k$</span> and density parameter <span class="math-container">$\Omega$</span> can be described with 1st Friedmann equation. <span class="math-container">$$(\frac{\dot{a}}{a})^2 +\frac{kc^2}{a^2} = \frac{ 8\pi G }{3}\rho$$</span> Define Hubble parameter be <span cl...
As you pointed out, as we go back in time, <span class="math-container">$\Omega_{\rm total}-1$</span> needs to be very small (i.e., <span class="math-container">$|\Omega_{\rm total}-1| \propto 10^{-61}$</span>) This situation brings to mind the following question; Why should the universe have started from such a unique...
https://physics.stackexchange.com
205,712
[ "https://math.stackexchange.com/questions/205712", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43306/" ]
I have a set of N random integers between A and B. Assuming that my random number generator is equally likely to return any integer between A and B, how can I calculate the probability that the next random integer is already present in my set? I want to estimate how many random numbers I should generate in a batch su...
To complete your argument you have to show that $\ln(p_n)/\ln(n) = 1.$ Now, <em>if</em> you have that $p_n \sim n\ln (n),$ then $\ln(p_n) = \ln(n) + \ln\ln(n) + o(1)$, and so indeed $\ln(p_n)/\ln(n) \to 1$ as $n \to \infty$. So at least this is consistent with what you are trying to prove. On the other other hand,...
There is a problem with this approach. You took $x = p_n$, but that means $\ln(x) = \ln(p_n)$ and <i>not</i> $\ln(n)$.
https://math.stackexchange.com
936,611
[ "https://math.stackexchange.com/questions/936611", "https://math.stackexchange.com", "https://math.stackexchange.com/users/58742/" ]
let $p,q$ is postive integer,and such $$\dfrac{95}{36}&gt;\dfrac{p}{q}&gt;\dfrac{96}{37}$$ Find the minimum of the $q$ maybe can use $$95q&gt;36p$$ and $$37p&gt;96q$$ and then find this minimum of the value? before I find a $$2.638\approx \dfrac{95}{36}&gt;\dfrac{49}{18}\approx 2.722&gt;\dfrac{96}{37}\approx 2.59 ...
An interesting trick so solve such kind of problems is to consider the continued fraction of the LHS and the RHS. We have: $$\frac{95}{36}=[2;1,1,1,3,3],\qquad \frac{96}{37}=[2;1,1,2,7]$$ hence $$\frac{13}{5}=[2;1,1,2]$$ just lies between the LHS and the RHS, and it is the rational number with the smallest denominator ...
We have $$2.64\gt a=\frac{17575}{5\cdot 36\cdot 37}=\frac{95}{36}\gt \color{red}{\frac{13}{5}}=2.6=\frac{17316}{5\cdot 36\cdot 37}\gt\frac{96}{37}=\frac{17280}{5\cdot 36\cdot 37}=b\gt 2.59.$$ Note that $$\frac{11}{4}\gt a\gt b\gt\frac{10}{4}$$ $$\frac{8}{3}\gt a\gt b\gt\frac{7}{3}$$ $$\frac{6}{2}\gt a\gt b\gt\frac{5...
https://math.stackexchange.com
181,694
[ "https://mathoverflow.net/questions/181694", "https://mathoverflow.net", "https://mathoverflow.net/users/38889/" ]
What is known about finite groups $G$ for which there exists a Galois extension $K$ of $\mathbb{Q}$ ramified only at $2$ such that $\text{Gal}(K/\mathbb{Q}) \cong G$ ? More generally, which groups can be realized over $\mathbb{Q}$ with no ramification outside a given (finite) set of primes? I am thus interested in res...
Let me first note that there is a slight ambiguity when one says "ramified only at 2". Strictly speaking, that means that the extension is unramified at every place of $\mathbb Q$ except 2, including infinity. The latter mean that the extension is totally real. Often, however, "ramified only at 2" means "ramified only ...
Concerning the question of Pablo that follows Joël's answer: If $k$ is an algebraically closed field, then the situation is completely understood, thanks to work of Grothendieck (in characteristic 0) completed by the proof of Abhyankar's conjecture by Raynaud and Harbater. Precisely, let $C/k$ be a smooth affine cur...
https://mathoverflow.net
5,690
[ "https://chemistry.stackexchange.com/questions/5690", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/2018/" ]
In nucleophilic aromatic substitution reactions, why do fluorides react faster than bromides? Ordinarily bromide is a better leaving group than fluoride, e.g. in <span class="math-container">$\mathrm{S_N2}$</span> reactions, so why isn't this the case here? The only thing I can think of is that fluorine is more electr...
The key point to understanding why fluorides are so reactive in the nucleophilic aromatic substitution (I will call it S<sub>N</sub>Ar in the following) is knowing the rate determining step of the reaction mechanism. The mechanism is as shown in the following picture (Nu = Nucleophile, X = leaving group): <img src="ht...
Fluorine is the most electronegative element, and the fluoride anion is also much smaller and less polarizable than any of the other halogen anions, making its activity much more dependent on solvent effects. In protic solvents, fluoride tends to be very strongly solvated as a hydrogen bond acceptor and is thereby stab...
https://chemistry.stackexchange.com
350,636
[ "https://physics.stackexchange.com/questions/350636", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/30522/" ]
Is there somewhere on the internet I can find cosmological redshift data. In particular, I would like to know the redshift around the time when the acceleration of the Universe began to accelerate.
One of the main places where data about galaxies gets aggregated is the <A HREF="https://ned.ipac.caltech.edu/" rel="nofollow noreferrer">NASA Extragalactic Database</A> (NED). For example, <A HREF="https://ned.ipac.caltech.edu/cgi-bin/objsearch?objname=M101&amp;extend=no&amp;hconst=73&amp;omegam=0.27&amp;omegav=0.73&a...
Redshift of the time when the universe started to accelerate: From Friedmann's equations: $$\dot{a}=aH=H_0\sqrt{\Omega_{m0}/a+a^2\Omega_{\Lambda 0}}$$ required is: $\ddot{a}&gt;0$. Calculation gets you $$a=\left(\frac{\Omega_{m0}}{2\Omega_{\Lambda 0}}\right)^{1/3} \approx 0.6$$ $\rightarrow z=1/a-1 = 0.67$
https://physics.stackexchange.com
1,351,142
[ "https://math.stackexchange.com/questions/1351142", "https://math.stackexchange.com", "https://math.stackexchange.com/users/247415/" ]
Find a,b,c $\in \mathbb{R}$ for which the function is a) continuous, b) differentiable. $$f(x)=\left\{\begin{array}{cc} ax^2+bx+c &amp; x&lt;0 \\ 2\sin x+cos x &amp; x\:\ge 0 \end{array}\right.$$ From what I know a function is continuous when the following occurs: $$\lim_{x\to 0^+\:}f(x) = \lim_{x\to 0^-\:}f(x) = f(...
You can use the rational root theorem to guess some roots. <blockquote> <strong>Rational root theorem.</strong> All rational roots have the form <span class="math-container">$\frac{p}{q}$</span>,with <span class="math-container">$p$</span> a divisior of the constant term and <span class="math-container">$q$</span> a di...
You could work by locating the roots approximately by computing at some easy values and noting sign changes - Sturm's Theorem is a heavy duty resource, and Descartes Rule of Signs can be indicative. There are more basic observations too, which can help to narrow the search amongst rational roots - using changes in the ...
https://math.stackexchange.com
404,543
[ "https://softwareengineering.stackexchange.com/questions/404543", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/356397/" ]
I have a code that is something like this in a class <pre><code>string method x (){ foreach(a in alist){ //do something } return string; } integer method y (){ foreach(a in alist){ //do something } return integer; } double method z (){ foreach(a in alist){ //do something } return doubl...
<h2>It's not inherently a code smell</h2> There is nothing wrong with having a <code>foreach</code> in multiple methods, <em>unless</em> you always run these three methods consecutively, at which point you can simplify it to: <pre><code>public void xyz() { foreach(a in alist) { x(a); y(a); ...
It's not a code smell. In fact Martin Fowler over at <code>[refactoring.com][1]</code> argues you should repeat a loop if it adds value because of the trivial computing cost of repeating said loop. You should make alist a function argument and make the function static (if possible in the real world)
https://softwareengineering.stackexchange.com
39,257
[ "https://biology.stackexchange.com/questions/39257", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/19159/" ]
I am learning about frameshift mutations. Frameshifts can occur due to a nucleotide deletion. Suppose that due to a frameshift, because of a deletion somewhere upstream from the original start codon, two additional start codons are generated, just before the stop codon in the new reading frame. What would happen in ter...
There is a basic misconception in the question you have asked, which @biogirl has explained. <strong>There is only one start Codon in any mRNA</strong> and it defines the <strong>open reading frame.</strong> All other AUGs in the open reading frame are simply codons that encode for the Amino Acid Methionine and have ...
AUG functions as a start codon only when it is at the 1st position of the open reading frame. Whenever AUG is present in between, it codes for methionine amino acid. Go through the basics of translation from a good book.
https://biology.stackexchange.com
431,317
[ "https://electronics.stackexchange.com/questions/431317", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/217779/" ]
I'm trying to understand the circuitry of TV signal splitters and associated boosters/amplifiers, and I have two questions. My situation is as follows. I have a TV aerial (antenna) in my loft. It connects to a non-powered box, which I assume must be a passive splitter. From there cables run to sockets in a total of ...
You've made some wrong assumptions about what the parts of the system are. The part you're describing as a non-powered passive splitter is actually a powered active splitter. Splitting one aerial signal into six with a passive splitter is unlikely to give you sufficient signal on any of the six outputs, especially if t...
It is desirable to have the amplifier be as close to the aerial as possible and certainly prior to the signal being split, however getting mains power to said locations is often problematic. The solution to this is amplifiers that are powered via one of the output coax lines. The amplifier is sited close to the aerial...
https://electronics.stackexchange.com
26,154
[ "https://ai.stackexchange.com/questions/26154", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/44278/" ]
I'm trying to implement Deep Q-Learning for a pet problem having a continuous state space and discretized action space. The algorithm for table-based Q-Learning updates a single entry of the Q table - i.e. a single <span class="math-container">$Q(s, a)$</span>. However, a neural network outputs an entire row of the tab...
As you say, the output of a <span class="math-container">$Q$</span> network is typically a value for all actions of the given state. Let us call this output <span class="math-container">$\mathbf{x} \in \mathbb{R}^{|\mathcal{A}|}$</span>. To train your network using the squared bellman error you need first calculate the...
There are a couple ways you can define the architecture of a DQN. The most common way of doing it is by taking in the states and outputting the value function of all possible actions - this leads to a DQN with multiple outputs. The other, less efficient way, includes taking in an state-action as input and outputting a ...
https://ai.stackexchange.com
511,960
[ "https://electronics.stackexchange.com/questions/511960", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/258342/" ]
In general, if we are working on a sequential circuit, say a Flip Flop (e.g. D Flip Flop) The code we write for the always block part is: <pre><code> always @(posedge clk or posedge reset) begin if (reset) begin // Asynchronous reset when reset goes high q &lt;= 1'b0; end else begin // Assig...
You have a valid point. If we were being very careful we would want to know if the <code>clock</code> or <code>reset</code> was actually in the <code>X</code> state, and we would probably set <code>Q</code> to <code>X</code> if that was the case. So why don't we do those checks? The <code>clock</code> and <code>reset</...
It's implied that if the block triggered, and reset is <strong>not</strong> high, that clock rising edge must have triggered the always block (because the always block triggered either because posedge reset <strong>or</strong> posedge clk). Basically if reset is high, you want to behave like a reset no matter what in t...
https://electronics.stackexchange.com
159,180
[ "https://dba.stackexchange.com/questions/159180", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/88366/" ]
I need to find out all the users who registered for my Postgresql 9.3 backed website in the <em>24 hour window 2 days ago</em>. Currently, I'm doing that via running the following queries, and then manually subtracting the difference: <pre><code>select count (*) from auth_user where date_joined &gt; now() - interval'2...
By default only root has full access to everything on the database. However, it is very easy to set it so that every user has access to the data in the database. The following is for a new user specifically: This is usually the more accepted way of granting privileges.<br> 1. On the root account I create a new databa...
Mysql by default creates a single or multiple <code>root</code> user accounts (this depends on the mysql version) that are indeed superusers and have full access to all databases that you create on that mysql server. However, these accounts are initialised as superusers and you can remove their access rights based on y...
https://dba.stackexchange.com
2,164,994
[ "https://math.stackexchange.com/questions/2164994", "https://math.stackexchange.com", "https://math.stackexchange.com/users/406632/" ]
Is the ratio test for convergence applicable to the below series: $$\sum_{n=1}^\infty \frac{n^3+1}{\sqrt[3]{n^{10} + n}}$$ I already know that the series diverge. I want to confirm if the ratio test is applicable or not?
Let's compute the ratio $${a_{n+1}\over a_n}={(n+1)^3+1\over n^3+1}\cdot {\sqrt[3]{(n+1)^{10}+n+1}\over \sqrt[3]{n^{10}+n}}\sim{n^{1\over 3}\over(n+1)^{1\over3}}\to 1$$ We cannot conclude with the ratio test
If the limit of the ratio $$\lim_{n \to \infty} \frac{a_{n+1}}{a_n} = 1$$ Then the Ratio Test is <strong>Inconclusive</strong>. The test does not tell you anything about the series. The series may diverge or converge conditionally or absolutely. <strong>As such, it would not be correct to say that the series <em>fails...
https://math.stackexchange.com
16,681
[ "https://mathoverflow.net/questions/16681", "https://mathoverflow.net", "https://mathoverflow.net/users/4302/" ]
Is 'small enough' ellipse projected on a surface of a sphere convex? By ellipse I mean a set of points 'C' with a constant sum |AC| + |BC|, A and B are the centers. By 'small enough' I mean that the radii fits into 90 degrees (I think it is not convex once you make it large enough, though the limit is probably more lik...
Yes it is. After central projection on the plane (Klein model for sphere) you obtain usual ellipse. Also you can show it using triangle inequality. All proofs from euclidean plane works. For example this one: Suppose $F_1$ and $F_2$ foci of the ellipse. Take any two points $A$ and $B$ inside and reflect $F_2$ with res...
Note that cone over any convex figure (in particular ellipse) is convex. And intersection of convex cone with a sphere centered as the vertex of cone is spherically convex.
https://mathoverflow.net
290,164
[ "https://physics.stackexchange.com/questions/290164", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/131596/" ]
So imagine a tennis ball (or other object) attached to a string and spun in perfectly horizontal circular motion at a constant velocity. The two forces acting on the ball would be the force of tension (pulling the ball towards the center aka centripetal force) and the force of gravity (pulling the ball downwards aka we...
<img src="https://i.stack.imgur.com/WOnyP.jpg" alt="enter image description here"> I will not be writing down everything, you should be able to write equation for FBD. now the tension in string is T and weight of ball is balanced by Tcos∅ so 1. if we also consider the string, the motion is conical 2. here, th...
You have to consider the two axes separately: lets call $x$ the horizontal plane, and $y$ the up and down (direction in which gravity acts). In the "free-body diagram" of the ball, there are also <strong>three</strong> forces to consider: 1) gravity, 2) centripetal, and <strong>3) the tension in the string</strong>. ...
https://physics.stackexchange.com
381,343
[ "https://softwareengineering.stackexchange.com/questions/381343", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/105003/" ]
<strong>Disclaimer:</strong> There are some similar questions, but I didn't find any which touch specifically the problems you face while reviewing a large pull request. <h2>Problem</h2> I feel my code reviews could be done in a better way. I'm particularly talking about big code reviews with many changes across 20+ ...
We had these problems and asking the question below has been working well for us: Does the PR do <em>one thing</em> that can be merged and can be independently tested? We try to break PRs by single responsibility (SR). After initial push back folks were surprised to find that even something <em>small albeit single</...
Sometimes you can't avoid large pull requests - but you can be discerning as to who has what responsibility. I treat pull requests as persuasive arguments. The Author is trying to convince me that the code should look and work this way. As with any argument it should have a single clear idea. Its either: <ul> <li>a ...
https://softwareengineering.stackexchange.com
314,694
[ "https://softwareengineering.stackexchange.com/questions/314694", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/59953/" ]
Our agile sprint lasts three weeks. Say 40*3 = 120 hours. Our boss requires us must to log at least 8 hours every day. We use JIRA to record time. However my current story in the sprint estimated time is about 15 hours, of course it is not enough. Because I have to search online, discuss with team members and watch tra...
Your company isn't following standard agile practices. The developers should be the one estimating, in whatever units you use (hours or Story Points or something else). If you are doing the work, you should be involved in estimating it. In fact, everyone who is required to complete the Story needs to be involved in est...
While I agree with Thomas Owens answer, I think this needs a more strongly worded answer. The process you describe is completely missing some of the most important parts of agile management and these are the parts that managers should care the most about. (full disclosure: I'm a manager.) In order to improve predicti...
https://softwareengineering.stackexchange.com
4,788
[ "https://cardano.stackexchange.com/questions/4788", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/1045/" ]
I'm missing transaction prefix in order to get bech32 hash of transaction id using cardano-serialization-lib. What prefix is used in transaction bech32 hash and how can I find/compute one? <pre><code>const decodeUtxo = (wasm: WasmT) =&gt; (encodedUtxo: string): WasmNamespace.TransactionUnspentOutput =&gt; wasm....
In order to get transaction id using cardano-serialization-lib you should convert transaction id to bytes and convert them to hex string. <pre><code>Buffer.from(utxo.input().transaction_id().to_bytes()).toString('hex') </code></pre>
Try this one: utxo.input().transaction_id()
https://cardano.stackexchange.com
425,356
[ "https://softwareengineering.stackexchange.com/questions/425356", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/129731/" ]
I have recently inherited a codebase which has a weird problem and I am trying to search for an extensible solution that can solve my issue. Consider I have a model class that is used as a model to populate data in the UI which looks something like this. <pre><code>public class Person { public string FirstName { ge...
<blockquote> How to model classes that can be <strong>extendable</strong>? </blockquote> In the field of software development, extensibility specifically refers to inheritance, and inheritance is not the correct approach here. <blockquote> The above class object is used to do the required job. But this model class serv...
One alternative is to add <em>behavior</em> to objects. You said the object &quot;serves another purpose&quot; in addition to be used to communicate json messages. So add both &quot;purposes&quot; (i.e. behavior) explicitly into the object instead of trying to &quot;annotate your way out&quot; the problem. Add <code>to...
https://softwareengineering.stackexchange.com
136,070
[ "https://softwareengineering.stackexchange.com/questions/136070", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/47939/" ]
Let's say you have some automated processes that generally go through the following states; scheduled - initiated - validating - executing - completed On top of that these processes can prematurely end because of an error or explicit user cancellation. My first impulse is to simply add <em>error</em> and <em>cancell...
The state you assign to your processes should reflect what your program (or the users, if you are just visualizing states) are going to do with this information. So do you have the requirement to evaluate / show the state of your processes as long as they are running and showing no error? Then separate <em>result</em> ...
<blockquote> but I was wondering about the (conceptual) advantages of separating result from status (even though it seems to me that one might argue that error and cancelled are also simply different states than the completed state). </blockquote> There is a great advantage in detailing progress and identifying fail...
https://softwareengineering.stackexchange.com
8,957
[ "https://mathoverflow.net/questions/8957", "https://mathoverflow.net", "https://mathoverflow.net/users/2510/" ]
Several times I've heard the claim that any Lie group $G$ has trivial second fundamental group $\pi_2(G)$, but I have never actually come across a proof of this fact. Is there a nice argument, perhaps like a more clever version of the proof that $\pi_1(G)$ must be abelian?
I don't know of anything as bare hands as the proof that <span class="math-container">$\pi_1(G)$</span> must be abelian, but here's a sketch proof I know (which can be found in Milnor's Morse Theory book. Plus, as an added bonus, one learns that <span class="math-container">$\pi_3(G)$</span> has no torsion!): First, (...
The elementary proof that $\pi_1$ is abelian applies more generally to H-spaces (spaces $X$ with a continuous multiplication map $X \times X \to X$ having a 2-sided identity element) without any assumption of finite dimensionality, but infinite-dimensional H-spaces can have nontrivial $\pi_2$, for example $CP^\infty$ (...
https://mathoverflow.net
25,181
[ "https://electronics.stackexchange.com/questions/25181", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7575/" ]
I am curious if there are practical differences between a DC power supply based on a half wave rectifier or a full wave rectifier. I mean I have a few small DC power supply units which should give 12V 0.1A each. They all have a transformer 240V->18V, then 1 diode or 4 diodes, then 78L12 (0.1A regulator) and one or two...
Either can work correctly if designed properly. If you have a dumb rectifier supply feeding a 7805, then all the rectifier part needs to do is guarantee the minimum input voltage to the 7805 is met. The problem is that such a power supply only charges up the input cap at the line cycle peaks, then the 7805 will drain...
Simplified explanation: An ideal half-wave rectifier only "uses" half of the AC waveform (hence the name half-wave). <img src="https://i.stack.imgur.com/3Vz4F.png" alt="half-wave rectifier from Wikipedia"> An ideal full-wave bridge rectifier will use the entire AC waveform. <img src="https://i.stack.imgur.com/pfUM2...
https://electronics.stackexchange.com
29,258
[ "https://mechanics.stackexchange.com/questions/29258", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/16286/" ]
I know this depends on a lot of factors but I heard a revolution can happen in 0.02 second is this the case? I can't even stop my stop watch that fast?
This is a math-only question, and no one has explained the formulas. Also I like the idea of this simple question having multiple answers so... RPM is Revolutions Per Minute, but we want a time in seconds. When you hear that word "per" it means division. So, what we have is <em>4000 revolutions / 1 minute</em> (whe...
In a car rpm are very often shown. From experience you might know that for a normal car it varies between 1000 and 3000 rpm for normal use cases. 3000 rpm = 50 rotations per second = 1 rotation per 0.02 seconds.
https://mechanics.stackexchange.com
525,432
[ "https://electronics.stackexchange.com/questions/525432", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/264774/" ]
I'm planning on doing some modifications to my Dunlop GCB95 Cry Baby wah pedal. As far as I can tell, the hookup wire in the pedal is 22AWG (it's difficult to read what's printed on the side). The smallest gauge of hookup wire my local hardware store had was 18AWG, and I decided to buy lengths of 3ft. in a few differen...
Very few circuits are designed in such a way as to require a <em>minimum</em> resistance or inductance of the interconnecting wire. Audio folks sometimes do some odd things, but probably not that. So while we can't technically know without examining the specific usage, electrically this will probably be fine. The mor...
Thicker wire - higher ampacity rating and lower resistance. Electrically it is ok to use 18AWG instead of 22AWG.
https://electronics.stackexchange.com
225,945
[ "https://electronics.stackexchange.com/questions/225945", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/105487/" ]
I live in an apartment and do not have access to the circuit breaker panel. In the summer I run two AC units, and have inadvertently tripped the breaker before while running my vacuum cleaner. This caused a big hassle, as I had to wait for the super to get home so he could go down and flip the breaker back. I'd like to...
There are a few ways. Let's assume you've already mapped circuit 1 and exclude that from these tests. <hr> This method will work if there's a long wiring run back to the service panel (breaker box). Remove every big load from every circuit in the house. Nothing in the house but wall-warts, vampire loads, and cloc...
You can use a sensitive magnetic field sensor to pick up the field around the heavily loaded wires to accomplish what you intended to do. As it is suggested in the other answer, unload all loads from all outlets. Pick one of the outlet and load it as heavy as possible with the heaviest load you have, perhaps with a 2...
https://electronics.stackexchange.com
263,416
[ "https://security.stackexchange.com/questions/263416", "https://security.stackexchange.com", "https://security.stackexchange.com/users/276794/" ]
When i use only a passphrase in luks for my whole system partition encryption, so i need to insert a password to decrypt my system partition to boot up my os, is this unsecure and can it be cracked with bruteforce if someone stole the laptop? What is the best way to do this, with a keyfile and store the keyfile to an u...
<blockquote> running <code>npm i ...</code> not long after <code>pass my-password</code> allows a malicious package to steal my entire password store </blockquote> Yes, but not just that. Running <code>npm i ...</code> <strong>at any time before</strong> <code>pass my-password</code> allows a malicious package to steal...
That’s only a partial solution to your problem, but I do use a hardware token for my GPG key. Whenever the hardware token is unplugged, no malicious code can use my GPG key. Moreover, the hardware token I am using is a Yubikey that can me configured so that it requests to be physically touched before any decryption/sig...
https://security.stackexchange.com
123,139
[ "https://electronics.stackexchange.com/questions/123139", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/50268/" ]
why only there are only 3 companies allowed to make processor "intel - AMD -apple" why others can't make one .. i know that making processor is difficult and needs a huge techno , but what about google or samsung aren't they have the qualified techno ? so why they use others' processors
Firstly, there are plenty of other Processor manufacturers, ARM noted above are probably bigger than the ones you named by processors shipped, but others, such as VIA who also make processors for the same X86 and X86-64 instruction sets used in Intel and AMD 32 and 64-bit processors. Processor companies require archit...
Any company that feels that they can be competitive in the market (or even those that feel the need to lose money by the bushel) is free to make a processor.
https://electronics.stackexchange.com
559,232
[ "https://physics.stackexchange.com/questions/559232", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
What is the difference between <span class="math-container">$T^{\mu}{}_{\nu}$</span> and <span class="math-container">$T_{\nu}{}^{\mu}$</span> where <span class="math-container">$T$</span> is a tensor?
In some sense, it is basically a transpose. To be more specific, to get from the first to the second, you can raise the <span class="math-container">$\nu$</span> index using the inverse metric tensor <span class="math-container">$$T^{\nu\mu}=g^{\nu\alpha}T^{\ \ \mu}_{\alpha}$$</span> Then transpose <span class="math-co...
If <span class="math-container">$T$</span> is defined as a <span class="math-container">$(1,1)$</span> tensor, the order of the indices is unimportant as they &quot;live&quot; in different spaces. Meaning that one transforms as vectors do and the other as covectors do. However, sometimes <span class="math-container">$T...
https://physics.stackexchange.com
743,154
[ "https://math.stackexchange.com/questions/743154", "https://math.stackexchange.com", "https://math.stackexchange.com/users/141068/" ]
Suppose you have 2 fair decks, let's call them deck A and deck B. Now take two cards from deck A and add them to the deck B, and shuffle; thus you now have a deck with 54 cards. Now draw 2 cards from deck B, what's the probability that you draw an ace? EDIT: Let's say you draw exactly 1 ace. This is kind of an arbitr...
So suppose I have three disjoint sets of vertices: $\{v_{1}\} \cup \{v_{2}\} \cup V(C_{3})$. Here, $\{v_{1} \} \cup \{v_{2}\}$ is a forest which does not span, while $\{v_{1}\} \cup \{v_{2}\} \cup (C_{3} - e)$ is a spanning forest, for $e \in E(C_{3})$.
A forest is subset of undirected graph and is a collection of trees across its connected components. A spanning forest is subset of undirected graph and is a collection of spanning trees across its connected components. To clarify, lets use a simple example. Say we have an undirected graph A that has two acyclic comp...
https://math.stackexchange.com
29,149
[ "https://mathoverflow.net/questions/29149", "https://mathoverflow.net", "https://mathoverflow.net/users/3969/" ]
Given a regular tessellation, i.e. either a platonic solid (a tessellation of the sphere), the tessellation of the euclidean plane by squares or by regular hexagons, or a regular tessellation of the hyperbolic plane. One can consider its isometry group $G$. It acts on the set of all faces $F$. I want to define a symme...
The answer is yes. Moreover, for every two different faces $A$ and $B$ there is a symmetric coloring assigning different colors to $A$ and $B$. The isometry group $G$ is residually finite, hence here is a normal finite index subgroup $H$ of $G$ that contains no elements (except the identity) sending $A$ to itself or t...
As the tesselation is regular, its symmetry group G acts transitively; let H be a subgroup strictly containing the stabilizer of a face. Then the orbit of the stabilized face under H, and its translates by other elements of the group, form a symmetric coloring---if H is of finite index and does not act transitively, i...
https://mathoverflow.net
266,114
[ "https://dba.stackexchange.com/questions/266114", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/207841/" ]
I have bunch of ids <code>someIds</code> (20 - 100 thousands) and table with more than 12 millions rows like that: <pre><code>spaceShips( id BIGINT, shipType TEXT, shipName TEXT, hasArtificialIntelligence boolean ) </code></pre> And I need for all rows where <code>shipType='warship'</code> (about 2 m...
Just an FYI, in your sample data you don't have any KUL destination airports. Here is the query that will give you the results you are looking for. Please substitute the WHERE predicate clause with the origin and destination airport of your choice: (I have created a dataset name flowlogistic and a table named flight...
<pre><code>SELECT airline , avg(minutes) as avg_time FROM 'sample_data.flights' WHERE origin = 'FRA' and destination = 'KUL' GROUP BY airline </code></pre>
https://dba.stackexchange.com
4,575
[ "https://mechanics.stackexchange.com/questions/4575", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2343/" ]
Recently, I was informed that a car I share ('02 Nissan Sentra) was close to overheating. I was told it gets close to the upper limit very quickly upon running the car. When I inspected the vehicle, I realized that the coolant overflow was empty and the radiator's coolant level was rather low (not sure exactly how low ...
First thing I'd try to figure out is how quickly it leaks - run it, stick your head underneath it as check if there is any visible leaking. If there is, chances are that it's not going to make it for 30 miles. I'd also check for any evidence of oil and water mixing. If there is, don't drive it. If it's not leaking tha...
I agree with Timo - if it is a big enough leak that you can see it clearly, then getting the car transported is much safer. In general, using water as coolant is OK for a short time or as a "get you home" alternative, but it does not have the anti-freeze and corrosion inhibiting properties of a proper coolant mix, so...
https://mechanics.stackexchange.com
120,777
[ "https://mathoverflow.net/questions/120777", "https://mathoverflow.net", "https://mathoverflow.net/users/12858/" ]
Suppose that $Q$ is a quaternion division algebra with center $k$, where $k$ is an arbitrary commutative field (let's say with $\operatorname{char}(k) \neq 2$ if necessary). Assume that $D$ is an arbitrary skew field (which a priori has nothing to do with $Q$ nor with the base field $k$), and assume that there is an in...
First note that if $A$ is the $2\times 2$ matrix algebra over a field, and $z\in A$ has trace zero, then by the Cayley Hamilton Theorem, $z^2=-det (z)$ is a scalar. Hence, if $x,y \in A$ then $(xy-yx)^2$ is a scalar matrix. Secondly, if $A$ is the $n\times n$ matrix algebra over a field, with $n\geq 3$, then it is eas...
Yes, it is. This follows from the theory of central simple algebras. Here's another proof, possibly similar to Aakumadula's: let $D'=D\otimes \bar{k}\cong GL_2(\bar{k})$. If $D'$ has basis $1,a$ then it's commutative; otherwise, it has basis $1,a,b$. I claim that $a,b$ have a common eigenvalue in $\bar{k}^2$. Indeed, s...
https://mathoverflow.net
3,664,951
[ "https://math.stackexchange.com/questions/3664951", "https://math.stackexchange.com", "https://math.stackexchange.com/users/707142/" ]
The statement <span class="math-container">$$\lim_{x\to -\infty}(2+3x^2)=\infty$$</span> certainly means that the limit doesn't exist at <span class="math-container">$-\infty$</span>. To prove this by the definition of limit requires the use of its negation <span class="math-container">$$(\vert x-p\vert &lt; \delta) ...
All the indices have to be different (because it's alternating), and if two multiindices are permutations of each other then the corresponding vectors are the same up to a sign. Demanding that the indices are increasing is a way to force them all to be different while simultaneously picking a single element out of all...
There is, however, an instance to have into account where the order of basic 2-form break the ascending indexing one. The example is one of the Stokes' theorem, from the old vector calculus. This, relates a 1-form <span class="math-container">$Pdx+Qdy+Rdz$</span> and a 2-form <span class="math-container">$$Ady\wedge...
https://math.stackexchange.com
3,297,196
[ "https://math.stackexchange.com/questions/3297196", "https://math.stackexchange.com", "https://math.stackexchange.com/users/636281/" ]
My professor often says that <strong>every metric space is a topological space</strong>. But reading the definitions of both terms, it does not make sense to me to state it. That every metric space induces a topological space, I agree. But both are not the same thing. One space has a metric, and the other has a topolog...
I agree that the terminology your professor uses might be technically imprecise. Part of the issue here is that in common mathematical parlance, we might use "topological space" to refer to the pair <span class="math-container">$(X,\tau)$</span> -- the set of objects and the collection of sets defining the topology -- ...
Formally speaking you are quite correct. A metric space <span class="math-container">$(X,d)$</span> is a very different structure than a topological space <span class="math-container">$(X,\mathcal{T})$</span>. But the metric <em>induces</em> in a standard way a topology <span class="math-container">$\mathcal{T}_d$</spa...
https://math.stackexchange.com
673,172
[ "https://physics.stackexchange.com/questions/673172", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/317102/" ]
Two positions of two particles can be modelled by the vector equations; <span class="math-container">$$ r_1(t)=\begin{pmatrix} t-1\\t^2-1\end{pmatrix} $$</span> <span class="math-container">$$ r_2(t)=\begin{pmatrix} e^{-t}-1\\ e^{-2t}-1\end{pmatrix}$$</span> Find the coordinates of the point where the particles collid...
You got <span class="math-container">$0=0$</span> when you wrote 2 separate eq-s, and they appeared to be identical, right? But that only means that collision <em>happens</em>, i. e. when <span class="math-container">$x_1 = x_2$</span> =&gt; <span class="math-container">$y_1 = y_2$</span>. You still need to find these...
The first thing I think when I see this problem is &quot;coordinate transformation&quot;. In particular, the translation: <span class="math-container">$$\begin{pmatrix} x'\\y'\end{pmatrix} =\begin{pmatrix} x\\y\end{pmatrix}+\begin{pmatrix} 1\\1\end{pmatrix}$$</span> Then: <span class="math-container">$$ r'_1(t)=\begin...
https://physics.stackexchange.com
6,789
[ "https://scicomp.stackexchange.com/questions/6789", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/4052/" ]
I apologize if this is a naive question. I'm trying to create some boostrap data for a system of linear, ordinary differential equations at steady state. Since the equations represent the concentration of chemical species, X has to be positive. Further, I'm trying to find the sparsest possible matrix of A, for the s...
Without loss of generality we may treat the case $X$ is all-ones vector $u$, since forming $AD^{-1}X$ is equivalent to $Au$ where $D = \text{diag}(X)$ is the diagonal matrix with entries from $X$, and $A$ has the same sparsity as $AD^{-1}$. Mention is made of "keeping the dependency graph of the equations as small as ...
You talk about l1-heuristics, but in the code it looks more like you are interested in solving the underlying combinatorial problem involving the nnz of A. In a l1-heuristics, you would typically use norm(A(:),1) or something like that. The fact you only get zeros is natural as the problem is homogenous in A when b is ...
https://scicomp.stackexchange.com
588,299
[ "https://physics.stackexchange.com/questions/588299", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/234261/" ]
As far as I have understood, the case is that there is nothing that argues that time or space is continuous, but at the same time we must assume this in order to be able to calculate derivatives or integrals with respect to these, how can we justify this?
Let's say space is really a lattice with spacing <span class="math-container">$\Delta x$</span>. It turns out that this idea has more trouble with experiment than you might think, but we can plow ahead for the purposes of this question. You might propose replacing integrals in physics with discrete sums over individual...
This is a comment, as Andrew's answer is adequate for the problem. I want to point out , which is not clear in your question, the difference between mathematical modeling and the object modeled. When modeling an object mathematically one can use continuous variables by the function of mathematics. If the object modeled...
https://physics.stackexchange.com
520,293
[ "https://physics.stackexchange.com/questions/520293", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/235379/" ]
Suppose I have a wave function <span class="math-container">$\psi $</span> we express it in a continous states as <span class="math-container">$$\psi= \int_{-\infty}^{\infty} dxC (x)\rvert x\rangle = \int_{-\infty}^{\infty} dx\rvert x\rangle \langle x \rvert \psi (x)$$</span> This can be expanded in Riemann sum as ...
There is no paradox. If you have the continuous relation as <span class="math-container">$$| \psi \rangle = \int_{-\infty}^\infty dx \ \psi(x) |x \rangle = \lim_{\Delta x \rightarrow 0} \sum_i \Delta x \psi(x_i) |x_i \rangle,$$</span> to draw an analogy with the discrete basis expansion <span class="math-container">$\...
There is no paradox. You're comparing two different formulas: one is an approximation that applies to a continuous basis of states <span class="math-container">$|x\rangle$</span>, the other is an exact formula that applies to a discrete Hilbert space. Just because two formulas look different doesn't mean one of them is...
https://physics.stackexchange.com
1,728,175
[ "https://math.stackexchange.com/questions/1728175", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
<strong>Question:</strong> Show that the problems $ax'' + bx' + cx = f(t); x(0) = 0, x'(0) = v_0$ and $ax'' + bx' + cx = f(t) + av_0 \delta(t); x(0) = x'(0) = 0$ have the same solution for $t \gt 0$. Thus the effect of the term $av_0 \delta(t)$ is to supply the initial condition $x'(0) = v_0$. The first thing I notice...
To say that a number $u$ is "within $x \%$ of $y$" means that $|u - y|/|y| \leq x/100$ (assuming $y \neq 0$). Equivalently, $u \in [ y - \frac{x}{100}|y|, y + \frac{x}{100}|y|]$.
Percentage difference and percentage change sound the same to me - maybe there's something I'm just missing. To compute the upper and lower bounds, you figure out what $x%$ of $y$ is using a proportion, and then add and subtract that number from $y$. In your example, $10%$ of $100$ is $10$, so as observed in the comme...
https://math.stackexchange.com
1,645,661
[ "https://math.stackexchange.com/questions/1645661", "https://math.stackexchange.com", "https://math.stackexchange.com/users/276025/" ]
I am looking for a combinatorial proof for it. I know how to prove it mathematically. Expanding $(1+x)^n$ and replacing $x$ with $1$ will give me the result but I am not able to explain it combinatorially. Note: This is not a homework question. I am just curious.
As usual $[n]=\{1,\ldots,n\}$. $\sum_{k=1}^{n-1}\binom{n}k$ is clearly the number of non-empty, proper subsets of $[n]$, since $\binom{n}k$ is the number of subsets of size $k$. Now let $A_k$ be the number of subsets of $[n]$ with maximum element $k$; clearly $|A_k|=2^{k-1}$, since the rest of $A_k$ can be any subset o...
Consider the set of $n$ bits integers. One one side, group them by the number of ones. The sizes of the groups are $\dbinom nm$. $$0000\|0001\ 0010\ 0100\ 1000\|0011\ 0101\ 1001\ 1100\ 1010\ 1100\|1110\ 1101\ 1011\ 0111\|1111$$ On the other side, group them by prefix made of $n-m-1$ zeroes followed by a single one (...
https://math.stackexchange.com
2,174
[ "https://bioinformatics.stackexchange.com/questions/2174", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/156/" ]
I have a fastq file from minION (albacore) that contains information on the read ID and the start time of the read. I want to extract these two bits of information into a single csv file. I've been trying to figure out a grep/awk/sed solution, but without success. E.g. <pre><code>@93a12f52-95e5-40c7-8c3e-70bf94ed0...
<pre><code>awk '{if(NR%4==1) print $1, $5}' file.fastq | sed -e "s/ start_time=/, /" -e "s/^@//" </code></pre> The <code>awk</code> command gets the first of every 4 lines, printing the first and fifth "word". <code>sed</code> is then used to strip the initial <code>@</code> and replace <code>start_time=</code> with <...
Since the string <code>start_time</code> will only appear on the header line, or else you don't have a valid fastq file, you can simply do: <pre><code>$ perl -ne '/^@(\S+).*start_time=(.*)/ &amp;&amp; print "$1, $2\n"' file.fastq 93a12f52-95e5-40c7-8c3e-70bf94ed0720,2017-07-04T06:42:43Z ff37e422-a25f-404c-8314-ef1733...
https://bioinformatics.stackexchange.com
43,770
[ "https://mechanics.stackexchange.com/questions/43770", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/24111/" ]
My S60 has a developing problem where considerable quantities of soot are emitted from the exhaust. Upon first startup, cold engine, the smoke is nearly entirely absent. When the engine reaches some particular temperature (normally at consistently the same point on my journey home/into work) the message area shows "Eng...
This one turned out to be a relatively common problem on D5s; the intercooler had split and boost pressure was being lost. Quite why the first shop didn't pick this up I've no idea, but having replaced the intercooler there's now a pronounced difference in extra power delivery and reduced emissions of soot
Does it have EGR - exhaust gas recirculation? If so, this could be part or all of the problem. Sounds similar to other cars with egr faults.
https://mechanics.stackexchange.com
196,048
[ "https://softwareengineering.stackexchange.com/questions/196048", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/89141/" ]
<strong>Relevant Background Details</strong> <ol> <li>We've got two types of VMs (Utility Boxes &amp; Web Servers) that developers need. </li> <li>We are going to be using git for version control.</li> <li>We have developers who have different preferences for their working environment (e.g. Some Linux, Some Windows).<...
Your plan sounds great! I think you are off to a really good start. My only advice is in regard to you Developer Workflow. I think you're <code>dev</code> branch may become problematic, because developers will be merging code willy-nilly then <em>they</em> think its ready. If both branchA and branchB, C, and D are m...
The general outline sounds good. The only thing I would change is that the base boxes themselves should be self-updating. Presumably your provisioning scripts also live in git so you could automatically update the boxes by a properly configured <code>/etc/rc.local</code> script. The base box should just have the bare m...
https://softwareengineering.stackexchange.com
2,029
[ "https://engineering.stackexchange.com/questions/2029", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/858/" ]
I have an 80 g·cm motor with a rotational frequency of 15,000 rpm. I want to lift a weight of 2 kg at a speed of 0.5 m/s. How do I calculate the gear ratio required?
<blockquote> I have a 80gcm motor with a rpm of 15000.<br> I want to lift a weight of 2 kg at a speed of 0.5 m/s.<br> How do I go about calculating the gear ratio required for this? </blockquote> <strong>Firstly - is it possible?</strong> In particular, is there enough input power available for the desired outp...
If I understand correctly the problem is like this <img src="https://i.stack.imgur.com/PjnkN.png" alt="enter image description here"> The velocity of the load is $R\omega=0.5=R\underbrace{\frac{\pi}{30}\frac{15000}{n}}_\omega$ Solving for $n$ we get $$n=1000 \pi R$$
https://engineering.stackexchange.com
194,655
[ "https://softwareengineering.stackexchange.com/questions/194655", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81031/" ]
I am confused when I read this (regarding singleton design pattern): <blockquote> How do we ensure that a class has only one instance and that the instance is easily accessible? A global variable makes an object accessible, but it doesn't keep you from instantiating multiple objects. </blockquote> So what is ...
Without the full text this is not sure, but my (somehow educated) guess: They only warn that a global variable is not the right way to ensure that you have a singleton. The following text should then show how to do this inside the class that should be a singleton.
In the quote they don't talk about how to do it, but how <strong>not</strong> to do it. Some approach for getting a <em>singleton</em> is to make the <em>constructor private</em> and write a own static method, that creates a new element on the first call, saves it in a static variable and always returns this object wh...
https://softwareengineering.stackexchange.com
732,885
[ "https://physics.stackexchange.com/questions/732885", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/348701/" ]
I'm currently learning Newton's Laws, and I came across this question: <blockquote> &quot;A man lightly walks across a roof so that he does not break it. However, his friend tosses him a tool, causing him to jump in the air, and break through the roof. Why does the roof hold his weight when he walks, but not when he ju...
Ordinarily, when the man is standing or walking on the roof, his weight is acting downwards and is cancelled by a corresponding upward force from the roof, equal in magnitude with his weight. If the man jumps in the air, his legs have to impart a force greater that his weight in order to accelerate his body, so the r...
You have already correctly identified the forces. The unbalanced force is simply the normal force being <em>larger</em> than before. The normal force must now, apart from holding back against his weight, also create the upwards acceleration. Thus it grows. If the surface is not strong enough to exert this new larger no...
https://physics.stackexchange.com
198,964
[ "https://dba.stackexchange.com/questions/198964", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/145699/" ]
I am using SQL server and I can't seem to construct the query I want. I have a table with several columns, among them are PARAMETER_NAME, GW_LOCATION_ID, Report_Result, DETECT_FLAG I want a query to return <ol> <li>a row for each unique Parameter-Location combination </li> <li>the maximum value of the <strong>R...
This is a <code>greatest-n-per-group</code> problem and there are many ways to solve it (<code>CROSS APPLY</code>, window functions, subquery with <code>GROUP BY</code>, etc). Here's a method using window functions and a CTE: <pre><code>WITH ct AS ( SELECT *, rn = RANK() OVER (PARTITION BY PARAMETER_NAME,...
I think the following query is more intuitive to understand: <pre><code>create table SLVs_Flagged (PARAMETER_NAME varchar(30), GW_LOCATION_ID varchar(30), Report_Result int, DETECT_FLAG char(1) ) go insert into dbo.SLVs_Flagged values ('abc', 'cor1', 128, 'N'), ('abc', 'cor1', 12, 'Y') , ('def', 'cor1', 500, 'Y'), ('...
https://dba.stackexchange.com
39,800
[ "https://electronics.stackexchange.com/questions/39800", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/12134/" ]
Let say I have a lamp which is operated on 220 V ac. Instead of applying 220 AC voltage I apply 220 DC voltage: what will happen? And if I want to convert this 220V dc to 220V ac then what should I do?
An incandescent bulb will do fine. The 220 V AC is the RMS value, for Root Mean Square. The sine's amplitude will be \$\sqrt{2}\$ higher than that, or 310 V. But the RMS value tells you what equivalent DC voltage you would need to get the same power, so that's exactly what you need. The bulb will use the same power and...
YES your incandescent lamp will run on DC in fact Thomas Edison who had a design contract to improve the reliability of the lightbulb and hence commercialise it did all his experiments on DC Thomas Edison wanted all power to be DC but lost to Nicholas Tesla NOW a word of warning DC arcs much worse than AC so unless...
https://electronics.stackexchange.com
14,480
[ "https://cs.stackexchange.com/questions/14480", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/10249/" ]
I'm willing to take a course in formal languages and automata theory , where we will explore side by side a functional programming language to implement the different algorithms we will encounter ,despite i am new to the language , i am assuming i've learned what's nessecary to move to the theoretical part , so i'm won...
I have looked into this question before and came up very short. From it, I believe that it may be the case that a cipher with this property is simply the Vernam Cipher (OTP) in disguise. It is still an interesting question as to how the use of additional resources or changes in protocol can potentially implement an equ...
Any perfect cipher that you will ever encounter will be a one time pad or a variant of it.
https://cs.stackexchange.com
4,395
[ "https://chemistry.stackexchange.com/questions/4395", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/1160/" ]
I'm doing exercises on hybridisation, and I was given this molecule: <img src="https://i.stack.imgur.com/2sGV9.png" alt="enter image description here"> I'm wondering about this (electron deficient) oxygen atom. My intuition says it should be ${sp^2}$ like the answer says, but honestly I only see that it's $sp$ hybrid...
This would become much clearer if you show the lone pair on the oxygen atom. One $p$ orbital of the Oxygen atom forms the $\pi$ bond with Carbon, while the other three (remaining one $s$ and two $p$) orbitals are $sp^2$ hybridized. Two $sp^2$ orbitals are used to form the $\sigma$ bonds while the last $sp^2$ orbita...
You can find the hybridization of the atom by finding its steric number: steric number = no of atoms bonded (to the atom you are finding the hyb. of) + lone pairs with that atom. if Steric no comes to be 4, there is $\ce{sp^3}$ hybridization in the atom. if steric no comes to be 3, there is $\ce{sp^2}$ hybridization...
https://chemistry.stackexchange.com
169,061
[ "https://security.stackexchange.com/questions/169061", "https://security.stackexchange.com", "https://security.stackexchange.com/users/158585/" ]
I am in the process of developing an iOS app where a customer can earn rewards (money) to spend back at the business. When the customer wants to spend the money they have earned, the cashier will use the <strong>employee app</strong> to scan the customer's QR code on the <strong>customer app</strong>. To clarify, yes, ...
I think you are protecting against your threat the wrong way, and I think you're also missing out on protecting against some additional threats. <strong>Hashing vs encryption</strong> First and most important: the end user's password should never be encrypted. It should only ever be hashed. Encryption is reversible...
Conor's solution is pretty great, but have draw backs. For example, the question that @user3451821 asked in the comment section: What should I do if the customer don't have access to the Internet. Conor's solution can't solve this. Another concern is, the server is required to do too much stuff. From generating one-tim...
https://security.stackexchange.com
533,472
[ "https://electronics.stackexchange.com/questions/533472", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/116972/" ]
Sorry if my question is very basic, but I couldn't find the answer by searching the internet. I want to buy a JTAG programmer, but in the datasheet of this programmer there is a list of &quot;supported MCUs&quot;. Does this mean that this programmer cannot program other MCUs which support JTAG? As an example, ST Link V...
JTAG is the interface, the voltages, the max clock speeds, that make up the physical connection. To interface to a particular device, the programmer needs to know its specific commands, its registers, that is the device API (Application Programmer Interface). A JTAG was originally designed as a test standard, it only s...
In theory, yes. In practice, the JTAG extensions to support debugging are device-specific, and even in some cases need local hardware acceleration (like ARM fast trace.) MIPS platforms have long used a standard extension called E-JTAG. Some others followed that basic E-JTAG definition as a starting point for their prop...
https://electronics.stackexchange.com
536,699
[ "https://physics.stackexchange.com/questions/536699", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/136556/" ]
Given a metric <span class="math-container">$g_{\mu\nu}$</span>, is there a general recipe to define the null coordinates for the system? For the Schwarzschild metric, I think we can find it by the following method. <span class="math-container">$$ds^2 = -f(r)dt^2 + \frac{1}{f(r)}dr^2$$</span> For a null coordinate <...
I don't know if it is the best way to look for such coordinate (probably not), but for general metric <span class="math-container">$$ds^2=g_{tt}dt^2+2g_{tr}dtdr+g_{rr}dr^2$$</span> on given timelike subspace you can look for coordinate transformations <span class="math-container">$t\rightarrow t'(t,r), r\rightarrow r'(...
Null coordinates are, as the name imply, coordinates along which some null curves flow. A simple way to do this is to use the flow-box theorem. Take two vector fields, <span class="math-container">$X$</span> and <span class="math-container">$Y$</span>. <span class="math-container">$X$</span> and <span class="math-cont...
https://physics.stackexchange.com
555,301
[ "https://physics.stackexchange.com/questions/555301", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/265764/" ]
I am currently learning about the Dirac formalism in quantum mechanics, but don't quite understand how we derive the expression of the quantum Hamiltonian, given the value of energy in classical mechanics. The specific example that came up in class was that of the harmonic oscillator, for which the classical energy is...
Your teacher is being a bit sloppy in saying that you get the Hamiltonian for quantum mechanics from classical energy. You get the Hamiltonian for quantum mechanics by "quantizing" the classical Hamiltonian. OK, so what is this "quantizing"? As you point out, Dirac came up with a fairly generalized scheme of construc...
Dvij D. C. is correct. In a nutshell, the relationship between classical mechanics and quantum mechanics is that the former gives a lot of insight into the latter, but quantum cannot be derived from classical. Rather, classical mechanics gives hints as to what to try, and it gives insight into what quantum formulae are...
https://physics.stackexchange.com
137,255
[ "https://dba.stackexchange.com/questions/137255", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/80701/" ]
I'm using the following query to find unused indexes: <pre><code>SELECT PSUI.indexrelid::regclass AS IndexName ,PSUI.relid::regclass AS TableName FROM pg_stat_user_indexes AS PSUI JOIN pg_index AS PI ON PSUI.IndexRelid = PI.IndexRelid WHERE PSUI.idx_scan = 0 AND PI.indisunique IS FALSE; </code></pre> Should I ...
Seems like a decent approach. Of course, one should apply some human verification to this before automatically dropping everything that seems unused. For example, it's conceivable that the statistics were recently reset and/or an index is only used for some occasional batch tasks.
FWIW here's a query I've been using <pre class="lang-sql prettyprint-override"><code>SELECT relname AS table, indexrelname AS index, pg_size_pretty(pg_relation_size(i.indexrelid)) AS index_size, idx_scan as index_scans FROM pg_stat_user_indexes ui JOIN pg_index i ON ui.indexrelid = i.indexrelid WHERE NOT indis...
https://dba.stackexchange.com
419,695
[ "https://softwareengineering.stackexchange.com/questions/419695", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/272403/" ]
I recently refactored a program for code feasibility and maintainability; however, I am totally unaware of what software principle I did implement. I just followed my feeling. The purpose for this post is that I want to know what software principle I did implement so that I'm capable of referencing books or websites. B...
Candied Orange is correct in that this is an application of <em>Replace Conditional with Polymorphism</em>. But I don't think that quiet explains why your result from this approach is so powerful. It might be hard to see but the dispatch table is a fairly crude DSL (Domain Specific Language) which clearly expresses the...
Believe it or not this is a refactoring called Replace Conditional with Polymorphism. It might be hard to see that because you didn't use classes or objects to get your polymorphism. You used an array of structs. But that's still polymorphism. This refactoring can be driven by a desire to reduce duplication or by a des...
https://softwareengineering.stackexchange.com
372,726
[ "https://physics.stackexchange.com/questions/372726", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143440/" ]
I know there are similar questions, but I have some arguments which seem to explain that temperature of an ideal gas in a gravitational field will be lower at higher altitudes. I am assuming that: 1.Molecules of the gas are point sized. 2.They interact only during a collision. 3.All collisions are elastic. 4.Time o...
The above-mentioned shell theorem explains how to calculate the gravitational field inside and outside the shell. It's not really correct to ask what is the field exactly on the surface of the shell. Because the function $g(r)$ is not continuous at $r = R$. But it is correct to ask what gravitational force is acting ...
Following on the above, if we let M be a constant, it seems we can then integrate GMdm/2R^2 over dm (from 0 to M) to obtain a sum or total of gravitational forces on the surface of the sphere, obtaining GM^2/2R^2.
https://physics.stackexchange.com
2,007,414
[ "https://math.stackexchange.com/questions/2007414", "https://math.stackexchange.com", "https://math.stackexchange.com/users/270702/" ]
<strong>Problem:</strong> Let $V$ be a finite-dimensional vector space over a field $K$ and let $T$ be an endomorphism on V. Show that, for the corresponding structure of a $K[x]$-module, $V$ admits a basis if and only if $V = ${$0$}. <strong><em>Thoughts:</em></strong> This amounts to showing that no generating set o...
If <span class="math-container">$V$</span> is finitely dimensional say of dimension <span class="math-container">$n$</span>, for every <span class="math-container">$v\in V$</span> the set <span class="math-container">$$\{v,Tv,\ldots,T^nv\}$$</span> is linearly dependent over <span class="math-container">$k$</span>. T...
This is a module over $k[x]$, a PID. A module structure on $V$ is determined once we know what $x.v$ is for all $v\in V$. This $x$ action has to be an endomorphism of $V$ as a $k$-vector space; assume $V$ has dimension at least 1 (but finite); fixing a basis of $V$ let us call that endomorphism one given by a matrix...
https://math.stackexchange.com
700,726
[ "https://physics.stackexchange.com/questions/700726", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/323231/" ]
We know that a defining property of the metric tensor is that it is non-degenerate, meaning <span class="math-container">$\forall u,\, g(v,u)=0\implies v=0$</span>. Yet from a textbook I read that <span class="math-container">$g(v,v)=0$</span> does not assure <span class="math-container">$v=0$</span>. Why is this? Can'...
I think this is a question of logic: Suppose <span class="math-container">$$g(v,v)= 0 \Longrightarrow v=0 \tag{1} $$</span> holds. Then we can conclude <span class="math-container">$$\forall u:\quad g(u,v)=0 \Longrightarrow v=0 \quad, \tag{2}$$</span> by choosing <span class="math-container">$u=v$</span>. However, the...
On Lorentzian manifolds there is an obvious counter example to your claim, namely null-vectors. Let <span class="math-container">$$g = \begin{pmatrix}-1 &amp; 0 \\ 0 &amp; 1\end{pmatrix}$$</span> be the Minkowski metric in 2D. Consider <span class="math-container">$$v= \begin{pmatrix}-1 \\ 1 \end{pmatrix}$$</span> We s...
https://physics.stackexchange.com