text stringlengths 1 1.11k | source dict |
|---|---|
the-moon, constellations
Mu Virgo, the southernmore of Virgo's two feet, has an ecliptic latitude of 9.678 degrees, meaning it's quite far north of the ecliptic.
The moon never ventures more than about 5.15 degrees from the ecliptic, so it will never be north of Mu Virgo, or even really that close.
The closest interpretation I can give: in some months, the moon's northernmost ecliptic latitude will occur near Mu Virgo, putting it "close" to Virgo's feet.
If you run http://ssd.jpl.nasa.gov/?horizons with these settings: | {
"domain": "astronomy.stackexchange",
"id": 1926,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "the-moon, constellations",
"url": null
} |
quantum-mechanics, wavefunction, scattering
Footnote: Antenna Problems | {
"domain": "physics.stackexchange",
"id": 23217,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, wavefunction, scattering",
"url": null
} |
soft-question, metrology, technology
Therefore, the GP-B gyroscopes are rounder than the Avogadro Project's sphere ($1.8 \cdot 10^{-7}$ vs. $5.3 \cdot 10^{-7}$) but - considering that the first ones are on a satellite - maybe the Avogadro Project team is not lying by claiming that its silicon sphere is "the roundest [man-made?] object in the world". | {
"domain": "physics.stackexchange",
"id": 13783,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "soft-question, metrology, technology",
"url": null
} |
navigation, gps, robot-localization
<!-- GPS integrated localization -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization_gps" respawn="true" output="screen">
<param name="map_frame" value="map"/>
<param name="odom_frame" value="odom"/>
<param name="base_link_frame" value="base_footprint"/>
<param name="world_frame" value="map"/> | {
"domain": "robotics.stackexchange",
"id": 20021,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, gps, robot-localization",
"url": null
} |
c
else
{
printf("\n\n INCORRECT ANSWER. CODE IS WRONG. \n\n");
}
I would use assert() instead. If this expression evaluates to 0, this causes an assertion failure that terminates the program. Also, assertions are the right mechanism to use, since those positions in the code would only be reachable due to programmer error, not due to unanticipated runtime conditions.
else
{
assert(income > 30000);
adjusted_income = income * .35;
}
Variables
You have a lot of "magic numbers" in your code. | {
"domain": "codereview.stackexchange",
"id": 6214,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c",
"url": null
} |
And a divergent series multiplied by a constant (other than 0), indeed produces divergent series.
Note that by definition
$S_n(k)=\sum_{n=1}^k \frac{1}{n}$ diverges $\iff \forall M>0 \quad \exists \bar k$ such that $S_n(k)>M \quad \forall k>\bar k$
then also
$S_{3n}(k)=\frac13S_n(k)=\sum_{n=1}^k \frac{1}{3n}$ diverges since
$\forall M>0 \quad \exists \bar k$ such that $S_n(k)>3M \quad \forall k>\bar k\implies S_{3n}(k)>M$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759587767815,
"lm_q1q2_score": 0.8504545220795656,
"lm_q2_score": 0.8670357494949105,
"openwebmath_perplexity": 138.2025104789288,
"openwebmath_score": 0.9843190312385559,
"tags": null,
"url": "https://math.stackexchange.com/questions/2618387/how-to-prove-rigorously-that-the-series-1-3n-diverges"
} |
stoichiometry
I get that you can find out how much of the metal reacts with 1 mole of fluorine atoms in the 40.43 % one. This can be calculated to be 27.99 g.
Then from that you can work out that 28.49 g of fluorine reacts with the metal in the 50.44 % one and that that is about 1.5 moles of $\ce{F}$.
I'm a bit lost after that. How might you continue from here?
So the law of multiple proportions conveys that the fluorides contain fluorine in a 1.5:1 or 3:2 ratio. This means the possibilities are
$\ce{MF2}$ and $\ce{MF3}$, or
$\ce{MF4}$ and $\ce{MF6}$
Since there is twice as much fluorine, the mass of $\ce{M}$ in $\ce{MF2}$ must be 56 g. The next one is 112 g. If there are no errors in what was said, the metal must be iron or cadmium. What makes one a better candidate over the other? You need to use the general concepts of the law of definite proportions and the law of multiple proportions to solve this:
Sample 1 is 59.57% $\ce{M}$ and 40.43% $\ce{F}$.
Sample 2 is 49.56% $\ce{M}$ and 50.44% $\ce{F}$. | {
"domain": "chemistry.stackexchange",
"id": 7079,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "stoichiometry",
"url": null
} |
computer-architecture, cpu-cache
therefore, 4 miss and 29 hit.
Case 2 : loop: 15-32,80-95
15 falls in Block 0 - Miss on 15 (Block 0 is bought to cache)
16 falls in Block 1 - Miss on 16 (Block 1 is bought to cache)
32 falls in Block 2 - Miss on 32 (Block 2 is bought to cache,, replacing Block 2)
80 falls in Block 5 - Miss on 80 (Block 5 is bought to cache, replacing Block 5)
therefore, 4 miss and 29 hit.
Answer:
a.
Case 1: hit ratio = (6+29)/(8+18+15) * 100 = 85.3%
Case 2: hit ratio = (6+11)/(8+18+15) * 100 = 41.1%
b.
Case 1: hit ratio = (6+29)/(8+18+15) * 100 = 85.3%
Case 2: hit ratio = (6+29)/(8+18+15) * 100 = 85.3% | {
"domain": "cs.stackexchange",
"id": 6831,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-architecture, cpu-cache",
"url": null
} |
Despite using the grid spacing of $$\Delta x/2$$, the cell-centered values of $$\psi$$ cancel, and we only need its value at the standard stencil points $$[x_{i-1}, x_i, x_{i+1}]$$. In this form, $$r$$ is evaluated at cell-centered values. If it is not convenient to get cell-centered values, they can be approximated in a number of ways (see this, for example).
Here is a $$5\times 5$$ example of the finite difference operation
$$\frac{1}{\Delta x^2} \begin{bmatrix} -r_{9/2} - r_{1/2} & r_{1/2} & 0 & 0 & r_{9/2} \\ r_{1/2} & -r_{1/2}-r_{3/2} & r_{3/2} & 0 & 0 \\ 0 & r_{3/2} & -r_{3/2}-r_{5/2} & r_{5/2} & 0 \\ 0 & 0 & r_{5/2} & -r_{5/2}-r_{7/2} & -r_{9/2} \\ r_{9/2} & 0 & 0 & r_{7/2} & r_{7/2}-r_{9/2} \end{bmatrix} \begin{bmatrix} \psi_0 \\ \psi_1 \\ \psi_2 \\ \psi_3 \\ \psi_4 \end{bmatrix}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936073551712,
"lm_q1q2_score": 0.811347711254913,
"lm_q2_score": 0.8244619263765707,
"openwebmath_perplexity": 494.23952605752584,
"openwebmath_score": 0.9512563943862915,
"tags": null,
"url": "https://scicomp.stackexchange.com/questions/41306/constructing-a-symmetric-matrix-for-finite-difference"
} |
haskell
import Data.IORef
facM :: (Num a, Ord a) => a -> IO a
facM n = do
accRef <- newIORef 1
nRef <- newIORef n
let go = do
n <- readIORef nRef
if n > 1 then do
modifyIORef accRef (* n)
writeIORef nRef (n - 1)
go
else readIORef accRef
go | {
"domain": "codereview.stackexchange",
"id": 44429,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "haskell",
"url": null
} |
# Finding the limit of a converging sequence?
Find the limit of $a_n$ from, $n=1$ to $\infty$, in the following cases, and justify your answers using the definition of convergence. (Note the definition of convergence I'm using: a sequence an converges to a real limit if given any $\epsilon > 0$, there exists an $N$ belonging to the natural numbers such that: $n \ge N \Rightarrow |a_n - a| < \epsilon$).
i)$$a_n = \frac{2}{n} + \frac{3}{n^2}$$
This is a homework but I have solutions but am unable to understand all the steps. Solution: Guess limit $a = 0$. Fix $\epsilon > 0$. Find a simpler sequence which has bigger terms than $a_n$ and converges to zero. $$an = \frac{2}{n} + \frac{3}{n^2} < \frac{2}{n} + \frac{3}{n} = \frac{5}{n}$$
So take $N > \frac{5}{\epsilon}$, $n \ge N$ (from definition of convergence) $$\Rightarrow n > \frac{5}{\epsilon} \Rightarrow \frac{5}{\epsilon} < \epsilon \Rightarrow n > a_n$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137874059599,
"lm_q1q2_score": 0.8161939405181919,
"lm_q2_score": 0.8311430562234878,
"openwebmath_perplexity": 186.45187668425976,
"openwebmath_score": 0.984360933303833,
"tags": null,
"url": "https://math.stackexchange.com/questions/629096/finding-the-limit-of-a-converging-sequence"
} |
dobsonian-telescope, collimation
to see which way the primary mirror is defected, you do this by
stopping at the point where the reflected image of the secondary
mirror is closest to the primary mirrors' edge (Fig.m). When you get
to that point, stop and keep your hand there while looking at the
back end of your telescope, is there a adjusting screw there? If
there is you will want to loosen it (turn the screw to the left) to
bring the mirror away from that point. If there isn't a adjusting
screw there, then go across to the other side and tighten the
adjusting screw on the other side. This will gradually bring the
mirror into line until it looks like Fig.n. (It helps to have a
friend to help for primary mirror collimation. Have your partner
adjust the adjusting screws according to your directions while you
look in the focuser.) After dark go out and point your telescope at
Polaris, the North Star. With an eyepiece in the focuser, take the | {
"domain": "astronomy.stackexchange",
"id": 30,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dobsonian-telescope, collimation",
"url": null
} |
c++, multithreading, c++17
multithread::multithread():
data(std::make_unique<implementation>(concurrency::full))
{}
execution multithread::join()
{
return data->close<implementation::close::join>();
}
execution multithread::detach()
{
return data->close<implementation::close::detach>();
}
multithread::~multithread()
{
join();
}
execution multithread::enqueue(const function&& item)
{
auto result = execution::success;
if (data->open==true)
{
std::scoped_lock(data->door);
data->line.emplace_back(std::forward<const function>(item));
data->guard.notify_all();
}
else
result = execution::failure;
return result;
} | {
"domain": "codereview.stackexchange",
"id": 31762,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, multithreading, c++17",
"url": null
} |
electromagnetism, electric-current, charge, conservation-laws, maxwell-equations
Value of $\alpha$ follows from:
$$
\int_S{d^2}r\: \mathbf{\hat{n}}.\mathbf{J}=I\Delta\left(s\in S\right)\cos\theta_\mathcal{\dot{R}}=\alpha\mathcal{\dot{R}}^2\,\Delta\left(s\in S\right)
$$
Where the integral above is over the surface area $S$ of the dot-product of the current density with the surface normal $\mathcal{\hat{n}}$. Quantity $\Delta\left(s\in S\right)=1$ is the wire only goes through the surface area $S$ once. $\cos\theta_{\mathcal{\dot{R}}}$ is the cosine of the angle between the wire and the surface normal. $I$ is the current in the wire. Equation above only makes sense if wire goes through $S$ once or not at all.
From this you can then extract the charge density by taking divergence. I think, you will find that once you take divergence the derivative (of the divergence) and the integral ($\int ds'$) will cancel out, and you will get zero charge density for closed-loop wires | {
"domain": "physics.stackexchange",
"id": 83777,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, electric-current, charge, conservation-laws, maxwell-equations",
"url": null
} |
c, programming-challenge
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
long long int base,exponent;
scanf("%lld%lld",&base,&exponent);
if(exponent==0)
{
printf("1\n");
}
else
{
int i;
int dig[5];
dig[0]=1;
for(i=1;i<=4;i++)
{
dig[i]=(base*dig[i-1])%10;
}
if(exponent%4==0)
printf("%d\n",dig[4]);
else if(exponent%4==1)
printf("%d\n",dig[1]);
else if(exponent%4==2)
printf("%d\n",dig[2]);
else if(exponent%4==3)
printf("%d\n",dig[3]);
}
}
return 0;
} if(exponent%4==0)
printf("%d\n",dig[4]);
else if(exponent%4==1)
printf("%d\n",dig[1]);
else if(exponent%4==2)
printf("%d\n",dig[2]);
else if(exponent%4==3)
printf("%d\n",dig[3]); | {
"domain": "codereview.stackexchange",
"id": 13156,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c, programming-challenge",
"url": null
} |
visible-light, scattering
Title: Light in the absence of colloids? If Earth had no colloids (Don't take LIFE into account) or any kind of scattering medium (like atmosphere) that promote to Tyndall effect, how would we able to receive the sun's rays? In the other way, How would the sun rays or light from any interstellar object reach or appear to us? (just like a distant star?)
Is there anything that I missed here? (Please comment) We know how it would appear without any scattering medium, the experiment has been done:
The large distance to the sun creates almost parallel rays of light and without scattering everything that is not directly hit by sunlight will be pitch black, such as the shadow of this astronaut. Only the little bit of surface reflections from the dust are lighting up the front side of him. | {
"domain": "physics.stackexchange",
"id": 4580,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "visible-light, scattering",
"url": null
} |
natural-language-processing
You're looking to implement a Q/A prediction system. This involves searching for an answer to a given question within a context file and then performing a classification task to compare the retrieved answer with a student’s response. Fortunately, there is a machine learning architecture ideally suited for this, known as BERT. In a nutshell, BERT consists of stacked encoders from the Transformer architecture, and during pre-training, it has two main objectives: Token Masking and Next Sentence Prediction. The latter is particularly relevant for your task. | {
"domain": "ai.stackexchange",
"id": 3967,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "natural-language-processing",
"url": null
} |
quantum-chemistry, molecular-orbital-theory
At the end of the line of atoms, an electron faces a steep potential energy curve. Not quite the vertical wall of the 1D box, but pretty close to it. The same is true on the sides, so the system can be treated as 1D. Within the system, the electron moves essentially freely (or exists in a broadly delocalized way) with very little change in potential across the system.
Since the potential functions are nearly identical, the solutions to the Schrodinger equation take the same mathematical form. | {
"domain": "chemistry.stackexchange",
"id": 12466,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-chemistry, molecular-orbital-theory",
"url": null
} |
kinematics, velocity, terminology, calculus, speed
So keep reducing the time interval. In this case if we check the displacement b/w 0.9999 and 1 sec and divide it by 0.0001 we will see that the value tends to some value. As the time interval is decreased further we come closer to that value. That value is the instantaneous velocity and this exactly is how derivatives work. $\frac{dy}{dx}$ means checking the change in y w.r.t the change x, where change in x approaches 0. In this case as we keep reducing the time interval our answer becomes increasingly accurate.
It's a broad concept and I've tried to explain it in the best possible manner.
Here's a video based on the same:
https://youtu.be/9vKqVkMQHKk?si=YLroVkar5GNVQKmt
Channel: 3blue1brown | {
"domain": "physics.stackexchange",
"id": 99091,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "kinematics, velocity, terminology, calculus, speed",
"url": null
} |
energy, temperature, collision
But what if the two objects are of different sizes as shown in the image(fig-02) below? If we consider that the smaller one is in motion and it collides with the larger one, will the force applied on the surface of larger one be uniform? Or will it be for some moment non uniform such that a small part of gets slighlty dispaced in the direction of force and causes internal particles in that portion to dissipate energy due to collision with the surrounding particles? If the later case occurs, will it change the temperature ot total thermal energy of the larger body?
I am refering to such a condition as if the collision is taking place in space where ther is no air resistance, no friction.... That is no means of energy loss.
If two solid bodies(one at rest) of equal size collides in an ideal
condition(no friction or dissipation of energy) such that two surfaces
of two bodies which collide are exactly of same shape, then that
collision should be elastic. | {
"domain": "physics.stackexchange",
"id": 78169,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy, temperature, collision",
"url": null
} |
c++, c++11, formatting, template-meta-programming, variadic
// sample:
std::string s = format("hello ", "world ", 42, "\t", 3.141592);
It is uses std::to_string() for the native types. If I want to print custom types, then I can define a local to_string() and the overload resolution should find it.
My concerns are: | {
"domain": "codereview.stackexchange",
"id": 9487,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++11, formatting, template-meta-programming, variadic",
"url": null
} |
quantum-mechanics, operators, time-evolution, biophysics, quantum-tunneling
Title: Electronic tunneling between two states I am reading Steering Electrons on Moving Pathways (Beratan et al. 2009) which is about electron tunneling in biomolecules, and specifically the processes via which an electron can move from an initial state $|D\rangle$ (on the donor side) to a final state $|A\rangle$ (on the acceptor side). In my research, I just came across the following equation:
The time-dependent transition amplitude from an initial complex (momentum-carrying) state $D$ to a real final state $A$ in a system with Hamiltonian $H$ is given by$$\langle A|e^{-iHt/\hbar}|D\rangle=\sum_m\langle A|\Psi_m\rangle\langle\Psi_m|D\rangle e^{-iE_mt/\hbar}.$$ | {
"domain": "physics.stackexchange",
"id": 92321,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, operators, time-evolution, biophysics, quantum-tunneling",
"url": null
} |
quantum-mechanics, particle-physics, interactions, matter, bohmian-mechanics
So when a regular quantum person talks about momentum transfer, they could be talking about an initial momentum situation where all the kinetic energy is (in dBB theory) in quantum potential energy. So you can stick to energy transfer and note that there can be quantum potential (depending on the wavefunction and the position) energy and classical potential (depending just on position) energy. And then you can see that both are really functions of time, the wavefunction and the position in configuration space. | {
"domain": "physics.stackexchange",
"id": 82366,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, particle-physics, interactions, matter, bohmian-mechanics",
"url": null
} |
mathematical-physics, differential-geometry, vectors
$$
m = \Pi\circ F \\
\mathrm{T}\pi\circ F = \mathrm{id}_{\mathrm{T}M}
$$
The latter equation is the equivalent of the semi-spray condition and tells us that we're dealing with a second-order field.
Because the bundles $\mathrm{T}\mathrm{T}^*M$ and $\mathrm{T}^*\mathrm{T}M$ are naturally isomorphic - in coordinates, we just switch the components $(x,p;v,f)\mapsto(x,v;f,p)$ - we can represent it as a differential form on $\mathrm{T}M$, which is just the differential $\mathrm dL$ of the Lagrange function (the Euler-Lagrange equation are Newtonian equations of motion).
Now, the space of Newtonian force fields doesn't come with a natural vector space structure, but rather an affine structure. You need to specify a zero force - a force of inertia - to make it into one. Such a force can for example be given by the geodesic spray of general relativity. | {
"domain": "physics.stackexchange",
"id": 6559,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematical-physics, differential-geometry, vectors",
"url": null
} |
homework-and-exercises, electromagnetism
You do not need these for the problem you pose. There is cylindrical symmetry around the z-axis (into the page). The integral version of Faraday's law tells you that
$$ \oint \vec{E} \cdot d\vec{l} = - \int \frac{\partial \vec{B}}{\partial t} \cdot d\vec{S}$$
In this case you specify the rate of change of magnetic field. You define a closed circular loop centred on the z-axis. You can argue that the E-field must circulate around the region, parallel with this loop. A symmetric radial field is ruled out since no field lines can end or originate without any free charge and a time-dependent z-component of the E-field is ruled out since that would have an associated B-field that circulated in the plane of your diagram$^1$. You then have a simple left hand side.
The solution has a different form for the E-field inside and outside the circular area you have drawn.
$^1$ NB: This argument also relies on the projected arrangement you have drawn extending infinitely along the z-axis. | {
"domain": "physics.stackexchange",
"id": 25800,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism",
"url": null
} |
roslaunch, ros-indigo
SUMMARY
========
PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.21
NODES
/
sender_freq (leap_motion/sender.py)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[sender_freq-1]: started with pid [12011]
[sender_freq-1] process has died [pid 12011, exit code -11, cmd /home/juantelo/catkin_ws/src/leap_motion/scripts/sender.py _freq:=0.01 __name:=sender_freq __log:=/home/juantelo/.ros/log/73513fa2-be34-11e7-86a9-1c394718bbbd/sender_freq-1.log].
log file: /home/juantelo/.ros/log/73513fa2-be34-11e7-86a9-1c394718bbbd/sender_freq-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
and it closes.
Anyone knows how I Can solve this? | {
"domain": "robotics.stackexchange",
"id": 29241,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "roslaunch, ros-indigo",
"url": null
} |
special-relativity, inertial-frames, faster-than-light, time-dilation, causality
Title: Causality and speed of light It is accepted that the speed of light is the speed of causality. If we exceed the speed of light, the order of cause and effect breaks down. This happens as we see our surroundings moving backward in time. Right?
However, how do we know they move back in time once we move faster than light? If $v>c$, then in the formula
$$ t'=\frac{t}{(1-v^2/c^2)^{1/2}} $$
we get an answer that is not defined, so how do we know time moves backwards? The issue isn't whether time will move backwards at the speed of light, it's that having stuff sending signals around faster than light causes problems even for us nonrelativistic slower-than-light beings. | {
"domain": "physics.stackexchange",
"id": 43075,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, inertial-frames, faster-than-light, time-dilation, causality",
"url": null
} |
c#, xml, macros
public abstract class AggregateConditionBase : ICondition
{
protected readonly IReadOnlyCollection<ICondition> _conditions;
protected AggregateConditionBase(params ICondition[] conditions)
{
_conditions = conditions ?? Array.Empty<ICondition>();
}
public abstract bool IsTrue(object context);
}
public class Or : AggregateConditionBase
{
public override bool IsTrue(object context) => _conditions.Any(c => c.IsTrue(context));
}
public class And : AggregateConditionBase
{
public override bool IsTrue(object context) => _conditions.All(c => c.IsTrue(context));
} | {
"domain": "codereview.stackexchange",
"id": 41144,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, xml, macros",
"url": null
} |
java, beginner
termsLeft = (sum / plannedUnits);
tuitionCost = (termsLeft * TUITION_RATE);
System.out.println("After this term there are " + unitsLeft + " credit units remaining.");
System.out.println("You will complete your degree in " + termsLeft + " terms.");
System.out.print("It will cost you " + tuitionCost + " to complete your degree.");
}
}
New code block
/* Determines the length of time and cost of a degree program
* based on user inputs.
*/
import java.util.ArrayList;
import java.util.Scanner;
public class GraduationPlanner {
public static void main(String[] args) {
final double TUITION_RATE = 2890;
ArrayList<Integer> creditUnits = new ArrayList<Integer>();
Scanner unitsPerCourse = new Scanner(System.in);
GetCreditUnits(unitsPerCourse, creditUnits);
System.out.println(creditUnits);
System.out.print("Please enter the number of Credit Units you will complete per term: "); | {
"domain": "codereview.stackexchange",
"id": 4324,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner",
"url": null
} |
python, console, validation, user-interface
Known problems
Tests are not exhaustive (please suggest anything you think of).
Tests are not well commented (working on this right now in a local branch).
SQL injection is possible in some cases by -k/--key CLI parameters, if you can figure out a way to insert a semicolon in an integer. I will remove this in a future version, once I find a way to improve or remove the generate_sql_query() function.
A lot of documentation is tied up in the CLI UI and comments, and is not an explicit document.
npbc_cli.py
from argparse import ArgumentParser
from argparse import Namespace as arg_namespace
from datetime import datetime
from colorama import Fore, Style
from pyperclip import copy as copy_to_clipboard | {
"domain": "codereview.stackexchange",
"id": 43241,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, console, validation, user-interface",
"url": null
} |
programming-challenge, functional-programming, f#
To me it is much cleaner.
IMO the type definition of Instructions do more damage than good resulting in an unnecessary double match in parse and followOne.
I think it's a good idea to extent the keypad and use it for validation of a step.
My solution would be something like below. The concept is to think of the keypad as a coordinate system and then convert the result point of each instruction sequence to a key in the pad:
module Program
open System
let squarePad = [[' '; ' '; ' '; ' '; ' '];
[' '; '1'; '2'; '3'; ' '];
[' '; '4'; '5'; '6'; ' '];
[' '; '7'; '8'; '9'; ' '];
[' '; ' '; ' '; ' '; ' '] ] | {
"domain": "codereview.stackexchange",
"id": 23579,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "programming-challenge, functional-programming, f#",
"url": null
} |
accuracy, confusion-matrix
# visualize
fig, ax = pyplot.subplots(3, 1)
fig.suptitle(title, fontsize=12)
line = np.arange(0, len(thresholds))/len(thresholds)
ax[0].plot(fpr, tpr, label='ROC', color='purple')
ax[0].plot(line, line, '--', label='random', color='black')
ax[0].set_xlabel('fpr')
ax[0].legend(loc='center left', bbox_to_anchor=(1, 0.5))
ax[1].plot(line, recall, label='recall', color='blue')
ax[1].plot(line, precision, label='precision', color='red')
ax[1].plot(line, accuracy, label='accuracy', color='black')
ax[1].set_xlabel('1 - threshold')
ax[1].legend(loc='center left', bbox_to_anchor=(1, 0.5))
ax[2].plot(tpr_sorted, recall_sorted, label='recall', color='blue')
ax[2].plot(tpr_sorted, precision_sorted, label='precision', color='red')
ax[2].plot(tpr_sorted, accuracy_sorted, label='accuracy', color='black')
ax[2].set_xlabel('tpr (1 - fnr)')
ax[2].legend(loc='center left', bbox_to_anchor=(1, 0.5))
fig.tight_layout()
fig.subplots_adjust(top=0.88)
pyplot.show() | {
"domain": "datascience.stackexchange",
"id": 4987,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "accuracy, confusion-matrix",
"url": null
} |
acid-base, equilibrium, aqueous-solution, ions
Title: How to decrease the percent of ammonia that is converted to the ammonium ion in water? Ammonia is a weak base that reacts with water according to this equation:
NH3(aq) + H2O(l) ⇌ NH4+(aq) + OH −(aq)
Will Fe(NO3)3 decrease the percent of ammonia that is converted to the ammonium ion in water? If ammonia gas is bubbled into pure water, the following reaction takes place:
$$\ce{NH3(aq) + H2O(l) <=> NH4+(aq) + OH−(aq)}\tag{1}$$
How to decrease the percent of ammonia that is converted to the ammonium ion in water?
Le Chatelier's Principle indicates that adding $\ce{OH-}$ would push the equilibrium to the left.
I lifted the following figure from:
HYDROPHOBIC MEMBRANE TECHNOLOGY FOR AMMONIA EXTRACTION FROM WASTEWATERS by Airton Kunz and Saqib Mukhtar Eng. Agríc. vol.36 no.2 Jaboticabal Mar./Apr. 2016
https://doi.org/10.1590/1809-4430-Eng.Agric.v36n2p377-386/2016 | {
"domain": "chemistry.stackexchange",
"id": 13616,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acid-base, equilibrium, aqueous-solution, ions",
"url": null
} |
I think I have an answer which doesn't rely on being clever enough to use the even and odd subsequences.
Because the series converges the sequence of partial sums forms a Cauchy sequence so we have for m,n>N
$$\| \sum_m^n(a_i) \| < \epsilon$$
And by a similar argument to those above: $\|(n-m)a_n \| \leq \| \sum_m^n(a_i) \| < \epsilon$ Distributing out the left hand side and spliting the inequality gives us the chain:
$$\| na_n \|-\|ma_n\|\leq \|(n-m)a_n \| \leq \| \sum_m^n(a_i) \| < \epsilon$$
Then in the limit as n goes to infinity and fixing m we have the desired result since $ma_n$ will go to zero.
I think... ? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717480217662,
"lm_q1q2_score": 0.8656938033328928,
"lm_q2_score": 0.8774767826757122,
"openwebmath_perplexity": 244.87053836634604,
"openwebmath_score": 0.9271830320358276,
"tags": null,
"url": "https://math.stackexchange.com/questions/4603/series-converges-implies-limn-a-n-0/1122679"
} |
proteins, enzymes
Catalysis often involves ionization of groups on the enzyme, not merely to bind substrates, but also to participate in the reaction. Typically the reaction mechanism involves flipping from ionized to deionized state or vice versa. Hence, the optimum pH for an enzymic reaction is often at the pKa of the ionizing group (in the environment of the protein), as this is the pH of half ionization.
The reaction mechanism of pepsin, an aspartic protease, involves two aspartate residues, each of which has a low pKa, explaining why pepsin works optimally at low pH. | {
"domain": "biology.stackexchange",
"id": 8737,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "proteins, enzymes",
"url": null
} |
c++, classes
name your templates in PascalCase,
name your members in snake_case.
Bits between 1 and 64
I feel like it is misleading to allow the user to use bit values less than 1 or bigger than 64, and silently put it in that range. I would recommend doing the following instead:
template <std::uint8_t bits>
requires(bits >= 1 && bits <= 64)
struct uintx_t { | {
"domain": "codereview.stackexchange",
"id": 44539,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, classes",
"url": null
} |
java, unit-testing, fizzbuzz, rags-to-riches
Then now the code will follow.
FizzBuzz
/**
* Provides methods to convert numbers to their FizzBuzz-values given a set of rules.
*
* <p>The FizzBuzz-value is a <tt>String</tt> obtained by applying a set of FizzBuzz-rules to a number.
* An example of a FizzBuzz-rule is that a number that is divisible by a 3, must result in Fizz.
*
* <p>If multiple FizzBuzz-values are obtained by applying multiple FizzBuzz-rules, then they will be joined together using an ordering and a delimiter, both the ordering and delimiter are configurable via the provided builder, respectively by providing a <tt>Comparator</tt> and providing a <tt>String</tt>.
* An example of this is that in the classical FizzBuzz, the number 15 produces both <i>Fizz</i> and <i>Buzz</i>, with the default ordering and delimiter this will result in a FizzBuzz-value of <i>FizzBuzz</i>.
*
* <p>This implementation only supports FizzBuzz-rules using divisibility.
*
* @author Frank van Heeswijk | {
"domain": "codereview.stackexchange",
"id": 11293,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, unit-testing, fizzbuzz, rags-to-riches",
"url": null
} |
S, is a relation might have ) for all ∈! Relation properties ∼ is an equivalence class is a relation on a S. Equivalence class is a complete set of triangles, ‘ is similar to ’ denotes relations...: transitive Property ; Definition: equivalence relation on a set and an equivalence relation on a S... = $) is an equivalence relation on S which is reflexive symmetric. It is of course enormously important, but is not a very interesting example, in given. Might have R. 2, the set of equivalences classes may be very large indeed transitive properties and closures... Define three properties which a relation might have are equal interesting example, a! S, is a complete set of equivalences classes may be very large indeed the two important... Transitive Property ; Definition: equivalence relation on a set a ($ = $) is equivalence... Give the equivalence relation properties most important examples of equivalence relations x, x the. Relationship between a partition of a set a no two distinct | {
"domain": "mouans-immobilier.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018383629826,
"lm_q1q2_score": 0.8768248160709537,
"lm_q2_score": 0.8991213732152424,
"openwebmath_perplexity": 465.4254196726806,
"openwebmath_score": 0.8404521942138672,
"tags": null,
"url": "http://blog.mouans-immobilier.com/q1oxifs3/equivalence-relation-properties-023a3f"
} |
molecular-biology, bioinformatics, dna-sequencing
Title: What is the difference between second and third generation sequencing I am writing the section about history of DNA sequencing in the introduction chapter and after reading quite a few research papers, I am still confused about them. Here I compile some questions to make sure that I understand it correctly.
Is second generation sequencing the same as next generation sequencing?
Is Sanger sequencing the first generation?
As of today, is there any commercial 3rd generation sequencing technology in use (or is it still in development)?
If there is any paper reference that could explain all of the above then it would be really great. I'm assuming you mean DNA sequencing (excluding things like RNA-seq).
Is Sanger sequencing the first generation?
From Metzker 2010:
The automated Sanger method is considered as a "first-generation" technology | {
"domain": "biology.stackexchange",
"id": 11795,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, bioinformatics, dna-sequencing",
"url": null
} |
organic-chemistry, synthesis
Make sure you actually have sodium amide $\ce{NaNH2}$ and not sodium in ammonia $\ce{Na/NH3}$. As pointed out in the question comments, they react very differently; the latter generates a trans-alkene.
I’m not sure I would have chosen the same base. But the choice of base is likely arbitrary anyway. n-Butyllithium would definitely also do the trick but might be overkill.
Typically in a lab setting, reactions with strong bases (as is the case here) are carefully quenched with something aquaeous. So you can be sure that there will be an aquaeous proton source ($\ce{H2O}$ or $\ce{H+/H2O}$, depending on your markers’ preferences) in the end. There should be no need to additionally specify conditions. It would make no sense to attempt to isolate the alcoholate anyway. | {
"domain": "chemistry.stackexchange",
"id": 16909,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, synthesis",
"url": null
} |
cards is 1/2 = 0.5 that any of them chose the same point in time use... Goalkeeper today already know the total number of individual combined events probability you calculate. To play around with the likelihood of both events occurring together can be combined various. 1St january 2021 / by johan1 selection of combined event KSSM Form 4 DRAFT some other previous event and. Occur simultaneously and 35 % like Chocolate also like Strawberry you will be a Goalkeeper today we write (! Baye ’ S theorem another quite different example of conditional probability '' B... Can occur simultaneously Instruments, Investopedia uses cookies to provide you with a great user experience answer (. 2/5 chance followed by an 0.3 chance gives 0.12 six-sided die ( D ) and a. That occurs if one or more combined events probabilityhelp ; Home X=A given variable Y only... That a side will come up when throwing a single die sure they add to 1: Here another... What percent of those who like Chocolate, and Common | {
"domain": "ac.id",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.983342958526322,
"lm_q1q2_score": 0.8298383029712106,
"lm_q2_score": 0.8438950986284991,
"openwebmath_perplexity": 726.7866735582381,
"openwebmath_score": 0.6115152835845947,
"tags": null,
"url": "http://pld.fk.ui.ac.id/chocolate-birthday-kdfjo/2ad3df-combined-events-probability"
} |
ros, moveit, kuka
Originally posted by crnewton with karma: 71 on 2021-02-04
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by fvd on 2021-02-04:
Actually it looks like he is using an RGB-D camera, so he could obtain the distance from the depth image or pointcloud.
Comment by Ranjit Kathiriya on 2021-02-05:
I am getting Z(Distance) from the point cloud.
def direction_teat(list_a):
if len(list_a) == 4:
list_a.sort(key=takeSecond,reverse=True)
list_a[0:2][0][4] = "back"
list_a[0:2][1][4] = "back"
list_a[2:][0][4] = "front"
list_a[2:][1][4] = "front"
print(list_a) | {
"domain": "robotics.stackexchange",
"id": 36041,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, moveit, kuka",
"url": null
} |
python, performance, object-oriented, library
Naming looks mostly good, though I'd wager that at some point generic
names with "Base" in it will make it harder to understand than
necessary - unfortunately I don't have a good suggestion as to what
other names would be more helpful.
Any unspecific question about performance should get the answer "take
a profiler and look" IMO. Really, there's more to worry about than
raw numbers, including the fact that this is Python. For starts the
regular json module also isn't the fastest. However correctness
comes first, so
not only is thread safety a concern, access from multiple processes is
a concern even more so. The one pattern that should really be used
here at least is to first create a temporary file with the
to-be-written content, then atomically moving that to the
destination. I'm not sure what's the canonical source for this, but
this blog post
is a nice start. The set_data method is particularly bad in that
respect. | {
"domain": "codereview.stackexchange",
"id": 20795,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, object-oriented, library",
"url": null
} |
ros, navigation, odometry, laser-scan-matcher, laserscan
Originally posted by tom on ROS Answers with karma: 1079 on 2011-12-30
Post score: 4
It looks like the scan matcher isn't measuring velocity directly, but it is computing the delta in the laser position, which you could combine with the time between laser scans to produce a rough estimate of velocity, subject to jitter in your laser frequency and any errors in the scan matching.
Since laser_scan_matcher doesn't publish stamped poses, you'll have to modify laser_scan_matcher directly to compute this output.
LaserScan has a timestamp in the message header that you can use to compute the time between scans.
Originally posted by ahendrix with karma: 47576 on 2011-12-31
This answer was ACCEPTED on the original site
Post score: 5 | {
"domain": "robotics.stackexchange",
"id": 7759,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, odometry, laser-scan-matcher, laserscan",
"url": null
} |
haskell, io, quiz, state
main :: IO ()
main = do
let test = initTestState
lang <- getSourceOrTarget "from"
test' <- execStateT (source.=lang) test
lang' <- getSourceOrTarget "to"
test'' <- execStateT (target.=lang') test'
bracket (openLocalState emptyLearntList)
(closeAcidState)
(\db -> command db test'')
command :: AcidState LearntList -> TestState -> IO ()
command db test = do putStrLn "+===================================================+"
putStrLn "| |"
putStrLn "| what to do next? (type: \"help\" for help screen) |"
putStrLn "| |"
putStrLn "+===================================================+"
cmd <- getLine
control db test cmd | {
"domain": "codereview.stackexchange",
"id": 4488,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "haskell, io, quiz, state",
"url": null
} |
c#, beginner, game, community-challenge, rock-paper-scissors
You use magic strings for the gestures all over the place. This can pose a problem if you want to change them. You could do a find and replace but this could inadvertently change a part of a method or variable name which happens to include "rock" if you are not careful.
In other solutions to the problem posted before enums were used instead. If you insist on using strings then make them named constants and use those instead
const string Rock = "rock";
const string Paper = "paper";
... etc. | {
"domain": "codereview.stackexchange",
"id": 6534,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, game, community-challenge, rock-paper-scissors",
"url": null
} |
$\textbf{Add-on to approach 1:}$ Suppose you did not know about cyclotomic polynomials (like me) and wanted to compute the minimal polynomial of $\zeta_12$ over $\Bbb{Q}$. You already know that it must be of degree 4 by the argument above. Once you find a monic one of degree 4, it must be unique by uniqueness of the minimal polynomial (exercise). Write
$$x = \frac{\sqrt{3} + i}{2}.$$
Then $2x = \sqrt{3} + i$ so that squaring both sides gives that $4x^2 = 3 - 1 + 2\sqrt{i}$ which implies that $4x^2 - 2 = 2\sqrt{3}i$. Hence
$$\begin{eqnarray*} 2x^2 - 1 &=& \sqrt{3}i\\ \implies 4x^4 - 4x^2 + 1 &=& -3 \\ \implies 4x^4 - 4x^2 + 4 &=& 0 \\ \implies x^4 - x^2 +1 &=& 0 \\ \end{eqnarray*}$$
and voilà! This is exactly the cyclotomic polynomial of degree 4 that you found. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357585701875,
"lm_q1q2_score": 0.8221295781104067,
"lm_q2_score": 0.839733963661418,
"openwebmath_perplexity": 101.04256931627556,
"openwebmath_score": 0.961783230304718,
"tags": null,
"url": "http://math.stackexchange.com/questions/140881/minimal-polynomial-of-a-twelth-root-of-unity"
} |
acoustics, integration
Title: Relation between acoustical parameters Definition and Clarity In room acoustics, clarity ($C_{50}$) is defined as
$$ C_{50} = 10*\log_{10}{\frac{\int_0^{50ms}p² (t)dt}{\int_{50}^{\infty}p² (t)dt}} $$
and definition ($D_{50}$) is
$$ D_{50} = \frac{\int_0^{50ms}p² (t)dt}{\int_{0}^{\infty}p² (t)dt} * 100$$
So clarity is defined in deciblels, while definition is just a percentage. A lot of books say the relation between the two is:
$$ C_{50} = 10 * \log_{10}{\frac{D_{50}}{1 - D_{50}}} $$
I tried a lot of different substitutions and using the property that $\int_{0}^{\infty}p² (t)dt$ = $\int_{0}^{50}p² (t)dt + \int_{50}^{\infty}p² (t)dt$, but I can't seem to derive the relation between these two parameters. I'd be glad if someone could help me understand this a bit better. This is simply down to the confused way different sources are treating the $D_{50}$ quantity. | {
"domain": "physics.stackexchange",
"id": 92796,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acoustics, integration",
"url": null
} |
quantum-mechanics, homework-and-exercises, quantum-information, heisenberg-uncertainty-principle
Title: Derivation of minimum uncertainty from Squeezed Coherent State I'm studying a book in which I stopped by this point. I don't know how to derive the inequality from
$$tr(\rho A^{*}A )?$$ Here $\rho$ is the density matrix for a pure state, but it's nonetheless a density matrix (simply one with von Neumann entropy of nought, but that doesn't matter).
Recall that for any Hermitian operator $\hat{M}$, the $n^{th}$ moment of the probability distribution of the measurement made by $\hat{M}$ is $\mathrm{tr}(\rho\,\hat{M}^n)$. See, for example, the Wikipedia Page on the density matrix for further information.
Here $n=1$ and we're simply calculating the mean of the Hermitian operator $A^\dagger\,A$.
But the state is pure, so $\mathrm{tr}(\rho\,\hat{M}^n)$ is the same as $\langle\psi|A^\dagger\,A|\psi\rangle$. | {
"domain": "physics.stackexchange",
"id": 23568,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, homework-and-exercises, quantum-information, heisenberg-uncertainty-principle",
"url": null
} |
condensed-matter, definition, superconductivity, topology, many-body
Could somebody explain what is meant by this? I'm struggling to find a definition of the atomic limit, so I'm not sure what is meant by talking about a wavefunction in relation to the atomic limit. Let me please refer you to the article Topological Quantum Chemistry by Bradlyn, Elcoro, Cano, Vergniory, Wang, Felser, Aroyo and Bernevig where the concept of an atomic limit is defined in detail. (please see also the supplementary material).
The basic definition (modulo some details) is given in the discussion following definition 1 on page 3:
An atomic limit is a band structure admitting a set of exponentially Localized Wannier functions respecting all the symmetries of the crystal and possibly time reversal. When the atomic separation is taken to infinity, these Wannier functions coincide in most cases with localized atomic orbitals. This band structure is characterized by a trivial topology. | {
"domain": "physics.stackexchange",
"id": 56095,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "condensed-matter, definition, superconductivity, topology, many-body",
"url": null
} |
Now suppose $\text{Int}[O^c] \cup O = X$. Since $O^c\cup O = X$ by definition, we must have that $O^c \subseteq \text{Int}[O^c]$, because otherwise the union $\text{Int}[O^c] \cup O$ wouldn't be enough to cover all of $X$. But the interior of a set is always a subset of that set, meaning $\text{Int}[O^c]\subseteq O^c$. Now we have $\text{Int}[O^c] = O^c$. This means $O^c$ is open, and so $O$ is closed. Also, $O$ is open by hypothesis.
• That's correct. Jul 19 '17 at 13:26
• In short: since $\text{int}[O^c]\subseteq O^c$ we have $\text{int}[O^c]\cup O=X=O^c\cup O\iff \text{int}[O^c]=O^c\iff O^c\text{ is open}$. Jul 19 '17 at 13:42
Your proof is correct, but can be drastically shortened. Points of $X$ w.r.t. $E$, $E\subseteq X$, can only be of one of this type, exclusively: interior, boundary, or exterior. $\operatorname{Int}(E^c)$ are the exterior points of $E$. $\operatorname{cl}(E) =\operatorname{Int}(E^c)^c$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9914225158534696,
"lm_q1q2_score": 0.8218286051191438,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 209.0458286496612,
"openwebmath_score": 0.8374365568161011,
"tags": null,
"url": "https://math.stackexchange.com/questions/2363855/which-open-sets-o-satisfy-textintoc-cup-o-x"
} |
general-relativity, spacetime, time-travel
Is it possible for a particle to be susceptible to external forces and still have zero rest mass?
Is it possible that Chandrasekhar and Wright were actually right in suggesting that Gödel's philosophical conclusions are questionable, and that they hit the nail on the head by focusing on the geodesics in the Gödel's universe? I have not really studied Godel's metric, so I will only address questions 2 and 3 in a general metric (without specifically referring to Godel's metric).
Yes, light (in vacuum) will always travel on a null geodesics. Yes, particles remain on geodesics in absence of a net external force. Momentum means different things in the massive and mass-less case, since massive particles move on geodesics with timelike tangent vectors and mass-less move on null tangent vectors. 4-force is equal to the covariant derivative of 4-momentum along the tangent vector to its worldline. I will elaborate: | {
"domain": "physics.stackexchange",
"id": 22758,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, spacetime, time-travel",
"url": null
} |
Cardinal Number Formula. Cardinal numbers specify the size of sets (e.g., a bag of five marbles), whereas ordinal numbers specify the order of a member within an ordered set (e.g., "the third man from the left" or "the twenty-seventh day of January"). Notations used in set theory formulas: – Cardinal number of set A. Formula For Cardinal Number of Set by. Recently I have created a YouTube Channel called Murali Maths Class, check for the latest Maths Videos on All the topics. That is n (A) = 7. The number is also referred as the cardinal number. Do you know, equivalent sets are described or defined by the cardinal number only. Therefore, the cardinal number of set D = 0. Using this one-to-one correspondence, he applied the concept to infinite sets; e.g. Two letters and 5 numbers are common to both sets A and B. Difference between Subsets and Proper Subsets It occurs when number of elements in X is less than that of Y. Question 1019067: Use the formula for the cardinal number of the | {
"domain": "stingray-dive.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.960361162033533,
"lm_q1q2_score": 0.8255876801242554,
"lm_q2_score": 0.8596637523076224,
"openwebmath_perplexity": 491.7956101767436,
"openwebmath_score": 0.8509271144866943,
"tags": null,
"url": "http://stingray-dive.com/5wih4mn/19d0f6-cardinal-number-of-a-set-formula"
} |
astronomy, solar-system, exoplanets
edit 2 (this does not answer the question, so I put it up as an edit for some additional information): Jim's comment to the question (about declination) made me look up if there was a possibility to also give some kind of probability to whether planets are in our line-of-sight, i.e., statistically, how many orbital planes would we look at from the right angle, so that transits could be seen in the first place?
Obviously, the probability to detect planets transiting their host star depends on their vicinity to the star. Closer planets have a higher probability to be found than those more far out. For Earth and Venus the probability to be found transiting from an observation point anywhere (360 degrees) in space would basically be 0.47% and 0.65% respectively. These probabilities of course change with input of more variables. | {
"domain": "physics.stackexchange",
"id": 16656,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astronomy, solar-system, exoplanets",
"url": null
} |
python, amazon-web-services
It works, but I feel the data structures I used are not appropriate and not pythonic.
How could I simplify the data structures and possibly minimize the number of function calls.
import boto3
def get_set_of_versions(table_of_backups):
set_of_versions = set()
for backup in table_of_backups:
set_of_versions.add(backup['gitlab_version'])
return set_of_versions
def create_table_of_backups(list_of_backup_files):
table_of_backups = [
{
"s3_object_name": filename,
"gitlab_version": filename.split('_')[4]
} for filename in list_of_backup_files
]
return table_of_backups
def extract_list_of_backups(list_of_objects):
list_of_backups = [s3_object.key for s3_object in list_of_objects if 'gitlab_backup' in s3_object.key]
return list_of_backups
class GitlabBackups:
def __init__(self, bucket_name):
self.bucket_name = bucket_name | {
"domain": "codereview.stackexchange",
"id": 31275,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, amazon-web-services",
"url": null
} |
gravity, simulations, antimatter, galaxies, models
Have entire galaxies consisting of negative-gravitational-mass antimatter been considered in any sound theory, model or simulation?
§ I.e. while such antimatter gravitationally repulsed conventional matter, it would still attract other antimatter.
% Unless there exists e.g. a (currently unknown) force that attracts antiparticles to their exact counterparts Short answer: that depends on your definition of sound theory. For instance, it is possible to find peer-reviewed papers considering such possibilities.
The idea that antimatter can be gravitationally repulsed from ordinary matter is definitely not the most popular one. Nevertheless, some people do try to apply it in astrophysical context. Let us have a look at the works of M. Villata:
Villata, M. "CPT symmetry and antimatter gravity in general relativity." EPL (Europhysics Letters) 94.2 (2011): 20001. arxiv:1103.4937. | {
"domain": "physics.stackexchange",
"id": 16145,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, simulations, antimatter, galaxies, models",
"url": null
} |
particle-physics, higgs, representation-theory, symmetry-breaking
instance, if $G=$SU(2)$\times$U(1) ($n=4$) then $\text{dim}_{R}(\Phi)\geq 3$ and indeed in the SM $\text{dim}_{R}(\Phi)=4$ (with the spare degree of freedom manifesting itself as the Higgs boson); if $G=$SU(5) ($n=24$) then $\text{dim}_{R}(\Phi)\geq 23$; if $G=$SO(10) ($n=45$) then $\text{dim}_{R}(\Phi)\geq 44$, etc. Observe, however, that this is only a necessary condition. | {
"domain": "physics.stackexchange",
"id": 65275,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, higgs, representation-theory, symmetry-breaking",
"url": null
} |
human-biology, psychology
Yet, there are conditions in which stress can lower cortisol levels. One of them is psoriazis [3]:
[...] patients with persistently high levels of stressors seem to have a specific psychophysiological profile of lowered cortisol levels and may be particularly vulnerable to the influence of stressors on their psoriasis.
And some psychiatric disorders [4]:
Several stress-associated neuropsychiatric disorders, notably posttraumatic stress disorder and chronic pain and fatigue syndromes, paradoxically exhibit somewhat low plasma levels of the stress hormone cortisol.
References: | {
"domain": "biology.stackexchange",
"id": 2608,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, psychology",
"url": null
} |
python, python-2.x, django
STATE = (
('ALABAMA', 'Alabama'),
('ALASKA', 'Alaska'),
('ARIZONA', 'Arizona'),
('ARKANSAS', 'Arkansas'),
('CALIFORNIA', 'California'),
('COLORADO', 'Colorado'),
('CONNECTICUT', 'Connecticut'),
('DELAWARE', 'Delaware'),
('FLORIDA', 'Florida'),
('GEORGIA', 'Georgia'),
('HAWAII', 'Hawaii'),
('IDAHO', 'Idaho'),
('ILLINOIS', 'Illinois'),
('INDIANA', 'Indiana'),
('IOWA', 'Iowa'),
('KANSAS', 'Kansas'),
('KENTUCKY', 'Kentucky'),
('LOUISIANA', 'Louisiana'),
('MAINE', 'Maine'),
('MARYLAND', 'Maryland'),
('MASSACHUSETTS', 'Massachusetts'),
('MICHIGAN', 'Michigan'),
('MINNESOTA', 'Minnesota'),
('MISSISSIPPI', 'Mississippi'),
('MISSOURI', 'Missouri'),
('MONTANA', 'Montana'),
('NEBRASKA', 'Nebraska'),
('NEVADA', 'Nevada'),
('NEW_HAMPSHIRE', 'New Hampshire'), | {
"domain": "codereview.stackexchange",
"id": 14153,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-2.x, django",
"url": null
} |
navigation, rviz, interactive-markers, move-base, pathplanning
Originally posted by Jose Luis on ROS Answers with karma: 375 on 2015-10-28
Post score: 1
Finally, I have used a combination of two packages that are provided by ROS.
On one hand I have used a RViz plugin example for creating a new plugin on Rviz interface. The example that I took is plant_flag_tool in rviz_plugin_tutorials package.
Once I have a button in Rviz menu, I have created a custom interactive marker which is capable of move in XY plane and rotate in Z. By this way is possible to send a position and orientation to the path planner.
Each time that the user presses the button plugin on Rviz menu a new custom marker (new goal) is created.
Originally posted by Jose Luis with karma: 375 on 2015-12-03
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 22849,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, rviz, interactive-markers, move-base, pathplanning",
"url": null
} |
conformers, energy
Title: Rotation energy barrier for carboxypyrazolate In this molecule, which is 3,5-dimethyl-4-carboxypyrazolate (unless I got it wrong): | {
"domain": "chemistry.stackexchange",
"id": 94,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "conformers, energy",
"url": null
} |
c#, performance, beginner, programming-challenge, primes
Title: Project Euler: Find 10.001st prime I have just started learning C# and decided to do some problems from Project Euler. I wrote a code to find 10 001st prime and I thought it would be cool optimize it to make it as fast as possible. How could I improve this to make it even faster?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics; | {
"domain": "codereview.stackexchange",
"id": 31314,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, beginner, programming-challenge, primes",
"url": null
} |
ros, simulation, stage, model
Title: How to create round shape models in Stage
Hi, I'm working with robot swarm simulation in Stage and I need some round shape models as obstacles.But after searching I only find out how to make polygon models by defining each vertex.
Is there any method to make round shape models in Stage? Drawing a picture with round obstacles as a map may be feasible but that would be lack of extendability as my map scale may vary.
Originally posted by SilverBullet on ROS Answers with karma: 74 on 2016-10-11
Post score: 0
Well, I guess it's impossible. I tried to draw a picture. The corresponding round obstacle in stage is made of a vast number of rectangular obstacles of different sizes. So I think round obstacle is not supported in stage.
Originally posted by SilverBullet with karma: 74 on 2016-10-20
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 25953,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, simulation, stage, model",
"url": null
} |
sampling
The main thing I'm currently confused about is - if the peak value of the original signal spectrum is 'A', then the peak value of the sampled signal spectrum is A/T (ie. A/Ts), but since 1/Ts is typically a finite number much greater than 1, then the peak value of A/Ts could be some pretty big number. It's as if there's some kind of huge amplification factor introduced due to 'ideal sampling'. Are we meant to just accept this 'big' 1/T amplification factor?
Thanks all! You sound right.
The impulse modulation description of ideal sampling operation introduces an amplitude scale of $1/T$ on the spectrum of the sampled signal, which is a periodic replica of the original spectrum.
Note that as the sampling period $T$ gets shorter, the scale factor gets larger and the separation between repeating replicas gets wider too. | {
"domain": "dsp.stackexchange",
"id": 7446,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sampling",
"url": null
} |
music, amplitude
Title: What is the reason for "random" spikes in amplitude of a guitar waveform? In the image below there is the waveform of a clean, strummed guitar note, where the absolute value of the amplitude values has been taken.
At the point marked there is a momentary spike in amplitude before the continuation of the downward trend (there are a few other points like this in the waveform). | {
"domain": "dsp.stackexchange",
"id": 2672,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "music, amplitude",
"url": null
} |
javascript, jquery, beginner
data_per_folder[current_folder.attr('id')].data_per_page[pageNum] = {
first_index: 0,
last_index: res.TotalCount,
count: res.LastIndex,
attachments: res.Attachments,
attachments_markup: attachments_divs,
attachment_extraDetails: []
};
populatePage(pageNum);
});
}
function Attachment_onClick(attachmentId) {
if (data_per_folder[current_folder.attr('id')].data_per_page[current_page].attachment_extraDetails[attachmentId] == undefined) {
createAjaxRequest("Manager/GetAttachmentExtraDetails", {
'attachmentId': attachmentId
}).done(function (res) {
//res = AttachmentExtraDetails: Guid AttachmentId, string MessageLink, string AttachmentLink,
// DateTime SentTime, DateTime ArrivalTime, int Size, Guid SenderFriendId, string SenderEmail | {
"domain": "codereview.stackexchange",
"id": 1176,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, beginner",
"url": null
} |
Next consider an arbitrary set $A$ of 13 lattice points. Apply the above result to find a pair in $A$ with a lattice-point centroid. Apply it again to the remaining 11 points of $A$, then to the remaining 9, and yet twice more, so that we find a total of 5 such pairs in $A$. Finally, apply it one more time, to the set of lattice-point centroids of these 5 pairs. This gives us a pair of pairs, whose 4 points have a lattice-point centroid, as desired. | {
"domain": "purdue.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419702316276,
"lm_q1q2_score": 0.8626136835764684,
"lm_q2_score": 0.8723473614033683,
"openwebmath_perplexity": 207.49146620839028,
"openwebmath_score": 0.8303226828575134,
"tags": null,
"url": "https://www.math.purdue.edu/pow/discussion/2016/spring/15"
} |
filter-design, infinite-impulse-response
$$
\lim_{s \to \infty} H_{pe}(s) = \infty
$$
This means that, for the discrete-time approximation generated by the bilinear transform, as the angular frequency $\omega \to \pm \pi$, the discrete-time filter's magnitude response will blow up to $\infty$, which is probably not what you want.
This problem would present itself for any analog system whose transfer function has a larger-degree numerator than denominator. So it's probably justified why MATLAB issues the following error:
>> [num, den] = bilinear([75e-6 1], 1, 100e3);
Error using bilinear (line 69)
Numerator cannot be higher order than denominator. | {
"domain": "dsp.stackexchange",
"id": 511,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filter-design, infinite-impulse-response",
"url": null
} |
.net, security, validation, f#
this.IsCorrect
Obviously it's pretty similar to the C# version, if the pinIn is null or empty, throw an error (raise (new ArgumentException)), make the lastCorrect mutable so that we can alter it in ProcessCharacter, create a pin member, and create a IsCorrect member.
I also changed (in the C# version as well) the ProcessCharacter method in the following two ways:
First: if this.IsCorrect is true, then I reset lastCorrect to \$-1\$.
Second: I return this.IsCorrect after the method call.
I also made a StreamingPinTests class as follows:
type StreamingPinTests() =
interface ITests with
member this.Name = "Streaming Pin"
member this.TestCount = 1
member this.RunAll() =
let input = "p2gsvpinnumberPinNumbessfeER#VvsdinNumberPinNumberdfvlj4kF4wfV"
let sp = StreamingPin "PinNumber" | {
"domain": "codereview.stackexchange",
"id": 22274,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": ".net, security, validation, f#",
"url": null
} |
python, graphs, geospatial, networkx
I have studied quite some time now, and have come across many suggestions like this old question, or tools like NetworkX mentioned earlier or Gephi, and may other tutorials, but I do not get to see how to create the graph easily from such geodata. I though this should have been already well-established since maps are using it widely (maybe not open sourced). All I see in tutorials or blog posts are explaining concepts intuitively or implementations for a very simple graph shown above or they are not about geodata.
Any helps or comments or guides how to implement are appreciated. Ideally I would like to know how do I do go from CSV to creation of Graph so that I can perform shortest path algos. | {
"domain": "datascience.stackexchange",
"id": 6144,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, graphs, geospatial, networkx",
"url": null
} |
python, programming-challenge
Input
I'd change [int(l) for l in f.read().splitlines()] to list(map(int, f)), or at least [int(line) for line in f].
Output
I'd change
print(f'PT 1 result: {pt1_result}') to
print('PT 1 result:', pt1_result). Bit shorter, and it works in older versions of Python. And at least in IDLE, the f-string is styled only as string, the whole thing green, including the variable. I don't like that. | {
"domain": "codereview.stackexchange",
"id": 40127,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, programming-challenge",
"url": null
} |
general-relativity, differential-geometry, curvature, topology, singularities
You can stretch out your surface to locally make it flat, or give it positive or negative curvature, but the global topology may prevent you from doing so everywhere simultaneously. For example, if we have a sphere in $\mathbb R^3$, we can flatten it, maybe most of it, but we will inevitably have some kind of an equator left where the curvature is higher the flatter you make the hemispheres. You could say that for this topology the curvature has nowhere to go. When you take a torus, you will have regions of positive and others of negative curvature. When going to 4-space you can actually make it flat everywhere, and likewise you can deform each closed surface so that it has constant curvature, but the amount of curvature depends strongly on the topology. This is quantified in the beautiful Gauss-Bonnet theorem:
$$\int_M KdA = 2\pi(2 - 2g)$$ | {
"domain": "physics.stackexchange",
"id": 94417,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, differential-geometry, curvature, topology, singularities",
"url": null
} |
python, python-2.x, form, google-app-engine
region = montaomodel.Region.get(city.region.key())
ad.cities.append(city.key())
ad.regions.append(region.key())
ad.city = unicode(city.name)
ad.region = unicode(region.name) | {
"domain": "codereview.stackexchange",
"id": 13504,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-2.x, form, google-app-engine",
"url": null
} |
c#, linq, extension-methods
foreach(var item in items)
yield return item;
}
The following test was used to demonstrate the example given in the original question.
[TestClass]
public class FilterTest {
[TestMethod]
public void WherePreviousTest() {
//Arrange
var numbers = new[] { 1, 5, 8, 7, 12, 8, 5 };
var expected = new[] { 1, 5, 8, 12 };
//Act
var actual = numbers.WherePrevious((first, second) => second > first).ToArray();
//Assert
actual.ShouldAllBeEquivalentTo(expected);
}
} | {
"domain": "codereview.stackexchange",
"id": 29371,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, linq, extension-methods",
"url": null
} |
java, optimization
});
long endTime = System.nanoTime();
long duration = (endTime - startTime);
System.out.println(duration/1000000.0 + "ms");
System.out.println(distance);
} | {
"domain": "codereview.stackexchange",
"id": 10160,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, optimization",
"url": null
} |
ros-melodic, dynamic-reconfigure
Originally posted by gvdhoorn with karma: 86574 on 2019-03-20
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Jägermeister on 2019-03-20:
I tried adding add_dependencies(project ${${PROJECT_NAME}_EXPORTED_TARGETS}) but it throws the error of Cannot add target-level dependencies to non-existent target "project".
Comment by gvdhoorn on 2019-03-20:
Ignore that bit for now. First get your dependency declarations correct.
Is this a Python package? Or have you not shown us your full CMakeLists.txt?
Comment by Jägermeister on 2019-03-20:
This is a Python package, and I did everything written in the page above. The error in the above comment came after I followed the instructions. Anyway, updating the question so that you see the new CMakeLists.txt.
Comment by gvdhoorn on 2019-03-20:
Don't add the add_dependencies(..) bit. That is for C++ packages only.
You don't need the include_directories(..) call either. Python doesn't use any of that. | {
"domain": "robotics.stackexchange",
"id": 32685,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic, dynamic-reconfigure",
"url": null
} |
quantum-state, nielsen-and-chuang
The total number of possible states that a system can take on.
The number of bits of information required to uniquely specify the system's physical state. | {
"domain": "quantumcomputing.stackexchange",
"id": 1383,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-state, nielsen-and-chuang",
"url": null
} |
water, electrolysis
and then tried to do the math;
I imagined 1L of water being completely consumed with no other reactions and assumed that it would be a ratio of 2:1 H2 to O2 so i took the 997g/L of water and divided it into, 997*(2/3) and 997*(1/3) then I multiplied those numbers the L/g of H and O respectively, added them up and got 7627.60881 which deferentially seems wrong. I must have misunderstood or gone wrong somewhere because it expanding over 7000x in volume (at atmospheric pressure) seems ridiculous. You're not as far off as you think!
Here's the reaction:
$$\ce{H_2O(l)->H_2(g) + 1/2 O_2(g)}$$
It's often useful to first do a "back-of-the-envelope" calculation before proceeding with the formal calculation, since that helps give you a better intution for the problem and, in addition, gives you a rough ideal of what the answer should be (and thus serves as a check against egregious errors). So: | {
"domain": "chemistry.stackexchange",
"id": 14955,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "water, electrolysis",
"url": null
} |
genotyping
Signal-spreading preprint -- detailed investigation of the phenomenom, including methods, graphs, and associated data
Crossblock -- tool by Brian Bushnell that attempts to remove cross contamination
Summary by James Hadfield -- mentions a few fixes suggested by Illumina, many centred around not using barcode combinations that could conflict
Illumina's quick-fire response -- they've known about it for a long time, and point out that it shouldn't be a problem for most purposes | {
"domain": "bioinformatics.stackexchange",
"id": 104,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "genotyping",
"url": null
} |
chemical-engineering, matlab
I am thinking I need to apply 3 such criteria for 3 components in the system for one of the phases because mole fraction of 4th component is satisfied automatically by mass balance for the phase and mole fractions of components in other phase is satisfied automatically by phase equilibrium condition or mass balance for every component.
I am not sure if this is correct? For reference, I am drawing from the chapter on isothermal VLE separations in Separation Process Principles by Seader, Henley, and Roper.
Consider only the final state. The two starting statements in degrees of freedom with $C'$ independent chemical components and $\Pi_{act}$ phases give the number of intensive parameters and independent intensive equations.
$$\nu = C'\Pi_{act} + 2$$
$$\epsilon = \Pi_{act} + C'(\Pi_{act} - 1)$$
For your system with $C' = 4$ and $\Pi_{act} = 2$, we find $\nu = 10$ and $\epsilon = 6$. The parameters are
$$T, p, x_j(4), y_j(4)$$
The equations are
$$\sum x_j = 1, \sum y_j = 1, K_j(T, p)(4)$$ | {
"domain": "engineering.stackexchange",
"id": 4644,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "chemical-engineering, matlab",
"url": null
} |
reinforcement-learning
However, if the game allows for splitting decisions up, it will likely be better for the agent to take advantage of extra knowledge of the value of any previously hidden card just taken from the draw pile.
In general, if each player decision is taken sequentially, resulting in changes to state, then it is a separate action on a separate time step according to the MDP theoretical model used in reinforcement learning (RL). You might want to describe/notate the time steps differently so that they match how the game play proceeds. However, for the purposes of RL, each decision point should be on a new time step, and should result in a new state, new value estimates etc. | {
"domain": "ai.stackexchange",
"id": 2518,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning",
"url": null
} |
python, python-3.x, networking
if isinstance(host, str):
_cell_print(f"{host} [{best_route}]")
else:
_cell_print(best_route)
else:
_cell_print(best_route)
return found_destination | {
"domain": "codereview.stackexchange",
"id": 39923,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, networking",
"url": null
} |
c#, design-patterns, asp.net-mvc, asp.net-core
Title: Design Pattern for initializing Properties of a ViewModel which only serves a display purpose It's a question which lies me for years on the tongue.
Given a LoginViewModel:
public class LoginViewModel : ViewModelBase
{
public string Email { get; set; }
public string Password { get; set; }
public bool RememberMe { get; set; }
public string ReturnUrl { get; set; }
public IEnumerable<AuthenticationScheme> AuthenticationSchemes { get; set; }
}
Typically in Mvc, you need this ViewModel in a GET Request, and (if the request failed) in a POST request.
So here we have a simple LoginController:
public class LoginController : Controller
{
private readonly ConmaniaSignInManager _signInManager;
public LoginController(ConmaniaSignInManager signInManager)
{
_signInManager = signInManager;
} | {
"domain": "codereview.stackexchange",
"id": 30898,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, design-patterns, asp.net-mvc, asp.net-core",
"url": null
} |
c#, entity-framework, asp.net-mvc, repository
public IXXXXXRepository XXXXXRepository { get; set; }
public IPersonRepository PersonRepository { get; set; }
public IPersonLoginRepository PersonLoginRepository { get; set; }
public IPropertyApplicationRepository PropertyApplicationRepository { get; set; }
public ISaleTypeRepository SaleTypeRepository { get; set; }
public IStatusRepository StatusRepository { get; set; }
public ITownRepository TownRepository { get; set; }
public ITypeRepository TypeRepository { get; set; }
public UnitOfWork() : this(new PropertyInfoEntities()) { }
public UnitOfWork(PropertyInfoEntities context)
{
_context = context;
InitRepositories();
} | {
"domain": "codereview.stackexchange",
"id": 7065,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, entity-framework, asp.net-mvc, repository",
"url": null
} |
cosmology, big-bang
$$t=-\frac{1}{c}\sqrt{x^2+y^2+z^2}$$
where $t=0$ is identified with the present. Indeed, this past light cone is surrounded by a very thick and dense wall. But you can't say that this past light cone is "the Universe" now: it is a slice through spacetime that contains some places that are photographed now (those that are nearby) and some places that are photographed in a distant past (near the Big Bang, those that are very far). | {
"domain": "physics.stackexchange",
"id": 263,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, big-bang",
"url": null
} |
electrical-engineering, materials, thermodynamics, experimental-physics
Title: Electricity generation from sand particles in airstream hitting surface I read an experiment which demonstrated that metal filings fired at a surface using air blasts charges the particles, surface and airstream. I understand this is triboelectricity, resulting from friction.
For reference: https://royalsocietypublishing.org/doi/pdf/10.1098/rspa.1929.0004
Experiments show that the charge increases if
airstream is faster
airstream is hotter
particles are finer (greater surface area)
particles are shot at surface obliquely | {
"domain": "engineering.stackexchange",
"id": 5343,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrical-engineering, materials, thermodynamics, experimental-physics",
"url": null
} |
quantum-mechanics, visible-light, interference
Title: Why does light show a no interference result? I was reading the first chapter in the Feynman lectures volume 3 about quantum mechanics and I understand the concept that 'interference' means $P_{12}=P_1+P_2$ as expected, however when the electron gun experiment is done with a light source behind the two holes the graph shows a no interference result, isn't the light supposed to interfere with the electron? Interference is with a single type of wave, so sound waves interfere with other sound waves, and light waves interfere with other light waves. Generally sound waves don't interfere with light waves and vice versa. In the formula you wrote it wouldn't make sense to add $P_1$ and $P_2$ if $P_1$ is the pressure of a sound wave and $P_2$ is the strength of the E-field, it would be adding apples and oranges (the units don't even match). | {
"domain": "physics.stackexchange",
"id": 58363,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, visible-light, interference",
"url": null
} |
coordinate-system, gps
Title: Maximum and minimum integer number of latitude and longitude I'm developing an application where the user inputs latitude and longitude numbers in float type format.
I have to validate that the format of the numbers are correct.
My doubt is what is the maximun and minimum integer number on both latitude and longitude.
Let me give an example:
latitude: <max/min>.666666
longitude: -<max/min>.666666
What are the correct max and min in both cases? Latitude is easy: -90 to +90.
Longitude can use one of two conventions: 0 to +360, or -180 to +180. You may want to handle both gracefully. | {
"domain": "earthscience.stackexchange",
"id": 2327,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "coordinate-system, gps",
"url": null
} |
catkin, ros-groovy
Title: Catkin includes system packages before overlay
Hi all,
I'm not sure if I'm supposed to be using catkin yet but I figure it can't hurt to get a little ahead of the curve, especially since I'm trying to work with some stuff from Groovy (moveit). I've been trying to set up a workspace for catkin to overlay the most recent code from github over the debs and I'm having trouble compiling moveit_core because it's getting the system version of srdfdom even though I've overlayed a version from git in my workspace instead. This is the smallest .rosinstall that exhibits the problem:
- git: {local-name: src/srdfdom, uri: 'https://github.com/ros-planning/srdfdom.git'}
- git: {local-name: src/moveit_core, uri: 'https://github.com/ros-planning/moveit-core.git'} | {
"domain": "robotics.stackexchange",
"id": 11692,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin, ros-groovy",
"url": null
} |
ros-melodic, ros-kinetic, ubuntu, ubuntu-bionic
Title: Why ROS_Kinetic is recommended Distribution?
I upgraded to Ubuntu 18.04 and my Kinetic does not work anymore,
Unable to locate package
ros-kinetic-desktop-full
When I see list of distribution here
Why (recommended) is written infront of Kinetic ?
Why not melodic ?
Originally posted by tonyParker on ROS Answers with karma: 377 on 2018-08-24
Post score: 0
With Ubuntu 18.04 you should use ROS Melodic as it is primarily targeted at the Ubuntu 18.04 (Bionic) release. I guess when all the packages are added and since it will have a long term support it will become recommended at some point. At the moment ROS Kinetic is the most used one and has a number of packages that are probably still not ported to the newer distributions.
Originally posted by pavel92 with karma: 1655 on 2018-08-24
This answer was ACCEPTED on the original site
Post score: 4 | {
"domain": "robotics.stackexchange",
"id": 31630,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic, ros-kinetic, ubuntu, ubuntu-bionic",
"url": null
} |
ros, turtlebot, keyboard-teleop
Originally posted by jd on ROS Answers with karma: 62 on 2013-01-20
Post score: 1
Original comments
Comment by Àngel - IRI on 2013-01-20:
If you run only the keyboard teleop and looks at the rostopic echo, the response is as expected? (try to know if the delay is because of the network or because of what is happening at the PC)
If you have rviz visualizing map data on your workstation, this can quickly saturate your wireless connection as you have to transmit the map data over WiFi (Depends on the publish frequency and other settings of course). Does it work better if you only use teleop without any visualization? Also, if have set up everything properly, you should be able to start the teleop node on your workstation.
See also this Q/A on compressed/ROI map transfer as it might be relevant.
Originally posted by Stefan Kohlbrecher with karma: 24361 on 2013-01-20
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 12503,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, turtlebot, keyboard-teleop",
"url": null
} |
objective-c
Title: Releasing retained objects inside dealloc When releasing objects that might have been retained during the app's lifetime, how do you check if the object really exists and prevent releasing a nil object?
Here's how I'm doing it:
- (void)dealloc{
if(account_)
[account_ release];
account_ = nil;
[super dealloc];
} - (void)dealloc{
if(account_)
You don't need to do this. Objective-C ignores attempts to call methods on nil objects. So you call release and nothing will happen if its already nil
[account_ release];
account_ = nil;
Your object is being destroyed, there isn't a whole lot of point in setting values to nil
[super dealloc];
} | {
"domain": "codereview.stackexchange",
"id": 1623,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "objective-c",
"url": null
} |
perturbation-theory
\end{align}
Why should one choose these coordinates? For the boundary layer at $x = 1$, why not choose a coordinate like
\begin{align}
\tilde{x} = \dfrac{1-x}{\varepsilon^\beta} \hspace{3cm} (1)\\ \textrm{or} \hspace{3cm}\\
\tilde{x} = \dfrac{\sqrt{1^2-x^2}}{\varepsilon^\beta} \hspace{3cm} (2)
\end{align}
If I used the boundary layer coordinate in (1), then I could match the solution in the limit of $\tilde{y}(\tilde{x} \to \infty) = y(x \to 1)$ instead of $\tilde{y}(\tilde{x} \to -\infty) = y(x \to 1)$. Aside from the sign, I don't think this is any different from the original coordinate.
If I used the boundary layer coordinate in (2), then it seems like the matching would still take place at $\tilde{y}(\tilde{x} \to \infty) = y(x \to 1)$ except that the amount of stretching would be different. Are there guidelines for how I should choose my boundary layer coordinate? There is no substantive difference between the boundary layer variable | {
"domain": "physics.stackexchange",
"id": 54113,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "perturbation-theory",
"url": null
} |
# evaluate the indefinite integral
• Oct 21st 2010, 08:57 PM
Taurus3
evaluate the indefinite integral
Evaluate the indefinite integral of x(2x+5)^8dx
Alright, so far I've got:
u=2x+5, du=2dx, (1/2)du=dx, x = (u-5)/2
integral of (u-5)/2*u^8*1/2du
1/2integral of (u-5)/2*u^8du
1/2 ((2x+5)-5)/2*((2x+5)^9)/9 + C
But this wasn't the answer...8( Am I doing something wrong?
• Oct 21st 2010, 09:16 PM
Prove It
You would need to use integration by parts...
Let $\displaystyle u = x$ and $\displaystyle dv = (2x + 5)^8$.
Then $\displaystyle du = 1$ and $\displaystyle v = \frac{1}{18}(2x + 5)^9$.
So $\displaystyle \int{x(2x+5)^8\,dx} = \frac{1}{18}x(2x + 5)^9 - \int{\frac{1}{18}(2x + 5)^9\,dx}$
$\displaystyle = \frac{1}{18}x(2x + 5)^9 - \frac{1}{36}\int{2(2x + 5)^9\,dx}$
$\displaystyle = \frac{1}{18}x(2x + 5)^9 - \frac{1}{360}(2x + 5)^{10} + C$.
• Oct 21st 2010, 09:29 PM
tonio
Quote:
Originally Posted by Taurus3
Evaluate the indefinite integral of x(2x+5)^8dx
Alright, so far I've got: | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211626883622,
"lm_q1q2_score": 0.8144470390359748,
"lm_q2_score": 0.8354835432479661,
"openwebmath_perplexity": 12939.455824388117,
"openwebmath_score": 0.98209148645401,
"tags": null,
"url": "http://mathhelpforum.com/calculus/160575-evaluate-indefinite-integral-print.html"
} |
javascript, parsing, node.js, template, modules
renderer.js
Renderer.prototype.node = function (node, callback) {
var tag = this.tag.bind(this); | {
"domain": "codereview.stackexchange",
"id": 6446,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, parsing, node.js, template, modules",
"url": null
} |
discretization
$$
z[k+1] = e^{AT}z[k] + e^{A(k+1)T}\int_{kT}^{(k+1)T}e^{-A\tau}Bx(\tau)d\tau, \ \ y[k]=Cz[k]
$$
where $e^{A\tau}$ is the exponential matrix. Finally, plugging in the particular form of $x(t)$ results in the final form of the discretization (in discrete time state space representation). This can be used to derive (exact or "consistent") discretizations for ZOH, FOH, high order holders or more exotic holders. | {
"domain": "dsp.stackexchange",
"id": 9620,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discretization",
"url": null
} |
quantum-information, quantum-measurements
def traceout_A(M):
s = 0
for i in (0,1):
ket_i = matrix(QQ,2,1); ket_i[i,0] = 1
id2 = matrix.identity(2)
s += ket_i.conjugate_transpose().tensor_product(id2) * M * ket_i.tensor_product(id2)
return s
pms1 = traceout_A(P1*ket0bra0.tensor_product(rho)*P1)
pms2 = traceout_A(P2*ket0bra0.tensor_product(rho)*P2)
print html("Post-measurement state $\\operatorname{{tr}}_A \\Bigl(P_1\\bigl(\\lvert0\\rangle\\langle0\\rvert\\otimes\\rho\\bigr)P_1\Bigr)$ is ${}$".format(latex(pms1)))
print html("Post-measurement state $\\operatorname{{tr}}_A \\Bigl(P_2\\bigl(\\lvert0\\rangle\\langle0\\rvert\\otimes\\rho\\bigr)P_2\Bigr)$ is ${}$".format(latex(pms2)))
print html("The post measurement states are different: {}".format(pms1 <> pms2)) | {
"domain": "physics.stackexchange",
"id": 17286,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-information, quantum-measurements",
"url": null
} |
c++, tic-tac-toe, machine-learning
write this:
RandomPlayer r{'O'};
HumanPlayer h{'O'};
CompPlayer s{'X'};
Note that this uses the C++11 initialization syntax. If your compiler doesn't support that, my first advice would be to update the compiler. Only if that's not possible for some very compelling reason should you limit yourself to C++03 syntax.
Consider using a better random number generator
You are currently using
gameField[ v[ rand() % v.size() ] ] = symbol; | {
"domain": "codereview.stackexchange",
"id": 24451,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, tic-tac-toe, machine-learning",
"url": null
} |
boundary @ pQ T of to the inhomogeneous heat equation @ tu [email protected] x (1. The specification of appropriate boundary and initial. A New Method of Imposing Boundary Conditions in Pseudospectral Approximations of Hyperbolic Equations* By D. For this numerical scheme, a free surface Neumann boundary condition with no flux in normal direction to the free surface is derived. Differential Equations, October 2001, vol. Laplace's equation is solved in 2d using the 5-point finite difference stencil using both implicit matrix inversion techniques and explicit iterative solutions. The general solution to the heat/di usion equation is. elasticity etc. In both cases, only the row of the A-matrix corresponding to the boundary condition is modi ed! David J. The heat dissipates according to the PDE: = ˘ x=0 x=L Thermal diffusivity (conductivity) Boundary Conditions We have to specify boundary. You can define an adiabatic wall by setting a zero heat flux condition. 5) is called the eigenvalue | {
"domain": "auit.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682478041813,
"lm_q1q2_score": 0.8128722891905571,
"lm_q2_score": 0.8221891327004133,
"openwebmath_perplexity": 666.6580393036137,
"openwebmath_score": 0.8180767297744751,
"tags": null,
"url": "http://qxvy.auit.pw/2d-heat-equation-neumann-boundary-conditions.html"
} |
quantum-mechanics, electromagnetic-radiation, photons, scattering, raman-spectroscopy
Both Rayleigh and Raman are two photon processes involving scattering of incident light ($h c \bar{\nu}_L$), from a “virtual state.” The incident photon is momentarily absorbed by a transition from the ground state into a virtual state and a new photon is created and scattered by a transition from this virtual state. Rayleigh scattering is by far the most probable event and the scattered intensity is c. $10^{-3}$ less than that of the original incident radiation. This scattered photon results from a transition from the virtual state back to the ground state and is an elastic scattering of a photon resulting in no change in energy (i.e., occurs at the laser frequency). | {
"domain": "physics.stackexchange",
"id": 67460,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, electromagnetic-radiation, photons, scattering, raman-spectroscopy",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.