text stringlengths 49 10.4k | source dict |
|---|---|
python, regex
def tokenize(self, text):
for match in re.finditer(self.expression, text):
# group 0 is the whole string, we subtract one
# to make up for that
yield match.start(), self.values[match.lastindex - 1]
CLOSER = 0
OPENER = 1
IGNORE = 2
class Language(object):
"... | {
"domain": "codereview.stackexchange",
"id": 499,
"lm_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, regex",
"url": null
} |
Related notes for MATH 136
Me
OR
Join OneClass
Access over 10 million pages of study
documents for 1.3 million courses.
Join to view
OR
By registering, I agree to the Terms and Privacy Policies
Just a few more details
So we can recommend you notes for your school. | {
"domain": "oneclass.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9914225158534695,
"lm_q1q2_score": 0.8578026367255422,
"lm_q2_score": 0.8652240825770432,
"openwebmath_perplexity": 1608.8702366432562,
"openwebmath_score": 0.8696692585945129,
"tags": ... |
organic-chemistry, reaction-mechanism
Title: Confused about the direction in which the bond will break
Why does the bond break in different fashion in the two cases?
For case X, a 3° carbocation is formed, bit why isn't this the scenario for case Y?
A 3° carbocation is anyday more stable than a 1° carbocation, isn't ... | {
"domain": "chemistry.stackexchange",
"id": 6584,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism",
"url": null
} |
php, object-oriented, interview-questions, game
Title: Review of object-oriented skills with War game Here are my code samples: https://github.com/arthaeus/war
This particular sample is the card game 'War'. The interviewer off-handedly asked me: "what if I wanted to play War with an Uno deck of cards?" I threw an Un... | {
"domain": "codereview.stackexchange",
"id": 4347,
"lm_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, interview-questions, game",
"url": null
} |
newtonian-mechanics, forces, rotational-dynamics, reference-frames, torque
Title: Why does an unhinged body rotate about its centre of mass? If a force is applied to a body which does not act through its centre of mass, it rotates about its centre of mass and not any other point. Why? The idea is that if there are no ... | {
"domain": "physics.stackexchange",
"id": 33315,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, forces, rotational-dynamics, reference-frames, torque",
"ur... |
equilibrium, gas-phase-chemistry
Title: How does Le Chatelier's principle apply to a gas phase reaction at constant volume? This reaction is given in my book and the direction of shift of reaction on addition of $\ce{CO}$ and removal of $\ce{CO2}$ at constant volume is asked.
$$\ce{2CO(g) + O2(g) ⇌ 2CO2(g) + \Delta H}... | {
"domain": "chemistry.stackexchange",
"id": 11587,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "equilibrium, gas-phase-chemistry",
"url": null
} |
Get: m1 >= [ (m2-f(x1)) / (a-x1) ] * (a-x1) + f(x1) = m2.
Therefore m1<=f(a)<=m2 and m2<=m1. Therefore m1=f(a)=m2. Thus both one-sided limits of f exist at x=a, and are equal (m1=m2), so the full limit exists at x=a and equals that value (which is not only m1 and m2, but also f(a)). Thus, as x->a, f(x)->f(a). Thus f is... | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808678600415,
"lm_q1q2_score": 0.816892163588228,
"lm_q2_score": 0.8333246015211009,
"openwebmath_perplexity": 3655.8830089504636,
"openwebmath_score": 0.9282341003417969,
"tag... |
quantum-mechanics, homework-and-exercises, operators, hilbert-space
where we used orthogonality and the projector identity. Also note that we do not multiply with the identity. This would be $\sum_k e^{ia_k} \sum_k |\psi_k\rangle\langle \psi_k|$, bue we only have one sum. Basically, this is just the spectral decomposi... | {
"domain": "physics.stackexchange",
"id": 20443,
"lm_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, homework-and-exercises, operators, hilbert-space",
"url": nul... |
algorithm-analysis, runtime-analysis, loops
$\mathcal{O}(x^3) + \mathcal{O}(x^3) = \mathcal{O}(x^3)$
Note that in this case we have two consecutive loops that, asymptotically speaking, do essentially the same amount of work. In reality it might be that our first loop which calculates $y$ performs some constant factor ... | {
"domain": "cs.stackexchange",
"id": 9415,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm-analysis, runtime-analysis, loops",
"url": null
} |
c++, performance, sorting, vectors
Title: C++ vector bubble sort in my edition I made a small adaptive function that sorts vector:
template<class T>
vector<T> BubbleSort(vector<T> arr, bool (*compare)(T, T)) {
const int arraySize = arr.size(); //Size of vector. Is it ok to leave it const?
//int i = 1 - to be a... | {
"domain": "codereview.stackexchange",
"id": 41553,
"lm_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, sorting, vectors",
"url": null
} |
• Nice. I wonder if its possible to give an exlicit "order of summation" that leads to, say, two. – Matthew Drury Sep 2 '16 at 20:56
• @MatthewDrury: p_i and n_i denote positive and negative numbers. Successively find p_i and n_i so that integral over [n_i , p_i] is 2+(1/i) and integral over [n_{i+1},p_i] is 2-(1/i). O... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9854964181787613,
"lm_q1q2_score": 0.823366039318171,
"lm_q2_score": 0.8354835432479663,
"openwebmath_perplexity": 475.06411975071904,
"openwebmath_score": 0.9157067537307739,
"tag... |
sexual-reproduction
So when it's not maintained -- when there's no selection pressure on two populations -- inevitably there will be genetic drift that will randomly disrupt this fine-tuned system. If a population of, say, voles is isolated on an island, they will continue to have pressure to be able to interbreed wit... | {
"domain": "biology.stackexchange",
"id": 7653,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sexual-reproduction",
"url": null
} |
thermodynamics, heat-conduction
Title: Equation for simultaneous cooling and conduction Imagine a long, uniform metal rod placed on the positive $x$-axis being heated with a power $P$ from its end at $x=0$. It is cylindrical in shape and the cross-section is a circle of radius $r$. Looking at a thin slice of the rod $... | {
"domain": "physics.stackexchange",
"id": 56650,
"lm_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, heat-conduction",
"url": null
} |
ros, frontier-exploration
Title: What is the appropriate nav config for autonomous frontier_exploration?
I have a robot that can successfully localize, navigate and reach goals submitted to the move_base package within the ROS Navigation stack. It's using ROS Hydro with Ubuntu 12.04 running on dual-core 1.6 GHz Intel... | {
"domain": "robotics.stackexchange",
"id": 19889,
"lm_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, frontier-exploration",
"url": null
} |
newtonian-mechanics, forces, rotational-dynamics
Title: Principle of transmissibility of forces I have to admit that I do not understand why the principle of transmissibility of forces works. The textbook states:
The conditions of equilibrium or of motion of a rigid body will remain unchanged if a force acting at a g... | {
"domain": "physics.stackexchange",
"id": 65174,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, forces, rotational-dynamics",
"url": null
} |
complexity-theory, np, nondeterminism, oracle-machines, relativization
What I tried was, take $A$ to be the oracle to halting problem and let $L=\{1^n | \;\exists \; \langle M,w \rangle \; \text{s.t.} \; |\langle M,w \rangle|=n \; \text{ and Turing machine M halts on w} \} $.
With this assignment I ensure $L \in NP^{... | {
"domain": "cs.stackexchange",
"id": 6120,
"lm_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, np, nondeterminism, oracle-machines, relativization",
"url": null
} |
f#, rss
<link>https://christopherjmcclellan.wordpress.com/2017/04/30/two-quick-tips-for-a-better-code-review-experience/</link>
<comments>https://christopherjmcclellan.wordpress.com/2017/04/30/two-quick-tips-for-a-better-code-review-experience/#respond</comments>
<pubDate>Sun, 30 Apr 2017 11:18:46 +000... | {
"domain": "codereview.stackexchange",
"id": 26939,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "f#, rss",
"url": null
} |
reference-request, suffix-trees
Title: Where did Don Knuth say that suffix trees were the "Algorithm of the Year 1973?" If you do a quick search for suffix trees on Google, you'll find a bunch of sources saying that Don Knuth called them the "Algorithm of the Year 1973." However, I can't seem to find a source on this.... | {
"domain": "cs.stackexchange",
"id": 11185,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reference-request, suffix-trees",
"url": null
} |
As we shall see shortly, (1) and (2) are quite weak: $A(n)$ has a much better bound, viz.
(3)
$\displaystyle A(n) \lt\frac{1}{\sqrt{3n+1}}.$
(3) supplies an edifying curiosity. By itself, it is easily proved by mathematical induction. However, its weakened version
(3')
$\displaystyle A(n) \lt\frac{1}{\sqrt{3n}},$
... | {
"domain": "cut-the-knot.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9918120881621378,
"lm_q1q2_score": 0.8131801281098597,
"lm_q2_score": 0.8198933425148213,
"openwebmath_perplexity": 804.1235084350934,
"openwebmath_score": 0.9911782741546631,
"tags... |
pcl, pointcloud
int byteIdx = 0
for(i = 0; i < depth.size();i++)
{
msg.data[byteIdx++].count = (uint8_t)(depth[i] >>0);
msg.data[byteIdx++].count = (uint8_t)(depth[i] >>8);
msg.data[byteIdx++].count = (uint8_t)(depth[i] >>16);
msg.data[byteIdx++].count = (uint8_t)(depth[i] >>24);
msg.data[byteIdx++].count =... | {
"domain": "robotics.stackexchange",
"id": 24663,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pcl, pointcloud",
"url": null
} |
organic-chemistry, reaction-mechanism, stability
what influence will kinetics have on this reaction?
Well you won't see the kinetics unless you go out of your way and look for it. Factors that influence which isomer is kinetically favored include:
statistical factors - there are 4 ring hydrogens that can be elimina... | {
"domain": "chemistry.stackexchange",
"id": 3496,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism, stability",
"url": null
} |
(10.2.4)$f(x) = \sum_{i=1}^n \alpha(x, x_i) y_i,$
where $$x$$ is the query and $$(x_i, y_i)$$ is the key-value pair. Comparing (10.2.4) and (10.2.2), the attention pooling here is a weighted average of values $$y_i$$. The attention weight $$\alpha(x, x_i)$$ in (10.2.4) is assigned to the corresponding value $$y_i$$ ba... | {
"domain": "d2l.ai",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232924970204,
"lm_q1q2_score": 0.8103003786612976,
"lm_q2_score": 0.8244619199068831,
"openwebmath_perplexity": 8879.337267077532,
"openwebmath_score": 0.6985899209976196,
"tags": null,
... |
Your exercise follows from the specialization $\,a = 8^2,\ b = 5^2,\ m = 13\,$ in the above Power Rule. More explicitly, note that we have $\,\color{#c00}{13}\mid 8^2-5^2 = (\color{#c00}{8\!+\!5})(8\!-\!5),\,$ so powering that yields
\begin{align}{\bf Divisibility\ Power\ Rule}\qquad &13\mid 8^2 - 5^2\qquad {\rm i.e.}... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822876987039989,
"lm_q1q2_score": 0.820685196942615,
"lm_q2_score": 0.8354835330070839,
"openwebmath_perplexity": 834.9521838044379,
"openwebmath_score": 0.9147459864616394,
"tags... |
c++, multithreading, vectors
/* Sequential addition of vectors */
time_point t1_seq = std::chrono::high_resolution_clock::now();
std::vector<int> sequential_result = first_vec + second_vec;
time_point t2_seq = std::chrono::high_resolution_clock::now();
auto duration_seq = std::chrono::duration_cast<std... | {
"domain": "codereview.stackexchange",
"id": 30808,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, multithreading, vectors",
"url": null
} |
quantum-field-theory, mathematical-physics, group-representations, lorentz-symmetry, poincare-symmetry
$$\langle \Omega, A\Omega \rangle =
\langle \Omega, \alpha_g(A) \Omega \rangle \tag{1}$$
for a generic element $A\in {\cal A}$ and every $g \in SO(1,3)_+\times \mathbb{R}^4$.
Using the fact that $\phi({\cal A}) \Omeg... | {
"domain": "physics.stackexchange",
"id": 79051,
"lm_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, mathematical-physics, group-representations, lorentz-symmetr... |
you know and which side you know one side, or... The measure of all the angles ) ^2+x^2= ( 5 ) ^2 by. Or radians for a variety of tests and exams unknown '' button unknown '' button to solve for all variables. Is longer or shorter than the right triangle trig calculator fill in 2 fields in the introduction x =.... Solv... | {
"domain": "menahrs.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.985496421586532,
"lm_q1q2_score": 0.8212384087397185,
"lm_q2_score": 0.8333245973817159,
"openwebmath_perplexity": 547.3451522404704,
"openwebmath_score": 0.4971844553947449,
"tags":... |
c++, numerical-methods, c++17
Title: C++ HyperLogLog Implementation I'm a scientific C programmer moving my way over to using Modern C++. I found myself needing a HyperLogLog implementation, and I wanted to use this for practice.
I plan to move a number of these functions over into an accompanying header file, but I d... | {
"domain": "codereview.stackexchange",
"id": 23301,
"lm_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++, numerical-methods, c++17",
"url": null
} |
Once you have established the general case, then you've shown it is true for any value of n.
However, except for explaining, we don't use the term "m". We just say if it is good for n can I show it is good for n + 1? Same difference.
Occasionally, starting at n = 1 is not the right thing. In special cases you might h... | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9559813501370535,
"lm_q1q2_score": 0.8339478131018261,
"lm_q2_score": 0.8723473663814338,
"openwebmath_perplexity": 534.1638370411099,
"openwebmath_score": 0.766269862651825,
"... |
matlab, audio, audio-processing
Title: BPM Detection using Matlab xcorr function Objective: Finding the BPM of a short drum loop.
Approach:
% Step 1: Get audio signal and sample rate
[audio_signal, Fs] = audioread(".\90-bpm.wav"); % Drum loop recorded at 90bpm
audio_signal = audio_signal(:,1); % Only use 1 channel
sho... | {
"domain": "dsp.stackexchange",
"id": 12190,
"lm_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, audio, audio-processing",
"url": null
} |
• I’m not with my laptop right now, so i’ll just try to comment a little bit on this beautifully written question. So, your question comes down to a question of considering a real sequence with a linear recursive relation, which is not hard to control – Paresseux Nguyen Dec 4 '20 at 16:34
• for example, for your first ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226327661524,
"lm_q1q2_score": 0.8727835070842062,
"lm_q2_score": 0.893309405344251,
"openwebmath_perplexity": 300.1484169740311,
"openwebmath_score": 0.8616529703140259,
"tags... |
quantum-mechanics, feynman-diagrams, antimatter
Title: Understanding Feynman Diagram of pair-production The below Feynman Diagram can be found on the Wikipedia page for Pair Production. I am having trouble understanding the significance of the "Z", as well as what appears to be an "X" over the start of the second phot... | {
"domain": "physics.stackexchange",
"id": 38731,
"lm_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, feynman-diagrams, antimatter",
"url": null
} |
c++, beginner, performance, algorithm, heap
Oh I get it now, we're finding the max of all the children. Also max is a very confusing function here. max to most people means std::max(), so my initial thought as that obviously first > largest at every iteration. And then I found your implementation. Let's not do it this... | {
"domain": "codereview.stackexchange",
"id": 14726,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, performance, algorithm, heap",
"url": null
} |
javascript, html
// -----------------------------PART-4-END-----------------------------------------------
</script> setAttribute? When assigning properties to elements, I'd prefer to use dot notation assignment instead of setAttribute - it's more concise and a bit easier to read and write. For example:
selectElement... | {
"domain": "codereview.stackexchange",
"id": 39382,
"lm_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",
"url": null
} |
To find the circumcenter of an acute triangle, we use the following definition of a circumcenter. The point where they intersect is the circumcenter. So, the slope of the perpendicular bisector = 1. Step 1 : The point of concurrency may be in, on or outside of a triangle. From this, two linear equations are obtained. I... | {
"domain": "ttokamsa.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211539104333,
"lm_q1q2_score": 0.8123424496367515,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 481.9983013396492,
"openwebmath_score": 0.5764424800872803,
"tags": n... |
"I think the simplest answer would be that 0 is the only non-negative real number that is less than every positive real number."
On a related statement I noticed that if we change things to less than or equal that $d(p,p')=0$ is still zero.
$$d(p,p') \leq \epsilon$$
Proof:
Assume $\forall \epsilon > 0, d(p,p') \leq... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877049262134,
"lm_q1q2_score": 0.8053711388958966,
"lm_q2_score": 0.8198933315126791,
"openwebmath_perplexity": 366.87930534882156,
"openwebmath_score": 0.8042983412742615,
"ta... |
general-relativity, differential-geometry, geometry, geodesics, de-sitter-spacetime
&\frac{d\phi}{ds} \, = \, \frac{c_0}{\cosh^2(\tau)}
\end{align}
One can plug the second equation in the first
\begin{align}
& \frac{d^2\tau}{ds^2} \, = \, -\, \cosh(\tau)\sinh(\tau)\Big(\, \frac{c_0}{\cosh^2(\tau)}\,\Big)^2 \\
&\frac{d... | {
"domain": "physics.stackexchange",
"id": 76713,
"lm_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, geometry, geodesics, de-sitter-spacetim... |
c++, file
Title: Counting repetitions in a file I've written this code to get input from a file and count the repetition of number of that file and give output to another file. How can I make this code better?
#include <iostream>
#include <cmath>
#include <fstream>
using namespace std;
int main()
{
ofstream outp... | {
"domain": "codereview.stackexchange",
"id": 4218,
"lm_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++, file",
"url": null
} |
thermodynamics, fluid-dynamics, ideal-gas, navier-stokes
Title: Dynamics of ideal gas during free expansion I would like to compute (even numerically) the time evolution of the density profile of an ideal gas which undergoes free expansion.
For concreteness, let's imagine an infinite cylinder with the axis oriented as... | {
"domain": "physics.stackexchange",
"id": 87037,
"lm_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, fluid-dynamics, ideal-gas, navier-stokes",
"url": null
} |
c++, palindrome, time-limit-exceeded
return flipDigits(high_digits) == low_digits;
}
This will check if the number is a palindrome without formatting to a string and will be faster. However we can do better by improving the algorithm.
Algorithmic improvements
I'm not going to describe the correct algorithm here as @o... | {
"domain": "codereview.stackexchange",
"id": 9794,
"lm_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++, palindrome, time-limit-exceeded",
"url": null
} |
homework-and-exercises, newtonian-mechanics, forces, spring, integration
Now substitute:
$$u=\omega^2x-g\sin \theta\tag{4}$$
$$\implies \dot{u}=\omega^2\dot{x}$$
$$\implies \ddot{u}=\omega^2\ddot{x}\implies \ddot{x}=\frac{1}{\omega^2}\ddot{u}$$
Into $(3)$ we get:
$$\frac{1}{\omega^2}\ddot{u}+u=0$$
Multiply both sides ... | {
"domain": "physics.stackexchange",
"id": 34624,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, forces, spring, integration",
"url"... |
c++, object-oriented, c++17, networking, web-services
ThreadPool::~ThreadPool() {
Exit();
for (auto &worker : threads_) {
if (worker.joinable()) {
worker.join();
}
}
}
void ThreadPool::Exit() {
exit_ = true;
cv_.notify_all();
}
} // namespace TURTLE_SERVER
#endif // SRC_INCLUDE_THREAD_POOL_... | {
"domain": "codereview.stackexchange",
"id": 44217,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, object-oriented, c++17, networking, web-services",
"url": null
} |
classical-mechanics, energy, hamiltonian-formalism, definition, hamiltonian
deep physical implications about the nature of how things work
the answers should be found in quantum mechanics, not in reformulations of classical mechanics. | {
"domain": "physics.stackexchange",
"id": 69813,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, energy, hamiltonian-formalism, definition, hamiltonian",
"u... |
special-relativity, vectors, inertial-frames
Title: Why does the wave 4-vector of a photon satisfy the Lorentz transformation equations in Special Relativity? Using robphy's answer to my initial question, I try to implement what I understand to be his suggested approach, and I get it to almost work, but I get a small ... | {
"domain": "physics.stackexchange",
"id": 87184,
"lm_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, vectors, inertial-frames",
"url": null
} |
• So my graph does not show a monotonic relationship because y does not decrease as x increase and y does increase as x increase, right?
– kaka
Jan 14 at 17:45
• @kaka I would say that there is a slight monotonically increasing relationship, but at your apparent sample size, I would not be surprised if that was not sig... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517472447607,
"lm_q1q2_score": 0.8480058481990629,
"lm_q2_score": 0.8670357683915538,
"openwebmath_perplexity": 618.3437627350324,
"openwebmath_score": 0.629274845123291,
"tags... |
waves, electromagnetic-radiation, visible-light
Title: Is high school wave peak equation accurate enough for real world? After preparing for my physics test I came across the equation for calculating peaks and valleys of light in double slit experiment - $N\lambda = dsin\theta$. But, looking at how it is proven. I'm w... | {
"domain": "physics.stackexchange",
"id": 91399,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves, electromagnetic-radiation, visible-light",
"url": null
} |
filters
Title: why do low pass and high pass filters generate a phase shift? I just learned following notation for a sine wave:
$A e^{j\phi t}$
A low passfilter and a highpass filter respectively generate a phase shift in the complex plane of the sine wave as follows:
$A e^{-j\phi t}$ and $A e^{+j\phi t}$
I don't unde... | {
"domain": "dsp.stackexchange",
"id": 6255,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters",
"url": null
} |
graph-theory, graph-colouring
Title: Coloring where all colors are present in closed neighborhood of every vertex I am interested in (proper) vertex colorings of graphs with the following condition:
for every vertex $v$ in the graph, all colors should be present in the closed neighborhood of $v$.
Is this studied in th... | {
"domain": "cstheory.stackexchange",
"id": 5077,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graph-theory, graph-colouring",
"url": null
} |
datetime, json, csv, scala, statistics
def senderMsgCount(a: Messages, senderName: String): Int = {
a.messages.count(msg => msg.senderName == senderName)
}
def dayMaxMessages(a: Messages): (LocalDate, Int) = {
a.messages
.groupBy(m => toLocalDate(m.timestamp))
.map(t => t._1 -> t._2.length)
... | {
"domain": "codereview.stackexchange",
"id": 30881,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "datetime, json, csv, scala, statistics",
"url": null
} |
\begin{align}\begin{aligned}\text{det}(A^{-1})&=\left|\begin{array}{cc}{-2}&{1}\\{3/2}&{-1/2}\end{array}\right| \\ &=1-3/2 \\ &=-1/2\end{aligned}\end{align}
It seems as though
$\text{det}(A^{-1})=\frac{1}{\text{det}(A)}.$
We end by remarking that there seems to be no connection whatsoever between the trace of a matr... | {
"domain": "libretexts.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401449874105,
"lm_q1q2_score": 0.8024877018737783,
"lm_q2_score": 0.8104789063814616,
"openwebmath_perplexity": 267.50679539035593,
"openwebmath_score": 0.9757208824157715,
"tags"... |
c++, game
return next;
}
};
With that, in Inventory.cpp, instead of:
for (int i = h_start, inv_cnt = 0; i < h_start + inv_height - spacing, inv_cnt < inventory.size(); i++, inv_cnt++) {
std::string desc = (inv_cnt == 0) ? "*" : " ";
desc += inventory[inv_cnt]->toString();
int start_offset = w_start +... | {
"domain": "codereview.stackexchange",
"id": 40467,
"lm_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++, game",
"url": null
} |
special-relativity
Title: Rearrangement of length contraction formula I have just learnt that an object appears shorter in length when viewed by an observer in relative motion with respect to the object. We can derive this with Lorentz transformation formulas, and that's where my doubt lies. If a rod is moving with ve... | {
"domain": "physics.stackexchange",
"id": 62794,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity",
"url": null
} |
optics, visible-light, vision, image-processing
From the outside, these rooms will look like different hues of yellow and blue. Entering any of these rooms, you will consider them illuminated in white.
The same will happen if you exactly reproduce a picture taken in 2700K - in an environment lit at 4000-6000K it will ... | {
"domain": "physics.stackexchange",
"id": 85503,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, visible-light, vision, image-processing",
"url": null
} |
quantum-mechanics, quantum-information, definition
Explanation 1 - Apparatus destroys the state:
What is the qualitative difference between the prepare and confirm phases of the experiment? It almost sounds like the apparatus does a setAndGet() operation on the qubit (set the value to the current orientation of the ap... | {
"domain": "physics.stackexchange",
"id": 61657,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-information, definition",
"url": null
} |
python, object-oriented, python-3.x
def print_river(self):
"""Print the river contents in human readable form
Each cell displays the animal type, strength, and gender between two pipes
Example: male bear with strength 8 |B8M|
female fish with strength 0 |F0F|
... | {
"domain": "codereview.stackexchange",
"id": 13348,
"lm_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, object-oriented, python-3.x",
"url": null
} |
compilers, type-checking, typing
statically typed: an analysis of the program allows to know the type of an entity without the need to execute it (that is what you were thinking about). That is common for languages which are compiled.
dynamically typed: value carries information about their type. Choices which need t... | {
"domain": "cs.stackexchange",
"id": 5628,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "compilers, type-checking, typing",
"url": null
} |
By definition a perfect set is closed, so to finish the argument it suffices to show that $\Bbb R$ has only $2^\omega$ closed subsets. Since there is an obvious bijection between the closed sets in $\Bbb R$ and the open sets, we need only show that there are just $2^\omega$ open sets in $\Bbb R$. $\Bbb R$ has a countab... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429624315189,
"lm_q1q2_score": 0.8039561008723473,
"lm_q2_score": 0.8175744695262775,
"openwebmath_perplexity": 89.27489953148816,
"openwebmath_score": 0.9447613954544067,
"tag... |
homework-and-exercises, electrostatics, gauss-law
Title: Flux through plane surface in hemisphere
Suppose a charge is placed at the centre of a hemispherical surface of radius $R$ then what would be the electric flux passing through the planar surface opposite to the charge in the hemisphere?
I know from gauss law th... | {
"domain": "physics.stackexchange",
"id": 20471,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electrostatics, gauss-law",
"url": null
} |
rviz, urdf, ros-kinetic
<link name="left_upper_arm_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<cylinder radius="0.0075" length="0.05"/>
</geometry>
<material name="Grey1">
<color rgba="0.9 0.9 0.9 1.0"/>
</material>
</visual>
</li... | {
"domain": "robotics.stackexchange",
"id": 30489,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rviz, urdf, ros-kinetic",
"url": null
} |
mechanical-engineering, gears
$$\omega_s = (1+R)\omega_c - R\omega_a$$
where subscripts 's','c' and 'a' refer to the sun, carrier and annulus gears. $R$ is the ratio of teeth of the annulus gear to that of the sun gear.
Now, we need a power balanced equation: power in = power out. This is where the sign convention com... | {
"domain": "engineering.stackexchange",
"id": 787,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mechanical-engineering, gears",
"url": null
} |
python, beginner, unit-testing, heap
Title: Implementing d-ary heap I'm trying to Implement a d-ary heap.
A d-ary heap is just like a regular heap but instead of two childrens to each element, there are d childrens!
d is given when building a heap, either by giving an argument or by passing it while calling init.
Here... | {
"domain": "codereview.stackexchange",
"id": 35563,
"lm_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, unit-testing, heap",
"url": null
} |
ros
Title: Rviz2 requests data ahead of system clock -> requires extrapolation into the future
This problem is similar to, but not the same as:
https://answers.ros.org/question/382207/rviz2-requests-data-ahead-of-system-clock-requires-extrapolation-into-the-future/
I am having synchronization issues in Rviz2 when try... | {
"domain": "robotics.stackexchange",
"id": 37426,
"lm_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
} |
theta. Use the Polar Grid tool to create concentric circles of a specified size and a specified number of dividers. grid(b=None, which='major', axis='both', **kwargs) [source] ¶ Configure the grid lines. Each image has a grid. In the figure, you can see that the plane is no longer a grid of rectangular coordinates; ins... | {
"domain": "paginepets.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765557865636,
"lm_q1q2_score": 0.801203825813113,
"lm_q2_score": 0.8175744828610095,
"openwebmath_perplexity": 1954.5736140711267,
"openwebmath_score": 0.5762432217597961,
"tags": ... |
c#, mysql, database
Title: C# class that handle MySQL db connection I've built a class that handles all my connections to a MySql database.
These are the function I use to create the connection(not really sure about the two dispose functions) :
public class dbConnection : IDisposable
{
public MySqlConnection conn... | {
"domain": "codereview.stackexchange",
"id": 18142,
"lm_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#, mysql, database",
"url": null
} |
dataframe
ds = pd.read_csv('desktop/python ML/loanapp_c.csv')
dataset = ds.to_dataframe()
I was running this on Azure and am now trying to do it locally. Here is the error I'm getting:
AttributeError Traceback (most recent call last)
<ipython-input-3-b49a23658806> in <module>()
32
33 ds = pd.... | {
"domain": "datascience.stackexchange",
"id": 4640,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dataframe",
"url": null
} |
ros, rviz, ros-kinetic, 2dcostmap, avoid-obstacle
costmap_common_params.yaml
footprint: [[-0.30 , 0.38], [0.70, 0.38], [0.70, -0.38], [-0.30, -0.38]]
laser_layer: #Laser
enabled: true
obstacle_range: 2.0
raytrace_range: 4.0
max_obstacle_height: 2.0
inflation_radius: 0.7
combination_method: 1
observation... | {
"domain": "robotics.stackexchange",
"id": 34569,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, rviz, ros-kinetic, 2dcostmap, avoid-obstacle",
"url": null
} |
cosmology
Title: easy or formal proof of Hawking effect ... that anyone can understand? where could i find an explanation (appart from Wikipedia) of how the Hawking's effect is obtained from quantum field theory GR and thermondynamic :D You can try this approach which is only superficially different from Wikipedia:
C... | {
"domain": "physics.stackexchange",
"id": 4527,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology",
"url": null
} |
satisfies for $0 < \Re(z) < 1$
$$\int_0^\infty f(x)x^{z-1}\,dx = \Gamma(z)F(z)$$
Therefore off the start, your function $f$ is in a weighted $L^{1}$ space (with weight $x^{-\sigma}$ (this is also part of Mellin's inversion theorem). All the odd powers disappear, meaning the function is symmetric about zero. Therefore... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429590144717,
"lm_q1q2_score": 0.806236334685911,
"lm_q2_score": 0.8198933315126791,
"openwebmath_perplexity": 351.61112378609835,
"openwebmath_score": 0.9712472558021545,
"tag... |
moveit, ros-kinetic
moving the file to the ros share directory
where did you move what file exactly?
Comment by chris annin on 2018-05-27:
I moved the AR2urdf.urdf file into opt/ros/kinetic/share directory. when you had me check rospack find AR2urdf and it could not find it I made the assumption that the urdf files ... | {
"domain": "robotics.stackexchange",
"id": 30909,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "moveit, ros-kinetic",
"url": null
} |
python, console, hangman
return response
def ask(
self,
question: str, /,
choices: ChoiceList | None = None, *,
until: OneOrManyValidators | None = None
) -> str:
r'''
Thin wrapper around :meth:`_ask`.
If ``choices`` is given, it will be inc... | {
"domain": "codereview.stackexchange",
"id": 45097,
"lm_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, console, hangman",
"url": null
} |
an output of twice... Of gas at$ 2.25, worksheets, solutions, and evaluating functions quadratic or U function! Every vertical line test more detail two graphs represent functions we get itself. Test shows there are repeating input values along the vertical line test { x } ^ { 2 +... Graph illustrates a function or not... | {
"domain": "nadv.pt",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812272562464,
"lm_q1q2_score": 0.8464399793526768,
"lm_q2_score": 0.8740772286044095,
"openwebmath_perplexity": 306.50560383109644,
"openwebmath_score": 0.6036205887794495,
"tags": n... |
ros, urdf, sdf, ros-kinetic
and for the SDF
<gazebo reference="shock">
<implicitSpringDamper>true</implicitSpringDamper>
<springStiffness>[stiffness]</springStiffness>
<springReference>[reference]</springReference>
</gazebo>
That should fill the SDF tag to generate a good shock absorber joint.
With that you wi... | {
"domain": "robotics.stackexchange",
"id": 35264,
"lm_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, urdf, sdf, ros-kinetic",
"url": null
} |
ros
and this is geotiff_mapper.launch file:
<launch>
<arg name="trajectory_source_frame_name" default="/base_link"/>
<arg name="trajectory_update_rate" default="4"/>
<arg name="trajectory_publish_rate" default="0.25"/>
<arg name="map_file_path" default="$(find hector_geotiff)/maps"/>
<arg name="map_file_base_name" def... | {
"domain": "robotics.stackexchange",
"id": 24046,
"lm_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
} |
$\theta$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $\hphantom{000}$ $2\theta$ $0$ $\dfrac{\pi}{4}$ $\dfrac{\pi}{2}$ $\dfrac{3\pi}{4}$ $\pi$ $\dfrac{5\pi}{4}$ $\dfrac{3\pi}{2}$ $\dfrac{7\pi}{4}$ $2\pi$ $y$ $\hphantom{000}$ $\hp... | {
"domain": "yoshiwarabooks.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9884918492405834,
"lm_q1q2_score": 0.8127272583619356,
"lm_q2_score": 0.822189134878876,
"openwebmath_perplexity": 440.1261558904399,
"openwebmath_score": 0.7893000841140747,
"tag... |
fluid-dynamics
Title: Are waves affected by an under-water barrier? Given a wave propagating at the surface of still water towards a barrier that is below the surface, but at a distance that is of the order of the dimensions of the wave (such as depicted in the scheme below).
How will the course of the wave be affect... | {
"domain": "physics.stackexchange",
"id": 37752,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics",
"url": null
} |
performance, powershell, active-directory
$UGM.InGroup = $Script:UGM.$ADGroup.Contains($ADUser_Properties.SamAccountName)
$Date = ([datetime]::Now).ToString('dd/MM/yyyy HH:mm:ss')
Switch ($Action) {
'Add' {
If ($UGM.InGroup) {
Write-Host "$($ADUser_Properties.Name) Already i... | {
"domain": "codereview.stackexchange",
"id": 30390,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, powershell, active-directory",
"url": null
} |
force-sensor
Title: Why is the contact force of the rigid-body robot model ks*xr? In the paper "On Dynamic Models of Robot Force Control", which is written by Steven D. Eppinger and Warren P. Seering, there is a model 'rigid-body robot model'. The model is like below.
In the paper, the model is described as:
We mod... | {
"domain": "robotics.stackexchange",
"id": 1785,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "force-sensor",
"url": null
} |
homework-and-exercises, classical-mechanics, lagrangian-formalism, approximations
Long vision: the kinetic energy of the Lagrangian explicitly is:
$$\frac{1}{2}mr^2[(2\dot\theta_1cos\theta_1-\dot\theta_2cos\theta_2)^2+(-2\dot\theta_1sin\theta_1-\dot\theta_2sin\theta_2)^2]+\frac{1}{2}mr^2\dot\theta_1^2$$
To my understa... | {
"domain": "physics.stackexchange",
"id": 46790,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, classical-mechanics, lagrangian-formalism, approximations"... |
ros, navigation, velocity, p3dx
Title: How to increase speed of passing velocity commands to p3dx
Hi all,
I am working on a project that requires me to send velocity commands to p3dx robot at a high speed. At the moment the robot takes a while (about 0.2s-0.3s) to change to a new speed once the command is given. Coul... | {
"domain": "robotics.stackexchange",
"id": 18464,
"lm_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, velocity, p3dx",
"url": null
} |
fasta, format-conversion, plink
Title: Converting aligned fasta to plink ped/bed I have an alignment of multiple sequences in a FASTA file (output from MAFFT), for which I would like to simulate a phenotype using plink, but for that I need to have my alignment in a PED file or plink BED. There's plenty online about co... | {
"domain": "bioinformatics.stackexchange",
"id": 1514,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fasta, format-conversion, plink",
"url": null
} |
special-relativity, time, time-dilation, thought-experiment
then that observer can distinguish being at rest from traveling with nonzero constant velocity.
UPDATE:
Q: What makes the photon clock special among all other clocks?
A: Simplicity.
It's easier to formulate, analyze, and interpret than other clocks.
If the pr... | {
"domain": "physics.stackexchange",
"id": 91123,
"lm_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, time, time-dilation, thought-experiment",
"url": null
} |
• Thanks. By ''generate'' I meant the group operation on the set of generators. In a group generated by the subset $S$, each element can be written in terms of the generators, which is, elements of $S$. So given the null-homotopic loop on the torus, how can it be put in relation to the elements of $S$, which in our cas... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769078156283,
"lm_q1q2_score": 0.854397576286994,
"lm_q2_score": 0.8757870029950159,
"openwebmath_perplexity": 127.92309665947778,
"openwebmath_score": 0.9218579530715942,
... |
quantum-mechanics, quantum-field-theory, gravity, neutrinos
Title: Could neutrino oscillations be due to exchange of gamma rays? I was wondering since the relativistic mass-energy of a gamma ray photon is 1.24 MeV/c^2 and the mass of an electron neutrino is < 2.2 eV/c^2 whether the oscillations between the two could, ... | {
"domain": "physics.stackexchange",
"id": 41114,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-field-theory, gravity, neutrinos",
"url": null
} |
fft, python, amplitude
all_t.append(t)
all_amp.append(fft_mag.max())
# Plot amplitude from FFT against signal length
plt.figure()
plt.plot(all_t, all_amp, 'o-')
plt.xlabel("Signal length")
plt.ylabel("Amplitude from FFT (0.25 is excepted)") | {
"domain": "dsp.stackexchange",
"id": 1815,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, python, amplitude",
"url": null
} |
Let $\Sigma_0= \{E \:|\: E\subset C\} \cup \{E\cup C^c \:|\: E\subset C \}$. It is easy to prove that $\Sigma_0$ is a $\sigma$-algebra, and for each $p\in C$, $\{p\}\in \Sigma_0$. So $$\Sigma= \sigma(\{\{p\} \:|\: p\in C\}) \subseteq \Sigma_0 \tag{2}$$
Now, note that, since $C$ is countable, $\mathbb{R}\setminus C\neq... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307653134904,
"lm_q1q2_score": 0.8085615232640455,
"lm_q2_score": 0.8311430436757313,
"openwebmath_perplexity": 159.78365755711494,
"openwebmath_score": 0.9618951678276062,
"ta... |
java, algorithm, mathematics, matrix
return clone;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
final String formatString = "%+f ";
for (int r = 0; r < getHeight(); ++r) {
for (int c = 0; c < getWidth(); ++c) {
sb... | {
"domain": "codereview.stackexchange",
"id": 12091,
"lm_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, algorithm, mathematics, matrix",
"url": null
} |
c++, datetime
int TimeOnly::GetTotalSeconds() const
{
return secondsInDay_;
}
(Note renamed GetCurrentTime() to Now() because I was getting error LNK2001: unresolved external symbol... GetTickCount(void) even though I have no GetTickCount method. Turns out winbase.h has #define GetCurrentTime() GetTickCount()) P... | {
"domain": "codereview.stackexchange",
"id": 1653,
"lm_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++, datetime",
"url": null
} |
machine-learning, classification, random-forest, svm
Title: When to use Random Forest over SVM and vice versa? When would one use Random Forest over SVM and vice versa?
I understand that cross-validation and model comparison is an important aspect of choosing a model, but here I would like to learn more about rules o... | {
"domain": "datascience.stackexchange",
"id": 10861,
"lm_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, classification, random-forest, svm",
"url": null
} |
quantum-mechanics, atomic-physics
where it reads
$$
\Delta E_\mathrm{Bethe}
= \frac{m_e}{m_p} \frac{ 4Z^3 \alpha^2 g_N }{n^3 (2l+1)(j+1)}
\mathrm{Ry}
\begin{Bmatrix}
I+\frac{1}{2}\text{ if}\ j\leq I \\
\frac{I(j+\frac{1}{2})}{j}\text{ if}\ j\geq I
\end{Bmatrix} ,
\tag 3
$$
where
$$\mathrm{Ry} = hc R_\infty
= \fr... | {
"domain": "physics.stackexchange",
"id": 31289,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, atomic-physics",
"url": null
} |
First way: Using the Extended Euclidean Algorithm in $$\Bbb Q[x]$$.
Notice that $$\begin{equation*} 15 = 4(3n^2+4n+5) - (6n+5)(2n+1). \end{equation*}$$ Hence, if $$2n+1$$ divides $$3n^2+4n+5$$, then it also divides $$15$$. Thus, $$2n+1 \in \{\pm 1, \pm 3, \pm 5, \pm 15\}$$, i.e., $$\begin{equation*} n \in \{-8,-3,-2,-... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668723123672,
"lm_q1q2_score": 0.8239191506354255,
"lm_q2_score": 0.8397339676722393,
"openwebmath_perplexity": 444.58254046499366,
"openwebmath_score": 0.9984487891197205,
"ta... |
java, tree, file-system, swing, gui
public int getRowCount() {
return files.length;
}
public File getFile(int row) {
return files[row];
}
public void setFiles(File[] files) {
this.files = files;
fireTableDataChanged();
}
}
/** A TreeCellRenderer for a File. */
cla... | {
"domain": "codereview.stackexchange",
"id": 3822,
"lm_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, tree, file-system, swing, gui",
"url": null
} |
In any case, the problem collapses if you read $-4\cdot10^{50}$ as $-(4\cdot10^{50})$. The expression inside the parentheses is a valid number written in the scientific notation, and there is no reason to forbid taking the opposite. (Though the whole expression itself cannot be called a "number written in the scientifi... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9553191297273498,
"lm_q1q2_score": 0.8001943686052388,
"lm_q2_score": 0.8376199572530449,
"openwebmath_perplexity": 385.2920298433696,
"openwebmath_score": 0.8115248084068298,
"tag... |
Likewise, if $$n=2$$, then equality happens. This is because if $$n=2$$, the group $$G$$ is non-trivial, and so it has $$2 = 2^{2-1}$$ normal subgroups: itself and the identity subgroup.
I claim that these are the only cases where equality is achieved.
Suppose $$G$$ is a group with $$n$$ conjugacy classes with $$n\ge... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.8014873538664153,
"lm_q2_score": 0.822189121808099,
"openwebmath_perplexity": 66.85845724623948,
"openwebmath_score": 0.9564722180366516,
"tags... |
html, css
.image img {
display: none;
}
.focus-box ul {
list-style-type: none;
margin: 0;
padding: 0;
text-indent: 0;
}
.focus-box li {
margin-bottom: 10px
}
.focus-box li:before {
content: "- ";
}
/* ===============
ALL: IE Fixes
=============== */
.ie7 .logo {
padding-to... | {
"domain": "codereview.stackexchange",
"id": 6134,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "html, css",
"url": null
} |
algorithm, c, mathematics
Results:
[INTERNAL] [Tue May 9 22:04:28 202] : Started Logger Session
[INFO] [Tue May 9 22:04:28 202] : Testing NDIM AABB Subdivision
[INFO] [Tue May 9 22:04:28 202] : For 1D
{(0.000000) -> (0.500000)}
{(0.500000) -> (1.000000)}
[INFO] [Tue May 9 22:04:28 202] : Time taken: 0.000002 (1D)
... | {
"domain": "codereview.stackexchange",
"id": 44656,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm, c, mathematics",
"url": null
} |
bond
Title: Is energy required to form bonds [phase change] My question is if any energy is required to form bonds, for instance when there is a phase change?
If I am correct, energy might be required in the beginning, to make the reaction start and then release a bigger amount of energy than it was putted in. However... | {
"domain": "chemistry.stackexchange",
"id": 457,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond",
"url": null
} |
c++, beginner, object-oriented, design-patterns
void System::deleteMember( Member &m ) {
for ( auto mPtr = members.begin(); mPtr != members.end(); ++mPtr ) {
if ( *mPtr == m ) {
members.erase( mPtr );
std::cout << "Deleted member: { Name: " << m.name << ", Library Number: " << m.get... | {
"domain": "codereview.stackexchange",
"id": 39645,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, object-oriented, design-patterns",
"url": null
} |
molecular-biology, lab-techniques
Title: Common Errors For Low R Value in Bradford Assay I've recently started doing Bradford Assays for my samples and my standard curve has been non-linear and I have been getting low R values (.90-.95). I initially thought the error was in pipetting, most likely in adding BSA while e... | {
"domain": "biology.stackexchange",
"id": 5740,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, lab-techniques",
"url": null
} |
keras, r
``` # also don't forget to identify the target variable (we can use one for training and test)
trainingtarget <- as.numeric(as.factor(RES_train[,1])) # includes the dependent variable status for the training data
y_trainingtarget<-trainingtarget-1
testtarget <- as.numeric(as.factor(RES_test[,1]))
y_testtarg... | {
"domain": "datascience.stackexchange",
"id": 9625,
"lm_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",
"url": null
} |
electromagnetism, waves, electromagnetic-radiation, symmetry
$$k^\mu k_\mu = 0.$$
When you expand this equation, you find
$$\omega^2 = \mathbf{k}^2$$
which gives $\omega = |\mathbf{k}|$, as you found. | {
"domain": "physics.stackexchange",
"id": 33117,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, waves, electromagnetic-radiation, symmetry",
"url": null
} |
python, python-3.x
for line in batch:
print(line)
The entire set of arguments is generated from flags at the command line so I generate a Namespace of these args. I imagine there's a much cleaner way to pass all these arguments through the stack of this application?
Thanks in advance to anyone willing to hel... | {
"domain": "codereview.stackexchange",
"id": 39894,
"lm_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
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.