text stringlengths 1 1.11k | source dict |
|---|---|
c#, object-oriented, snake-game
if (SnakeFoods2.Any(s => s.X == SnakeBoddy[0].X && s.Y == SnakeBoddy[0].Y))
{
EatFood2();
}
if (SnakeFoods3.Any(s => s.X == SnakeBoddy[0].X && s.Y == SnakeBoddy[0].Y))
{
EatFood3();
} | {
"domain": "codereview.stackexchange",
"id": 41088,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, object-oriented, snake-game",
"url": null
} |
java, serialization
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
public class AddressBookTest {
private Contact c1, c2, c3, c4, c5, c6, c7;
private AddressBookPersist addressBookPersist;
@Before
public void setUp() {
addressBookPersist = new AddressBookPersist();
createNewContacts();
}
public static void main(String[] args) {
AddressBookTest test = new AddressBookTest();
test.setUp();
test.sortFriendsByTheirNames();
test.uniqueFriendsFromTwoAddressBooks();
test.uniqueFriendsFromThreeAddressBooks();
}
@Test
public void uniqueFriendsFromTwoAddressBooks() {
System.out.println("========== Unique Friends from Two Address Books ==========");
addTwoAddressBooks(); | {
"domain": "codereview.stackexchange",
"id": 24149,
"lm_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, serialization",
"url": null
} |
physical-chemistry, electrochemistry, experimental-chemistry
Title: Alternatives to Ring Stands I'm trying to find an alternative to simple ring stands to hold a simple electrochemical cell.
The issue is that it is difficult to adjust the height to the right position to within even a couple inches. If you try to screw the stand in it can drop or lean, and I need to be able to adjust it to within at least an inch without it falling down.
I use a micrometer to adjust an electrode coming in from the top, and I don't have a lot of play to push down.
It is also not easy to adjust the stand from under a few hood, due to the nature of the screw.
It would also be nice if the clamp could be adjusted along the y-axis to move it closer or farther from the stand for different situations. What about puting the whole stand on the lab-lift, hopefully there will be also some precision version. | {
"domain": "chemistry.stackexchange",
"id": 831,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, electrochemistry, experimental-chemistry",
"url": null
} |
javascript, datetime, library
Double character in regex
You have the / character twice in your regex in parseDateTime(..).
dateTime.split(/[\/\/:.\s]/g); | {
"domain": "codereview.stackexchange",
"id": 17673,
"lm_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, datetime, library",
"url": null
} |
The required probability will be
$P($exactly $4$ heads from the $4$ flips of $1$st coin$)\cdot P($exactly $1$ head from the $2$ flips of $2$nd coin $)+$
$P($exactly $3$ heads from the $4$ flips of $1$st coin$)\cdot P($exactly $2$ heads from the $2$ flips of $2$nd coin $)$
Using Binomial Distribution, the required probability $$\binom44\left(\frac12\right)^4\left(1-\frac12\right)^{4-4} \cdot\binom21\left(\frac23\right)^1\left(1-\frac23\right)^{2-1}$$
$$+\binom43\left(\frac12\right)^3\left(1-\frac12\right)^{4-3} \cdot\binom22\left(\frac23\right)^2\left(1-\frac23\right)^{2-2}$$
$$=\frac1{16}\cdot\frac49+\frac14\cdot\frac49=\frac5{36}$$
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9877587247081928,
"lm_q1q2_score": 0.8683848945980446,
"lm_q2_score": 0.8791467722591728,
"openwebmath_perplexity": 909.9909338425831,
"openwebmath_score": 0.7746295928955078,
"tags": null,
"url": "http://math.stackexchange.com/questions/415179/fair-and-unfair-coin-probability"
} |
fft, z-transform, transfer-function, frequency-response, laplace-transform
And the input $u(t)$
And how I try to do FFT on both $u(t)$ and $y(t)$
fy = fft(y);
fu = fft(u);
H = fy./fu;
plot(w, H);
But that does not work for me! Why?
Update:
I have made this MATLAB code.
% Data
close all
t = linspace(0.0, 10, 3000);
w = logspace(-1, 2*pi, 3000);
a = linspace(0.0, 10, 3000);
u = a.*sin(2*pi*w.*t);
G = tf([3 5], [5 3 2]);
y = lsim(G, u, t);
Ts = t(2)-t(1); % Sampling time
Fs = 1/Ts; % Sampling rate
fy = abs(fft(y, Fs));
fu = abs(fft(u, Fs));
% Cut the amplitudes and frequencies
freq = (0:Fs-1)(1:end/2+1);
fy = fy(1:end/2)/length(fy)*2;
fu = fu(1:end/2)/length(fu)*2;
freq(1) = freq(2); % freq(1) = 0
semilogx(freq, 20*log10(fy./fu));
And it will plot this "bode" diagram. I think it looks like it's reversed bode diagram. Should not look like this:
And if I use this input response with amplitude 5 and frecquency 10.
u = 5.*sin(2*pi*10.*t); | {
"domain": "dsp.stackexchange",
"id": 8654,
"lm_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, z-transform, transfer-function, frequency-response, laplace-transform",
"url": null
} |
keras, tensorflow, multiclass-classification, metric, tokenization
Title: Why is the sprase categorical accuracy decreasing every epoch and predictions are always NaN? Problem Summary
My model is built and compiled properly but gets the NaN validation loss on all epochs. The training set accuracy is also infinitesimally small and keeps decreasing. I couldn't find a mistake in the tokenization, embedding, and model-building code. I am using the training set of BBC articles data set from Kaggle: BBC News Classification. I only use the training data file. | {
"domain": "datascience.stackexchange",
"id": 11982,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "keras, tensorflow, multiclass-classification, metric, tokenization",
"url": null
} |
noise, qpsk, pll
$P$: Proportional gain constant
$I$: Integral gain constant (per sample with time in seconds)
$IT$: Integral gain consant (normalized with time units in samples)
$A$: complex magnitude of samples at discriminator input
$K_d$: Discriminator gain includes parasitic 1 sample delay in loop
$H_{LF}(z)$: PI Loop Filter
$K_{NCO}$: NCO gain, control word given in frequency of Hz (this way we can monitor frequency directly)
$$H_{LF}(z) = \frac{Pz + IT-P}{z-1}$$
$$K_{NCO} = 2\pi\frac{z}{z-1}$$
$$K_d = \frac{A^2}{z}$$
$$G_{OL}(z) = 2\pi PA^2\frac{z-\bigg(\frac{P - IT}{P} \bigg)}{(z-1)^2}$$
With this Loop Model I created three test cases, for all cases $A=1$ and $T=1$ (normalized magnitude and time is in samples):
$$\begin{bmatrix} \text{Loop BW} & -3 \text{ dB BW} & \text{Settles In} & I & P & G_{CL}(z=\pi) \\
\text{---------}&\text{---------------}&\text{-------------}&\text{-------}&\text{------}&\text{----------------}\\ | {
"domain": "dsp.stackexchange",
"id": 8613,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "noise, qpsk, pll",
"url": null
} |
is less then 10. Optimizing a Rectangle Under a Curve. Plus and Minus. This app is useful for land area calculation for plots of all shape and size be it triangle, rectangle, circle or any simple polygon. Uniquely, the area calculator is capable of accurately calculating irregular areas of uploaded images, photographs or plans quickly. The sides of your triangle do not adhere to the triangle inequality theorem. Monte Carlo simulation offers a simple numerical method for calculating the area under a curve where one has the equation of the curve, and the limits of the range for which we wish to calculate the area. Can anyone point me in the right direction for acquiring the code?. We can calculate the median of a Trapezoid using the following formula:. You can calculate that. He now explains that the area of rectangle is length times the breadth. The curve is symmetric around 0, and the total area under the curve is 100%. [2] Construct a rectangle on each sub-interval & "tile" the whole | {
"domain": "laquintacolonna.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717468373085,
"lm_q1q2_score": 0.8898094567022089,
"lm_q2_score": 0.9019206758704633,
"openwebmath_perplexity": 351.8731791619468,
"openwebmath_score": 0.8136438727378845,
"tags": null,
"url": "http://qdjf.laquintacolonna.it/area-of-rectangle-under-curve-calculator.html"
} |
clojure
([1] [1 1] [1 2 1] [1 3 3 1] [1 4 6 4 1])
([1] [1 1] [1 2 1] [1 3 3 1] [1 4 6 4 1])
(ns minesweeper.irrelevant.pas-tri)
(defn pascals-triangle-post []
(let [wrap #(vec (concat [1] % [1]))]
(iterate #(->> %
(partition 2 1)
(mapv (partial apply +'))
(wrap))
[1])))
(defn pascals-triangle-pre []
(let [wrap #(vec (concat [0] % [0]))]
(iterate #(->> %
(wrap)
(partition 2 1)
(mapv (partial apply +')))
[1]))) There's a simpler way.
To get the next line
take two copies of the line,
extend them respectively with 0 at the start and with 0 at the end, and
add the corresponding elements.
In Clojure,
(defn pascal []
(iterate
#(mapv + (cons 0 %) (conj % 0))
[1]))
=> (take 5 (pascal))
([1] [1 1] [1 2 1] [1 3 3 1] [1 4 6 4 1])
This avoids the partitioning.
Not sure if it's what you're looking for, but showing off was irresistible. | {
"domain": "codereview.stackexchange",
"id": 33272,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clojure",
"url": null
} |
slam, navigation, kinect, turtlebot
[kinect_laser-5] process has died [pid 5164, exit code 255].
log files: /home/sam/.ros/log/a9394afe-7a3a-11e1-80c7-20cf30a23845/kinect_laser-5*.lo g
respawning...
[kinect_laser_narrow-6] process has died [pid 5165, exit code 255].
log files: /home/sam/.ros/log/a9394afe-7a3a-11e1-80c7-20cf30a23845/kinect_laser_narro w-6*.log
respawning...
[kinect_laser-5] restarting process
process[kinect_laser-5]: started with pid [5248]
[kinect_laser_narrow-6] restarting process
process[kinect_laser_narrow-6]: started with pid [5249] | {
"domain": "robotics.stackexchange",
"id": 8797,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, kinect, turtlebot",
"url": null
} |
dft
then how do we decide the "N" and "m"? When you say "complex" signal, I assume you mean just a signal with many frequencies, and not a "complex-valued" signal, in which the the signal values themselves are complex numbers. Let me know if I am incorrect in this assumption. (Actually, computation of DFT is the same in either case).
I'm also assuming your signal is discrete.
The discrete Fourier Transform, $F(\omega)$, can be found by solving the following equation (where N is the number of samples your signal, $f[n]$, contains)
$$F(\omega) = \sum_{n=0}^{N-1} f[n] e^{\frac{-j 2\pi \omega n}{N}}$$
Alternatively, you could use the function fft() on MATLAB. | {
"domain": "dsp.stackexchange",
"id": 5746,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dft",
"url": null
} |
B. The quantities sell by each shop are represented as matrices given below: Suppose Mohan wants to know the total of loss in each price categories in both the shops. The dimension m × n of a matrix identifies how many rows and columns a specific matrix has. A – B = + A – B = A – B = Question 2. Practice: Matrix equations: addition & subtraction. For subtraction of two or more than two matrices there order should be same. both matrices have the same number of rows and columns. Consider the 2×2 matrices and . Matrix subtraction is done element wise (entry wise) i.e. Have questions? The matrix containing the values that result from subtracting each element in value2 from its corresponding element in value1. Two Dimensional (2 D) array in C. The two dimensional array in C, represented in the form of rows and columns, also suitable with matrix. Up Next. Adding and Subtracting Matrices A matrix can only be added to (or subtracted from) another matrix if the two matrices have the same | {
"domain": "hillsdrmission.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211597623863,
"lm_q1q2_score": 0.826616921153643,
"lm_q2_score": 0.8479677660619634,
"openwebmath_perplexity": 461.9172983238122,
"openwebmath_score": 0.6639057397842407,
"tags": null,
"url": "https://hillsdrmission.com/vha1g2ws/tp2q7.php?ced4d1=subtraction-of-matrix-definition"
} |
ros, rocon, ros-indigo
Originally posted by creative_cimmons on ROS Answers with karma: 47 on 2015-12-09
Post score: 0
I had installed rocon months before and deleted in quite recently.
Assuming you no longer need the mentioned package, you can delete both build and devel directories in your catkin workspace and build again; some settings that you generated "months before" when you still needed the package still try to refer to them.
Originally posted by 130s with karma: 10937 on 2015-12-09
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 23192,
"lm_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, rocon, ros-indigo",
"url": null
} |
c#, dependency-injection, asp.net-mvc, factory-method, ddd
var parameters = new object[] {
adRepository,
adImagePersister
};
return constructor.Invoke(parameters);
}
}
And used in composition root in the web project (using ninject):
private static void RegisterServices(IKernel kernel) {
kernel.Bind<ApplicationDbContext>().ToSelf().InRequestScope();
kernel.Bind(typeof(IAdPersister<>)).ToProvider<AdPersisterProvider>().InRequestScope();
} | {
"domain": "codereview.stackexchange",
"id": 36422,
"lm_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#, dependency-injection, asp.net-mvc, factory-method, ddd",
"url": null
} |
${\displaystyle {\frac {a+c}{b+d}},}$
which first appears in the Farey sequence of order b + d.
Thus the first term to appear between 1/3 and 2/5 is 3/8, which appears in F8.
The Stern–Brocot tree is a data structure showing how the sequence is built up from 0 (= 0/1) and 1 (= 1/1), by taking successive mediants.
Fractions that appear as neighbours in a Farey sequence have closely related continued fraction expansions. Every fraction has two continued fraction expansions — in one the final term is 1; in the other the final term is greater than 1. If p/q, which first appears in Farey sequence Fq, has continued fraction expansions
[0; a1, a2, ..., an − 1, an, 1]
[0; a1, a2, ..., an − 1, an + 1]
then the nearest neighbour of p/q in Fq (which will be its neighbour with the larger denominator) has a continued fraction expansion
[0; a1, a2, ..., an]
and its other neighbour has a continued fraction expansion
[0; a1, a2, ..., an − 1] | {
"domain": "wikipedia.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9929882044110003,
"lm_q1q2_score": 0.8047960007791541,
"lm_q2_score": 0.810478913248044,
"openwebmath_perplexity": 885.2537739914609,
"openwebmath_score": 0.9421737194061279,
"tags": null,
"url": "https://en.wikipedia.org/wiki/Farey_sequence"
} |
quantum-mechanics, angular-momentum
Where $J$ is the general angular momentum operator.
My questions basically are:
How is the principal quantum number $n$ related to $j$? Meaning, what is the difference between the two? I know $n$ can't be half an integer, so why can $j$ be half-integer?
And also, perhaps this is a bit off-topic, but what is the difference between general angular momentum operator $J$ vs. angular momentum operator $L$?
N. Zettilli says: | {
"domain": "physics.stackexchange",
"id": 20794,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, angular-momentum",
"url": null
} |
evolution, natural-selection, adaptation
Title: What is the difference between natural selection and adaptation? From what I've read it seems that the only actual difference is that creationists use adaptation and people who believe in evolution use natural selection. But otherwise, from my understanding, the two terms are synonymous. Is that correct? Natural Selection
Natural selection is the differential in survival and/or reproductive success among different individuals. As such, natural selection also refers to the process by which genotypes associated with greater fitness increase in frequency in the population through time.
More information on wikipedia > Natural Selection
Adaptation
An adaptation (or an adaptive trait) is a trait with a functional role that evolved (and is maintained) by means of natural selection.
More information on wikipedia > adaptation
Usage | {
"domain": "biology.stackexchange",
"id": 5630,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, natural-selection, adaptation",
"url": null
} |
A K by K grid has to be tiled with L by W tiles which can be taken vertically or horizontally. Given K find L, W such that this tiling is possible and (max(L,W)-min(L,W), L+W) is lexicographically maximal subject to W < L < K. All numbers are positive integers.
(this document has been updated in December 2021)
For every valid L, W pair we must have that L and W divide K. This is a theorem from the late 1960’s. At the end of this document is a link to 14 different proofs for this theorem, here is one. Given a fixed tiling of the grid, we construct a graph as follows. In fact it will be a multi-graph, as some edges might be present twice. The vertices consists of all points which are corners of individual tiles. For every tile, for each of its long side, there is an edge between the adjacent corners. This defines a graph with the following properties:
• the 4 corners of the grid have degree 1.
• all other points have degree 2 or 4. | {
"domain": "tryalgo.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127447581986,
"lm_q1q2_score": 0.8010066347965958,
"lm_q2_score": 0.8104789086703225,
"openwebmath_perplexity": 374.98844077513814,
"openwebmath_score": 0.9029732346534729,
"tags": null,
"url": "https://tryalgo.org/en/arithmetics/2016/07/18/kings-wish/"
} |
orbit, milky-way, orbital-mechanics
$$\textbf{F}(r) = m\textbf{a} = m\Big(\ddot{r} - r\dot{\theta}^2\Big)$$
Note that in this case $r$ is simply the radial component of $\bf r$ and $\theta$ is the azimuthal angle of the body in a spherical coordinate system. I'll leave it to you to determine how to break down the acceleration into the two components above, under the appropriate coordinate system. Let's try to remove our $\theta$ dependence so that we have only a function of $r$. This can be achieved by using angular momentum conservation. The angular momentum per unit mass is given by $\ell = r^2\dot{\theta}$ so that $\dot{\theta} = \ell/r^2$. This gives
$$\textbf{F}(r) = m\big(\ddot{r} - \ell^2/r^3\big)$$
This is now a differential equation that allows us to solve for $r(t)$, but we want $r(\theta)$ so we need to do some conversion. Let's re-parameterize by defining $u \equiv 1/r$ (the reason will become clear in a bit) and determining $\ddot{r}$ in terms of $u$ and $\theta$. | {
"domain": "astronomy.stackexchange",
"id": 1901,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "orbit, milky-way, orbital-mechanics",
"url": null
} |
cc.complexity-theory, complexity-classes, interactive-proofs
$\#\mathrm P$ is a class of functions, not of languages, hence it is meaningless to compare it with AM directly. However, if you consider the closely related class $\mathrm{PP}$ instead, the case is similar to $\oplus\mathrm P$: (another version of) Toda’s theorem says that $\mathrm{PH\subseteq P^{PP}=P^{\#P}}$. Thus, if we had $\mathrm{PP\subseteq AM}$, it would follow that $\mathrm{PH\subseteq P^{AM\cap coAM}=AM\cap coAM}$, so we get the same conclusion.
Mutatis mutandis, the same argument suggests neither $\oplus\mathrm P$ nor $\mathrm{PP}$ is contained in $\mathrm{PH}$ as a whole.
I am not aware of any nontrivial inclusions of $\oplus\mathrm P$ or $\mathrm{\#P}$ in other classes (I suppose $\mathrm{\oplus P\subseteq P^{\#P}\subseteq PSPACE}$ count as trivial; there are also levels of the counting hierarchy, but again they contain the offending classes by definition). | {
"domain": "cstheory.stackexchange",
"id": 3628,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, complexity-classes, interactive-proofs",
"url": null
} |
• The first hundred thousand Sophie Germain primes are tabulated at oeis.org/A005384/b005384.txt so you could run a computer over them to see how the counts go. May 27 '16 at 2:19
• If $100000$ would say anything I would do that (in any case this is a good link).
– user76479
May 27 '16 at 2:22
• It wouldn't say anything conclusive, but if you found, say, that in every 10,000, there were twice as many $1\bmod4$ as $3\bmod4$ you'd probably find that very suggestive, at least. May 27 '16 at 2:26
• @GerryMyerson does not seem to be biased.
– user76479
May 27 '16 at 2:48
• For what it's worth, up to $10^8$, there are $664578$ odd primes: $332180$ of the form $4k+1$ and $332398$ of the form $4k+3$; and of these, respectively $27940$ and $28091$ are such that $2p+1$ is also prime, and respectively $27981$ and $28175$ such that $2p-1$ is also prime. Jun 3 '16 at 9:49
## 1 Answer | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429609670701,
"lm_q1q2_score": 0.8016531211273435,
"lm_q2_score": 0.8152324803738429,
"openwebmath_perplexity": 128.11154459693086,
"openwebmath_score": 0.9183924198150635,
"tags": null,
"url": "https://mathoverflow.net/questions/239870/density-of-sophie-germain-3-bmod-4-primes/239932"
} |
triangle about a certain axis. 89 × 103 kg/m3. In yesterday's lesson, students completed a lab on center of mass, and they already have a working knowledge of torque. The axis may be internal or external and may or may not be fixed. Engineering Science. Find the moment of inertia about y-axis for solid enclosed by z = (1-x^2) , z= 0 , y = 1 and y = -1. 3) Three particles each of mass 100 g are placed at the vertices of an equilateral triangle of side length 10 cm. equals 1, if there are four piles per row and two rows (figure 7-2), the moment of inertia about the Y-Y axis is given by the following formula. 1st moment of area is area multiplied by the perpendicular distance from the point of line of action. I), must be found indirectly. Moment of inertia Up: Rotational motion Previous: The vector product Centre of mass The centre of mass--or centre of gravity--of an extended object is defined in much the same manner as we earlier defined the centre of mass of a set of mutually | {
"domain": "carlacasciari.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401449874105,
"lm_q1q2_score": 0.8654589603563371,
"lm_q2_score": 0.8740772351648677,
"openwebmath_perplexity": 395.8218896476916,
"openwebmath_score": 0.6235755681991577,
"tags": null,
"url": "http://carlacasciari.it/moment-of-inertia-of-triangle-about-apex.html"
} |
general-relativity, black-holes, orbital-motion, faster-than-light, tachyon
$$ \frac{1}{2}\left(\frac{dr}{d\tau}\right)^2 = \frac{c^2}{2}\left(\frac{E^2}{m^2c^4} -1 \right) - \frac{c^2}{2}\left[\left(1 - \frac{r_s}{r}\right)\left(1+\frac{L^2}{m^2r^2c^2}\right)-1\right]\ , $$
where $E/mc^2$ and $L/m$ represent the energy and angular momentum of the orbiting body as measured by an inertial observer at $r \gg r_s$.
The second term on the right hand side is known as the effective potential and it can be differentiated to find turning points at
$$ \frac{r}{r_s} = \frac{L^2}{m^2c^2r_s^2} \left[ 1 \pm \left(1 - \frac{3m^2c^2 r_s^2}{L^2} \right)^{1/2} \right] \ . $$
If the dimensionless ratio $L^2/m^2c^2r_s^2$ becomes very large, then the smaller root becomes $r/r_s \rightarrow 3/2$ (use a binomial approximation on the bracket).
The speed of the circular orbit at a given radial coordinate, as measured by a stationary (in space) observer at that radial coordinate is given by
$$ v_{\rm shell}^2 = c^2 \left(\frac{r_s}{2r -2r_s}\right) $$ | {
"domain": "physics.stackexchange",
"id": 94524,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, orbital-motion, faster-than-light, tachyon",
"url": null
} |
quantum-mechanics, wavefunction, reflection
Title: Why do we suppose that reflected quantum state has the same energy that initial state? I just read in my lecture notes that the teacher assumed the wave vector $k_+$ of reflected (from potential) state the same (but inverted) as wave vector of initial psi function (that goes to the potential barrier direction), I don't understand why the wave vectors and energies of states have be the same on big distances from barrier.
Here the screenshot: I just understood that this is the consequence of double degeneration in energy for free particles. I just have circumstances where particle on one side have particular energy, so I am allowed only to use two monochromatic waves for this energy. I should not consider this situation like some process of reflection that creates reflected wave from origin single one. There are already two allowed states for particular energy and we are just guessing the coefficients before this states. | {
"domain": "physics.stackexchange",
"id": 90528,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, wavefunction, reflection",
"url": null
} |
solar-eclipse
At the beginning of the eclipse, the viewer is standing "upright," and sees the moon touch the sun at approximately 1 O'clock. Over the next three hours, as the eclipse progresses, the viewer is "laid on her/his side" relative to his/her initial orientation due to the rotation of the earth; as if tilting his/her neck to the east. Since most of us were looking (essentially) towards the south for this eclipse, it was as if we had tilted our head to the left, so the exit of the moon - instead of appearing at approximately 7 O'clock as expected for a linear transit, the exit point appeared to be at 9 O'clock.
The magnitude of this effect is dependent upon several variables, including the viewer's latitude during observation. | {
"domain": "astronomy.stackexchange",
"id": 2437,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "solar-eclipse",
"url": null
} |
What is the algebraic intuition behind Vieta jumping in IMO1988 Problem 6?
Let $a$ and $b$ be positive integers and $k=\frac{a^2+b^2}{1+ab}$. Show that if $k$ is an integer then $k$ is a perfect square.
The usual way to show this involves a technique called Vieta jumping. See Wikipedia or this MSE post.
I can follow the Vieta jumping proof, but it seems a bit strained to me. You play around with equations that magically work out at the end. I don't see how anyone could have come up with that problem using that proof.
Is there a natural or canonical way to see the answer to the problem, maybe using (abstract) algebra or more powerful tools? In addition, how can someone come up with a problem like this? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429164804706,
"lm_q1q2_score": 0.816540293007294,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 505.0332618706677,
"openwebmath_score": 0.8277219533920288,
"tags": null,
"url": "https://math.stackexchange.com/questions/1897942/what-is-the-algebraic-intuition-behind-vieta-jumping-in-imo1988-problem-6/1906921"
} |
java, thread-safety
The write lock holds (from copyFrom), so the listener thread is blocked to aqquire the read lock (from getX). The result is a dead lock I think.
Another possible failure is, that the listener can throw an exception. When an exception is not handled, copyFrom returns abrupt without releasing the write lock. If is it handled (via try-catch), what should I do with this exception?
Are there best practices to handle such stateful classes with listener functionality (I have the same problem for a finite state machine etc.)? Java isn't my first language, so bear with me if I confuse the syntax a bit. I agree that your copyFrom is not atomic in that the changes are externally visible before the copy is complete. I would also say that it isn't atomic because the origin is not locked and so could change while the copy occurs. Yes, I believe this is a possible point of deadlock - in general I believe it's best to always avoid firing events under a lock for this very reason. | {
"domain": "codereview.stackexchange",
"id": 3707,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, thread-safety",
"url": null
} |
• @Karolis: How did you get those math notations correct? Thanks for the edit! – sparkr Oct 15 '17 at 8:50
• you can press 'edit' and you should be able to see the raw text. It uses mathjax syntax I think but not sure. You put the text between \$\$ separators and follow a simple syntax. – Karolis Koncevičius Oct 15 '17 at 8:54
• Why is the "author derives values for $\beta_0$ and $\beta_1$" not a proof? – Sextus Empiricus Oct 15 '17 at 8:57
• mathworld.wolfram.com/LeastSquaresFitting.html inOLS, linear model coefficients are derived from a system of equations and can be got after matrix algebraic operations. – Alexey Burnakov Oct 15 '17 at 9:19
• For the mathematics, see math.meta.stackexchange.com/questions/5020/… -- if you're familiar with LaTeX, mathjax uses a subset of that. There are a number of derivations on site, so a search should turn up what you seek. – Glen_b -Reinstate Monica Oct 15 '17 at 11:44 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806484125338,
"lm_q1q2_score": 0.8192589925676897,
"lm_q2_score": 0.8354835411997897,
"openwebmath_perplexity": 433.3680691736001,
"openwebmath_score": 0.891884446144104,
"tags": null,
"url": "https://stats.stackexchange.com/questions/308049/linear-regression-understanding-least-squares"
} |
dna, proteins, bacteriology, mrna
First of all, it's a common misconception that prokaryotic cells are mere bags stuffed with enzymes and whatever. Prokaryotes posses highly complicated compartmentalisation systems (some even possess nucleus-like compartments). Second of all, DNA is not "free floating": it's located at a specific site with a special molecular environment. If you want details, ask a separate question, or better a series of questions with narrow scope, because bacterial regulation is too diverse, bizarre and sophisticated to cover here (we had a 3 years-long course on this matter when I was a student).
Could you explain a bit of how the extra copy helps as is it not just
more data to deal with? | {
"domain": "biology.stackexchange",
"id": 4841,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dna, proteins, bacteriology, mrna",
"url": null
} |
Here's a graph of the final result (click to enlarge):
4. ## Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1) | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.991422513825979,
"lm_q1q2_score": 0.869950234527684,
"lm_q2_score": 0.8774767794716264,
"openwebmath_perplexity": 327.2902469247361,
"openwebmath_score": 0.8394282460212708,
"tags": null,
"url": "http://mathhelpforum.com/algebra/281216-need-equation-line-intersecting-two-points-involving-y-x-x-1-a.html"
} |
thermodynamics, condensed-matter
Title: P-T Phase diagram. Density of material at critical point One of the questions I had while reading through some material was:
Why is the density of a given volume of gas uniquely defined at the critical point, but not at the triple point?
Is it because at the critical point, a substance will flow like a liquid but retains properties of gas? While at the triple point, any small fluctuation will drive the substance into one of the other well defined phases.
Many thanks This really doesn't have to do with whether the fluids flow or not. Given the limited amount of information, it might be best understood in terms of macroscopic thermodynamics theory, critical-state fluid properties, and phase equilibrium. | {
"domain": "physics.stackexchange",
"id": 6219,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, condensed-matter",
"url": null
} |
navigation, move-base, ros-groovy, costmap-2d
The fact that both costmaps, local and global, subscribe to the /map topic looks strange as the static_map parameter is set to false for the local_costmap. Are you sure that the new local_costmap/plugins parameter was not set with a static map layer in the list? Just uncommenting it in the yaml file and restart without restarting the roscore, too, will not unset the parameter on the parameter server.
The resulting costmap will be advertised as nav_msgs/OccupancyGrid message in the private namespace of the costmap. rviz supports additional color schemes for costmaps now. The old GridCell publisher obviously has been dropped. If you want to visualize the costmaps you have to update your rviz config and add a Map display with the appropriate settings.
Note that dynamic updates of the static layer via the /map topic are currently broken in hydro. Only the first map received will be used for navigation. | {
"domain": "robotics.stackexchange",
"id": 15547,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, move-base, ros-groovy, costmap-2d",
"url": null
} |
• This was the Missouri State Problem Corner #8 The second solution uses just geometry. A discussion of the 3D problem is here – Ross Millikan Dec 2 '17 at 15:33
• That geometric solution is lovely! Thank you. :) – G Tony Jacobs Dec 2 '17 at 15:40
• The 3D problem took me a double integral and was a mess. The 4D problem has a cute simple solution. The link from the Missouri solution page is broken, though. – Ross Millikan Dec 2 '17 at 15:45
• @RossMillikan As the dimension increases, doesn't that central region eventually not exist anymore? Even for 4 dimensions, the main diagonal has length $\sqrt4=2$, so I don't see how there's anything to talk about. Is that the "cute, simple solution"? – G Tony Jacobs Dec 2 '17 at 15:48
• How do we even visualise the 4D problem? – SJ. Dec 2 '17 at 15:55
I’m not sure about the names of these regions, but we can find the areas of each using nothing more than trigonometry. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540650426279,
"lm_q1q2_score": 0.8139833286963101,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 220.15874020205985,
"openwebmath_score": 0.7212280631065369,
"tags": null,
"url": "https://math.stackexchange.com/questions/2547532/is-there-a-name-for-these-regions-produced-by-4-intersecting-circles-can-their"
} |
What is Net Present Value? The definition of net present value (NPV), also known as net present worth (NPW) is the net value of an expected income stream at the present moment, relative to its prospective value in the future. See if your npv and irr calculations meet your capital budgeting requirements. Net Present Value = NPV(rate,value1,[value2],…); where rate is the discount rate and the value1, value2…are the cash flows. This calculator will help you determine the net present value for each investment. Using Excel's NPV function you can fill in the cost of capital and annual cash flows, and Excel does the rest---these days :). NPV(cf0,cf,times,i,plot=FALSE) Arguments cf0 cash flow at period 0 cf vector of cash flows times vector of the times for each cash flow i interest rate per period. Mega Millions Expected Value Calculator Personal Finance Updated: November 15, 2019 by PK Advertising Disclosures Here we present a Mega Millions calculator, where you can calculate the expected | {
"domain": "agenzialenarduzzi.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98228770337066,
"lm_q1q2_score": 0.8248603525169861,
"lm_q2_score": 0.8397339696776499,
"openwebmath_perplexity": 1090.7755159869214,
"openwebmath_score": 0.24044151604175568,
"tags": null,
"url": "http://agenzialenarduzzi.it/owwr/npv-calculator.html"
} |
# A linear programming problem
Please guide me on the following question.
Consider the LP problem
maximize $x_1+x_2$
subject to
$x_1-2x_2\le10$
$x_2-2x_1\le10$
$x_1,x_2\ge0$
Which of the following is true?
$1.$ The LP problem admits an optimal solution.
$2.$ The LP problem is unbounded.
$3.$ The LP problem admits no feasible solution.
$4.$ The LP problem admits a unique feasible solution.
The first line passes through $(0,-5)$ and $(10,0)$. The second line passes through $(0,10)$ and $(-5,0)$. They both intersect at (-10,-10). Thereby, I am getting that it would be an unbounded problem and won't have any feasible solution.
That is, according to me, $2nd$ and $3rd$ options are correct. But answer should be only one option. Please help. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018398044143,
"lm_q1q2_score": 0.8105322273726464,
"lm_q2_score": 0.831143045767024,
"openwebmath_perplexity": 408.33413774096084,
"openwebmath_score": 0.5991631746292114,
"tags": null,
"url": "https://math.stackexchange.com/questions/469073/a-linear-programming-problem"
} |
javascript, jquery, json, api, to-do-list
e.preventDefault();
var data = {
'title': document.getElementById('title').value,
'description': document.getElementById('description').value
};
var json = JSON.stringify(data);
$.ajax({
type : 'POST',
url : '/api/v1/tasks',
data: json,
contentType: 'application/json;charset=UTF-8',
success: function(result) {
$("div").append('<li>Task:' + data["title"] + ' Description:' + data["description"] + 'Status: false</li>');
}
});
});
</script>
</body>
</html> Here are some improvements that can be done | {
"domain": "codereview.stackexchange",
"id": 21349,
"lm_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, json, api, to-do-list",
"url": null
} |
navigation, move-base
[roslaunch][INFO] 2014-09-03 07:00:29,548: ... preparing to launch node of type [rosout/rosout]
[roslaunch][INFO] 2014-09-03 07:00:29,548: create_node_process: package[rosout] type[rosout] machine[Machine(name[] env_loader[None] address[localhost] ssh_port[22] user[None] assignable[True] timeout[10.0])] master_uri[http://localhost:11311] | {
"domain": "robotics.stackexchange",
"id": 19275,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, move-base",
"url": null
} |
×
# 1) Derivation of the quadratic formula
This is note $$1$$ in a set of notes showing how to obtain formulas. There will be no words beyond these short paragraphs as the rest will either consist of images or algebra showing the steps needed to derive the formula mentioned in the title.
Suggestions for other formulas to derive are welcome, however whether they are completed or not depends on my ability to derive them. The suggestions given aren't guaranteed to be the next one in the set but they will be done eventually.
1 $\large ax^2 + bx + c = 0$
2 $\large x^2 + \frac{b}{a}x + \frac{c}{a} = 0$
3.1 $\large x^2 + \frac{b}{a}x = \left(x + \frac{b}{2a}\right)^2 - \left(\frac{b}{2a}\right)^2$
3.2 $\large \left(x + \frac{b}{2a}\right)^2 - \left(\frac{b}{2a}\right)^2 + \frac{c}{a} = 0$
4 $\large \left(x + \frac{b}{2a}\right)^2 - \frac{b^2}{4a^2} + \frac{4ac}{4a^2} = 0$
5 $\large \left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}$ | {
"domain": "brilliant.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9918120896142623,
"lm_q1q2_score": 0.8889129554527307,
"lm_q2_score": 0.8962513814471134,
"openwebmath_perplexity": 4455.504473720893,
"openwebmath_score": 0.9948969483375549,
"tags": null,
"url": "https://brilliant.org/discussions/thread/1-derivation-of-the-quadratic-formula/"
} |
quantum-state
Title: Why is a conjugate transpose of $|+\rangle$ a vector $1/\sqrt{2} (\langle0| + \langle1|)$? My understanding of the inner product is that it multiplies a vector by the conjugate transpose, but I don't understand why the conjugate transpose of $|+\rangle$ is $\frac{1}{\sqrt2}(\langle0| + \langle1|)$. The complex conjugation flips the sign of the imaginary part of a complex number. Transposition exchanges the row and column co-ordinates of a value in a matrix. A vector can be thought of as a matrix with 1 column and a certain amount of rows. The conjugation of this takes it to it's row form, which for a vector $|\psi\rangle$, becomes $\langle\psi|$.
Now you have $\frac{1}{\sqrt{2}}|0\rangle+|1\rangle$.$\frac{1}{\sqrt{2}}$ is real, so complex conjugation does nothing. However, $|0\rangle+|1\rangle$ become $\langle0|+\langle1|$.
So overall, you get $\frac{1}{\sqrt{2}}(\langle0|+\langle1|)$ | {
"domain": "quantumcomputing.stackexchange",
"id": 1970,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-state",
"url": null
} |
python, scikit-learn, cross-validation, class-imbalance
When do we determine that a validation set is a good representative of a test set? Should the difference between the two results be between a certain range?
What are some of the reasons for large discrepancies between the validation and test set results? I know from a previous question that data leakage from training set into validation set by upsampling the data before splitting it can cause this. But are there any other obvious reasons?
Does class imbalance influence the reliability of the validation results? So should I be using StratifiedKFold as the scikit learn documentation states: | {
"domain": "datascience.stackexchange",
"id": 8369,
"lm_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, scikit-learn, cross-validation, class-imbalance",
"url": null
} |
quantum-mechanics, schroedinger-equation, hilbert-space, probability, time-evolution
prescription of how to handle the probabilities for the wavefunction you have left over. For instance, to actually find an expectation value of the scattered wavefunction which may have lost some amplitude, you need to--you guessed it--rescale so probability is again 1. | {
"domain": "physics.stackexchange",
"id": 21378,
"lm_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, hilbert-space, probability, time-evolution",
"url": null
} |
ros, navigation, mapping, base-link, transform
If I write map->odom,it will says contain a loop.I don't know why.
tf::Transform(tf::Quaternion(0,0,0, 1), tf::Vector3(0, 0, 0)),
ros::Time::now(),"odom", "map")
My robot.launch says
[ WARN] [1311950065.207360272]: Waiting on transform from /base_link to /map to become available before running costmap, tf error: Could not find a connection between '/map' and '/base_link' because they are not part of the same tree.Tf has two or more unconnected trees.
What happened to base_link with two parents?
Why map->odom will contain a loop?
How to fix all the problems?
Thank you~
Originally posted by sam on ROS Answers with karma: 2570 on 2011-07-29
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 6293,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, mapping, base-link, transform",
"url": null
} |
python, beginner, python-3.x, game
list(test_sequences(56, (2, 8, 50), DEFAULT_OPERATORS))
[(2, 8, 50, '+', '-'),
(2, 50, 8, '+', '-'),
(8, 2, 50, '-', '+'),
(50, 2, 8, '-', '+'),
(2, 8, '-', 50, '+'),
(2, 50, '-', 8, '+')] | {
"domain": "codereview.stackexchange",
"id": 29926,
"lm_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, game",
"url": null
} |
analytical-chemistry, transition-metals
Title: Flame test for copper salts I have read from sources here, here and even in my textbook that Copper (specifically $\ce{CuCl2}$ ) burns with a bluish green flame. All the sources mention that this is due to electron excitation and de-excitation in the orbitals of Cu. However, Why is copper the only transition element to give a coloured flame? | {
"domain": "chemistry.stackexchange",
"id": 12920,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "analytical-chemistry, transition-metals",
"url": null
} |
So is the height of each disk dS or dH? If it is dS, then I understand how to get the formula for the lateral surface area of the cone, but not the volume. But if it is dH, then I understand how to get the formula for the volume of the cone, not the surface area. Can anyone clear up my confusion? I know that there are other methods to find the surface area/volume, but I just want to know why there is a contradiction between the dH/dS thing. Thanks! Any help is appreciated! :) | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105314577313,
"lm_q1q2_score": 0.8661871942271782,
"lm_q2_score": 0.8872045996818986,
"openwebmath_perplexity": 452.3127534107478,
"openwebmath_score": 0.833489179611206,
"tags": null,
"url": "http://www.physicsforums.com/showthread.php?s=3e9f850247158ce74e5c4c2340be720a&p=4029438"
} |
orbit, earth, time
Of course, the variation from month to month is heavily influenced by the number of days in each month, where as the variation from January to July is due to the distance from the Sun.
As a check, I calculated the distance travelled for each day in January 2019 and totaled the distance. That result was s=0.5419 AU compared to s=0.5422 AU when using the calculation for the first and end of the month. | {
"domain": "astronomy.stackexchange",
"id": 3573,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "orbit, earth, time",
"url": null
} |
python, programming-challenge, python-3.x
def test5(self):
STATE_5 = ["00p2400003777z24",
"1a406P0001000101",
"1064000001000101",
"1006774001032501",
"1000001001010001",
"1000001001064035",
"6227276A0622Z250"]
self.assertEqual(pipes.pipesGame(STATE_5), 43)
def test6(self):
STATE_6 = ["a000", "000A"]
self.assertEqual(pipes.pipesGame(STATE_6), 0)
def test7(self):
STATE_7 = ["a", "7", "1", "7", "7", "1", "1", "A"]
self.assertEqual(pipes.pipesGame(STATE_7), 6)
def test8(self):
STATE_8 = ["A0000b0000",
"0000000000",
"0000000000",
"0000a00000",
"0000000000",
"0c00000000",
"01000000B0",
"0C00000000"]
self.assertEqual(pipes.pipesGame(STATE_8), 1) | {
"domain": "codereview.stackexchange",
"id": 27976,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, programming-challenge, python-3.x",
"url": null
} |
This is a comment. There is something interesting to consider here in the generalization of this question to the case of modules over commutative rings. That is, suppose $$f : R \to S$$ is a morphism of commutative rings, and suppose we are given a collection of linearly independent elements $$v_1, \dots v_k \in R^n$$. Do they remain linearly independent when considered as vectors in $$S^n$$ after applying $$f$$ componentwise?
The answer is no in general (e.g. consider $$f : \mathbb{Z} \to \mathbb{F}_2$$ the usual quotient map and vectors $$(2, 2), (2, -2) \in \mathbb{Z}^2$$). When is it yes? Here linear independence means that if $$\sum r_i v_i = 0$$ where $$r_i \in \mathbb{R}$$ then each $$r_i = 0$$; equivalently, the $$v_i$$ induce a map
$$g : R^k \ni (r_1, \dots r_k) \mapsto \sum r_i v_i \in R^n$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.962673111584966,
"lm_q1q2_score": 0.8042975323979301,
"lm_q2_score": 0.8354835330070839,
"openwebmath_perplexity": 83.84588488183765,
"openwebmath_score": 0.9481441378593445,
"tags": null,
"url": "https://math.stackexchange.com/questions/2668447/is-a-linearly-independent-subset-of-a-vector-space-still-independent-over-a-bigg"
} |
Numerical Methods for Linear Control Systems, Numerical Solutions to the Navier-Stokes Equation, Microfluidics: Modelling, Mechanics and Mathematics, Enrico Canuto, ... Carlos Perez Montenegro, in, Uniformly distributed random numbers and arrays, Normally distributed random numbers and arrays, Pass or return variable numbers of arguments. Example 3: Determine the eigenvalues and eigenvectors of the identity matrix I without first calculating its characteristic equation. Recall from Definition [def:elementarymatricesandrowops] that an elementary matrix $$E$$ is obtained by applying one row operation to the identity matrix. We can also say, the identity matrix is a type of diagonal matrix, where the principal diagonal elements are ones, and rest elements are zeros. If A = O m×n then rank A = 0, otherwise rank A ⥠1. Note. eigenvalue λ. Example 2: Check the following matrix is Identity matrix? In general, the way acts on is complicated, but there are certain cases where the action maps | {
"domain": "themusiciansedge.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9591542887603537,
"lm_q1q2_score": 0.8013576178014316,
"lm_q2_score": 0.8354835371034368,
"openwebmath_perplexity": 665.4916474021965,
"openwebmath_score": 0.8925790190696716,
"tags": null,
"url": "http://www.themusiciansedge.com/docs/ez8xc.php?1f6e52=btat-cold-brew-coffee-maker"
} |
c++
return Mat4x4d(mat);
} | {
"domain": "codereview.stackexchange",
"id": 37070,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
electromagnetism, waves, electromagnetic-radiation, dielectric, raman-spectroscopy
Not forgetting about charge enclosed $Q_{end}$: in the limit of $h \rightarrow 0$, this becomes equal to the surface charge density multiplied by the area of the top/bottom surface! So, Gauss' law becomes:
$$ (\vec{D}_1\cdot \hat{n} - \vec{D}_2\cdot \hat{n})A = A\rho_{surf} $$
Cancelling $A$ and evaluating the dot products, we end up with the first boundary condition for the displacement field vector component perpendicular to the interface:
$$ \boxed{D_{1\perp} - D_{2\perp} = \rho_{surf}} $$
We could substitute $\vec{D} = \varepsilon \vec{E}$ here. Also, the presence of a surface charge will depend on the type of interface. | {
"domain": "physics.stackexchange",
"id": 67426,
"lm_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, waves, electromagnetic-radiation, dielectric, raman-spectroscopy",
"url": null
} |
array, actionscript-3
The purpose of pushing and popping tiles endlessly in and out of onScreenArray was so that I can loop through that small array for pertinent functions instead of the potentially huge array of total tiles. I'm not sure I understand your code entirely. Say for example I have no idea what complexArray is. I was about to shy away from writing a review because of that. But thinking about it, not understanding code might be the best reason to review it. | {
"domain": "codereview.stackexchange",
"id": 21866,
"lm_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, actionscript-3",
"url": null
} |
statistical-mechanics
In classical Hamiltonian mechanics, one models the non-statistical state of a system as a point in phase space $\mathcal P$. If the configuration space (space of spatial positions) of the system is $N$-dimensional, then the phase space is $2N$ dimensional because the state of the system is described both by its position and its momentum. The time evolution of the system is governed by the hamiltonian $H$, a real-valued function defined on phase space, in terms of which the dynamical equations of the system, Hamilton's equations, are written.
In quantum mechanics, one models a non-statistical state of a system as a point (vector) in a Hilbert space $\mathcal H$, a complex vector space that can be infinite-dimensional. The time evolution of the state of the system is government by the Hamiltonian $\hat H$, a self-adjoint operator on $\mathcal H$ in terms of which the dynamical equation of the system, the Shrodinger equation, is written. | {
"domain": "physics.stackexchange",
"id": 10766,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics",
"url": null
} |
Unable to understand an inequality in an application of the pumping lemma for context-free languages
The problem
Prove that the language
$\qquad L = \{a^n b^j \mid n = j^2\}$
is not context free using pumping lemma.
Approach taken by the book
To prove such statements, the book takes the approach of a game played against an opponent who strives to fail our effort to prove that the language is not context free. The steps involved in the game are as follows:
• The opponent chooses m such that for all w $\in$ L, |w| >= m
• We choose the string w
• The opponent decomposes w in uvxyz such that |vxy| <= m and |vy| >= 1
• We pump v and y i-times to get the string uv$^i$xy$^i$z.
Now, if for any i = 0,1,2,...
uv$^i$xy$^i$z $\notin$ L
the language L is not context free.
The solution to the above problem
• Opponent chooses m
• We choose w = a$^{m^2}$b$^m$
• The opponent decomposes w in uvxyz as follows: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97112909472487,
"lm_q1q2_score": 0.8402442716098127,
"lm_q2_score": 0.865224073888819,
"openwebmath_perplexity": 904.3273315753861,
"openwebmath_score": 0.7080543041229248,
"tags": null,
"url": "https://cs.stackexchange.com/questions/28729/unable-to-understand-an-inequality-in-an-application-of-the-pumping-lemma-for-co"
} |
Thus $$\text{if } \sqrt[3]{a} + \sqrt[3]{b} + \sqrt[3]{c} \ge 0\ \text{then } (a+b+c)^3 \ge 27abc$$
by setting $x = \sqrt[3]{a}$ etc
• This is better than AM$\ge$GM because the variables are not required to be all positive. Sep 2, 2011 at 17:40
Look up "arithmetic-geometric mean inequality". Your proof is fine, if you assume the variables $\ge 0$, except that your notation $\Sigma a^2 b$ is nonstandard.
• With the AM-GM inequality this is almost a one line proof.
– user38268
Jun 30, 2011 at 7:30
The following uses what is perhaps the most practical formulation of the AM-GM inequalities, which can be found as Theorem 2.6a in Ivan Niven's excellent Maxima and Minima without Calculus.
Theorem 2.6a If $n$ positive functions have a fixed product, their sum is minimum if it can be arranged that the functions are equal. On the other hand, if $n$ positive functions have a fixed sum, their product is maximum if it can be arranged that the functions are equal. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812327313545,
"lm_q1q2_score": 0.8269130915487236,
"lm_q2_score": 0.853912760387131,
"openwebmath_perplexity": 334.43388958599246,
"openwebmath_score": 0.9781709909439087,
"tags": null,
"url": "https://math.stackexchange.com/questions/48621/inequality-x-y-z3-geq-27-xyz/48735"
} |
Start with $(1+x)^n=\sum {{n}\choose{k}} x^k$ . If you integrate this twice wrt x you will get something close to what you are after.
• You won by half a second ! Cheers. – Claude Leibovici Feb 7 '14 at 9:14 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308800022474,
"lm_q1q2_score": 0.825567080721543,
"lm_q2_score": 0.8354835350552604,
"openwebmath_perplexity": 536.7621326374015,
"openwebmath_score": 0.8002776503562927,
"tags": null,
"url": "https://math.stackexchange.com/questions/667156/is-there-a-closed-formula-for-sum-k-0n-frac1k1k2-binomnk/667158"
} |
homework-and-exercises, lagrangian-formalism, harmonic-oscillator
Lagrangians are rather annoying to use for non-conservative systems (your system is non-conservative since the hinge is dissapating energy into heat, therefore leaving your system since you're not accounting for heat, nor would you want to). You have to literally "inject in" a potential energy to account for it by knowing how it the disappative force will act. See http://en.wikiversity.org/wiki/Advanced_Classical_Mechanics/Dissipative_Forces for some really good examples, one includes a pendulum even!
To your final bullet point, I believe the answer is...don't think about it this way. Solving in a non-inertial reference frame kind of encompasses a different approach entirely. Many of your old terms change, and the formalism for solving it takes into account everything at the same time...I think it's bad practice to solve a Lagrangian in an inertial reference frame and then try adding terms in later...possible, but unadvised. | {
"domain": "physics.stackexchange",
"id": 9149,
"lm_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, lagrangian-formalism, harmonic-oscillator",
"url": null
} |
c#
Title: Folder to Zip - code Maintainability From the code metrics in VS it says that the maintainability index is 64.
I think the code is really easy written.
How can I get a higher Maintainability Index?
public void ExportProjectFolderToZip()
{
Log4NetLogger.Logger.Info("Start of Method ExportProjectFolderToZip");
var startPath = new Uri(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)).LocalPath; //get current directory (Release/Debug)
var zipPath = new Uri(@"" + startPath + "-" + DateTime.Now.ToString("yyyy-MM-dd-hh-mm") + ".zip").LocalPath; //zip filename
try
{
CreateFromDirectory(startPath, zipPath, CompressionLevel.Fastest, true); //create zip folder
}
catch (Exception ex)
{
Log4NetLogger.Logger.Error("Error: " + ex.Message);
}
Log4NetLogger.Logger.Info("End of Method ExportProjectFolderToZip"); | {
"domain": "codereview.stackexchange",
"id": 26340,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#",
"url": null
} |
slam, navigation, ros-melodic, rosbag, bag-to-pcd
Would you please tell me, how do I do as you said, saving the database and opening it after using RTABMAP please ?
Comment by LexGM on 2021-07-01:
After executing the bag while playing the bag you should be able to see how the map is being created in real time. When the bag if finished if you close the process of rtabmap with (Control+C) the map should be saved in /.ros/rtabmap.db and if you open that with rtabmap standalone I think you can export it
Comment by Karishma Thumu on 2021-07-02:
everything is going exactly as you saidm until saving /.ros/rtabmap.db. But when I open the stabdalone RTABMAPVIZ, and click on file --->open database, it shows an empty rtabmap folder.
When i played the rosbag file, with rtabmap_ros node, I closed the process with Ctrl +C , then these statements are popping up on the terminal,
rtabmapviz: ctrl-c catched! Exiting Qt app...
rtabmap: Saving database/long-term memory... (located at /home/tester/.ros/rtabmap.db) | {
"domain": "robotics.stackexchange",
"id": 36599,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, ros-melodic, rosbag, bag-to-pcd",
"url": null
} |
java, parsing
public static String parse2(final String sqlStatement, final String marker) {
final Map<String, List<Integer>> mapNameToListPositons = new HashMap<String, List<Integer>>();
//System.out.println(Arrays.toString(sqlStatement.split("[ (),]")));
//[INSERT, INTO, customers, , name, , surname, , age, , VALUES, , :name, , :surname, , :age]
String returnStatement = sqlStatement;
int parameterPosition = 1;
for (final String sqlStatementSplitItem : sqlStatement.split("[ (),]")) {
if (sqlStatementSplitItem.startsWith(marker)) {
insertIntoMap(mapNameToListPositons, sqlStatementSplitItem.substring(1), parameterPosition);
++parameterPosition;
returnStatement = returnStatement.replace(sqlStatementSplitItem, "?");
}
}
System.out.println(mapNameToListPositons);
return returnStatement;
} | {
"domain": "codereview.stackexchange",
"id": 3252,
"lm_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, parsing",
"url": null
} |
slam, kinect
Originally posted by georgebrindeiro with karma: 1264 on 2013-01-28
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by Ben_S on 2013-01-29:
If you are going for the alternative, you should look for the Xtion Pro LIVE (http://www.asus.com/Multimedia/Xtion_PRO_LIVE/) since the normal Xtion Pro does not have an rgb camera. | {
"domain": "robotics.stackexchange",
"id": 12610,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, kinect",
"url": null
} |
Thus $A^2-A=0 \Rightarrow A(A-I)=0 \Rightarrow A^{-1}A(A-I)=0 \Rightarrow A-I=0 \Rightarrow A=I$.
Is it complete now? Could we improve something? (Thinking)
Homework Helper
MHB
So is it as follows?
Since the rank of the $m\times m$ matrix $A$ is $m$ we have that at the echelon form the matrix has no zero-rows. This implies that at the diagonal all elements are different from zero and this implies that the determinant is different from zero, since the determinant is equal to the product of the diagonal elements. Since the determinant is not equal to zero, the matrix is invertible. So $A^{-1}$ exists.
Thus $A^2-A=0 \Rightarrow A(A-I)=0 \Rightarrow A^{-1}A(A-I)=0 \Rightarrow A-I=0 \Rightarrow A=I$.
Is it complete now? Could we improve something?
All good. (Nod) | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769078156284,
"lm_q1q2_score": 0.8476073315060607,
"lm_q2_score": 0.8688267677469952,
"openwebmath_perplexity": 260.00790927888727,
"openwebmath_score": 0.9501980543136597,
"tags": null,
"url": "https://www.physicsforums.com/threads/show-that-a-is-identical.1042412/"
} |
javascript, jquery, html
layers.forEach(layer => {
if (layer.src) {
arr.push({
src: layer.src,
x: layer.x,
y: layer.y,
name: layer.name
});
} else if (layer.layers) {
let newArr = getAllSrc(layer.layers);
if (newArr.length > 0) {
newArr.forEach(({
src,
x,
y,
name
}) => {
arr.push({
src,
x: (layer.x + x),
y: (layer.y + y),
name: (name)
});
});
}
}
});
return arr;
} | {
"domain": "codereview.stackexchange",
"id": 33966,
"lm_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, html",
"url": null
} |
python, python-3.x, gui, flask, pyqt
def init_gui(application, port=5000, width=300, height=400,
window_title="PyFladesk", icon="appicon.png", argv=None):
if argv is None:
argv = sys.argv
# Application Level
qtapp = QtWidgets.QApplication(argv)
webapp = ApplicationThread(application, port)
webapp.start()
qtapp.aboutToQuit.connect(webapp.terminate)
# Main Window Level
window = QtWidgets.QMainWindow()
window.resize(width, height)
window.setWindowTitle(window_title)
window.setWindowIcon(QtGui.QIcon(icon))
# WebView Level
webView = QtWebEngineWidgets.QWebEngineView(window)
window.setCentralWidget(webView)
# WebPage Level
page = WebPage('http://localhost:{}'.format(port))
page.home()
webView.setPage(page)
window.show()
return qtapp.exec_() | {
"domain": "codereview.stackexchange",
"id": 29536,
"lm_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, gui, flask, pyqt",
"url": null
} |
c
We should make the declaration of main() be a prototype. Also, it's permitted to omit the return statement in main(); since we always return success, let's remove that clutter.
Modified code
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
unsigned long total_secs;
while (scanf("%lu", &total_secs) != 1) {
// consume some input
if (scanf("%*s") == EOF) {
return EXIT_FAILURE;
}
printf("Enter a valid integer: ");
fflush(stdout);
}
unsigned long hour = total_secs / 3600;
unsigned int minute = total_secs / 60 % 60;
unsigned int second = total_secs % 60;
printf("%lu:%u:%u\n", hour, minute, second);
} | {
"domain": "codereview.stackexchange",
"id": 40237,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c",
"url": null
} |
javascript, math-expression-eval
Ideally, you would complain if the function reaches the end with something other than 1 element in the stack, since that would imply that the RPN expression wasn't "balanced". In fact, your third example suffers from this; the stack ends at [2, 23.1666...], but you report the 23.166... as the answer despite the expression not being fully parsed.
It would also be nice to allow (and ignore) whitespace in the string, just to make input a little flexible. A more readable input string might be beneficial to users (I tested your code, and kept putting in spaces after commas out of habit).
There's another thing your code doesn't handle: Anything with decimals. Since you can't use . in the string, you're limited to integers. That's a bit harsh. You could also consider allowing other legal JS number formats like 0x3 hex, 0b1010 binary, or 3.14e3, but that's more just an exercise for you. eval should already handle them fine, but your regex will complain. | {
"domain": "codereview.stackexchange",
"id": 24155,
"lm_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, math-expression-eval",
"url": null
} |
algorithms, permutations
Title: Simulated annealing to find the correct permutation of 20 words I have 20 words. One permutation of these 20 words is the "correct" one. Assume I have a metric to find the correctness of the permutation.
I'm trying to figure out how to use simulated annealing to find the correct permutation of these 20 words. To begin with, I'm not even sure if I understand simulated annealing entirely, so I'll describe an algorithm that I think resembles simulated annealing.
For an arbitrary number (preferably a big number) of times, generate a random permutation and measure how correct it is. If the answer is more correct than any previous attempt, save the score and the sentence. Once we are done iterating, we have found something that it is probably close to the global maximum (the "correct" permutation).
I'm not sure where to go from there. Essentially, I have two questions. | {
"domain": "cs.stackexchange",
"id": 14500,
"lm_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, permutations",
"url": null
} |
quantum-mechanics, harmonic-oscillator, hamiltonian, time-evolution, open-quantum-systems
$\hat{H}=\hbar \omega(t) (a^{\dagger}a+\frac{1}{2})$
The Hamiltonian commutes with itself. Therefore we only need to calculate the explicit time derivative:
$\frac{\partial \hat{H}}{\partial t} = \hbar \dot{\omega}(a^{\dagger}a+\frac{1}{2})+\hbar \omega (\dot{a}^{\dagger}a+a^{\dagger}\dot{a})$
The first term on the right hand side is indeed $\frac{\dot{\omega}}{\omega}\hat{H}$. However, in my calculations I couldn't verify that the second term is $-\frac{\dot{\omega}}{\omega}\hat{L}$. In order to express the time derivatives of the ladder operators I wrote them in terms of the position and the momentum operators and used the fact that for this particular system:
$\dot{\hat{Q}}=\frac{\hat{P}}{m}, \quad \dot{\hat{P}}= -m\omega^2\hat{Q}$ | {
"domain": "physics.stackexchange",
"id": 83115,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, harmonic-oscillator, hamiltonian, time-evolution, open-quantum-systems",
"url": null
} |
terminology, biotechnology, antibody
The assay for identification of the presence and relative quantification of FOLR1 autoantibodies in serum samples was performed as previously published.41–43 Horseradish peroxidase (HRP) labelled anti IgG antibody (Cat#I8640 Sigma Aldrich) and IgM antibody (Cat#I8260, Sigma Aldrich) were used to detect IgG and IgM. Antibody-depleted sera (Sigma Aldrich) was used as negative control. Serum effect on blocking FA binding to folate binding protein was detected using HRP labelled FA (FA-HRP, Ortho-Clinical Diagnostics, Raritan, New Jersey, USA). FA in serum samples was removed as previously described. Unlabelled FA was spiked (0.01–2000 ng/mL) into stripped antibody depleted sera to generate the standard curve. The SuperSignal ELISA Femto Substrate (Cat#37074, ThermoFisher Scientific) was used as substrate for detection of HRP activity. Images were collected using a 96-well imager (Q-View Imager, Quansys Biosciences). Intensities were extracted from the images using Q-View Software. IgG, | {
"domain": "biology.stackexchange",
"id": 11088,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "terminology, biotechnology, antibody",
"url": null
} |
general-relativity, gravity, spacetime, differential-geometry, galilean-relativity
Phys. Rev. D 31, 1841 – Published 15 April 1985
https://journals.aps.org/prd/abstract/10.1103/PhysRevD.31.1841
but there, too, the authors point out the obstruction.
"VI. Newton's Field Equations"
"Strangely enough, Newton's field equations" [their (1.15) and (1.17) cited] "cannot be easily derived from a specific space-time Lagrangian density. It seems that there might exist some puzzling geometric obstruction to the existence of a well-defined variatonal problem in the four-dimensional picture. Also the fact that only matter density enters the source term of Newton's field equations" [i.e. that the integration of fluid dynamics with the field equations, that Einstein's equations has, is lost] "has not been quite understood so far in a covariant formalism. The role of the mass flow and stress-energy tensor of matter distributions still remains to be clarified." | {
"domain": "physics.stackexchange",
"id": 97272,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, gravity, spacetime, differential-geometry, galilean-relativity",
"url": null
} |
Update
Based on Aryabhata's answer, my attempt is: $$\prod_{i=1}^{\infty}p_i^{\sum_{k=1}^{\infty} \left\lfloor\frac{n}{p^k}\right\rfloor}$$
Does it make sense?
Thanks.
-
The edit is incorrect. The $\sum$ gives the power of prime $p$ that divides $n!$. So it must be $\prod p^{\sum\dots}$... – Aryabhata Feb 18 '11 at 6:50
@Moron: Thanks. Let me try one more time. – Chan Feb 18 '11 at 6:52
btw, are you doing the project euler (or was it euclid?) programming puzzles? – Aryabhata Feb 18 '11 at 6:52
@Moron: It's not a project, I just read the book and practice some problems. Just my curiosity since I really like expressing Math idea using programming. – Chan Feb 18 '11 at 6:54
You can use Legendre's formula that the highest power of a prime $p$ which divides $n!$ is given by
$$\text{ord}(n,p) = \sum_{k=1}^{\infty} \left\lfloor\frac{n}{p^k}\right\rfloor$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8042506642221859,
"lm_q2_score": 0.8267117855317474,
"openwebmath_perplexity": 203.74743196019875,
"openwebmath_score": 0.9391356110572815,
"tags": null,
"url": "http://math.stackexchange.com/questions/22637/question-regarding-to-canonical-factorization-of-n"
} |
optics, electromagnetic-radiation, laser, dispersion, chirp
Similarly, the ability to deliver sharply controlled bursts of power is extremely useful in laser microsurgery, and there are several types of eye surgery that exclusively use CPA pulses to provide sharp 'kicks' of power which perform cleaner incisions.
On a much larger scale, when you really turn up the power to the maximum, CPA is a vital component of laser wakefield acceleration, which uses the ionized pocket left behind by an intense laser pulse as it travels through a gas to accelerate electrons to energies that would otherwise require an extremely large particle accelerator, but which are now available using a much more modest table-top laser system. | {
"domain": "physics.stackexchange",
"id": 52342,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, electromagnetic-radiation, laser, dispersion, chirp",
"url": null
} |
forces, electrons, matter
In short, assume that we have two labs A and B, in each one there is a polarizer, and each one of the photons flies toward such a lab. Assume that in the lab A the experimenter orientates the polarizer in some direction, picked by him arbitrarily. Assume that in the lab B the experimenter orientates the polarizer by chance in the same direction. Then, what happens is that in the lab A the photon passes the polarizer, so does the photon in the lab B. But if in the lab A the photon doesn't pass, neither does the photon in the lab B. And the labs are far from one another?
Which force acts between the two photons so as to correlate their actions? If one photon behaved in a certain way, passed or not the polarizer, how does it influence the other photon to behave the same way? We don't know. And take into account that by the time the two photons leave the source, the experimenters in the two places, may not have even decided in which directions to orientate the polarizers. | {
"domain": "physics.stackexchange",
"id": 20338,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, electrons, matter",
"url": null
} |
space created by Werner Heisenberg, eigenvalues of a a transpose Born, and denotes a.. You agree to our Cookie Policy is scaled these eigenvalues are the!... Using this website uses cookies to ensure you get the idea and concepts behind it questions tagged linear-algebra eigenvalues-eigenvectors. Its transpose, or equivalently if a is Hermitian if and only if -- I 'll write it this! That while a and its transpose, so it has real eigenvalues answers and Replies related Calculus Beyond... Reversed or left unchanged—when it is time to review a little hairier: / the eigenvalues a! Its invariant action, every vector has Ax = 0x means that this eigenvector x is in form! We 'll appreciate that it 's a property of transposes that # # is also.. A polynomial equation represents a self-adjoint operator over a real symmetric matrix is very in... Enjoy Mathematics vector has Ax = 0x means that this eigenvector x in. Seem to be very scary until we get the best experience guest that the eigenvalues | {
"domain": "zenmediaagency.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9719924793940119,
"lm_q1q2_score": 0.8495965053664783,
"lm_q2_score": 0.8740772417253256,
"openwebmath_perplexity": 490.316527788523,
"openwebmath_score": 0.8098899722099304,
"tags": null,
"url": "http://www.zenmediaagency.com/light-blue-zsx/eigenvalues-of-a-a-transpose-ab1793"
} |
ros, rviz, slam, hector-slam, ros-noetic
ros::Publisher laser_scan_pub;
void chatterCallback(const sensor_msgs::Range& range_msg)
{
// Create a LaserScan message
sensor_msgs::LaserScan laser_scan_msg;
laser_scan_msg.header = range_msg.header;
// Set the LaserScan-specific parameters
laser_scan_msg.angle_min = -M_PI / 4.0; // Start angle (usually 0 radians)
laser_scan_msg.angle_max = M_PI / 4.0; // End angle (usually 0 radians)
laser_scan_msg.angle_increment = M_PI / 180.0; // Angle increment (usually 0 radians)
laser_scan_msg.time_increment = 0.0; // Time between measurements (usually 0 seconds)
laser_scan_msg.scan_time = 0.1; // Time taken for one scan (usually 0 seconds)
laser_scan_msg.range_min = range_msg.min_range;
laser_scan_msg.range_max = range_msg.max_range;
// Calculate ranges array
laser_scan_msg.ranges.push_back(range_msg.range);
// Publish LaserScan message
laser_scan_pub.publish(laser_scan_msg);
} | {
"domain": "robotics.stackexchange",
"id": 38665,
"lm_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, rviz, slam, hector-slam, ros-noetic",
"url": null
} |
structural-engineering
It's derivation is simple:
$$\begin{align}
P_{crit} &= \dfrac{\pi^2 EI}{L^2} \\
\dfrac{P_{crit}}{A} &= \pi^2 E \cdot \dfrac{I}{L^2A} \\
\sigma_{crit} &= \pi^2 E \cdot \dfrac{i^2}{L^2} \\
\sigma_{crit} \equiv f_y &= \pi^2 E \cdot \dfrac{1}{\lambda_1^2} \\
f_y &= \dfrac{\pi^2 E}{\lambda_1^2} \\
\therefore \lambda_1 &= \pi\sqrt{\dfrac{E}{f_y}}
\end{align}$$
From this we can calculate a slenderness ratio for steel and another for aluminium, above which any element made of each material will fail by buckling, and below which they will fail by simple compression.
And that's all that's described by $\bar\lambda$: if it's greater than 1 (the element's slenderness ratio is greater than $\lambda_1$), the element will fail by buckling; if lower, by compression. If exactly equal to 1, it'll do both simultaneously.
In reality, codes usually have "fuzzier" rules for elements with $\bar\lambda \approx 1$, since there can be interactions between both failure states which lead to ugly math. | {
"domain": "engineering.stackexchange",
"id": 3699,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "structural-engineering",
"url": null
} |
common in physics and mathematics the constraints, for these second derivatives differential! Will include illustrating how to sketch phase portraits associated with complex eigenvalues ( centers and spirals.! The solution of differential equations with initial conditions as before, and we ’ ll by! Equation eqn, where eqn is a great way to guide yourself a. Equations to solving with Laplace transforms, Wolfram|Alpha is a system of equations, possibly multiple solution sets are together! You ’ ve found the general solution sides of these we get into however... Integration of functions gives the following 4 th order differential equation, one need define. Call the system so that each side is a little complication did differential! Closed form solution very simple change of variable ansatz method two initial as. Represents the equation with an initial value Problem just as we did in the values specified in the form. Bank account numbers that we usually are after in these cases dsolve ( | {
"domain": "msurma.pl",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357237856482,
"lm_q1q2_score": 0.81161249732262,
"lm_q2_score": 0.8267117898012104,
"openwebmath_perplexity": 430.58297011142395,
"openwebmath_score": 0.7870026230812073,
"tags": null,
"url": "http://www.msurma.pl/ve00ubj5/ce2708-solving-system-of-differential-equations-with-initial-conditions"
} |
tensorflow, machine-learning-model, aws, sagemaker, pretraining
The output was:
{'predictions': [[153.55], [79.8196], [45.2843]]}
Now the problem is that we cannot use 5 different deploy statements and create 5 different endpoints for 5 models. For this we followed two approaches:
i) Used MultiDataModal of Sagemaker
from sagemaker.multidatamodel import MultiDataModel
sagemaker_model1 = MultiDataModel(name = "laneMultiModels", model_data_prefix = tarS3Path,
model=sagemaker_model, #This is the same sagemaker_model which is trained above
#role = role, #framework_version='1.13',
sagemaker_session = sagemaker_session)
predictor = sagemaker_model1.deploy(initial_instance_count=1,
instance_type='ml.m4.xlarge')
predictor.predict(data.values[:,0:], target_model='model{}.tar.gz'.format(1)) | {
"domain": "datascience.stackexchange",
"id": 10704,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tensorflow, machine-learning-model, aws, sagemaker, pretraining",
"url": null
} |
ros
Title: *** glibc detected *** /opt/ros/groovy/lib/rviz/rviz: free(): invalid next size (normal): 0x000000000526d7f0 ***
Hi,
Would like to check if rviz is incompatible with groovy now? I am currently using ubuntu 12.04 and groovy.
i am managed to run the original rviz with minimal settings. however, for example, when i try to add in the laser scan data from the hokuyo node. it clashes and show the following errors. can anyone help me please? Thank you.
The error message shows
rosrun rviz rviz -d `rospack find rbx1_nav`/nav.rviz
[ INFO] [1393839197.213827908]: rviz version 1.9.34
[ INFO] [1393839197.213970839]: compiled against OGRE version 1.7.4 (Cthugha)
[ INFO] [1393839197.626062602]: OpenGl version: 4.4 (GLSL 4.4).
Segmentation fault (core dumped) | {
"domain": "robotics.stackexchange",
"id": 17151,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
oh...btw,where do u live (i mean which region)
- 3 years, 1 month ago
Rajasthan..U?
- 3 years, 1 month ago
oh
- 3 years, 1 month ago
So , you are already selected..Great 👍
- 3 years, 1 month ago
- 3 years, 1 month ago
Coz as per cutoff(s) uploaded by Resonance , cutoff in Chandigarh is lower than others ( Rajasthan , Maharashtra , UP , etc) ... That's why!
- 3 years, 1 month ago
According to Resonance , cutoff in Chandigarh is just 4(questions)
- 3 years, 1 month ago
Ya. Thats ridiculous. WB region has always got a higher cutoff...
- 3 years, 1 month ago
i don't think it will be so low
- 3 years, 1 month ago
If that isnt, then wb will be higher and i will surely not qualify
- 3 years, 1 month ago
It's 11 in Rajasthan ! 😅😒
- 3 years, 1 month ago
LetTheFateDecide !!Bye
- 3 years, 1 month ago
which class are u in toshit?
- 3 years, 1 month ago
@Shreyan Chakraborty .. How much?
- 3 years, 1 month ago
JANI NA BAJE HOYECHE
- 3 years, 1 month ago | {
"domain": "brilliant.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.96036116089903,
"lm_q1q2_score": 0.8550040007333919,
"lm_q2_score": 0.890294230488237,
"openwebmath_perplexity": 4411.028552146862,
"openwebmath_score": 0.9630981087684631,
"tags": null,
"url": "https://brilliant.org/discussions/thread/1-3/"
} |
vertex is always, If two angles of an acute-angled triangle are 85. Select the correct answer and click on the “Finish” buttonCheck your score and answers at the end of the quiz, Visit BYJU’S for all Maths related queries and study materials, Your email address will not be published. Formulas. Area of Triangles. Question: Which formula is used when given 90-degree triangle, opposite angle is 26 degrees and one leg is know? Consider the triangle $$ABC$$ with sides $$a$$, $$b$$ and $$c$$. Obtuse triangles CBSE Previous Year Question Papers Class 10, CBSE Previous Year Question Papers Class 12, NCERT Solutions Class 11 Business Studies, NCERT Solutions Class 12 Business Studies, NCERT Solutions Class 12 Accountancy Part 1, NCERT Solutions Class 12 Accountancy Part 2, NCERT Solutions For Class 6 Social Science, NCERT Solutions for Class 7 Social Science, NCERT Solutions for Class 8 Social Science, NCERT Solutions For Class 9 Social Science, NCERT Solutions For Class 9 Maths Chapter 1, | {
"domain": "rgunotizie.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795091201804,
"lm_q1q2_score": 0.8069292529892732,
"lm_q2_score": 0.8175744739711883,
"openwebmath_perplexity": 634.3828917094453,
"openwebmath_score": 0.5033940672874451,
"tags": null,
"url": "http://www.rgunotizie.com/misc/89yykz1s/8336bd-acute-triangle-formula"
} |
python, performance, python-3.x, excel
# Create a dictionary to map unique IDs to row numbers in the new workbook
new_id_map = {}
for i in range(2, new_sheet.max_row + 1):
new_id_map[new_sheet.cell(row=i, column=1).value] = i
#Create a dictionary to map unique IDs to row numbers in the old workbook
old_id_map = {}
for i in range(2, old_sheet.max_row + 1):
old_id_map[old_sheet.cell(row=i, column=1).value] = i | {
"domain": "codereview.stackexchange",
"id": 44437,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, python-3.x, excel",
"url": null
} |
reinforcement-learning, objective-functions, sutton-barto
Simple, fast (perhaps simulated), environments which can be solved to arbitrary accuracy using tabular methods. In this case, you first calculate $v_{\pi}(s)$ using a non-approximate method, then sample many approximations by running the environment using policy $\pi$ and treating that as your data set.
Fully deterministic environments where $\pi$ is also deterministic. These have a variance of $0$ for Monte Carlo returns, so each observed return from any given state is already the true value of $v_{\pi}(s)$. Again you can just run the environment many times to get your data set to calculate $v_{\pi}(s)$ and $\hat{v}(s,w)$ for the observed states in the correct frequencies, and thus have data to calculate $\overline{VE}$. | {
"domain": "ai.stackexchange",
"id": 1413,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning, objective-functions, sutton-barto",
"url": null
} |
• I took a look at the definition of Pettis integral. The second solution should also work for this integral. – orangeskid May 30 at 5:06
• Yes, the Pettis integral. I confuse him with Dunford, as in the Dunford-Pettis theorem. Any way, that type of integral is useful even when functions take values on more abstract linear spaces (at least locally convex). The advantage of Bochner+Daniell is that one can derive a natural notion of measurability (Caratheodory's cut idea does not work here). – Oliver Diaz May 30 at 14:48 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754442973825,
"lm_q1q2_score": 0.8368607479130254,
"lm_q2_score": 0.849971175657575,
"openwebmath_perplexity": 316.03017346343296,
"openwebmath_score": 0.9603366851806641,
"tags": null,
"url": "https://math.stackexchange.com/questions/3696228/int-f-1d-mu2-cdots-int-f-nd-mu2-leq-int-sqrtf-12-cdotsf-n2d-mu"
} |
dependent-type, normalization
Title: References on implementing universe levels over MLTT? I've followed the tutorial on Checking Dependent Types with Normalization by Evaluation: A Tutorial by David Christiansen, where we implement a small dependently typed kernel with the axiom Univ : Univ. The "Projects" section of the tutorial provides a project on replacing this with a universe hieararchy:
7.Replace U with an infinite number of universes and a cumulativity relation. To do this, type equality checks should be replaced by a subsumption check, where each type constructor has variance rules similar to other systems with subtyping.
I've looked around a little, and it seems like both Agda and Lean implement a universe hierarchy using levels, which have the following operations:
lzero : Level
lsuc : (n : Level) → Level
_⊔_ : (n m : Level) → Level | {
"domain": "cstheory.stackexchange",
"id": 5219,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dependent-type, normalization",
"url": null
} |
quantum-field-theory, lagrangian-formalism, terminology, field-theory, interactions
We call a (scalar) field $\phi$ with a Lagrangian density
$$ L = \frac{1}{2}\partial_\mu\phi\partial^\mu\phi + \frac{1}{2}m\phi^2$$
"free" and fields with any other Lagrangian density "interacting". Typically, this means that the Lagrangian density is of the form
$$ L = \frac{1}{2}\partial_\mu\phi\partial^\mu\phi + \frac{1}{2}m\phi^2 + V(\phi)$$
where the potential $V$ is a polynomial in $\phi$, e.g. $V(\phi) = \phi^4$. This contains no picture of "how" the field interacts, just as the $\frac{1}{2}m\phi^2$ term contains no explanation of "how" this is the mass. | {
"domain": "physics.stackexchange",
"id": 33335,
"lm_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, lagrangian-formalism, terminology, field-theory, interactions",
"url": null
} |
asymptotics, mathematical-analysis, landau-notation
Title: How to prove $(n+1)! = O(2^{(2^n)})$ I am trying to prove $(n+1)! = O(2^{(2^n)})$. I am trying to use L'Hospital rule but I am stuck with infinite derivatives.
Can anyone tell me how i can prove this? You can compare ratios of adjacent values: $(n+1)!/n! = n+1$ versus $2^{2^n}/2^{2^{n-1}} = 2^{2^{n-1}}$. Since $n+1\leq 2^{2^{n-1}}$ for $n \geq 1$, you can prove using mathematical induction that $(n+1)! \leq 2^{2^n}$. | {
"domain": "cs.stackexchange",
"id": 554,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asymptotics, mathematical-analysis, landau-notation",
"url": null
} |
slam, navigation, slam-gmapping, gmapping, move-base
Comment by Reza Ch on 2012-10-16:
Thanks a lot for your replies! I added the whole warning output then.
Comment by Lorenz on 2012-10-16:
Hm. Unfortunately the rxconsole output doesn't really help. I really thought it was possible to get the logger but apparently it's not. Can you set the map width and height of the global costmap to something like 50.0 and set origin_x and origin_y to -25.0? The origins might do the trick.
Comment by kwiesz91 on 2015-09-14:
Just a side note for future observers: the navigation robot setup tutorial states that you should have either "footprint" or "robot_radius" set, not both.
True!
Before I go through your last comment, I added one map to my global costmap and I got this warning:
[ WARN] [1350403608.110641000]: You have set map parameters, but also requested to use the static map. Your parameters will be overwritten by those given by the map server | {
"domain": "robotics.stackexchange",
"id": 11371,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, slam-gmapping, gmapping, move-base",
"url": null
} |
general-relativity, accelerator-physics
Title: Why is it so hard to accelerate macroscopic objects? It seems all we're capable of accelerating currently are atomic particles. Why can't we, say, accelerate a clock to relativistic speeds? The obvious answer is their mass, accelerating a subatomic particle to relativistic velocity takes many orders of magnitude less energy than accelerating a macroscopic particle.
More subtly, we can only accelerate subatomic particles that we can manipulate with electromagnetic fields, nobody has a proposed viable experiments to study relativistic neutron or neutrino reactions because we really have no way to manipulate them. What this means is that we need relatively light, charged, particles that we can accelerate to relativistic velocity in a reasonable space with reasonable amount of energy. | {
"domain": "physics.stackexchange",
"id": 35,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, accelerator-physics",
"url": null
} |
geometry, satellites, gps
Yes. You can think of each satellite defining a sphere, where the center of the sphere is the satellite and the receiver is some point on the sphere. The spheres all intersect at the receiver, but they may intersect in other points also.
Two spheres intersect in a circle. Any number of additional colinear spheres, spheres centered on the line defined by the center of the two, will intersect in the same circle.
Three non-colinear spheres intersect in two points. Any number additional coplanar spheres, spheres centered on the plane defined by the centers of the three, will intersect in the same two points. | {
"domain": "physics.stackexchange",
"id": 97597,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geometry, satellites, gps",
"url": null
} |
to:
'''Second Order ODE Example'''
Changed line 27 from:
**Modified Form for Solution**
to:
'''Modified Form for Solution'''
February 06, 2020, at 03:08 PM by 12.45.189.170 -
Changed lines 17-18 from:
Below is an example of a second-order differential equation with constant {K} and variable {y} with first derivative {y'} and second derivative {y''}:
to:
**Second Order ODE Example** | {
"domain": "apmonitor.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9504109770159683,
"lm_q1q2_score": 0.8078219427160057,
"lm_q2_score": 0.8499711832583696,
"openwebmath_perplexity": 1245.0420723087434,
"openwebmath_score": 0.5146600604057312,
"tags": null,
"url": "https://apmonitor.com/wiki/index.php/Apps/2ndOrderDifferential?action=diff"
} |
javascript, jquery, playing-cards
// if (player.cards.length === 5) {
// player.canHit = false;
// }
// conditional (ternary) operator
player.canHit = player.cards.length === 5 ? false : true
if (player.canHit) {
$("#btnHit").show();
} else {
$("#btnHit").hide();
}
//player.cards.push(new card("Spades","A"));
//player.cards.push(new card("Spades","10"));
document.getElementById("playerCards").innerHTML = JSON.stringify(player);
makeCardPlayer(tempCard[0]);
// resolve();
// }, DELAY);
// });
}
const dealOneCardToDealer = (holeCard, isHit) => {
// return new Promise(function (resolve) {
// setTimeout(function () {
// Take a card from the top deck to be assigned to tempcard.
tempCard = deck.cards.splice(0, 1);
//console.log(tempCard[0].face);
//console.log(dealer.handValue);
if(tempCard[0].face === "A"){
dealer.hasAce = true;
} | {
"domain": "codereview.stackexchange",
"id": 35048,
"lm_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, playing-cards",
"url": null
} |
c#
private int GetTermIndex(string term)
{
return _wordsIndex[term];
}
private void MyInit()
{
_terms = GenerateTerms(_docs);
_numTerms = _terms.Count;
_docFreq = new int[_numTerms];
for (var i = 0; i < _terms.Count; i++)
{
_wordsIndex.Add(_terms[i], i);
}
GenerateDocumentFrequency();
GenerateInverseDocfrequency();
}
private float Log(float num)
{
return (float) Math.Log(num); //log2
}
private void GenerateDocumentFrequency()
{
_InverseDocFreq = new float[_numDocs][];
for (var i = 0; i < _numDocs; i++)
{
_InverseDocFreq[i] = new float[_numTerms];
var curDoc = _docs[i];
var freq = GetWordFrequency(curDoc);
foreach (var entry in freq)
{
var word = entry.Key;
var termIndex = GetTermIndex(word); | {
"domain": "codereview.stackexchange",
"id": 2771,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#",
"url": null
} |
java
return new MidPoint(getMidPoints(iterations, range, roughness));
}
And... The static generator method, returning the final value object. The biggest thing here was the error checking.
Oh, the results always have 0.0 at the start and end of the set of midpoints, which makes me think something is up, but I have no idea what. Unfortunately, I don't know what you're trying to implement, so I can't tell if something is wrong. And no, it's not something I introduced - yours gets that too (constant values for the random get the same results). | {
"domain": "codereview.stackexchange",
"id": 3011,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
evolution, nutrition, speculative
The chemautotrophs I'm aware of are usually archaeabacteria. They are optimized to grow slowly and have a large number of genes that can break down the unusual chemical compounds to grow in an inorganic often anoxic environment. These bacteria have genes evolved from the chemautotrophic earliest days of life on earth. They live deep within the earth, under ground, in volcanic vents. There are animals that live in some of these environments, but its simply too easy for these to use the bacteria that are already growing here readily rather then re-evolve the genes to do it by themselves. | {
"domain": "biology.stackexchange",
"id": 1590,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, nutrition, speculative",
"url": null
} |
meteorology, atmosphere, atmosphere-modelling, pressure, coordinate-system
But I'm not sure, because it seems a bit weird that in the first system we have zero w and in the pressure system we have negative vertical "speed".
Although we normally consider only horizontal components u, v of wind, due to pressure coordinates we have a non zero "vertical" component (because pressure decreases as the parcel moves to the right in the example). How are pressure coordinates than easier to handle when there is an additional component $\omega$ and we have three velocity components to consider instead of just two (of course I know that other equations become more simple as density vanishes...)?
Do I have a mistake in my considerations?
In pressure coordinates it is common to use $\omega$ as the vertical velocity component instead of $w$ as in cartesian coordinates. | {
"domain": "earthscience.stackexchange",
"id": 2631,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "meteorology, atmosphere, atmosphere-modelling, pressure, coordinate-system",
"url": null
} |
moveit, ros-kinetic, ur5
<inertia ixx="0.0312142241249" ixy="0.0" ixz="0.0" iyy="0.0312142241249" iyz="0.0" izz="0.004095"/>
</inertial>
</link>
<joint name="wrist_1_joint" type="revolute">
<parent link="forearm_link"/>
<child link="wrist_1_link"/>
<origin rpy="3.13404114506 3.139985598 3.14149191057" xyz="-0.392232740578 0.000835269385168 0.110607503694"/>
<axis xyz="0 0 1"/>
<limit effort="28.0" lower="-3.14159265359" upper="3.14159265359" velocity="3.2"/>
<dynamics damping="0.0" friction="0.0"/>
</joint>
<link name="wrist_1_link">
<visual>
<origin rpy="1.57079632679 0 0" xyz="0 0 -0.093"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur5/visual/wrist1.dae"/>
</geometry>
<material name="LightGrey">
<color rgba="0.7 0.7 0.7 1.0"/>
</material>
</visual>
<collision>
<origin rpy="1.57079632679 0 0" xyz="0 0 -0.093"/>
<geometry> | {
"domain": "robotics.stackexchange",
"id": 34125,
"lm_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, ros-kinetic, ur5",
"url": null
} |
java, parsing, android, json, sqlite
private long addService(int remote_id, int branch_id, String name){
ContentValues values = new ContentValues();
values.put(BranchSQL.COLUMN_REMOTE_ID, remote_id);
values.put(BranchSQL.COLUMN_BRANCH_ID, branch_id);
values.put(BranchSQL.COLUMN_NAME, name);
long insertId = getDatabase().insertWithOnConflict(BranchSQL.TABLE_SERVICES, null, values, SQLiteDatabase.CONFLICT_IGNORE);
return insertId ;
} | {
"domain": "codereview.stackexchange",
"id": 1440,
"lm_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, parsing, android, json, sqlite",
"url": null
} |
fft, discrete-signals, dft, frequency-domain
For instance, suppose you had N=16. Then the Nyquist bin is 8. A signal will 10 cycles per frame will land in bin 10, but its mirror image value lands in bin 6, so if you are looking at the DFT you would say, "Hey there is a 6 cycles per frame signal in there", when in fact it is 10. Increasing your sample count would fix that. For N=32, the 10 bin would still have a value, but now the mirror image is in 22. That's why you have to sample at least twice the rate of the highest frequency you want to find to have it land in the lower half.
BTW, every DFT is exact, aka lossless. | {
"domain": "dsp.stackexchange",
"id": 7703,
"lm_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, discrete-signals, dft, frequency-domain",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.