text stringlengths 1 1.11k | source dict |
|---|---|
biochemistry, botany, nutrition, allergies, medicinal-chemistry
I did find one paper (Jensen-Jarolim et al., 1998) about allergen expression in peppers (birch allergy like). However, no green-specific allergens are reported, and it even seems like green peppers would be a better choice to avoid these allergens. | {
"domain": "biology.stackexchange",
"id": 5779,
"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": "biochemistry, botany, nutrition, allergies, medicinal-chemistry",
"url": null
} |
cc.complexity-theory, randomized-algorithms, reductions, parameterized-complexity, fixed-parameter-tractable
Title: On Random Self-reducible properties Permanent is random self-reducible. $\mathsf{SAT}$ is not random self-reducible since otherwise the polynomial hierarchy collapses to $\mathsf{\Sigma_3}$.
1) Is $k$-sum random self-reducible?
That is if $k$-sum can be computed in time $n^{O(k^b)}$ for some $0<b<1$ on $\frac{1}{2}+\epsilon$ of inputs where $n$ is the number of input integers, then can $k$-sum be computed time $n^{O(k^b)}$ for all inputs of $n$ input integers in a randomized sense?
The Patrascu-Williams paper http://people.csail.mit.edu/mip/papers/sat-lbs/paper.pdf talks about deterministic algorithms and does not imply hierarchy collapse but only tells that the ETH fails (somewhat mildly) when we have a deterministic $n^{O(k^b)}$ algorithm. We have a randomized setting here and even if we have such a random self-reducible condition satisfied, we may still not upset the big picture.
2)Likewise can the $\mathsf{NP=coNP}$ problem be random self reducible? | {
"domain": "cstheory.stackexchange",
"id": 2368,
"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": "cc.complexity-theory, randomized-algorithms, reductions, parameterized-complexity, fixed-parameter-tractable",
"url": null
} |
motors, rail
Points c) and d) stand out to me as a little bit strange, since the motor is expected to be modeled with its loads, instead of directly measuring the temperature. The only reasoning I can determine for this is that it protects against the failure of the thermal sensor.
However, it's not clear to me why this failure more is harder to guard against, than (for example) the failure of current sensors needed to track the motor's power, or an obstruction of the normal cooling process by dust or debris. Is there a common technical reason why motor thermal protection is specified to use only modeled heating rather than measured heating or a combination of safeguards? Yes. Along with your reasoning of failure mode, reliability and cost, there is a disadvantage of slower response time of the sensors. The thermal model will give temperature values as fast as the speed of the digital processor you use. A Research by GE states: | {
"domain": "engineering.stackexchange",
"id": 3323,
"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": "motors, rail",
"url": null
} |
# Good Question 13
Let’s end the year with this problem that I came across a while ago in a review book:
Integrate $\int{x\sqrt{x+1}dx}$
It was a multiple-choice question and had four choices for the answer. The author intended it to be done with a u-substitution but being a bit rusty I tried integration by parts. I got the correct answer, but it was not among the choices. So I thought it would make a good challenge to work on over the holidays.
1. Find the antiderivative using a u-substitution.
2. Find the antiderivative using integration by parts.
3. Find the antiderivative using a different u-substitution.
4. Find the antiderivative by adding zero in a convenient form.
Your answers for 1, 3, and 4 should be the same, but look different from your answer to 2. The difference is NOT due to the constant of integration which is the same for all four answers. Show that the two forms are the same by
2. “Simplifying” your answer to 1, 3, 4 and get that third form again. | {
"domain": "teachingcalculus.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357216481429,
"lm_q1q2_score": 0.8402196433912932,
"lm_q2_score": 0.8558511469672594,
"openwebmath_perplexity": 325.9380157505137,
"openwebmath_score": 0.6814727783203125,
"tags": null,
"url": "https://teachingcalculus.com/2017/12/12/good-question-xxx/"
} |
electromagnetism, charge, polarization, dielectric
Title: Free, bound and total charge density If in a medium we have:
$\rho(\vec r)_{total} = \rho(\vec r)_{free} + \rho(\vec r)_{bound} $.
Now we know:
$-\nabla\vec P = \rho(\vec r)_{bound}$
$\nabla\vec D = \rho(\vec r)_{free}$.
Since $\vec D=\epsilon_0 \epsilon \vec E$ we can say also that:
$\epsilon_0 \epsilon \nabla\vec E = \rho(\vec r)_{free}$.
If what I wrote is corrent, then what gives us the total charge density. Is there a field whose divergence gives us the total charge density, similarly to how the rotation of the magnetic field gives us the total current density in a material $\nabla \times \vec B = \vec j_{total}$. If I understand you correctly the corresponding field should be $\epsilon_0 \vec{E}$. This is one of Maxwell's equations. Let me explain a little bit about the different fields because they might be the source of confusion. | {
"domain": "physics.stackexchange",
"id": 84267,
"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, charge, polarization, dielectric",
"url": null
} |
java, thread-safety, reflection, event-handling
@Override
public void executeEvent(final Object event) {
if (classConstraint.isAssignableFrom(event.getClass())) {
eventMapping.getOrDefault(event.getClass(), EMPTY_SET).forEach(eventHandler -> eventHandler.invoke(event));
}
}
in the above code, while performing the forEach, any of the following things are possible (and other things as well, I am sure):
data could be added to the Set you are streaming, and that data may, or may not be included in the stream.
the stream could throw a ConcurrentModificationException
the steam could end early (and some data may not be processed at all.
...... | {
"domain": "codereview.stackexchange",
"id": 7388,
"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, thread-safety, reflection, event-handling",
"url": null
} |
gravity, jupiter, tidal-forces, asteroid-belt
With a Stern-Levison parameter of $8.32 \cdot 10^{−4},$ Ceres is too small to fulfill the third IAU criterion for a planet, and too small to clear its neighbourhood.
Even a dwarf planet of the total mass of the asteroid belt couldn't fulfill the criterion on a pure Stern-Levison parameter basis, hence wouldn't be able to keep its neighbourhood clear. Its Stern-Levison parameter would be about $7.5\cdot 10^{-3}$. That's well below 1, the estimated value necessary to fulfill the third IAU criterion, but well above the Stern-Levison parameter of $2.95 × 10^{−3}$ for Pluto. | {
"domain": "astronomy.stackexchange",
"id": 356,
"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, jupiter, tidal-forces, asteroid-belt",
"url": null
} |
for centuries. Mutually exclusive and inclusive events, probability on odds and other challenging probability worksheets are useful for grade 6 and up students. Toss the coin at least 10 times. By the Principle of Counting, there are 2*2*2*2*2, or 32 possible outcomes to your problem. The probability of many successive heads occurring in sequence is very low, but despite that, even if you had a bunch of successive heads, there's still only a 50-50 chance of the next coin flip being heads. Computing probability generating functions 5695 Definition 2. Although both sides are made from raised metal, they show different images. 5 because of the law of large numbers. Each is reasonable in its own context. In flipping a coin there are two possible “events”. " Now I flip a coin ten times, and ten times in a row it comes up heads. A Scientific Coin Toss Experiment⇤ How a coin toss can come silver spoon up Espen Gaarder Haug February 29, 2012 When flipping a fair, well-balanced coin, it is | {
"domain": "gruppokamengepavia.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513873424044,
"lm_q1q2_score": 0.8039426459541658,
"lm_q2_score": 0.8152324848629215,
"openwebmath_perplexity": 305.28230835746405,
"openwebmath_score": 0.7786978483200073,
"tags": null,
"url": "http://yqxs.gruppokamengepavia.it/coin-flip-probability.html"
} |
electromagnetism, special-relativity, field-theory, tensor-calculus
Then I started to call vectors and vector fields different quantities, quantities that transform in this way under a Lorentz transformation: $A'^\mu = \Lambda^\mu \,_\nu A^\nu$, and I came to discover that neither $\bf E$ nor $\bf B$ transform like the spacial part of a 4-vector. So I wandered, what are they and how do they transform? They are the components of a different objects, the electromagnetic tensor here represented in his matrix form with metric (+---):
$$
F^{\mu \nu} \, = \,\left(\begin{matrix}0 & -E_x & -E_{y} & -E_{z} \\ E_{x} & 0 & -B_{z} & B_{y} \\ E_y & B_{z} & 0 & -B_x \\ E_z & -B_{y} & -B_{x} & 0\end{matrix}\right)\tag{0}
$$
So now I see: the components of 3-ple I used to consider are more generally the components of a tensor and transform like the components of a tensor.
Now I can write down the Lorentz force in two different forms:
$$
{\bf F}_L = q ({\bf E} + \frac{{\bf v}}{c} \times {\bf B})
\tag{1}$$
$$
K^\mu = \frac{q}{c} F^{\mu \nu} u_{\nu}
\tag{2}$$ | {
"domain": "physics.stackexchange",
"id": 37913,
"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, special-relativity, field-theory, tensor-calculus",
"url": null
} |
organic-chemistry, cis-trans-isomerism
Compound 2 - the double bond is not causing the isomerism. (Discussed in compound 1) Here there is only one sp3 hybridized carbon(not attached with double bond) so it is lacking one group with which it could've made isomerism.
Compound 3- Here you are correct. the CH3 groups and H attached can show syn and anti so it will show geometrical isomerism
Compound 4 - Just like compound 2 here is only one sp3 hybridized carbon and it cant show geometrical isomerism on its own. The other groups can't show geometrical isomerism due to twisting of ring structure. | {
"domain": "chemistry.stackexchange",
"id": 10570,
"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, cis-trans-isomerism",
"url": null
} |
ros, build-from-source, rospackage, update
Then I try to update the package list, and this is output of sudo apt-get update:
root@linaro-alip:~# sudo apt-get update
Ign http://ports.ubuntu.com precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Hit http://ports.ubuntu.com precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://ports.ubuntu.com precise Release
Hit http://ppa.launchpad.net precise Release
Ign http://packages.ros.org precise InRelease
Hit http://packages.ros.org precise Release.gpg
Hit http://ports.ubuntu.com precise/main Sources
Hit http://ppa.launchpad.net precise/main Sources
Hit http://packages.ros.org precise Release
Hit http://ports.ubuntu.com precise/universe Sources
Hit http://ports.ubuntu.com precise/main armhf Packages | {
"domain": "robotics.stackexchange",
"id": 12738,
"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, build-from-source, rospackage, update",
"url": null
} |
organic-chemistry
Can anyone please prove me wrong?
Thanks in advance There are two types of description of hyperconjugation: (1) Valence bond approach & (2) Molecular orbital approach. Your question is pertaining to valence bond approach as you are interested in the stability of the canonical forms.
In Valence bond approach, hyperconjugation is said to happen due to conjugation of C—H bond electron pair with adjacent double bond. We call this phenomenon 'hyper'-conjugation because there is no real negative charge that is getting delocalized. Rather, the partial negative charge which is accumulated on the carbon due to electronegativity difference with hydrogen is getting delocalized.
In a real carbanion, the carbon has ~100% share of the negative charge. However, in this case, the carbon has only partial share of the negative charge. To be precise, about 7%, because 7% is the ionic character of a C—H bond (Calculated using Hannay-Smith's Relationship for Calculating Percentage Ionic Character [1]). | {
"domain": "chemistry.stackexchange",
"id": 13319,
"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",
"url": null
} |
javascript, jquery, mobile
$window.resize(function() {
var b = $window.width();
if (b > 320 && $side.is(":hidden")) {
$side.removeAttr("style")
}
});
});
most notably, you are calling jQuery on object that are already jQuery objects ($(l) and so on). every call to $() will have its performance overhead. Inmy code the jQuery DOM querying engine is only triggered in the inital variables declaration statement (notice how I grouped var declarations with commas).
Even calling $(this) has its overhead so it's best to use the cached variable.
Also, it's good practice to start variables names that contain jQuery objects with the dollar sign $.
And the sideHeight variable is declared but never used?
Since every jQuery method returns the objects it's been called on, you can chain method calls, so I've chained $l.hide().on() since hide() returns $l itself.
Also removeAttr("style") should be left as a last resort just in case you don't have better methods to change the element's style. | {
"domain": "codereview.stackexchange",
"id": 3761,
"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, mobile",
"url": null
} |
immunology, virology, coronavirus, vaccination
Confirmed COVID-19 in Phase 2/3 participants with and without evidence of infection before vaccination
From Pfizer's study plan (VE = vaccine efficacy):
VE will be estimated by 100 × (1 – IRR), where IRR is the calculated
ratio of confirmed COVID-19 illness per 1000 person-years follow-up
in the active vaccine group to the corresponding illness rate in the
placebo group from 7 days after the second dose. VE will be analyzed
using a beta-binomial model. | {
"domain": "biology.stackexchange",
"id": 11098,
"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": "immunology, virology, coronavirus, vaccination",
"url": null
} |
general-relativity, action
Title: Different actions equivalence in general relativity? I started reading up on the different actions that appear in GR. I have come across two:
When looking at geodesics I found:
$$S=\int \sqrt{-g_{\mu \nu} \frac{dx^\mu}{d\lambda} \frac{dx^\nu}{d\lambda}}d\lambda$$
(I have also seen this with a coefficient of $-mc$)
When actually looking for Action in general relativity I came across the Einstein-Hilbert action:
$$S=\int \{\frac{1}{2\kappa} (R-2 \Lambda)+L_M\} \sqrt{-g}d^4x$$
Why do we have two different types or is there an equivalence between them? The first action is the action of a point particle. The second is the action of the gravitational field itself. You can easily use the two of them together to get both the geodesic equation and the Einstein Field equations with a point particle as its source (in this case, you will have $L_M = \sqrt{-g_{\mu\nu} \dot{x}^\mu \dot{x}^\nu }$). | {
"domain": "physics.stackexchange",
"id": 24674,
"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, action",
"url": null
} |
java
move the if-else in one method
find code clones in the condition blocks and separate into methods
refactor methods top-down
public void run() throws java.io.IOException {
stdin = new Scanner(System.in);
String input;
input = nextFraction();
while (!input.equalsIgnoreCase("Q")) {
handleInput(input);
}
}
private void handleInput(String input) {
String fraction;
int numPerLine;
boolean inList = false;
if (input.equalsIgnoreCase("A")) {
handleA();
} else if (input.equalsIgnoreCase("D")) {
handleD();
} else if (input.equalsIgnoreCase("S")) {
handleS();
}
}
private void handleA() {
assignNextFraction();
addFractionToList();
outputFractionAdded();
}
private void handleD() {
assignNextFraction();
inList = deleteFractionFromList();
if (inList) {
outputFractionRemoved();
} else {
outputFractionNotInList();
}
} | {
"domain": "codereview.stackexchange",
"id": 6377,
"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",
"url": null
} |
evolution, natural-selection, theoretical-biology, population-dynamics, population-biology
Title: How to calculate the effective population size ($N_e$) with overlapping generations? From this Source: If generations are overlapping, then the effective population size $N_e$ does not equal the population size $N$.
I know mathematical formulations in order to find the effective population size $N_e$ when the sex-ratio is biased $\left(N_e = \frac{4N_mN_f}{N_m+N_f}\right)$ or when the population size varies cyclically through time $\left(N_e = \frac{n}{\sum_{i=1}^n\frac{1}{N_i}}\right)$.
What is the effective population size in a population with overlapping generations? There are many different ways to do this, depending on what assumptions you make on e.g. stable age structure, distribution of offspring, haploidy/diploidy, population growth etc. As you probably know, there are also two main approaches to effective population sizes, namely ones based on: | {
"domain": "biology.stackexchange",
"id": 2900,
"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": "evolution, natural-selection, theoretical-biology, population-dynamics, population-biology",
"url": null
} |
electromagnetism, classical-mechanics
After all of this, you find that $\vec{B} \approx - \frac{1}{c^2} \vec{v} \times \vec{E}$; in other words, according to the electron, the proton is moving and so has a magnetic field in addition to its electric field.
Hopefully, the above description has convinced you that while you could find this result using pre-relativistic physics, you really don't want to. The description of the fields of moving charges in terms of special relativity is so much more elegant than the rather ugly PDE techniques required to derive these results in classical electrodynamics; it's not even close. I highly recommend that you read the chapter on "The Fields of Moving Charges" in Purcell & Morin's Electricity and Magnetism; it is beautifully written and utterly compelling. | {
"domain": "physics.stackexchange",
"id": 56380,
"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, classical-mechanics",
"url": null
} |
• You need to prove for $n=(k+2)$ since odd numbers form an AP with first term $a=1$ and common difference $d=2$. Mar 24 '15 at 18:09
• Why would I prove k + 2 when the problem is clearly asking for k + 1? If I had 1, wouldn't k + 2 be 3, which is not even? Mar 24 '15 at 18:11
• you need to prove that "if $x$ is odd, $x+1$ is even." Say the assumed case is $P(k)$ where $P$ is the statement in question. Now, that suggests $k$ is odd. If you try the inductive step with $n=k+1$, you're taking an even value for the inductive step as $k$ is odd. So, $P(k+1)$ can never be true. Mar 24 '15 at 18:14
• Why would someone want to use induction here? Mar 24 '15 at 18:15
• $P(2k)$ is vacuously true. Mar 24 '15 at 18:21
You should try instead assuming the theorem is true for all $n \leq k$. (instead of just $n = k$). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9744347801373335,
"lm_q1q2_score": 0.8282414738233402,
"lm_q2_score": 0.8499711737573762,
"openwebmath_perplexity": 151.24529996129226,
"openwebmath_score": 0.8528866767883301,
"tags": null,
"url": "https://math.stackexchange.com/questions/1204739/proving-that-for-every-integer-x-if-x-is-odd-then-x-1-is-even-inducti"
} |
homework-and-exercises, newtonian-mechanics, reference-frames, centrifugal-force, centripetal-force
Please shed some light as to what's happening. How does one apply these correctly? And be satisfied that it is correct. This is only one example. I fail to get these correct all time. First rewrite the equation as $R_2 - mg\cos \theta = \frac{mu^2}{a}$. The reason the signs are different is that here $R_2$ should point towards the center, unlike in your drawing. Gravity points outwards and so it appears with a minus sign. | {
"domain": "physics.stackexchange",
"id": 17330,
"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, newtonian-mechanics, reference-frames, centrifugal-force, centripetal-force",
"url": null
} |
java, functional-programming, reflection
if(paramTypes[set.getKey()].equals(Integer.class))
var = Integer.parseInt(map.get(field.getName()));
Method method = entity.getMethod(set.getValue().getName(), paramTypes[set.getKey()]);
method.invoke(obj, var == null ? map.get(field.getName()) : var);
}
}
}
result.add(obj);
obj = null;
}
return (List<T>) result;
} | {
"domain": "codereview.stackexchange",
"id": 24626,
"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, functional-programming, reflection",
"url": null
} |
ros, navigation, ros-melodic, 2dcostmap, 2dlaserscan
Originally posted by KimJensen with karma: 55 on 2020-05-19
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by KimJensen on 2020-05-19:
If anyone can explain why unifying the laser scans would result in this issue, then please let me know! Thanks. | {
"domain": "robotics.stackexchange",
"id": 34870,
"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, ros-melodic, 2dcostmap, 2dlaserscan",
"url": null
} |
computability, undecidability, decision-problem
Title: Is Post's Correspondence Problem decidable with fixed word size? So, it's known that PCP is undecidable even when we fix the number of tiles to $n \geq 7$.
I'm wondering, can anything similar be said for when there is a fixed word length?
To be precise, here's the problem:
Given fixed $m$ and $n$, with $n \geq 7$, and words
$u_1, \ldots u_n$ and $v_1 \ldots v_n$ such that $|u_i| \leq m$ and $|v_i| \leq m$,
is there an index sequence $i_1, \ldots i_k$ such that
$u_{i_1} \cdots u_{i_k} = v_{i_1} \cdots v_{i_k}$.
For what values of $m$, if any, is this known to be undecidable?
Note that this is similar to this question, but none of the 8 linked papers seemed by their titles to answer my question, and I haven't fully read all 8 of them yet. For all $m \geq 3$, the problem is undecidable.
Proof by reduction from the word problem of unrestricted grammars: | {
"domain": "cs.stackexchange",
"id": 3148,
"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": "computability, undecidability, decision-problem",
"url": null
} |
algorithm, regex, perl
__DATA__
yellow
tooth Don't reinvent the wheel, there is a function (ie. singleton) in the package MoreUtils that does the job:
#!/usr/bin/perl
use Modern::Perl;
use List::MoreUtils qw(singleton);
while (<DATA>) {
chomp; # don't forget it, it removes the linebreak.
# split explodes the string in character
# singleton keeps characters that appear only once
# ($first) contains the first character that appears only once.
my ($first) = singleton split//, $_;
say $first;
}
__DATA__
yellow
tooth
Output:
y
h | {
"domain": "codereview.stackexchange",
"id": 25761,
"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": "algorithm, regex, perl",
"url": null
} |
ros, asus-xtion-pro-live, rtabmap
<arg if="$(arg compressed)" name="right_image_topic_relay" default="$(arg right_image_topic)_relay"/>
<arg unless="$(arg compressed)" name="right_image_topic_relay" default="$(arg right_image_topic)"/> | {
"domain": "robotics.stackexchange",
"id": 24778,
"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, asus-xtion-pro-live, rtabmap",
"url": null
} |
standard-model, gauge-theory, symmetry-breaking, weak-interaction, electroweak
Title: Theory of weak interactions Why don't we have a theory solely of weak interaction, like QED or QCD? I.e $SU(2)$ gauge theory describing neutrinos and massive $W^{+-}$ bosons.
But instead we have a unified electroweak theory under $SU(2)\times U(1)$ gauge symmetry involving symmetry breaking by Higgs field.
What is the reason for this? Is it something related to problem of giving a mass to chiral fermions? You are asking three questions, really:
Why can't you isolate the weak interactions from electromagnetism, group theoretically?
How do fermions get a mass consistently with the known global chiral symmetries of the WI?
Why do you have to gauge these symmetries?
The fitting of these three points is the quasi-magic of the solution to the SM puzzle. | {
"domain": "physics.stackexchange",
"id": 90519,
"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": "standard-model, gauge-theory, symmetry-breaking, weak-interaction, electroweak",
"url": null
} |
java, optimization, algorithm, cryptography, programming-challenge
}
private int readRotation(final Scanner scanner) throws InputErrorException {
if (!scanner.hasNext()) {
throw new InputErrorException("Unable to read rotation.");
}
final int rotation = scanner.nextInt();
scanner.nextLine();
if (!scanner.hasNext()) {
throw new InputErrorException("Unable to read rotation.");
}
return rotation;
}
private String processFile(final Scanner scanner, final int rot) {
final StringBuilder result = new StringBuilder();
while (scanner.hasNextLine()) {
final String line = scanner.nextLine();
final String processedLine = processLine(line, rot);
result.append(processedLine);
result.append("\n");
}
return result.toString();
} | {
"domain": "codereview.stackexchange",
"id": 1056,
"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, algorithm, cryptography, programming-challenge",
"url": null
} |
ros, roboearth, compilation
Originally posted by Gaëtan on ROS Answers with karma: 56 on 2012-04-24
Post score: 0
Original comments
Comment by Bence Magyar on 2012-04-24:
Please also provide the distribution and Ubuntu version you are using.
It's working know
executing :
apt-get install ros-electric-client-rosjava-jni
and
apt-get install libjson-glib-dev
then specifying the https_proxy=xxx in front of the rosmake roboearth command
For info and answer i use Ubuntu 10.04 LTS.
Gaëtan
Originally posted by Gaëtan with karma: 56 on 2012-04-24
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 9102,
"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, roboearth, compilation",
"url": null
} |
Asserting that the operation $$*$$ is not commutative means that there are elements $$a$$ and $$b$$ such that $$a*b\neq b*a$$. It does not mean that $$a*b\neq b*a$$ for any two distinct elements $$a$$ and $$b$$. Therefore, an operation may well not be commutative and, even so, to have an identity element. There is no contradiction here.
For an example of a non-commutative and non-associative algebraic structure with an identity element, take, for instance, the octonions.
An operation is commutative if for any $a$ and $b$, we have $ab=ba$. Finding one pair $a,b$ such that $ab=ba$ doesn't prove the operation is commutative; this has to hold for every pair. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877717925422,
"lm_q1q2_score": 0.8641977087049671,
"lm_q2_score": 0.8902942159342104,
"openwebmath_perplexity": 192.63374610882846,
"openwebmath_score": 0.804413378238678,
"tags": null,
"url": "https://math.stackexchange.com/questions/2329528/can-a-binary-operation-have-an-identity-element-when-it-is-not-associative-and-c/2329532"
} |
raspberrypi, ros-kinetic
Originally posted by elpidiovaldez on ROS Answers with karma: 142 on 2018-05-19
Post score: 0
Why not put the message and service definitions in a separate package from the actual service? It's actually a pretty common practice to separate code into separate minimal packages instead of one package that does everything.
Originally posted by jayess with karma: 6155 on 2018-05-19
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by elpidiovaldez on 2018-05-19:
Thanks. That is exactly what I need to do. I had just managed to figure it out for myself by trying to write my own version based on the ROS subscriber example.
Comment by gvdhoorn on 2018-05-20:\
As I understand it this is trivial in ROS.
@elpidiovaldez: that's exactly true, provided that the author of the package(s) that you want to communicate with don't do what the i2cpwm_board devs have done: put everything in a single package.
The suggestion by @jayess is exactly right. | {
"domain": "robotics.stackexchange",
"id": 30858,
"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": "raspberrypi, ros-kinetic",
"url": null
} |
ros, camera1394, stereo, bumblebee2, pointgrey
Comment by Stephan on 2013-02-21:
We launch the camera1394stereo_node with this parameter file: http://pastebin.com/1ugc1Zzt You can use dynamic_reconfigure to change some parameters online and try different settings.
Comment by Stephan on 2013-02-21:
We launch the camera1394stereo_node with this parameter file: http://pastebin.com/1ugc1Zzt
Comment by pmarinplaza on 2013-02-26:
Thanks a lot. I'll try as soon as I get the camera again.
Comment by INSA on 2013-04-02:
Hi Stephane, I just want to know if you had a good disparity image result with your bumblebee2. I am using it to extract pointClouds and the result is not really good because of the bad calibration results. How can i use the calibration files of point grey with ROS ? Is it possible ?
Comment by INSA on 2013-04-02:
Or to publish the rectified images directly threw ROS ...
Comment by Stephan on 2013-04-02:
@INSA please ask a new question so that more people are able to help you. | {
"domain": "robotics.stackexchange",
"id": 12937,
"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, camera1394, stereo, bumblebee2, pointgrey",
"url": null
} |
semiconductor-physics
Is it correct what I think? Holes are considered positively charged because of the relation between their velocity and the electric current: when they move right, the current points right.
It is theoretically possible to only work in terms of electrons: conduction band electrons and valence band electrons. However, electrons in the valence band behave in a strange way. Because of their interaction with the lattice, they don't respond to forces the way free electrons do. In fact, they accelerate in the opposite direction to the applied force. If you're only looking at electromagnetic forces, that looks remarkably like they had positive charge.
The other aspect is the current of a nearly-full band: the valence band in a semiconductor is almost completely occupied by electrons. Wikipedia can explain this better than me, but supose the band has place for electrons with speed -2, -1, 0, 1, 2. | {
"domain": "physics.stackexchange",
"id": 36816,
"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": "semiconductor-physics",
"url": null
} |
Although the vector $\mathbf{0}$ has no clearly defined direction, we will regard it as parallel to all vectors when convenient.
by Platinum (164,290 points)
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
1 like 0 dislike | {
"domain": "mathsgee.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517514031506,
"lm_q1q2_score": 0.8407956385622745,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 868.3133537087781,
"openwebmath_score": 0.7685940265655518,
"tags": null,
"url": "https://mathsgee.com/36733/what-difference-between-collinear-vectors-parallel-vectors"
} |
c++, c++14, mixins
template<typename T>
bool operator!=(const Comparable<T>& a_lhs, const Comparable<T>& a_rhs)
{
return tie(a_lhs) != tie(a_rhs);
}
template<typename T>
bool operator<(const Comparable<T>& a_lhs, const Comparable<T>& a_rhs)
{
return tie(a_lhs) < tie(a_rhs);
}
template<typename T>
bool operator>(const Comparable<T>& a_lhs, const Comparable<T>& a_rhs)
{
return tie(a_lhs) > tie(a_rhs);
}
template<typename T>
bool operator<=(const Comparable<T>& a_lhs, const Comparable<T>& a_rhs)
{
return tie(a_lhs) <= tie(a_rhs);
}
template<typename T>
bool operator>=(const Comparable<T>& a_lhs, const Comparable<T>& a_rhs)
{
return tie(a_lhs) >= tie(a_rhs);
}
Usage Example: Client code then could look like the following. The implementation of the tie function automatically defines a lexicographical ordering for all supported operations.
struct Client : public Comparable<Client>
{
auto tie() const
{
return std::tie(m_a, m_b);
} | {
"domain": "codereview.stackexchange",
"id": 17079,
"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++14, mixins",
"url": null
} |
thermodynamics
Title: how can mercury thermometer measure temperatures above 640 k? I know it's by filling the space above mercury with nitrogen at high pressure, but how will it help? This graph shows the vapour pressure of mercury as a function of temperature:
(image from this article)
The relevance of this is that a liquid boils when its vapour pressure is equal to the external pressure, so the graph effectively shows the boiling point as a function of pressure. The graph shows that if you pressurise the thermometer it raises the boiling point of the mercury and allows you to use the thermometer to measure higher temperatures. | {
"domain": "physics.stackexchange",
"id": 27107,
"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": "thermodynamics",
"url": null
} |
If the boundary is not regular at $$x_0$$, it can be possible for the process to avoid $$\partial D$$ such that $$\mathbb{P}(T>1)$$ is bounded away from $$0$$ (or decay very slowly) as $$x\rightarrow x_0$$ and then $$u(x)$$ is no more comparable with $$d(x,\partial D)$$. This lead to a nice physical phenomena call " Effet de pointe" that occures in Lightning rod.
• Thank you so much! It is interesting for me to see the problem from an stochastic analysis viewpoint.
– XIE
Jan 10, 2021 at 7:41 | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936078216782,
"lm_q1q2_score": 0.832486548962573,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 120.45082995984217,
"openwebmath_score": 0.9699209332466125,
"tags": null,
"url": "https://mathoverflow.net/questions/380521/the-solution-of-poisson-equation-and-the-distance-function-from-the-boundary"
} |
-
$\in\ne\subset$ – Andres Caicedo Dec 21 '12 at 22:58
No, the empty set is a subset of every set (every element of the empty set is contained in any other set). – copper.hat Dec 21 '12 at 23:05
@Jacob : No, and it is not precisely because the empty set is empty. Being in both $\Omega$ and $\Omega^c$ implies being in $\phi$. Nothing is wrong with that. – Patrick Da Silva Dec 21 '12 at 23:07
It would be if the empty set had any elements. – Michael Albanese Dec 21 '12 at 23:07
@Jacob : The complement of a set $A \subseteq \Omega$ is defined as the elements of $\Omega$ that are not in $A$. So of course, $A \cap A^c = \varnothing$. This is also true if $A = \Omega$. (Note that being a subset of $A$ and $A^c$ implies being a subset of $A \cap A^c$, so that this answers your last comment.) – Patrick Da Silva Dec 21 '12 at 23:13
## 1 Answer | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759643671934,
"lm_q1q2_score": 0.8064655584297442,
"lm_q2_score": 0.8221891327004133,
"openwebmath_perplexity": 120.65599672245148,
"openwebmath_score": 0.8711368441581726,
"tags": null,
"url": "http://math.stackexchange.com/questions/263447/if-the-complement-of-the-universal-set-is-the-null-set-then-the-null-set-is-not"
} |
graphviz
Title: Can stress majorization in GraphViz's neato generate 3D layouts I am looking at GraphViz's neato graph layout utility. It uses stress majorization, on which I found a paper. I can't say that I followed all the math, but it does seem formulated for laying out a graph in an arbitrarily high dimensional space. I am interested in generating node coordinates in 3D space, but I see no indication that this is supported in neato. Does neato's stress majorization generate 3D layouts? According to the GraphViz forum answer, neato can be supplied with command line option -Gdimen=3 to generate nodes with 3D coordinates. I confirmed this in Bash:
# Extract 3D node coordinates from the laying out of test distances
neato -Gdimen=3 <<EndInputDistances | grep '\bpos=".*",$'
graph G {
node [label="" xlabel="\N" shape=point]; //optional
A -- B [len=0.235775]
A -- C [len=0.652547]
A -- D [len=0.55973]
A -- E [len=0.818456]
A -- F [len=1.15465] | {
"domain": "datascience.stackexchange",
"id": 10974,
"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": "graphviz",
"url": null
} |
electromagnetism, electric-fields, electric-current, voltage, atmospheric-science
So, If I have understood it correctly, no current flows because no voltage is applied between head and feet of our body. There is a voltage between air and our head, but air is a good dielectric and so no current will flow. But there are many things I do not understand:
1.1) The Human Body is not a perfect electric conductor, therefore its surface will be equipotential only after a certain transient in which all the charges have been distributed on all the body. During this transient, we shoud have perceived the current across our body.
1.2) Apart from the question about the transient, I do not understand this general explanation. In fact, a conductor keeps equipotential at equilibrium, as we have just said. But this situation is different. I see it in this way: | {
"domain": "physics.stackexchange",
"id": 65779,
"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-fields, electric-current, voltage, atmospheric-science",
"url": null
} |
quantum-information, entropy, density-operator, correlation-functions
In the simplest case $\rho^{AB} = \rho^A \otimes \rho^B$ and the correlator factors out as above. Again $S(A:B) = 0$.
Next, if $\rho^{AB} \ne \rho^A \otimes \rho^B$ there is no direct deduction. As an extreme example consider the Bell state $(|\uparrow\uparrow\rangle + |\downarrow\downarrow\rangle)/\sqrt{2}$ and $\hat{A} = \sigma_z^A$, $\hat{B} = \sigma_z^B$. Then $\rho^A$ and $\rho^B$ are the completely mixed states and we find $1 = \langle\hat{A}\hat{B}\rangle \ne \expect{A}\expect{B} = 0$. Notice that here the mutual information reaches its maximal value $S(A:B) = S(A) + S(B)$ (generally $S(A:B) \le 2 \min(S(A),S(B))$, where $S(A)$ denotes the von Neumann entropy). | {
"domain": "physics.stackexchange",
"id": 75626,
"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, entropy, density-operator, correlation-functions",
"url": null
} |
meteorology, atmosphere, planetary-science
Title: How far up do you have to go before most of the atmosphere is below you? If I wanted to make an air shield around the earth to contain exactly half the planet's atmosphere (by mass), how far above sea level would I have to build it?
It's slightly complicated to me because you have to take into consideration the change in pressure as well as the geometric growth of the volume of a sphere as you increase the radius.
Thank you. Roughly 5.5 km, although the exact value depends on the weather. All you need to do is to solve the hydrostatic equation and find the height at which the pressure is 50% of the height at sea level (or perhaps average elevation of Earth surface instead of sea level). Any answer actually performing the calculation deserves upvotes more than I do ;-)
See, for example, Thickness of Earth's Atmosphere: | {
"domain": "earthscience.stackexchange",
"id": 1083,
"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": "meteorology, atmosphere, planetary-science",
"url": null
} |
are what we eat --- living under the discipline of a diet, Personal attributes of the true Christian, Love of God and love of virtue are closely united, Intellectual disparities among people and the power Consider the matrix multiplication below For the product to be a diagonal matrix, a f + b h = 0 ⇒ a f = -b h and c e + d g = 0 ⇒ c e = -d g Consider the following sets of values The the matrix product becomes: Thus, as can be seen we can obtain a diagonal matrix that is a product of non diagonal matrices. But you can do something similar. Scalar Matrix Multiplication. As an example, we solve the following problem. In addition, m >> n, and, is constant throughout the course of the algorithm, with only the elements of, I know there are tricks for a related problem (D*M*D) to reduce the number of operations considerably, but is there one for this problem? Suppose there exists an n×n matrix B such that AB = BA = In. iii. If A is an m x n matrix and B is as n x p matrix The matrix | {
"domain": "tenmg.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.980280873044828,
"lm_q1q2_score": 0.8534298487001636,
"lm_q2_score": 0.8705972667296309,
"openwebmath_perplexity": 693.4081402986793,
"openwebmath_score": 0.7437896132469177,
"tags": null,
"url": "http://tenmg.com/15jcey/8c2ca1-multiply-a-diagonal-matrix"
} |
python, algorithm, programming-challenge
Nope, running time is \$ O(\sqrt N) \$ worst-case. Consider the case of a prime number (or particularly bad cases, like the product of twin primes). You have to check \$ \sqrt N \$ possible values to find the answer. No way around that.
Code-wise, you have a bug, only minor/trivial comments otherwise. First the bug. The issue is here:
return factor
What is factor at the end? It's just the first number whose square is larger than whatever num has become. It's not necessarily a factor of the original value. It's just an index. As an example, max_factor(8) == 3, max_factor(9) == 4, etc. You need to keep track of which of the attempted factors actually are factors. Something like:
def max_factor(num):
"""Find the maximum prime factor."""
best = None
factor = 2
while factor * factor <= num:
while num % factor == 0:
best = factor
num /= factor
factor += 1
if (num > 1):
return num
return best | {
"domain": "codereview.stackexchange",
"id": 15746,
"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, algorithm, programming-challenge",
"url": null
} |
mechanical-engineering, mechanisms, springs, coil-spring, watch
Title: How is energy in the hairspring restored in a mechanical watch? I've read through the excellent guide to how mechanical watches work by Ciechanowski, but it leaves some questions unanswered.
The main spring of the watch, when it loses energy, can of course be re-wound using the watch's crown, and the guide above explains in detail how that happens.
But the hairsping of the watch, the one that drives the balance wheel, must lose energy at some point as well through friction, with the balance wheel oscillations dying down as a result. How is energy restored to that spring, i.e. how is it re-wound? | {
"domain": "engineering.stackexchange",
"id": 4712,
"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": "mechanical-engineering, mechanisms, springs, coil-spring, watch",
"url": null
} |
quantum-mechanics, hilbert-space, wavefunction, density-operator, bosons
References:
[1] Solovej, J. P. Many body quantum mechanics. Lecture Notes 2007.
[2] Lieb, E.H. and Seiringer, R. The Stability of Matter in Quantum Mechanics. Cambridge University Press 2010. Section 3.1.5.
[3] Mazziotti, D. A. Structure of fermionic density matrices: Complete N-representability conditions. Physical Review Letters 108.26 (2012): 263002.
[4] Garrod,C and Percus, J.K. Reduction of the N‐particle variational problem. Journal of Mathematical Physics 5.12 (1964): 1756-1776. See also Kummer, H. n‐Representability Problem for Reduced Density Matrices. Journal of Mathematical Physics 8.10 (1967): 2063-2081.
[5] Wei, Tzu-Chieh, Michele Mosca, and Ashwin Nayak. Interacting boson problems can be QMA hard. Physical review letters 104.4 (2010): 040501. arxiv.
[6] Coleman, A. J. (1963). Structure of fermion density matrices. Reviews of modern Physics, 35(3), 668. | {
"domain": "physics.stackexchange",
"id": 91942,
"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, hilbert-space, wavefunction, density-operator, bosons",
"url": null
} |
statistical-mechanics
\end{equation}
I have two questions, Firstly why integration over $E$ in the final step doesn't lead to,
\begin{equation}
\int Z_C(\beta)dE=\int Z_M(E)e^{-\beta E}dE
\end{equation}
Secondly, is there a general relationship between the Laplace transform of a function and the Legendre transform of the $\ln$ of that function or is this a property of physics rather than the mathematics?
There is also a related question here. General Mathematical Result
If you can evaluate the Laplace transform via saddle point method you will get a Legendre transform from a Laplace Transformation. This means the function your transforming should have a significant peak only at one point:
As you can see, the Laplace transformation doesn't necessarily get you a Legendre transformation in the exponential: | {
"domain": "physics.stackexchange",
"id": 24554,
"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": "statistical-mechanics",
"url": null
} |
exoplanet, white-dwarf, stellar-remnants
Another highlight given is that it is still to be explained how such a planet survives being so close to its star, but do we know the planet is beyond its Roche limit?
I am puzzled: what exactly makes this planet's finding so special/a first? Is it just de degree of certainty about one of the previous assertions? (First around a WD, first survivor.) Is it something else? Or was it just a case of recency bias that made the discovery more visible? I'll address the three sub-questions individually, as a way of fully answering the title question. | {
"domain": "astronomy.stackexchange",
"id": 4806,
"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": "exoplanet, white-dwarf, stellar-remnants",
"url": null
} |
typescript, angular-2+, rxjs
About the general question of implementing the spinner. If you always want a spinner, you could attach it in an interceptor, activating the spinner before the call is fired and deactivated as soon as you get a respond.
Or using a central method for backend calls and doing the the toggle there.
In both cases you would need a spinner service that needs to remember how often it was "activated", so that if 3 calls are triggered at once, the first response does not deactivate the trigger.
May ways are possible, it depends a bit on your use case and your general architecture.
But your specific example i would write in the following way:
export class MyComponent implements OnInit, OnDestroy {
private subscriptions: Subscription = new Subscription();
private filterLoading$:BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
ngOnInit(){
this.subscriptions.add(this.callAll().subscribe(() => this.toggleSpinner()));
} | {
"domain": "codereview.stackexchange",
"id": 40862,
"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": "typescript, angular-2+, rxjs",
"url": null
} |
telescope, angular-resolution, refractor-telescope
Title: Question about Telescopes , observations and explanations of the observations Though I am active on Physics, I am new to Astronomy. I am an amateur astronomer, actually even worse than amateur. I have just started it.
I have a 60 mm objective 700mm focal length refractor which I mainly use with a 20 mm eyepiece.
I have a couple of questions regarding the telescope, observations and explanations behind observations. Since they are all interlinked I decided to ask them together.
1) So, firstly the basics. Regarding the resolution power of a telescope, we know from the Rayleigh criterion that diffraction does happen at the objective. But Diffraction happens when light passes through a narrow slit or bends around a corner (whose dimensions are of the order of the wavelength of light). But there is no slit and probably no bending of light. How come then do we assume a diffraction pattern to have formed when considering the derivation of the resolution of a telescope? | {
"domain": "astronomy.stackexchange",
"id": 2194,
"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": "telescope, angular-resolution, refractor-telescope",
"url": null
} |
ros, ros-melodic, ubuntu
make[2]: *** Deleting file 'CMakeFiles/ccmslam_lib.dir/src/Frame.cpp.o'
make[1]: *** [CMakeFiles/ccmslam_lib.dir/all] Error 2
make: *** [all] Error 2
cd /home/laiba/ccmslam_ws/build/ccmslam; catkin build --get-env ccmslam | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed << ccmslam:make [ Exited with code 2 ]
Failed <<< ccmslam [ 1 minute and 9.4 seconds ]
[build] Summary: 1 of 2 packages succeeded.
[build] Ignored: None.
[build] Warnings: 1 packages succeeded with warnings.
[build] Abandoned: None.
[build] Failed: 1 packages failed.
[build] Runtime: 1 minute and 11.5 seconds total. | {
"domain": "robotics.stackexchange",
"id": 36597,
"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, ros-melodic, ubuntu",
"url": null
} |
I'll answer directly your question about the strong maximum principle and ellipticity. Relative to a coordinate system, one has $$\Delta f=g^{ij}\frac{\partial^2f}{\partial x^i\partial x^j}-\frac{1}{2}g^{ij}g^{k\ell}\Big(\frac{\partial g_{j\ell}}{\partial x^i}+\frac{\partial g_{i\ell}}{\partial x^j}-\frac{\partial g_{ij}}{\partial x^\ell}\Big)\frac{\partial f}{\partial x^k}.$$ Treating this as a function on a bounded open subset of Euclidean space, then, uniform ellipticity would mean that there are positive constants $$\lambda$$ and $$\Lambda$$ with $$\lambda I\leq[g^{ij}]\leq\Lambda I$$, as $$n\times n$$ matrices. This is not necessarily the case, imagine for instance polar coordinates on the sphere, so that $$g=d\theta^2+\sin^2\theta\,d\varphi^2$$ and so, in this case, the upper bound $$\Lambda$$ does not exist. One could also imagine examples where a positive lower bound $$\lambda$$ does not exist. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9783846628255124,
"lm_q1q2_score": 0.8153119991586496,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 150.07129213108,
"openwebmath_score": 0.9044111371040344,
"tags": null,
"url": "https://math.stackexchange.com/questions/3638437/why-is-there-no-harmonic-function-on-compact-riemannian-manifold"
} |
ros, ros2, tf2, clock, transform
Originally posted by Leonti on ROS Answers with karma: 62 on 2021-06-07
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 36500,
"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, ros2, tf2, clock, transform",
"url": null
} |
thermal-radiation, infrared-radiation, heat-conduction, climate-science, transport-phenomena
If we consider a case where there is a substantial water in the column the transmission is further reduce to about 80% for summer mid attitudes and or 60 precent for the tropics. | {
"domain": "physics.stackexchange",
"id": 89295,
"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": "thermal-radiation, infrared-radiation, heat-conduction, climate-science, transport-phenomena",
"url": null
} |
energy, electric-circuits, charge, capacitance
(b) What if I wanted to instead use $P=\frac{1}{2}\frac{Q^2}{C}$? What
happens with the charge in the $3$ cases?
Just plug in $\frac{Q}{C}$ for $V$ in each of the above equations.
Hope this helps. | {
"domain": "physics.stackexchange",
"id": 86458,
"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, electric-circuits, charge, capacitance",
"url": null
} |
1 elif n%2 == 0: return sum_odd(n-1) else: return n + sum_odd(n-2) Note that this function returns 1 if n is not greater 0 as is defined in the original function. You can refer to more than one array in a single SAS statement. Given input array be,. Note: Values of different types will be compared using the standard comparison rules. To display sub array with maximum sum you should write code to hold the start and end value of the sub array with maximum sum. My operation system is 64 bit. In this tutorial, I am going to discuss a very famous interview problem find maximum subarray sum (Kadane’s algorithm). The optimal strategy is to pick the elements form the array is, two. Pure VPN Privide Lowest Price VPN Just @$1. Find ways to calculate a target from elements of specified. The first user will be asked to enter the order of the matrix (such as the numbers of rows and columns) and then enter the elements of the two matrices. I am trying to compute the maximum possible sum of values | {
"domain": "lampedusasiamonoi.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97594644290792,
"lm_q1q2_score": 0.8963875270376713,
"lm_q2_score": 0.9184802440252811,
"openwebmath_perplexity": 681.2426012969111,
"openwebmath_score": 0.3012574017047882,
"tags": null,
"url": "http://lampedusasiamonoi.it/yvgr/max-sum-of-2-arrays.html"
} |
of calculus. Other words for integral include antiderivative and primitive. The process of computing an integral is called integration (a more archaic term for integration is quadrature ), and the approximate computation of an integral is termed numerical integration . The. In calculus, an antiderivative, inverse derivative, primitive function, primitive integral or indefinite integral of a function f is a differentiable function F whose derivative is equal to the original function f.This can be stated symbolically as. Integrals in Maths. You have learned until now the concept of integration. You will come across, two types of integrals in maths: Definite Integral; Indefinite Integral; Definite Integral. An integral that contains the upper and lower limits then it is a definite integral. On a real line, x is restricted to lie. | {
"domain": "staroutlet.shop",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9773708026035286,
"lm_q1q2_score": 0.8058050146987202,
"lm_q2_score": 0.8244619263765707,
"openwebmath_perplexity": 595.9332064337948,
"openwebmath_score": 0.9296665787696838,
"tags": null,
"url": "https://rttmvo.staroutlet.shop/en/integrals.html"
} |
quantum-field-theory, gauge-theory, path-integral, topological-field-theory, instantons
Title: What is "localisation" of instantons? I often encountered the term "localization" in the context of instantons, as for example in the work of Nekrasov on extensions of Seiberg-Witten theory to ${\cal N}=1$ gauge theories.
Could someone give a "intuitive" explanation of the concept of localization as well as a "simple" concrete realisation of it? Dear inovaovao, in general, localization is the fact that certain integrals over some variables $\mu$ may be proved to be equal to lower-dimensional integrals or even the sum over contributions from a discrete - e.g. finite - set of points in the $\mu$-space. | {
"domain": "physics.stackexchange",
"id": 492,
"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-field-theory, gauge-theory, path-integral, topological-field-theory, instantons",
"url": null
} |
ros, teleop-base, rosaria
Originally posted by Ocean on ROS Answers with karma: 66 on 2012-09-01
Post score: 0
It says teleop_base is not supported in Electric.
So, you should probably use something else, instead.
Originally posted by joq with karma: 25443 on 2012-09-03
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 10852,
"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, teleop-base, rosaria",
"url": null
} |
python, performance, game, pygame
if e.type==MOUSEMOTION:
mse=pygame.mouse.get_pos()
if key[K_LSHIFT] or key[K_RSHIFT]:
if pygame.mouse.get_pressed()==(1,0,0):
tilesatmouse=[t for t in tiles if t.rect.collidepoint(mse)]
if not tilesatmouse:
if sel==4:
money-=costlist[sel]
tiles.append(Tile((mse[0] & 0x7fffffe0,mse[1] & 0x7fffffe0),tilelist[sel],'res'))
else:
money-=costlist[sel]
tiles.append(Tile((mse[0] & 0x7fffffe0,mse[1] & 0x7fffffe0),tilelist[sel],'tile'))
elif pygame.mouse.get_pressed()==(0,0,1):
for t in tiles:
if t.rect.collidepoint(mse):
money-=5
tiles.remove(t) | {
"domain": "codereview.stackexchange",
"id": 5111,
"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, game, pygame",
"url": null
} |
statistical-mechanics, plasma-physics
where the crucial distinction with your definition is in the subscript $b$ of the bulk concentration $n_{b,j}$ being a defined quantity fixed in space. This quantity is also independent of time, as we are considering thermodynamic equilibrium where time does not alter ensemble averages. Thus the derivation from thermodynamics makes the Debye length a well-defined quantity. I dont see an explicit expression for the Debye length in arXiv paper, so it seems you overlooked the subscript on the Wiki page.
While the Debye length is strictly only defined in thermodynamic equilibrium, it seems to work surprisingly well in for near-equilibrium transport theory and beyond. However, tricky issues arise when your chosen reference (bulk) state changes with time. Usually this problem is circumvented by choosing your reference state deep into a homogeneous bulk reservoir. | {
"domain": "physics.stackexchange",
"id": 96282,
"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": "statistical-mechanics, plasma-physics",
"url": null
} |
electrostatics, charge, potential, potential-energy, self-energy
First, rewrite $dU$ for simplicity (assuming the second degree differentials are irrelevant ($dq^2$)),
$$dU = \frac{dq}{4\pi\epsilon_0}\,\left( 0 +
\frac{-q\,\frac{r_0}{r}}{(\frac{{r_0}^2}{r})} +
\frac{q}{r} \right)$$
$$dU = \frac{dq}{4\pi\epsilon_0}\,\left( -\frac{q}{r_0} +
\frac{q}{r} \right)$$
Since this is a monotonically decreasing function of $r$, we can say its maximum value in the specified region is when $r=r_0$.
This is a counter-intuitive result, since
$$\lim_{r\to\infty} dU = -\frac{dq}{4\pi\epsilon_0}\frac{q}{r_0}$$
and
$$\lim_{r\to r_0^+} dU = 0$$
Since these are the initial and maximum potentials of the trajectory, the work done needs to be
$$dW = \left(\lim_{r\to r_0^+} dU\right) - \left(\lim_{r\to\infty} dU\right) = \frac{dq}{4\pi\epsilon_0}\frac{q}{r_0}$$
But this does show us this: even though our calculations were different and not intuitive, the final result is the same. | {
"domain": "physics.stackexchange",
"id": 58428,
"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": "electrostatics, charge, potential, potential-energy, self-energy",
"url": null
} |
javascript, node.js, ecmascript-6, io, mongodb
MongoClient.connect(url, function (err, db) {
if (err) throw err;
var dbo = db.db("myDb");
dbo.collection("entity").insertMany(result, function (err, res) {
if (err) throw err;
db.close();
});
});
});
});
}); | {
"domain": "codereview.stackexchange",
"id": 40553,
"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, node.js, ecmascript-6, io, mongodb",
"url": null
} |
anatomy, scales
Title: How come large herbivores have such thin legs? Edit:
This question is very similar to this and related to this one (though the latter focuses on homology instead of scaling laws). However, the answer to this question is far more comprehensive, in particular it offers a plausible explanation why horse legs evolved as they did (vs human or even rhino legs).
Large grazing mammals such as horses, moose, and cows tend to have relatively thin legs despite being up to ~1000kg. For example, this rider's and her horse's legs appear to have about the same cross-sectional area both for below and above the "knee": | {
"domain": "biology.stackexchange",
"id": 7842,
"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": "anatomy, scales",
"url": null
} |
electromagnetism, special-relativity, inertial-frames, lorentz-symmetry
You and I haven't encountered large concentrations of charge. When you have a "charged" object, it's really just a very small net charge. The vast majority of electrons and positive ions present, cancel each other out.
If you take such an object, and wave it in a magnetic field, you certainly don't observe any Lorentz force, basically because the mass is so large in proportion to the net charge. The Lorentz force is something mainly studied in considering synchrotron radiation, or currents, or other effects where the charge-to-mass ratio is somewhat similar to that of a fundamental particle.
Additionally, when you consider magnets (as in ferromagnets) or electromagnets, a large proportion of the material present is engaged in magnetic activity. This makes the overall effect stronger. For electric fields, this situation is unsustainable, because a strongly charged object will simply create sparks to discharge. | {
"domain": "physics.stackexchange",
"id": 35370,
"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, special-relativity, inertial-frames, lorentz-symmetry",
"url": null
} |
structural-engineering, steel, geotechnical-engineering
How are such members spliced together? Unlike a single I-section, the inner flanges of the double I-section would not be accessible. There would also be problem connecting the webs due to the same accessibility issue.
From the pictures I found on the internet, it isn't clear how this can be done to achieve effective moment transfer. Bolts
Flanges can be added to the members as Wasabi mentioned in his answer. Another option would be to cut a small hole in the web of the members to allow for an iron worker to insert his hand to insert a bolt or hold a wrench. The reduction in strength from the access holes is minimal. This type of access is also used in the bolted connections of truss members. With this method, typical flat splice plates can be used.
Welds
Single sided complete joint penetration (CJP) welds are not a problem. They are done frequently. The joint will require a backer rod that will be left in place. | {
"domain": "engineering.stackexchange",
"id": 385,
"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": "structural-engineering, steel, geotechnical-engineering",
"url": null
} |
java, email, gui, javafx
//
laySENT = new VBox(21);
laySENT.setAlignment(Pos.CENTER);
laySENT.setStyle("-fx-background-color: linear-gradient(#ff2, #e5bb00), linear-gradient(#f53, #f86);"
+ "-fx-background-radius: 2, 29;");
//
// layLOG layout //
ObservableList<String> hostOps =
FXCollections.observableArrayList(
"smtp.gmail.com",
"smtp.mail.yahoo.com"
);
cmbHOST = new ComboBox<String>(hostOps);
cmbHOST.setValue(" ");
layLOG.add(cmbHOST, 1, 0);
//
lblHOST = new Label("SMTP Server: ");
layLOG.add(lblHOST, 0, 0);
lblUN = new Label("Username/email: ");
layLOG.add(lblUN, 0, 1);
lblPW = new Label("Password: ");
layLOG.add(lblPW, 0, 2);
//
tUN = new TextField();
tPW = new PasswordField();
layLOG.add(tUN, 1, 1);
layLOG.add(tPW, 1, 2); | {
"domain": "codereview.stackexchange",
"id": 17766,
"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, email, gui, javafx",
"url": null
} |
electromagnetism, optics, visible-light, electromagnetic-radiation, scattering
Title: Difference between the reflection and the scattering of light What is the difference between the reflection of light and the scattering of light? Neither of these words are particularly precise and are often used somewhat interchangeably, but "reflexion" almost always means an elastic interaction of light, i.e. one that does not change the frequency / photon energy, with other matter / quantum fields. "Scattering" can mean elastic (e.g. Fresnel, Rayleigh and Mie scattering) or inelastic (e.g. Raman scattering).
The word "reflexion" tends to stand for a particular kind of scattering where the scattered electromagnetic field can be accurately determined by the law of reflexion (equal incidence and reflexion angles) applied to each of the Fourier plane wave wave components of the field individually. In turn, this means that the field / each photon interacts with a region of matter that is many wavelengths wide. | {
"domain": "physics.stackexchange",
"id": 45859,
"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, optics, visible-light, electromagnetic-radiation, scattering",
"url": null
} |
observational-astronomy, black-hole, photography, meteor, interstellar
Title: Why black holes look black to us? Why black holes look black to us?
The question might sound weird but my head stuck in it. As we know objects that fall into the black holes seem to remain unchanged in its event horizon due to the nature that lights cannot escape from it. For example, in the below image (image with white astronaut) of the black hole we will see the astronaut remains in its event horizon.
Now, we also know that the black holes are constantly pulling all the interstellar objects & meteors around it, thus if these objects are grabbed by the black hole, we are supposed to see many of these objects remain unchanged on its event horizon surface hence the color of the black hole is not supposed to be black instead the distorted color by the objects (i.e. below image). But still we see its color a pure black in most of the representations and photos. | {
"domain": "astronomy.stackexchange",
"id": 4972,
"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": "observational-astronomy, black-hole, photography, meteor, interstellar",
"url": null
} |
star, stellar-evolution
Enhanced rotational mixing of the chemical elements inside a main sequence star can lead to chemically homogeneous evolution, in which there is no longer a core-envelope boundary since the helium has been mixed throughout the star. | {
"domain": "astronomy.stackexchange",
"id": 5506,
"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": "star, stellar-evolution",
"url": null
} |
quantum-mechanics, angular-momentum, quantum-spin, matrix-elements
it a mere convention or definition? Or am I missing something important here? Thank you in advance. I don't think there will yield any new physics if you use your order of eigenvectors to form Pauli matrices. The reason we are using the basis eigenvectors from $m_s=+s$ to $m_s=-s$(left-upper corner to right-lower corner) is by convention, I guess. | {
"domain": "physics.stackexchange",
"id": 8111,
"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, angular-momentum, quantum-spin, matrix-elements",
"url": null
} |
python, python-3.x, game, homework, dice
print("Total score for player 1 is", total_score1)
print("-------------------------------------------")
print("Total score for player 2 is", total_score2)
print("-------------------------------------------") | {
"domain": "codereview.stackexchange",
"id": 32688,
"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, game, homework, dice",
"url": null
} |
earthquakes, geomagnetism, electromagnetism
Magnetic Field of the earth is seriously degrading for the past centuries and we are currently in the process of the so called Polar Shift
Not necessarily. It seriously degraded many times before without associated geomagnetic reversals. | {
"domain": "earthscience.stackexchange",
"id": 1628,
"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": "earthquakes, geomagnetism, electromagnetism",
"url": null
} |
feature-extraction, databases
Title: What is the ideal database that allows fast cosine distance? I'm currently trying to store many feature vectors in a database so that, upon request, I can compare an incoming feature vector against many other (if not all) stored in the db. I would need to compute the Cosine Distance and only return, for example, the first 10 closest matches. Such vector will be of size ~1000 or so.
Every request will have a feature vector and will need to run a comparison against all feature vectors belonging to a subset within the db (which will most likely be in the order of thousands of entries per subset in the worst case scenario).
Which database offers the flexibility to run such a query efficiently ?
I looked into postgres but I was wondering if there were alternatives that better fit this problem. Not sure it matters much, but I'm most likely going to be using Python.
I found this article about doing it in SQL. | {
"domain": "datascience.stackexchange",
"id": 11752,
"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": "feature-extraction, databases",
"url": null
} |
∠BAH=∠CAO\angle BAH= \angle CAO∠BAH=∠CAO lesson must... Refresh your memory, an inscribed angle is an easy way to draw a circle what college you want attend... The word cyclic is from the above angle equalities both tangential quadrilaterals cyclic... Are chord-tangent quadrilateral and inscribed and circumscribed quadrilateral ABCD, angles a and C is the. Too Much Studying then prove that the sum of a quadrilateral has one pair of opposite sides x. Flavor and are solvable by elementary methods angle C = 180 ∠B ∠D... Have found a pair of opposite angles of a cyclic quadrilateral ACBDACBDACBD we... If HHH is its orthocenter, then it ’ s a cyclic quadrilateral properties quadrilateral is quadrilateral... And AF, AF, respectively produced to meet at x circumcircle or circumscribed circle, the. Of three consecutive angles in same segment are equal area of a quadrilateral... Of Olympiad flavor and are solvable by elementary methods the circumcircle, FFF... Are solvable by elementary methods | {
"domain": "wbrdc.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806540875628,
"lm_q1q2_score": 0.8192590013258874,
"lm_q2_score": 0.8354835452961425,
"openwebmath_perplexity": 2072.7705653590638,
"openwebmath_score": 0.5802627205848694,
"tags": null,
"url": "https://origin.wbrdc.com/subdural-intraspinal-zcqu/cyclic-quadrilateral-properties-003266"
} |
Howl Wampa Swarm; 8x 2-Dice Focus; Advanced Calculator; Durability; How To Modify. The probability of getting a Yahtzee in a single roll is easy to calculate. The calculator is an online statistics & probability tool featured to generate the complete work with step by step calculation for the any given valid input values. To change this behavior for an action, use the checkbox in the actionbox. What is the probability of getting a number less than 6? Ask yourself, "How many number are less than 6?" Since there are 5 numbers less than 6, the number of favorable outcomes is 5. So, just evaluate the odds, and play a game! In the text, you'll also find a short descriptions of each of the options. ) What was the experimental probability of rolling a number greater than 4? 7. Compare the shape of theoretical. These events are important both inside mathematics and outside it. The probability of two things both happening is the probability of the first TIMES the probability of the second. This | {
"domain": "solotango.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462222582661,
"lm_q1q2_score": 0.8167467980664752,
"lm_q2_score": 0.8267117983401363,
"openwebmath_perplexity": 423.0144392656807,
"openwebmath_score": 0.5905336737632751,
"tags": null,
"url": "http://vumm.solotango.it/dice-probability-calculator.html"
} |
datasets, data-science
Title: Parameters to calculate affluence in localities of Metro city I have to calculate the affluence in localities of Metro city. To calculate affluence, I am considering a parameter per capita income.
Where I can get a dataset of it? What are other parameters I should consider for the problem?
Any guidance will be fruitful for me. Affluence could encompass several parameters:
Income;
Wealth (property ownership);
Life expectancy;
Access to services such as education and health;
Access to clean natural resources;
Low levels of criminality.
Property prices in each locality might be easy to obtain from real estate agent sources
Ratings for schools or medical facilities in each area might be published | {
"domain": "ai.stackexchange",
"id": 967,
"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": "datasets, data-science",
"url": null
} |
gazebo, ros-indigo
Title: gazebo_ros_pkgs build error on saucy/indigo
I'm trying to build gazebo_ros_pkgs on saucy/indigo, and I'm getting the following build error: | {
"domain": "robotics.stackexchange",
"id": 17557,
"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": "gazebo, ros-indigo",
"url": null
} |
performance, csv, assembly
Anything info that could be used to make the function safer or more performant would be most useful; thanks for your review!
**Code:**
COMMENT @
C Interface:
extern char* ReadLine(const char* bufferOffset, const char* bufferTail, long long isQuotedSequence);
Reference:
https://www.rfc-editor.org/rfc/rfc4180
@
;-----------------------------; (CONSTANTS)
CARRIAGE_RETURN = 00000000Dh
DOUBLE_QUOTE = 000000022h
LINE_FEED = 00000000Ah
TRUE = 000000001h
;-----------------------------; (ARGUMENTS)
arg0 textequ <rcx>
arg1 textequ <rdx>
arg2 textequ <r8>
;-----------------------------; (LOCALS)
bufferOffset textequ <rax>
bufferTail textequ <r9>
currentCharacter textequ <ecx>
isQuotedSequence textequ <rdx>
nextCharacter textequ <r8d>
.code | {
"domain": "codereview.stackexchange",
"id": 35662,
"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": "performance, csv, assembly",
"url": null
} |
roslaunch, roscore
<!-- visualize robot model in 3D -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ros_robotics)/urdf.rviz" required="true" />
</launch>
Roy
Edit: @gvdhoorn
roy@RoysMacUbuntu:~/catkin_ws/src/ros_robotics/urdf$ printenv | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311//
ROS_HOSTNAME=localhostsource
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
Originally posted by roy on ROS Answers with karma: 33 on 2017-07-31
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 28496,
"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, roscore",
"url": null
} |
software
Title: Which Chemical Database Software Are Available? By chemical database software I mean software with similar functionalities to Instant JChem in that they have a large database of different compounds and have the basic capabilities you, or at least I expect from a chemistry software. Namely:
Can approximate the chemical and physical characteristics of the compounds in question.
Can approximate products of reactants and their corresponding proportions.
Can show the 2d and 3d structure of compounds in the database.
Can connect to online chemical databases like PubChem, ChemSpider, NCBI, etc.
Has a molecule editor.
I would also prefer it if it is free of charge. A widely used database in academia and industry is ChemACX.The only one of your requirements that I don't believe it does is the product prediction.
http://www.cambridgesoft.com/Ensemble_for_Chemistry/ChemACX/Default.aspx | {
"domain": "chemistry.stackexchange",
"id": 2656,
"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": "software",
"url": null
} |
molecules
This is also the same for other non metals such as nitrogen gas : $\ce{N2}$ and also chlorine gas ($\ce{Cl2}$) and fluorine gas ($\ce{F2}$)
Now, the oxygen atom in a water molecule is bonded to not another oxygen molecule, but to two hydrogen atoms.($\ce{H2O}$) The oxygen atom has a partial negative charge of -2 and both hydrogen atoms have a positive partial charge of +1. This has as a result that all atoms once again have stable electron configurations : oxygen once again has a stable electron configuration, equal to Neon.
$\ce{O2}$ is the pure element, water is a molecule. But they both achieve stable electron configurations. Just with different atoms. | {
"domain": "chemistry.stackexchange",
"id": 965,
"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": "molecules",
"url": null
} |
image-processing, equalization, histogram, enhancement
Title: main idea of Adaptive histogram equalization (AHE) I want to understand the main idea behind AHE and the way for applying it manually with my hands.
Wikipedia says:
In its simplest form, each pixel is transformed based on the histogram of a square surrounding the pixel, as in the figure below. The derivation of the transformation functions from the histograms is exactly the same as for ordinary histogram equalization: The transformation function is proportional to the cumulative distribution function (CDF) of pixel values in the neighbourhood.
Does above mean for computing AHE we divide the matrix into distinct squares and do HE on each square separately?
Adaptive Histogram Equalization and Its Variations says: | {
"domain": "dsp.stackexchange",
"id": 11656,
"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": "image-processing, equalization, histogram, enhancement",
"url": null
} |
c#, object-oriented
var result = int.Parse(Console.ReadLine());
if (result < BLACK || result > ESPRESSO)
{
return GetCoffeKind();
}
return result;
}
private static int GetCupSize()
{
Console.WriteLine($"{SMALL}: {nameof(SMALL)}");
Console.WriteLine($"{MEDIUM}: Medium");
Console.WriteLine($"{LARGE}: Large");
Console.WriteLine($"{EXTRA_LARGE}: Extra Large");
var result = int.Parse(Console.ReadLine());
if (result < SMALL || result > EXTRA_LARGE)
{
return GetCupSize();
}
return result;
} | {
"domain": "codereview.stackexchange",
"id": 18280,
"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#, object-oriented",
"url": null
} |
electrostatics, gauss-law, dielectric
$$\text{flux of }\vec{D} \text{ through }\partial V = q_{nett}\tag{2}$$
This is the famous Gauss law. So, if you if you have a handful of electrons or other charged particles in your pocket and put them into a volume where there was formerly no nett charge, the flux of $\vec{D}$ through the volume's boundary will be equal to this charge regardless what mediums or other stuff there happens to be in that volume. | {
"domain": "physics.stackexchange",
"id": 13267,
"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": "electrostatics, gauss-law, dielectric",
"url": null
} |
neural-network, keras
2) In theory yes, many random initializations would be the same if your data was extremely well behaved and your network ideal. But in practice initializations seek to ensure the gradient starts off reasonable and the signal can be backpropagated correctly. Likely in this case any of those initializations would perform similarly, but the best approach is to try them out, switching if you get undesirable results. | {
"domain": "datascience.stackexchange",
"id": 581,
"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": "neural-network, keras",
"url": null
} |
ros-melodic
Note: approximately, as the actual implementation is a bit more complicated (uses separate ros::CallbackQueues fi).
From this it should be clear waitForMessage(..) essentially does the same thing as any code which subscribes to a topic.
And it also has the exact same limitations and requirements as any other code subscribing to a topic.
As to your observations:
I publish with the following non-latching publish
#!/usr/bin/env python
import rospy
import std_msgs
if __name__ == "__main__":
rospy.init_node('publisher')
pub = rospy.Publisher('/topic', std_msgs.msg.Int32, queue_size=1, latch=False)
pub.publish(0)
rospy.spin()
rostopic echo /topic shows that the message is published correctly. However, the listener program is still stuck at waitForMessage even though the listener program was started before the publishing node. Why is that the case? | {
"domain": "robotics.stackexchange",
"id": 35918,
"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",
"url": null
} |
stereochemistry, isomers
Are my approach and my answers right? The approach is right, and your answers are right, but there are a couple of things to look at in your explanation.
First, the presence of a chiral centre does not in itself make a compound chiral.
It is in this case, but a molecule is chiral if, and only if, it is not superimposable on its mirror image. You could have a molecule with more than one chiral centre, which was superimposable on its mirror image, and was therefore not chiral.
Second, a chiral molecule is not necessarily optically active. Its specific rotation may be zero (or at least unmeasurable), in which case it is said to exhibit cryptochirality. | {
"domain": "chemistry.stackexchange",
"id": 12561,
"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": "stereochemistry, isomers",
"url": null
} |
inorganic-chemistry, transition-metals
Title: Colour in vanadyl sulfate What is the reason that vanadyl sulfate shows blue colour, even in its anhydrous form? If it's d-d transition, can you explain how it works in this compound? Vanadyl sulfate or $\ce{VOSO4}$ has $\ce{VO^2+}$ ion. It exists as a blue hydrated crystalline salt, known as acid vanadyl sulfate, $\ce{VOSO4 \cdot H2SO4 \cdot xH2O}$. If you're to heat it at $\pu{533 K}$ with concentrated sulfuric acid, you obtain anhydrous vanadyl sulfate, which is rather a greyish-green crystalline powder.¹
The ion $\ce{VO^2+}$ is more accurately written as a complex $\ce{[VO2(H2O)4]+}$.² Inductive effects of ligands and different symmetries of orbitals causes the d-orbitals to split up and thus they become non-degenerate. | {
"domain": "chemistry.stackexchange",
"id": 8090,
"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": "inorganic-chemistry, transition-metals",
"url": null
} |
Round 1: $r$ to $b$, $1000$ to right, $1000$ left in deck, $n = -1 + 2k$,
Round 2: $r$ to $b$, $500$ to right, $500$ left in deck, $n = -2 + 4k$,
Round 3: $r$ to $b$, $250$ to right, $250$ left in deck, $n = -4 + 8k$,
Round 4: $r$ to $b$, $125$ to right, $125$ left in deck, $n = -8 + 16k$.
Let us treat the remaining deck of $125$ cards as a totally independent deck, note that the positions of card in this deck are $n = 16k$. Also note that the first action of a new round is never the same action as the last action of the previous round because actions alternate. Also note that for every new round, the spacing between cards moved doubles, and that the cards remaining in the beginning of a new round have position $n = a + c/2 + ck$ for the values $a, c$ of the previous round. Also note that if there are an odd number of cards in an initial deck, the first and last actions are the same. Then,
Round 5: $r$ to $r$, $63$ to right, $62$ left in deck, $n = -1 + 2k$, | {
"domain": "artofproblemsolving.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682444653241,
"lm_q1q2_score": 0.8036560951457483,
"lm_q2_score": 0.8128673087708698,
"openwebmath_perplexity": 274.0702891161731,
"openwebmath_score": 0.5258122086524963,
"tags": null,
"url": "https://artofproblemsolving.com/wiki/index.php?title=2000_AIME_I_Problems/Problem_15&diff=cur&oldid=113114"
} |
permutations
One can still ask why we might expect this algorithm to work, and where is the gap between our intuition and reality.
After the $i$'th step of the algorithm, $A[i]$ is a uniformly random element. So if we randomize $A[0]$, then $A[1]$, then $A[2]$, and so on until $A[n-1]$, won't we get a random permutation?
While it is true that $A[n-1]$ will be completely random, this is not the case for other entries. Indeed, let us try to analyze the distribution of $A[0]$ as the algorithm progresses.
After the first iteration, $A[0]$ is uniformly random.
After the second iteration, $A[1]$ is uniformly random, but this comes at a cost: we might have swapped $A[0]$ and $A[1]$. This means that $A[0]$ will have a slight preference towards $1$ (the original value of $A[1]$) and $0$ (the value of $A[1]$ in case it was swapped with $A[0]$).
Quantitatively, after the second iteration, if $i > 1$ then
$$ \Pr[A[0] = i] = \frac{1}{n} \cdot \left(1 - \frac{1}{n}\right) = \frac{1}{n} - \frac{1}{n^2}, $$ | {
"domain": "cs.stackexchange",
"id": 17093,
"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": "permutations",
"url": null
} |
c++, performance, matrix, template, c++17
namespace jslmath
{
template<size_t Dimension,typename NumberType = double>
class Vector
{
public:
using Value = NumberType;
using Storage = std::array<NumberType, Dimension>;
private:
Storage mField;
public:
Vector(const Vector&) = default;
Vector(Vector&&) = default;
virtual ~Vector() = default;
template<typename ...Targs>
Vector(Targs... args): mField({args...}){}
Vector(const Storage& args) : mField(args){}
Vector& operator=(const Vector&) = default;
Vector& operator=(Vector&&) = default;
Value operator[](size_t index)const
{
return at(index);
}
Value at(size_t index)const
{
if (index <= Dimension && index != 0)
return mField[index - 1];
throw;//need improvment
} | {
"domain": "codereview.stackexchange",
"id": 26182,
"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, matrix, template, c++17",
"url": null
} |
java, game, swing
//adding to start panel
startPan.add(setupGameBut, BorderLayout.SOUTH);
startPan.add(headingLab, BorderLayout.NORTH);
startPan.add(startInfoPan, BorderLayout.CENTER);
//adding to setup panel
setupPan.add(cancelBut, BorderLayout.SOUTH);
setupPan.add(headingLab, BorderLayout.NORTH);
setupPan.add(setupInfoPan, BorderLayout.CENTER);
//adding to game panel
gamePan.add(endGameBut, BorderLayout.SOUTH);
gamePan.add(headingLab, BorderLayout.NORTH);
gamePan.add(gameInfoPan, BorderLayout.CENTER);
gamePan.add(scorePan, BorderLayout.EAST);
//setting up container panel and adding each screen to it
contPan = new JPanel();
contPan.setLayout(cl);
contPan.add(startPan, "Start Applet Screen");
contPan.add(setupPan, "Setup Game Screen");
contPan.add(gamePan, "New Game Screen");
//action listeners
setupGameBut.addActionListener((ActionEvent e) -> {
newGame();
}); | {
"domain": "codereview.stackexchange",
"id": 12200,
"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, game, swing",
"url": null
} |
java, android, serialization, gson
private ArrayDeque<T> load() throws IOException, JSONException {
ArrayDeque<T> transactions = null;
BufferedReader reader = null;
try {
//Open and read the file into a string builder
InputStream in = mContext.openFileInput(mType);
reader = new BufferedReader(new InputStreamReader(in));
StringBuilder jsonString = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
//Line breaks are omitted and irrelevant
jsonString.append(line);
}
java.lang.reflect.Type type;
switch (mType) {
case Storage.BUSINESS:
type = new TypeToken<ArrayDeque<Business>>() {
}.getType();
break;
case Storage.TRANSACTION: | {
"domain": "codereview.stackexchange",
"id": 23802,
"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, android, serialization, gson",
"url": null
} |
general-relativity, string-theory, black-holes, quantum-gravity
The physics of string world sheet, with its emission vertex operators which correspond to all the spectrum of the theory, is only sensibly interpreted as a holographic reconstruction on the world-sheet of the surrounding space-time theory. The connections between world-sheet physics and space-time physics was one of the seeds that led to AdS/CFT, and there is no longer any confusion regarding the classical notion corresponding to the world sheet--- it is an extended charged black hole.
The correspondence is more general, so that the D0 branes of IIA theory used to construct the matrix version of M-theory are point black holes, while the D3 branes are described by 4d gauge theory, and most recently, that the M2 branes by a strange 3 dimensional Chern Simons theory. | {
"domain": "physics.stackexchange",
"id": 2206,
"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, string-theory, black-holes, quantum-gravity",
"url": null
} |
newtonian-gravity, earth, estimation, geophysics
As you can see from eqn (221), relaxation is exponential (of course).
Also, as can be seen from eqn (219), the characteristic time of relaxation is $(1+A_2) \tau_M$ where $\tau_M$ is the Maxwell time (equal to the mean viscosity of the mantle divided by the mean rigidity).
Had we been playing with a sample of viscoelastic magma, the characteristic time would be simply $\tau_M$. An extra factor $1 + A_2$ shows up because we are dealing not with a small sample, but with a self-gravitating object. For planets of about the Earth size, $A_2 \approx 2.2$
(see Table 1 in https://arxiv.org/abs/1105.3936 )
So, in the end of the day, the characteristic time is only a bit longer than the Maxwell time.
Studies of post-glacial rebound indicate that the Maxwell time for the Earth is between several hundred years and several thousand years (probably, some 200 to 500 yr for the upper mantle). | {
"domain": "physics.stackexchange",
"id": 41495,
"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": "newtonian-gravity, earth, estimation, geophysics",
"url": null
} |
c++, recursion, lambda, boost, c++20
BOOST_AUTO_TEST_CASE_TEMPLATE(vector_lambda_with_auto_10dimension, TestType, test_types)
{
constexpr size_t dim_num = 10;
auto test_object = n_dim_vector_generator<dim_num, TestType>(static_cast<TestType>(2), 3);
auto test_result = recursive_transform(std::execution::par, test_object, [](auto& element) { return element * 2; });
auto expected_result = n_dim_vector_generator<dim_num, TestType>(static_cast<TestType>(2) * 2, 3);
// Content comparison
if (test_result == expected_result)
{
BOOST_TEST(true);
}
else
{
BOOST_TEST(false);
}
}
BOOST_AUTO_TEST_CASE_TEMPLATE(vector_lambda_with_auto_11dimension, TestType, test_types)
{
constexpr size_t dim_num = 11;
auto test_object = n_dim_vector_generator<dim_num, TestType>(static_cast<TestType>(2), 3);
auto test_result = recursive_transform(std::execution::par, test_object, [](auto& element) { return element * 2; }); | {
"domain": "codereview.stackexchange",
"id": 40259,
"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++, recursion, lambda, boost, c++20",
"url": null
} |
algorithms, complexity-theory, algorithm-analysis, loops
Title: Explanation of the complexity of a loop I am confused on the following:
In the following trivial code:
for (int i = 0; i < n; i++) {
for(int j = i + 1; j < n; j++) {
for(int k = j + 1; k < n; k++) {
//some code here
}
}
} | {
"domain": "cs.stackexchange",
"id": 2989,
"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": "algorithms, complexity-theory, algorithm-analysis, loops",
"url": null
} |
conservation-laws, information, determinism
So let’s come back to Alice. What does she see? Suppose she knows the complete quantum state $|\psi\rangle$ (we’ll assume for simplicity that it’s pure) of all the infalling matter. Then, after collapse to a black hole and Hawking evaporation, what’s come out is thermal radiation in a mixed state $\rho$. This is a problem. We’d like to think of the laws of physics as just applying one huge unitary transformation to the quantum state of the world. But there’s no unitary U that can be applied to a pure state $|\psi\rangle$ to get a mixed state $\rho$. Hawking proposed that black holes were simply a case where unitarity broke down, and pure states evolved into mixed states. That is, he again thought that black holes were exceptions to the laws that hold everywhere else. | {
"domain": "physics.stackexchange",
"id": 59183,
"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": "conservation-laws, information, determinism",
"url": null
} |
and IQR. The standard deviation has the same units as X. Standard deviation is the most important tool for dispersion measurement in a distribution. A) The standard deviation of numbers in Set A is larger. Another is the arithmetic mean or average, usually referred to simply as the mean. It may assume the worth of zero. … Standard Deviation Worksheet with Answers Pdf as Well as Statistics Worksheet Sum Two Dice Probabilities A Statistics. We calculate the mean of these data: 6628 3 5 5 x ++++ ==. It shows how far are the values from the mean on average in the same scale as the measure (meters, number of seeds, weight…) How do we compute a variance? �a4 0��h;�jL!�j�@���h7M�TmC���4�au��C���=Bn�&�Z�A���A� �/Dn�D�Z'm�h�6'���N۪'"V�. Set A 1, 1, 1, 8, 15, 15, 15 Set B 4, 11, 11, 11, 20, 20, 20 √4.8 = 2.19. salary(in$) frequency; 3500: 5: 4000: 8: 4200: 5: 4300: 2: a) Calculate the mean of the salaries of the 20 people. When the examples are spread apart and the bell curve is relatively | {
"domain": "precisiondentalca.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9441768541530197,
"lm_q1q2_score": 0.8043941129001821,
"lm_q2_score": 0.8519527982093666,
"openwebmath_perplexity": 754.1135260272056,
"openwebmath_score": 0.7052971124649048,
"tags": null,
"url": "https://precisiondentalca.com/m75xz/d5772d-standard-deviation-pdf"
} |
I intend the first double summation to be for when $$i=j$$ and the second for when $$i\neq j$$...
$$= \frac{1}{n-1}\sum_{i=1}^{n}\sum_{j=1}^{n}\left ( Y_i-\overline{Y} \right ) \left ( Y_j-\overline{Y} \right )+\frac{1}{n-1}\sum_{i=1}^{n}\sum_{j=1}^{n}\left ( Y_i-\overline{Y} \right ) \left ( Y_j-\overline{Y} \right )$$
$$= \frac{1}{n-1}\sum_{i=1}^{n}\left ( Y_i-\overline{Y} \right )^2 +\frac{1}{n-1}\sum_{i=1}^{n}\sum_{j=1}^{n}\left ( Y_i-\overline{Y} \right ) \left ( Y_j-\overline{Y} \right )$$
Would anyone know how to finish the question off from here or any mistakes I've made thus far?
The question is exercise 1.4 from this textbook.
Thank you. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407152622597,
"lm_q1q2_score": 0.8067570048886756,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 829.3749740238325,
"openwebmath_score": 0.998529851436615,
"tags": null,
"url": "https://stats.stackexchange.com/questions/291164/distribution-of-independent-random-variables-textbook-question"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.