text stringlengths 1 1.11k | source dict |
|---|---|
electromagnetism, antennas
Thanks ... For your question 1, the Hertzian dipole is assumed to be much shorter than the wavelength, so that around the antenna itself, the situation is essentially electro / magnetostatic.
So the "EMF" is the expression you have given for $V(t)$. Although the situation as you rightly point out is not truly static, one can still interpret your $V(t)$ as an source voltage driving whatever your antenna is connected to. This is much the same as the interpretation of the EMF of a generator that I explain here. The reason the nett potential difference along the arms is nought happens analogously to that answer too. Charges build up to cancel the electric field inside the conductor. | {
"domain": "physics.stackexchange",
"id": 9907,
"lm_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, antennas",
"url": null
} |
history, mercury, ptolemy
Which coincides with the result of measuring the angle in a sketch constructed according to given geometric conditions in SolidWorks. | {
"domain": "astronomy.stackexchange",
"id": 7178,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "history, mercury, ptolemy",
"url": null
} |
function has the form y = abx, where a ≠ 0 and the base b is a positive real number other than 1. Then find the painting's value in 15 years. Worksheet 9 Memorandum: Finance, Growth and Decay. 4 Graph an exponential function of the form f(x) = ab^x. growth or exponential decay. A town had a population of 53700 in 1996 and a population of 58100 in 2000. These exponential functions describe both the rise and the fall of particular systems, especially systems that can be described through mathematical concepts, such as population or radioactive decay. Does this function represent exponential growth or exponential decay? B. In this case, each number, starting at 5 is multiplied by 2 to an exponent power such as 2. 4% compounded. Exponential Growth and Decay Word Problems Write an equation for each situation and answer the question. , 5% becomes 1. 1 Examples of exponential growth or decay. Step 3: Substitute for t. Probably the most well known example of exponential decay in the real world | {
"domain": "chiryo.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526433490359,
"lm_q1q2_score": 0.8501791228395476,
"lm_q2_score": 0.8577681031721324,
"openwebmath_perplexity": 745.7257336556233,
"openwebmath_score": 0.5862599611282349,
"tags": null,
"url": "http://chiryo.it/edcl/growth-or-decay-function.html"
} |
classical-mechanics, angular-momentum, torque, angular-velocity
If I have a single mass of some shape and apply a torque to it, I know that the angular acceleration depends on the moment of inertia of that object. But suppose I have a system of two objects, e.g., gears, and apply torque to one of them, and want to know the angular acceleration. I'd assuming that the effective moment of inertia, at the point where I apply the torque, is the moment of the directly driven mass, plus the moment of the secondary mass multiplied by the mechanical advantage between the gears, and that using this 'effective moment of inertia' with the input torque would tell me how fast the input mass accelerates. (The acceleration of the 2nd mass being implied, as there's only 1 dof here) Not sure if this general approach is even correct, and then there's the real problem . | {
"domain": "physics.stackexchange",
"id": 535,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, angular-momentum, torque, angular-velocity",
"url": null
} |
machine-learning, neural-network, dropout, batch-normalization
So, can somebody,please, answer some questions:
Is BatchNorm regularization technique? Why?
Should we use BatchNorm only during training process? Why?
Can we use Dropout and BatchNorm simultaneously? If we can, in what order?
Batch normalization can be interpreted as an implicit regularization technique because it can be decomposed into a population normalization term and a gamma decay term, being the latter a form of regularization. This was described in the article Towards Understanding Regularization in Batch Normalization, which was presented at the ICLR'19 conference.
Batch normalization happens at training time. However, at inference time we still apply the normalization, but with the mean and variance statistics learned during training, not with the current batch. The Wikipedia page for Batch normalization gives a nice description of this. | {
"domain": "datascience.stackexchange",
"id": 9631,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, neural-network, dropout, batch-normalization",
"url": null
} |
That said, the function $f(x)=x^{(1+\frac{1}{x})}$ is increasing* for $x>0$, so the terms of your sequence decrease in absolute value and the alternating series test hypotheses are true.
*The function $f(x)$ is differentiable for $x>0$, and for positive $x$, its derivative, $\displaystyle x^{1 + \frac{1}{x}} \left(\frac{1 + \frac{1}{x}}{x} - \frac{\log x}{x^2}\right)$, is greater than $x(\frac{1}{x}-\frac{1}{x})$, and therefore positive.
I haven't checked whether or not $\frac{1}{n^{1+\frac{1}{n}}}$ is a monotonically decreasing sequence, but I will point out that $\displaystyle\lim_{n\to \infty} \frac{1}{n^{1+\frac{1}{n}}} = 0$ does not imply that $\frac{1}{n^{1+\frac{1}{n}}}$ monotonically decreases. You must confirm that both properties hold. By the way, it would be enough to know that $\frac{1}{n^{1+\frac{1}{n}}}$ monotonically decreases after some point (i.e. for all $n > M$ for some fixed $M$). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9854964224384745,
"lm_q1q2_score": 0.8415279631084935,
"lm_q2_score": 0.8539127529517043,
"openwebmath_perplexity": 66.57553064672354,
"openwebmath_score": 0.961049497127533,
"tags": null,
"url": "https://math.stackexchange.com/questions/974357/does-sum-n-1-infty-frac-1nn1-frac1n-converge"
} |
# Mysteries - Who invented the harmonic mean and what is its purpose and why does it work?
• This post is deleted!
• [Originally posted in the Discussions]
Module 1 Week 4 Day 15 Challenge Explanation Part 4
Why doesn't the simple arithmetic mean work here? Who invented the harmonic mean and what is its purpose and why does it work?
And why can't I find the live chat on youtube anymore? I don't get the questions and stuff in the live chat and I would like to see it again.
• [Response credit @thomas]
This is a great question! I can't say much about the live chat problem, but I can explain why the harmonic mean is there and why it's helpful.
There are actually lots of different "means", and they each serve a different purpose. The "original" arithmetic mean, $$\frac{a + b}{ 2},$$ is useful for finding the number that's exactly between two other numbers. | {
"domain": "poshenloh.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765557865637,
"lm_q1q2_score": 0.8123405921246455,
"lm_q2_score": 0.8289388019824947,
"openwebmath_perplexity": 370.0781791588321,
"openwebmath_score": 0.7217327952384949,
"tags": null,
"url": "https://forum.poshenloh.com/topic/56/mysteries-who-invented-the-harmonic-mean-and-what-is-its-purpose-and-why-does-it-work/4"
} |
r, genome
Can anyone help me to figure out how can I modify the code to create these non-overlapping windows properly? The question is a bit confusing to me, at it's core I understand you want non-overlapping windows across chromosomes.
One way to achieve is to use GenomicRanges::tileGenome function, which needs the chromosome lengths as input, e.g.
library(Biostrings)
mygenome <- readDNAStringSet(list.files(mypath,"mygenome.fa$",full=TRUE))
chrSizes <- width(mygenome)
names(chrSizes) <- names(mygenome)
print(chrSizes)
# Chr1 Chr2 Chr3 Chr4 Chr5
# 18585056 19698289 23459830 26975502 30427671
This can than be fed into tileGenomes:
library(GenomicRanges)
bins <- tileGenome(chrSizes, tilewidth=5e5, cut.last.tile.in.chrom=T) | {
"domain": "bioinformatics.stackexchange",
"id": 311,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "r, genome",
"url": null
} |
gazebo
and then you use this param_update_rate in setting the updateRate value:
this->updateRate = common::Time(0, common::Time::SecToNano(param_update_rate));
Cheers, Andrei
Originally posted by AndreiHaidu with karma: 2108 on 2013-03-25
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 3152,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
image-processing, discrete-signals, interpolation
Theory
Now, since the page/routine I referenced doesn't cite any sources, it's worth explaining where those cubic routines come from (and how they work). Both the one I reproduced above, and the very similar Catmull-Rom spline he mentions just below it, are two specific cases of using the following cubic convolution kernel:
$$
\psi(x) =
\begin{cases}
(\alpha + 2)|x|^3 - (\alpha + 3)|x|^2 + 1, & \text{ if } 0 \le |x| \lt 1 \\
\alpha|x|^3 - 5\alpha|x|^2 + 8\alpha|x| - 4\alpha, & \text{ if } 1 \le |x| \lt 2 \\
0, & \text{ if } 2 \le |x|
\end{cases}
$$
The routine listed above corresponds to a value of $\alpha = -1$, and the Catmull-Rom spline corresponds to $\alpha = -1/2$. I won't go into too much detail about how the general form of the kernel is derived, but it involves various constraints like making sure that $\psi(x)$ is one at zero, and zero at all other integers.
This is what it looks like: | {
"domain": "dsp.stackexchange",
"id": 380,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, discrete-signals, interpolation",
"url": null
} |
black-hole, rotation, supermassive-black-hole, sagittarius-a
The spin of the massive black hole (BH) at the center of the Milky Way, SgrA*, has been poorly constrained so far.
Using normalised units where 0 is no spin and 1 is the maximum possible spin, Fragione and Loeb give an upper limit of 0.1 for the spin of Sagittarius A*.
That corresponds to a spin speed at the event horizon of $0.1c$, which sounds rather fast. However, it's common for SMBHs (supermassive black holes) to have spins greater than 0.5.
Here's a graph of SMBH spins, from zephyr's answer to Maximum spin rate of a black hole?
That graph comes from a paper by E. Samuel Reich, Spin rate of black holes pinned down, Nature 500, 135 (2013).
As zephyr's answer mentions, we expect stellar mass black holes, which are the remnants of core-collapse supernovae, to have substantial spin, due to conservation of angular momentum. Similarly, neutron stars formed via core collapse have high spin. However, as Tim Rias says in a comment on that answer, | {
"domain": "astronomy.stackexchange",
"id": 6603,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-hole, rotation, supermassive-black-hole, sagittarius-a",
"url": null
} |
of obtaining seven heads in a row when flipping a coin is _____. What is the probability of getting exactly two heads and two tails. Now imagine you have two dice. When a coin is tossed, there are two possible outcomes: heads (H) or ; tails (T) We say that the probability of the coin landing H is ½. Coin Toss Probability. If three distinct numbers are selected then the probability of winning is 3/500. But what if we know that event B, at least three dots showing, occurred? Then there are only four possible. What are the odds of getting two, four, or six heads after five, ten, or a hundred consecutive tosses of a fair coin? It seemed like a fun high school leveled math problem and with some quick python I was able to generate a pretty graph to answer this question. In fact, the probability was 1/2 N−1, since the first flip could be a sun or a moon, and the remaining N−1 flips each had a 50 percent chance of being different from the previous flip. Arrowhead Pride framed it as 512-to-1 to | {
"domain": "redgiant.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8114537180429797,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 361.56865089685897,
"openwebmath_score": 0.7884907126426697,
"tags": null,
"url": "http://usbn.redgiant.it/coin-flip-odds-in-a-row.html"
} |
quantum-field-theory, gravity, anti-de-sitter-spacetime, qft-in-curved-spacetime, scale-invariance
For $m^2=-\frac{(d-1)(d+1)}{4}$, there is a hidden Weyl symmetry present in the action which simplifies the form of the scalar correlators in the vacuum state.
What I was able to show is the following: If we consider a scalar with a different action
$$
S=-\frac{1}{2}\int d^{d+1}x\,\sqrt{-g}\left(\partial_\mu \phi \partial^\mu \phi+ \frac{d-1}{4d}R\phi^2\right).
$$
i.e. with coupling to the scalar curvature instead of a mass term, then this action is indeed invariant under Weyl transformations
$$
\begin{align}
g_{\mu\nu} &\to \Omega^2 g_{\mu\nu}, \\
\phi &\to \Omega^{\frac{1-d}{2}}\phi,
\end{align}
$$
with a spacetime dependent $\Omega=\Omega(x)$.
For AdS$_{d+1}$ the Ricci scalar is $R=-d(d+1)$, so with a non-dynamical AdS background one can rewrite the action as
$$
S=-\frac{1}{2}\int d^{d+1}x\,\sqrt{-g}\left(\partial_\mu \phi \partial^\mu \phi- \frac{(d-1)(d+1)}{4}\phi^2\right),
$$
so one finds the massive scalar with the $m^2=-\frac{(d-1)(d+1)}{4}$. | {
"domain": "physics.stackexchange",
"id": 21647,
"lm_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, gravity, anti-de-sitter-spacetime, qft-in-curved-spacetime, scale-invariance",
"url": null
} |
ros-indigo, pointcloud
You've instantiated the pc1 ... pc3 classes using their constructors which in turn has subscribed them to the cloud topics. But the line above then creates three new class instances using the default C++ class assignment behaviour described here.
So now you have 6 instances of the PointCloudSubscriber class three which are receiving cloud messages and a different three which are having their size printed out on the screen (which are always zero because they are not receiving any messages).
You could instantiate the classes directly in the array to avoid this problem like this:
PointCloudSubscriber pcs[3];
pcs[0] = PointCloudSubscriber(nh, "/kinect1/sd/points", queue_size);
pcs[1] = PointCloudSubscriber(nh, "/kinect2/sd/points", queue_size);
pcs[2] = PointCloudSubscriber(nh, "/kinect3/sd/points", queue_size);
Now you'll only have three class instances and it should start behaving the way you expect. | {
"domain": "robotics.stackexchange",
"id": 30814,
"lm_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-indigo, pointcloud",
"url": null
} |
### Back to the Question
The function in question, $\inline \fn_jvn g(x)=a(x-3)(x+4)^c$, has degree c + 1: The c comes from the power c on the term x + 4, and the +1 comes from the implied power of 1 on the term x – 3, for a total power of x equal to c + 1. Thus c + 1 is the degree of function g. And you’re told that this function’s end behavior is to approach negative infinity at both extremes of x. As shown above, a polynomial that goes in the same direction — either up or down — for both extremely positive and extremely negatives values of x has an even degree. That means c+1 is even, so c is odd.
What about a? As shown above, a polynomial with even degree, like this one, that goes down at both extremes of x starts with a negative number. So a is negative.
This question is similar to question number 17 in the sample questions for the Accuplacer Advanced Algebra and Functions test.
0 replies | {
"domain": "jillhacker.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9884918526308095,
"lm_q1q2_score": 0.8193992520892398,
"lm_q2_score": 0.8289388019824946,
"openwebmath_perplexity": 1098.2297223064236,
"openwebmath_score": 0.7021333575248718,
"tags": null,
"url": "https://jillhacker.com/how-do-end-behavior-degree-and-leading-coefficient-depend-on-polynomial-equations/"
} |
ros, python3
Originally posted by Korken89 on ROS Answers with karma: 15 on 2016-02-12
Post score: 0
I seriously doubt that many ROS 1 packages (outside the core) actually work unmodified with python3. The recommendation that "all packages should aim to make their Python code work with both Python 2.7 as well as Python 3.3", was just a suggestion. I suspect that very few of them have actually been tested with python3 as the default interpreter.
It's nice of you to do that testing, but don't expect quick results. I would hope that most package maintainers will respond to bug reports for whatever problems you find.
Note that ROS 2 development assumes python3 across the board. Maybe you should try running that.
Originally posted by joq with karma: 25443 on 2016-02-12
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 23746,
"lm_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, python3",
"url": null
} |
forces, everyday-life
Balancing forces on all 3 bags we get $T_2+2T_1\cos\theta=3W$. Balancing forces on the outer bags we get $2T_1(1-\cos^2\alpha)=W$ since $\theta=180^{\circ}-2\alpha$. Therefore $T_2(1-\cos^2\alpha)=(4-5\cos^2\alpha)W$.
If $2(1-\cos^2\alpha) \lt 1$ then $T_1 \gt W$ - the outer bags bear more than their own weight. This happens for $\alpha \lt 45^{\circ}$.
If $2(4-5\cos^2\alpha) \gt 1$ then $T_2 \gt T_1$ - the middle bag bears more weight than the outer bags. This happens when $\alpha \gt 33.2^{\circ}$.
A more thorough analysis could balance the torque on each bag. | {
"domain": "physics.stackexchange",
"id": 38715,
"lm_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, everyday-life",
"url": null
} |
ros, c++, gps
Unable to open com Port /dev/microstrain
Errno = 2
[FATAL] [1699614534.743634974]: Couldn't open serial port! Is it plugged in?
[gx5/microstrain_mips_node-2] process has died [pid 5901, exit code -11, cmd /home/user/microstrain_ws/devel/lib/microstrain_mips/microstrain_mips_node __name:=microstrain_mips_node __log:=/home/user/.ros/log/893a16fc-7fb9-11ee-a910-db79fbf4f264/gx5-microstrain_mips_node-2.log].
log file: /home/user/.ros/log/893a16fc-7fb9-11ee-a910-db79fbf4f264/gx5-microstrain_mips_node-2*.log
^C[imu_diagnostic_aggregator-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
Hope it helps! | {
"domain": "robotics.stackexchange",
"id": 38751,
"lm_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, c++, gps",
"url": null
} |
newtonian-mechanics, spring, eigenvalue, coupled-oscillators, normal-modes
The motion of a system of $\:n\:$ particles of the same mass $\:m\:$ connected by $\:n+1\:$ ideal springs of the same constant $\:k\:$, see Figure above, is the superposition of $\:n\:$ independent harmonic oscillations with frequences
\begin{equation}
\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\omega_\rho=\sqrt{\xi_{\rho}}\omega_o=2\omega_o \sin\left[\rho\dfrac{\pi}{2(n+1)} \right],\:\:\omega_{o}\equiv \sqrt{\dfrac{k}{m}} , \:\: \rho=1,2,\cdots,n-1,n
\tag{23}
\end{equation}
as shown in Figure below.
(1) Any $\:n \times n\:$ tridiagonal symmetric Toeplitz matrix has the same eigenvectors !!!
EDIT
For other more general cases a useful theorem from "Matrix Theory" by Joel N.Franklin, is given below unchanged : | {
"domain": "physics.stackexchange",
"id": 32071,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, spring, eigenvalue, coupled-oscillators, normal-modes",
"url": null
} |
php, object-oriented, image, library, authentication
case 'image/jpeg':
return imagecreatefromjpeg($image->getPathName());
break;
case 'image/gif' :
return imagecreatefromgif($image->getPathName());
break;
default:
#sorry, can't help ya
throw new MimeTypeNotSupportedException($mimeType);
break;
}
}
private function createImage($resource, $mimeType)
{
switch ($mimeType) {
case 'image/png':
return imagepng($resource);
break;
case 'image/jpeg':
return imagejpeg($resource);
break;
case 'image/gif' :
return imagegif($resource);
break;
default:
#sorry, can't help ya
throw new MimeTypeNotSupportedException();
break;
}
}
} | {
"domain": "codereview.stackexchange",
"id": 15075,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, object-oriented, image, library, authentication",
"url": null
} |
operators, hilbert-space, conformal-field-theory
Title: State-operator map, and scalar fields Up so far, i have been studied state-operator correspondence, $i.e$, i have been questioned https://physics.stackexchange.com/q/215060/ which was wrong question. By studing Ginsparg's applied conformal field theory now I become familiar with the concept of operator state map.
Which indicates that between the state in $R\times S^1$, cylinder and operator in $R^2$, plane, there is a one-to-one map. $i.e$, following conformal map we can make one to one map between them.
\begin{align}
\xi = t+ix, \quad z = \exp[\xi]=\exp[t+ix]
\end{align}
here $\xi$ is a cylinder's complex coordinate, and $z$ is a plane's complex coordinate.
Now i am curious about the field between them.
For example, for scalar field $\phi(t,x)$ in cylinder after conformal map how this changes in plane? | {
"domain": "physics.stackexchange",
"id": 26240,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "operators, hilbert-space, conformal-field-theory",
"url": null
} |
rocket-science
For #2 you are looking for Specific Impulse.
Specific impulse (usually abbreviated Isp) is a measure of the efficiency of rocket and jet engines. It represents the force with respect to the amount of propellant used per unit time. If the "amount" of propellant is given in terms of mass (such as in kilograms), then specific impulse has units of velocity. If it is given in terms of weight (such as in kiloponds or newtons), then specific impulse has units of time (seconds). The conversion constant between these two versions is thus essentially "gravity" (more specifically g0). The higher the specific impulse, the lower the propellant flow rate required for a given thrust, and in the case of a rocket the less propellant needed for a given delta-v per the Tsiolkovsky rocket equation.
Wikipedia: Specific Impulse | {
"domain": "physics.stackexchange",
"id": 19456,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rocket-science",
"url": null
} |
mechanical-engineering, structural-engineering, finite-element-method, buckling, nastran
Title: How would I do a buckling analysis with an additional fixed known lateral force? I am using Nastran for buckling analysis, and I'm new to all of this so please bear with me.
For a linear buckling analysis, I understand that you must first apply any compressive load in the static subcase. Then solve the eigenvalue buckling problem in the second subcase using the first static subcase. The buckling load is then the amount of compressive load applied multiplied by the resulting eigenvalue.
However, I now want to apply a second fixed force of exactly 50N laterally and see what the buckling load would be with this additional 50N force. Now if I apply both the compressive load and the lateral load to the static subcase, and then solve the eigenvalue buckling using that subcase, the resulting buckling load varies a lot depending on the compressive load applied in the static subcase.
Example 1: | {
"domain": "engineering.stackexchange",
"id": 3083,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mechanical-engineering, structural-engineering, finite-element-method, buckling, nastran",
"url": null
} |
quantum-mechanics, hilbert-space, operators, momentum
Title: Confusion on the mathematical aspect of the Translation operator I know that the Translation operator shifts particles/fields in a direction and can be written as $$\hat{T}(x) = e^{-\frac{i}{\hbar}\hat{p}x}.$$
What confuses me is that when we rewrite $\hat{p} = \frac{h}{i}\nabla$ we obtain:
$$\hat{T}(x) = e^{-\nabla x} = e^{-1} ~??$$
Which doesn't make sense. It would be a better idea to write the operator that shifts wavefunctions by an amount $\lambda$ to be $\hat T(\lambda) =e^{-\frac{i}{\hbar}\hat p \lambda}$.
The derivative in $\hat p$ is with respect to the spatial coordinate of a wavefunction. The $x$ you've written in your question is the amount by which the translation operator is shifting your wavefunctions, which is a different thing entirely. | {
"domain": "physics.stackexchange",
"id": 68630,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, operators, momentum",
"url": null
} |
Games, activities and quizzes to help you learn and practice trigonometry, We have games for SOHCAHTOA, Right Triangles, Trig Ratios, Unit Circle, Trig Identities, Trig Formulas, Law of Sines, Law of Cosines, Trigonometric Graphs, Inverse Trigonometry and Quizzes, examples with step by step solutions, worksheets. Trigonometry Wheel 1 Print the two sheets on A4 card or print on A4 paper and laminate. What is the radius of a tire in inches? Answer $$11. The translation project was made possible by ClickMaths: www. A Big Wheel is modelled as a circle with centre O and radius 15 metres. Find the number of rotations of the wheel. 1 INTRODUCTION TO PERIODIC FUNCTIONS The London Eye Ferris Wheel To celebratethe millennium,British Airwaysfundedconstructionofthe “LondonEye,”at that time the world’s largest Ferris wheel. In a right triangle, the secant of an angle is the length of the hypotenuse divided by the length of the adjacent side. There is an example Word Wheel like: Given: sand, sun, | {
"domain": "fitnessnutritionshop.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429147241161,
"lm_q1q2_score": 0.8007091875811518,
"lm_q2_score": 0.8128673133042217,
"openwebmath_perplexity": 1007.6478496308791,
"openwebmath_score": 0.7095851898193359,
"tags": null,
"url": "http://wtzo.fitnessnutritionshop.it/wheel-trigonometry.html"
} |
slam, navigation, visual-odometry, realsense, rtabmap-ros
Title: Realsense R200 with rtabmap rgbd odometry
Hello,
I'm working with the intel realsense R200 camera with the objective of getting visual odometry. For this, I'm using the realsense ROS SDK from Intel along the rtabmap_ros rgbd_odometry node.
I've verified that the color and depth camera data are coming out correctly through rviz but most of the time, when I start rgbd_odometry, I get one of these errors and do not get an odometry stream:
[ WARN] (2015-10-10 14:15:11.873) OdometryBOW.cpp:317::computeTransform() Local map too small!? (15 < 20)
[ WARN] (2015-10-11 00:05:41.095) OdometryBOW.cpp:304::computeTransform() Not enough correspondences (0 < 20)
[ WARN] (2015-10-11 00:05:41.233) OdometryBOW.cpp:308::computeTransform() Not enough inliers (9 < 20) | {
"domain": "robotics.stackexchange",
"id": 22765,
"lm_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, visual-odometry, realsense, rtabmap-ros",
"url": null
} |
aerodynamics
However, theoretically, does this downward momentum persist all the way to the ground? The net downward momentum flux of the air must balance the net weight (including the effects of buoyancy). This is a requirement based on drawing a control volume large enough that the pressure has returned to the static value. This downward momentum flux leads to the transfer of energy to the fluid. There is no requirement for the flux to be purely downward, though. The airfoil can impart other directions of momentum too, which leads to reduced efficiency of the airfoil. | {
"domain": "physics.stackexchange",
"id": 94004,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "aerodynamics",
"url": null
} |
statistical-mechanics, partition-function
http://en.wikipedia.org/wiki/Probability-generating_function | {
"domain": "physics.stackexchange",
"id": 9790,
"lm_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, partition-function",
"url": null
} |
complexity-theory, turing-machines, space-complexity
Title: Do regular languages belong to Space(1)? I was wondering, if we take some regular language, will it be in Space(1)?
For a regular language X, for instance, we can construct an equivalent NFA that matches strings in the regular language.
But I cannot see why is X in Space(1).
If it is true, why is X or any other regular language in Space(1)? A regular expression can be transformed into an NFA as you say. And an NFA can be transformed into a DFA. This latter transformation is exponential in the worst case (in terms of the size of the original NFA), but that is irrelevant. The amount of time this transformation takes is independent from the size of the input, and is thus $O(1)$.
Similarly, the size of this DFA is also independent from the size of the input, so storing it takes $O(1)$ space. No further space is needed other than the DFA, and thus a recognizer for a regular expression can run in $O(1)$ space. | {
"domain": "cs.stackexchange",
"id": 13756,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, turing-machines, space-complexity",
"url": null
} |
nuclear-physics, fusion, nuclear-engineering, explosions
In spite of much effort, NIF has failed to reach ignition. That means it can't be used to spark-plug a bomb, even though it's several football fields long.
The only person (of consequence) who has claimed such a device actually exists is Sam T. Cohen, who made the rather unlikely claim that "red mercury" is a magical explosive with the right qualities to make a pure-fusion device, and that Saddam had dozens or hundreds of them that he was going to use on the US when the invaded. | {
"domain": "physics.stackexchange",
"id": 62832,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, fusion, nuclear-engineering, explosions",
"url": null
} |
c++, thread-safety, library, networking
bool ReadChar(char &dest);
bool ReadChars(char &dest, unsigned short length);
bool WriteChar(char &source);
bool WriteChars(char &source, unsigned short length);
};
These are the two methods I need to be sure are correct:
bool NetMessage::ReadChars(char &dest, unsigned short length)
{
bool data_read = false;
//Spinlock
while (m_locked.test_and_set(memory_order_seq_cst))
;
//Critical section begins
unsigned short remaining_bytes = m_write_position - m_read_position;
if (remaining_bytes >= length)
{
memcpy((char *)dest, m_message, length);
m_read_position += length;
data_read = true;
}
//Critical section ends
m_locked.clear(memory_order_release);
return data_read;
} | {
"domain": "codereview.stackexchange",
"id": 6511,
"lm_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++, thread-safety, library, networking",
"url": null
} |
group-theory, mesons
I have a feeling it has to be related to the idea when considering mesons, we have to think of color and not quarks as the degrees of freedom? However, it still seems like that would need two boxes. So I am at a loss... You need a two box column for the anti fundamental-representation of SU(3) to accommodate the rules for filling in the boxes in the columns of the Young tableau and having the right number of anti-particles or anti-colors. There are three distinct states 1,2,3 in SU(3). A two box column has exactly 3 possible different configurations using these numbers. In a vertical column of boxes, the state numbers must increase from top to bottom by the rules of generating Young tableau. So the possible combinations for this in a two box vertical column are 1 over 2, 1 over 3 and 2 over 3, and these represent the three anti-quarks for SU(3) flavor and the three anti-colors for SU(3) color. | {
"domain": "physics.stackexchange",
"id": 27949,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "group-theory, mesons",
"url": null
} |
botany, terminology, plant-anatomy
Examples:
Proença & Sajo (2008)2 discuss root and rhizome anatomy in select bromeliads.
Figure 1 from Hernán et al. (2014) shows how the vascular and various tissue layers can differ quite a bit between roots and rhizomes on the same plant.
Notes:
Some structures characteristics of roots (e.g., casparian strips) can also occur in rhizomes. (E.g., see Lersten 19974.
Unlike potatoes (which are tubers), sweet potatoes (Ipomoea batatas) are actually a modified root called tuberous roots | {
"domain": "biology.stackexchange",
"id": 10221,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "botany, terminology, plant-anatomy",
"url": null
} |
javascript, node.js, ecmascript-6, quiz
var options = {
prompt: "new user? type yes or no"
}
var boundDirect = this.direct.bind(this);
read(options,boundDirect);
}
loadData(){
var that = this;
var haha = this;
var boundSendData = this.sendData.bind(this);
fs.readFile("lib/data.txt",function(error,saved_data){
if (error){
console.log("\n new game no old data");
}else{
try {
that.data = JSON.parse(saved_data);
// console.log("-----------data after json-----------")
// console.log(that.data)
boundSendData();
// console.log("---------------rechecking in read-----------")
// console.log(haha.data);
}catch(e){
console.log("\n no old data")
} | {
"domain": "codereview.stackexchange",
"id": 20791,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, node.js, ecmascript-6, quiz",
"url": null
} |
quantum-mechanics, energy, hilbert-space, hamiltonian, observables
The energy eigenfunctions are the solutions to the time-independent problem, so you can work on a steady-state system. This often makes the math a lot easier.
The energy eigenvalues may be easily accessible in the lab. So, after making some necessary assumptions and approximation to get through the math you can check that your results agree well with reality. And spectroscopy is an incredibly fine-grained tool, so you can check that your detailed results agree with reality as you relax one approximation after another and approach an analytic or numeric solution to the full physics of the situation.
I don't have any particular thoughts about the use of energy eigenfunction over any other set for unbound systems, however. | {
"domain": "physics.stackexchange",
"id": 32112,
"lm_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, energy, hilbert-space, hamiltonian, observables",
"url": null
} |
python, scikit-learn, pandas
Title: Create an API from EDA or ML outcome? I have the following sample dataset (the actual dataset is over 10 million records)
Passenger Trip
0 Mark London
1 Mike Girona
2 Michael Paris
3 Max Sydney
4 Martin Amsterdam
5 Martin Barcelona
6 Martin Barcelona
7 Mark London
8 Mark Paris
9 Martin New york
10 Max Sydney
11 Max Paris
12 Max Sydney
...
...
...
And I wanted to get the destination frequently travelled by a passenger !
I was playing around in Jupyter and got the expected data with the following approach
series_px = df_px_dest.groupby('Passenger')['Trip'].apply(lambda x: x.value_counts().head(1))
df_px = series_px.to_frame()
df_px.index = df_px.index.set_names(['UName', 'DEST'])
df_px.reset_index(inplace=True)
def getNextPossibleDestByUser(pxname,df=df_px):
return df.query('UName==@pxname')['DEST'].to_string(index=False) | {
"domain": "datascience.stackexchange",
"id": 4659,
"lm_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, pandas",
"url": null
} |
Documentation
Minimize Rastrigin's Function
Rastrigin's Function
This section presents an example that shows how to find the minimum of Rastrigin's function, a function that is often used to test the genetic algorithm.
For two independent variables, Rastrigin's function is defined as
`$Ras\left(x\right)=20+{x}_{1}^{2}+{x}_{2}^{2}-10\left(\mathrm{cos}2\pi {x}_{1}+\mathrm{cos}2\pi {x}_{2}\right).$`
Global Optimization Toolbox software contains the `rastriginsfcn.m` file, which computes the values of Rastrigin's function. The following figure shows a plot of Rastrigin's function. | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105231864132,
"lm_q1q2_score": 0.8218832400370832,
"lm_q2_score": 0.8418256492357359,
"openwebmath_perplexity": 776.699931467014,
"openwebmath_score": 0.459372341632843,
"tags": null,
"url": "https://jp.mathworks.com/help/gads/example-rastrigins-function.html"
} |
complexity-theory, computability, undecidability, np-hard
So, assuming $NP \ne coNP$, there exist problems that are decidable but neither in NP nor NP-hard. Note that we don't know that $NP = coNP$ implies $P = NP$. So this is a stronger assumption than the one you had suggested ($P \ne NP$). | {
"domain": "cs.stackexchange",
"id": 12748,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, computability, undecidability, np-hard",
"url": null
} |
laser
Title: Why does stimulated emission happen? In stimulated emission, why don't electrons just jump to a higher energy level instead of a lower one when they absorb a photon for the second time? Isn't that counter intuitive?
why don't electrons just jump to a higher energy level
They can't, because energy needed for jumping into a second energy level is different than that of incoming photon. There may be some exceptions such as multi-photon absorption involving an intermediate virtual energy level, however the probability of such processes is low compared to single-photon absorption. Thus, simply energy band of higher level does not fit the one which the incoming photon has: $\Delta E_{2\to3} \neq h\nu$.
when they absorb a photon for the second time | {
"domain": "physics.stackexchange",
"id": 65379,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "laser",
"url": null
} |
signal-analysis, frequency-spectrum, transfer-function
Now, I must to find their transfer functions, in particular the exact value of their zeros and poles.
It is clear that their are a low pass filter and a high pass filter.
I'm looking for a method for extract the numerical value of their transfer function.
Thank you and bye,
Giacomo locate the 3db point. (The point where the line before and after the curve would meet.) Take note of the magnitude and frequency f.
Find the angular frequency at this point. w = 2 * pi * f
If the graph is going up then it's a zero. H(s) = w + s
If it's going down then it's a pole. H(s) = 1 / ( w + s )
Once you've got that. check the slope. If it's 20dB/decade then you're set. If it is 40, you'll need to square it, 60 and you'll cube it etc.
Finally you'll need to find the gain constant to make it correct at low frequency (or DC)
So you're answers will look like this:
H(s) = Gain * ( w + s )
H(s) = Gain / ( w + s ) | {
"domain": "dsp.stackexchange",
"id": 2433,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "signal-analysis, frequency-spectrum, transfer-function",
"url": null
} |
rust, hangman
You should use insert rather then contains. insert returns false if the set already contains the item. Thus is allows insertion and checking if the set already had the element in one call.
continue
}
else if !word.contains(current_char){
The else is redundant with the continue. Both are useful sometimes, but I'd suggest not doing them both together.
Gameplay wise:
There appears to be no win condition
It doesn't show me the number of spaces before I start guessing. | {
"domain": "codereview.stackexchange",
"id": 44517,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rust, hangman",
"url": null
} |
beginner, algorithm, c, validation, finance
case 16:
if ( ( (credit_card / (long long int) pow(10, digits - 2)) >= 51) &&
(credit_card / (long long int) pow(10, digits - 2)) <= 55)
{
bank = "MASTERCARD";
break;
}
else if ( (credit_card / (long long int) pow(10, digits - 1) ) == 4)
{
bank = "VISA";
break;
}
// sets bank to invalid if it doesn't satisfy any of the standards.
default:
bank = "INVALID";
}
if (strcmp(bank, "INVALID") != 0)
{
// used for summing up the digits of the credit card number.
int odd_sum = 0, even_sum = 0, total = 0;
// looping through all the digits, decreasing credit_card on every iteration
for (int i = 1; i <= digits; i++, credit_card /= 10)
{
// gets the last digit of credit_card
int digit = credit_card % 10; | {
"domain": "codereview.stackexchange",
"id": 15230,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, algorithm, c, validation, finance",
"url": null
} |
algorithms, spectrogram, stft
Title: Spectrogram of a shock event I have measured data of a vibration with chirp input were I suspect unwanted shock events occurred.
I therefore thought about computing the spectrogram of my time histories to check the frequency content.
I am however not fully sure about what to look for. My idea would be to look for a straight line at a given step in time across all frequencies (because a shock event, like two bodies hitting each other, is normally short in time and excites all frequencies). Is that correct?
Are there other ways to detect shock occurrence? As far as spectrograms go, you're correct. Worth noting, as shocks are time-localized, higher time resolution windows (in Heisenberg sense, meaning narrower in time) are preferred, and so is lower hop_size - otherwise spikes may be show as lower in intensity or be missed entirely.
Comparison on signal with four "shocks" (-- messy code): | {
"domain": "dsp.stackexchange",
"id": 11355,
"lm_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, spectrogram, stft",
"url": null
} |
sensor-msgs, message-filters, image-transport, pointcloud
Title: Two Topics with Same Callback
Hi everyone,
I am subscribing to two different topics (each with different md5sums) using a single callback. I am using the message_filters class to achieve this. In my broadcaster, I am publishing a point cloud and an opencv image. I want to subscribe in a separate code. My callback signature looks like so:
void callback(const sensor_msgs::ImageConstPtr& ensensoImage, const sensor_msgs::PointCloud2ConstPtr& ensensoCloud)
{
cv::Mat ir;
PointCloudT cloud;
getImage(ensensoImage, ir);
getCloud(ensensoCloud, cloud);
ROS_INFO_STREAM("cloud: " << cloud);
std::lock_guard<std::mutex> lock(mutex);
this->ir = ir;
this->cloud = cloud;
updateImage = true;
updateCloud = true; | {
"domain": "robotics.stackexchange",
"id": 26722,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sensor-msgs, message-filters, image-transport, pointcloud",
"url": null
} |
navigation, navsat-transform-node, navsat-transform, jackal, robot-localization
I would like to calculate the coordinates in both of the following ways:
Directly from the GPS, i.e./auxgps (so if the EKFs go nuts I still know where /hardpoint is)
Via the EKFs (so if I lose GPS lock briefly I still have coordinates for /hardpoint)
I currently have several possible ways of doing this: | {
"domain": "robotics.stackexchange",
"id": 26476,
"lm_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, navsat-transform-node, navsat-transform, jackal, robot-localization",
"url": null
} |
electromagnetism, magnetic-fields, magnetic-monopoles
With (isotropic) linear magnetic materials, it does not particularly matter whether you use ${\bf B}$ or ${\bf H}$, because they can be easily interchanged via ${\bf B}=\mu{\bf H}$. However, while nonlinear materials are extremely uncommon in electrostatics, they are quite common in magnetic problems. Ferromagnets like iron will carry a net magnetization even in the absence of applied fields, and their actual responses to applied external fields are complicated and hysteretic (i.e. depend on the history of the material). It is in these situations where ${\bf H}$ really tends to be easier to work with. For example, when studying ferromagnetic systems without any free current involved, ${\bf H}$ can be written as the gradient of the magnetic potential, making the whole mathematical apparatus of scalar potential theory available for finding solutions. | {
"domain": "physics.stackexchange",
"id": 56928,
"lm_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, magnetic-fields, magnetic-monopoles",
"url": null
} |
quantum-mechanics, hilbert-space, operators, time-evolution, observables
Yes, this is accurate, except for the word "implicitly". However, there is no magic here and nothing is hidden. Maybe you should think carefully about what you mean by "treating $\mathcal U(t_0, t)$ as a function of $t$" and what the difference would be whether you "treat it as a function of $t$" or not. I think you will find that there is no difference. | {
"domain": "physics.stackexchange",
"id": 92084,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, operators, time-evolution, observables",
"url": null
} |
roboearth
Originally posted by narenayak on ROS Answers with karma: 3 on 2012-04-06
Post score: 0
I had the exact same issue. I did the following to get it to work.
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Hit TAB to get to Ok prompt. Ok to next screen as well.
When done, type java -version to see that it is installed
You should be able to cd to the following path
/usr/lib/jvm/default-java/jre/lib
If that path exists then do the following.
cd to /etc
sudo vi bash.bashrc
go to the end of the follow, add the following, save and exit
JAVA_HOME=/usr/lib/jvm/default-java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
once you exit, confirm new JAVA_HOME is set by typing
echo $JAVA_HOME
If the path shows up, you are done.
In a new terminal run
rosrun re_comm run
Originally posted by Scott with karma: 693 on 2012-04-09
This answer was ACCEPTED on the original site
Post score: 7 | {
"domain": "robotics.stackexchange",
"id": 8883,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "roboearth",
"url": null
} |
GMAT Question of the Day - Daily to your Mailbox; hard ones only
It is currently 23 Sep 2018, 07:27
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
### Show Tags
12 Jul 2018, 05:47
00:00
Difficulty:
15% (low)
Question Stats:
87% (00:42) correct 13% (01:02) wrong based on 23 sessions
### HideShow timer Statistics | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9678992988387852,
"lm_q1q2_score": 0.812777916580036,
"lm_q2_score": 0.8397339656668286,
"openwebmath_perplexity": 8261.386049876763,
"openwebmath_score": 0.19290658831596375,
"tags": null,
"url": "https://gmatclub.com/forum/a-certain-store-sells-two-types-of-pens-one-type-for-2-per-pen-and-270358.html"
} |
newtonian-gravity, home-experiment
bottle is about G*m1*m2/r^2 = (6.7e-11)*0.5kg*20kg/(0.1m)^2 N ~ 6.7e-8 N, i.e. a lateral force on each bottle equivalent to that generated by a weight of about 7 micrograms, about that of a 1 mm^3 grain of sand. This is visible to us because the long arms of the torsion balance convert this small force into a torque on the suspending filament, and the restoring torque is itself very small. | {
"domain": "physics.stackexchange",
"id": 25,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-gravity, home-experiment",
"url": null
} |
acceleration, models
The key to this is that you've got what we call a "piecewise equation" for velocity, so naturally the distance traveled is going to be a piecewise equation as well. Your velocity curve has 3 segments, so we can expect the distance to be 3 segments as well. There won't be 1 equation, but 3 equations governing the 3 different regions.
We'll start off with the example you show, where you hit maximum speed, and then we'll handle the corner case where you don't reach maximum speed on that segment.
During the first period, accelerating, we can use the formula $x=\frac{1}{2}at^2 + v_0t + x_0$ to show how far we went, where $a$ is our acceleration, $t$ is time, $v_0$ is our velocity at the start of the segment, and $x_0$ is the position at the start of the segment. Since we start off with no velocity and at our starting point, this simplifies to a much shorter equation, $x=\frac{1}{2}at^2$. | {
"domain": "physics.stackexchange",
"id": 35610,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acceleration, models",
"url": null
} |
Find the number of non-negative solutions to the equation $$x_1 + x_2 + x_3 + x_4 + x_5 = 21$$ with the restriction that $0\leq x_i\leq 10$ for each $x_i$.
Now, I know that the total number of solutions to an (unrestricted) equation of this form is $\binom{n+k-1}{k-1} = \binom{21+5-1}{5-1} = \binom{25}{4}$. But how do I count violations? I suppose the largest a given $x_i$ could be is 21. Would I then count the number of solutions where a given $x_i$ is 11, then 12, then 13... up to 21? How then would I proceed to when more than one $x$ is greater than 10? Enumerating each combination among up to 5 $x$s at 11 different values each seems to be a nightmarish prospect. Is there some simpler way of looking at the problem that I'm not seeing? Maybe a good general strategy for how to apply a set of restrictions to counting a number of combinations? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363708905831,
"lm_q1q2_score": 0.8172809286998113,
"lm_q2_score": 0.82893881677331,
"openwebmath_perplexity": 141.58435109648858,
"openwebmath_score": 0.8565254211425781,
"tags": null,
"url": "http://math.stackexchange.com/questions/229430/how-many-integer-solutions-to-a-linear-combination-with-restrictions/229440"
} |
to show that the distribution of $B_s$ conditioned on $\mathcal{F}^X_s$ depends only on $X_s$. Also, given $X_s$ then $B_s$ can only take one of the two possible values $-s\pm\sqrt{X_s}$. We have to show that the probability of these two possibilities does not depend on the history of $X$. There are two main ways that I can think of showing this. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9648551505674444,
"lm_q1q2_score": 0.812239817373751,
"lm_q2_score": 0.8418256532040708,
"openwebmath_perplexity": 136.47357061384906,
"openwebmath_score": 0.9491379261016846,
"tags": null,
"url": "http://math.stackexchange.com/questions/27994/is-b-tt2-a-markov-process"
} |
everyday-life, elasticity
However, how the game affects your rope's safety is an advanced materials engineering question. Crucial to your question is whether the rope leaves its elastic (linear) regime under the load and whether the fibres begin to deform. Unless the rope stays perfectly elastic, or very near thereto, its load bearing capacity will be compromised by the game.
I would advise buying a rope especially for your tug of war game. There are 60 grown ups to split the cost over, so anything else strikes me as a bit foolhardy. | {
"domain": "physics.stackexchange",
"id": 16433,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "everyday-life, elasticity",
"url": null
} |
c++, template, static
This is a situation where deduction guides would be useful.
Summary
You can’t get away with avoiding having function object wrappers actually wrap the function objects. Put that way, it should seem pretty obvious.
Your type-erasing wrapper either needs to dynamically allocate the memory to copy a function object, or use the small object optimization, or both. Trying to hide the wrapped object in a static variable is cheating. You may get away with it for a little while… but you will eventually be caught, either via memory leaks, reading/writing dangling references, or simply reading/writing to the wrong objects. | {
"domain": "codereview.stackexchange",
"id": 40504,
"lm_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++, template, static",
"url": null
} |
turing-machines, church-turing-thesis
So what about continuous processes that we normally model over $\mathbb{R}$? Well, there are two aspects of this: | {
"domain": "cs.stackexchange",
"id": 4211,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turing-machines, church-turing-thesis",
"url": null
} |
python, python-3.x, game, dice
Title: 2 player dice game with login system This is a two player dice game where two players each roll two dice. If a player's dice sum is even, they gain 10 points. If the dice total is odd, they lose 5 points.
import random
import time
import sys
print("*****************Welcome To The DICE Game*******************")
abc=input("please type in 'n' if your are a new user type 'e' if you are a existing user: ")
while abc not in ('e','n'):
abc=input("please type in 'n' if your are a new user type 'e' if you are a existing user: ") | {
"domain": "codereview.stackexchange",
"id": 33121,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, game, dice",
"url": null
} |
The Transpose of a Nonsingular Matrix is Nonsingular, Find the Distance Between Two Vectors if the Lengths and the Dot Product are Given, Eigenvalues of Orthogonal Matrices Have Length 1. Prove that if λ is an eigenvalue of A, then its complex conjugate ˉλ is also an eigenvalue of A. (adsbygoogle = window.adsbygoogle || []).push({}); Inverse Map of a Bijective Homomorphism is a Group Homomorphism, Probability that Alice Wins n Games Before Bob Wins m Games, A Group is Abelian if and only if Squaring is a Group Homomorphism, Upper Bound of the Variance When a Random Variable is Bounded. If A is the identity matrix, every vector has Ax = x. 7. Not sure if this is useful or where to go from here :/ If a matrix 785#785 is equal to its conjugate transpose, then it is a Hermitian matrix. 1.34 Now, onto the actual gritty proof: 1.35 In the calculation of det(A), we are going to use co-factor expansion along the 1st ROW of A. Proof. Now--eigenvalues are on the real axis when S transpose equals | {
"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"
} |
gazebo
Title: ROS Answers SE migration: 3D voxel world
hi
i'm looking for some method to import a 3d voxel world into gazebo. in the tutorials I found only a way to import 3d meshes http://gazebosim.org/wiki/Tutorials/1.3/beginner/mesh_import.
someone has already had these problems?
thx
augusto
Originally posted by trigal on Gazebo Answers with karma: 1 on 2012-12-19
Post score: 0
Original comments
Comment by AndreiHaidu on 2012-12-20:
which problems?
Comment by trigal on 2012-12-20:
i mean, someone has managed to import 3d voxel maps into gazebo? is something that can be done?
Comment by hsu on 2013-01-11:
What format is your 3D voxels? How many voxels are you attempting to simulate?
Comment by trigal on 2013-01-12:
hi, thx for answering. the voxel map is in binvox format http://www.cs.princeton.edu/~min/binvox/ and the full map i would like to use is about 100.000 voxels
Gazebo currently doesn't support 3d voxels. Feel free to create a ticket on bitbucket. | {
"domain": "robotics.stackexchange",
"id": 2878,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
c#
public override long Seek(long offset, SeekOrigin origin)
You don't check if the given offset is negativ. Assume the passed in origin == SeekOrigin.Begin and the offset == -1 now Position == -1 which will in the Read() method by seeking to Position result in an IOException because that makes an attempt to place the Position before the beginning of the stream. | {
"domain": "codereview.stackexchange",
"id": 19590,
"lm_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
} |
homework-and-exercises, particle-physics, standard-model, elementary-particles
But the problem is that for example for the first process, that of electron positron into muon and anti muon, I know that the process can happen for sufficient initial energy, but I know that because it can be experimentally proven. How can I know that the process happen, without the need of an experiment? To summarize, whether a reaction/decay is allowed or forbidden in the SM, the following laws/quantum numbers needs to be checked. | {
"domain": "physics.stackexchange",
"id": 80088,
"lm_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, particle-physics, standard-model, elementary-particles",
"url": null
} |
be used accordingly. 4) Every median is also an altitude and a bisector. A right triangle is a type of isosceles triangle. Properties of an Isosceles Triangle Definition : A triangle is isosceles if two of its sides are equal. " The answer from the key is A(h) = (piR^2) - (h times the square root of (2Rh - h^2)). 5 Properties of Trapezoids and Kites 399 Using Properties of Isosceles Trapezoids The stone above the arch in the diagram is an isosceles trapezoid. ” HOMEWORK: Lesson 4. Let M denote the midpoint of BC (i. like a cross has at least two congruent sides. All three sides are congruent. i have no idea what consecutive means, sorry. Hope you like them and do not forget to like , social share and comment at the end of the page. Just Example 1: Use the Distance Formula to find the distance between the points with coordinates (−3, 4) and (5, 2). Then there's the awkward cousin to equilateral and isosceles triangles: the scalene triangle. It therefore also has #color(blue)(" two equal | {
"domain": "edugeetha.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713861502773,
"lm_q1q2_score": 0.8354783668149235,
"lm_q2_score": 0.8479677564567912,
"openwebmath_perplexity": 394.92703066291256,
"openwebmath_score": 0.6327841281890869,
"tags": null,
"url": "http://edugeetha.com/jcx/properties-of-isosceles-triangle.php"
} |
quantum-field-theory, hamiltonian-formalism, fourier-transform, quantization, klein-gordon-equation
[My fourth and fifth questions...] Isn't it true that we just need to replace $\Phi$ with $q$ in the
second equation above? And where is $t$?
You have to extend the idea of "q" to a momentum-dependent quantity. And, as discussed above, there is a conventional way to do this.
The variable t does not appear in the equation you gave because, as this point, you are only Fourier transforming with respect to position. To anticipate/understand what is going on think about operators in the Schrodinger picture. They have no explicit time dependence. The time dependence will come in later as you move to the Heisenburg picture and sandwich your operators between $e^{-\hat H t}$ and $e^{i\hat H t}$. | {
"domain": "physics.stackexchange",
"id": 20113,
"lm_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, hamiltonian-formalism, fourier-transform, quantization, klein-gordon-equation",
"url": null
} |
earth-history, planetary-science, planetary-formation, solar-terrestrial-physics
Is it possible for such a migration to occur again?
Only if the right resonances appear, which is unlikely. | {
"domain": "earthscience.stackexchange",
"id": 477,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "earth-history, planetary-science, planetary-formation, solar-terrestrial-physics",
"url": null
} |
particle-physics, quarks, elementary-particles
Top Quarks not expected to form Baryons explanation here
The meson list (linked above) is more confusing to me. Assuming the same rule for top quarks applies, which seems to be the case explanation here, There should be 5 possible quarks and 5 possible anti quarks, making 25 possible Mesons, I would think, but the list has 64 possible mesons including separate tables for Pseudoscalar mesons and Vector mesons - so, . . . not sure what's going on there.
That's as far as I can answer it, anyway, if anyone wants to give a more detailed answer, or correct errors, feel free. | {
"domain": "physics.stackexchange",
"id": 35240,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, quarks, elementary-particles",
"url": null
} |
quantum-algorithms, shors-algorithm
So does measurement matter or not?
I learned a lot about quantum computing/quantum mechanics by figuring out why measuring the second register is optional. If it weren't optional, then we can send superluminal messages.
For example, suppose Alice runs Shor's algorithm. After applying a Hadarmard operation to $\vert x \rangle$, and then the repeating squaring operation $U_f$ to the second register, the state is in:
$$U_{f}\sum^{N-1}_{x = 0}\vert x\rangle\vert 0\rangle = \vert x\rangle\vert a^{x}\text{ mod }N\rangle$$
Alice will perform the QFT on the first register. But we have a couple of different things we can do to the second register. | {
"domain": "quantumcomputing.stackexchange",
"id": 631,
"lm_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-algorithms, shors-algorithm",
"url": null
} |
javascript, jquery, portability, userscript, linkedin
throttle("scroll", "optimizedScroll");
})();
// handle event
window.addEventListener("optimizedScroll", function() {
var results = document.querySelectorAll('li.card.guest:not([style*="display:none"]):not([style*="display: none"])';
for (var i = 0; i < results.length; ++i) {
results[i].style.display = "none";
}
});
Some bits of these were adapted from other sources (there are code comments to that effect). Feel free to review those as much or as little as you'd like. After I did a little playing around in a LinkedIn page's source code and I found out that LinkedIn already uses jQuery: that means you don't need to worry about checking if jQuery exists in the page because the page already has it.
Therefore, you can strip away all the jQuery injection nonsense, leaving your code looking like this;
var version = "2.1.4";
jQuery(document).on('scroll', function (event) {
jQuery('li.card.guest').hide();
}); | {
"domain": "codereview.stackexchange",
"id": 15339,
"lm_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, portability, userscript, linkedin",
"url": null
} |
Match the piecewise function with its graph write the answer next to the problem number graph the function 19 20. Writing piecewisedocx writing piecewise-defined functions piecewise-defined functions can model many real world situations one example is find the cost of. Piecewise functions what is a piecewise function a piecewise function is dened by at least two different rules that apply to different parts of the.
• Graphing and writing equations for piecewise functions unit 2: piecewise functions lesson 3 of 12 objective lesson 6: write piecewise functions to match graphs.
• Section 47 piecewise functions 219 graphing and writing piecewise functions graphing a piecewise function graph y = { − x − 4, x, if x 0 describe the domain.
• Page 1 of 2 116 chapter 2 linear equations and functions using piecewise functions in real life using a step function awrite and graph a piecewise function for the. | {
"domain": "blinkingti.me",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138118632621,
"lm_q1q2_score": 0.8956930268657869,
"lm_q2_score": 0.9161096181702031,
"openwebmath_perplexity": 1138.781222556325,
"openwebmath_score": 0.35177916288375854,
"tags": null,
"url": "http://gnpaperjenq.blinkingti.me/writing-piecewise-functions.html"
} |
Let f:R-->S be a non zero homomorphism such that R has identity and S has no zero divisors. Prove that $f(1_R)$ is the identity of S.
7. ## Re: Cancelation law and existence of identity
Ok, I got it.
If ab=a and the cancellation property is valid, Then abc=ac and therefore, bc=c. The analogous for right identity; and b is the identity. So simple and yet I missed it. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692366242304,
"lm_q1q2_score": 0.8180776501699394,
"lm_q2_score": 0.8376199633332891,
"openwebmath_perplexity": 1059.7447152877182,
"openwebmath_score": 0.9999918937683105,
"tags": null,
"url": "http://mathhelpforum.com/advanced-algebra/188114-cancelation-law-existence-identity.html"
} |
quantum-mechanics, atomic-physics, charge
The pictures below show a good indication of how the electron cloud moves over time. (That's actually the hole density w.r.t. the charge density of the neutral Kr atom, but it's all the same, really.) However, it's important to note that the pictures are obviously only theoretical reconstructions.
Anyways, there you have it: charge densities (defined as $e|\psi(\mathbf r)|^2$) do oscillate over time, for isolated atoms in pure superposition states. | {
"domain": "physics.stackexchange",
"id": 35343,
"lm_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, atomic-physics, charge",
"url": null
} |
algorithm, c, graph, pathfinding, dijkstra
if ((rs = parent_map_put(
p_parent_forward,
child_vertex_id,
current_vertex_id)) != RETURN_STATUS_OK) {
CLEAN_SEARCH_STATE;
TRY_REPORT_RETURN_STATUS(rs);
free(p_touch_vertex_id);
return NULL;
}
/* Checks whether we can find the meeting vertex: */
if (vertex_set_contains(p_closed_backward,
child_vertex_id)) {
temporary_path_length =
tentative_length +
distance_map_get(p_distance_backward,
child_vertex_id); | {
"domain": "codereview.stackexchange",
"id": 43105,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm, c, graph, pathfinding, dijkstra",
"url": null
} |
sql, bash, nosql
temp = join(tables: {a:a, b:b},
on: ["_field", "_time", "isTrial", "offer", "segment"]
)
res = join(tables: {temp:temp, c:c},
on: ["_field", "_time", "isTrial", "offer", "segment"]
)
|> map(fn: (r) => ({ r with _time: time(v: r._time) }))
|> range(start: 2022-03-12T00:00:00.000Z, stop: 2022-03-16T00:00:00.000Z) // delete first row
|> group()
|> sort(columns: ["_time", "_field", "isTrial", "offer", "segment"], desc: false)
|> yield()
``` Generating files from template files
Replacing dates in files correctly can be tricky. It requires carefully crafting the pattern so that:
It correctly matches the values to replace.
It does not match anything else unintended. | {
"domain": "codereview.stackexchange",
"id": 43670,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sql, bash, nosql",
"url": null
} |
c
So my question is, is it possible to reach line 1125 in inflate.c without having initialized state->offset?
I linked the library with the following main() function to identify the possible issue, so I guess that an input vector, if one exists, could be based on this main(), simply initializing array in[] to values that cause the issue. This main() is using the library correctly, I hope, otherwise the flagged issue may be meaningless.
#include "zlib.h"
#define CHUNK 100
z_stream strm;
unsigned char in[CHUNK];
unsigned char out[CHUNK];
int ret;
main(){
int i;
/* allocate inflate state */
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.avail_in = 0;
strm.next_in = Z_NULL;
ret = inflateInit(&strm);
if (ret != Z_OK)
return ret;
for (i=0; i<CHUNK; i++)
in[i] = any();
strm.next_in = in;
strm.avail_in = CHUNK;
strm.next_out = out;
strm.avail_out = CHUNK;
ret = inflate(&strm, Z_NO_FLUSH);
} | {
"domain": "codereview.stackexchange",
"id": 2808,
"lm_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
} |
optics, reflection, dielectric, metals
Above the plasma frequency, $n$ approaches $1$ and $\kappa$ is small (sufficiently thin metal films are therefore approximately transparent), leading to a small reflectance. A consequence of all this is that gold has high reflectance at low frequencies (reddish colors) and lower reflectance at high frequencies (bluish colors), resulting in its characteristic color.
Dielectrics can also have a similar tint in color if they have a resonance frequency in or close to the visible spectrum, but it may not be as easy to discern especially if they are not opaque. | {
"domain": "physics.stackexchange",
"id": 99609,
"lm_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, reflection, dielectric, metals",
"url": null
} |
gazebo-tutorial, gazebo-1.6
// Register this plugin with the simulator
GZ_REGISTER_MODEL_PLUGIN(PlattformControlPlugin)
}
I tested the plugin using std::cerr for the moment. And I didn't get my platform moving, because the plugin couldn't find my joints. I tried using the names with and without the namespace of my sdf-file. And in Gazebo I can see those names.
The plugin doesn't get further than to this point:
if (!_sdf->HasElement(_param))
{
// original plugin code
gzerr << "param [" << _param << "] not found\n";
// My call without using the macro
//common::Console::Instance()->ColorErr("Error", __FILE__, __LINE__, 31)
// << "param [" << _param << "] not found\n";
return false;
}
Tia,
Christoph | {
"domain": "robotics.stackexchange",
"id": 3225,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo-tutorial, gazebo-1.6",
"url": null
} |
special-relativity
Does this also mean that electromagnetic radiation (light) from a flattened star is focused in the direction of motion relative to the observer?
Yes. Just as a vertically falling rain comes at an angle when you're riding in a car, the angles at which any signal comes are different in a moving frame compared to a stationary frame. This is described by relativistic aberration. Additionally, Doppler shift changes the intensities of a radiating source along different directions, making the overall effect relativistic beaming. | {
"domain": "astronomy.stackexchange",
"id": 223,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity",
"url": null
} |
newtonian-gravity
$G$ is Newton's gravitational constant, and $\textrm{d}V(\vec{r'})$ is a volume element at the location $\vec{r'}$.
Alternatively, in terms of $\vec{p}$,
$\frac{\textrm{d}\vec{p}}{\textrm{d}t} = G\rho\int_{\textrm{space}}\frac{\rho'}{|\vec{r'}-\vec{r}|^3}(\vec{r'}-\vec{r}) \textrm{d}V(\vec{r}')$
Conservation of mass requires that the net flow of mass into a region of space result in an increase in the density there.
$\frac{\partial\rho(\vec{r},t)}{\partial t} = \nabla \cdot \vec{p}(\vec{r},t)$ | {
"domain": "physics.stackexchange",
"id": 105,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-gravity",
"url": null
} |
Minimize always looks for global minimum. One way to find all minimums is to use random application of FindMinimum which looks for local minimums. I will intentionally use more complicated function:
fun[x_] :=Cos[x] + 2 Sin[5 x]
The following code produces 100 random points to use as seeds for FindMinimum:
sol = {#, fun[#]} & /@ Union[Round[x /. (FindMinimum[{fun[x], .5 < x < 8 Pi},
{x, #}] & /@ RandomReal[{.5, 8 Pi}, 100])[[All, 2]], .00001]]
{{0.95887, -1.41884}, {2.21512, -2.59426}, {3.44969, -2.95199}, {4.69236, -2.01001}, {5.96272, -1.04992}, {7.24205, -1.41884}, {8.49831, -2.59426}, {9.73287, -2.95199}, {10.9755, -2.01001}, {12.2459, -1.04992}, {13.5252, -1.41884}, {14.7815, -2.59426}, {16.0161, -2.95199}, {17.2587, -2.01001}, {18.5291, -1.04992}, {19.8084, -1.41884}, {21.0647, -2.59426}, {22.2992, -2.95199}, {23.5419, -2.01001}, {24.8123, -1.04992}}
where above are the pairs of minimums and their function values. Separate those minimums that have the same function value: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9591542794197472,
"lm_q1q2_score": 0.8383749285173776,
"lm_q2_score": 0.87407724336544,
"openwebmath_perplexity": 4544.401667457569,
"openwebmath_score": 0.2221279740333557,
"tags": null,
"url": "http://mathematica.stackexchange.com/questions/10694/find-all-points-that-have-the-same-minimum/10695"
} |
homework-and-exercises, newtonian-mechanics, collision, approximations, dissipation
The model is simply too inaccurate for real systems.
The effects of other dissipative forces might be too great when $N$ gets big and oscillations become absurdly small.
Or, of course, some flaw(s) in my reasoning. | {
"domain": "physics.stackexchange",
"id": 64021,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, collision, approximations, dissipation",
"url": null
} |
c, unix
while ((line = my_getline(file)))
{
puts(trim_inplace(line));
free(line);
}
fclose(file);
}
/*******************************************************************************
* Prints the help message and exits. *
*******************************************************************************/
static void print_help()
{
printf(HELP_MESSAGE);
exit(EXIT_SUCCESS);
}
/*******************************************************************************
* Prints the version string. *
*******************************************************************************/
static void print_version()
{
printf(VERSION_MESSAGE);
exit(EXIT_SUCCESS);
} | {
"domain": "codereview.stackexchange",
"id": 12932,
"lm_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, unix",
"url": null
} |
waves, spacetime-dimensions, greens-functions
is this ansatz valid for any $ N = 2,3, \ldots $?
is there a general formula for the functions $ A_k(r), B_k(r) $ for any $N$? If we assume time-harmonic signals, then we may write (as @Prahar suggests)
$$\psi(r,t)=e^{-i\omega t}f(r).$$
Substituting this into the $N$D wave equation yields the $N$D Helmholtz equation:
$$f'' + \frac{N-1}{r}f' + k^2f = 0,$$
where $k=\omega/c$. According to WolframAlpha this is called the Emdem-Fowler equation, and may be solve in terms of Bessel functions as
$$f = Ar^{1-N/2}J_{\frac{N}{2}-1}(kr) + Br^{1-N/2}Y_{\frac{N}{2}-1}(kr),$$
where $A$ and $B$ are arbitrary constants, and $J_\alpha$ and $Y_\alpha$ are Bessel functions of the first and second kinds of order $\alpha$.
The ansatz you suggest comes from the choice of $N=3$, where we find
\begin{align}
\sqrt{\frac{\pi}{2kr}}J_{\frac{3}{2}-1}(kr) &= \sqrt{\frac{\pi}{2kr}}J_{1/2}(kr)=j_0(kr)=\frac{\sin(kr)}{kr} =\frac{e^{ikr}-ie^{-ikr}}{2ikr}, \\ | {
"domain": "physics.stackexchange",
"id": 88882,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves, spacetime-dimensions, greens-functions",
"url": null
} |
Let $G$ and $G'$ be groups, let $\phi$ be a homomorphism from $G$ to $G'\text{,}$ and let $H$ be a subgroup of $G\text{.}$ Prove that $\phi(H)$ is a subgroup of $G'\text{.}$
Solution
##### Exercise6
Let $G$ be an abelian group, and let $U=\{g\in G\,:\, g^{-1}=g\}.$ Prove that $U$ is a subgroup of $G\text{.}$
Solution
# Exercises5.3Exercises
##### Exercise1
True/False. For each of the following, write T if the statement is true; otherwise, write F. You do NOT need to provide explanations or show work for this problem. Throughout, let $G$ be a group with identity element $e\text{.}$
1. If $G$ is infinite and cyclic, then $G$ must have infinitely many generators.
2. There may be two distinct elements $a$ and $b$ of a group $G$ with $\langle a\rangle =\langle b\rangle\text{.}$
3. If $a,b\in G$ and $a\in \langle b\rangle$ then we must have $b\in \langle a\rangle\text{.}$
4. If $a\in G$ with $a^4=e\text{,}$ then $o(a)$ must equal $4\text{.}$ | {
"domain": "plu.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407183668539,
"lm_q1q2_score": 0.8329491886678366,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 220.83274770644115,
"openwebmath_score": 0.889972448348999,
"tags": null,
"url": "https://community.plu.edu/~sklarjk/fsaa/appendix-2.html"
} |
decision-trees
Title: Compile See5 / C50 GPL Edition See5 / C5.0 is Data Mining Tools available from rulequest
I want to compile C50 for Linux, preferably for CentOS 6.x, but I am unable to compile. I have also tried on Ubuntu, but not success there as well.
I have downloaded C50.tgz from C5.0 Release 2.07 GPL Edition
After extracting when I run ./Makefile it gives below error on Ubuntu18
./Makefile: line 9: CC: command not found
./Makefile: line 10: CFLAGS: command not found
./Makefile: line 11: S: command not found
./Makefile: line 11: LFLAGS: command not found
./Makefile: line 12: SHELL: command not found
./Makefile: line 19: src: command not found
./Makefile: line 48: obj: command not found
./Makefile: line 59: all:: command not found | {
"domain": "datascience.stackexchange",
"id": 4790,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "decision-trees",
"url": null
} |
ros-melodic
Originally posted by gvdhoorn with karma: 86574 on 2019-03-04
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 32520,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic",
"url": null
} |
c#, dependency-injection, asp.net-core
But this feels like the Service Locator Pattern, or am I wrong? The problem is here, that the class constructor doesn't know which dependencies the class needs.
The problem I am facing is that IServiceScopeFactory feels like the Service Locator Pattern. Therefore I created a IServiceScopeFactory<T>.
Since the whole Dependency Injection Pattern is relative new to me, I want to know if this is a suitable way of doing it, or some misconception. I'm of the opinion that this is awesome, and I have a couple of suggestions to add. It's not "Service Locator" because you're explicitly constraining to the exact type that can be resolved---the explicit dependency is right up there in the constructor.
(I wish they'd bake this into .Net Core.)
Don't store the service-object | {
"domain": "codereview.stackexchange",
"id": 41745,
"lm_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-core",
"url": null
} |
space-time, cosmic-microwave-background
No, that's not possible. If we could do that, it'd mean that the matter traveled from there to here faster than its light got here, and matter can't travel faster through space than light does.
All we can do is look at similar galaxies to the Milky Way at earlier times. And because of the expansion of space those galaxies are now even further away from us than they were when they emitted the light that we're seeing now. | {
"domain": "astronomy.stackexchange",
"id": 3548,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "space-time, cosmic-microwave-background",
"url": null
} |
python, python-3.x, console, sqlalchemy
Code
For those of you who want to run this locally, here is the github repository.
models.py
import os
import sys
from psycopg2 import OperationalError
from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
ENGINE = create_engine(f'sqlite:///{os.path.dirname(os.path.dirname(__file__))}/dinopass.db')
SESSION = sessionmaker(bind=ENGINE)
Base = declarative_base()
class PasswordMixin:
id = Column(Integer, primary_key=True)
@classmethod
def create(cls, **kwargs):
return cls(**kwargs)
@classmethod
def get(cls, session):
return session.query(cls).first()
@classmethod
def has_records(cls, session):
return cls.get(session)
@classmethod
def purge(cls, session):
return session.query(cls).delete()
class MasterPassword(Base, PasswordMixin):
__tablename__ = 'master_password' | {
"domain": "codereview.stackexchange",
"id": 38526,
"lm_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, console, sqlalchemy",
"url": null
} |
java, parsing, abstract-factory
switch (msgFormat) {
case FIXED_LENGTH_STRING:
return getFixedLengthStringMessageParserInstance();
default:
return null;
}
}
/**
* Returns the ParserSchema instance for parsing schemas of specific FormatSchema.
*
* @param schemaFormat format of the Serialized schema
* @return reference at the corresponding static ParserSchema instance. Null if not found
* @see FormatSchema All schema formats
*/
public static ParserSchema getParserSchema(FormatSchema schemaFormat) {
switch (schemaFormat) {
case XML:
return getXmlSchemaParser();
default:
return null;
}
}
private static XMLSchemaParser getXmlSchemaParser() {
return XML_SCHEMA_PARSER;
} | {
"domain": "codereview.stackexchange",
"id": 26772,
"lm_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, abstract-factory",
"url": null
} |
java, performance, object-oriented, multithreading, concurrency
public Person (final String name) {
this(name, null);
}
/**
* Every person is {@code SIT} greedy by default.
*
* @param name of this person
* @param room this person is currently in or {@code null}
*/
public Person (final String name, final Room room) {
this.name = name;
this.room = room;
position = Position.SIT;
}
/**
* Returns current {@code Interactable}, this person is interacting with.
*
* @return {@link Interactable}
*/
public Interactable getCurrentObject () {
return currentObject;
} | {
"domain": "codereview.stackexchange",
"id": 20033,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, object-oriented, multithreading, concurrency",
"url": null
} |
java, performance, object-oriented, event-handling
return user;
}
}
Here is the ENUM class I'm using.
public enum NotificationSettingsType {
SYSTEM_EVENTS(Arrays.asList(OnRegistrationCompleteEvent.class,
ResetPasswordEvent.class,
ManagerRegistrationEvent.class,
DrawResultNotFoundEvent.class,
CurrencyUpdatedEvent.class,
WalletLockedEvent.class,
UserWonBigPrizeEvent.class)),
CAMPAIGN_EVENTS(Arrays.asList(UserReceivedBonusInDepositCampaignEvent.class,
UserReceivedBonusInNonDepositCampaignEvent.class,
UserReceivedBonusMoneyEvent.class,
UserTakesPartInDepositCampaignEvent.class,
UserTakesPartInNonDepositCampaignEvent.class,
UserAddedToCampaignEvent.class)),
DRAW_RESULT_EVENTS(Arrays.asList(DrawResultNotificationEvent.class,
DrawResultEvent.class)),
TRANSACTION_EVENTS(Arrays.asList(UserThanksEvent.class,
UserOrderCanceledEvent.class)),
USER_WON_EVENTS(Collections.singletonList(UserWinCongratulationEvent.class)); | {
"domain": "codereview.stackexchange",
"id": 25531,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, object-oriented, event-handling",
"url": null
} |
ros
[rosmake-2] Finished <<< bond ROS_NOBUILD in package bond
[rosmake-2] Starting >>> message_filters [ make ]
[rosmake-0] Finished <<< roslang ROS_NOBUILD in package roslang
No Makefile in package roslang
[rosmake-0] Starting >>> roscpp [ make ]
[rosmake-3] Finished <<< smclib ROS_NOBUILD in package smclib
[rosmake-3] Starting >>> rospy [ make ]
[rosmake-2] Finished <<< message_filters No Makefile in package message_filters
[rosmake-1] Finished <<< pluginlib ROS_NOBUILD in package pluginlib
[rosmake-1] Starting >>> rosservice [ make ]
[rosmake-3] Finished <<< rospy No Makefile in package rospy
[rosmake-2] Starting >>> std_msgs [ make ]
[rosmake-1] Finished <<< rosservice No Makefile in package rosservice | {
"domain": "robotics.stackexchange",
"id": 20218,
"lm_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
} |
ros2
nodes_to_start = [
control_node,
ur_control_node,
dashboard_client_node,
tool_communication_node,
controller_stopper_node,
robot_state_publisher_node,
rviz_node,
joint_state_broadcaster_spawner,
io_and_status_controller_spawner,
speed_scaling_state_broadcaster_spawner,
force_torque_sensor_broadcaster_spawner,
forward_position_controller_spawner_stopped,
initial_joint_controller_spawner_stopped,
initial_joint_controller_spawner_started,
]
return nodes_to_start | {
"domain": "robotics.stackexchange",
"id": 38120,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2",
"url": null
} |
ros
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 284, in walk
if isdir(join(top, name)):
File "/usr/lib/python2.7/genericpath.py", line 41, in isdir
st = os.stat(s)
KeyboardInterrupt | {
"domain": "robotics.stackexchange",
"id": 11315,
"lm_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
} |
image-processing, optimization, software-implementation, blur, performance
Here are some test results for 75.000 iterations of a 640x360 image:
+------------------------------+--------+----------+
| Algorithm | Kernel | Time(ms) |
+------------------------------+--------+----------+
| cv::medianBlur | 3x3 | 18492 |
| cv::medianBlur ocl | 3x3 | 54596 |
| ippiFilterMedianCross_8u_C3R | 3x3 | 15755 |
| cv::blur | 3x3 | >100000 |
| cv::GaussianBlur | 3x3 | >100000 |
| cv::filter2d | 3x3 | >100000 |
+------------------------------+--------+----------+ The fastest blur would be Box Blur.
You can implement it using Running Sum.
I think Intel FilterBoxBorder works in that manner.
If you'd like you can do a few passes of it to approximate the Gaussian Blur.
You can also use IIR Filter Coefficients to blur the image quite easily.
You may have a look at my project Fast Gaussian Blur. | {
"domain": "dsp.stackexchange",
"id": 9240,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, optimization, software-implementation, blur, performance",
"url": null
} |
ros, opencv, tutorial, image, image-transport
Title: Transport Image tutorial issue: subscriber doesn't show image
Hello everyone,
I tried to do the tutorial " Running the Simple Image Publisher and Subscriber with Different Transports " image_transport/Tutorials
but I encountered an issue.
When I run the publisher everything seems to work:
rostopic echo /camera returns a matrix and
rostopic hz /camera proves that something is being published frequently
But then, when I want to use the subscriber which aims to display what is sent to /camera I only have a window(with my wallpaper on it) and then it crashes. I saw I was not the only one with this issue but couldn't find a solution.
So please if you have any idea how to help me it could be great. :)
Originally posted by Hysis on ROS Answers with karma: 16 on 2017-05-15
Post score: 0
I found out what the error was:
you have to add
cv::waitKey(30);
after the imshow in the my_subscriber.cpp, otherwise, windows will just pop infinitely with nothing inside. | {
"domain": "robotics.stackexchange",
"id": 27905,
"lm_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, opencv, tutorial, image, image-transport",
"url": null
} |
matrix products can be extended to several matrices The inverse of a transpose matrix is equal to the transpose of its inverse, » Web programming/HTML The transpose of a matrix is a new matrix that is obtained by exchanging the rows and columns. » DBMS Two matrices can only be added or subtracted if they have the same size. Transpose of a vector. Now note that (AB)x ⋅ y = A(Bx) ⋅ y = Bx ⋅ A⊤y = x ⋅ B⊤(A⊤y) = x ⋅ (B⊤A⊤)y. » SQL The same is true for the product of multiple matrices: (ABC) T = C T B T A T . » Java Submitted by Anuj Singh, on June 06, 2020. » Facebook 3 0 obj << » Networks To transpose a matrix, start by turning the first row of the matrix into the first column of its transpose. » Privacy policy, STUDENT'S SECTION For example, if A(3,2) is 1+2i and B = A. » Python » CSS » Machine learning » SEO When we take transpose, only the diagonal elements don’t change place. » C# Linear Algebra 11y: The Transpose of a Triple Product - Duration: 2:33. » C Article Summary X. And we | {
"domain": "desertdingo.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639694252315,
"lm_q1q2_score": 0.8475412764478711,
"lm_q2_score": 0.8723473730188542,
"openwebmath_perplexity": 7917.3825798895095,
"openwebmath_score": 0.21413716673851013,
"tags": null,
"url": "http://desertdingo.com/l7ocfce/viewtopic.php?1b9ddc=transpose-of-matrix-product"
} |
java, locking, synchronization
Redundancy
Tracking the same state twice
Look carefully at your instance variables owner and isLocked. Track their values during runtime with the debugger, and you will see: if owner == -1 then isLocked == false, but if owner != -1 then isLocked == true. In other words, you are using two variable to track the same piece of state.
You should remove isLocked and replace it it with the following method:
private synchronized boolean isLocked() {
return owner != NOBODY;
}
Doing the same string concatenations multiple times
You have used System.out.println throughout your code, always passing TAG, a message, and a thread id. You can extract this functionality into a new method:
private void log(String message, long threadId) {
System.out.println(String.format("MyLock: %s %s", message, threadId));
} | {
"domain": "codereview.stackexchange",
"id": 2600,
"lm_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, locking, synchronization",
"url": null
} |
ros
in addition to the ones from with authority gazebo. Those were resolved by adding an updated version of robot_state_publisher to my workspace manually. The problem was that ROS Noetic did not previously support tf_prefix, so the robot_state_publisher nodes were publishing data to the same frame names. Recently ROS Noetic has started supporting tf_prefix, but the update has not been synched yet, which is why I had to add the updated robot_state_publisher manually.
So now I'm wondering why I'm still getting these warnings.
When I run the launch file I get this, adding it since I'm hoping it could be useful:
roslaunch project multibot.launch
... logging to /home/roshan/.ros/log/64b78606-27b5-11ec-9406-6f7aa8a39c03/roslaunch-roshan-Komplett-PC-4435.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB. | {
"domain": "robotics.stackexchange",
"id": 36992,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
python, animation, tkinter
#Recall self.animate after self.speed milliseconds.
self.frame.after(self.speed, self.animate)
def refresh(self):
""" Destroy current frame. Re-initialize animation. """
self.frame.destroy()
self.__init__(self.master, self.directory)
self.animate()
def increase_fps(self):
""" Decrease time between screen redraws. """
self.speed = self.speed - 1 if self.speed > 1 else 1
def decrease_fps(self):
""" Increase time between screen redraws. """
self.speed += 1
def display_error(name, message):
"""
name: str, type of error to display as title.
message: str, error message to display. | {
"domain": "codereview.stackexchange",
"id": 21444,
"lm_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, animation, tkinter",
"url": null
} |
Constraint programming is an alternative to MIP that has a similar range of problems it can solve. Specifically for scheduling problems, a constraint programming solver might do better than MIP, but your mileage may vary.
I guess there are algorithms for employee scheduling out there. I would expect most of them to be heuristics, i.e. not guaranteeing optimal solutions and probably not a dual bound, which probably is what you mean by x% margin.
A problem might also be that employee scheduling can have all kinds of side constraints that make it difficult to implement one algorithm that many different people can use. This again is a strength of LP/MIP.
As Orguz Toragay pointed out, it is always possible to enumerate all solutions and keep the best. As soon as problems are larger than a hand full of variables this will quickly be impossible because of combinatorial explosion. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9621075744568836,
"lm_q1q2_score": 0.8215559221749038,
"lm_q2_score": 0.8539127473751341,
"openwebmath_perplexity": 550.9353210989992,
"openwebmath_score": 0.6418976783752441,
"tags": null,
"url": "https://or.stackexchange.com/questions/1345/algorithms-vs-lp-or-mip/1350"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.