text stringlengths 1 1.11k | source dict |
|---|---|
newtonian-mechanics, forces, explosions
Title: Determining the force of an explosion, is it external or internal? A time bomb put inside a box is left into the vacuum: it explodes...the box coverings starts moving
I want to ask: is the force behind sudden acceleration internal or external
I am confused about when to call the force internal or external based on Newton's first law of motion. It says a body maintains the state of rest or motion until acted upon by an external force. My guess is its external force,otherwise it would violate Newton's law but it looks internal The answer is it depends on how you want to look at it. You first need to define the object whose motion you want to follow. Once that's done you can decide what is an internal or external force. | {
"domain": "physics.stackexchange",
"id": 16189,
"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-mechanics, forces, explosions",
"url": null
} |
python, python-3.x, django
- Portal information
- Create network assets and log IP information in CMDB.
-> {len(vms)} x IP address in VLAN {validated_data['environment'].vlan}
""")
for i, vm in enumerate(vms):
num = i + 1
if len(vms) == 1:
title = f"1 x OVM type {vm['level']}"
else:
title = f"Virtual server {num}"
description += dedent(f"""\
- Create {title}
-> VLAN: {vm['vlan']}
-> Primary Location: {vm['location']}
-> vCPU = {vm['number_of_cpu']}
-> vMEm = {vm['ram_gb']}
-> vStorage = {vm['storage_capacity']}
-> Attached = {vm['attached_to_server']}
""") | {
"domain": "codereview.stackexchange",
"id": 31882,
"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, django",
"url": null
} |
c#, beginner, game, unity3d
// Update is called once per frame
void Update () {
warningText.GetComponent<CanvasRenderer> ().SetAlpha (warningAlpha);
mouseClickedTimeCheck = false;
if (oScript.maxClicks != 10) {
if (isRight == true && mouseClicked == true) {
transform.position += Vector3.right * flyingSpeed * Time.deltaTime;
} else if (isRight == false && mouseClicked) {
transform.position += Vector3.left * flyingSpeed * Time.deltaTime;
} | {
"domain": "codereview.stackexchange",
"id": 19897,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, game, unity3d",
"url": null
} |
quantum-chemistry, computational-chemistry
Mulliken charges are a common form of finding charges from a population analysis, but these are known to very basis set dependent. A better scheme, I think, is the CHELPG scheme which fits the molecular electrostatic potential of a system and hence conserves the dipole moment when it assigns charges to atoms. This is a very nice property for a population analysis. Nonetheless, it will be sensitive to method and basis set depending on how much the electrostatic potential changes upon changing either of these.
I think that generally the AIM charges and charges from population analyses will not be too different, but one notable exception is given in ref. [4] on page 162 where it is noted that the AIM charge on boron in $\ce{(H3BNH3)2}$ is positive, $q(\Omega_{\ce{B}})=2.15$, while the Mulliken population analysis gives a negative charge of $-0.26$. So that's a very stark difference. I guess I would trust AIM, but I don't really know. | {
"domain": "chemistry.stackexchange",
"id": 8714,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-chemistry, computational-chemistry",
"url": null
} |
meteorology
You might be noticing that on cloudy days, when clouds are low, there is little wind and no solar heating. Air pollution has no place to go, so it sticks around.
Another aspect is that vehicles emit more emissions under cold-start conditions. This is because vehicles get cold overnight and take a while to get up to normal temperature when they startup in the morning. The cold vehicle will have a low combustion efficiency and catalytic converters won't work as well. | {
"domain": "earthscience.stackexchange",
"id": 2014,
"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",
"url": null
} |
# How Do We Find Points On A Circle Equidistant from each other?
I'm a programmer and I saw this question on stackoverflow which exactly does my job: https://stackoverflow.com/questions/13608186/trying-to-plot-coordinates-around-the-edge-of-a-circle.
In this, the answer says that:
var items = 10; // say there are 10 points to be plotted.
var x0 = 40;
var y0 = 40;
// Remember top left pixel of computer screen is (0,0) and both axis go positive from left to right and top to bottom.
for(var i = 0; i < items; i++) {
var x = x0 + r * Math.cos(2 * Math.PI * i / items); // WHAT IS HAPPENING HERE?
var y = y0 + r * Math.sin(2 * Math.PI * i / items); // WHAT IS HAPPENING HERE?
}
I'm just undone about the code above. How is that happening. Why are we adding the x0 and y0 (coordinates of center of circle). How does it gives us exact points exactly equidistant from each other? Please explain how this math is working.
For e.g., the above code gives us like this: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138196557982,
"lm_q1q2_score": 0.8230645768183372,
"lm_q2_score": 0.8418256551882382,
"openwebmath_perplexity": 485.64014555129745,
"openwebmath_score": 0.42873188853263855,
"tags": null,
"url": "https://math.stackexchange.com/questions/1030655/how-do-we-find-points-on-a-circle-equidistant-from-each-other"
} |
and matrix diagonalization exist a diagonal matrix with the concept of diagonalization,! Example illustrates extremely useful in most scientific fields of a, and D is a matrix! Main diagonal are zero in which all entries are real numbers a be a square matrix a diagonal matrix also. Can Raise matrix diagonalization calculator matrix, determine whether is diagonalizable has a one-dimensional null space spanned by vector. Where D is a diagonal matrix whose diagonal elements are the eigenvalues of matrix! Every step proposition An orthonormal matrix P has the property that Pâ1 =.... Matrix, but we will use it An matrix is a diagonal matrix last 30 days ) Pranav on! Are not diagonalizable are found for a given, we can say that given... Website, you agree to our Cookie Policy to nd the nth power a. Eigenvalue problem up: algebra Previous: Unitary transform eigenvalues and matrix diagonalization is useful in most fields. Using this website, you agree to our Cookie Policy that Pâ1 = PT | {
"domain": "ind.br",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9637799441350253,
"lm_q1q2_score": 0.819185170360266,
"lm_q2_score": 0.8499711737573762,
"openwebmath_perplexity": 519.1243891651261,
"openwebmath_score": 0.8492629528045654,
"tags": null,
"url": "http://domax.ind.br/pe0yllip/matrix-diagonalization-calculator-3bfdb2"
} |
c#, console
public static class Styler
{
public static void SetStyle(BootstrapType bootstrapType, BootstrapStyle bootstrapStyle)
{
switch (bootstrapType)
{
case BootstrapType.Success:
if (bootstrapStyle == BootstrapStyle.Alert)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.BackgroundColor = ConsoleColor.DarkGreen;
}
else
{
Console.ForegroundColor = ConsoleColor.Green;
}
break;
case BootstrapType.Info:
if (bootstrapStyle == BootstrapStyle.Alert)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.BackgroundColor = ConsoleColor.DarkCyan;
}
else
{ | {
"domain": "codereview.stackexchange",
"id": 10209,
"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#, console",
"url": null
} |
c++
int main(){
srand(time(NULL));
Rsort r;
Rboard t;
r.isDonut(t);
r.autoFirst();
return 0;
} Look at your compiler's warnings
When I try to compile your code, the compiler gives two warnings: Rect::setPiece() doesn't have a return statement, and Rboard::getIndex() is missing a return statement after the loop.
The first warning can be fixed by simply changing the return type of Rect::setPiece() to void. The second warning might be harmless; the assumption is that Rboard::getIndex() will always be called with values for l and w that match one of the rectangles. But what if it doesn't? Then the for loop will end, and a bogus value will be returned. If this is never supposed to happen, just throw an exception there: the compiler warning will go away, and if your code ever does the wrong things, you will hopefully get a helpful error message.
Try to write more C++ | {
"domain": "codereview.stackexchange",
"id": 32419,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
quantum-field-theory, particle-physics, mathematical-physics, grand-unification
The vanishing electric charge of the photon is a red herring here. It just reflects the fact that the EM group is abelian, and so its gauge transformation does not allow nonlinear couplings in the covariant derivatives thereof, by dint of the vanishing structure constant. Trying to elevate the vanishing X here to such an abelian principle is not appropriate. You already see that the 12 SU(5) charges corresponding to the $\mathbb{X}$ and $\mathbb{Y}$s are ferociously non-commuting, and don't even close to a subalgebra, I hope you may check. | {
"domain": "physics.stackexchange",
"id": 68687,
"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, particle-physics, mathematical-physics, grand-unification",
"url": null
} |
Probably there is a closed formula for the $E_r$. At any rate, doing the recursion manually gives $$E_6={1223\over324}\doteq 3.77\ .$$
-
The expected number of rolls until the first $k$-repetition with an $n$-sided die is given by the integral $$\mathbb{E}(T) = \int_0^\infty \left(\sum_{j=0}^{k-1} {1\over j!}\left({x\over n}\right)^j\right)^n \,e^{-x}\,dx.$$
In my answers to the questions below I explain why.
How many expected people needed until 3 share a birthday?
Variance of time to find first duplicate
-
I'd forgotten about that pretty result - don't even recall where I first saw it. +1 – rasher Dec 16 '14 at 23:42 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987178788751029,
"lm_q1q2_score": 0.807092189898441,
"lm_q2_score": 0.8175744850834648,
"openwebmath_perplexity": 420.84086524400584,
"openwebmath_score": 0.9118355512619019,
"tags": null,
"url": "http://math.stackexchange.com/questions/542200/expected-number-of-tosses-before-you-see-a-repeat"
} |
Let's start with the definitions:
The $0$-th homotopy "group" $\pi_0(X,b_0)$ ($b_0$ is the base point) is just the set of equivalence classes (under base-point fixing homotopies) of base-point respecting continuous functions from $S^0 = (\{-1,1\},-1)$ to $(X, b_0)$.
(In this case all functions are continuous on the discrete set $S^0$ regardless of $X$ and so such maps $f$ are just determined by the value $f(1) \in X$, as $f(-1) = b_0$).
The maps $f$ with $f(1) = x$ and $g$ with $g(1)= y$ are homotopic iff there is a continuous path $p: [0,1] \to X$ from $x$ to $y$. (Easy exercise in definitions)
So $f$ is equivalent to $g$ iff $f(1)$ and $g(1)$ lie in the same path-component. So $\pi(X,b_0)$ is just the set of path-components of $X$, essentially. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241956308278,
"lm_q1q2_score": 0.8098544095509348,
"lm_q2_score": 0.8354835391516133,
"openwebmath_perplexity": 191.298879053455,
"openwebmath_score": 0.8284321427345276,
"tags": null,
"url": "https://math.stackexchange.com/questions/2498069/zeroth-homotopy-intuition"
} |
c#, beginner, parsing
{
if (item.Values != null)
{
switch (item.Name)
{
//PDB DATA
case "DocArea": pdbdoc.DocArea = LotusUtils.LotusUtils.LotusItemToString(item.Values); break;
case "DocDisc": pdbdoc.DocDisc = LotusUtils.LotusUtils.LotusItemToString(item.Values); break;
case "DocObject": pdbdoc.DocObject = LotusUtils.LotusUtils.LotusItemToString(item.Values); break;
case "DocOrigin": pdbdoc.DocOrigin = LotusUtils.LotusUtils.LotusItemToString(item.Values); break;
case "DocRef": pdbdoc.DocRef = LotusUtils.LotusUtils.LotusItemToString(item.Values); break;
case "DocRefClient": pdbdoc.DocRefClient = LotusUtils.LotusUtils.LotusItemToString(item.Values); break; | {
"domain": "codereview.stackexchange",
"id": 27881,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, parsing",
"url": null
} |
The given equation
\begin{align*} \begin{bmatrix} -1 & 4 \\ 6 & 1 \end{bmatrix} &= \alpha \begin{bmatrix} 1 & 2 \\ 4 & 1 \end{bmatrix} + \beta \begin{bmatrix} 2 & 1 \\ 3 & 1 \end{bmatrix} = \begin{bmatrix} \alpha + 2\beta & 2\alpha + \beta \\ 4\alpha + 3\beta & \alpha + \beta \end{bmatrix} \end{align*}
gives a system of four equations in two variables
\begin{align*} \alpha + 2\beta &= -1\\ 2\alpha + \beta &= 4\\ 4\alpha + 3\beta &= 6\\ \alpha + \beta &= 1\text{.} \end{align*}
Solving this linear system by row-reducing the augmented matrix shows that $$\alpha = 3\text{,}$$ $$\beta = -2$$ is the only solution.
#### Exercise Group. | {
"domain": "runestone.academy",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419690807407,
"lm_q1q2_score": 0.8014355644746147,
"lm_q2_score": 0.810478913248044,
"openwebmath_perplexity": 281.1879529503222,
"openwebmath_score": 0.9999170303344727,
"tags": null,
"url": "https://runestone.academy/ns/books/published/fcla/section-MO.html"
} |
deep-learning, visualization
It takes a very skilled patent attorney or agent to draft a specification and claims to avoid the abstractness black hole. You mention attorneys as not understanding your technical field. All USPTO registered practitioners (and those in other locations) need to have at least an undergraduate scientific or engineering background, unlike generic attorneys. I have met several PhD patent attorneys. You can find a practitioner who is expert in your field who has successfully prosecuted other's patents.
Your initial costs to answer your question will be a patentablity search and opinion on the abstractness issue. While it is not required that you proactively do a literature/patentablity search to "prove" your idea is novel, a search will save you money if it turns out not to be and can sharpen the focus of your claims to avoid prior work. The initial burden is on the patent examiner to show that it is not novel - then you refute. | {
"domain": "datascience.stackexchange",
"id": 6900,
"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": "deep-learning, visualization",
"url": null
} |
c++, beginner, queue
~queue() requires(std::is_destructible<value_type>::value) {
clear();
m_Alloc.deallocate(m_RawData, m_Capacity);
std::exchange(m_RawData, nullptr);
std::exchange(m_Size, 0);
}
};
}
``` Despite the many criticisms in my review, I think this is an OUTSTANDING effort.
Design review
Iterators are part of range interfaces
The first issue that strikes me about your design is that you have separated the iterator from the container. That’s nonsense. Iterators can’t exist independently from a container. There is no such thing as a “general-purpose random-access iterator”.
Iterators are a part of a range. We talk about them as independent “things”, but they are not. In fact, you can’t even create an iterator without a range to create it from. By attempting to separate the iterator from the range, you’ve actually created numerous problems. It is possible (even dangerously easy) to create broken rnd_iterators (rnd_iterators that don’t actually reference a legitimate range). | {
"domain": "codereview.stackexchange",
"id": 40871,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, queue",
"url": null
} |
javascript, node.js, error-handling, repository
if (!command) return;
if (!keywords.includes(command)) {
client.say(channel, `Unknown command ${command}`);
return;
}
const {error, result} = await commandMap[command](user, text);
if (error) {
client.say(channel, `Something went wrong: ${error}`);
} else {
client.say(channel, result);
}
Here we first, create a mapping commandMap of all the keywords pointing to their respective command handler function. We also extract all the keywords to an array keywords using Object.keys. In the main Twitch handler, the message is parsed to split the keyword from the arguments. If the command is in the keyword list, we call it, receive our results object (see below), and answer to the Twitch chat. This has the advantage that you can add commands without touching the main message handler: just create the command handler function and add it to commandMap. | {
"domain": "codereview.stackexchange",
"id": 44253,
"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, error-handling, repository",
"url": null
} |
quantum-mechanics, quantum-information, group-theory, lie-algebra, density-operator
Title: Degrees of freedom of a $d$ level system and the dimension of its Bloch manifold A qubit is described by two independent degrees of freedom that parametrize the Bloch sphere.
Question:
For a level $d$ level system, i.e., a qu$d$it, what are the corresponding degrees of freedom? And what is the dimension of its Bloch manifold? | {
"domain": "physics.stackexchange",
"id": 86853,
"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, quantum-information, group-theory, lie-algebra, density-operator",
"url": null
} |
quantum-mechanics, harmonic-oscillator
Title: Thermal wave function of the harmonic oscillator - proving that it's a gaussian? I'm a bit stumped trying to prove this. I've computed the probability density for a thermal density matrix for the quantum harmonic oscillator, namely
$$
\rho(x) = \frac{\sum_n^\infty e^{-\frac{\hbar\omega}{2kT}(2n+1)}\frac{1}{2^nn!}\left(\frac{m\omega}{\pi\hbar}\right)^{1/2}e^{-\frac{m\omega}{\hbar}x^2}H_n^2\left(\sqrt{\frac{m\omega}{\hbar}}x\right)}{\sum_n^\infty e^{-\frac{\hbar\omega}{2kT}(2n+1)}}
$$ | {
"domain": "physics.stackexchange",
"id": 50029,
"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, harmonic-oscillator",
"url": null
} |
terminology, programming-languages, data-flow-analysis
Title: Difference between "data dependence graph", "data dependency graph", and "data flow graph" Is there a difference between a "data dependence graph" and a "data dependency graph"? I have seen both terms - sometimes used interchangeably sometimes not.
To make things even more complicated, a "data dependency graph" is sometimes also called a "data flow graph" (see e.g. here).
The term "data dependence graph" is, for example, used on the second slide here.
If there is a difference, could someone give an example of each graph type? | {
"domain": "cs.stackexchange",
"id": 5054,
"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": "terminology, programming-languages, data-flow-analysis",
"url": null
} |
java, event-handling
There is nothing in here that suggests it is thread-safe. This may well be by design, but for a general-purpose system it will need to be, especially if you are advertising it as being a 'library' implementation.
It is 'traditional' for getListeners() type methods to return an array\[\] rather than a List. I prefer the array[] because I like primitives, but, additionally, it is 'clearer' that you cannot add and remove items from the array.... Your code returns a list, but it is a modifyable List (even when empty). I believe I would prefer your code as (note how there's now only one lookup in the bindings map now as well):
...
private static final EventHandler[] EMPTYHANDLERS = {}; | {
"domain": "codereview.stackexchange",
"id": 5130,
"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, event-handling",
"url": null
} |
tensor-calculus
As a consequence an inner product can always be reduced as $$A^{mn} B_{mn} = A^{(mn)}B_{(mn)} + A^{[mn]} B_{[mn]}.$$In the case of the orientation tensor, however, it is totally antisymmetric, having thus $$\varepsilon_{abc} = \varepsilon_{[ab]c} = \varepsilon_{a[bc]} = \varepsilon_{[a|b|c]},$$ using the pipe character $|$ to "interrupt" antisymmetry brackets. As a result when we try the same trick with $\varepsilon^{abc} D_b A_c$ we find directly $$
\begin{align}
\varepsilon^{abc} D_b A_c &= \varepsilon^{a(bc)} D_{(b}A_{c)} + \varepsilon^{a[bc]} D_{[b} A_{c]}\\
&= 0 + \varepsilon^{abc} D_{[b} A_{c]}\\
&= \varepsilon^{abc} \left(\frac12 D_b A_c - \frac12 D_c A_b\right),
\end{align}
$$
which was to be proven. | {
"domain": "physics.stackexchange",
"id": 57474,
"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": "tensor-calculus",
"url": null
} |
The function has an inverse function only if the function is one-to-one. Let's use this characteristic to identify inverse functions by their graphs. A function and its inverse function can be plotted on a graph. They are also termed as arcus functions, antitrigonometric functions or cyclometric functions. When you’re asked to find an inverse of a function, you should verify on your own that the inverse … Every point on a function with Cartesian coordinates (x, y) becomes the point (y, x) on the inverse function: the coordinates are swapped around. Graph of function g, question 1. The inverse trigonometric functions actually performs the opposite operation of the trigonometric functions such as sine, cosine, tangent, cosecant, secant, and cotangent. At times, your textbook or teacher may ask you to verify that two given functions are actually inverses of each other. Are the blue and red graphs inverse functions? is it always the case? Q. This relationship will be observed for all | {
"domain": "apartmanisokobanja.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226354423304,
"lm_q1q2_score": 0.8589462932796026,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 433.61432681108704,
"openwebmath_score": 0.5981078743934631,
"tags": null,
"url": "https://apartmanisokobanja.net/cubic-centimeter-jvmor/5e7e83-using-graph-to-demonstrate-a-function-which-is-invertible-function"
} |
c#, excel
if (File.Exists(dbFilePath))
{
Workbook newBook = new Workbook();
newBook.LoadFromFile(dbFilePath);
Worksheet newSheet = newBook.Worksheets[0];
//find the last filled rows of both the worksheets | {
"domain": "codereview.stackexchange",
"id": 41300,
"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#, excel",
"url": null
} |
## 3 Answers
So you have an integral $\int_\beta f(z)\, dz$ where $\beta$ represents two line segments. First, let's parameterize each one:
$C_1$ goes from $-i$, which means the point is $(0,-1)$, to $2+5i$, which means the point is $(2,5)$, so:
\begin{align} C_1(t) &= (0,1) + t[(2, 5)-(0,-1)] \\ C_1(t) &= (2t, 6t-1). \end{align}
$C_2$ goes from $2+5i$, which means the point is $(2,-5)$, to $5i$, which means the point is $(0,5)$, so:
\begin{align} C_2(t) &= (2,5) + t[(0, 5)-(2,5)] \\ C_2(t) &= (2-2t, 5). \end{align}
Perfect, you have parametrized $\beta$, now the question is: how do you include this in the integral? You have this function $f(z) = x+iy$ and you have to convert it to $z$ notation, such as this:
\begin{align} f(z) &= x^2 +iy \\ f(z) &= x -x + x^2 + iy \\ f(z) &= x + iy -x + x^2 \\ f(z) &= z - \dfrac{z + \bar z}{2} + \left(\dfrac{z + \bar z}{2} \right)^2. \end{align}
And now the integral is: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.979667648438234,
"lm_q1q2_score": 0.8099028013246975,
"lm_q2_score": 0.8267117962054049,
"openwebmath_perplexity": 665.4445020402555,
"openwebmath_score": 1.0000088214874268,
"tags": null,
"url": "https://math.stackexchange.com/questions/2403512/evaluate-the-following-complex-integrals-using-parameterisation-int-limits"
} |
Classroom for many more practice ideas! Series. We Are Open - As a critical supply-chain partner for the aerospace, defense, power generation, food and medical industries deemed as an. Describe the transformations necessary to transform the graph of f(x) (solid line) into that of g(x) (dashed line). This is the polar opposite strategy of the previous conservative economy, and it requires players to re-roll early. Name the values of where the petals begin and end. Free Polar Graph Paper from http://incompetech. Amino acids differ from each other with respect to their side chains, which are referred to as R groups. Click the image for explanation and reproducible code. • RSG cheat sheet • Download report February (1) • Single angle polar graphs January (1) • Astigmatism sign 2016 (12) December (2) • Select file type • Improved performance November (1) • Importing excel files from the dutch ophthalmic society NOG October (1) • Safety and efficacy index September (2) • Corneal SIA by | {
"domain": "cfalivorno.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.960361158630024,
"lm_q1q2_score": 0.804417680424806,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 2808.763423207611,
"openwebmath_score": 0.4857088625431061,
"tags": null,
"url": "http://sqnk.cfalivorno.it/polar-graphs-cheat-sheet.html"
} |
6. ## Re: if ab=ca, how to get b=c???
Originally Posted by SlipEternal
Since the OP is dealing with groups, every element has an inverse. Hence, 0 is not an element of any multiplicative group, and there is no need to ensure $$a \neq 0$$. Hartlw is correct that the condition deals with commutativity. But, it is not necessary that the entire group be commutative. Instead, it is only necessary that $$a \in Z(G)$$ where $$Z(G) = \{z \in G \mid \forall g\in G, zg = gz\}$$ is the center of the group.
redone for new LaTex
7. ## Re: if ab=ca, how to get b=c???
Originally Posted by Hartlw
Given ab=ca
if b=c, ba=ca=ab
The condition for b=c is that G be commutative
ab=ca is given. If it's true for one a, and b=c, G has to be commutative.
There are no zero's because every element has an inverse is part of definiton of group. But thanks for noting that anyhow.
8. ## Re: if ab=ca, how to get b=c??? | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561676667173,
"lm_q1q2_score": 0.8273186355455598,
"lm_q2_score": 0.8539127510928476,
"openwebmath_perplexity": 1163.1281341271133,
"openwebmath_score": 0.8703364133834839,
"tags": null,
"url": "http://mathhelpforum.com/advanced-algebra/226126-if-ab-ca-how-get-b-c.html"
} |
jupiter, photography, galileo-probe
Title: What are the last images from the Galileo orbiter before impacting Jupiter? NASA's Galileo orbiter at Jupiter ended its mission in 2003 by intentionally dive into the gas planet. Did it take and transmit any close up images before it ceased to function? If not, why? Are there any images from Galileo, or its separate impactor probe, which show the Jovian clouds from close enough range that their topology is discernible? | {
"domain": "astronomy.stackexchange",
"id": 620,
"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": "jupiter, photography, galileo-probe",
"url": null
} |
navigation, move-base, costmap-2d
Then also remove all of your "ultrasonic_layer:" definition to prevent confusion (Unless you are using that plugin elsewhere). You only need to define a layer/plugin once.
Also the RangeSensorLayer has no 'marking' or 'clearing' parameters (unlike ObstacleLayer) so you don't need those lines.
Let us know if this fixes your problem.
Originally posted by biglotusturtle with karma: 165 on 2017-09-20
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 25488,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, move-base, costmap-2d",
"url": null
} |
formal-languages, regular-languages
Title: Is the language $L=\{a^nb^m:n,m\in\mathbb{N}\land n-m=5 \}$ regular or not regular? I'm trying to understand how to prove a language is regular or not regular, for example this language: $$L=\{a^nb^m:n,m\in\mathbb{N}\land n-m=5 \}$$
Is this language regular or not?
My solution
Using the pumping lemma, I can choose a string with a pumping length $p$ like: $w=a^{5+p}b^p$, then $x = a^j, y=a^l$ and $z=a^kb^p$ such that $j+l+k=5+p$, I will pump with $i=0$, so the string will be $xz=a^{j+k}b^p$, this is not regular because $j+k<p$.
Am I correct about this? Thanks for your help ! If $L$ is regular, then so is $L\{b\}^5$. You can conclude by studying $L\{b\}^5$ (which is a very classic language).
Also in your proof, you cannot guarantee that $j+k < p$, but $j+k < 5 + p$ is enough. | {
"domain": "cs.stackexchange",
"id": 19281,
"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": "formal-languages, regular-languages",
"url": null
} |
python, python-3.x, web-scraping, selenium, scrapy
Title: Parsing a slow-loading webpage with scrapy in combination with selenium I've written a scraper in Python scrapy in combination with selenium to scrape 1000 company names and their revenue from a website. The site has got lazy-loading method enabled so it is not possible to make the site load all the items unless the scraper is able to scroll that page downmost. However, my scraper can reach the lowest portion of this webpage and parse the aforesaid category flawlessly. I've set explicit wait in my scraper instead of any hardcoded delay so that it doesn't take longer than necessary.
As this is my first time to work with selenium along with scrapy, there might be scopes to do betterment of this script to make it more robust.
import scrapy
from selenium import webdriver
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC | {
"domain": "codereview.stackexchange",
"id": 27566,
"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, web-scraping, selenium, scrapy",
"url": null
} |
pcl, ros-indigo
//usr/lib/libpq.so.5: undefined reference to `ENGINE_init@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_set_fd@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_connect@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `ERR_reason_error_string@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_CTX_ctrl@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_pending@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_use_PrivateKey@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `ENGINE_finish@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_library_init@OPENSSL_1.0.0'
//usr/lib/libpq.so.5: undefined reference to `SSL_shutdown@OPENSSL_1.0.0' | {
"domain": "robotics.stackexchange",
"id": 21986,
"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": "pcl, ros-indigo",
"url": null
} |
• Yes, this is a more general type of induction/recursion than the elementary one on natural numbers, it is sometimes called structural induction. It is a very useful tool in more advanced problems. If the elementary type can be visualized as moving up a chain or a ladder, structural induction moves up a tree that can branch. In this case, you have choices which operations to apply to produce new elementary functions from old ones, so the steps can not be indexed by natural numbers like a sequence. Feb 20 at 9:09
• Yes, this would correspond to collecting all branch points of the tree that are at the same height into a single set, but I find it more intuitive to think in terms of the tree directly. And the base set needs to also include trig functions and their inverses unless you are working over complex numbers. Feb 20 at 9:34 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795079712153,
"lm_q1q2_score": 0.8349278447966555,
"lm_q2_score": 0.8459424314825853,
"openwebmath_perplexity": 191.39170113516323,
"openwebmath_score": 0.8868352770805359,
"tags": null,
"url": "https://math.stackexchange.com/questions/4032754/proof-of-the-derivative-of-an-elementary-function-is-also-elementary"
} |
classical-mechanics
the other car hits you and starts compressing your car's crumple zone.
the collision force exceeds your braking force and your car starts accelerating. Your car's crumple zone is still being compressed.
the crumple zone is fully compressed so both cars are now moving at the same speed and your brakes are slowing both cars. | {
"domain": "physics.stackexchange",
"id": 5270,
"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": "classical-mechanics",
"url": null
} |
• Thanks for your great patience to me, a high school student. – Kou Feb 2 '12 at 20:47 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97241471777321,
"lm_q1q2_score": 0.8186036511158172,
"lm_q2_score": 0.8418256492357358,
"openwebmath_perplexity": 139.48389600205516,
"openwebmath_score": 0.8842489719390869,
"tags": null,
"url": "https://math.stackexchange.com/questions/104846/the-differences-between-mathbbr-mathbbz-and-mathbbr"
} |
performance, strings, vba, reinventing-the-wheel
End Function
I've added a test set of data to use and the results I get. It can be found at this pastebin link
Important note: I've run the rubber duck on this version and updated the code! Also, thanks for reviewing a very long code post! Boolean
This can be simplified, if you check a boolean, you don't need to check its value
Private Sub ExcelOptimization(ByVal turnState As Boolean)
If turnState = False Then
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Else
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
End If
End Sub
So either start with
If Not turnState then
or swap it
If turnState then | {
"domain": "codereview.stackexchange",
"id": 23940,
"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, strings, vba, reinventing-the-wheel",
"url": null
} |
classification, nlp, named-entity-recognition
Title: Is each form of word classification also considered to be '(named) entity recognition'? In an article that I am writing, I focus on word classification. A typical task that involves word classification is (named) entity recognition. Entity recognition is a rather broad task and seems to cover other sub-tasks as well.
Therefore, it seems fair to me to use the terms interchangeably.
Is this a fair assumption?
Is this a fair assumption?
No: Named Entity Recognition (NER) is a specific task which consists in detecting named entities. The more general term for this kind of task in Machine Learning is sequence labelling, because it's not only about classifying words but annotating a sequence of instances in which order matters (e.g. words).
It's true that NER is certainly the most famous task of this kind, but there are other important ones, for instance Part-Of-Speech (POS) tagging. | {
"domain": "datascience.stackexchange",
"id": 8363,
"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": "classification, nlp, named-entity-recognition",
"url": null
} |
everyday-life, pressure
Title: Why is the required tire pressure inversely proportional to the volume/size of the tire? I once noticed a tire pressure table on a farm recommended a tire pressure of around 1.0 bar (I don't remember the exact number, but it was definitely below 1.9) for the rear tire of farm tractors.
The recommended pressure on a car is around 2.2-2.5 bar.
My bike tire recommends 3.5 bar.
Why do smaller (slimmer? less voluminous?) tires require more pressure? The main considerations are grip and rolling efficiency.
A tyre dissipates energy as it flexes, and any energy dissipated in the tyre means extra effort from the rider or motor and therefore fewer miles per gallon. The more you pump up the tyre the harder it becomes and the less it flexes, so higher pressures are more fuel efficient.
However harder tyres also grip less well, so as you increase the pressure you reduce the grip e.g. in cornering and braking. | {
"domain": "physics.stackexchange",
"id": 85108,
"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": "everyday-life, pressure",
"url": null
} |
### Show Tags
11 Jul 2018, 00:35
Hi there, thank you for the explanation.
Can you also explain how you figured out that 3003*10! is a unique number or how can I tell that a number is unique (especially like this big one)?
Bunuel amanvermagmat
amanvermagmat wrote:
financestudent wrote:
How do you make sure that it has only one solution without solving it, did we just assume it?
It may have 10 different roots. (let's say x-y-2 is a) C(a, 10) = ((a).(a-1).(a-2)....(a-9))/10!=3003
Hello
You are right that we can simplify this as: ((a).(a-1).(a-2)....(a-9))/10!=3003
We can say that ((a).(a-1).(a-2)....(a-9)) = 3003*10! | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9412234441519332,
"lm_q1q2_score": 0.8243112547252708,
"lm_q2_score": 0.8757869981319862,
"openwebmath_perplexity": 3206.310807046011,
"openwebmath_score": 0.7131536602973938,
"tags": null,
"url": "https://gmatclub.com/forum/sammy-has-flavors-of-candies-with-which-to-make-goody-bags-137413.html"
} |
java, beginner, calculator
System.out.println("Now Enter your Cylinder Height");
double cylinH = scan.nextDouble(); //User inputs Cylinder Height
double cylinVol = Math.PI * (cylinR * cylinR) * cylinH; //Get Volume
double cylinA = 2 * Math.PI * (cylinR * cylinR); //Part 1 of Cylinder Area calculation
double cylinB = 2 * Math.PI * cylinR * cylinH; //Part 2 of Cylinder Area calculation
double cylinSurf = cylinA + cylinB; //add both parts together to get Area answer
System.out.println("Your Volume is : " + cylinVol + " and your Surface Area is : " + cylinSurf);
break;
case 9:
// Decision 9 Sphere
System.out.println("You selected Sphere");
System.out.println("Enter your Radius");
double sphereR = scan.nextDouble();
double sphereVol = (4.0 / 3.0) * Math.PI * (sphereR * sphereR * sphereR); //get volume
double sphereSurf = 4 * Math.PI * (sphereR * sphereR); //get Area | {
"domain": "codereview.stackexchange",
"id": 14560,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner, calculator",
"url": null
} |
php, security
To sum it up: If you want maximum securty in all situations, keep fingerprinting and hashing, but since your protected string is easily guessable, keep your token private this time. Theoretically even if your token is compromised 'SECRET-SALT' will still provide protection, but only as long as your code is safe. If your filesystem is hacked or the sources for the website your are building are public you cannot rely on 'SECRET-SALT' alone. Do not depend on hiding it, 'security by obscurity' is a bad practice. | {
"domain": "codereview.stackexchange",
"id": 625,
"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": "php, security",
"url": null
} |
@QiaochuYuan Thank you. "One cannot invent useful things, one can only rediscover them." ;-) – asmaier May 20 '12 at 13:00
I should add on @Terry's comment that the bridge mentioned has an inscription about this realization. One can still see this in Dublin (if one is not too hazy from drinking). – Asaf Karagila May 22 '12 at 22:15 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471637570106,
"lm_q1q2_score": 0.8420267289679056,
"lm_q2_score": 0.8558511524823263,
"openwebmath_perplexity": 355.0352996698016,
"openwebmath_score": 0.8283603191375732,
"tags": null,
"url": "http://math.stackexchange.com/questions/147166/does-my-definition-of-double-complex-noncommutative-numbers-make-any-sense/147170"
} |
slam, navigation, calibration, ros-melodic, camera-calibration
Originally posted by gvdhoorn with karma: 86574 on 2021-07-05
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Ifx13 on 2021-07-06:
I've tried this. The thing is that the overlap is practically zero and when they say that the input is "non-globally shared overlapping fields of view" they mean that there is no need for every camera at the rig to have overlapping FoV but there is still the need to have overlap at in between the pairs of the cameras. Also, this package can work with different targets, one of the supported targets is the aprilgrid, this target does not require to be "seen" completely by both cameras, it says that it can be partially viewed but at least one marker of the grid must be seen at both cameras. With my current camera configuration, this is not possible. Not a single marker is shared between images, they're cut in half. Please correct me if misunderstood something. | {
"domain": "robotics.stackexchange",
"id": 36640,
"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": "slam, navigation, calibration, ros-melodic, camera-calibration",
"url": null
} |
javascript, search
Title: Indexing and searching an list of rectangles to see if they contain a point I have a flat list of rectangles, in the following format (id, x co-ord, y co-ord, height and width):
[ { id: 4206, x: 360, y: 700, width: 60, height: 50 } ,
{ id: 6621, x: 1260, y: 1100, width: 60, height: 50 } ]
I want to index this by range of X values, and then use that indexed object to speed up a search for a point inside.
My full code is here:
// arbitrary setup, no need to review
const grid = [];
const height = 50;
const width = 60;
let index = 0;
for (let row = 0; row < 300; row++) {
for (let col = 0; col < 300; col++) {
grid[index] = {
id: index,
x: width * col,
y: height * row,
width,
height
};
index++;
}
}
// try and find these points
const points = [{
x: 400,
y: 700
}, {
x: 1300,
y: 1105
}]
// body - please review approach, style less important | {
"domain": "codereview.stackexchange",
"id": 40868,
"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, search",
"url": null
} |
java, cryptography
//Convert the clear text passed by the user into bytes
try {
this.clearText = clearText.getBytes("UTF-16");
}
catch(UnsupportedEncodingException ex) {
Logger.getLogger(Encrypt.class.getName()).log(Level.SEVERE, null, ex);
}
}
/**
* Generates a random IV to be used in the encryption process
* @return The IV's byte representation
*/
private byte[] generateIv() {
SecureRandom random = new SecureRandom();
byte[] ivBytes = new byte[16];
random.nextBytes(ivBytes);
return ivBytes;
}
/**
* Generates a secret key to be used in the encryption process
* @return The secret key
*/
private SecretKey generateKey() {
KeyGenerator keygen;
try { | {
"domain": "codereview.stackexchange",
"id": 5222,
"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, cryptography",
"url": null
} |
functional-programming, permutations
I decided to write a function that generates permutations of a list
(permutations [1 2 3])
=> [[1 2 3] [2 1 3] [3 1 2] [1 3 2] [2 3 1] [3 2 1]]
And after some quick searching, somewhat arbitrarily picked Heap's Algorithm.
The problem is, I'm writing in Clojure, trying to adhere to proper FP principals as close as possible, and the entire algorithm seems to hinge on mutating a "global" array while recursing. I worked on this for a couple of hours, and could not find a way of sanely getting the results passed "back up the stack", since the recursive calls just kind of float between mutations:
(defn- swap-v [v i1 i2]
(let [x (get v i1)]
(-> v
(assoc i1 (get v i2))
(assoc i2 x))))
(defn permutate [coll]
(let [coll-atom (atom coll)
result-atom (atom [coll])]
((fn rec [n]
(when (> n 1)
(let [n-even? (zero? (rem n 2))
swap-pos #(if n-even? % 0)] | {
"domain": "cs.stackexchange",
"id": 11535,
"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": "functional-programming, permutations",
"url": null
} |
beginner, ruby, game, meta-programming
def start cli
p_info("Type help for help.")
loop {
cli.spawn_zombie
while cli.zombie.is_alive
input = prompt(">").split
command = input[0]
if cli.commands.include? command
cli.send(command, *input[1..-1])
else
p_warn("Unknown Command.") unless command.nil?
end
end # zombie has died if loop ends
} # end game loop
end
if __FILE__ == $0
main
end | {
"domain": "codereview.stackexchange",
"id": 7028,
"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": "beginner, ruby, game, meta-programming",
"url": null
} |
c++, multithreading
About the bool not being atomic, you wrote "This should be an atomic. Why? Because it is both read and set without any mutexes guarding it". But how? The boolean is only set when all the threads are sleeping, or am i missing something? | {
"domain": "codereview.stackexchange",
"id": 38159,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, multithreading",
"url": null
} |
swift
Title: Swift Memory Cycle From Closure I am working with closures and want to confirm that I do not have any memory leaks in my code. Below is my current code:
// in ImageGalleryController.swift
class ImageGalleryCollectionViewController: UICollectionViewController {
var images = [Image]()
func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) {
// assignment of closure
var cellImage = Image() { [weak self](image) in
self?.images.append(image)
self?.collectionView.reloadData()
}
// asynchronous
session.loadObjects(ofClass: NSURL.self) { urls in
if let url = urls.first as? URL {
cellImage.url = url
}
}
// asynchronous
session.loadObjects(ofClass: UIImage.self) { images in
if let image = images.first as? UIImage {
cellImage.aspectRatio = Double(image.size.height / image.size.width)
}
}
}
} | {
"domain": "codereview.stackexchange",
"id": 34055,
"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": "swift",
"url": null
} |
fft, python, scipy, numpy
plt.subplot(122)
plt.title('IFFT using Numpy')
plt.plot(t, np.fft.ifft(X)[0:num_samples], 'r')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.tight_layout()
plt.show()
# FFT and IFFT using Scipy
sp = fft(signal, num_samples*3)
freq = fftfreq(t.shape[-1]*3)
plt.figure(figsize = (12, 6))
plt.subplot(121)
plt.title('FFT using Scipy')
plt.stem(freq, np.abs(sp), 'b', markerfmt=" ", basefmt="-b")
plt.xlabel('Freq (Hz)')
plt.ylabel('FFT Amplitude |sp(freq)|')
plt.subplot(122)
plt.title('IFFT using Scipy')
plt.plot(t, ifft(sp)[0:num_samples], 'r')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.tight_layout()
plt.show() | {
"domain": "dsp.stackexchange",
"id": 10748,
"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": "fft, python, scipy, numpy",
"url": null
} |
ros
SUMMARY
========
PARAMETERS
* /rosversion
* /mjpeg_server/port
* /rosdistro
NODES
/
webserver (roswww/webserver.py)
mjpeg_server (mjpeg_server/mjpeg_server)
wviz_tf_manager (wviz_tf_manager/wviz_tf_manager)
tf_lister (tf_lister/tf_lister.py)
rosbridge (rosbridge_server/rosbridge.py)
rosapi (rosapi/rosapi.py)
ROS_MASTER_URI=http://localhost:11311 | {
"domain": "robotics.stackexchange",
"id": 10945,
"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",
"url": null
} |
python, statistics
$P(id_{i}|id_{j}) = \frac{count(id_{i}, id_{j})}{count(id_{j})}$
and the maximum likelihood estimate for the joint probability is:
$P(id_{i}, id_{j}) = \frac{count(id_{i}, id_{j})}{\sum{k \in IDs}{}
\ count(id_{k})}$
Where $id_j, id_i \in IDs\ $ and $IDs$ is the set containing all $id$s (AAAA,BBB,CCCC,...),
You can then calculate the pointwise mutual information between each $id$ pair, that is, how ofter two $id$s co-occur, compared with what we would expect if they were independent:
$I(id_i, id_j) = \log_{2}{\frac{P(id_i, id_j)}{P(id_i)P(id_j)}}$
Given you a estimation of how strong is the association between $id_i$ and $id_j$.
The same strategy may be used to find similarities, you may think about each $id_i$ being a $|IDs|$-dimensional vector with the co-occurrences frequencies being the values. You can then apply cosine-similarity or pearson-correlation to find the most similar vectors ($id$s). | {
"domain": "datascience.stackexchange",
"id": 2044,
"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, statistics",
"url": null
} |
electrostatics, symmetry
...For example, an electric field due to a wire is said to exhibit cylindrical symmetry, because the electric field strength at a given distance r from the electrically charged wire of infinite length will have the same magnitude at each point on the surface of a cylinder (whose axis is the wire) with radius r. Rotating the wire about its own axis does not change its position or charge density, hence it will preserve the field. The field strength at a rotated position is the same. Suppose some configuration of charges (may be non-stationary) produce an electric field in some direction, then rotating the configuration of the charges (without disturbing the internal dynamics that produces the particular field) will lead to a net rotation of the direction of the electric field. These two properties are interconnected through the more general property that rotating any system of charges causes a corresponding rotation of the electric field. | {
"domain": "physics.stackexchange",
"id": 22861,
"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, symmetry",
"url": null
} |
classification, machine-learning-model, loss-function
In other words: The base of the logarithm doesn't matter because everything ends up being proportional. | {
"domain": "datascience.stackexchange",
"id": 5765,
"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": "classification, machine-learning-model, loss-function",
"url": null
} |
and edge level equation is established to synthesize 2-DOF rotation.. Four vertices and three edges of edges of PGTs are new results that have not been reported Next question Image! Their degree sequences can not show that two projections of the Petersen graph are.! Sequences can not show that two projections of the two isomorphic graphs, one is a tweaked of... Isomorphic to its own complement are synthesized if the no 9-link 2-DOF PGTs are developed graph at the documentation 've... The options to return a count on the number of vertices and three edges idea!, both graphs are isomorphic all Cayley graphs of any given order not as much said! 3. iv a ) Draw all non-isomorphic graphs of degree 7 were generated of vertices is ≤8 PGTs very. 8- and 9-link 2-DOF PGTs with up to nine links is automatically generated extensive application in various kinds of equipment. Agree to the construction of all the non-isomorphic graphs having 2 edges and 2 vertices ; that is Draw. Found that there is a | {
"domain": "jitsurei.net",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226341042414,
"lm_q1q2_score": 0.8652819865476615,
"lm_q2_score": 0.8856314647623016,
"openwebmath_perplexity": 793.8879132984248,
"openwebmath_score": 0.4210825562477112,
"tags": null,
"url": "http://jitsurei.net/boys-twin-xdjeaej/0ad894-non-isomorphic-graphs-with-8-vertices"
} |
Take $\mathcal C$ to be a category with pushouts. Denotes ${}_{x \backslash}\!\mathcal C$ the category whose objects are the morphisms $x \to a$ of $\mathcal C$ and whose morphisms are the commutative triangles (see coslice category at nlab for more detail). Then any morphism $f \colon x \to y$ of $\mathcal C$ induces a functor \begin{aligned} f^\ast \colon {}_{y \backslash}\!\mathcal C &\to {}_{x \backslash}\!\mathcal C, \\(y\to a) &\mapsto (x\stackrel f \to y \to a). \end{aligned} This functor $f^\ast$ has a left adjoint: indeed, the very definition of the pushout gives for any $g \colon x\to a$ and $h\colon y \to b$ a natural isomorphism (draw the diagrams!) $$\{ j \colon a \to b \in \mathcal C: h\circ f = j\circ g\} \simeq \{k \colon y\sqcup_x a \to b \in \mathcal C : h = (y \to y\sqcup_x a \stackrel k \to b) \}.$$ But the left-hand side is precisely $\hom_{{}_{x \backslash}\!\mathcal C}(g,f^\ast h)$ and the right-hand side $\hom_{{}_{y \backslash}\!\mathcal C}(y\to y\sqcup_x | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517083920618,
"lm_q1q2_score": 0.8049123425388484,
"lm_q2_score": 0.8376199714402813,
"openwebmath_perplexity": 305.27625241156187,
"openwebmath_score": 0.9867250323295593,
"tags": null,
"url": "https://math.stackexchange.com/questions/1216535/adjoint-functor-to-an-r-algebra-only-remembering-itself-as-a-ring"
} |
climate-change, water, climate-models, humidity, desertification
Land salinization occurs when salt from below the surface of the Earth is brought to the surface by excessive land clearing for agriculture and the water rises bringing with the subterranean salt, as has happened in many parts or the world that have cleared land for agriculture. The other cause of land salinization is the over use of irrigation for agriculture, as occurred in Mesopotamia. All agricultural "fresh" water contains small amounts of salt which accumulates in soil over time. Land salinization results in the loss of vegetation and land cover. Large areas of land salinization have resulted in desertification and aridification of regions. | {
"domain": "earthscience.stackexchange",
"id": 2453,
"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": "climate-change, water, climate-models, humidity, desertification",
"url": null
} |
special-relativity, waves
Title: Derivation of the De-Broglie wave relation I've just tried to make sense of the De-Broglie wave relation. That is what I came up with: $E=mc^2$, but $E=hf$ as well. $\lambda=vT$ so $f=\frac{v}{\lambda}$. Equating the two equations for energy you get $mc^2=h\frac{c}{\lambda}$ because for light the velocity is $c$. $mc$ is just the non-relativistic momentum so $p=\frac {h}{\lambda}$ which is the De-Broglie wave relation.
But if I didn't replace $mc=p$, $m=\frac {hc}{\lambda}$ or $m=fh$, which would imply that light does have rest mass. What would be the more rigorous derivation of the De-Broglie wave relation? Do I need to use relativistic momentum $\gamma mv$? Or is the above reasoning just simply not applicable to light? $p=mc$ is NEVER true.
Like you mentioned, for a particle with relativistic velocity (v is not negligible compared to $c$), the right equation is:
$$p = \gamma m v = v\cdot \frac{m}{\sqrt{1-(\frac{v}{c})^2}} $$ | {
"domain": "physics.stackexchange",
"id": 38157,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, waves",
"url": null
} |
performance, r
955026 555188 545287 17813 877840 677387 765257 560629 381747 289587 971065 803763 747217 528836 794958 37097 661263 52840 395838
831738 935643 786394 570464 337923 562190 541068 225053 915686 965111 608994 897447 846860 108752 515542 836528 764000 789307 568648
723470 342739 494286 351160 190884 749632 285933 593204 853796 468531 833461 600822 177790 71903 57017 649707 814314 902198 265691
49568 736471 665268 727451 228241 735293 266214 953790 746801 445968 242866 116621 77898 24034 500331 757553 417475 584000 15633
557524 411056 61025 672145 502926 878605 900910 296864 461080 855045 218014 410273 336278 598272 800982 280759 228947 697911 891837
543467 58593 101761 606039 520769 579224 954895 303666 711070 826766 835187 922834 975887 975559 871418 911500 706658 871996 3679 | {
"domain": "codereview.stackexchange",
"id": 35824,
"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, r",
"url": null
} |
electromagnetism, electromagnetic-induction
Here Griffith is referring to Jefimenko’s equations. Griffith correctly points out the fact that Maxwell’s equations do not have the form of a causal relationship. So when we talk about a changing magnetic field inducing an electric field and vice versa (Faraday’s law and Ampere’s law) we are often tempted to think causally: that the changing magnetic field causes the electric field and vice versa. If we could think of induction as not a causal relationship then we would be OK, but in practice that is hard.
The reason that it is not causal is because it has the wrong form. A cause is something that happens earlier and an effect happens later. So a causal relationship has the form: $f(t)=g(t_r)$ where $t_r<t$ is called the retarded time. Then $g$ is the cause of $f$ and $f$ is the effect of $g$. Causes happen before effects, not at the same time. | {
"domain": "physics.stackexchange",
"id": 73934,
"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, electromagnetic-induction",
"url": null
} |
graphs, network-flow
In the example, there is an edge going from $C$ to $A$ and viceversa.
So, my question is, what would be the way to model this graph with a residual graph? The residual graph is not a graph modeling method. It represents how we can change the flow on edges of a graph $G$ in order to increase the total flow when we compute the maximum flow.
The residual capacity used when you construct the residual graph is defined as
$$
c_f(u,v) =
\begin{cases}
c(u,v) - f(u,v) & \text{if $ (u,v) \in E$} \\
f(v,u) & \text{if $ (v,u) \in E$} \\
0 & \text{otherwise}
\end{cases}\
$$
So, we cannot have both $(u,v)$ and $(v,u)$ in $E$ even though the antiparallel edges do not contradict the main network flow properties.
Your graph contains antiparallel edges which you should get rid of before you run a maximum flow algorithm on that graph, e.g., Ford-Fulkerson algorithm. | {
"domain": "cs.stackexchange",
"id": 9475,
"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": "graphs, network-flow",
"url": null
} |
electromagnetism, electromagnetic-radiation, resonance, fiber-optics
Historically, the 1310 nm window had lower dispersion but higher attenuation than the 1550 nm window. Modern single-mode fiber has optimized the 1550 nm window so this is no longer true. But the available multi-mode fiber still has lower dispersion in the 1310 nm window, and this may be preferred for short-distance links.
A 1310 nm laser will have a lower divergence angle at its output than a 1550 nm laser with the same aperture size. This may make the optics for coupling the 1310-nm laser into the fiber lower cost than the optics for a 1550-nm laser. | {
"domain": "physics.stackexchange",
"id": 42709,
"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, electromagnetic-radiation, resonance, fiber-optics",
"url": null
} |
php, object-oriented, mvc, url-routing
/filters.php
<?php
class Filter{
private static $route;
// Filter at route level
public static function route($routeExp){
self::$route = $routeExp;
// Make sure that the admin is logged
if(!isset($_SESSION['isAdmin']) || $_SESSION['isAdmin'] != true){
if(self::$route[0] != 'login'){
Url::navigate('login');
}
}
}
public static function beforeViewing(){
}
} | {
"domain": "codereview.stackexchange",
"id": 16465,
"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": "php, object-oriented, mvc, url-routing",
"url": null
} |
electromagnetism, unit-conversion
What’s happening here, and the mechanism by which radiation becomes trapped in the van Allen belts in the first place, is a phenomenon that was called a “magnetic mirror” when I learned about it (but which doesn’t seem to have good online representation under that name). In a uniform magnetic field, a charged particle travels in a helix whose axis is parallel to the magnetic field: the perpendicular part of the momentum sets the radius of gyration, and the parallel part of the momentum sets the drift velocity. In a magnetic field whose strength changes slowly (adiabatically, in the jargon), such a particle will have different behaviors depending on whether it’s heading towards the weaker or the stronger part of the field. A particle which moves from a strong-field region to a weak-field region will see its “perpendicular kinetic energy” $p_\perp^2/2m$ converted into “parallel kinetic energy” $p_\parallel^2/2m$: the magnetic field doesn’t do any work on the particle, but moving to a | {
"domain": "physics.stackexchange",
"id": 85336,
"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, unit-conversion",
"url": null
} |
gravity, lagrangian-formalism, curvature, conformal-field-theory, stress-energy-momentum-tensor
\nu}(\partial\phi)^2+\gamma\Big(\partial_\mu\partial_\nu\phi-\frac12\eta_{\mu\nu}\partial^2\phi\Big).$$
The additional $\gamma$-term is hence consequential for further computations.
I cat get this result formally, but struggle with a physical meaning. If I first set metric to be flat the $\gamma$-term will just vanish. Alternatively, I can formally get the same energy-momentum tensor from the action
$$S'=\int dx\Big(\frac12 g^{\mu\nu}\partial_\mu\phi\partial_\nu\phi+\gamma g^{\mu\nu}\partial_\mu\partial_\nu \phi\Big),$$
but the last term is just a total derivative in flat space so again, it shouldn't be consequential for physics. | {
"domain": "physics.stackexchange",
"id": 56789,
"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, lagrangian-formalism, curvature, conformal-field-theory, stress-energy-momentum-tensor",
"url": null
} |
fft, power-spectral-density, normalization
Plotting $x_d[n]$ and $X_d(e^{jw})$ yields the following: | {
"domain": "dsp.stackexchange",
"id": 5682,
"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": "fft, power-spectral-density, normalization",
"url": null
} |
turtlebot, ros-kinetic, ubuntu, rqt, ubuntu-xenial
Title: rqt window empty
I'm trying to run the command rqt on my computer to display topics in the topic list but the window which pops up is empty, I can see just the title from the taskbar "Default -rqt".
Tutorial: http://emanual.robotis.com/docs/en/platform/turtlebot3/topic_monitor/#topic-monitor
ROS version: Kinetic
Turtlebot3 Waffle Pi
Ubuntu Xenial
Originally posted by fish24 on ROS Answers with karma: 28 on 2019-07-26
Post score: 0
On the top of window, see plugin -> Topics -> Topic Monitor.
Originally posted by enthusiast.australia with karma: 91 on 2019-07-26
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by fish24 on 2019-07-26:
I do not have anything on top of the window, I have tried to find it. | {
"domain": "robotics.stackexchange",
"id": 33524,
"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": "turtlebot, ros-kinetic, ubuntu, rqt, ubuntu-xenial",
"url": null
} |
java, performance, unit-testing, generics, collections
BufferedReader br = new BufferedReader(source);
String line = null;
int iteration = 0;
String[] myArray;
Collection<Long> responseTimeList = new ArrayList<Long>();
long responseTime = 0;
long count = 0;
double average = 0.0;
try {
while ((line = br.readLine()) != null) {
// Logic to remove header from the input file
if (iteration == 0) {
iteration++;
continue;
}
myArray = line.split(",");
for (String eachval : myArray) {
// Finding the RESPONSE TIME field from the input line
boolean isNumeric = eachval.chars().allMatch(x -> Character.isDigit(x));
if (isNumeric) {
count = eachval.chars().count();
// Identifying between RESPONSETIME and
// REQUEST_TIMESTAMP. Unix Timestamp will be always 10
// digits or 13 digits | {
"domain": "codereview.stackexchange",
"id": 31692,
"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, performance, unit-testing, generics, collections",
"url": null
} |
homework-and-exercises, thermodynamics, work, heat-engine
$$COP=\frac{Q_H}{W_{IN}}$$
The COP is normally greater than 1 and does not violate the laws of thermodynamics.
Hope this helps. | {
"domain": "physics.stackexchange",
"id": 59423,
"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, thermodynamics, work, heat-engine",
"url": null
} |
electric-current, electrical-resistance
Title: Skin effect prevailing the drift velocity effect
In general, an electron will propagate randomly in a conductor at the Fermi velocity( produced due to thermal energy of the conductor). An applied electric field will give this random motion a small net flow velocity in one direction. Wikipedia
Skin effect is the tendency of an alternating electric current (AC) to become distributed within a conductor such that the current density is largest near the surface of the conductor, and decreases with greater depths in the conductor. Wikipedia | {
"domain": "physics.stackexchange",
"id": 54962,
"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": "electric-current, electrical-resistance",
"url": null
} |
jupiter, natural-satellites, eclipse-non-earth-related
Title: How long do solar eclipses last on Metis? How long does Jupiter obscure the sun, from the perspective of Metis, the innermost moon of Jupiter?
In other words, how long does Metis remain in the shadow of Jupiter?
If it varies by time of year, what are the minimum/maximum values? I am not sure of any direct measurement, but it can be figured out rather easily and accurately from theory with a little bit of maths. We have the following parameters for Metis and Jupiter (taken off Wikipedia): | {
"domain": "astronomy.stackexchange",
"id": 4126,
"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": "jupiter, natural-satellites, eclipse-non-earth-related",
"url": null
} |
c, memory-management, pointers
out->data = (int *) calloc(ds, sizeof(int));
if(out->data == NULL) {
free(out);
return NULL;
}
memcpy(out->data, data, ds);
int dmax = 0;
for(int i = 0; i < ds; i++)
if(data[i] > dmax)
dmax = data[i];
out->datamax = dmax;
char **legend = (char **) calloc(ls, sizeof(char *));
for(int i = 0; i < ls; i++) {
size_t len = strlen(lgnd[i]);
if(len == 0)
continue;
char *curstr = (char *) calloc(len+1, sizeof(char));
if(curstr == NULL) {
if(i > 1)
for(int j = 0; j < i; j++)
free(legend[j]);
free(legend);
free(out);
return NULL;
}
strncpy(curstr, lgnd[i], len+1);
legend[i] = curstr;
}
return out;
} | {
"domain": "codereview.stackexchange",
"id": 29112,
"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, memory-management, pointers",
"url": null
} |
-
you are right: "It is important to be clear more than it is important to write in cool mathematical symbols and formulae" Thank you so much! – Amadeus Bachmann Oct 6 '12 at 11:41 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357579585025,
"lm_q1q2_score": 0.8115607386435284,
"lm_q2_score": 0.8289388125473628,
"openwebmath_perplexity": 131.03676860078326,
"openwebmath_score": 0.8233744502067566,
"tags": null,
"url": "http://math.stackexchange.com/questions/208157/proof-help-needed-about-setsfunctions/208158"
} |
c#, programming-challenge, heap, priority-queue
This is the code for the MinHeap no need to review it, I assume that you don't need to implement this is a 45 minutes interview
public class BinaryHeap
{
private readonly int[] _harr;// pointer to array of elements in heap
private readonly uint _capacity; // maximum possible size of min heap
public uint _heapSize; // Current number of elements in min heap
public BinaryHeap(uint capacity)
{
_capacity = capacity;
_heapSize = 0;
_harr = new int[capacity];
}
public void InsertKey(int key)
{
if (_heapSize == _capacity)
{
throw new StackOverflowException("overflow can't insert key");
}
//insert the new key at the end
_heapSize++;
uint i = _heapSize - 1;
_harr[i] = key; | {
"domain": "codereview.stackexchange",
"id": 34643,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, programming-challenge, heap, priority-queue",
"url": null
} |
# Why is Completeness not a Topological Property?
I am trying to answer the question: Show why completeness is not a topological property.
My answer: $\mathbb{R}$ and the set $(0,1)$ are homeomorphic, but $\mathbb{R}$ is complete while $(0,1)$ is not.
My question to you all: Does this answer the question? I feel like I am not quite seeing what is going on with completeness and why it is not a topological property. Can someone give me another example? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995723244552,
"lm_q1q2_score": 0.8049078642219876,
"lm_q2_score": 0.8333245891029456,
"openwebmath_perplexity": 302.03117190272206,
"openwebmath_score": 0.7905623912811279,
"tags": null,
"url": "https://math.stackexchange.com/questions/1565350/why-is-completeness-not-a-topological-property"
} |
thermodynamics
EDIT
Hm, so I just looked at this question:
Prove that $G=\mu N$ and independance of $\mu$ on $N$
It seems then that it's $\mu$ which depends on $T,P$, and we're using the fact that $G$ is an extensive quantity. I guess that makes sense. What I do wonder about it how we know that the density stays fixed? Because that's what we need too. So I'm basically confused about the relation
$$
G(T,P,\alpha N)=\alpha G(T,P,N),
$$
which should be the mathematical phrasing that $G$ is extensive. However, I don't understand why we can "forget" about the volume? We'd still need that
$$
\rho=N/V=\text{constant}. (1)
$$
Where can we find the guarantee that this is the case, and why isn't it expressed in (1)? Any thermodynamic system has an equation of state, which in this case is of the form $f(P,V,T,N)=0$. Fixing $T$ and $P$ means that $V$ is completely determined by $N$. | {
"domain": "physics.stackexchange",
"id": 54002,
"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
} |
javascript, array
"<td align='left'>"+incarr[i][4]+"</td>" +
"<td align='left'>"+incarr[i][8]+"</td>" +
"</tr>");
} else if (filtery == incarr[i][6] && filterm == incarr[i][5] && incarr[i][0].toUpperCase() == filters && filtersev == "SEVERITY"){
$("#myHTMLTable").append("<tr align='middle'>" +
"<td align='left'>"+incarr[i][0]+"</td>" +
"<td align='left'>"+incarr[i][1]+"</td>" +
"<td align='left'>"+incarr[i][2]+"</td>" + //Severity filter all
"<td align='left'>"+incarr[i][3]+"</td>" +
"<td align='left'>"+incarr[i][4]+"</td>" +
"<td align='left'>"+incarr[i][8]+"</td>" +
"</tr>");
};
}
} | {
"domain": "codereview.stackexchange",
"id": 35287,
"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, array",
"url": null
} |
linear-programming, primal-dual
Title: An intuitive/informal proof for LP Duality? What would be a good informal/intuitive proof for 'hitting the point home' about LP duality? How best to show that the minimized objective function is indeed the minimum with an intuitive way of understanding the bound?
The way I was taught Duality only led to one understanding which I am sure is shared by a LOT of people I know: For every corresponding minimization problem there is an equivalent maximization problem that can be derived by inverting the inequality constraints. Period. This "conclusion" of duality is what seems to stick but not "why is this so" (i.e. how/why is there a bound on the optimal solution).
Is there a way of playing with the inequalities just to 'show' the lower/upper bound on the optimum which could be a motivation for the proof? | {
"domain": "cstheory.stackexchange",
"id": 1877,
"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": "linear-programming, primal-dual",
"url": null
} |
I wrote:
We want to show that $$\forall \epsilon >0$$, $$\exists N>0$$, $$N\in \mathbb{N}$$ s.t. $$n>N \Longrightarrow |(\sqrt{n^2+1}-n)-0|<\epsilon$$. Then we will proceed by simplifying $$\begin{split} \sqrt{n^2+1}-n &= \left(\sqrt{n^2+1}-n\right) \times \frac{\sqrt{n^2+1}+n}{\sqrt{n^2+1}+n}\\ &=\frac{n^2+1-n^2}{\sqrt{n^2+1}+n}\\ &=\frac{1}{\sqrt{n^2+1}+n} \end{split}$$ by using the conjugate. Now we will proceed by making an estimation, we see that $$\frac{1}{\sqrt{n^2+1}+n} \leq \frac{1}{n+1}, \quad \text{where } n > 1.$$ So let $$\frac{1}{n+1} < \epsilon$$ Then by multiplying both sides by $$(n+1)$$ and dividing both sides by $$\epsilon$$ we have $$\frac{1}{\epsilon}< n+1$$. Now we want to subtract 1 from both sides and we arrive at $$\frac{1}{\epsilon}-1 < n$$. We will choose $$N=\frac{1}{\epsilon}-1$$ for when $$n>1$$
I'm new to formulating proofs with rigor. Thanks for your help. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9489172601537141,
"lm_q1q2_score": 0.8244447353365316,
"lm_q2_score": 0.8688267881258485,
"openwebmath_perplexity": 215.51368699877509,
"openwebmath_score": 0.8321181535720825,
"tags": null,
"url": "https://math.stackexchange.com/questions/2937210/proof-verification-lim-n-to-infty-sqrtn21-n-0"
} |
involves two steps: 1 calculate its length, then,. We frequently want a unit normal vector, meaning a normal vector with length one. Normalize: Makes this vector have a. ( d s) 2 = ( d x) 2 + ( d y) 2. (a i -> +b j -> +c k ->) x (d i -> +e j -> +f k -> ). Tangent and Normal Unit Vectors Log In or Sign Up This is a utility that demonstrates the velocity vector, the acceleration vector, unit tangent vector, and the principal unit normal vector for a projectile traveling along a plane-curve defined by r(t) = f(t)i + g(t)k, where r,i, and k are vectors. Solve for the component forces with a precision of 0. UnitCartesianToSpherical () Converts a Cartesian unit vector into spherical coordinates on the unit sphere. The magnitude is the same as before: circulation/area. As explained above vectors have both magnitude (Value) and a direction. So you will want to treat that case specially. The intersection of S with the z plane is the circle x^2+y^2=16. We had to. Question 1 : Find the vectors of | {
"domain": "ariellafiori.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986151391819461,
"lm_q1q2_score": 0.8039426562443741,
"lm_q2_score": 0.8152324915965391,
"openwebmath_perplexity": 417.6234340594931,
"openwebmath_score": 0.8306130170822144,
"tags": null,
"url": "http://ariellafiori.it/unit-normal-vector-calculator.html"
} |
You can do this with the angle bisector theorem used twice.
First observe that $AF$ bisects $\angle BAC$, (because angle bisectors are concurrent) so continue $AF$ to meet $BC$ at point $G$. Then $G$ divides $BC$ in the ratio 26:34 so $BG = \frac {40}{60} 26 =\frac {52}{3}$
Then $BF$ divides $AG$ in the ratio $26:\frac{52}3 = 3:2$ giving $AF:AG$ as $3:5$. Thus through similarity of $\triangle ABC$ and $\triangle ADE$ the ratio between $DE$ and $BC$ is also $3:5$ i.e. $\fbox{$DE=24$}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426397881662,
"lm_q1q2_score": 0.8479988647831557,
"lm_q2_score": 0.8705972717658209,
"openwebmath_perplexity": 357.5029666431847,
"openwebmath_score": 0.8062581419944763,
"tags": null,
"url": "https://math.stackexchange.com/questions/2158750/length-of-segment-parallel-to-an-edge/2158811"
} |
These problems are a great starting pointing. Models such as this one can be extremely useful for analyzing relationships and making predictions based on those relationships. PLEASE EXPECT A MORE CHALLENGING AND LONGER EXAM THAN THIS ONE!! 1. Publisher: Prentice Hall. Prereq: A grade of C- or above in 1172, 1544, 2153, 2162. For example from 1 st Module Linear Algebra to Last i. Don't show me this again. 1 Introduction 6. 9 the Algebra question type includes code for the Mobile App. For more about Math 2B at Foothill College, please see Foothill's Math Department website. These linear algebra lecture notes are designed to be presented as twenty ve, fty minute lectures suitable for sophomores likely to use the material for applications but still requiring a solid foundation in this fundamental branch. A Note to Students. Linear Algebra Exams with Solutions. INSTRUCTOR’S SOLUTIONS MANUAL FOR FINITE DIMENSIONAL LINEAR ALGEBRA 1ST EDITION BY GOCKENBACH. Since the lowest 3 quizzes will be | {
"domain": "asdpallavolorossano.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822876992225169,
"lm_q1q2_score": 0.8076262607866592,
"lm_q2_score": 0.822189121808099,
"openwebmath_perplexity": 1135.8759574371509,
"openwebmath_score": 0.3489063084125519,
"tags": null,
"url": "http://uvym.asdpallavolorossano.it/linear-algebra-quiz-questions.html"
} |
cc.complexity-theory, conditional-results
So, the "natural" representation of $NP \cap coNP$ problems is not polynomial-time recognizable. The question remains: How do you represent $NP \cap coNP$ problems such that they are polynomial-time recognizable?
There has been no significant work done on this issue, but its successful resolution is necessary to prove completeness in $NP \cap coNP$. Hence, I claim that the existence of a proof technique that can resolve the completeness of $NP \cap coNP$ will be the bigger story here -- not the "automatic" results of $NP \cap coNP$-complete problems (e.g. complexity classes, perhaps, collapsing) that we are already aware of (or rather, will be aware of, hypothetically in the future). | {
"domain": "cstheory.stackexchange",
"id": 23,
"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, conditional-results",
"url": null
} |
energy-conservation, nuclear-physics, mass-energy, fusion, binding-energy
https://www.wtamu.edu/~cbaird/sq/2013/10/21/why-is-mass-conserved-in-chemical-reactions/
I'm baffled that I never knew this.
Mass gets converted into energy vice versa in fusion reactions too, it's just that it requires some quite advanced knowledge about quantum mechanics to explain how exactly it works. Your explanation vis a vis the strong force and the Coulomb barrier is spot-on conceptually, and you've discovered that there is no reason to invoke "mass energy conversion." Indeed, I think mass energy conversion started as a pop science way of explaining atomic energy to the layperson by journalists, and is a very poor choice for modeling anything at a scientific level. Energy and energy levels are what you should focus on; the only meaningful conversion that is happening is potential to kinetic energy. | {
"domain": "physics.stackexchange",
"id": 98301,
"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-conservation, nuclear-physics, mass-energy, fusion, binding-energy",
"url": null
} |
java, beginner
Although now if given a single word, it will produce true. This may be an improvement, but you’d need to check the exact requirements to be sure.
Word Length
Is HEAD, HEAL, TEA, TO a word chain? Your program says it is!
What about HEAD, HEAL, HEALTHY? That input causes your program to crash!
Your program should handle mismatched word length, unless the problem statement guarantees all inputs will be the same length.
Number of Differences
The problem description says:
In a word chain, adjacent words must differ in exactly one letter
but HEAD, HEAD, HEAD, HEAD is reported as "true". Clearly, counter > 1 is not the correct "false" condition. Borrowing Doi9t's suggestion, and further improving it, the correct line would read:
return counter == 1; | {
"domain": "codereview.stackexchange",
"id": 39294,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner",
"url": null
} |
quantum-mechanics, quantum-entanglement, interference, double-slit-experiment, quantum-eraser
In this experiment, photon 2 passes a
double slit while the other, photon 1, can be observed by
a detector placed at various distances behind the
Heisenberg lens which plays exactly the same role as the
lens in the gamma-ray microscope discussed by Heisen-
berg (1928) and extended by Weizsacher (1931). If the
detector is placed at the focal plane of the lens, then
registration of a photon there provides information
about its direction, i.e., momentum, before entering the
lens. Thus, because of the strict momentum correlation,
the momentum of the other photon incident on the
double slit and registered in coincidence is also well de-
fined. A momentum eigenstate cannot carry any posi-
tion information, i.e., no information about which slit
the particle passes through. Therefore, a double-slit in-
terference pattern for photon 2 is registered conditioned
on registration of photon 1 in the focal plane of the lens. | {
"domain": "physics.stackexchange",
"id": 96569,
"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, quantum-entanglement, interference, double-slit-experiment, quantum-eraser",
"url": null
} |
ros, ardrone2.0, tum-ardrone
I get the following error
[rosrun] Couldn't find executable named drone_stateestimation below
/home/bojan/fuerte_workspace/tum_ardrone
I tried to google and get a solid pipelined solution to check for the reason for this error and solve it, but I did not get it. Am new to ubuntu, thus your help is much appreicated. This error doesn't seem to be package specific since the same package works fine in another laptop I tested. Am runnign Ubuntu in vmWare. Does that make any difference?
Thanks in advance
UPDATE :
This is the ROS_PACKAGE_PATH as you asked.
/home/bojan/fuerte_workspace:/opt/ros/fuerte/share:/opt/ros/fuerte/stacks
The first path is the path I get after roscd. Please let me know if this information helps.
Originally posted by Tonystark124 on ROS Answers with karma: 15 on 2014-03-18
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 17331,
"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, ardrone2.0, tum-ardrone",
"url": null
} |
electrochemistry, redox, analytical-chemistry, titration
As the standard reduction potential of ferroin is much higher than of iodine, near all iodide is oxidized when ferroin starts to be oxidized (except temporary effects out of equilibrium).
It is similar as when much stronger acid (like acetic acid) reacts with NaOH first and much weaker one (like phenolphthaleinum) starts to react when the former has practically fully reacted.
Even if the indicator ferroin is temporarily oxidized by cerium(IV), it is kept reduced by iodide until it cannot be kept reduced any more. | {
"domain": "chemistry.stackexchange",
"id": 17862,
"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": "electrochemistry, redox, analytical-chemistry, titration",
"url": null
} |
# I can't come up with the intended solution to $\frac{a^2+b^2}{2a^5b^5} + \frac{81a^2b^2}{4} + 9ab>18$
I was going trough some easy algebra problems when I encountered $$\frac{a^2+b^2}{2a^5b^5} + \frac{81a^2b^2}{4} + 9ab>18.$$ As you can see the problem is easily solvable with AM > GM
I fairly quickly came up with this solution: $$\frac{a^2+b^2}{2a^5b^5} + \frac{81a^2b^2}{4} + 9ab = \frac{a^2}{2a^5b^5} + \frac{b^2}{2a^5b^5} + \frac{81a^2b^2}{12} + \frac{81a^2b^2}{12} + \frac{81a^2b^2}{12} + \frac{9ab}{2} + \frac{9ab}{2}$$ and using AM-GM $$\frac{a^2}{2a^5b^5} + \frac{b^2}{2a^5b^5} + \frac{81a^2b^2}{12} + \frac{81a^2b^2}{12} + \frac{81a^2b^2}{12} + \frac{9ab}{2} + \frac{9ab}{2} \ge 7\sqrt[7]{\frac{a^{10}b^{10}9^8}{a^{10}b^{10}2^{10}3^3}} \approx 20$$ (Yes I was able to do that by hand and later check with my calculator)
I am not sure that this is the intended solution though | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126488274565,
"lm_q1q2_score": 0.8259308073112059,
"lm_q2_score": 0.8438950986284991,
"openwebmath_perplexity": 279.347959986042,
"openwebmath_score": 0.9527207016944885,
"tags": null,
"url": "https://math.stackexchange.com/questions/4519399/i-cant-come-up-with-the-intended-solution-to-fraca2b22a5b5-frac8"
} |
how to construct (draw) the circumcenter of … The circumcenter of a polygon is the center of the circle that contains all the vertices of the polygon, if such a circle exists. The circumcenter of an obtuse-angled triangle is outside the triangle. the hypotenuse. If a triangle is an acute … The solution (x, y) is the circumcenter of the triangle given. It is denoted by P(X, Y). midpoints of AB, AC, and BC, Calculate the slope of the particular line, By using the midpoint and the slope, find out the equation of the line (y-y, Find out the equation of the other line in a similar manner, Solve two bisector equations by finding out the intersection point, Calculated intersection point will be the circumcenter of the given triangle, The circumcenter is the centre of the circumcircle, All the vertices of a triangle are equidistant from the circumcenter, In an acute-angled triangle, circumcenter lies inside the triangle, In an obtuse-angled triangle, it lies outside of the triangle, | {
"domain": "ttokamsa.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211539104333,
"lm_q1q2_score": 0.8123424496367515,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 481.9983013396492,
"openwebmath_score": 0.5764424800872803,
"tags": null,
"url": "http://ttokamsa.com/baby-pink-dffmth/478d03-how-to-find-circumcenter"
} |
c++, matrix, mathematics, c++17
template<typename scalarType>
inline Matrix<typename scalarType, 0, 0, std::vector<scalarType>> Matrix<typename scalarType, 0, 0, std::vector<scalarType>>::operator-(const Matrix& m) const
{
if (this->rows() == m.rows() && this->cols() == m.cols())
{
Matrix<scalarType, 0, 0, std::vector<scalarType>> result{ m.rows(),m.cols() };
typename std::vector<scalarType>::const_iterator it1{ A.begin() };
typename std::vector<scalarType>::const_iterator it2{ m.A.begin() };
typename std::vector<scalarType>::iterator resultIter{ result.A.begin() };
while (it1 < A.end() && it2 < m.A.end())
{
*resultIter = *it1 - *it2;
++it1; ++it2; ++resultIter;
}
return result;
}
else
{
throw std::logic_error("Matrices have different dimensions; therefore cannot be added!");
}
} | {
"domain": "codereview.stackexchange",
"id": 42369,
"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++, matrix, mathematics, c++17",
"url": null
} |
java, spring, hibernate, crud
You would benefit from using spring-data which brings default implementations for the DAO pattern (JPARepository interface and its relatives).
Your controllers might contain too much logic. They should call @Component/@Service bean methods that contain the DB logic. This serves "separation of concerns" and gives you code that can be called from elsewhere.
Your entity method public void setId(int id) should probably not be public. When would you ever want to manipulate the entities id? Let your JPA provider take care of it. | {
"domain": "codereview.stackexchange",
"id": 19900,
"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, spring, hibernate, crud",
"url": null
} |
environmental-chemistry, filtering
Title: Particle size of oxides of nitrogen and sulfur pollutants and HEPA filters I am thinking about buying air purifier as pollution is high in my city.
Going through the specifications of HEPA filters, I found that they block particulate matter of 2.5. PM 2.5 contains dust and other fine particles.
Googling tells me that their size is around 2.5 micrometers.
My question is: Do pollutants such as sulfur oxides and nitrogen oxides (and related compounds) fall into this category, specifically in regards to size? If the high efficiency particle air (HEPA) filter says it blocks PM 2.5 that's good as pm 2.5 particles are the ones your lungs cannot easily dispel and cause haze. Unfortunately sulfur oxides and nitrogen oxides are gasses, so no particle filter will remove them. | {
"domain": "chemistry.stackexchange",
"id": 4709,
"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": "environmental-chemistry, filtering",
"url": null
} |
water, ice, condensation
Title: Being in a solid state, why is ice slippery? Saying that ice is slippery is like saying that water is wet -- it's something we've known for as long as we can be said to have known anything. Presumably, humans as a species knew ice was slippery before we knew fire was hot, or that it existed. But ask anyone why, and they won't be able to give you any better explanation than one of those cave people would have. Apparently this is a simple question with a not-so-simple answer.
I believe the general consensus is that there is a thin layer of liquid water on the surface of the ice. This thin layer and the solid ice below it are responsible for the slipperiness of ice; the water easily moves on the ice. (Well, why is that? Perhaps another SE question.) | {
"domain": "physics.stackexchange",
"id": 11839,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "water, ice, condensation",
"url": null
} |
motor, motion, torque, wheel
Title: Calculating Required Torque Say I had an object with 4 motors/wheels attached (in a fairly standard arrangement).
I need to calculate the amount of torque required from the motors to be able to move the object of x kilograms consistently (without skipping any steps) at a velocity of y, travelling up a slope of angle z.
I'm guessing this would also depend on factors like the grip of the tyre and such? This is a standard dynamics problem. Let's use this figure I drew: | {
"domain": "robotics.stackexchange",
"id": 771,
"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": "motor, motion, torque, wheel",
"url": null
} |
earths-orbit
Now try drawing two lines, one from one Earth dot to the point 10 AU from the Sun and the other line from the other Earth dot to the point 10 AU from the sun. Those two lines will intersect at the point 10 AU from the Sun and continue onwards. Use a protractor to measure the angle between those two lines.
Now draw lines to the points 20 AU and 30 AU and 40 AU from the Sun dot and measure the angles. The farther away from the Sun dot the points are, the smaller the angles will be. | {
"domain": "astronomy.stackexchange",
"id": 4703,
"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": "earths-orbit",
"url": null
} |
Lemma 10 (Vinogradov lemma) Let ${\alpha \in {\bf T}}$, ${0 < \epsilon < 1/100}$, ${100\epsilon < \delta < 1}$, and ${N \geq 100/\delta}$. Suppose that ${\| n \alpha \|_{{\bf T}} \leq \epsilon}$ for at least ${\delta N}$ values of ${n \in [-N,N]}$. Then there exists a positive integer ${q = O(1/\delta)}$ such that ${\| \alpha q \|_{{\bf T}} \ll \frac{\epsilon q}{\delta N}}$.
The key point here is that one starts with many multiples of ${\alpha}$ being somewhat close (${O(\epsilon)}$) to an integer, but concludes that there is a single multiple of ${\alpha}$ which is very close (${O(\epsilon/N)}$, ignoring factors of ${\delta}$) to an integer. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986777179414275,
"lm_q1q2_score": 0.8021189213705118,
"lm_q2_score": 0.8128673201042493,
"openwebmath_perplexity": 125.00597894686658,
"openwebmath_score": 0.9742940664291382,
"tags": null,
"url": "http://terrytao.wordpress.com/2010/03/28/254b-notes-1-equidistribution-of-polynomial-sequences-in-torii/"
} |
ros, source, svn, wiki
Originally posted by kwc with karma: 12244 on 2011-03-16
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by kwc on 2011-03-26:
Shoot me an e-mail and we resolve this. The penn-ros-pkg tree needs to be reorganized in order to index correctly.
Comment by ben on 2011-03-25:
Now that the packages sbpl_arm_planner and sbpl_arm_planner_node have been released for unstable, how can I change where the indexer points at? (http://www.ros.org/wiki/sbpl_arm_planner and http://www.ros.org/wiki/sbpl_arm_planner_node show that the packages are in a stack called 'trunk'. | {
"domain": "robotics.stackexchange",
"id": 5092,
"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, source, svn, wiki",
"url": null
} |
c++, stl
Element(const std::string& name, int arr[])
: _name(name), _point(arr) {}
};
struct ElementComparatorY {
bool operator()(const Element& l, const Element& r) {
return (l._point._y > r._point._y) ||
(l._point._y == r._point._y && l._point._x > r._point._x);
}
};
struct ElementComparatorX {
bool operator()(const Element& l, const Element& r) {
return (l._point._x < r._point._x) ||
(l._point._x == r._point._x && l._point._y < r._point._y);
}
};
std::multiset<Element, ElementComparatorY> _points;
typedef typename std::multiset<Element, ElementComparatorY>::iterator Iterator;
int _size; | {
"domain": "codereview.stackexchange",
"id": 39209,
"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++, stl",
"url": null
} |
P.S.:
Here's some numerical evidence that these calculations are correct. The plot shows the excesses over the average for even numbers between twin primes, averaged up to $$10^k$$ with $$k=3,\cdots,8$$ ($$k$$ is marked on the $$x$$ axis). The additive excess in distinct prime factors is shown with red crosses; the red line shows the calculated limit. The logarithmic excess in divisors is shown with blue crosses; the blue line shows the calculated limit. The values are far from converged but are entirely compatible with the calculated limits. Here's the code I used to generate the data.
P.P.S.: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676496254958,
"lm_q1q2_score": 0.8032229751823324,
"lm_q2_score": 0.8198933337131077,
"openwebmath_perplexity": 223.31276059222472,
"openwebmath_score": 0.9131239652633667,
"tags": null,
"url": "https://math.stackexchange.com/questions/3490592/what-is-notable-about-the-composite-numbers-between-twin-primes"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.