text stringlengths 1 1.11k | source dict |
|---|---|
ros, navigation, gps, navsat-transform-node, robot-localization
Comment by Tom Moore on 2015-08-19:
I would use whatever has been committed to the Jackal repo.
Comment by modotz on 2017-01-23:
Hello Tom,
I downloaded the files above and get when I execute the launch file these errors:
[ WARN] [1485188817.469787094]: Could not obtain base_link->navsat_link transform. Will not remove offset of navsat device from robot's origin. | {
"domain": "robotics.stackexchange",
"id": 22417,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, gps, navsat-transform-node, robot-localization",
"url": null
} |
resampling, feedback
This is what I am thinking: I will have to adjust the ratio by which I resample over time to keep the size of the FIFO some target, on average. If my ratio goes too high, my buffer begins to grow and the latency gets large or it overflows, if I am using a circular buffer. If my ratio goes too high, my buffer begins to shrink and eventually underflows. I will periodically find the error between the number of elements in my buffer and the target size. The integral of this error over time, I, will be used to determine R by R=e^-I. The integrator will be set with its initial value I=-ln(R). If the buffer size drifts too high, I goes towards zero and R drops, shrinking the buffer. If it drifts too low, the opposite occurs. What do you think? Should I expect anything weird (oscillation through my feedback path, etc.)? I have done this before and it works as long as you tune your parameters correctly. There should be a gain factor on the integrator which is < 1.0. | {
"domain": "dsp.stackexchange",
"id": 2532,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "resampling, feedback",
"url": null
} |
electricity, planets
This is easily calculated (assuming a one kilogram magnet):
$$ E = \frac{\gamma m_M m_E}{r_E} \approx 63 MJ. $$
(Yes, this formula is correct for the potential at the surface of a sphere).
This is on the same range as the energy obtained by burning one kilogram of gasoline ($H_i \approx 40\,\text{MJ}$).
I repeat: I would go with drilling a kilometre or so and then build a geothermal power plant. | {
"domain": "physics.stackexchange",
"id": 22022,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, planets",
"url": null
} |
# Calculating real and imaginary part of a complex number
Consider the complex numbers $a = \frac{(1+i)^5}{(1-i)^3}$ and $b = e^{3-\pi i}$.
How do I calculate the real and imaginary part of these numbers? What is the general approach to calculate these parts?
I thought about reforming them to the form $x + i\cdot y$ which might be possible for a, but what about b?
I just started occupying with complex numbers and don't yet understand the whole context.
-
Try to understand and prove each step:
\begin{align*}\bullet&\;\;\frac{1+i}{1-i}=i\implies \frac{(1+i)^5}{(1-i)^3}=\left(\frac{1+i}{1-i}\right)^3(1+i)^2=i^3\cdot2i=(-i)(2i)=2\\{}\\\bullet&\;\;e^{b-\pi i}=e^be^{-\pi i}=e^b\left(\cos\pi-i\sin\pi\right)=-e^b\end{align*} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631675246405,
"lm_q1q2_score": 0.8041152982523057,
"lm_q2_score": 0.8152324871074608,
"openwebmath_perplexity": 333.97439955953826,
"openwebmath_score": 0.9106731414794922,
"tags": null,
"url": "http://math.stackexchange.com/questions/763094/calculating-real-and-imaginary-part-of-a-complex-number"
} |
c++, performance, beginner, matrix, library
The real algorithm is quite a bit more complicated than that, and involves an unfortunate number of nested loops, but it'll be faster (on a CPU).
You can also look at things like SIMD vectorization, prefetching, avoiding malloc, and instruction-level parallelism.
SIMD vectorization (or just vectorization) is when you perform a Single Instruction on Multiple Data - basically you perform the same instruction on a couple of (hopefully contiguous in memory) pieces of data. This can improve speed by (usually) a factor of 4 or 8, depending on the size of you computer's vector registers and if you're using floats or doubles. I recommend using Agner Fog's library instead of intrinsics - it's much cleaner, and more OS independent. | {
"domain": "codereview.stackexchange",
"id": 17599,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, beginner, matrix, library",
"url": null
} |
complexity-theory, satisfiability, constraint-satisfaction, constraint-programming, 2-sat
Title: Is 2-SAT over Linear Real Arithmetic in P or NP? The general boolean satisfiability problem (SAT) is NP-complete, and thus can't be solved in polynomial time (assuming $P \neq NP$). But the special case of 2-SAT is in P, and can be solved in linear time. 2-SAT formulas consist of the conjunction of clauses with two elements, e.g.,
$$ (a \lor b) \land (b \lor \lnot c) \land (a \lor c). $$
I am wondering about the case where the literals (e.g., $a$) are replaced with linear predicates (e.g., $Ax \leq b$, $x \in \mathbb{R}^n$). This transforms the SAT problem into an SMT (Satisfiability Modulo Theories) problem over the theory of Linear Real Arithmetic (LRA).
An example of a 2-SAT problem over LRA would be
$$ \text{Find } x \\ \text{such that } (P_1 \lor P_2) \land (P_3 \lor P_4) \land (P_5 \lor P_6), $$
where $P_i = (A_i x \leq b_i)$ are linear predicates. | {
"domain": "cs.stackexchange",
"id": 19360,
"lm_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, satisfiability, constraint-satisfaction, constraint-programming, 2-sat",
"url": null
} |
ros
Can autonomous navigator of ROS give two different completion times for two experiments in the same environment and having same starting and ending positions?
Comment by Ammar Albakri on 2022-09-16:
Theoretically, I think it is possible, the reason is that most path planning algorithms are non-deterministic, which means you are likely to get different routes planned even with the same start and finish points. But that doesn't mean that it's always going to be different. | {
"domain": "robotics.stackexchange",
"id": 16376,
"lm_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
} |
electrochemistry, experimental-chemistry, safety, toxicity
Title: Why is the calomel electrode widely preferred despite its toxicity? The following pagargraph is from the Wikipedia page of calomel:
Mercurous chloride is employed extensively in electrochemistry, taking
advantage of the ease of its oxidation and reduction reactions. [...] Over the past 50 years, it has been superseded by the
silver/silver chloride (Ag/AgCl) electrode. Although the mercury
electrodes have been widely abandoned due to the dangerous nature of
mercury, many chemists believe they are still more accurate and are
not dangerous as long as they are handled properly. | {
"domain": "chemistry.stackexchange",
"id": 6689,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrochemistry, experimental-chemistry, safety, toxicity",
"url": null
} |
electromagnetism, electricity, magnetic-fields, electromagnetic-induction
There will come a time when the magnet is about in the middle of the solenoid when the induced emf will be zero because the front pole is inducing an emf in one direction and the back pole is inducing an emf in the other direction.
As the magnet continues on its way through the solenoid the magnetic field around the rear pole will have more of an influence on the rate of change of flux and the direction of the emf will be reversed.
The emf will reach a maximum in the opposite direction and then eventually drop to zero.
So the emf will start at zero, increase, reach a maximum, decrease, become zero, increase in the opposite direction, reach a maximum in th opposite direction, decrease and then because zero.
This reversal of emf might be clearer if you use Lenz's law.
Suppose that a North pole is heading towards the solenoid.
The induced emf will produce an induced current which will oppose the change producing it ie the North pole coming towards it. | {
"domain": "physics.stackexchange",
"id": 29763,
"lm_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, electricity, magnetic-fields, electromagnetic-induction",
"url": null
} |
c#, programming-challenge, unit-testing
if (IsSingleDigitAndZeros(mileage)) return true;
if (IsAwesomePhrase(mileage, awesomePhrases)) return true;
var mileageString = mileage.ToString();
if (IsPalendrome(mileageString)) return true;
if (IsSequence(mileageString, 1)) return true;
if (IsSequence(mileageString, -1)) return true;
return false;
}
private static bool IsSingleDigitAndZeros(int mileage)
{
while(mileage >= 10)
{
if (mileage % 10 != 0) return false;
mileage /= 10;
}
return true;
}
private static bool IsAwesomePhrase(int mileage, List<int> awesomePhrases)
{
return awesomePhrases.Contains(mileage);
}
private static bool IsPalendrome(string mileageString)
{
int start = 0, end = mileageString.Length-1; | {
"domain": "codereview.stackexchange",
"id": 22252,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, programming-challenge, unit-testing",
"url": null
} |
And we have: . $\frac{15}{4(x+3)}$
$Q3)\;\;\frac{x}{4} + \frac{x}{5} + \frac{x}{6}$
To add or subtract fractions, they must have a common denominator.
The LCD for this problem is $60.$
We must convert all the fractions to have $60$ in their denominators.
We have: . $\frac{15}{15}\!\cdot\!\frac{x}{4} + \frac{12}{12}\!\cdot\!\frac{x}{5} + \frac{10}{10}\!\cdot\!\frac{x}{6} \:=\:\frac{15x}{60} + \frac{12x}{60} + \frac{10x}{60}$
Now they can be added: combine the numerators and "keep" the denominator.
. . $\frac{15x + 12x + 10x}{60} \;=\;\frac{37x}{60}$
$Q4)\;\;\frac{5x-2}{10} - \frac{2x-5}{15}$
The LCD is $30$.
We have: . $\frac{3}{3}\!\cdot\!\frac{5x-2}{10} - \frac{2}{2}\!\cdot\!\frac{2x-5}{15} \;= \;\frac{15x - 6}{30} - \frac{4x - 10}{30}$
Combine: . $\frac{(15x - 6) - (4x - 10)}{30} \;= \;\frac{15x - 6 - 4x + 10}{30} \;= \;\frac{11x + 4}{30}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147153749275,
"lm_q1q2_score": 0.8017189115720105,
"lm_q2_score": 0.8244619285331332,
"openwebmath_perplexity": 2369.676164814964,
"openwebmath_score": 0.7794655561447144,
"tags": null,
"url": "http://mathhelpforum.com/algebra/7578-simplifying-expressions.html"
} |
c#, error-handling
default:
// Choose either to throw some sort of general exception and include
// the error code in it OR throw an UnrecognizedErrorException
}
}
public void Operation1(someParameter)
{
DoThirdPartyOperation(() => { ThirdParty.Operation1(someParameter); });
}
public void Operation2(someParameter)
{
DoThirdPartyOperation(() => { ThirdParty.Operation2(someParameter); },
"Failed performing Operation2");
} | {
"domain": "codereview.stackexchange",
"id": 2919,
"lm_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#, error-handling",
"url": null
} |
computability, proof-techniques, undecidability
Problems that are undecidable because of diagonalization (indirect self-reference). These problems, like the halting problem, are undecidable because you could use a purported decider for the language to construct a TM whose behavior leads to a contradiction. You could also lump many undecidable problems about Kolmogorov complexity into this camp.
Problems that are undecidable due to direct self-reference. For example, the universal language can be shown to be undecidable for the following reason: if it were decidable, then it would be possible to use Kleene's recursion theorem to build a TM that gets its own encoding, ask whether it will accept its own input, then does the opposite.
Problems that are undecidable due to reductions from existing undecidable problems. Good examples here include the Post Correspondence Problem (reduction from the halting problem) and the Entscheidungsproblem. | {
"domain": "cs.stackexchange",
"id": 18800,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computability, proof-techniques, undecidability",
"url": null
} |
ros, navigation, openni, compilation
removing all versions of openni and pcl from your system, and remove + purge any PPAs (jspricke's?) that may be conflicting
put the whole navigation stack in a fresh empty workspace, make sure you have the base ROS installation sourced, and try running rosdep install --from-path src --rosdistro hydro -i -y to grab all the dependencies
run catkin_make on the whole workspace, not just costmap_2d
Originally posted by paulbovbel with karma: 4518 on 2014-10-06
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 19639,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, openni, compilation",
"url": null
} |
java, strings
My code:
import java.util.*;
class decompress
{
public static void main(String[] ar)
{
int end = 0, st = 0;
Scanner sc = new Scanner(System.in);
System.out.print(">> ");
String s = sc.next();
while(s.indexOf('(') != -1)
{
for(int i = 0; i < s.length(); i++)
{
char c = s.charAt(i);
if(c == '(')
st = i;
else if(c == ')')
{
end = i;
String t = s.substring(st+1,end);
int n = t.charAt(t.length()-1) - '0';
t = t.substring(0,t.length() - 1);
String q = "";
for(int j = 0; j < n; j++)
q += t;
String m = "";
if(st != 0)
m = s.substring(0,st);
s = m + q + s.substring(i+1);
break;
}
}
}
System.out.println(s);
}
} | {
"domain": "codereview.stackexchange",
"id": 5403,
"lm_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, strings",
"url": null
} |
java, swing, snake-game
I have added some buttons to stop/pause the game (can be done by pressing Space as well) and choose speed. Score is related to speed value (score for food is the same as the number of speed).
What's the most interesting I guess is the fact, that almost all snake tutorials around the internet allow you (if you are fast enough) to bug the game with those simple steps: Assume, that the snake moves to the Right, timer is set to some amount of time, and if you manage to press Up or Down arrow and then very fast Left (when the timer hasn't gone off), the snake will move backwards and finally eat himself. Most of the games doesn't allow you to change from Right to Left (or Up to Down etc.) in one step, but this is allowed. I prevent players from doing that by implementing temporary direction, that reads the current direction at the begining of a time period (or refresh rate - it is the same here). | {
"domain": "codereview.stackexchange",
"id": 24841,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, swing, snake-game",
"url": null
} |
quantum-mechanics, solid-state-physics, schroedinger-equation, semiconductor-physics, crystals
I have these doubts:
The Bloch theorem states that in a periodic structure (such as a crystal) the wavefunction is expressed as the product of a complex exponential term and a periodic term:
$$
\psi(\mathbf r) = e^{i\mathbf k\cdot \mathbf r} u(\mathbf r)
$$
Well, I do not see the link between this expression and the previous solution. Is Ak(r) the exponential function (and if yes, why not to express it directly like in the Bloch theorem)? Moreover, why are there three factorized periodic functions? | {
"domain": "physics.stackexchange",
"id": 68751,
"lm_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, solid-state-physics, schroedinger-equation, semiconductor-physics, crystals",
"url": null
} |
operators, momentum, observables
\tag{18}\label{eq18}
\end{equation}
that is
\begin{equation}
g\left(x\right)\boldsymbol{=}xf\left(x\right)
\tag{19}\label{eq19}
\end{equation}
Equations \eqref{eq18}-\eqref{eq19} correspond to \eqref{eq11} of the finite case where the summation $\;\sum_\nu\;$ with respect to the index $\;\nu\;$ is replaced by the integral $\;\int\mathrm dx_{\boldsymbol{c}}\;$ with respect to the real index $\;x_{\boldsymbol{c}}$.
The final step will be to find the matrix representation of the linear momentum operator $\;p$, let it be $\;\mathrm{p}\left( x_{\boldsymbol{r}}, x_{\boldsymbol{c}}\right)$. So, let a general state $\;f$, that is a function $\;f\left(x\right)$. Application of the basic quantum-mechanical equation \eqref{eq04} on $\;f\;$ yields
\begin{align}
&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\left(qp-pq\right)f =i\hbar\, I f \quad \Longrightarrow
\nonumber\\ | {
"domain": "physics.stackexchange",
"id": 51057,
"lm_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, momentum, observables",
"url": null
} |
time, differentiation, calculus, time-evolution
Title: Change with time I was going through a silly doubt, but aren't able to find its answer.
If we say something is changing with time, what do we mean by that?
Should we multiply the quantity with time or divide it? Like if I say that the velocity is changing with time, what should I calculate? acceleration or distance? | {
"domain": "physics.stackexchange",
"id": 82002,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "time, differentiation, calculus, time-evolution",
"url": null
} |
electromagnetism, magnetic-fields, electric-circuits, electric-fields, electromagnetic-induction
are amplitudes of the voltage and current) is the same in the two windings. This product gives the power, and so rather than the power increasing towards infinity in the situation you consider, and thereby breaking the conservation of energy, it in fact remains constant. | {
"domain": "physics.stackexchange",
"id": 66459,
"lm_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, electric-circuits, electric-fields, electromagnetic-induction",
"url": null
} |
noise, image-segmentation
Title: Segmentation of high noise, high density and low resolution image I've come across a particularly difficult segmentation task.
It's optical coherence tomography data, that has a lot of noise and, compared to the particle size (radius= ~3-6px), low resolution.
This, combined with a many overlapping particles, has made it impossible for me to segment out the particles with decent accuracy.
I've played around with thresholding, watershedding, morphological operators and h-dome transformation but couldn't come up with results that I've found satisfying.
The region of interest is already cropped out (inside of blue boundary):
This is what 10 frames of the recording look like: | {
"domain": "dsp.stackexchange",
"id": 6143,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "noise, image-segmentation",
"url": null
} |
special-relativity, reference-frames, speed-of-light, inertial-frames
Title: Does the first postulate of special relativity imply constant speed of light? The two postulates of special relativity are
The laws of physics take the same form in all inertial frames of reference.
The speed of light in free space has the same value $c$ in all inertial frames of reference
(Source)
I recently thought about that they are somewhat similar in that both state that something is the same in inertial frames of reference.
So could the constancy of the speed of light be seen as a special case of the principle of relativity (first postulate) if one considers the speed of light to be some sort of "law of physics"? Does the first postulate imply the second? The first does not imply the second, but you are nevertheless on the track of something which I will try to spell out.
The second postulate can be made in a more minimal way. Instead of mentioning all inertial frames, one need only mention one: | {
"domain": "physics.stackexchange",
"id": 99513,
"lm_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, reference-frames, speed-of-light, inertial-frames",
"url": null
} |
Senior SC Moderator
Joined: 22 May 2016
Posts: 2035
Last week Jack worked 70 hours and earned $1,260. If he earned his re [#permalink] ### Show Tags 04 Apr 2018, 17:34 UncleFrodo wrote: Well, according to the task answer should be A ($7) and not B ($14). The question in the task is "what was his regular hourly wage" ? Regular hourly wage Jack got for regular working time per week - 40 hours. Next 20 hours and 10 hours are extra time and this time paid with coefficient. If we have a question like "what was his hourly wage for this week" - than the answer B will be correct. UncleFrodo , could you elaborate? I do not understand what you are saying. I do not see ambiguity in the question's language, if that is the issue. Mathematically, I do not see how the regular hourly wage could be$7, if that is the issue.
_________________ | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8128673246376008,
"lm_q2_score": 0.8128673246376008,
"openwebmath_perplexity": 6839.761278086252,
"openwebmath_score": 0.6075844764709473,
"tags": null,
"url": "https://gmatclub.com/forum/last-week-jack-worked-70-hours-and-earned-1-260-if-he-earned-his-re-226208.html"
} |
P.P.S. To remember $(2)$ consider product of two complex numbers $$z=(D1,N1)(D2,N2)$$ so $(2)$ becomes:
$$\frac {\Im z}{\Re z}$$ to get $(3)$ just swap signs
• I think the identity $\tan a \approx a$ is only valid if you write $a$ in radians. – Ali Jul 18 '13 at 10:44
• Yes, should mention this explicit in the text. – igumnov Jul 18 '13 at 10:47
• Great, I've seen that paper before been at that time I was learning how to approximate exponentials so I disregarded the tangent, and subsequently couldn't remember the name of the paper. Anyway, this does look like a very good method, but it will definitely take some time to get a knack for it and memorize the "magic hash table" =) – brianmearns Jul 18 '13 at 10:52
• Do not remember anything and do not calculate first round of approximation just use the picture from papper i added. – igumnov Jul 18 '13 at 11:18 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517450056274,
"lm_q1q2_score": 0.8171461313874903,
"lm_q2_score": 0.8354835371034368,
"openwebmath_perplexity": 305.80084494374955,
"openwebmath_score": 0.9099732637405396,
"tags": null,
"url": "https://math.stackexchange.com/questions/446076/mental-estimate-for-tangent-of-an-angle-from-0-to-90-degrees"
} |
java, android
((ParallaxActivity) getContext()).stopWatch.start();
checkpointtextview.setText("");
checkpointtextview2.setText("");
checkpointtextview3.setText("");
checkpointtextview4.setText("");
checkpointtextview5.setText("");
checkpointtextview6.setText("");
String str = "Player 1 " + String.format("%06d", score);
tvId.setText(str);
scoring = false;
moonRover.setBuggyXdistance(0);
moonRover.setDistanceDelta(0);
moonRover.setRetardation(0);
checkpointComplete = false;
runOnce = true;
}, 3000);
}
});
} else { | {
"domain": "codereview.stackexchange",
"id": 31261,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, android",
"url": null
} |
evolution, bioinformatics, population-genetics, book-recommendation, molecular-evolution
DESeq2 is a very popular package. You'll learn how exactly a bioinformatician works.
The workflow starts from alignments, and show you how to connect command-line tools with the R-package
It shows you how to generate MA plot, PCA plot etc. You'll appreciate how easy to do such things in R.
Testing for differential gene expression is very important
You'll learn how R does the programming. For example, in R it's a good idea to create a data set object, and do something like this:
obj <- .... # This is my R-object
obj <- fun1(obj) <- # Function 1 adds information to the object
obj <- fun2(obj) <- # Function 2 adds more information to the object | {
"domain": "biology.stackexchange",
"id": 5872,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, bioinformatics, population-genetics, book-recommendation, molecular-evolution",
"url": null
} |
algorithms, quantum-computing
A Hadamard transformation is applied to each bit to obtain the state | {
"domain": "cs.stackexchange",
"id": 3929,
"lm_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, quantum-computing",
"url": null
} |
c++, algorithm, number-systems
int main()
{
cout << baseconvert("FZ", 16,8) << "\n\n\n";
cout << baseconvert("FE", 16,2) << "\n\n\n";
} Instead of trying to create your own versions, you could try doing it without.
Not wanting to use ASCII conversions makes sense since that would be inefficient. using a string to get the char value from a specific integer value, works well. However, to go the other way a map would work better, and ignores how the native mapping works.
map<char,int> values =
{
{'0',0},
{'1',1},
{'2',2},
{'3',3},
{'4',4},
{'5',5},
{'6',6},
{'7',7},
{'8',8},
{'9',9},
{'A',10},
{'B',11},
{'C',12},
{'D',13},
{'E',14},
{'F',15},
{'G',16},
{'H',17},
{'I',18},
{'J',19},
{'K',20},
{'L',21},
{'M',22},
{'N',23},
{'O',24},
{'P',25},
{'Q',26},
{'R',27},
{'S',28},
{'T',29},
{'U',30},
{'V',31},
{'W',32},
{'X',33},
{'Y',34},
{'Z',35}
}; | {
"domain": "codereview.stackexchange",
"id": 25832,
"lm_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++, algorithm, number-systems",
"url": null
} |
matlab, fft, fourier-transform, fourier
Can someone explain me what is this for:
f= (0:nfft/2-1)*Fs/nfft;
Here is the link Specifically,
nfft = 1024
Fs = 150
so f = (0:511)x(150/1024)
ie f will go from 0x(150/1024) = 0 to 511x(150/1024) = 75
So, you are plotting the magnitude of the frequency spectrum from 0 to 75 Hz.
The spectrum is periodic & will repeat for 75 to 150 Hz hence you are plotting from 0 to Fs/2 | {
"domain": "dsp.stackexchange",
"id": 2001,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, fft, fourier-transform, fourier",
"url": null
} |
beginner, c, factors
putchar('\n');
}
static void poc(long num)
{
if (num >= -1 && num <= 1)
{
printf("%ld is nor prime nor composite.\n", num);
return;
}
long orig_num = num;
int no_of_factors = 0;
num = labs(num);
for (long factor = 2;;)
{
if (num%factor==0 && num!=factor)
{
++no_of_factors;
num /= factor;
}
else if (num%factor==0 && (num==factor || factor==1))
num /= factor;
else if (num==1 || num==-1)
break;
else
++factor;
}
if (no_of_factors==0)
printf("%ld is a prime number.\n", orig_num);
else printf("%ld is a composite number.\n", orig_num);
} | {
"domain": "codereview.stackexchange",
"id": 44215,
"lm_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, c, factors",
"url": null
} |
electromagnetism, forces, magnetic-fields
Title: Force between two bar magnets I need to know how to calculate force between two bar magnets. I searched and found an answer on Wikipedia, but I don't really trust Wikipedia, a lot of crazy stuff is posted there.
So I searched again and didn't find an answer that matches Wikipedia's. So my question: Is Wikipedia's answer right? Maybe using the electrostatic analogue you can get approximately valid results. As we know we can consider a magnet as a magnetic dipole and then do the maths for interaction of two dipoles as we would have done in the electrostatic realm.
The magnetic field due to a magnet at axis is taken to be as
$B_a= (2\mu m)/(4\pi r^3)$
And equatorially as
$B_e = (\mu m)/(4\pi r^3)$.
Here $m$ is magnetic moment of magnet, $\mu$ is permeability of medium and $r$ is distance from centre of magnet. There is also the assumption that the magnet is small as compared to distance on which force is considered. | {
"domain": "physics.stackexchange",
"id": 9993,
"lm_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, forces, magnetic-fields",
"url": null
} |
x f x find 3 lim x→ f(x) 3. Plus model problems explained step by step. we get to turn the output of the computations into an animation — as you can see in the. By: Kate Albertini, Katie Fairman, and Anne Kaufmann. We need to calculate the one-sided limits and make sure that. Continuity Differential Calculus (50%) The Derivative. As listed below, this sub-package contains spline functions and classes, 1-D and multidimensional (univariate and multivariate) interpolation classes, Lagrange and Taylor polynomial interpolators, and wrappers for FITPACK and Piecewise-cubic interpolator matching values and first derivatives. form a composite functions and its domain. ► Density of slab reinforcements ► Contribution of transverse beam ► Disconnection of concrete ► Steel deck waves directions. piecemf(x, abc). 5, title = "Graph of g(x)=(x+sin x)/x, x = -5. Identify whether or not he graph is a function. And the respective derivatives are also the same (namely 2). Video Lecture 143 of 145 →. Copy | {
"domain": "fellsnippelstuv.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692298333416,
"lm_q1q2_score": 0.8262059506261153,
"lm_q2_score": 0.845942439250491,
"openwebmath_perplexity": 942.2722274800725,
"openwebmath_score": 0.6726654767990112,
"tags": null,
"url": "http://eptk.fellsnippelstuv.de/limits-of-composite-piecewise-functions.html"
} |
I found this example very useful for my quick prototyping. Do you know if I can specify the distance metric to be sum of absolute errors instead of sum of squared errors?
Anurag
9. Hi Anurag,
I think not, the problem resides in the mathematical formulation of the problem. The sum of squared errors has a continuous derivative in the neighborhood of zero (after all it is a second degree parabola) whereas the sum of absolute errors has not.
Paulo Xavier Candeias
10. Hello Mike,
When I use scipy.optimize.curve_fit and my method is this: method = None, what method is actually using python?
regards | {
"domain": "walkingrandomly.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731137267749,
"lm_q1q2_score": 0.8864194675162246,
"lm_q2_score": 0.920789679151471,
"openwebmath_perplexity": 1504.927461305425,
"openwebmath_score": 0.5015531182289124,
"tags": null,
"url": "https://walkingrandomly.com/?p=5215"
} |
set has outliers or extreme values, we summarize a typical value using the median as opposed to the mean. N is the number of observations and IQR the interquartile range, i.e. You can also use other percentiles to determine the spread of different proportions. Briefly, the semi-interquartile range is a measure of the dispersion or spread of a variable; it is the distance between the 1st quartile and the 3rd quartile, halved. Find the interquartile range and the semi-interquartile range of {17, 28, 44, 37, 28, 42, 21, 41, 35, 25}. Find the interquartile range of the data in the dot plot below. When a data set has outliers, variability is often summarized by a statistic called the interquartile range, which is the difference between the first and third quartiles.The first quartile, denoted Q 1, is the value in the data set that holds 25% of the values below it. Interquartile Range : The interquartile range (IQR), also called as midspread or middle 50%, or technically H-spread is the | {
"domain": "cholhua.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731147976794,
"lm_q1q2_score": 0.8239048841449312,
"lm_q2_score": 0.8558511414521923,
"openwebmath_perplexity": 901.7410825750325,
"openwebmath_score": 0.560030460357666,
"tags": null,
"url": "http://www.cholhua.com/il1cixbo/f34e51-the-semi-interquartile-range-for-the-data-3%2C4%2C6%2C9%2C11%2C12%2C14%2C15"
} |
c#, excel, winforms, ms-word
public AddOrEditResidentDlg()
{
InitializeComponent();
}
private void ANR_SaveNewTenant_BTN_Click(object sender, EventArgs e)
{
CurrentTenant.LastName = ANR_TenantLastName_TB.Text;
CurrentTenant.FirstName = ANR_TenantFirstName_TB.Text;
CurrentTenant.LeaseStart = ANR_MoveInDate_TB.Text;
CurrentTenant.LeaseEnd = ANR_LeaseEnd_TB.Text;
CurrentTenant.HomePhone = ANR_HomePhone_TB.Text;
CurrentTenant.CoTenantLastName = ANR_CoTenantLastName_TB.Text;
CurrentTenant.CoTenantFirstName = ANR_AdditionalOccupantFirstName_TB.Text;
CurrentTenant.RentersInsurancePolicy = ANR_RenterInsurance_TB.Text;
CurrentTenant.Email = ANR_AlternateContact_TB.Text;
Globals.TenantRoster.AddEditTenant(ApartmentNumber, CurrentTenant);
Close();
} | {
"domain": "codereview.stackexchange",
"id": 42740,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, excel, winforms, ms-word",
"url": null
} |
game, functional-programming, homework, clojure
; update method
(defn update-state [state]
(-> state
(update-in [:meteors] (fn [meteors] (doall (map move-meteors meteors))))
(update-in [:rocket] move-rocket)
; (update-in [:bonus] (fn [bonus] (doall (map move-bonus bonus))))
move-stars
create-new-star
(update-in [:stars] remove-stars)
emit-smoke
(update-in [:smoke] (fn [smokes] (map age-smoke smokes)))
(update-in [:smoke] remove-old-smokes)
meteor-out
create-meteor
; bonus-out
create-bonus
bonus-hit
meteor-hit
reset-game
(update-in [:smoke] fly-backwards state)
(update-in [:gameOver] reset-game-over state))) | {
"domain": "codereview.stackexchange",
"id": 31122,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "game, functional-programming, homework, clojure",
"url": null
} |
c++, performance, beginner, file, ai
files.h
#ifndef UPDATE_H
#define UPDATE_H
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
using namespace std;
class files{
string edit;
public:
int size;
vector<string> first;
vector<string> second;
fstream file;
string filename;
void add(string edit);
void keepline(string edit);
void fileopen();
void read();
void close();
void reload();
void start();
void end();
int checksize();
void load(string loadname);
};
int files::checksize(){
fstream filesize;
filesize.open(filename,ios::binary);
streampos begin,end;
begin = filesize.tellg();
filesize.seekg (0, ios::end);
end = filesize.tellg();
int size = end-begin;
//if you hate warnings
/**psize++;
*psize--;*/
files::start();
return size;
}
void files::start(){
fstream *pfile;
pfile = &file;
(*pfile).seekg (0, ios::beg);
}
void files::end(){
fstream *pfile; | {
"domain": "codereview.stackexchange",
"id": 28640,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, beginner, file, ai",
"url": null
} |
Exercise 2
Solution
837+1,958=2,795837+1,958=2,795 size 12{"837"+1,"958"=2,"795"} {} and 1,958+837=2,7951,958+837=2,795 size 12{1,"958"+"837"=2,"795"} {}
If three whole numbers are to be added, the sum will be the same if the first two are added first, then that sum is added to the third, or, the second two are added first, and that sum is added to the first.
Using Parentheses
It is a common mathematical practice to use parentheses to show which pair of numbers we wish to combine first.
Practice Set B
Exercise 3
Use the associative property of addition to add the following whole numbers two different ways.
Solution
(17+32)+25=49+25=74(17+32)+25=49+25=74 size 12{ $$"17"+"32"$$ +"25"="49"+"25"="74"} {} and 17+(32+25)=17+57=7417+(32+25)=17+57=74 size 12{"17"+ $$"32"+"25"$$ ="17"+"57"="74"} {}
Exercise 4
Solution
( 1, 629 + 806 ) + 429 = 2, 435 + 429 = 2, 864 ( 1, 629 + 806 ) + 429 = 2, 435 + 429 = 2, 864 size 12{ $$1,"629"+"806"$$ +"429"=2,"435"+"429"=2,"864"} {} | {
"domain": "cnx.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9603611631680358,
"lm_q1q2_score": 0.8002925716874304,
"lm_q2_score": 0.8333245891029457,
"openwebmath_perplexity": 3516.078365956032,
"openwebmath_score": 0.18412207067012787,
"tags": null,
"url": "http://cnx.org/content/m34802/latest/?collection=col10615/latest"
} |
svm, k-means
Another (and maybe simpler way) is to fit a gaussian mixture model (e.g. by scikit-learn). It is similar to k-means, but for each observation produces a probability distribution over clusters, instead of a single cluster label. These vectors of predicted cluster probabilities may be used as features as well.
from sklearn.mixture import GaussianMixture
gmm = GaussianMixture(n_components=6).fit(X)
proba = gmm.predict_proba(X)
svm2 = SVC().fit(proba, y) | {
"domain": "datascience.stackexchange",
"id": 2157,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "svm, k-means",
"url": null
} |
electrostatics, multipole-expansion
In all cases, you obtain the point quadrupole by taking the limit of $d\to0$ while making the charge $q\to\infty$ by keeping $qd^2$ constant.
Given any quadrupole moment, you can find the corresponding point quadrupole by choosing an appropriate linear combination of the five fields described above. However, this is a slightly misleading statement, because this scheme asks you to put a bunch of charges around (as many as 19) and this is not a minimal number. To get that minimal number, you need to use the cartesian form of the tensor, which has components
\begin{align}
Q_{ij} & = \int (x_ix_j -\frac13 \delta_{ij}r^2)\rho(\mathbf r)\mathrm d\mathbf r,
\end{align} | {
"domain": "physics.stackexchange",
"id": 36626,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, multipole-expansion",
"url": null
} |
triangle and using the Pythagorean to... Based on the x axis, so it 's just a quick glance, you may have! The haversine formula to find the distance formula given above still work though if you prefer C Basic and... You may not have even needed the graph at all to figure one! \Left ( x 2, y 2 from that set the lines the haversine determines! 2 ) together points on a sphere we show the formula will work! We found the length of the length of the vertical distance between two points formula we subtracted which is measure the! Having trouble loading external resources on our website the coordinates of two (... From your x2 input, then squared midpoint '' determines the great-circle distance between the a! To join two points on a sphere given their longitudes and latitudes the figure below: can you explain to! On circle such that distance between them is calculated y1 ) and ( -4 -3... 2 ) together then just the difference in x-coordinates is the most obvious way of distance. Coordinate use | {
"domain": "levny-polystyren.cz",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147169737826,
"lm_q1q2_score": 0.812436495235401,
"lm_q2_score": 0.8354835452961427,
"openwebmath_perplexity": 353.8007423006325,
"openwebmath_score": 0.7246552109718323,
"tags": null,
"url": "http://levny-polystyren.cz/sio1vub/distance-between-two-points-formula-e25f91"
} |
c++, tic-tac-toe, ai
if((playerChoice == 3 || playerChoice == 6 || playerChoice == 9) && playerTurn == false)
{
if((blockThree == 'X' && blockSix == 'X') && playerTurn == false && blockNine == '9') //3 - 6 = 9 vertical row 3
{
blockNine = 'O';
playerTurn = true;
}
if((blockThree == 'X' && blockNine == 'X') && playerTurn == false && blockSix == '6') //3 - 9 = 6 vertical row 3
{
blockSix = 'O';
playerTurn = true;
}
if((blockSix == 'X' && blockNine == 'X') && playerTurn == false && blockThree == '3') //6 - 9 = 3 vertical row 3
{
blockThree = 'O';
playerTurn = true;
}
}
else
{
do
{ | {
"domain": "codereview.stackexchange",
"id": 10043,
"lm_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++, tic-tac-toe, ai",
"url": null
} |
complexity-theory, reference-request, parallel-computing
We can assume a PRAM.
My problem is that this does not seem to say much about "real" machines, that is machines with a finite amount of processors. Now I am told that "it is known" that we can "efficiently" simulate a $O(n^k)$ processor algorithm on $p \in \mathbb{N}$ processors.
What does "efficiently" mean here? Is this folklore or is there a rigorous theorem which quantifies the overhead caused by simulation? | {
"domain": "cs.stackexchange",
"id": 190,
"lm_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, reference-request, parallel-computing",
"url": null
} |
gravity, electricity
Title: what Mass would be required to create measurable resistance in this circuit? sorry I'm not a physicist or student in this is not homework I was just thinking about this.
say you have a spherical Mass of a certain density I'm thinking say planet-sized and then tangent to the surface of that sphere you have a circuit running say 100 kilometers into space and it's a superconducting wire and also runs a hundred kilometers back to create a complete circuit because I'm guessing a complete circuit is required for this. | {
"domain": "physics.stackexchange",
"id": 59081,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, electricity",
"url": null
} |
python, python-3.x
>>> players = {'Steve': [100, 'Standby', 0]}
>>> player_bet(players['Steve'], 50)
>>> players
{'Steve': [50, 'Standby', 50]}
>>> player_bet(players['Steve'], 75)
ValueError
'Player does not have that amount to bet! Player has 50'
"""
curr, state, last_bet = player
if curr < amount:
raise ValueError(
f"Player does not have that amount to bet! Player has {curr}"
)
elif state == 'All-In':
raise TypeError("Player that is All-In cannot bet")
# decrement held money
player[0] -= amount
# while increasing the amount that was bet
player[2] += amount | {
"domain": "codereview.stackexchange",
"id": 37213,
"lm_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",
"url": null
} |
quantum-information, entropy, quantum-entanglement, correlation-functions, quantum-measurements
$$
\sum_j \lambda_j^2 = \frac{1}{4\mu^2}\sum_j 1 = \frac{r}{4\mu^2} = 1
$$
which implies that
$$
\mu = \frac{\sqrt{r}}{2} \rightarrow \lambda_j = \frac{1}{\sqrt{r}}.
$$
in the special case where the dimension of Hilbert spaces of A and B are equal $d_A=d_B =d$ and the shared state $\left | \Psi \right>$ has $d$ non-zero Schmidt coefficients, we get
$$
\lambda_j = \frac{1}{\sqrt{d}} \rightarrow \left | \Psi \right> = \frac{1}{\sqrt{d}} \sum_{j=1}^d \left|\phi_j^A\right> \left| \phi_j^B\right>
$$
which is the maximal entangled state. So | {
"domain": "physics.stackexchange",
"id": 94585,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-information, entropy, quantum-entanglement, correlation-functions, quantum-measurements",
"url": null
} |
electromagnetism, weak-interaction, electroweak
Title: About the electroweak force So, I'm struggling to understand how the electromagnetic and the weak force were connected. Separately, I know pretty much how the two forces work and interact with the environment. I read a few about, but still I don't know how it works, please if someone can explain a little or sent an article or something it would be grateful.
Thanks A definition of the electroweak force is given by ref. 1 as: | {
"domain": "physics.stackexchange",
"id": 50983,
"lm_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, weak-interaction, electroweak",
"url": null
} |
Buffon's needle experiment for estimating π is a classical example of using an experiment (or a simulation) to estimate a probability how to convert the datetime character string to sas datetime value (anydtdtm and mdyampm formats) using sas enterprise guide to run programs in batch not particularly the convergence. | {
"domain": "vatsa.info",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308800022472,
"lm_q1q2_score": 0.8703427871278225,
"lm_q2_score": 0.8807970732843033,
"openwebmath_perplexity": 1603.7392917532973,
"openwebmath_score": 0.7109445333480835,
"tags": null,
"url": "http://cqcourseworklruw.vatsa.info/an-analysis-of-the-buffons-needle-a-method-for-the-estimation-of-the-value-of-pi.html"
} |
ros, pid, navigation, ros-control, move-base
I understand the canonical output from move_base (from the local_planner specifically) is the Twist message, containing linear and angular velocity information. Having been told the robot's position, given a local cost map and a goal, the local planner calculates the optimal velocity message for the vehicle. What is confusing to me is that the output of all this. What the robot needs (it seems to me) is a direction to travel and a speed at which to go. But a Twist message outputs not a desired direction of travel, but the angular velocity or the change in direction of travel. It seems to me move_base is acting like a controller (think PID controller) on some level by not specifying the desired direction of travel directly. Do I understand this correct? | {
"domain": "robotics.stackexchange",
"id": 25010,
"lm_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, pid, navigation, ros-control, move-base",
"url": null
} |
quantum-mechanics, history, measurement-problem, wavefunction-collapse, decoherence
...
We have to add some comments on the actual procedure in the quantum-theoretical interpretation of atomic events. It has been said that we always start with a division of the world into an object, which we are going to study, and the rest of the world, and that this division is to some extent arbitrary. | {
"domain": "physics.stackexchange",
"id": 41582,
"lm_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, history, measurement-problem, wavefunction-collapse, decoherence",
"url": null
} |
universe
A less direct but still very important application of astronomy is in how it informs physics. Kepler was an astronomer, not a physicist. (Those two disciplines were very, very distinct in Kepler's day). Yet Kepler's work informed Newton on how to describe gravitation. More recently, astronomy has informed physics that its standard model was not quite correct. The observed neutrino flux from the Sun (see http://en.wikipedia.org/wiki/Solar_neutrino_problem) was a third of what physics at the time said it should be. This resulted in a change to the standard model. Neutrinos have a small but non-zero mass, and they oscillate from one form to another.
Astronomy continues to inform physics to this day. Physicists (and astronomers) remain clueless with regard to what constitutes dark matter and dark energy. But whatever they are, they certainly do exist. | {
"domain": "astronomy.stackexchange",
"id": 2826,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "universe",
"url": null
} |
python, beginner, object-oriented, to-do-list
A few improvements could be done.
First, I'd use i as the variable name for the index and not for the item.
Then, the my_list = []; for ...: if ...: my_list.append(...) pattern is usually written using list comprehension which are more concise and clearer once you get used to it. They are also more efficient and considered more pythonic.
def search(self, query):
result = [i for i, item in enumerate(self.items) if query in item]
return self.print_list(result)
Finally, I'd consider it poor API to have a search method that doesn't return anything (while performing some printing). I'd like it more if you were to return the results and to have another method to pretty print them if needed.
The final code looks like (I am still not a big fan of print_list):
class TodoList(object):
def __init__(self, title=None):
self.title = title
self.items = list()
def print_list(self, tdl=None):
if tdl is None:
tdl = range(len(self.items)) | {
"domain": "codereview.stackexchange",
"id": 21250,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, object-oriented, to-do-list",
"url": null
} |
ruby, ruby-on-rails
Title: Ruby SFTP client I'm on Ruby for three weeks and now I want to learn more.
Please review this SFTP client and suggest any necessary changes.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# What is Net::SFTP? | {
"domain": "codereview.stackexchange",
"id": 44457,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby, ruby-on-rails",
"url": null
} |
strings, vba, excel, time-limit-exceeded
Set myRange = sht.Range("A2", sht.Cells(lr, 1))
For Each myCell In myRange
If myCell.Value Like "*template*" Or myCell.Value Like "*TEMPLATE*" _
Or myCell.Value Like "*Template*" Or myCell.Offset(0, 2).Value Like "*template*" _
Or myCell.Offset(0, 2).Value Like "*TEMPLATE*" _
Or myCell.Offset(0, 2).Value Like "*Template*" Then
If Not delete Is Nothing Then
Set delete = Union(delete, myCell)
Else
Set delete = myCell
End If
End If
Next myCell
If Not delete Is Nothing Then
delete.EntireRow.delete
End If
Set ws = Nothing
Set wb = Nothing
Set accountBook = Nothing
Set entitlementsBk = Nothing
Set groupBk = Nothing
Set final = Nothing
Set eSht = Nothing
Set gSht = Nothing
Set myRange = Nothing
Set myCell = Nothing
Set sortRange = Nothing
Set delete = Nothing
Set c = Nothing
Application.ScreenUpdating = True
End Sub | {
"domain": "codereview.stackexchange",
"id": 24392,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "strings, vba, excel, time-limit-exceeded",
"url": null
} |
electromagnetism, visible-light, acoustics
By contrast, visible light has wavelengths in the 400 - 700 nm range. Thus photons bouncing off one bit of the surface will have a random phase relationship relative to other photons. The net result is that these photons (waves) will interfere constructively in just one specific direction (like Young's diffraction experiment, they will interfere constructively when their phase difference is a multiple of $2\pi$. ) In practice this means that the photons end up scattered, losing their spatial coherence. That is a fancy way of saying "they get so scrambled that they no longer form an image". | {
"domain": "physics.stackexchange",
"id": 13715,
"lm_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, visible-light, acoustics",
"url": null
} |
algebra or complex variables. Dave4Math » Number Theory » Divisibility (and the Division Algorithm). If we repeat a three-digit number twice, to form a six-digit number. An algorithm describes a procedure for solving a problem. In this video, we present a proof of the division algorithm and some examples of it in practice. The notion of divisibility is motivated and defined. We assume a >0 in further slides! A number of form 2 N has exactly N+1 divisors. The notes contain a useful introduction to important topics that need to be ad-dressed in a course in number theory. If $a$ and $b$ are integers with $a\neq 0,$ we say that $a$ divides $b,$ written $a | b,$ if there exists an integer $c$ such that $b=a c.$, Here are some examples of divisibility$3|6$ since $6=2(3)$ and $2\in \mathbb{Z}$$6|24 since 24=4(6) and 4\in \mathbb{Z}$$8|0$ since $0=0(8)$ and $0\in \mathbb{Z}$$-5|-55 since -55=11(-5) and 11\in \mathbb{Z}$$-9|909$ since $909=-101(-9)$ and $-101\in \mathbb{Z}$. David Smith is the | {
"domain": "com.au",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429116504951,
"lm_q1q2_score": 0.8143465969327848,
"lm_q2_score": 0.8267117983401363,
"openwebmath_perplexity": 369.0676248974898,
"openwebmath_score": 0.8721988201141357,
"tags": null,
"url": "https://kcsroofingandpatios.com.au/outer-core-gieh/b35a36-division-algorithm-number-theory"
} |
We consider the cases $\alpha \geq 1$, $0 < \alpha < 1$, $\alpha = 0$, $-1 < \alpha < 0$, and $\alpha \leq -1$.
Case 1: $\alpha \geq 1$. Begin by making the substitution $u = (\alpha+1)e^{-t}$ to get
$$I_\alpha(n) = (\alpha+1)^{n+1} \int_0^{-\log\left(\frac{\alpha-1}{\alpha+1}\right)} e^{-nt} e^{-t} \sqrt{1-\left[(\alpha+1)e^{-t}-\alpha\right]^2}\,dt.$$
Since
\begin{align} &e^{-t} \sqrt{1-\left[(\alpha+1)e^{-t}-\alpha\right]^2}\,dt \\ &= \sqrt{2+2\alpha}\, t^{1/2} \left[1-\frac{\alpha+6}{4}t - \frac{3\alpha^2-36\alpha-116}{96}t^2 - \frac{\alpha^3-6\alpha^2+36\alpha+88}{128}t^3 + O(t^4)\right] \end{align}
as $t \to 0^+$, we can apply Watson's Lemma to obtain the asymptotic expression | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357619344546,
"lm_q1q2_score": 0.8071777123873859,
"lm_q2_score": 0.8244619285331332,
"openwebmath_perplexity": 394.2143502521828,
"openwebmath_score": 0.9966306686401367,
"tags": null,
"url": "https://math.stackexchange.com/questions/542630/asymptotic-solution-to-the-integral-int-pi-2-pi-2-alpha-sin-xn"
} |
neural-networks, comparison, brain
Number of neurons
Another difference (although this difference is always smaller) is in the number of neurons in the network. A typical ANN consists of hundreds, thousands, millions, and, in some exceptional (e.g. GPT-3), billions of neurons. The BNN of the human brain consists of billions. This number varies from animal to animal.
Further reading
You can find more information here or here. | {
"domain": "ai.stackexchange",
"id": 620,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, comparison, brain",
"url": null
} |
physical-chemistry, gas-laws, ideal-gas
My proof is thus:
$P_2 = Kx_2$, where $P_2$ is the partial pressure of a solute, $K$ is the Henry's law constant, and $x_2$ is the mole fraction of solute dissolved in solution. By the ideal gas law,
$\frac{n_2RT}{V} = Kx_2 \rightarrow V = \frac{n_2RT}{Kx_2}$.
Therefore, V depends on temperature, not pressure. Regardless of if my proof's correct, I'm missing part of the picture here. Intuitively, I want believe increasing pressure leads to an increase in dissolved gas. If you have a beaker of water and some gas in a metal box, and then you decrease the volume of that container, like a piston, at constant temperature, wouldn't more gas dissolve? You state, it seems that, logically, "increasing pressure leads to an increase in dissolved gas." Your logic is not wrong... an increased mass of gas dissolves. | {
"domain": "chemistry.stackexchange",
"id": 17770,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, gas-laws, ideal-gas",
"url": null
} |
• $k=1$: $S_{1,n} = 0$.
• $n=1$: $S_{k,1} = 0$.
• $k=2$: Say you have $n_1$ copies of $\langle 1,2 \rangle$ and $n_2$ copies of $\langle 2,1\rangle$. The variance of each row is $n_1 n_2 /n^2$, which is maximized with $n_1 = \lfloor n/2 \rfloor$. That is, $$S_{k,n} = \frac{2 \lfloor n/2 \rfloor \cdot \lceil n/2 \rceil}{n^2}.$$ That this is already parity dependent does not bode well for finding an exact formula for higher $k$.
• $k=3$: Computations for small $n$ indicate that $S_{3,n} = 2$, achieved in many ways, including taking $n/2$ copies of $\langle 1,2,\dots,k\rangle$ and $n/2$ copies of $\langle k,k-1,\dots,1\rangle$, when $n$ is even, and when $n$ is odd taking one copy of each of $\langle 1,2,3\rangle, \langle 2,3,1\rangle, \langle 3,1,2\rangle$ and splitting the rest evenly between $\langle 1,2,3 \rangle$ and $\langle 3,2,1\rangle$. That the formula comes out so clean for $k=3$ is encouraging. | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.813847278633976,
"lm_q2_score": 0.8479677545357568,
"openwebmath_perplexity": 829.6804285701835,
"openwebmath_score": 0.9687731266021729,
"tags": null,
"url": "http://mathoverflow.net/questions/122282/most-inconsistent-ranking/122347"
} |
php, object-oriented, image, library, authentication
So why bother commenting?
- You did a good effort in separating concern
- you actually wrote some comments
- You are using PDO
Long part
(More text will follow, I simply don't feel like writing everything in 1 go):
FileHandler or no, fileHandler
Naming convention is everything . When using code, you should not have to think about syntax. It should all feel very natural. Your code doesn't. Some examples:
the FileHandler class is actually fileHandler. Always start your class names with a capital letter. Why? because. It's a convention, we all do it, it makes writing code easy.
Now, lets say I want to use your fileHandler class. I copy paste it into my project and initialize it:
$myAwesomeStolenFileHandler = new fileHandler();
$myAwesomeStolenFileHandler->createImage($myImage); | {
"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
} |
The axes of the coordinate system are written horizontally. So the problem not when it comes to computer world, is how to your store these coefficients in memory. You can as well do:
float m[16] = { AXx, AXy, AXz, 0, AYx, AYy, AYz, 0, AZx, AZy, AZz, 0, Tx, Ty, Tz, 1};
Does it tell you though which convention you use? No. You can also write:
float m[16] = { AXx, AXy, AXz, Tx, AYx, AYy, AYz, Ty, AZx, AZy, AZz, Tz, 0, 0, 0, 1};
or:
float m[16] = { AXx, AYx, AZx, Tx, AXy, AYy, AZy, Ty, AXz, AYz, AZz, Tz, 0, 0, 0, 1}; | {
"domain": "scratchapixel.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9871787846017969,
"lm_q1q2_score": 0.80478021135912,
"lm_q2_score": 0.8152324826183822,
"openwebmath_perplexity": 921.7886747497524,
"openwebmath_score": 0.6234551668167114,
"tags": null,
"url": "http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-4-geometry/conventions-again-row-major-vs-column-major-vector/"
} |
quantum-field-theory, general-relativity, black-holes, antimatter, conservation-laws
It is (or may be) only an artifact of lack of unification between QFT and GR? The no hair theorem is proven in classical gravity, in asymptotically flat 4 dimensional spacetimes, and with particular matter content. When looking at more general circumstances, we are starting to see that variations of the original assumptions give the black hole more hair. For example, for asymptotically AdS one can have scalar hair (a fact which is used to build holographic superconductors). For five dimensional spaces black holes (and black rings) can have dipole moments of gauge charges. Maybe there are more surprises. | {
"domain": "physics.stackexchange",
"id": 703,
"lm_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, general-relativity, black-holes, antimatter, conservation-laws",
"url": null
} |
java, strings, file, stream
public Sequence (String inputFileName, String outputFileName, int lineLength, boolean doWork) throws Exception {
inputFile = new File(inputFileName);
outputFile = new File(outputFileName);
this.lineLength = lineLength;
symbolsUsed = 0;
if(doWork) {
analyzeSymbols();
writeToFile();
}
} | {
"domain": "codereview.stackexchange",
"id": 29111,
"lm_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, strings, file, stream",
"url": null
} |
neutron-star, red-giant, thorne-zytkow-object
PS, following comment:
The consensus view is that a single star couldn't form a TZO because if the core collapses into a neutron star, models predict that the envelope will be ejected. That is, single star's only evolve into "naked" neutron stars. Under this assumption, the only way to form a TZO is to have a neutron star collide with or accrete enough material from another star. This could happen if two wandering stars collide. Alternatively, it could happen if one star in a binary collapses into a neutron star. In particular, it's known that the collapse process is probably not symmetric, so the neutron star gets a "kick" in some direction. If the neutron star is kicked into the companion, it will presumably undergo some viscous drag and settle into the centre. | {
"domain": "astronomy.stackexchange",
"id": 2299,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neutron-star, red-giant, thorne-zytkow-object",
"url": null
} |
php, email
if(isset($_POST['submit']))
{
if(empty($_POST['uname']))
{
$error = 1;
$errormsg = "Your name is required.";
return false;
}else{
$error = 0;
$createEmail = new emailConstruction;
$createEmail->setName($_POST['uname']);
}
if(empty($_POST['umail']))
{
$error = 1;
$errormsg = "Email address required.";
return false;
}else {
$error = 0;
$createEmail = new emailConstruction;
$createEmail->setTo($_POST['umail']);
}
if(empty($_POST['umsg']))
{
$error = 1;
$errormsg = "Message is required";
return false;
}else{
$error = 0;
$createEmail = new emailConstruction;
$createEmail->setMessage($_POST['umsg']);
}
if($error = 0)
{ $finalHeader = 'from:' . $finalFrom; | {
"domain": "codereview.stackexchange",
"id": 30064,
"lm_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, email",
"url": null
} |
quantum-field-theory, renormalization, scaling
has a sharp answer: no, one cannot say so.
Renormalizable theories typically have running coupling constants with non-vanishing beta functions. The second part (what you called the 'converse') is false too. The first example that come to my mind is a theory with a spontaneously broken CFT that delivers a dilaton: the low-energy lagrangian for the dilaton is scale invariant and still is non-renormalizable having an infinite series of terms organized by the number of derivatives envolved. | {
"domain": "physics.stackexchange",
"id": 5295,
"lm_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, renormalization, scaling",
"url": null
} |
electromagnetism, electrons, voltage, batteries, electrochemistry
Electric Displacement Field $D$: A conductor provides a high electrical permittivity path in which the electric field $E$ acts (units: volt/meter = newton/coulomb) act on charge to exert a force on electrical charge. The $E$ field of a battery polarizes the dielectric between the plates of a capacitor. The electric permittivity of the vacuum of space is a measure of the capacitance of space and is denoted as $\epsilon_0$ and is $8.85\times10^{-12}\ \mathrm{F/m}$). Vacuum is the smallest possible electric permittivity and all other materials are expressed as a ratio, a multiple of $\epsilon_0$. An $E$ field acting in a space with $\epsilon_0)$ will have a electric displacement field $D=\epsilon_0E$, which has units of $\mathrm{C/m^2}$. The $\epsilon_\text{air}$ is approximately equal to vacuum permittivity, and that permittivity is very low, so minimal charge is stored on the terminals. However, in a conductor, the $\epsilon_\text{conductor}$ is large, which means that for any given $E$ | {
"domain": "physics.stackexchange",
"id": 50826,
"lm_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, electrons, voltage, batteries, electrochemistry",
"url": null
} |
java, swing
/* calculate accelerations for both bodies */
ax += other.getMass() * dx / r3;
ay += other.getMass() * dy / r3;
other.addToAx(mass * -dx / r3);
other.addToAy(mass * -dy / r3);
}
public void update() {
vx += ax;
vy += ay;
ax = 0;
ay = 0;
x += vx;
y += vy;
}
Further simplifications
If you don't actually need the current velocity of the object other than to update the position (e.g for collisions), you can get rid of the acceleration entirely and operate directly on the velocity.
Edit: Also, I think that multiplications are faster than divisions, so you could also invert r3 so that you only need to do one divide. You can also precompute dx/r^3 and dy/r^3 to reduce the number of multiplies:
public void interact(Body other) {
double dx = other.getX() - x;
double dy = other.getY() - y;
double r = calculateDistance(dx, dy);
double inv_r3 = 1.0 / (r * r * r); | {
"domain": "codereview.stackexchange",
"id": 13355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, swing",
"url": null
} |
ros, rospy, documentation
Go through the rospy tutorials if you haven't already. From the writing a publisher and subscriber tutorial:
rate = rospy.Rate(10) # 10hz
This line creates a Rate object rate. With the help of its method
sleep(), it offers a convenient way
for looping at the desired rate. With
its argument of 10, we should expect
to go through the loop 10 times per
second (as long as our processing time
does not exceed 1/10th of a second!)
Originally posted by jayess with karma: 6155 on 2017-06-26
This answer was ACCEPTED on the original site
Post score: 12 | {
"domain": "robotics.stackexchange",
"id": 28216,
"lm_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, rospy, documentation",
"url": null
} |
electromagnetism
That they have poles can be seen below. The picture shows the fields B and H for a uniformly magnetized sphere, which should be a good enough approximation here. The magnetic south pole is where the straight field line enters and the north pole where it leaves the sphere. A compass needle will point to the magnetic south pole. Note that the Earth magnetic North Pole is actually a south pole. Also of course Earth, or its metallic core, are not uniformly magnetized. | {
"domain": "physics.stackexchange",
"id": 82835,
"lm_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",
"url": null
} |
thermodynamics
But in this case how is momentum conserved? What is the force braking the fluid, if pressure is constant? Momentum is conserved because the pressure isn't constant. This question is the main reason the diagram was added. At first it might seem like momentum isn't conserves since tank 1 needs to speed up the particles from 0 to $v_0$ and tank 2 needs to slow them down from a different velocity $v_L$ to 0. This asymmetry is exactly balanced by the force asymmetry, so the total momentum of the entire system including both tanks and all the gas is constant. | {
"domain": "physics.stackexchange",
"id": 85205,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics",
"url": null
} |
general-relativity, differential-geometry, differentiation, vector-fields
The easiest way to see this is working backwards from the regular expression for $\frac{df}{d\lambda}(x)$. If we denote the tangent vector as $t^\mu(x) = \frac{dx^\mu}{d\lambda}$, we have:
$$
\frac{df}{d\lambda}(x) = t^\mu(x) \partial_\mu f(x) = df(t(x)) = df\left(\frac{dx^\mu}{d\lambda}\right) = \left(df \frac{d}{d\lambda} \right)(x)
$$
where in the last equality above the tangent vector $t(x)$ is regarded as a vector application $t = \frac{d}{d\lambda}$. So technically $\frac{df}{d\lambda} = df \circ \frac{d}{d\lambda} = df\left( \frac{d}{d\lambda}\right)$. | {
"domain": "physics.stackexchange",
"id": 25834,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, differential-geometry, differentiation, vector-fields",
"url": null
} |
javascript, html, game, ecmascript-6, dom
requestAnimationFrame(render);
function render() {
// update paddle position
// ball-level collision
if ((ball.mesh.position.z - ball.radius < levelBounds.top && ball.velocity.z < 0.0) ||
(ball.mesh.position.z + ball.radius > levelBounds.bottom && ball.velocity.z > 0.0)) {
ball.velocity.z *= -1.0;
}
if ((ball.mesh.position.x + ball.radius > levelBounds.right && ball.velocity.x > 0.0) ||
(ball.mesh.position.x - ball.radius < levelBounds.left && ball.velocity.x < 0.0)) {
ball.velocity.x *= -1.0;
}
resolveBallBlockCollision(paddle.mesh, paddle, function() {});
// ball-brick collision
visibleBricks.some(function(visibleBrick, i) {
return resolveBallBlockCollision(visibleBrick, brick, function() {
scene.remove(scene.getObjectByName(visibleBrick.name));
visibleBricks.splice(i, 1);
});
}); | {
"domain": "codereview.stackexchange",
"id": 31749,
"lm_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, html, game, ecmascript-6, dom",
"url": null
} |
-
Do you mean goes through $(2,\sqrt{2})$? – littleO Nov 9 '12 at 9:10
@littleO yes, I do mean that, I'll edit it – JohnPhteven Nov 9 '12 at 9:11
The equation of an ellipse whose major and minor axes coincide with the Cartesian axes is $$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1.$$ The distance from the center to either focus is $f$ where $$f^2 = a^2 - b^2.$$ We are given that $f = 3$, from which we conclude that $b^2 = a^2 - 9$. The equation of our ellipse reduces to $$\frac{x^2}{a^2} + \frac{y^2}{a^2 - 9} = 1.$$ Now we plug in the point $(2,\sqrt{2})$ and obtain $$\frac{4}{a^2} + \frac{2}{a^2 - 9} = 1.$$ There are four values of $a$ that satisfy this equation, and we pick the one that is larger than $3$: $$a = 2 \sqrt{3}.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759671623987,
"lm_q1q2_score": 0.8257265478762165,
"lm_q2_score": 0.8418256492357358,
"openwebmath_perplexity": 528.1484822301285,
"openwebmath_score": 0.9904555082321167,
"tags": null,
"url": "http://math.stackexchange.com/questions/227860/the-equation-of-an-ellipse"
} |
ds.algorithms, circuit-complexity, boolean-functions, circuits
Title: Evaluate boolean circuit on batch of similar inputs Suppose I have a boolean circuit $C$ that computes some function $f:\{0,1\}^n \to \{0,1\}$. Assume the circuit is composed of AND, OR, and NOT gates with fan-in and fan-out at most 2.
Let $x \in \{0,1\}^n$ be a given input. Given $C$ and $x$, I want to evaluate $C$ on the $n$ inputs that differ from $x$ in a single bit position, i.e., to compute the $n$ values $C(x^1),C(x^2),\dots,C(x^n)$ where $x^i$ is the same as $x$ except that its $i$th bit is flipped.
Is there a way to do this that is more efficient that independently evaluating $C$ $n$ times on the $n$ different inputs?
Assume $C$ contains $m$ gates. Then independently evaluating $C$ on all $n$ inputs will take $O(mn)$ time. Is there a way to compute $C(x^1),C(x^2),\dots,C(x^n)$ in $o(mn)$ time? | {
"domain": "cstheory.stackexchange",
"id": 3735,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ds.algorithms, circuit-complexity, boolean-functions, circuits",
"url": null
} |
deep-learning, cnn, pytorch, gan
Title: Get data from intermediate layers in a Pytorch model I was trying to implement SRGAN in PyTorch and I have to write a Content loss function that required me to fetch activations from intermediate layers for both the Generated Image & Original Image.
I'm using pretrained VGG-19 and according to the paper I need the ReLU activations
Can anybody guide me on how can I achieve this? You can save the activations for intermediate layers into a variable within your forward method and then return them in addition to the output value. | {
"domain": "datascience.stackexchange",
"id": 8922,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-learning, cnn, pytorch, gan",
"url": null
} |
A sum in sigma notation looks something like this: The (sigma) indicates that a sum is being taken. The variable is called the index of the sum. The numbers at Question 374989: Express the summation notation. Use i for the index of summation. 2/3+4/5+6/7+----40/41. Answer by Fombitz(32378) · About Me Sample Problem. Write the following sum using sigma notation. We know the nth term and the starting index, so we can write the series in summation notation:. It is understood that the series is a sum of the general terms where the index start Summation notation can be generalized to many mathematical operations, 30 Aug 2011 + f99 + f100 may be written in the – notation as: fkk = 1 100 A variable which is called the “index” variable, in this case k. In mathematics, the Use summation notation to express the sum of all numbers; Use summation notation to express the sum of a subset of The index variable i goes from 1 to 3. Understand how to represent a mathematical series; Understand how | {
"domain": "netlify.app",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226334351969,
"lm_q1q2_score": 0.8010543483400798,
"lm_q2_score": 0.8198933381139645,
"openwebmath_perplexity": 395.39551297137973,
"openwebmath_score": 0.9918047785758972,
"tags": null,
"url": "https://topbinhxqfznm.netlify.app/cordier67502kyzo/the-index-of-summation-notation-sup.html"
} |
Solve each equation with the quadratic formula solving quadratic equations using quadratic formula solving quadratic equations using the formula worksheets solving. Solving Difficult Quadratic Equations Worksheet Instructions for Printing the Worksheet or Answer Key. Model answer & video solution for Quadratic Formula: Paper 1. Substitute the given information into the equation. Since in the Scholar Worksheet about 90% of the contents of the entire guide are issues, equally multiple selection and solution issues that are not available. Use the Factoring Method to Solve the Quadratic Equations(Answers on 2nd page of PDF. Solve quadratic equations by inspection (e. Here on AglaSem Schools, you can access to NCERT Book Solutions in free pdf for Maths for Class 10 so that you can refer them as and when required. Quadratic Equation Questions The normal quadratic equation holds the form of Ax² +bx+c=0 and giving it the form of a realistic equation it can be written as 2x²+4x-5=0. Lots more | {
"domain": "abiliatour.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978384668497878,
"lm_q1q2_score": 0.8044172356455278,
"lm_q2_score": 0.8221891261650248,
"openwebmath_perplexity": 760.9924713394902,
"openwebmath_score": 0.5009381175041199,
"tags": null,
"url": "http://yhjd.abiliatour.it/quadratic-formula-questions-and-answers-pdf.html"
} |
galaxy, galaxy-center
$^\dagger$Not to be confused with the event horizon which is even smaller. | {
"domain": "astronomy.stackexchange",
"id": 2523,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "galaxy, galaxy-center",
"url": null
} |
problems following: Either using the product rule or multiplying would be a huge headache of will. This equation getting or substitute for y, the ordinary rules of differentiation do APPLY. Or multiplying would be a huge headache respect to x differentiation example question without logarithmic differentiation practice problems Find derivative! The video below differentiation to Find the derivative of each of the argument in the video below do 1-9 except... Aren ’ t actually differentiating the logarithmic differentiation logarithmic differentiation to Find derivative... Before a derivative can be taken Because a variable is raised to a variable power in this function the... The reciprocal of the logarithmic differentiation practice problems is given in the video below differentiation to Find derivative... Differentiate each function with respect to x rule or multiplying would be huge. Because a variable is raised to a variable power in this function, the ordinary of. Applying | {
"domain": "gridserver.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305370909698,
"lm_q1q2_score": 0.8468210054249908,
"lm_q2_score": 0.8791467595934565,
"openwebmath_perplexity": 706.2411146557117,
"openwebmath_score": 0.9268009662628174,
"tags": null,
"url": "https://s62713.gridserver.com/cdkeys-windows-roslfr/logarithmic-differentiation-problems-14fb33"
} |
javascript, node.js, ecmascript-6, sudoku
let value_index
if ((value_index = values.indexOf(_number)) !== -1) {
values.splice(value_index, 1)
}
}
}
let sub_grid = this.getSubGrid(Grid.getSubGridIndexForGridIndex(index))
removeValues({ from: values, present_in: sub_grid })
if (values.length === 0) {
return values
}
let grid_row = this.getRow(Grid.getRowIndexForGridIndex(index))
removeValues({ from: values, present_in: grid_row })
if (values.length === 0) {
return values
}
let grid_column = this.getColumn(Grid.getColumnIndexForGridIndex(index))
removeValues({ from: values, present_in: grid_column })
return values
}
}
module.exports = Grid
solver.js
const Grid = require('./grid.js')
class Solver {
/**
* @param {Grid} grid A Grid object.
*/
constructor(grid) {
if (!(grid instanceof Grid)) {
throw new TypeError('grid must be an instance of Grid')
}
this.grid = grid
} | {
"domain": "codereview.stackexchange",
"id": 21709,
"lm_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, sudoku",
"url": null
} |
quantum-electrodynamics, feynman-diagrams
Now if I replace p1 with p3 in fig 7.4 (i.e. an incoming electron with
outgoing electron) then also I have a valid different graph and it should follow the antisymmetrization rule, then why this possibility is not taken into account?
Also in compton scattering fig 7.6 I can replace p1 with p4 to get a different diagram. | {
"domain": "physics.stackexchange",
"id": 79793,
"lm_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-electrodynamics, feynman-diagrams",
"url": null
} |
notation
(2) How does one interpret what the numerical values of the rӕk are taken to represent? It is universally agreed that the counting of the rasi (ราศี, signs of the zodiac) begins with Aries (Mesa) = 0; but the "r" at 0.
...
$^{12}$ Where desirable, values in arcmins are here converted to signs, degrees, and arcmins in order to make them compatible with following operations. Thus at stage C12, the value 258 arcmins becomes 0; 4, 18 to make it compatible with 2; 19, 28.
Since the zodiac partitions the celestial longitude into twelve $30^\circ$ divisions, this makes sense, and seems to work out fairly straightforwardly though a bit cryptically, because the calculation mixes degrees and minutes: e.g., the minuend (first part) of Step 8 is in degrees, which is only implicitly converted to minutes of arc to be compatible with the subtrahend ($3'$). | {
"domain": "astronomy.stackexchange",
"id": 1075,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "notation",
"url": null
} |
quantum-field-theory, statistical-mechanics, renormalization, conformal-field-theory, scale-invariance
Hence from this point of view the self-similarity and scale invariance may only be identical in a discrete number of points for simple fractals which have a unique scaling factor. (I am aware that this does not adress spin lattices but it answers the question in the frame of the chaos theory.) | {
"domain": "physics.stackexchange",
"id": 42488,
"lm_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, statistical-mechanics, renormalization, conformal-field-theory, scale-invariance",
"url": null
} |
rosbag, rostopic
Title: Export topic from bag at different rate
Hi to all,
i have recorded several bag files which contain different topics recorded at different rates.
For example:
topics: /sensor/FilterStatus 11514 msgs : diagnostic_msgs/DiagnosticStatus
/sensor/Imu 11497 msgs : sensor_msgs/Imu
/sensor/NavSatFix 11514 msgs : sensor_msgs/NavSatFix
/sensor/SystemStatus 11498 msgs : diagnostic_msgs/DiagnosticStatus
/sensor/Twist 11514 msgs : geometry_msgs/Twist
/robodyne/enc 718 msgs : std_msgs/String
/robodyne/io 719 msgs : std_msgs/String
/robodyne/sys 719 msgs : std_msgs/String
/robodyne/velocity 719 msgs : std_msgs/String | {
"domain": "robotics.stackexchange",
"id": 29637,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosbag, rostopic",
"url": null
} |
experimental-physics, water, surface-tension
Once difference between adding a water drop and a coin is that, if done carefully, the coin will cause less of a wave. In fact the coin that caused the spill seemed to be added deliberately to cause a wave, like the person was tired of adding coins and wanted to see the spill already. A coin can be inserted into the water edge-on, and cause a small wave when doing so. A water drop will cause more of a wave because the surface tension of the water in the glass and that of the drop merge when they touch, which causes a sort of snap action that cause a wave. This wave will more likely stress the miniscus at the edge to the breaking point than the tiny rise in water level due to the drop alone. | {
"domain": "physics.stackexchange",
"id": 12028,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, water, surface-tension",
"url": null
} |
c++, compression
and the compression main loop will be:
std::vector<uint8> output;
uint64 outputbuff; //filled from least significant bit first
uint filled;
for(char c : input){
compress_value value = compress_table[c];
outputbuff |= value.code << filled;
filled += value.code_size;
while(filled > 8){
output.pushback(outputbuff & 0xff);
outputbuff = outputbuff >> 8;
filled -= 8;
}
}
Decompressing will be similar. But instead you will have a lookup table that is as large as \$ 2^{\text{max code size}}\$
Each entry in the decompression table will contain at index i the character where i & mask is the code for the value.
That is
for(table_value value : table){
for(uint c = value.code; c < table_size; c += 1<<value.code_size){
decompress_table[c].ch = value.ch;
decompress_table[c].code_size = value.code_size;
}
} | {
"domain": "codereview.stackexchange",
"id": 34402,
"lm_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++, compression",
"url": null
} |
An alternate route: We show that, if $ax+by=1$ and $m$ is divisible by $a$ and $b$ then $m$ is divisible by $ab$. (Then apply this with $b=a+1$, $x=-1$ and $y=1$.)
Proof: Let $m=ak=bl$. Then $ab(xl+ky)=(ax+by)m=m$. QED
The point here is that the hypothesis $\exists_{x,y}: ax+by=1$ is often easier to use than $GCD(a,b)=1$. The equivalence between these two is basically equivalent to unique factorization, and you can often dodge unique factorization by figuring out which of these two you really need. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357591818725,
"lm_q1q2_score": 0.8049525681228131,
"lm_q2_score": 0.8221891392358015,
"openwebmath_perplexity": 360.4080691955224,
"openwebmath_score": 0.8982755541801453,
"tags": null,
"url": "https://math.stackexchange.com/questions/3118/if-a-mid-m-and-a-1-mid-m-prove-aa-1-m?noredirect=1"
} |
keras, r, time-series, normalization
Another more advanced and less used (so far) is Adaptive Normalization
can be divided into three stages: (i)
transforming the non-stationary time series into a stationary
sequence, which creates a sequence of disjoint sliding
windows (that do not overlap); (ii) outlier removal; (iii) data
normalization itself.
Check the link on Adaptive Normalization and all its references, there is relevant information in there. | {
"domain": "datascience.stackexchange",
"id": 4320,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "keras, r, time-series, normalization",
"url": null
} |
ros
Title: Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
I use the Ubuntu environment,Refer to the "ROS NDK How to cross-compile any other ROS package for Android" tutorial, compile sick_tim,./do_docker to sick_tim when I run the wrong as follows:
==> add_subdirectory(sick_tim)
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:106 (find_package_handle_standard_args)
sick_tim/CMakeLists.txt:11 (find_package)
Originally posted by zzkzsmj on ROS Answers with karma: 1 on 2017-01-14
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 26719,
"lm_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
} |
php, regex
if(!$matched) {
$code = "<li class='free'>".$number." FREI</li>";
array_push($matched_isdn, array("code" => $code));
}
else {
$code = "<li class='occupied'>".$code."</li>";
array_push($matched_isdn, array("code" => $code));
}
$code = $number;
$matched = false;
if($this->numberRangeCheckType == "default" || $this->numberRangeCheckType == "sip") {
for($i = 0; $i < count($sip_regexp); $i++) {
if(preg_match($sip_regexp[$i],$number)) {
$code = $code." <a href='#application_".$i."' class='applink'>".$sip_applications[$i]->getName()."</a>";
$matched = true;
}
}
} | {
"domain": "codereview.stackexchange",
"id": 2291,
"lm_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, regex",
"url": null
} |
turing-machines, automata, linear-bounded-automata
Since your tape has length $n$ there are $n$ possible head positions, so you multiply the number of strings on the tape with $n$.
Finally, there are $q$ states, so for every possible string on tape and every possible head position, we can be in either of the $q$ states, making $qng^n$ configurations of the Turing machine. | {
"domain": "cs.stackexchange",
"id": 14519,
"lm_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, automata, linear-bounded-automata",
"url": null
} |
special-relativity, spacetime, metric-tensor, relativity
Consider it as a slice of a full 3+1 spacetime diagram.
Consider the 4-velocity OP of an observer at event O
and the future-timelike branch of the "unit-hyperbola centered at O"
(which is asymptotic to the null-cone of O).
The tangent-line at event P is Minkowski-orthogonal to the radius vector OP (as Minkowski defined in his 1908 paper). So, "space along MPN" is Minkowski-orthogonal to "time along OP".
That tangent-line intersects the null cone at events M and N, and P is the midpoint of MN. (This is related to a theorem by Apollonius.) So, since M and N are (according to OP) equidistant in space from P and since the light-rays from O to M and to N travel at the same speed, then OP would assign M and N the same time-coordinate (in fact, the same time coordinate as P)--- M and N are simultaneous according to OP. | {
"domain": "physics.stackexchange",
"id": 48845,
"lm_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, spacetime, metric-tensor, relativity",
"url": null
} |
velocity, conventions, rotational-kinematics, rigid-body-dynamics, angular-velocity
Let the particle rotate about the axis OO' ...
Within time interval $dt$ let its motion be represented by the vector $d\varphi$ whose direction is along axis obeying the right-hand-corkscrew rule, and whose magnitude is equal to the angle dφ.
Now, if the elementary displacement of particle at a be specified by radius vector $r$,
From the diagram, it is easy to see that, for infinitesimal rotation, $dr= d\varphi\times r \tag{1}$
By definition, $ω = dφ/dt$
Thus taking the elementary time interval as $dt$, all given equations surely hold!
Thus we can divide both sides of the equation $(1)$ by $dt$ which is the corresponding time interval!
So we get $dr/dt = dφ/dt \times r$ of course $r$ value won't change WRT the particle and axis, so $r$/dt is essentially $r$!
So result is, $$\boxed{v = ω \times r}$$ | {
"domain": "physics.stackexchange",
"id": 73304,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "velocity, conventions, rotational-kinematics, rigid-body-dynamics, angular-velocity",
"url": null
} |
machine-learning, genetic-algorithms, learning-theory, evolutionary-computing
And since we are here, if anyone would be able to clarify the following I would be indebted. What is the difference between a $(1+k)$-EA and a $(1, k)$-EA for $k > 1$. As far as I have understood the comma description (i.e. $(1, k)$-EA) refers to the fact that the algorithm picks the most fit hypothesis among the $k+1$ elements in the neighborhood. The understanding that I have for $(1+k)$-EAs is that they pick at random (however that will be defined) among the hypotheses that have strictly larger fitness values compared to the current hypothesis. Is this understanding correct?
Thank you for your time in advance. I'm not 100% sure I understand your formulation (things like "our current hypothesis is neutral compared to our current hypothesis" are a bit confusing), but if I understand it correctly, it's this: | {
"domain": "cs.stackexchange",
"id": 4521,
"lm_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, genetic-algorithms, learning-theory, evolutionary-computing",
"url": null
} |
c++, strings, reinventing-the-wheel
// Methods require to implement the Reversible Container concept
reverse_iterator rbegin() { return reverse_iterator(finish); }
reverse_iterator rend() { return reverse_iterator(start); }
const_reverse_iterator rbegin() const { return const_reverse_iterator(finish); }
const_reverse_iterator rend() const { return const_reverse_iterator(start); }
// A SINGLE method to convert a C-String into a string
mString(C* cString)
: start(new C[(cString ? strlen(cString) : 0) + 15])
, finish(start + (cString ? strlen(cString) : 0))
, reservedEnd(finish + 15)
{
std::copy(cString, cString + size() + 1, start);
} | {
"domain": "codereview.stackexchange",
"id": 6232,
"lm_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++, strings, reinventing-the-wheel",
"url": null
} |
weight
When the mass, $m$, is inside the container the container is closed with the lid not letting any other matter to enter or escape the container.
Neglecting any effect of the movement of the lid, will the weighing machine show the same or different readings during the two stages, when the container is open and when it is closed before the mass $m$ hits the bottom of the container? Why?
If there was air instead of vacuum, in the second stage the weighing machine would also measure the weight of the air trapped. But apart from this, would the situation be any different? While the mass is falling, it is not interacting in any way with the weighing machine. The weighing machine only responds to forces applied to it, and the falling mass $m$ is not exerting a force on it. The presence of the large container mass $M$ does not matter until the small mass makes contact with it so that a force can be transmitted to the weighing machine. | {
"domain": "physics.stackexchange",
"id": 18716,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "weight",
"url": null
} |
javascript, jquery, html, event-handling, dom
$("body").on("tap", ".state-4, .display-state-4", function showSection8State4() {
$(".show-overlay-big").toggleClass("display-state-4");
$(".state-4-pdfs").children().toggleClass("display-pdfs");
$(".state-2-pdfs").children().removeClass("display-pdfs");
$(".state-3-pdfs").children().removeClass("display-pdfs");
$(".state-1-pdfs").children().removeClass("display-pdfs");
$(".state-5-pdfs").children().removeClass("display-pdfs");
$(".state-6-pdfs").children().removeClass("display-pdfs");
$(".state-7-pdfs").children().removeClass("display-pdfs");
$(".state-8-pdfs").children().removeClass("display-pdfs");
$(".state-9-pdfs").children().removeClass("display-pdfs");
$(".show-overlay-big").removeClass("display-state-2");
$(".show-overlay-big").removeClass("display-state-3");
$(".show-overlay-big").removeClass("display-state-1"); | {
"domain": "codereview.stackexchange",
"id": 13223,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, html, event-handling, dom",
"url": null
} |
calculator. Remember that an exponent indicates repeated multiplication of the same quantity. Decimal place value worksheets Negative exponents are the reciprocals of the positive exponents. Take a look at our interactive learning Quiz about Properties of Exponents, or create your own Quiz using our free cloud based Quiz maker. Let x and y be numbers that are not equal to zero and let n and m be any integers. Properties of parallelogram worksheet. Properties of Exponents p. 323 Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. Exponents are also called Powers or Indices. If so, then you need our lessons that cover the properties of exponents. The goal of the activity is for students to discuss how to reassemble the properties (MP3). Evaluating exponents & radicals. 2) Simplify algebraic expressions using the properties of exponents. When n is a positive integer, exponentiation corresponds to repeated multiplication of the | {
"domain": "trinitariasmallorca.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9621075701109192,
"lm_q1q2_score": 0.811917868435894,
"lm_q2_score": 0.8438951045175643,
"openwebmath_perplexity": 1270.9053218679683,
"openwebmath_score": 0.6059345602989197,
"tags": null,
"url": "http://trinitariasmallorca.org/bedspreads-and-xetifo/8aec1f-properties-of-exponents"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.