text stringlengths 1 1.11k | source dict |
|---|---|
image-processing, matlab, fft, fourier-transform, ifft
pic=double(pic); %Convert to double before transforms
pic=ifft2(pic); %Take IFFT of Airy disk
pic=real(pic); %Take real part
figure()
pic=uint8(pic); %If commented out, black screen has Airy disks in corners
imshow(pic);
Does anyone have any ideas on why the IFFT of the Airy disk doesn't return a circle? Thank you You have the gist of it, but there are a couple of problems. I'm sorry, I don't have MATLAB, but I'll do my best to give you MATLAB-like pseudo-code to work with.
The main problem is that your Airy disk is an image, i.e. amplitude only (the result of taking abs). To reconstruct the circular aperture, you need phase as well. Here's code to first generate your complex Airy disk (PSF), from which you can then reconstruct the circular aperture (pupil function). Starting with this file, circ.jpg:
pupil = imread('circ.jpg');
pupil = rgb2gray(pupil);
% use fftshift to block-swap the fft output (move DC to the center)
complex_airy = fftshift(fft2(pupil)); | {
"domain": "dsp.stackexchange",
"id": 2775,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, matlab, fft, fourier-transform, ifft",
"url": null
} |
is as follows: DAX can not perform matrix operations, so the regression formula refers to Klim's law. 03−1. II. kasandbox. One variable is considered to be an explanatory variable, and the other is considered to be a dependent variable. This simple multiple linear regression calculator uses the least squares method to find the line of best fit for data comprising two independent X values and one dependent Y value, allowing you to estimate the value of a dependent variable (Y) from two given independent (or explanatory) variables (X 1 and X 2). Significance of Regression Coefficients. 2. A general multiple-regression model can be written as y i = β 0 +β 1 x i1 +β 2 x i2 ++β k x ik +u. To achieve satisfying scheduling process triggered by limited streamflow data, four methods are used to derive the operation rule of hydropower reservoirs, including multiple linear regression (MLR), artificial neural network (ANN), extreme learning machine (ELM), and support vector machine (SVM). Summary | {
"domain": "mcsms.ru",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713865827591,
"lm_q1q2_score": 0.8032252518056001,
"lm_q2_score": 0.8152324960856175,
"openwebmath_perplexity": 808.0274149980227,
"openwebmath_score": 0.6238495707511902,
"tags": null,
"url": "http://mcsms.ru/carrier-ahu-wgdoq/rmxw---multiple-linear-regression-derivation---3du.html"
} |
newtonian-mechanics, classical-mechanics, energy, work, potential-energy
$$W = \int_{h_1}^{h_2} F(s) ds$$
At the beginning it is higher than $mg$, at the end it is equal to $mg$.
Second doubt: how can the area of F (integral) in the path beingh equal to the work done by $mg$ if F is higher at the beginning and equal to $mg$ at the end? There should be a moment when $F(s)$ becomes lower than $mg$. I imagine that this could happen before the end, like a sort of attempt to decelerate the object. If we were to accelerate the object with $F > mg$ and then applying a force $F = mg$, it would continue moving because of the Newton first law. So, I'd say that $F$ must grow, decrease, and stop at $mg$, with the property of having the same area of $mg$. | {
"domain": "physics.stackexchange",
"id": 82436,
"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, classical-mechanics, energy, work, potential-energy",
"url": null
} |
quantum-mechanics, schroedinger-equation
Title: Quantum mechanics of a moving bound state in the lab frame Consider a non-relativistic quantum-mechanical problem of two bodies interacting via a confining potential $V(\vec{\mathbf{r}})$ (say, a hydrogen atom) moving with a constant speed $\vec{v}$ relative to the lab frame. Alternatively, we could consider a single-body problem with reduced mass $M$ and time-dependent potential $V(\vec{\mathbf{r}}-\vec{\mathbf{v}}t)$.
I. What is the spectrum/wavefunctions of this system in the lab frame?
Attempt to answer: as for the wave functions, we simply use the Galilean invariance and say that any $\psi_k(\vec{x},t)$ becomes $\psi_k(\vec{x}-\vec{v}t,t)$, and the corresponding energies $E_k$ become $E_k + M_{}v^2/2$. But... how can we even talk about eigenenergies without the separation of variables?
My guess is that the answer can be given directly in terms of properties of the $\bigl[i\hbar\partial_t-\hat{H}(x,t)\bigr]$ operator. | {
"domain": "physics.stackexchange",
"id": 87539,
"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, schroedinger-equation",
"url": null
} |
homework-and-exercises, oscillators, linear-algebra, coupled-oscillators, linearized-theory
If $\det(A)\neq 0$, then $A$ is invertible, and so only one element $x$ can map to $0$. We know $A 0=0$, so no other element can map to zero.
If $\det(A)=0$, then we know $A$ is not invertible, and so somewhere, two elements map to the same element. Say $Ax=Ay$, where $x\neq y$. Then $0=Ax-Ay=A(x-y)$, where $x-y\neq 0$. We thus have a nonzero solution to $Ax=0$. | {
"domain": "physics.stackexchange",
"id": 25655,
"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, oscillators, linear-algebra, coupled-oscillators, linearized-theory",
"url": null
} |
• A corresponding pattern holds true for any denominator of the form $10^k+1$ with $k\geq1$: for $\frac n{11}$, one digit plus the next is $9$. For $\frac n{101}$, two digits plus the next two gives $99$. And so on. You may also find it intriguing to study the expansions of fractions with denominators $10^k-1$. Sep 1, 2018 at 4:25
Knowing how this phenomenon came to happen (e.g. as explained in Arthurs answer), you can construct similar ones. E.g. You can factor
$$10^\color{red}4+1=73\times 137.$$
You will observe that subdividing the decimal digits of the reciprocals of these factors into blocks of length $\color{red}{\text{four}}$ will give you sums of $9,\!999$:
\begin{align} 1/73& = 0.\underline{0136}\overline{9863}\underline{0136}\overline{9863}...\\[1ex] 1/137 &= 0.\underline{0072}\overline{9927}\underline{0072}\overline{9927}... \end{align} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540710685614,
"lm_q1q2_score": 0.8074401482619994,
"lm_q2_score": 0.8244619306896955,
"openwebmath_perplexity": 173.78513594495305,
"openwebmath_score": 0.8578642010688782,
"tags": null,
"url": "https://math.stackexchange.com/questions/2901300/what-is-the-relationship-between-1-7-1-11-1-13-and-the-number-1001"
} |
acoustics
to determine $p(t)$, the sound pressure at a distant point.
But jcandy told me (the one who answered my previous question) this formula is not suitable for doing such a thing like this.
Why is it?
How can I approximate a the sound pressure from a vibrating plate at a distant point? Actually, the idea of summing acceleration as you suggest is on the right track, but its not directly suitable. Let me outline a general procedure that is conceptually simple and similar to what you propose; namely, the Method of Fundamental Solutions (MFS). The text below is actually a summary of the method presented in this AES article.
The pressure for a radiating system satisfies the Helmholtz equation (assuming a uniform, non-viscous medium at rest in the absence of sound). In the region exterior to all sources, the pressure satisfies the time-dependent wave equation
\begin{equation}
\left( \nabla^2 - \frac{1}{c_s^2}
\frac{\partial^2}{\partial t^2} \right) p({\bf x},t) = 0 \; ,
\end{equation} | {
"domain": "physics.stackexchange",
"id": 48815,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acoustics",
"url": null
} |
java, performance, programming-challenge, lambda, rags-to-riches
beautyMap.containsKey(c) ? beautyMap.get(c) + 1 : 1
First in .containsKey, then again in .get.
To reduce the lookups, you can do one .get and a null-check.
When calculating the beauty, you iterate over entries, but use only the values:
for (Map.Entry<Character, Integer> e : valueSorted.entrySet()) {
beauty += e.getValue() * beautyVal++;
} | {
"domain": "codereview.stackexchange",
"id": 12259,
"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, programming-challenge, lambda, rags-to-riches",
"url": null
} |
cosmology, time, space-expansion, dark-energy
$$
\Omega_\Lambda (a^4 - a) \leqslant 0
$$
and
$$
\begin{align}
H_\text{nde}^2(a) &= H_0^2[\Omega_0a + (1-\Omega_0)a^2]\\
&\geqslant
H_0^2[(\Omega_0 - \Omega_\Lambda)a + (1-\Omega_0)a^2 + \Omega_\Lambda a^4]\\
&= H_\text{wde}^2(a).
\end{align}
$$ | {
"domain": "physics.stackexchange",
"id": 48552,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, time, space-expansion, dark-energy",
"url": null
} |
- 4 years, 7 months ago
Log in to reply
for regular shapes may be existed ratio according to the number of sides
- 4 years, 7 months ago
Log in to reply
It is easy to see that this property is preserved under any non-degenerate affine transformation, because such transformations preserve the ratios of areas of figures. So if a given starting polygon is the image of some regular polygon under some affine transformation, then its "successive midpoint inscribed polygons" have areas in geometric progression.
However, while the above is a sufficient condition, it is not a necessary one: for $$n = 4$$, the family of kite quadrilaterals (even nonconvex ones) have this property; yet kites are not affine transformations of squares. A proof is quite straightforward, and I will leave it to the reader as an elementary exercise in geometry. | {
"domain": "brilliant.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9615338079816756,
"lm_q1q2_score": 0.8265957613401642,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1626.3588914826307,
"openwebmath_score": 0.9769675731658936,
"tags": null,
"url": "https://brilliant.org/discussions/thread/squares-in-squares/"
} |
quantum-mechanics, electricity
I recall an interesting/silly experiment from The Physics Teacher magazine. If we perform a Hall-effect experiment on a large current in a metal strip, performed in order to identify the polarity of the moving charges, and if we then slide this strip along at exactly the opposite of electron-drift velocity, then the results (correctly) show that the moving charge-carriers are positive, not negative. After all, by moving the wire backwards, we've made the electrons stop drifting wrt the lab frame! The grid of metal atoms with their positive charges becomes the only "electric current" in the metal.
Knowing the above, it's obvious that a macroscopic copper wire, when moving wrt the stationary electron-sea within the wire, demonstrates an electric current lacking micro-scale QM phenomena. The same is true if we hold the copper wire still, and only move the electron-sea. | {
"domain": "physics.stackexchange",
"id": 34332,
"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, electricity",
"url": null
} |
java, performance, strings, file
writeOutput(file, fileBuilder.toString());
}
private static void writeOutput(File file, String output) {
try (PrintWriter writer = new PrintWriter(file, "UTF-8")) {
writer.write(output);
} catch (FileNotFoundException | UnsupportedEncodingException ex) {
ex.printStackTrace();
}
}
} | {
"domain": "codereview.stackexchange",
"id": 20582,
"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, strings, file",
"url": null
} |
• @amoeba - Thanks for that link. It explains a lot for me. I found it especially interesting to see that cross validation in PCA makes use of methods that can operate on datasets with missing values. I made a few attempts on this approach and (as you state) the null model shuffling approach does indeed tend to underestimate the number of significant PCs. However, for the iris dataset, I consistently return a single PC for reconstruction error. Interesting given what you mentioned about the plot. Could be that if we were gauging error based on species predictions, results might be different. Apr 11, 2016 at 15:01
• Out of curiosity, I tried it out on the Iris data. Actually, I do get two significant PCs with the cross-validation method. I updated my linked post, please see there. Apr 12, 2016 at 0:22 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9304582554941718,
"lm_q1q2_score": 0.8033498479538724,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 989.0509018500592,
"openwebmath_score": 0.529583215713501,
"tags": null,
"url": "https://stats.stackexchange.com/questions/49646/for-a-random-matrix-shouldnt-a-svd-explain-nothing-at-all-what-am-i-doing-wro/49652"
} |
r, rna-seq, pathway, gsea
SO does this mean that KRAS pathway is being up regulated in responders because I have used down regulated genes in responders? A gene set enrichment analysis (GSEA) tests for enrichment of a gene set within a ranked list of genes.
The primary outcome of the analysis is enrichment or no enrichment. Gene sets frequently include correlated genes, and that correlation can be positive (enhancers or co-expressors) or negative (e.g repressors). It's reasonable to include negatively-correlated genes within gene sets because some pathways involve both enhancement of a particular biochemical pathway, and suppression of a pathway that carries out opposite things.
I don't know about the KRAS pathway you're comparing against here, but a statement I would make based on interpreting that GSEA graph would be something like, "The KRAS.600_UP.V1_DN gene set is enriched when comparing the expression of responders vs non-responders." | {
"domain": "bioinformatics.stackexchange",
"id": 1827,
"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": "r, rna-seq, pathway, gsea",
"url": null
} |
$V=\frac{4\pi}{3}\frac{1}{2^{3}}=\frac{\pi}{6}$
However, when I use the formula above I get a different result. If I take the curve between $0<\theta<\pi/2$ and revolve it around the y-axis, I get:
$V=\frac{2\pi}{3}\int_{0}^{\frac{\pi}{2}} \sin^{4}\theta\,d\theta= \frac{2\pi}{3}\int_{0}^{\frac{\pi}{2}} \left(\frac{1-\cos2\theta}{2}\right)^{2}\,d\theta= \frac{\pi}{6}\int_{0}^{\frac{\pi}{2}} (1-2\cos2\theta+\cos^{2}2\theta)\,d\theta= \frac{\pi^{2}}{8}$
What am I missing here?
Thanks !
• Is $\theta$ the polar angle of cylindrical coordinate system with $y$ rotation axis, or is it the angle made by radius vector to $x-$axis as polar angle coordinate reference? Jan 22 '18 at 17:15 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9678992942089574,
"lm_q1q2_score": 0.8246045230010294,
"lm_q2_score": 0.851952809486198,
"openwebmath_perplexity": 113.47563459211791,
"openwebmath_score": 0.9698166251182556,
"tags": null,
"url": "https://math.stackexchange.com/questions/2615837/solid-of-revolution-in-polar-coordinates"
} |
Practices Parts 0 to 999 Revised as of January 1, 2013 Containing a codification of documents of general applicability and future effect As of January 1, 2013. If we see a coin tossed twice and we see 2 heads, we'd like to know if the coin is fair, or at least to be able to determine the probability that the coin is fair. Determining Dependent and Independent Events (HSS-CP. ” “If that happens, then we’ll incorrectly decide that an unfair coin is really fair --called a ‘miss’. After all, the probability that you will roll HHT right off the bat is , and the same for HTT and HHH, so there should be symmetry. "Count line" can be moved by mouse. Well, that's the same as the probability that the first coin didn't come up heads when both coins are different, which is 1 - 1/2 = 1/2. Last time we talked about independence of a pair of outcomes, but we can easily go on and talk about independence of a longer sequence of outcomes. Pr[HHH] = Pr[TTT] = 1=2. ” “If that happens, then we’ll | {
"domain": "alterauto.fr",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682471364099,
"lm_q1q2_score": 0.8363564324320225,
"lm_q2_score": 0.8459424431344437,
"openwebmath_perplexity": 315.305787512818,
"openwebmath_score": 0.7686670422554016,
"tags": null,
"url": "http://ttwj.alterauto.fr/unfair-coin-probability.html"
} |
feature-selection
C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\validation.py in check_X_y(X, y, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples, ensure_min_features, y_numeric, warn_on_dtype, estimator)
754 ensure_min_features=ensure_min_features,
755 warn_on_dtype=warn_on_dtype,
--> 756 estimator=estimator)
757 if multi_output:
758 y = check_array(y, 'csr', force_all_finite=True, ensure_2d=False, | {
"domain": "datascience.stackexchange",
"id": 6883,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "feature-selection",
"url": null
} |
From finite calculus we have that
$$\sum a^{\underline k}\delta k=\frac{a^{\underline{k+1}}}{k+1}+C$$
where $a^{\underline k}:=\prod _{j=0}^{k-1}(a-j)$ is known as a falling factorial, and $C$ is any periodic function with period $1$ (this can be a constant function, in general is taken as zero, this is an analog of an indefinite integral, in this case this is an indefinite sum).
And we have that $a^{\overline m}:=\prod_{j=0}^{m-1}(a+j)$ is known as a rising factorial, and
$$a^{\overline m}=(a+m-1)^\underline m$$
Hence you want to solve the sum
\begin{align}\sum_{k=\ell}^n k(k+1)\cdots(k+m)&=\sum\nolimits_\ell^{n+1}k^{\overline{m+1}}\delta k\\&=\sum\nolimits_\ell^{n+1}(k+m)^{\underline{m+1}}\delta k\\&=\frac{(k+m)^{\underline{m+2}}}{m+2}\bigg|_\ell^{n+1}\\&=\frac1{m+2}\big((n+m+1)^\underline{m+2}-(\ell+m)^\underline{m+2}\big)\\&=\frac1{m+2}\big(n^\overline{m+2}-(\ell-1)^\overline{m+2}\big)\end{align}
From here is easy to justify your result | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9910145733704833,
"lm_q1q2_score": 0.8867493989206993,
"lm_q2_score": 0.8947894639983208,
"openwebmath_perplexity": 160.51146579699576,
"openwebmath_score": 0.8492360711097717,
"tags": null,
"url": "https://math.stackexchange.com/questions/2154537/is-there-a-pattern-to-expression-for-the-nested-sums-of-the-first-n-terms-of-a?noredirect=1"
} |
better understand the functions can. Methods have been presented, and everyone can find solutions to their problems... G ( x ) = x n then f ' ( x ) = n! Functions and Polynomials for instance log 10 ( x ) = x n then f ' ( x.... Graphing tool free math lessons and math homework help from basic math to algebra, geometry and beyond as base. ( x ) ) and log as derivative of a fraction natural logarithm ( e.g: ln ( )... And beyond following diagram shows the derivatives of sine and cosine on the Definition of derivative... Quotient rule applies when we need to calculate the derivative of a function at any point g ( )! Us the slope of a function at any point and everyone can find solutions to their math instantly... Many functions ( with examples below ) derivative and the binomial theorem takes account of the derivative the... Sine and cosine on the Definition of the parentheses of a function at any point the variable is following!, in which the variable is the base have already derived the | {
"domain": "architectuurstudioir.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471613889295,
"lm_q1q2_score": 0.821988098306028,
"lm_q2_score": 0.8354835289107307,
"openwebmath_perplexity": 375.4300282199478,
"openwebmath_score": 0.7825924754142761,
"tags": null,
"url": "https://architectuurstudioir.com/qd1kb/derivative-of-a-fraction-1448b9"
} |
modelling
Title: What is the difference between "information model" and "conceptual model"? I am trying to figure out the difference between information and conceptual models. For me, both terms seem to mean be the same, but I cannot find a reference where this is established. They are never used together; maybe because they are from different domains?
My question is: What is the difference between information model and conceptual model?
Definitions
Conceptual model:
A domain consists of objects, relationships, and concepts we commit
ourselves to a specific way of viewing domains. [...] In the field of
information systems, this commitment to viewing domains in a
particular way is called the conceptual model. [Antoni Olivé. 2007.
Conceptual Modeling of Information Systems. Springer-Verlag, Berlin,
Heidelberg.]
Information model: | {
"domain": "cs.stackexchange",
"id": 16856,
"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": "modelling",
"url": null
} |
the university is expected to uphold these values through integrity, honesty, trust, fairness, and respect toward peers and community. Farmland Values. Virtual tour of 43 Woodbine Crescent including panoramic scenes, photo gallery, map view, property brochure and property information Virtual tour of 43 Woodbine Crescent, Hamilton, Ontario L8R1Y2. Demonstrate that an operator which commutes with the Hamiltonian, and contains no explicit time dependence, has an expectation value which is constant in time. The expected value of the random variable x is. Some experts believe another round of COVID-19 may arrive later this year as temperatures begin to cool down. z-axis is The expectation value of the angular momentum for the stationary coherent state and time-dependent wave packet state which are shown below : L. Consider the expectation value of Hˆ in an arbitrary state |Ψ�: �Hˆ� = � ˆp2 2m �+�1 2 mω 2x2�, and both terms on the right hand side are non-negative. If there are two different | {
"domain": "cssmatera.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471661250914,
"lm_q1q2_score": 0.8089084439395994,
"lm_q2_score": 0.8221891283434877,
"openwebmath_perplexity": 1149.1269167841435,
"openwebmath_score": 0.49707865715026855,
"tags": null,
"url": "http://cssmatera.it/gyvr/expectation-value-of-hamiltonian.html"
} |
In the former case, you should write, say,
``````The sum of \$x_1\$, \$x_2\$, \$x_3\$, etc.\ diverges because ...
``````
Don't include the commas in the math terms, because the commas are parts of the sentence rather than components of formulas. With this setup, line breaks can occur (if needed) after the commas.
In the latter case, though, you should definitely write
``````\$... x_1, x_2, x_3 ...\$
``````
because the commas are now parts of some larger math expression. And, if `x_1`, `x_2`, and `x_3` form, say, a three-element set, you may want to encase them in curly braces, i.e., write
``````\$\{x_1, x_2, x_3\}\$
``````
TeX will, in general, not insert line breaks after math-mode commas. If you must allow a line break in the formula and if the commas are sensible break-points, you'll need to tell TeX about this fact, by inserting judiciously placed `\allowbreak` directives, say, | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9532750373915658,
"lm_q1q2_score": 0.8584525699872126,
"lm_q2_score": 0.9005297907896396,
"openwebmath_perplexity": 1290.1594846752444,
"openwebmath_score": 0.9517483115196228,
"tags": null,
"url": "https://tex.stackexchange.com/questions/269031/x-1-x-2-vs-x-1-x-2"
} |
c#, asp.net-mvc, extension-methods
Then you can use the native MVC DropDownListFor on any collection easily:
@Html.DropDownListFor(m => m.Item, Model.MyList.ToSelectList(x => x.ValueProperty, x => x.TextProperty))
@Html.DropDownListFor(m => m.Item, Model.MyList.ToSelectList(x => x.ValueProperty, x => x.TextProperty), "Choose...", new { @class = "form-control dropdown" }) | {
"domain": "codereview.stackexchange",
"id": 15623,
"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#, asp.net-mvc, extension-methods",
"url": null
} |
lambda-calculus
Title: Why $((+ 1) ((+ 1) 1))$ is not a $\delta-$redex? I was reading http://barrywatson.se/lsi/lsi_delta_reduction.html, where
((+ 1) 2) →δ 3 is a δ-reduction.
((+ 1) ((+ 1) 1)) is a not a δ-redex.
Wouldn't $((+ 1) ((+ 1) 1)) \rightarrow ((+1) 2)) \rightarrow 3$? Because the definition of $\delta$-reduction requires that
for all $1≤i≤n$, $N_i$ is normalized
and the second argument $((+1) 1)$ is not normalized.
As you observe, we can first reduce the $\delta$-redex $((+1) 1)$ to $\delta$-normal form $2$; then $((+1) 2)$ is a $\delta$-redex which can be reduced to $\delta$-normal form $3$.
$((+ 1) ((+ 1) 1)) \triangleright_\delta ((+1) 2)) \triangleright_\delta 3$ is a correct reduction, but $((+ 1) ((+ 1) 1))$ isn't a redex in the first step; $((+ 1) 1)$ is. | {
"domain": "cs.stackexchange",
"id": 17299,
"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": "lambda-calculus",
"url": null
} |
refer to a geometric similarity, or to a matrix transformation that results in a similarity. Matrix - The transformation matrix for the specified scale. A line segment between points is given by the convex combinations of those points; if the "points" are images, the line segment is a simple morph between the images. matrix transformation applicationsIn linear algebra, linear transformations can be represented by matrices. Sr Applications Engineer II, Beechcraft Here is a VBA Macro to create an excell file with the transformation Matrix to convert a point from one axis to another M. In order to improve exactly 3D map using the Kinect camera, in this paper, the proposed method is to optimize the transformation matrix which combined between the RGB data-based transformation matrix and the encoder data-based one using Kalman filter. ucar. Matrix from visual representation of transformation · Matrix vector Linear transformations as matrix vector products. Live TV from 60+ channels. If a | {
"domain": "kacpergomolski.pl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754506337405,
"lm_q1q2_score": 0.8183230388271673,
"lm_q2_score": 0.831143045767024,
"openwebmath_perplexity": 628.818077638687,
"openwebmath_score": 0.6772881150245667,
"tags": null,
"url": "http://kacpergomolski.pl/rvxm/matrix-transformation-applications.php"
} |
python, beginner, game
The names you have given to these variables are bad.
The name score contradicts the comment lives.
The name length is too broad. Length of what? It should be arena_length instead.
The name width should be arena_width. I'm assuming that it is related to the arena as well.
When the arena is displayed, it's more common to talk about width and height than about width and length, as the length does not specify any direction.
# VARIABLE DECLARATION #
runner = True
ast_x_coord = []
ast_y_coord = [] | {
"domain": "codereview.stackexchange",
"id": 43472,
"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, beginner, game",
"url": null
} |
c++, windows, embedded
// Keep track of total tests performed in a config file vs. looking for existing log files and picking up from there?
// How many tests should we allow total? 100?
// Would it be fine if SysLat overwrote the tests every time it was restarted? ...I think it would
//
//
//Menu:
// Enumerate all 3D programs that RTSS can run in and display them in a menu
// Fix COM port change settings
// Add lots more menu options - USB options, debug output, data upload, RTSS options(text color)
// Box position manual override toggle
//
//
//Anti-Fraud:
// Create new dynamic build/installation process in order to obscure some code
// Think about hardware/software signatures for uploading data? This probably needs more consideration on the web side
// Obscure most functionality(things that don't need to be optimized) into DLLs(requires a new build/installation process) | {
"domain": "codereview.stackexchange",
"id": 40674,
"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++, windows, embedded",
"url": null
} |
black-holes, differential-geometry, symmetry, metric-tensor, event-horizon
Title: Are black holes perfect spheroids? What I know about black holes (correct me if I'm wrong) is that they are the most compact objects in the universe that have been discovered. Due to all that gravity, wouldn't black holes be a perfect spheroid, sort of like planets are spheroids (due to centrifugal forces)? Can you measure the geometry of a black hole due to its power of warping space-time itself? Yes, they are perfect spheres. But let's understand what is the sphere and why.
The spherical surfaces are the horizons. They are surfaces in space that have perfect spherical geometry. Now, that only holds true for various conditions:
1) they are static black holes, and if they arose from matter/energy collapsing they are in their equilibrium states. There are black holes which are not spherical, which are rotating, and which are called stationary. The spherically symmetric ones are called Schwarzchild black holes, the others Kerr (and Kerr Newman if charged). | {
"domain": "physics.stackexchange",
"id": 32499,
"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": "black-holes, differential-geometry, symmetry, metric-tensor, event-horizon",
"url": null
} |
graphs, sorting
Any help would be great! Suppose you know the list of colors that appear in contiguous parts of an optimal ordering. Then, you can easily find this optimal ordering: simply put as many nodes of the current color in your list as the parent-child order allows and proceed with the next color in your list. This greedy strategy is optimal, because once you have started a color, you will not 'regret' taking a node of the same color later as it adds no cost and only gives more options. If you put all 'free' nodes that already have their parents processed in separate lists, this can be done in $O(n)$, where $n$ is the number of nodes in your forest. | {
"domain": "cs.stackexchange",
"id": 13167,
"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, sorting",
"url": null
} |
homework-and-exercises, electromagnetism, special-relativity, charge, conservation-laws
Title: Deriving continuity equation from 4-current of a charged particle how can i check that following 4-current for a single charged particle
$$j^{\mu}(x)=qc\int d\tau u^{\mu}(\tau)\delta^{4}(x-r(\tau))$$
satisfies continuity equation $$\partial_\mu j^\mu = 0.$$ Formally, you can just take the derivative. Parametrising the worldline by $s$ (not necessarily proper time, could be an affine parameter for light-like lines): $r(s)$, and setting the charge to $1$:
$$
j = \int \delta(x-r)\frac{dr}{ds}ds
$$
I'll rewrite it as:
$$
j = \int \delta(x-r)dr
$$
to emphasise that the 4-current density is independent of the parametrisation. You can now take the derivative in the integral and recognise an antiderivative:
$$
\begin{align}
\partial \cdot j &= \int \partial\delta(x-r)\cdot dr \\
&= [\delta(x-r)] \\
&= 0
\end{align}
$$ | {
"domain": "physics.stackexchange",
"id": 99105,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism, special-relativity, charge, conservation-laws",
"url": null
} |
d-wave, qubo
$$z = \sum_{k=1}^c ky_k$$
where $y_k \in \{0,1\}$. This makes sure that $z$ can take on any integer value between $0$ and $c$. There are many other more efficient and clever ways of expressing $z$ such that $z \leq c$.
Note that this only applies to $q$ being an integer vector with positive entries. If it is rational, the situation becomes slightly more complicated. But the idea is the same. | {
"domain": "quantumcomputing.stackexchange",
"id": 3915,
"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": "d-wave, qubo",
"url": null
} |
ros, 2d-pose-estimate
Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-12-09
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Astronaut on 2012-12-09:
Ok. Thanks. Just a comment regarding using hector_mapping and robot_pose_ekf. So I can use pub_odometry" parameter, to publish the odometry on "scanmatch_odom" topic. So that robot_pose_ekf can subscribe to odom massage published by the hector_mapping. True?
Comment by Astronaut on 2012-12-26:
Hello. Can you tell me please how to incorporate the IMU to been used in hector mapping??I think using IMU can improve the scan matching by Hector mapping..Any help???
Comment by Astronaut on 2013-01-03:
Hello. I can not find any documentation or tutorial how to use and build the hector_localization. Any help or some sample launch file that might help me?? | {
"domain": "robotics.stackexchange",
"id": 12029,
"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, 2d-pose-estimate",
"url": null
} |
php, library
Title: Small PHP MVC Template
The following is a new question based on answers from here: Small PHP Viewer/Controller template
I have written a small MVC template library that I would like some critiques on.
The library is located here
If you are looking for where to start, check out the files in the smallFry/application directory.
I would really love to hear your critiques on:
Code quality
Code clarity
How to improve
Anything else that needs clarification expansion etc
I'm more interested in what I'm doing wrong than right.
Any opinions on the actual usefulness of the library are welcome.
Code examples (all of the code is equal, just on my last question I was asked for some snippets):
Bootstrap.php:
<?php
/**
* Description of Bootstrap
*
* @author nlubin
*/
Class Bootstrap { | {
"domain": "codereview.stackexchange",
"id": 1154,
"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, library",
"url": null
} |
navigation, ros-melodic, turtlebot, ros-kinetic, slam-gmapping
from the root of your workspace (e.g., ~/catkin_ws).
Anytime that you open a new terminal, you need to source two files: the setup.bash for your ROS distribution and the setup.bash for your workspace. It looks like you've already sourced your distribution's setup.bash, now you just need to do the same for your workspace. Again, assuming that the root of your workspace is at ~/catkin_ws and you are in that directory, then you run
source devel/setup.bash
and then ROS should be able to find your compiled gmapping package and the node(s) that you're using. Now your ROS_PACKAGE_PATH environment variable should be set. I've never had to set this on my own.
Originally posted by jayess with karma: 6155 on 2019-01-25
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by turtlebot3 on 2019-01-28:
Perfect!! It worked
Comment by 123nusri@gmail.com on 2020-08-12:
I already did these things but didn't work. | {
"domain": "robotics.stackexchange",
"id": 32343,
"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, ros-melodic, turtlebot, ros-kinetic, slam-gmapping",
"url": null
} |
while the product of their expected values is
$\label{eq:prod-mean} \begin{split} \mathrm{E}(X) \, \mathrm{E}(Y) &= \left( \sum_{x \in \left\lbrace 0,1 \right\rbrace} x \cdot p(x) \right) \cdot \left( \sum_{y \in \left\lbrace 0,1 \right\rbrace} y \cdot p(y) \right) \\ &= \left( 1 \cdot p(X=1) \right) \cdot \left( 1 \cdot p(Y=1) \right) \\ &\overset{\eqref{eq:marg}}{=} \frac{1}{4} \end{split}$
and thus,
$\label{eq:mean-nonmult-qed} \mathrm{E}(X\,Y) \neq \mathrm{E}(X) \, \mathrm{E}(Y) \; .$
Sources:
Metadata: ID: P55 | shortcut: mean-mult | author: JoramSoch | date: 2020-02-17, 21:51. | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9915543750554621,
"lm_q1q2_score": 0.8083473370531656,
"lm_q2_score": 0.8152324848629215,
"openwebmath_perplexity": 420.63916835721625,
"openwebmath_score": 0.90883469581604,
"tags": null,
"url": "https://statproofbook.github.io/P/mean-mult"
} |
the distance between y{\displaystyle \mathbf {y} } and Xβ. of linear least squares estimation, looking at it with calculus, linear algebra and geometry. In this post I’ll illustrate a more elegant view of least-squares regression — the so-called “linear algebra” view. $$Work the problems on your own and check your answers when you're done. The example we showed in part 2 dealt with fitting a straight line to a set of observations. Perhaps the qualification could be ignored. 6 min read. There is no null space component, and the least squares solution is a point. Therefore b D5 3t is the best line—it comes closest to the three points. This is often the case when the number of equations exceeds the number of unknowns (an overdetermined linear system). \right\} \color{blue}{\mathbf{A}^{+} b} + Many calculations become simpler when working with a … Therefore, every least squares solution, ^x, satis es the normal equation. Is it more efficient to send a fleet of generation ships or one | {
"domain": "kezklinika.hu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575157745541,
"lm_q1q2_score": 0.8078481160038832,
"lm_q2_score": 0.8221891370573388,
"openwebmath_perplexity": 977.894354635926,
"openwebmath_score": 0.7075470685958862,
"tags": null,
"url": "https://kezklinika.hu/6siwd8v1/zb71a.php?e7ea89=least-squares-solution-linear-algebra"
} |
homework-and-exercises, metric-tensor, tensor-calculus, notation, linear-algebra
From the image above, I have also been taught how to use the Kronecker delta metric (or identity matrix), which in the case of a $2\times 2$ identity matrix is $\delta^{ij}=\delta_{ij}=\begin{pmatrix}1 & 0 \\ 0 & 1 \\\end{pmatrix}$. So the way I see it, multiplying by the $\delta^{ij}$ essentially changes a row vector to a column vector, and my understanding of this is because the 'dummy index' ($j$ in the example in the top right of the image) is contracted upon so that the Kronecker is only non-zero when $i=j$ and this 'somehow' changes the original $U_i$ to $U^i$. Why this works the way it does is a question for another time, but for now, I would like to focus on trying to understand why the authors' solutions look the way they do for matrix multiplication.
For the authors' first answer, why are both indices for $A$ and $B$ written down ($A_{ij}$ and $B_{ik}$) when I was explicitly told to keep one index up and the other down? | {
"domain": "physics.stackexchange",
"id": 83271,
"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, metric-tensor, tensor-calculus, notation, linear-algebra",
"url": null
} |
nuclear-physics, hydrogen, fusion, cold-fusion
Title: Why can't two hydrogen atoms be slowly "pressed together" (fused to form helium) with some advanced device (not collided at high speed)? I apologize for my lack of physics knowledge, and I won't be gaining much any time soon, since I'm focusing mostly on work and physical exercise. I can't help but wonder about this:
Questions:
What are the main barriers preventing physicists from slowly pressing two hydrogen atoms together to fuse them into helium? (as opposed to very many high-speed collisions)
Is such a device that would do that physically impossible to construct, or just very much harder to construct than one of those magnetic-confinement, toroidal, plasma trap, fusion reactors?
I won't ask any more ignorant questions for a while (maybe about 6 months). Here is the binding energy curve that plots the energy released by fusion for the low mass elements | {
"domain": "physics.stackexchange",
"id": 48205,
"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": "nuclear-physics, hydrogen, fusion, cold-fusion",
"url": null
} |
return 1/np.sqrt((omega**2-omega_drive**2)**2 + (q*omega_drive)**2)
omega = 1
q = np.linspace(0.5, 1.5, 20)
omega_D = omega * np.linspace(0.5, 1.5, 40)
qq, omega_DD = np.meshgrid(q, omega_D)
In [14]:
# Calculate the amplitude for each omega_D and q
a = amplitude(omega, omega_DD, qq)
# If X and/or Y are 1-D arrays they will be expanded
# as needed into the appropriate 2-D arrays.
# I.e. no need of np.meshgrid in this case.
plt.pcolormesh(omega_D, q, a.T) # a.T returns the transpose of a
plt.colorbar(label='Amplitude')
plt.ylabel("q")
plt.xlabel("$\omega_D$")
plt.show()
We will now investigate the calculation times further. To do this, we will use Jupyter's %timeit function. It calculates the time it takes to execute a command or cell. Lines prefixed by %timeit will be timed on their own. Starting a cell with %%timeit, will time the whole cell.
In [15]:
%timeit a = amplitude(omega, omega_DD, qq)
8.97 µs ± 99.3 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | {
"domain": "jupyter.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109485172559,
"lm_q1q2_score": 0.8466062664639717,
"lm_q2_score": 0.8596637433190939,
"openwebmath_perplexity": 1356.4796297145695,
"openwebmath_score": 0.44402772188186646,
"tags": null,
"url": "https://nbviewer.jupyter.org/urls/www.numfys.net/media/notebooks/NumpyIntermediate.ipynb"
} |
cosmology, dark-matter, dark-energy
Title: Can the proportion of dark energy change?
This post generalizes the posts:
- Proportion of dark matter/energy to other matters/energy at the beginning of the universe?
- How do people calculate proportions of dark matter, dark energy and baryonic matter of the universe? | {
"domain": "physics.stackexchange",
"id": 14434,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, dark-matter, dark-energy",
"url": null
} |
c++, event-handling
In the class it is not needed.
Avoid protected on variables:
protected:
bool m_Handled = false;
It does not really provide any protection from accidental abuse (which is what the public/protected/private is about. You are giving your user an entry point to abuse your class.
If you add something in the constructor:
EventListener()
{
EventManager::AddListener(this);
}
I would normally expect you to remove it in the destructor. Or have a very clear comment on why we don't need to remove it.
I would pass by R-Value reference here:
template<class T>
void Listen(EventBehavior& behavior)
I would wrtie like this:
template<class T>
void Listen(EventBehavior&& behavior)
{
// STUFF | {
"domain": "codereview.stackexchange",
"id": 32918,
"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++, event-handling",
"url": null
} |
electromagnetism, gravity, electrostatics, newtonian-gravity, coulombs-law
Title: What is the difference between an electric field and gravitational field? Since the electrostatic field and the Newtonian gravitational field share a similar form: proportional to
$$
\frac{1}{r^2}
$$
Is there any qualitative difference between motions under the influence of electric field and gravitational field? When we focus on classical mechanics and only take charged particles (mass/ actual electric charge) there is only one difference between the trajectories of the particle in an electrical/ gravitational field: in the electric fields particles can have positive/ negatice charge thus move towards/ away of the source (or to put it that way: in the electric field there are charges which never results in bounded solutions). | {
"domain": "physics.stackexchange",
"id": 24849,
"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, gravity, electrostatics, newtonian-gravity, coulombs-law",
"url": null
} |
The other start at a random vertex v: Disconnected graph is Disconnected if at least two vertices of graph! Connected graph 've already used six vertices and six incident edges worldwide as of 2017... Depth-First search with examples in Java, C, Python, and C++ a breadth-first search and depth-first search examples... Bfs and DFS said to be Biconnected if: it is possible to reach every vertex every! The adjacency list representation of the nodes to be Biconnected if: it is related... While ( any unvisited vertex exist ) BFS ( G ) G is.... Writing great answers Java, and C++ the un-directed graph to remember the nodes together of... G, and we get all strongly connected components of the algorithm breathe while to... Answer ”, you will understand the working of BFS, return the shortest path from one to. By Sachin Malhotra bfs connected graph Dive into graph TraversalsThere are over 2.07 billion monthly Facebook. Then move towards the next-level neighbour nodes vertices, and ideally cast | {
"domain": "astburygarage.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.95598134762883,
"lm_q1q2_score": 0.8200103124373601,
"lm_q2_score": 0.857768108626046,
"openwebmath_perplexity": 1039.2370077693708,
"openwebmath_score": 0.3814409077167511,
"tags": null,
"url": "http://www.astburygarage.com/0rfpx8at/bfs-connected-graph-ff6f49"
} |
) power. The variables optionally having exponents an example of a first degree polynomial functions are also known constant! Express them in their simplest form expressions ⦠a polynomial of degree three is a... Power is a fraction ) ( power is a fraction ) ( power is negative ) B. Terminology 1 y^m. Express them in their simplest form 50, 10a + 4b + 20 or... Of polynomials not polynomials ( power is a fraction ) ( power is negative B.!: polynomials, rational expressions ⦠a polynomial ) B. Terminology 1 function f ( )... ) ( power is a fraction ) ( power is a fraction ) ( is... A fraction ) ( power is a fraction ) ( power is negative ) B. Terminology 1 example, following..., degree, and much more f ( x ) = mx + b an... Optionally having exponents ( power is a fraction ) ( power is a ). Two is called a third-degree or cubic polynomial is a fraction ) ( power is a fraction ) power! ( x ) = mx + b is an example of a first degree polynomials: 2x +,., xyz + 50, 10a + 4b + 20 + 1, +. | {
"domain": "brian-walker.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126457229185,
"lm_q1q2_score": 0.8069113111511725,
"lm_q2_score": 0.8244619242200082,
"openwebmath_perplexity": 802.8392468650438,
"openwebmath_score": 0.7237367630004883,
"tags": null,
"url": "http://brian-walker.com/81euqqk/page.php?725dc8=degree-of-a-polynomial-example"
} |
gazebo, groovy
[rosmake-1] Finished <<< self_test ROS_NOBUILD in package self_test
[rosmake-0] Starting >>> simmechanics_to_urdf [ make ]
[rosmake-0] Finished <<< simmechanics_to_urdf ROS_NOBUILD in package simmechanics_to_urdf
[rosmake-2] Finished <<< kdl ROS_NOBUILD in package kdl
No Makefile in package kdl
[rosmake-0] Starting >>> timestamp_tools [ make ]
[rosmake-1] Starting >>> driver_base [ make ]
[rosmake-0] Finished <<< timestamp_tools ROS_NOBUILD in package timestamp_tools
[rosmake-2] Starting >>> eigen_conversions [ make ] | {
"domain": "robotics.stackexchange",
"id": 2980,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo, groovy",
"url": null
} |
python, python-2.x, json, file-system
You can find the code, with more backstory, details, and other pieces of code that help run the tool as a background agent here: https://github.com/boulis/Track-Dir-Changes
import json, subprocess
from argparse import ArgumentParser
from os import walk
from os.path import join, getsize
from datetime import datetime | {
"domain": "codereview.stackexchange",
"id": 25204,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-2.x, json, file-system",
"url": null
} |
special-relativity, terminology, definition
To simplify calculations, in some cases we can approximate the energy by just calculating the biggest term. When the kinetic energy of a particle is much smaller than its rest energy (specifically, when $\mathrm{p \ll mc}$), then $\mathrm{E^2 = p^2 c^2 + m^2 c^4 \approx m^2 c^4}$, from which $\mathrm{E \approx mc^2}$. This is the so-called "non-relativistic limit", where classical mechanics is a good description. This turns out to be the case for most of chemistry. Particles said to be "non-relativistic" obey this approximation with good accuracy. | {
"domain": "physics.stackexchange",
"id": 80991,
"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, terminology, definition",
"url": null
} |
fluid-statics
So it's true to a simple-minded physicist's approximation (if I wanted to know what kind of diving suit I'd need to go $1\,\mathrm{km}$ down it would be a good enough approximation I think) but in real life things are hugely complicated. | {
"domain": "physics.stackexchange",
"id": 54963,
"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": "fluid-statics",
"url": null
} |
ros2
First, my discovery that my Fedora 36 personal workstation and Pi OS-based Pi would not install ROS Humble by any means I attempted. So, I installed Ubuntu on the Pi and ate the sluggish user interface (since Ubuntu 22.04 lacks hardware acceleration for the board, apparently). Now, I got the camera publishing frames, and moved onto the IMU. The plan was to use ROSSerial to receive IMU data from the Arduino. Experienced developers will realize why that failed: ROSSerial is not compatible with ROS2.
As you can imagine, I have begun re-considering my approach to the internal electronics. PixHawk for I/O, with MAVROS? Pi Pico, running MicroROS? Controller Area Network (CAN) hats for the Pi and Arduino? Connecting the IMU via I2C and writing a custom node? | {
"domain": "robotics.stackexchange",
"id": 37857,
"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": "ros2",
"url": null
} |
matlab, random-process, moving-average
Single precision floating point has 25 bits of precision as given by the 23 bit mantissa, plus the sign bit, plus the Robert B-J "hidden-1" bit. Double precision floating point equivalently has 54 bits of precision. | {
"domain": "dsp.stackexchange",
"id": 9383,
"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": "matlab, random-process, moving-average",
"url": null
} |
electromagnetism, field-theory, gauge-theory, polarization, degrees-of-freedom
Title: Reviewing an old argument about the number of DOFs of EM field For free electromagnetic fields, it is possible to choose a gauge such that the scalar potential $\phi(t,{\bf x})=0$ and the vector potential ${\bf A}(t,{\bf x})$ satisfies the Coulomb gauge condition $\nabla\cdot{\bf A}(t,{\bf x})=0$. If the Fourier amplitudes of the spatial Fourier transform of ${\bf A}(t,{\bf x})$ are denoted by $\tilde{\bf A}_{\bf k}$, the latter condition is equivalent to $${\bf k}\cdot\tilde{\bf A}_{\bf k}=0,~~ \text{for each} ~{\bf k}.\tag{1}$$ Therefore, the $\tilde{\bf A}_{\bf k}$ vector is confined to a plane transverse to ${\bf k}$, and therefore has two independent components. This explains why there are two independent degrees of freedom! But $(1)$ is true for each ${\bf k}$ and there are infinitely many ${\bf k}$ in the Fourier decomposition of ${\bf A}(t,{\bf x})$. | {
"domain": "physics.stackexchange",
"id": 66307,
"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, field-theory, gauge-theory, polarization, degrees-of-freedom",
"url": null
} |
architecture, experimental-realization, superconducting-quantum-computing
to a script, then compiled and potentially optimised for the hardware. That is, if you've got a function, it can perform classical operations, as well as make calls to the quantum processor to perform any required quantum operations. This leads me to the first point: | {
"domain": "quantumcomputing.stackexchange",
"id": 4961,
"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": "architecture, experimental-realization, superconducting-quantum-computing",
"url": null
} |
diagram for the beam given in fig. Check for shaft deflections. Determine the following: a) Angle of twist at cm for the shaft shown below. Calculate the maximum Principal Stress and the maximum Shear Stress in the disc. · τ is the maximum shear stress at the outer surface. As I said, I know that this is not the way to calculate the answer to this question. Shafts AB and CD are solid of diameter d. In the hollow shaft maximum torque calculator, enter the maximum shear stress, shaft outside and inside diameter experienced by a hollow shaft to calculate the maximum twisting moment (torque). Power transmitted by a circular hollow shaft with the help of this post. How much torque can be applied to a shaft of circular cross section. Using hand calculations, determine the maximum stress in the component. Problem 3: Two identical hollow shafts are connected by a flanged coupling. Find the size of the hollow shaft if the maximum shearing stress is to be the same as for the solid shaft. Other | {
"domain": "foresteria-lacura.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9744347868191549,
"lm_q1q2_score": 0.8141242283557442,
"lm_q2_score": 0.8354835432479663,
"openwebmath_perplexity": 1072.6670445682296,
"openwebmath_score": 0.7154282927513123,
"tags": null,
"url": "http://foresteria-lacura.it/rjry/maximum-and-minimum-shear-stress-in-hollow-circular-shaft.html"
} |
together with the physical constants of the undriven oscillator: the mass, spring constant, and damping strength. over time, and if there is no damping effect then the amplitude remains constant over time. Unstable Re(s) Im(s) Overdamped or Critically damped Undamped Underdamped Underdamped. , constant amplitude) oscillation of this type is called driven damped harmonic oscillation. We show that pseudo PT symmetry guarantees the reality of the quasi energy spectrum in our system. Note that the quality factor Tand the damping constant Γare related. 2 microHenry. After this time, what are the following? (a) the frequency of oscillation of the LC circuit. Oscillations II: Damped and/or Driven Oscillations Michael Fowler 3/24/09 Introducing Damping We’ll assume the damping force is proportional to the velocity, and, of course, in the opposite direction. Find the time in which the amplitude decreases to half of its original value. oscillations die out, or are “damped” Math is complicated! | {
"domain": "gremium-franconia.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137868795702,
"lm_q1q2_score": 0.8140293382511515,
"lm_q2_score": 0.8289388083214156,
"openwebmath_perplexity": 760.3194788120288,
"openwebmath_score": 0.795654296875,
"tags": null,
"url": "http://ilug.gremium-franconia.de/time-constant-for-damped-oscillation.html"
} |
formal-languages, context-free, formal-grammars
For the second, you're correct that the class of deterministic CFLs is not closed under union. However, the class of CFLs is closed under union. That is, the union of two DCFLs is not necessarily a DCFL but it is definitely a CFL. The argument "$\overline{A}$ and $\overline{B}$ are deterministic context-free, so they are context-free, so $\overline{A}\cup\overline{B}$ is context-free" is implicit in the proof you quote. | {
"domain": "cs.stackexchange",
"id": 5342,
"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, context-free, formal-grammars",
"url": null
} |
homework-and-exercises, newtonian-mechanics, newtonian-gravity, units, dimensional-analysis
Title: Infinite plane gravity: what is "mass density per unit area"? Recently I learned that the gravity of an infinity plane is independent of the distance from that plane. In fact it is
$$g = 2\pi G \sigma$$
where $\sigma$ is "the mass density of the plane per unit area".
I am struggling to understand what this actually means. I do understand mass density (per volume), but "per area"? Would this not always be zero?
Looking for example at a $2\,mm$ thick sheet of copper, where copper has a mass density of $\rho_{\text{Cu}} =8.92 \,g/cm³ $. What then is the $\sigma$ on the surface of the sheet? Is it just (at least approximately) the stacked density on each surface point, i.e. $\sigma = w\cdot\rho$ where $w=0.2\,cm$ is the thickness of the plate?
What if the plate is not negligibly thick but, say $w=1\,km$?
Edit: removed reference to finite plane, some comments may no longer apply. Let’s start with 1D. | {
"domain": "physics.stackexchange",
"id": 50232,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, newtonian-gravity, units, dimensional-analysis",
"url": null
} |
validation, asynchronous, f#, finance, entity-framework-core
let requested (context: DbContext.IbanDbContext) memberId =
async {
let requested = memberIbansWith context memberId IbanState.Requested
return! requested.Select(fun iban -> Some iban)
.SingleOrDefaultAsync()
|> Async.AwaitTask
}
let avoidDuplicateRequest (context: DbContext.IbanDbContext) memberId =
async {
let! exists = context.Ibans.AnyAsync(fun iban ->
iban.MemberId = memberId &&
iban.State = IbanState.Requested)
|> Async.AwaitTask
if exists
then return Error AlreadyRequested
else return Ok (context, memberId)
} | {
"domain": "codereview.stackexchange",
"id": 35383,
"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": "validation, asynchronous, f#, finance, entity-framework-core",
"url": null
} |
lagrangian-formalism, field-theory, boundary-conditions, variational-principle, variational-calculus
Title: Identification of the variation on the boundary and why $\delta S_{\partial V}=0$ I recently asked this question about variational principles and how it all works. The essential answer I got was to go read a book on the calculus of variations, which I did, and this helped me make sense of what was going on. I have one lingering question.
For finite volume $\mathcal{R}^3$ and $V=\mathcal{R}^3\otimes[t_i,t_f]$, we write out the variation of the action of a classical field $\varphi$ as
$$
\delta S=\int_V\left(\frac{\partial\mathcal{L}}{\partial\varphi(t,x)}-\partial_\mu\frac{\partial\mathcal{L}}{\partial\partial_\mu\varphi}\right)\delta\varphi(t,x)+\int_V\left(\partial_\mu\left(\delta\varphi\frac{\partial\mathcal{L}}{\partial\partial_\mu\varphi}\right)\right)
$$
and identify the terms on the right of the equality as $\delta S_V$ and $\delta S_{\partial V}$. I don't fully understand how the right-most term above is identified as the "variation on the boundary". | {
"domain": "physics.stackexchange",
"id": 100100,
"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": "lagrangian-formalism, field-theory, boundary-conditions, variational-principle, variational-calculus",
"url": null
} |
fft, audio, embedded-systems
A-Weighting: I've generated an A weighting table in code based on the values of the bins. In this case, 256 values for 86, 172 ... up to 22 kHz. Clearly the point is to add the weighing on to compensate for the human frequency response - which translates PSL to phons.
What is confusing me is that I have seen some formulae that suggest that the dBA measurement is done by taking only single measurements for each octave starting at a suitable low frequency i.e. 33.25 Hz. Then you create a table with 10 entries in it taking you up to 16 kHz and apply the A-Weighting to those. You basically do an antilog, average, log of the 10 values and bob's your uncle. | {
"domain": "dsp.stackexchange",
"id": 9818,
"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, audio, embedded-systems",
"url": null
} |
astrophysics, planets, exoplanets
Incidentally, although we have never directly observed a Population III star it's believed that these stars were enormous compared to most stars today, and their deaths created gamma ray bursts that we can observe. In particular GRB 090423 may have come from a Population III star as it happened about 13 billion years ago.
The oldest star know to have planets is HIP 11952 (well, it was when I last looked - this is a rapidly changing area). However this star has a metallicity only 1% that of the Sun, and the two planets found are more like Jupiter than the Earth. Whether the system has, or had (the two hot Jupiters may have ejected them) rocky planets we can't say.
One of the oldest known galaxies with a metallicity high enough to form terrestrial planets is a quasar that formed about 2.8 billion years after the Big Bang. Obviously we'll never know if any of the stars in that galaxy actually have terrestrial planets. | {
"domain": "physics.stackexchange",
"id": 11557,
"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": "astrophysics, planets, exoplanets",
"url": null
} |
formal-languages, regular-expressions, closure-properties
A string substitution or simply a substitution is a mapping that maps each character to a language (possibly in a different alphabet). For example, let $f(a)=\{x\}$ and $f(b)=\{y, xz\}$. Then $f(ab)=\{xy,xxz\}$ and $f(\{a^2, b^2\})=\{x^2, y^2, yxz, xzy, xzxz\}$. The effect of substitution is not only changing the characters, but also including more variations. A substitution can be considered as the "union" of many homomorphisms. | {
"domain": "cs.stackexchange",
"id": 13196,
"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-expressions, closure-properties",
"url": null
} |
Option to return an implicit solution, specified as false or true. For a differential equation with variables x and y(x), an implicit solution has the form F(y(x)) = g(x).
By default, the solver tries to find an explicit solution y(x) = f(x) analytically when solving a differential equation. If dsolve cannot find an explicit solution, then you can try finding a solution in implicit form by specifying the 'Implicit' option to true.
Maximum degree of polynomial equations for which the solver uses explicit formulas, specified as a positive integer smaller than 5. dsolve does not use explicit formulas when solving polynomial equations of degrees larger than 'MaxDegree'. | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308786041315,
"lm_q1q2_score": 0.8653921711289246,
"lm_q2_score": 0.8757869932689566,
"openwebmath_perplexity": 1471.9728524477512,
"openwebmath_score": 0.7705014944076538,
"tags": null,
"url": "https://it.mathworks.com/help/symbolic/dsolve.html"
} |
neuroscience, neurophysiology, sensation, hearing
Fig. 1. Hair cell transduction. source: Pasadena City College
References
- Kandel et al., Principles of Neural Science, 4th ed.
- Müller, Hear Res (1996), 94(1-2): 148-56 | {
"domain": "biology.stackexchange",
"id": 8987,
"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": "neuroscience, neurophysiology, sensation, hearing",
"url": null
} |
java, swing
More little things:
Your main-method could be simplified a bit:
public static void main (String[] args) {
new App();
}
is sufficient with your current code. The instance created is never used anywhere else.
You're splitting lines at arguments. I personally find that hard to read and would only split if the lines get too long.
You're overqualifying. The mouselistener code doesn't need PaintCanvas.this. anywhere. Since the listener is declared in a non-static inner class it automatically has access to the enclosing class fields. (same applies for prepareScreen) | {
"domain": "codereview.stackexchange",
"id": 21033,
"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, swing",
"url": null
} |
semantics, operational-semantics, denotational-semantics
Title: What's the difference between: operational, denotational and axiomatic semantics? Recap of the terms from the dictionary:
semantics: the study of meaning in a language (words, phrases, etc) and of language constructs in programming languages (basically any syntactically valid part of a program that generates an instruction or a sequence of instructions that perform a specific task when executed by the CPU)
operational: related to the activities involved in doing or producing something
denotational: the main meaning of a word
axiomatic: obviously true and therefore not needing to be proved | {
"domain": "cs.stackexchange",
"id": 13541,
"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": "semantics, operational-semantics, denotational-semantics",
"url": null
} |
rosjava, android
Title: Error after adding new listener on android
Hi,
I have launched a simple publisher on my linux pc with ros and then i tried to modify the pubsub tutorial to show messages published by ros machine on the phone screen. Logcat informs me that subscriber was succesfully registered but there are also some errors. In the end nothing appears on my android device screen. Could you help me resolve this problem?
Here is code:
MainActivity
public class MainActivity extends RosActivity {
private RosTextView<std_msgs.String> rosTextViewPublikowanie;
public MainActivity() {
// The RosActivity constructor configures the notification title and ticker
// messages.
super("Pubsub Tutorial", "Pubsub Tutorial");
}
@SuppressWarnings("unchecked")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main); | {
"domain": "robotics.stackexchange",
"id": 14173,
"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": "rosjava, android",
"url": null
} |
in their binary formats. This means you are either multiplying each digit by 0 or 1, which will give you either a 0 or 1 as the answer. Test your method out on these numbers, and find a way to check your work. Binary Multiplication Binary multiplication is performed in same way as decimal numbers. The group operation is multiplication of complex numbers. E A B C E E A B C A A B C E B B C E A C C E A B T Combination order is "top" then "side"; e. 4 cm) × 100% = 5. See full list on byjus. Binary multiplication is arguably simpler than its decimal counterpart. An example is the unary and binary minus, (). Let’s add two binary numbers to understand the binary addition. If you want to build up one for yourself, you can look at this scheme of 2 bits times 2 bits multiplier -. What is the result of multiplying the binary number 10010 by 101? 1011010. Then R is called a commutative ring with respect to these operations if the following properties hold: (i) Closure: If a,b R, then the sum a+b | {
"domain": "fotoclubtiendeveen.nl",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754497285467,
"lm_q1q2_score": 0.8536621299034711,
"lm_q2_score": 0.8670357666736773,
"openwebmath_perplexity": 665.2859832549126,
"openwebmath_score": 0.703130841255188,
"tags": null,
"url": "http://nibw.fotoclubtiendeveen.nl/binary-multiplication-rules.html"
} |
distance, redshift, parallax
One way of looking at this is to ask what parallax baseline would be needed to measure a parallax at 100 million light years with current measurement technology.
Gaia can measure stellar positions to about 10 microarcseconds. The parallax at 100 Mlyr is about $0.033b$ microarcseconds, where $b$ is the parallax baseline in astronomical units (the Earth-Sun distance). To get a parallax measurement precise to 10% would require a baseline of $b \sim 3000$ au - i.e. larger than the solar system. | {
"domain": "physics.stackexchange",
"id": 45392,
"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": "distance, redshift, parallax",
"url": null
} |
Your understanding of material implication ($\implies$) is exactly right, and as Jyrki said, your reasoning could stand as a perfectly good answer to the question. You could also point out that the teacher and class seem to be confusing $\implies$ and $\iff$: $x^2\ne x\iff x\ne 1$ is of course false precisely because $1$ isn't the only number that is its own square. – Brian M. Scott Dec 5 '11 at 15:34 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426443092215,
"lm_q1q2_score": 0.8445298125547868,
"lm_q2_score": 0.8670357683915538,
"openwebmath_perplexity": 387.94934331114007,
"openwebmath_score": 0.8064426779747009,
"tags": null,
"url": "http://math.stackexchange.com/questions/88565/true-or-false-x2-ne-x-implies-x-ne-1"
} |
c, multithreading, linux, status-monitoring
aStrRegex = "proc_type1"; //type1
reCompiled = pcre_compile(aStrRegex, 0, &pcreErrorStr, &pcreErrorOffset, NULL); //compile the regex
if (reCompiled == NULL) {
printf("ERROR: Could not compile '%s': %s\n", aStrRegex, pcreErrorStr);
pthread_join(systr, NULL); //join the system utilization thread
if (systemUtilization > (long double) cpus) { //sanity check for HT
systemUtilization = (long double) cpus;
}
printf("sys=%Lf\n", systemUtilization); //print info
printf("cgrType2=%f\n", 0.0);
printf("cgrType1=%f\n", 0.0);
printf("cgrOther=%Lf\n", systemUtilization);
pthread_mutex_destroy(&total_lock); //clean up mutex lock
pthread_cond_destroy(&ok_to_add);
return (-1);
}
// Optimize the regex
pcreExtra = pcre_study(reCompiled, 0, &pcreErrorStr);
/* pcre_study() returns NULL for both errors and when it can not optimize the regex. The last argument is how one checks for | {
"domain": "codereview.stackexchange",
"id": 42971,
"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, linux, status-monitoring",
"url": null
} |
homework-and-exercises, projectile, calculus
I used the concept of projectile motion and used the formula$$R=\frac{u^2\cdot sin2\alpha}{g_0}$$
where $u=$initial velocity, $\alpha$=angle of projection and $g_0$=effective acceleration due to gravity
Here $u=v_0$, $\alpha=\phi$ and $g_0=g cos \theta$
Putting in the equation, $$R=\frac{v_0^2sin2\phi}{gcos \theta}$$
Is this formula correct ? If no, what is the correct formula? It's very easy to get confused by these problems, especially as there are now two angles in play ($\theta$ and $\phi$).
Yet the solution is fairly straightforward.
Firstly, consider the angle of launch to be $\theta+\phi$.
Now compute a function, call it $y_p$, that describes the projectile's flight path as:
$$y_p=f(\theta+\phi, v_0, x)$$
You'll find this in Wikipedia.
Now define a second function, call it $y_s$, that defines the slope (a line) going through $(0,0)$ at angle $\theta$:
$$y_s=g(\theta, x)$$
The projectile hits the slope when:
$$y_p=y_s$$ | {
"domain": "physics.stackexchange",
"id": 83586,
"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, projectile, calculus",
"url": null
} |
python, python-3.x, object-oriented, matrix, mathematics
def __repr__(self):
return f"Matrix({self.matrix!r})"
>>> Matrix.zeros(2, 2)
Matrix([[0, 0], [0, 0]])
Instead of using * both for scalar and matrix multiplication, you could implement the (normally unused) operator @, which is called matrix multiplication. In order to do so, simply implement the dunder method __matmul__. Even if you want * to do both things, I would implement __matmul__ anyway and just use self @ other in the definition of __mul__.
Use the built-in sum if you sum up things in a loop:
determinant = sum((-1)**c * matrix[0][c] * self.determinant_helper(self.get_minor(matrix, 0, c))
for c in range(len(matrix)))
You can also iterate over the entries and indices at the same time using enumerate:
determinant = sum((-1)**i * m_0i * self.determinant_helper(self.get_minor(matrix, 0, i))
for i, m_0i in enumerate(matrix[0])) | {
"domain": "codereview.stackexchange",
"id": 38613,
"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, object-oriented, matrix, mathematics",
"url": null
} |
javascript, performance, sorting, ecmascript-6
Only works with positive integers.
Has to loop over the entire array twice.
Doesn't allow for duplicate items.
It has probably other downsides that I cannot currently think of.
So what I want to figure out is: | {
"domain": "codereview.stackexchange",
"id": 42194,
"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, performance, sorting, ecmascript-6",
"url": null
} |
algorithms, graphs, counting
The key fact is that a nonroot vertex v is a cut vertex (or articulation point) separating two biconnected components if and only if there is a child y of v such that lowpoint(y) ≥ depth(v). This property can be tested once the depth-first search returned from every child of v (i.e., just before v gets popped off the depth-first-search stack), and if true, v separates the graph into different biconnected components. This can be represented by computing one biconnected component out of every such y (a component which contains y will contain the subtree of y, plus v), and then erasing the subtree of y from the tree. | {
"domain": "cs.stackexchange",
"id": 7681,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, graphs, counting",
"url": null
} |
electrostatics, capacitance, dielectric
(From JEE Advanced 2015)
Even here I could split it in 2 ways-
(i)
(ii)
Here (i) is the correct way but (ii) isn't. I do not understand how either could be wrong or right.
It Would really help if someone could point out what I am missing out.
(Please Note: The spaces I have left between the dielectrics in my solution are just to illustrate how I split the system. They do not indicate real spaces.) I think It all comes down to what is a parallel connection and what is a series connection.
The potential over a capacitor is given as $V=Ed$ , where $E$ is the reduced electric field due to the insertion of dielectric k, as $$E=\frac{E_°}{k}$$ , where $E_°$ is the electric field with air as the dielectric medium. This implies that the electric field will be different for different dielectrics and hence the voltage will also change. | {
"domain": "physics.stackexchange",
"id": 76670,
"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, capacitance, dielectric",
"url": null
} |
np-hardness, np-complete, unique-solution, promise-problems
Hence I was wondering if there was any NP-complete problem that was known to admit a poly-time algorithm under a uniqueness promise. No NP-complete problem is known to admit a polynomial-time algorithm under uniqueness promise. Valiant and Vazirani theorem applies to any known natural NP-complete problem.
For all known NP-complete problems, there is a parsimonious reduction from 3SAT. Oded Goldreich states the fact that "all known reductions among natural $NP$-complete problems are either parsimonious or can be easily modified to be so". ( Computational Complexity: A Conceptual Perspective By Oded Goldreich).
Edit: This edit is solely to allow change of votes. | {
"domain": "cstheory.stackexchange",
"id": 5179,
"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": "np-hardness, np-complete, unique-solution, promise-problems",
"url": null
} |
ros, ros2, transform, tf2
tf2::Transform odomDelta, old, current;
tf2::fromMsg( oldOdomTf.transform, old );
tf2::fromMsg( currentOdomTf.transform, current );
odomDelta = current * old.inverse();
latest_tf_ = latest_tf_ * odomDelta; // get new map pose
Output is this:
[INFO 1566381525.298737439] [testNode]: transform from map to odom: x: 1.00 y: 1.61 yaw: -1.57
[INFO 1566381525.298759261] [testNode]: get transform from old base_link to odom: x: 0.60 y: 0.00 yaw: 0.00
[INFO 1566381525.298953778] [testNode]: get transform from current base_link to odom: x: 0.70 y: 0.00 yaw: 0.00
[INFO 1566381525.299004058] [testNode]: transform from old odom to new odom: x: 0.10 y: 0.00 yaw: 0.00
[INFO 1566381525.299014972] [testNode]: transform from map to odom with time compensation: x: 1.00 y: 1.51 yaw: -1.57 | {
"domain": "robotics.stackexchange",
"id": 33655,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, transform, tf2",
"url": null
} |
non-locality, nonlocal-games
Title: In the CHSH game, why do $a,b$ need to be the same unless $x=y=1$? In this lecture, in the CHSH game section, it is claimed that a and b must be the same unless x and y are both 1. Can someone explain why? I see it the other way around. The condition is that for $a,b,x,y\in\{0,1\}$, they require
$$
a\oplus b=xy.
$$
So, if $x$ and $y$ are both 1, it requires $a\oplus b=1$, i.e. $a$ and $b$ should be different.
If one of $x$ or $y$ is 0, then $a\oplus b=0$, meaning $a=b$. Therefore, $a$ and $b$ must be the same unless $x$ and $y$ are both 1. | {
"domain": "quantumcomputing.stackexchange",
"id": 4306,
"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": "non-locality, nonlocal-games",
"url": null
} |
python, beginner, python-3.x
This way, you can refer to card.rank or card.suit directly. The card suit should be an enum.Enum as well, instead of just an arbitrary string - it'll be easier to compare against. Also it'll make your life easier if you make the ranks just the values 2 thru 14. For example:
def _is_straight(cards):
ranks = sorted(c.rank for c in ranks)
# two cases: the wheel and not the wheel
return ranks in (list(range(ranks[0], ranks[0]+5)), [2, 3, 4, 5, 14]) | {
"domain": "codereview.stackexchange",
"id": 17425,
"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, beginner, python-3.x",
"url": null
} |
Am I wrong? I have nothing to compare my answer to so I don't really know...
-
Yes, it’s called the range (or by some the image). – Brian M. Scott Dec 2 '12 at 10:33
Even though it’s a parabola, it might be invertible on the domain $[0,3]$, much as $g(x)=x^2$ is invertible on the domain $[0,3]$. However, $f(1)=4-2=2=12-10=f(3)$, so $f$ is not injective on $[0,3]$ and therefore is not invertible on $[0,3]$.
You could probably find this example of non-injectivity by examining the graph of $y=f(x)$. I simply set
$$y=f(x)=4x-(x^2+1)=-x^2+4x-1\;,$$
rearranged that as $x^2-4x+1+y=0$, and used the quadratic formula to find that
$$x=\frac{4\pm\sqrt{16-4y}}2=2\pm\sqrt{4-y}\;.$$
You’d already observed that the extreme values of $y$ are $-1$ and $3$, so I looked at these values of $y$ to get a better idea of what was going on and was fortunate with $y=3$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9711290963960278,
"lm_q1q2_score": 0.8402442781181713,
"lm_q2_score": 0.8652240791017536,
"openwebmath_perplexity": 93.4015740201743,
"openwebmath_score": 0.8975659608840942,
"tags": null,
"url": "http://math.stackexchange.com/questions/249119/easy-question-about-surjectivity-for-fx-4x-x21"
} |
are irrational, as are some useful values like #pi# and #e#.. To find the irrational numbers between two numbers like #2 and 3# we need to first find squares of the two numbers which in this case are #2^2=4 and 3^2=9#. Number System Notes. How to Write Irrational Numbers as Decimals. A rational number is a number that can be written as a ratio. Roots of all numbers that are not perfect squares (NPS) are irrational, as are some useful values like #pi# and #e#.. To find the irrational numbers between two numbers like #2 and 3# we need to first find squares of the two numbers which in this case are #2^2=4 and 3^2=9#. Now let us take any two numbers, say a and b. Learn how to find the approximate values of square roots. 1 answer. So we're saying between any two of those rational numbers, you can always find an irrational number. The definition of an irrational number is a number that cannot be written as a ratio of two integers. Yes. In this video, let us learn how to find irrational | {
"domain": "com.br",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130554263733,
"lm_q1q2_score": 0.8834946686344102,
"lm_q2_score": 0.8933094096048377,
"openwebmath_perplexity": 396.32674951472035,
"openwebmath_score": 0.7736655473709106,
"tags": null,
"url": "https://crank.com.br/pages/674a61-how-to-find-irrational-numbers"
} |
vacuum, vacuum-pumps
Wherever your pump curve intersects this system curve is the flow rate. Plain and simple. Once you know the flowrate, divide the volume to move by the flowrate to gain the time estimate.
Edit:
With a wet/dry vacuum style compressor, you're most like to see a curve similar to this one: | {
"domain": "engineering.stackexchange",
"id": 2155,
"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": "vacuum, vacuum-pumps",
"url": null
} |
ros, rosmake, image-view, git
Title: Why cannot I rosmake the image_pipeline package?
Hi,
I want to use the opencv in my ros, following the tutorials: http: // www .ros.org/wiki/openni_launch, I git cloned the image_view package(actually I use the command: git clone https :// github.com/ros-perception/image_pipeline.git, because image_pipeline includes image_view), however, I can not rosmake the package, it always shows like:
[ rosmake ] rosmake starting...
[ rosmake ] No package specified. Building stack ['image_pipeline']
[ rosmake ] Packages requested are: ['image_pipeline']
[ rosmake ] Logging to directory /home/turtlebot/.ros/rosmake/rosmake_output-20130408-221329
[ rosmake ] Expanded args ['image_pipeline'] to:
[]
[ rosmake ] WARNING: The stack "image_proc" was not found. We will assume it is using the new buildsystem and try to continue... | {
"domain": "robotics.stackexchange",
"id": 13721,
"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, rosmake, image-view, git",
"url": null
} |
\begin{align} \left(\sqrt{1000}- \sqrt{999} \right) - \frac{1}{2 \sqrt{1000}} &= \frac{1}{\sqrt{1000} + \sqrt{999}} - \frac{1}{2 \sqrt{1000}} \\&= \frac{2 \sqrt{1000} - \sqrt{1000} - \sqrt{999}}{2 \sqrt{1000} (\sqrt{1000} + \sqrt{999})} \\&= \frac{\sqrt{1000} - \sqrt{999}}{2 \sqrt{1000} (\sqrt{1000} + \sqrt{999})} \\&= \frac{1}{2 \sqrt{1000} (\sqrt{1000} + \sqrt{999})^2} \end{align}
Normally I would have had to use the "multiply by conjugate" trick in the numerator again, but we've already seen how to deal with $\sqrt{1000} - \sqrt{999}$ so I could just plug in what we already knew.
Similarly
$$\left(\sqrt{1001}- \sqrt{1000} \right) - \frac{1}{2 \sqrt{1000}} = -\frac{1}{2 \sqrt{1000} (\sqrt{1001} + \sqrt{1000})^2}$$
And now the two numbers are easily distinguishable: one is positive and one is negative!
And so
$$\left(\sqrt{1000}- \sqrt{999} \right) - \frac{1}{2 \sqrt{1000}} > \left(\sqrt{1001}- \sqrt{1000} \right) - \frac{1}{2 \sqrt{1000}}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471647042429,
"lm_q1q2_score": 0.808908451344491,
"lm_q2_score": 0.8221891370573388,
"openwebmath_perplexity": 547.3880004499648,
"openwebmath_score": 0.9553602933883667,
"tags": null,
"url": "http://math.stackexchange.com/questions/394648/comparing-sqrt1001-sqrt999-2-sqrt1000/394771"
} |
newtonian-mechanics, rotational-dynamics, angular-momentum, friction
(B): The ball looses energy while entering the friction area because the ball wasn't rolling. the velocity of the ball at the frictionless area is $v=\sqrt{2gh}$. Let the point of the torque lies anywhere on the lowest point. And since friction doesn't apply and torque (friction vector passes the torque messing point), angular momentum of the ball conserves between frictionless point and the friction point(where the ball rolls without slipping).
$mr\sqrt{2gh}=\beta mr^2 \omega_{friction}+rmv_{friction}$.
so, $v_{friction}=\frac{\sqrt{2gh}}{1+\beta}$. If you use energy conservation between the friction point and the final ball's maximum height $h_f=\frac{h}{1+\beta}$ I have added to my answer to try and give a better explanation.
If the ball is rolling without slipping the frictional force does no work as there is no relative movement at the point of contact between the ball and the surface. | {
"domain": "physics.stackexchange",
"id": 91466,
"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, rotational-dynamics, angular-momentum, friction",
"url": null
} |
Here's what the whole process looks like in symbols.
\begin{aligned} A \left[ \begin{array}{c} \goldD{1} \\ \goldD{2} \end{array} \right] &= A\left( \goldD{1} \left[ \begin{array}{c} \blueD{1} \\ \blueD{0} \end{array} \right] + \goldD{2} \left[ \begin{array}{c} \maroonD{0} \\ \maroonD{1} \end{array} \right] \right) \\ \\ &= A\left( \goldD{1} \blueD{\hat{\imath}} + \goldD{2} \maroonD{\hat{\jmath}} \right) \\ \\ &= \goldD{1} A \blueD{\hat{\imath}} + \goldD{2} A \maroonD{\hat{\jmath}} \\ \\ &= \goldD{1} \left[ \begin{array}{c} \blueD{1} \\ \blueD{1} \end{array} \right] + \goldD{2} \left[ \begin{array}{c} \maroonD{0} \\ \maroonD{1} \end{array} \right] \\ \\ &= \left[ \begin{array}{c} 1 \\ 3 \end{array} \right] \end{aligned} | {
"domain": "khanacademy.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9919380075184121,
"lm_q1q2_score": 0.8470285110697343,
"lm_q2_score": 0.8539127492339909,
"openwebmath_perplexity": 7323.333143020888,
"openwebmath_score": 0.9914681315422058,
"tags": null,
"url": "https://www.khanacademy.org/math/multivariable-calculus/thinking-about-multivariable-function/x786f2022:vectors-and-matrices/a/matrices--visualized-mvc"
} |
javascript, jquery, object-oriented
Title: Carousel using a function passed a target element I've made a carousel, which uses a function that is passed a target element, and from this element it adds next, prev, next next, and prev prev classes to its siblings (causing the rotation) - what do they call this, pyramid code?
Looking at this code - it works, but can't stand know that there is probably a better way to write this:
var render = function (cont) {
cont.parent().find('.active').removeClass();
cont.attr('class', 'active');
cont.parent().children().removeClass('next prev next_next prev_prev');
cont.next().attr('class', 'next');
cont.prev().attr('class', 'prev');
cont.next().next().attr('class', 'next_next');
cont.prev().prev().attr('class', 'prev_prev');
}; You can remove the active class along with the other classes, and you can chain the prev and next calls:
var render = function (cont) { | {
"domain": "codereview.stackexchange",
"id": 4823,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, object-oriented",
"url": null
} |
algorithms, graphs, dynamic-programming
Title: Completing tasks on a graph Consider a graph $G = (V, E)$, where $V = \{0, 1, 2, \ldots, n\}$. The graph $G$ is complete, which means we can traverse $(i, j)$ for all $i, j \in V$. At each vertex $v \in V$, there is a task that we must complete. The task at vertex $v$ takes $q_v > 0$ minutes for $v \neq 0$, and we must complete all tasks. We start at Vertex $0$, and we have $q_0 = 0$.
It will obviously take us exactly $\sum_{i = 1}^{n} q_i$ total time for us to complete all of the tasks on our own (it doesn't take any time to traverse the edges). However, suppose we have a single helper. We are allowed to dispatch the helper at any node (say $v$), and we can leave the node, go work on other tasks, and pick up the helper after $q_v$ minutes to drop it off at another node. A caveat is that the helper cannot move on its own; it must be picked up and dropped off. | {
"domain": "cs.stackexchange",
"id": 17643,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, graphs, dynamic-programming",
"url": null
} |
array, vba, excel
wouldn't produce the expected result.
By using the first index as your "column" (X) and the second as you "row" (Y), you eliminate that ambiguity and the code would read (x,y), which is a much more intuitive way of visualizing 2D arrays. | {
"domain": "codereview.stackexchange",
"id": 15465,
"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": "array, vba, excel",
"url": null
} |
c#, performance
CurrentBatteryCapacity -= _batteryDischargingSpeed;
if(_isCharging)
_isCharging = false;
}
}
/// <summary>
/// Moves robot by a specific vector
/// </summary>
/// <param name="vec"></param>
public void MoveRobotBy(Vector vec)
{
_robotMovingDirectionVector = vec;
MoveRobot();
}
/// <summary>
/// Lets the robot turn by random degree
/// </summary>
public void Collide()
{
if (!_isCharging)
{
var robBounds = Bounds;
_robotMovingDirectionVector.Negate();
robBounds.Offset(_robotMovingDirectionVector);
Bounds = robBounds; | {
"domain": "codereview.stackexchange",
"id": 33238,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance",
"url": null
} |
javascript, array
var keyWords = ["campaign","evar","event","prop", "mvvar1", "mvvar2", "mvvar3",
"purchase", "scOpen", "scView", "scAdd"];
var arrLen = [];
var different = [];
for(var i = 0; i < allActions.length; i++) {
arrLen.push(allActions[i].length);
}
var max = Math.max.apply(null, arrLen)
var maxValue = arrLen.indexOf(max); | {
"domain": "codereview.stackexchange",
"id": 26989,
"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
} |
quantum-mechanics, probability, time-evolution, unitarity, born-rule
Title: Expectation Value of Unitary Time Evolution Operator in Quantum Mechanics Does the expression $\langle \Psi_i|U(t)|\Psi_i\rangle$ have a specific meaning, where $U(T)$ is the unitary time evolution operator of $\Psi$, and $\Psi_i$ is the initial state of $\Psi$?
If so, could you please explain that meaning and also please provide any clear references to this that I could read? To talk about $\langle \psi_i \vert U(t) \vert \psi_i \rangle$ as the "expectation value of the time evolution operator" is probably the least insightful way to talk about this quantity. Since $U(t) = \exp(-\mathrm{i}Ht)$ for time-independent Hamiltonians, if you want to look at expectation values, you could as well look at that of $H$ directly. Note that, in particular, the time evolution operator is not self-adjoint, since $U(t)^\dagger = U(-t)\neq U(t)$, so it is not an observable, and speaking of its "expectation value" is physically meaningless. | {
"domain": "physics.stackexchange",
"id": 28203,
"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, probability, time-evolution, unitarity, born-rule",
"url": null
} |
homework-and-exercises, forces, electrostatics, charge, equilibrium
Title: Unstable Equilibrium of electric force $q_1=8q$
$q_2=-2q$
There is a proton at $L$ and $2L$ distance from $q_2$ and $q_1$ respectively. At these distances net force is zero on proton. If we displace proton leftward both forces increases but force due to $q_2$ increases more because $q_2$ is nearer and the proton keep on drifting. I don’t get that. How? Negative charge $(q_1$) is a distance (D) to the left of positive charge $q_2$ which is a distance (L) to the left of the proton. (Or $q_2$ could be negative.) The magnitudes of the two forces are: $F_1$ = k$(q_1)e/(D+L)^2$ and $F_2$ = $k(q_2)e/(L^2$). For equality with D = L, $q_1$ = 4$(q_2)$. If L is changed and D is not, then the rate of change of the forces is: $d(F_1$)/(dL) = -2k$(q_1)$e/(D+L) = -k$(q_1)$e/(L) and $d(F_2)/dL = -2k(q_2)e/L = -2k[(q_1)e/4]/L$ = - k$(q_1)$e/(2L). $F_1$ is changing more rapidly than $F_2$ | {
"domain": "physics.stackexchange",
"id": 80564,
"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, forces, electrostatics, charge, equilibrium",
"url": null
} |
moveit, hardware, octomap, ros-kinetic, realsense
Is there a way I can add the Octomap generated by explicitly running octomap_server into /move/group/monitored_planning_scene?
Originally posted by yiying on ROS Answers with karma: 46 on 2020-07-14
Post score: 0
Answering my own questions for the fourth time on this forum.
With all transforms available, the Octomap is up now. What happened is that not all the joints in the robot were published, even though the missing ones don't affect the tf of the camera link. See this for details.
Originally posted by yiying with karma: 46 on 2020-07-28
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 35270,
"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": "moveit, hardware, octomap, ros-kinetic, realsense",
"url": null
} |
quantum-field-theory, field-theory, variational-principle, non-linear-systems, solitons
$$ \tag{4.22} e(\mu)~=~\sum_{n\in\{0,2,4\}} \mu^{n-d} E_n\geq 0, $$
where we assume that the scale parameter
$$ \tag{A}\mu~\in~]0,\infty[ $$
is strictly positive, and that the energies
$$\tag{B} E_n~\geq ~0, \qquad n\in\{0,2,4\}$$
are non-negative. From this it already follows that the ($\mu$-scaled potential) energy $e:]0,\infty[\to [0,\infty[$ is a non-negative and continuous function, and in particular that it is bounded from below, cf. some of OP's subquestions (v1). | {
"domain": "physics.stackexchange",
"id": 9229,
"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, field-theory, variational-principle, non-linear-systems, solitons",
"url": null
} |
lasers
By touching a black marker to it (black because any light colors will simply be reflected and not absorbed) and when the black pieces of sharpie marker would burn off they would be trapped into the laser beam at its lowest density point.
As for how long it lasts without burning, I don't think it is burning that is the problem, its wind and air. The slightest breath can cause the particle to move away. Sometimes you can have a particle stay for minuets and some just a second. | {
"domain": "engineering.stackexchange",
"id": 2424,
"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": "lasers",
"url": null
} |
c#, rock-paper-scissors
This approach makes it very easy, with minimal refactoring, to create language choices for your app.
For classes that require I/O, I like to keeps things flexible and use base classes instead of hard coding standard I/O. This makes it very easy to leverage networking at some point.
For the game class(RockScissorPaper), a method to get the user's input, clears a lot of code from the PlayGame method.
private static char GetChoice(TextWriter tOut, TextReader tIn, Message message)
{
char choice = '\0';
bool done = false;
do
{
Messages.PrintMessage(tOut, message);
string response = tIn.ReadLine().ToLower();
choice = response.Length > 0 ? response[0] : '\n';
if (message.choices.Contains(choice))
{
return choice;
}
Messages.PrintMessage(tOut, Messages.wrongChoice);
} while (!done);
return choice;
} | {
"domain": "codereview.stackexchange",
"id": 36975,
"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#, rock-paper-scissors",
"url": null
} |
python, ros-kinetic, ubuntu, image, publisher
def talker():
pub = rospy.Publisher('chatter', String, queue_size=10)
rospy.init_node('talker', anonymous=True)
rate = rospy.Rate(1) # 10hz
while not rospy.is_shutdown():
hello_str = "hello world %s" % rospy.get_time()
rospy.loginfo(hello_str)
pub.publish(hello_str)
rate.sleep()
if __name__ == '__main__':
try:
talker()
except rospy.ROSInterruptException:
pass
subscriber:
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
def callback(data):
rospy.loginfo(rospy.get_caller_id() + "I heard %s", data.data)
rospy.sleep(2)
def listener():
rospy.init_node('listener', anonymous=True)
rospy.Subscriber("chatter", String, callback)
print("done with callback")
# spin() simply keeps python from exiting until this node is stopped
rospy.spin()
if __name__ == '__main__':
listener() | {
"domain": "robotics.stackexchange",
"id": 33018,
"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, ros-kinetic, ubuntu, image, publisher",
"url": null
} |
javascript, parsing, datetime
Some examples of cron-to-string conversion:
0 4 * * * * → "Runs at 04h00 every day"
0 23 * * 0 → "Runs at 23h00 on Sundays"
0 4 1 * * → "Runs at 04h00 on the 1st day of every month"
The code
function convertCronToString(cronExpression) {
var cron = cronExpression.split(" ");
var minutes = cron[0];
var hours = cron[1];
var dayOfMonth = cron[2];
var month = cron[3];
var dayOfWeek = cron[4];
var cronToString = "Runs at ";
// Formatting time if composed of zeros
if (minutes === "0") minutes = "00";
if (hours === "0") hours = "00";
// If it's not past noon add a zero before the hour to make it look like "04h00" instead of "4h00"
else if (hours.length === 1 && hours !== "*") {
hours = "0" + hours;
}
// Our activities do not allow launching pipelines every minute. It won't be processed.
if (minutes === "*") {
cronToString =
"Unreadable cron format. Cron will be displayed in its raw form: " +
cronExpression;
} | {
"domain": "codereview.stackexchange",
"id": 34058,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, parsing, datetime",
"url": null
} |
That some solutions are independent of a variable is not uncommon, but it does not necessarily trivialise a problem or negate its teaching value. The following problem presents similar possibilities, but we'd argue that solving it with such a "trick" is actually more circuitous than finding the answer directly (and may be more enlightening, too): http://fivetriangles.blogspot.com/2012/04/area-problem.html Here is a nice animation someone posted of the situation:
The shortcoming in such "tricks", we agree, is that they may lead to tunnel vision, but worse, their utilisation is at the user's risk.
(continued in next post) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812290812827,
"lm_q1q2_score": 0.8706922670315876,
"lm_q2_score": 0.8991213799730774,
"openwebmath_perplexity": 472.413124823118,
"openwebmath_score": 0.6984184980392456,
"tags": null,
"url": "https://matheducators.stackexchange.com/questions/7478/name-the-heuristic-exploiting-the-legitimacy-of-the-questioner/7480#7480"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.