text stringlengths 1 1.11k | source dict |
|---|---|
python, beginner, object-oriented, ftp
Title: Multiple server FTP download class I've written this a short time ago. Do you see anywhere I can improve my logic? This is my first python script.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from ftplib import FTP # ftplib comes with the py install
class Ftp:
... | {
"domain": "codereview.stackexchange",
"id": 16447,
"lm_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, ftp",
"url": null
} |
fluid-dynamics, conservation-laws, flow
From the above illustration, it is clear that mass flow rate $q$ is a scalar field that depends on time and space coordinates. The problem is, I found in literature that the mass flow rate is always dependent only on time, and it is defined as:
$$q(t) = {dm(t) \over dt} \tag 1$$... | {
"domain": "physics.stackexchange",
"id": 95734,
"lm_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, conservation-laws, flow",
"url": null
} |
# True or False: $(A-B)(A+B)=A^2-B^2$ for Matrices $A$ and $B$
## Problem 96
Let $A$ and $B$ be $2\times 2$ matrices.
Prove or find a counterexample for the statement that $(A-B)(A+B)=A^2-B^2$.
## Hint.
In general, matrix multiplication is not commutative: $AB$ and $BA$ might be different.
## Solution.
Let us ca... | {
"domain": "yutsumura.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130567217291,
"lm_q1q2_score": 0.8176287542591868,
"lm_q2_score": 0.8267117898012105,
"openwebmath_perplexity": 356.5174882751849,
"openwebmath_score": 0.8592660427093506,
"tags": ... |
terminology, data-structures, trees
Title: Which all nodes will qualify as an ancestor? I was going through the fundamentals of tree structure and the definition for ancestor is as follows:
A node u is an ancestor of v if there is a path from u to v. | {
"domain": "cs.stackexchange",
"id": 4976,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "terminology, data-structures, trees",
"url": null
} |
c#, unit-testing, linq, assertions
A good test should be very clear when it fails. In this case the name of your test is AssertTooltipFieldMatchesExpectedText. If that fails you need to figure out what exactly failed in that test. In other words, you have multiple things you are testing and this is why you have multip... | {
"domain": "codereview.stackexchange",
"id": 24653,
"lm_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#, unit-testing, linq, assertions",
"url": null
} |
electromagnetism, electromagnetic-radiation
$$
\mathcal{P}_{\infty}\left(t\right) = \lim_{\mathcal{R}\to\infty} P\left(\mathcal{R},t + \frac {\mathcal{R}} {c}\right) \\
\mathcal{P}_{\delta}\left(\mathcal{R},t\right) = P\left(\mathcal{R},t + \frac {\mathcal{R}} {c}\right) -
\mathcal{P}_{\infty}\left(t\right)
$$
... ca... | {
"domain": "physics.stackexchange",
"id": 8925,
"lm_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, electromagnetic-radiation",
"url": null
} |
• Numerically, you should be able to get the first few digits by computing the intersection of the nth roots of intervals of the right parity, establishing that such a number is either less than sqrt 3 or larger than sqrt 10. After enough initial computation, you may be able to use dynamics of the functions x^(1+1/n) t... | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974821157567904,
"lm_q1q2_score": 0.8058961543139566,
"lm_q2_score": 0.8267118004748677,
"openwebmath_perplexity": 701.4671369965163,
"openwebmath_score": 0.6997228860855103,
"tags"... |
newtonian-mechanics, newtonian-gravity, planets, density
$$ \frac{dg}{dr}=\frac{G}{r^2}\left(\frac{dM}{dr}-\frac{2M} r \right)=0$$
or:
$$\frac{dM}{dr} = \frac{2M} r $$
The LHS is the surface area times the local density:
$$\frac{dM}{dr} = 4\pi r^2\rho(r)$$
Meanwhile, on the RHS, the mass is the volume times the averag... | {
"domain": "physics.stackexchange",
"id": 80254,
"lm_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, newtonian-gravity, planets, density",
"url": null
} |
Without loss of generality, you can assume that $n$ and $k$ are coprime, hence that $\gcd(n,k)=1$, because this neither changes the value of $\frac{n}{k}$ nor of $\frac{\mathrm{lcm} (n,k)}{\gcd (n,k)}$. Note that this last fraction is indeed nothing else than the product of the "not-common factors" of $n$ and $k$ (in p... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9934102283369194,
"lm_q1q2_score": 0.8212639499959078,
"lm_q2_score": 0.8267117919359419,
"openwebmath_perplexity": 68.15146148565934,
"openwebmath_score": 0.9172975420951843,
"tag... |
I then became stuck, and wondered if my approach to the entire problem was wrong. Is there a better way to solve this problem? Any input greatly appreciated. Thanks!
• – Bram28 Jan 2 '18 at 22:07
• @Bram28 thanks for the quick reply. I see how that applies to the individual events of crossing the vertical and crossing... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808724687407,
"lm_q1q2_score": 0.8618107540743348,
"lm_q2_score": 0.8791467611766711,
"openwebmath_perplexity": 346.62857863666494,
"openwebmath_score": 0.7380909323692322,
"ta... |
php, sql, mysqli, sql-injection
//Acquire POST values Please note: Sanity checks will be added for these =)
$myusername = $_POST["username"];
$mypassword = $_POST["password"];
// Preparing the statement
$stmt = $connection-> prepare("SELECT username, password FROM $tbl_name WHERE username= ? ");
$stmt -> bind_param... | {
"domain": "codereview.stackexchange",
"id": 28540,
"lm_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, sql, mysqli, sql-injection",
"url": null
} |
The Math.PI property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159: Math.PI = π ≈ 3.14159 \mathtt{\mi{Math.PI}} = \pi \approx 3.14159 The source for this interactive example is stored in a GitHub repository. which we calculate first). A correlation of zero indicates that b... | {
"domain": "driveyourself.nl",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9736446440948805,
"lm_q1q2_score": 0.8049235188208602,
"lm_q2_score": 0.8267118026095991,
"openwebmath_perplexity": 1763.0172602945775,
"openwebmath_score": 0.4765132963657379,
... |
$$|\langle x,y \rangle|=\|x\| \cdot \|y\|$$. Thus, it has to be that $$4r^2-4 \langle x,x \rangle \cdot \langle y,y \rangle = 0$$ But discriminant being $$0$$ implies that there exists $$t$$ such that $$\langle x,x \rangle -2tr +|\lambda|^2 \langle y,y \rangle=0$$ Choose that $$t$$. Then for $$\lambda=te^{i \theta}$$, ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517469248845,
"lm_q1q2_score": 0.8213032701112073,
"lm_q2_score": 0.839733963661418,
"openwebmath_perplexity": 379.404400754167,
"openwebmath_score": 0.9951126575469971,
"tags"... |
physical-chemistry, titration
The reason is in the words "...to reach the first endpoint".
An n-protic acid, has exactly n equivalent points. This means for your titration, that you need one base equivalent to reach the first equivalent point (EP) and two base equivalents to reach the second EP. As you are given the ... | {
"domain": "chemistry.stackexchange",
"id": 4215,
"lm_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, titration",
"url": null
} |
# Spanning set definition and theorem
I need a bit of clarification in regards to the spanning set. I am confused between the definition and the theorem.
Definition of Spanning Set of a Vector Space: Let $S = \{v_1, v_2,...v_n\}$ be a subset of a vector space $V$. The set is called a spanning set of $V$ if every vect... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8414378635533395,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 65.5530686794717,
"openwebmath_score": 0.8710094094276428,
"tags"... |
c++, computational-geometry
// computes distance between the two points
double distance(point_pair const& a);
point_pair get_closest_points(line_segment const& a, line_segment const& b)
{
auto const intersect = intersection(extension(a), extension(b));
if(line_segment::valid(intersect.a) && line_segment:... | {
"domain": "codereview.stackexchange",
"id": 43988,
"lm_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++, computational-geometry",
"url": null
} |
The answer can easily be seen with this reasoning: there are p students and k prizes, so the total number of ways the prizes can be distributed is $p^k$ (for each of $k$ prizes, there are $p$ different students to whom it can be given). However, with the added constraint that no student can receive every prize, we must... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357597935574,
"lm_q1q2_score": 0.8158545844048744,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 493.8370155467521,
"openwebmath_score": 0.7199772000312805,
"tag... |
ros, c++, serial, frequency
Originally posted by dornhege with karma: 31395 on 2013-01-09
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 12323,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, c++, serial, frequency",
"url": null
} |
friction, everyday-life
Extrapolating, $F_n \approx (a+1)^n T_1 \gg T_1$.
You can do this experiment at home. Select a length of fine sturdy string, perhaps a length of dental floss. Tie a small weight of which you have several to supply the initial tension on the string, for instance, a pen. Tie the other end to a pa... | {
"domain": "physics.stackexchange",
"id": 86192,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "friction, everyday-life",
"url": null
} |
java, beginner, homework, roman-numerals
}
}
//Print line outside of all conditions
System.out.println("");
keepGoing = false ;
}
}
} Control structure formatting | {
"domain": "codereview.stackexchange",
"id": 32893,
"lm_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, beginner, homework, roman-numerals",
"url": null
} |
forces, centripetal-force
These formulas are not general formulas but only apply for the specific case of uniform circular motion. While $\vec{r} = \cos(t) \hat{i} + \sin(t) \hat{j}$ is uniform circular motion $\vec{R} = \cos(t) \hat{i} + (\sin(t)+t) \hat{j}$ is not. Therefore, the equations for uniform circular motio... | {
"domain": "physics.stackexchange",
"id": 77493,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, centripetal-force",
"url": null
} |
wavefunction, schroedinger-equation, randomness, anderson-localization
Title: Anderson localization in the continuum case I haven't looked into Anderson localization before. A quick review of the available information gives the impression that this phenomenon has mainly been studied for the case of a discrete random S... | {
"domain": "physics.stackexchange",
"id": 99532,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wavefunction, schroedinger-equation, randomness, anderson-localization",
"url": ... |
ros, gazebo, gazebo-plugin, make
"gazebo::common::Time::Time()", referenced from:
gazebo::VelodynePlugin::VelodynePlugin() in velodyne_plugin.cc.o
"gazebo::common::Time::~Time()", referenced from:
gazebo::VelodynePlugin::Load(boost::shared_ptr<gazebo::physics::Model>, std::__1::shared_ptr<sdf::Element>) ... | {
"domain": "robotics.stackexchange",
"id": 24847,
"lm_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, gazebo, gazebo-plugin, make",
"url": null
} |
performance
There is also a green500 list that measures the MFLOPS/Watt of systems while solving the Linpack benchmark. The difference between the top system and the 500th system on that list (from last November) is a factor of 75x.
Most people agree that there is a lot more that you want from a supercomputer in addi... | {
"domain": "cs.stackexchange",
"id": 1520,
"lm_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",
"url": null
} |
c#, algorithm, programming-challenge, time-limit-exceeded
That should be faster already, but not by an order of magnitude at all, since you're still facing a nested loop logic.
The problem constraints on N are such that there are many possible combinations, and building a lookup table seems impractical.
However, you'r... | {
"domain": "codereview.stackexchange",
"id": 21432,
"lm_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, programming-challenge, time-limit-exceeded",
"url": null
} |
javascript
switch (documtype) {
case "students":
var studarray = [0.8,0.6,0.5,0.45,0.4];
fixUnitPrice(studarray);
break;
case "academicians":
var acadarray = [1.0,0.7,0.6,0.5,0.45];
fixUnitPrice(acadarray);
break;
case "professionals":
var profarray = [1.2,0.... | {
"domain": "codereview.stackexchange",
"id": 2508,
"lm_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",
"url": null
} |
Difference between revisions of "2019 AMC 10B Problems/Problem 21"
Problem
Debra flips a fair coin repeatedly, keeping track of how many heads and how many tails she has seen in total, until she gets either two heads in a row or two tails in a row, at which point she stops flipping. What is the probability that she g... | {
"domain": "artofproblemsolving.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98998642789963,
"lm_q1q2_score": 0.8070691044854363,
"lm_q2_score": 0.8152324938410784,
"openwebmath_perplexity": 856.7904235246577,
"openwebmath_score": 0.711918830871582,
"... |
ros, c++, ros-melodic, nodehandle
Title: Using NodeHandle in callback
Hello, I am making an initialization node for AHRS and I'm trying to get the initial bias of gyroscope by averaging the first 1000 readings that I get. I need to advertise the service only after I have received the correct amount of data points, bu... | {
"domain": "robotics.stackexchange",
"id": 35309,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, c++, ros-melodic, nodehandle",
"url": null
} |
You can also add several infinities in both directions. The maximal compactification (the most infinities you can consistently add) is the Stone–Čech compactification which is horribly large: there are more infinities than real numbers. The infinity can somehow branch in a peculiar way, but I will not go any deeper her... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877692486436,
"lm_q1q2_score": 0.8130674556534607,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 529.4512706403394,
"openwebmath_score": 0.809607207775116,
"tags... |
visible-light, double-slit-experiment, vision, intensity
Title: Light Intensity vs Visibility/Brightness in Double/Single Slit Patterns? I am curious about something that doesn't seem to be pointed out very much.
This is the double-slit intensity pattern as a graph:
This is what you're supposed to see in real-life: | {
"domain": "physics.stackexchange",
"id": 40154,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "visible-light, double-slit-experiment, vision, intensity",
"url": null
} |
rosdep, update, ros-fuerte, rospkg, roscore
Sorry for the repeated posts. The easy_install solution seems to have worked. Is there a reason to prefer one solution over another? Thanks for the help
Comment by Lorenz on 2012-06-28:
On a freshly installed Ubuntu, the package that provides rospkg is python-rospkg, no ea... | {
"domain": "robotics.stackexchange",
"id": 9963,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosdep, update, ros-fuerte, rospkg, roscore",
"url": null
} |
wavelet, cwt, ssqueezepy
wavelet = ('morlet', {'mu': 5})
f, N = 12, 512
x = cos_f([f], N=N)
Wx, scales, *_ = cwt(x, wavelet,fs=N)
imshow(Wx, abs=1, yticks=scales, title="f=%d, N=%d" % (f, N), show=1,
cmap='jet') Note yticks=scales. You need frequencies. Regarding the boundary effect, back then I didn't bother... | {
"domain": "dsp.stackexchange",
"id": 11254,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wavelet, cwt, ssqueezepy",
"url": null
} |
ros, topic
for example, trying to find the realtime video port
username@robot:~$ rostopic info /ladybug_server/realtime_video
Type: ladybug/ladybugRealtimeVideo
Publishers:
* /ladybug_server (http://robot:59560/)
Subscribers:
* /ladybug_viewer (http://10.42.43.237:49643/) | {
"domain": "robotics.stackexchange",
"id": 7794,
"lm_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, topic",
"url": null
} |
quantum-mechanics, quantum-field-theory, particle-physics, quantum-electrodynamics, identical-particles
Title: Can two bosons be called identical although their momenta are different? In my introductory book of Quantum Field Theory says that because of the conmutation of the creation operators for a two particles sist... | {
"domain": "physics.stackexchange",
"id": 42984,
"lm_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, particle-physics, quantum-electrodynamics... |
material-science
IF you still have more than enough energy, then move onto part d.
d) Figure out how much energy is needed to split protons into quarks, LOL. And see if you still have enough energy left. This is kinda overkill. Again, don't know how to do this. Sorry.
So if you figured out how much energy is needed to... | {
"domain": "physics.stackexchange",
"id": 1173,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "material-science",
"url": null
} |
quantum-mechanics, wavefunction, bosons
Title: Calculating the probability to find two bosons at the same place I want to calculate the probability to find two bosons at the same place.
Let the bosonic wave function be
$$\Psi_B(x_1,x_2)=\frac{1}{\sqrt{2}}\left(\Psi_1(x_1)\Psi_2(x_2)+\Psi_2(x_1)\Psi_1(x_2)\right).$$
T... | {
"domain": "physics.stackexchange",
"id": 42077,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, wavefunction, bosons",
"url": null
} |
This also works in any triangle: c² = a² + b² - 2abcosC which can also be written as: a² = b² + c² - 2bccosA. The proof for angle A being acute is given. Cosine rule can be proved using Pythagorean theorem under different cases for obtuse and acute angles. The Cosine Rule is applied to find the sides and angles of tria... | {
"domain": "fhgroupaccommodations.nl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399051935107,
"lm_q1q2_score": 0.8085247743428599,
"lm_q2_score": 0.8333245932423308,
"openwebmath_perplexity": 653.2360452017738,
"openwebmath_score": 0.8205244541168213,... |
electromagnetism
However for the complete copper ring there is a complete electrical circuit and so a significant induced current will flow which will produce an upward force.
Thus the net downward force on that ring will be less than that for the other two rings and so it will have a smaller downward acceleration and... | {
"domain": "physics.stackexchange",
"id": 30238,
"lm_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
} |
quantum-mechanics, solid-state-physics, semiconductor-physics, electronic-band-theory, density-functional-theory
Title: Understanding electronic band structure diagrams Currently I'm trying to understand electronic band structures such as depicted below:
band structure http://ej.iop.org/images/1367-2630/14/3/033045/Fu... | {
"domain": "physics.stackexchange",
"id": 21544,
"lm_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, semiconductor-physics, electronic-band-the... |
But I don't know how to generalize this.
• You can ignore the green balls, they have nothing to do with anything; drawing a green is just a delay. And never mind drawing one at a time; the question is about the first $r$ balls you get (not counting greens of course). The question is, if you draw $r$ balls from a box c... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226314280634,
"lm_q1q2_score": 0.8224827071427835,
"lm_q2_score": 0.8418256452674009,
"openwebmath_perplexity": 225.62801981396782,
"openwebmath_score": 0.8428834676742554,
"ta... |
ros, navigation, rviz, ros-melodic, gmapping
Title: Occupancy grid not displaying in Rviz
I have a custom model which I created from my xacro files and I can move around using a teleop node. BUT I now want to map a virtual room and I added the AMCL and Gmapping nodes to my launch file but I notice a number of things ... | {
"domain": "robotics.stackexchange",
"id": 36032,
"lm_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, rviz, ros-melodic, gmapping",
"url": null
} |
14. waterineyes
@Mimi_x3 it is good if you think deriving them is easy and you can derive them... Excellent..
15. waterineyes
Welcome @manita11 ..
16. knock
It might be a good idea to copy the link in your profile so we can found this tutorial easier some time later @waterineyes, what do you think?
17. slaaibak
... | {
"domain": "openstudy.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9637799399736476,
"lm_q1q2_score": 0.8010389947588571,
"lm_q2_score": 0.831143045767024,
"openwebmath_perplexity": 1761.728974229203,
"openwebmath_score": 0.8592246770858765,
"tags": n... |
decimation
I have a test sequence(1x1000)sampled at 176.4 KHz(example) and I need to decimate it to let's say 44.1KHz. (the maximum frequency component in the sequence is 20KHz, I am taking examples from audio freqs).
The way I understand decimation is, any sequence with sample rate Fs is decimated to Fsd(=Fs/D) ... ... | {
"domain": "dsp.stackexchange",
"id": 7624,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "decimation",
"url": null
} |
performance, excel, vbscript
Set objFile2 = objExcel.Workbooks.Open(file2)
objFile2Count = objFile2.Worksheets.count
End if
'sheet should be same
if objFile1Count <> objFile2Count then
ErrCount = 1
End if
' Loop through the sheets
if ErrCount <> 1 then
For cnt = 1 to objFile1.Sheets.count
Set ... | {
"domain": "codereview.stackexchange",
"id": 26307,
"lm_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, excel, vbscript",
"url": null
} |
quantum-gate
Title: Why are oracles Hermitian by construction? $\newcommand{\qr}[1]{|#1\rangle}$In this lecture, it is nicely explained how to define an operator that computes a function $f(x)$. I know how to implement such operators. (We just define $O\qr{x}\qr{y} = \qr{x}\qr{y \oplus f(x)}$.)
However, it it said i... | {
"domain": "quantumcomputing.stackexchange",
"id": 433,
"lm_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-gate",
"url": null
} |
gazebo, navigation, lidar, odometry, ros-kinetic
Originally posted by Humpelstilzchen with karma: 1504 on 2018-02-28
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by cmfuhrman on 2018-02-28:
You are definitely right! I also think that the left and right wheels were on the wrong... | {
"domain": "robotics.stackexchange",
"id": 30154,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo, navigation, lidar, odometry, ros-kinetic",
"url": null
} |
pcl, pointcloud
Title: PointCloud2 access data
I have a PointCloud2 topic and I need to access the x, y and z of the points.
I have found: pcl::PointCloudpcl::PointXYZRGB::ConstPtr
The problem is that I don't know how to use it.
Do you know where can I find some example code describing how to get coordinates in PCL2?... | {
"domain": "robotics.stackexchange",
"id": 19190,
"lm_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
} |
Here is another: $\{(0,1/2), (1/3,1)\}$.
Here is an infinite cover which admits a finite subcover $\{(0,1), (0,1/2), \ldots, (0,1/n) , \ldots \}$.
Hopefully these examples help to clarify what the definition of compactness in terms of finite subcovers is about.
• Why isn't the cover $U_n$ an example that shows that ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138177076645,
"lm_q1q2_score": 0.8126200362486814,
"lm_q2_score": 0.8311430415844384,
"openwebmath_perplexity": 130.88308437717964,
"openwebmath_score": 0.8891904354095459,
"ta... |
reinforcement-learning, q-learning, python, intelligent-agent, state-spaces
blue agent, then it can do the same move as the blue agent, without the blue agent losing any energy, but if the grey agent ends up working for the red agent, it can do the same move as the red agent, without the red agent having the chance of... | {
"domain": "ai.stackexchange",
"id": 3529,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning, q-learning, python, intelligent-agent, state-spaces",
"url": n... |
homework-and-exercises, electromagnetism, magnetic-fields, torque, induction
When a system is in dynamic equilibrium, any change in the status quo prompts an opposing reaction from the system. | {
"domain": "physics.stackexchange",
"id": 32808,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism, magnetic-fields, torque, induction",
"... |
So, you just need to find the normalized vector $$c$$ such that $$c^T\Sigma c$$ is as large as possible. This is $$c$$ = the eigenvector corresponding to the largest eigenvalue of $$\Sigma$$. To see this, take the eigenvalue decomposition $$\Sigma = PD P^T$$ where $$P = (p_1,...,p_n)$$ and $$D = \mathrm{diag}(d_1,...,d... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018376422666,
"lm_q1q2_score": 0.8083826553497624,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 97.37810620395724,
"openwebmath_score": 0.9623891711235046,
"tag... |
special-relativity, group-representations, conventions, spinors, lorentz-symmetry
$$
\delta \chi_{\alpha} = \frac{1}{2} \omega_{\mu\nu} (\sigma^{\mu\nu})_{\alpha}{}^\beta \chi_\beta
$$
and
$$
\delta \psi^{\dot \alpha} = \frac{1}{2} \omega_{\mu\nu}( {\overline\sigma}^{\mu\nu} )^{\dot \alpha}{}_{\dot \beta} \psi^{\d... | {
"domain": "physics.stackexchange",
"id": 26097,
"lm_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, group-representations, conventions, spinors, lorentz-symmetry"... |
mechanical-engineering, applied-mechanics, energy
In your particular example, $P = \vec{T}\cdot \vec\omega$ is a simple dot product so the only thing that matters about the sign is that they have the same direction.
When the Torque and the angular velocity are in the same direction then the member will rotationally a... | {
"domain": "engineering.stackexchange",
"id": 4468,
"lm_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, applied-mechanics, energy",
"url": null
} |
java, object-oriented, xml
The actual loop body would belong in its own method, in order to respect the level of abstraction of parseDocument: good code that is easy to read and to maintain, is written in methods that have a consistent level of abstraction: the implementation details of exactly how the loop operates w... | {
"domain": "codereview.stackexchange",
"id": 17243,
"lm_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, object-oriented, xml",
"url": null
} |
g[x, y] (* 1 *)
StrictFunctionDomain[g[x, y], {x, y}] (* x != 0 && x - y != 0 *)
It'll work also for function Composition from previous OP's question:
(f@*f)[x] (* x *)
StrictFunctionDomain[(f@*f)[x], x] (* x < 0 || x > 0 *)
Possible Issues
Using dynamic scoping (Block-like constructs) to change behavior of, as f... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.933430812881347,
"lm_q1q2_score": 0.8109896776563386,
"lm_q2_score": 0.8688267694452331,
"openwebmath_perplexity": 12098.340642176889,
"openwebmath_score": 0.33111491799354553,
"ta... |
gravity, cosmology, space-expansion, measurements, galaxies
But there are some tricks astronomers use to try and do better. It helps if you have a redshift independent measure of the distance to the galaxies, but beyond the local Universe only SNIa luminosity tends to be any use, and you'd need to be uncommonly lucky ... | {
"domain": "physics.stackexchange",
"id": 16114,
"lm_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, cosmology, space-expansion, measurements, galaxies",
"url": null
} |
ruby, datetime, ruby-on-rails
The method is called like this:
<%= calendar(Date.today).html_safe %>
Here is an example calendar:
However, I think that my code is not very DRY and the method is unnecessarily longer than what it should be. I agree that it is too long. I find a good place to start is to try breaking i... | {
"domain": "codereview.stackexchange",
"id": 25165,
"lm_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, datetime, ruby-on-rails",
"url": null
} |
algorithm-analysis, runtime-analysis, knapsack-problems
Anyway, the time depends entirely on the data. If all the items are in size between capacity/2 and capacity then it's $O (n^2)$ (could be $O (n)$ with improvements described earlier). If any item has weight 0, then your algorithm never ends; you should check that... | {
"domain": "cs.stackexchange",
"id": 7169,
"lm_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, knapsack-problems",
"url": null
} |
## Roteiros
### Populações
en:ecovirt:roteiro:pop_str:pstr_mtr
# Population matrix models - Tutorial in R
## Leslie/Lefkovitch Matrices
The growth of a population with an age structure can the projected using matrix algebra. Leslie matrices have the information about birth and death rates of different age classes ... | {
"domain": "usp.br",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232924970204,
"lm_q1q2_score": 0.8058102635736423,
"lm_q2_score": 0.8198933315126791,
"openwebmath_perplexity": 1391.6036752092082,
"openwebmath_score": 0.6301097869873047,
"tags": null,
... |
waves, acoustics, harmonic-oscillator, string, vibrations
Title: How do the amplitudes of longitudinal wave harmonics in a string vary with excitation (pluck) position? A very good explanation for the amplitudes expected for each harmonic of an ideal string with a transverse excitation is included here.
The final equa... | {
"domain": "physics.stackexchange",
"id": 99232,
"lm_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, acoustics, harmonic-oscillator, string, vibrations",
"url": null
} |
want to gain a practical knowledge of modern computational techniques for the numerical solution of linear algebra problems, using MATLAB as the vehicle for computation. Yi Zhang Syllabus: Textbook: Gilbert Strang, Introduction to Linear Algebra, Fifth Edition, Wellesley-Cambridge Press, 2017. Offered: jointly with AMA... | {
"domain": "projectxitalia.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771782476948,
"lm_q1q2_score": 0.8223056988533766,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 872.5357602429608,
"openwebmath_score": 0.4449801445007324,
"tag... |
physical-chemistry, electrochemistry, redox
Accordingly, tabulated data is chosen to be at $\pu{298.15 K}$ for the convenience. This is also beneficial that the most common reference electrode is the Standard Hydrogen Electrode (SHE) for the solvent water:
$$\ce{2H+_{(aq)} + 2e- <=> H2_{(g)}} \tag1$$
$E^\circ_{(\ce{H+... | {
"domain": "chemistry.stackexchange",
"id": 14002,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, electrochemistry, redox",
"url": null
} |
python, object-oriented, meta-programming
`__all_slots__` is a set that contains all unique slots of a class,
including the ones that are inherited from parents.
"""
def __init__(cls, name, bases, dictionary):
super(MetaSlotMachine, cls).__init__(name, bases, dictionary)
slots_iterator = ... | {
"domain": "codereview.stackexchange",
"id": 12840,
"lm_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, meta-programming",
"url": null
} |
c#, winforms, active-directory
}
MessageBox.Show("All (" + count + ") users with groups saved to file " + filename);
}
catch (Exception e)
{
ShowException(e);
}
return true;
}
} "Backend" is a compound word and thus the correct capitalization should b... | {
"domain": "codereview.stackexchange",
"id": 20091,
"lm_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#, winforms, active-directory",
"url": null
} |
structural-engineering, civil-engineering, design, structural-analysis
If you need to use hollow core slabs in this situation there are potentially a few ways this could be achieved, for example: breaking out part of the hollow-core slab, adding the additional reinforcement then casting new concrete to fill the space;... | {
"domain": "engineering.stackexchange",
"id": 1495,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "structural-engineering, civil-engineering, design, structural-analysis",
"url... |
kinematics, data-analysis
import numpy as np
import matplotlib.pyplot as plt
t, dt = np.linspace(0, 2*np.pi, 1000, retstep=True)
x = 2*t*np.sin(t)
vx = np.gradient(x)/dt
ax = np.gradient(vx)/dt
fig, (ax0,ax1,ax2) = plt.subplots(3,1)
ax0.plot(t,x)
x_abs_max = np.abs(x).max()
ax0.set_ylim(-x_abs_max, x_abs_max)
ax1.pl... | {
"domain": "physics.stackexchange",
"id": 78932,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "kinematics, data-analysis",
"url": null
} |
Video tutorial on solving quadratic inequalities. 2 > t 2 > 1 . $\begin{array}{rcl} x + 3 & = & 0 \\ - 3 && - 3 \\ x & = & -3 \end{array}$, $\begin{array}{rcl} x + 4 & = & 0 \\ - 4 && - 4 \\ x & = & -4 \end{array}$. Would simple take the square root of both sides, we end up:! On number lines and graphs, as well as solv... | {
"domain": "sypniewo.pl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104904802132,
"lm_q1q2_score": 0.8135491347416908,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 834.1786525326811,
"openwebmath_score": 0.6119179129600525,
"tags": nu... |
genetics, chromosome, gene, human-genome
Title: Why does human chromosome 19 have the second highest number of protein-coding genes? While chromosome 19 only is the 19th largest autosomal chromosome, it contains 1440 protein-coding genes, and thus has the second highest number of protein-coding genes of any human chro... | {
"domain": "biology.stackexchange",
"id": 5838,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "genetics, chromosome, gene, human-genome",
"url": null
} |
ros, roscpp, debian, jessie
I don't know when this was written so perhaps it is out of date.
NOTE: I am on a Debian Jessie platform......
Originally posted by w on ROS Answers with karma: 99 on 2017-01-31
Post score: 0
'ROS_CREATE_SIMPLE_SERIALIZER_ARM'
ROS_CREATE_SIMPLE_SERIALIZER_ARM(double);
From this, I ... | {
"domain": "robotics.stackexchange",
"id": 26871,
"lm_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, roscpp, debian, jessie",
"url": null
} |
quantum-mechanics, electromagnetic-radiation, electrons, atoms, hydrogen
$$
\lambda_{if} = \frac{2\pi}\hbar
\left| M_{if} \right|^2
\rho_f.
$$
The density of final states $\rho_f$ is interesting if there are multiple final states with the same energy. (For instance, in hydrogen there are generally several degenerate ... | {
"domain": "physics.stackexchange",
"id": 31839,
"lm_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, electromagnetic-radiation, electrons, atoms, hydrogen",
"url"... |
c#, jquery, asp.net-mvc, async-await, rss
I considered either creating a separate BlogFeedService class, a separate News controller, or both, but it felt like over engineering a simple site that could almost be served up as static HTML. If either the Home controller, or News code grows any more, I will likely extract ... | {
"domain": "codereview.stackexchange",
"id": 18026,
"lm_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#, jquery, asp.net-mvc, async-await, rss",
"url": null
} |
javascript, object-oriented, to-do-list, jade
getSelector('['+selectors.deleteItem+']').onclick = function() {
var deleteItemAction = new methods.deleteItem(getSelector(selectors.textInput).value);
methods.render(itemData);
};
})();
And this is the Jade markup:
#app
.user-entry
input(type="text", pl... | {
"domain": "codereview.stackexchange",
"id": 14534,
"lm_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, object-oriented, to-do-list, jade",
"url": null
} |
nutrition, prion
Incineration of prion-contaminated material is considered the most
effective method of disposal. Combustion at 1,000°C can destroy prion
infectivity, however, low infectivity remains after treatment at
600°C. Despite its effectiveness, incineration may not be a
practical solution, such as during a lar... | {
"domain": "biology.stackexchange",
"id": 11897,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nutrition, prion",
"url": null
} |
Hope this helps! Symmetry was the key factor to make this easy for me!
• Nice answer! But I got other answer from a member of AoPS which is more simple. Yours help nonetheless, I will post his answer here too. Jun 9 '14 at 8:13
• @DaveClifford ok, no problem, glad to help! Curious about the better answer! Jun 9 '14 at... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232930001333,
"lm_q1q2_score": 0.8334024684229108,
"lm_q2_score": 0.8479677622198946,
"openwebmath_perplexity": 346.58684185024526,
"openwebmath_score": 0.6495435833930969,
"ta... |
• There is a slight problem if $\mathbf{b}=\mathbf{a}$ and $\mathbf{c}$ is not equal to the other two vectors. – Somos Feb 17 '18 at 14:32
• @Somos That case is trivial, isn't it? Anyway, I'll add it. – egreg Feb 17 '18 at 14:36 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808753491773,
"lm_q1q2_score": 0.8147536262947166,
"lm_q2_score": 0.8311430394931456,
"openwebmath_perplexity": 244.0745917097211,
"openwebmath_score": 0.99993896484375,
"tags"... |
A lot of things have been said in the comments already, but let me try to put things into context:
The complex numbers are defined in a way that they behave just as you would expect algebraic expressions of the form $a+ib$ to behave, e.g. under addition and multiplication (so you have associativity, commutativity, dis... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.970239909496136,
"lm_q1q2_score": 0.8227321648718715,
"lm_q2_score": 0.8479677622198946,
"openwebmath_perplexity": 214.85089410852518,
"openwebmath_score": 0.8767485618591309,
"tag... |
c++, c++11, tree, template, pointers
It's not idiomatic C++ to put void in the parameter list for functions that take no arguments (although it's permitted for backwards compatibility with C). Your default constructor and destructor (if you needed one) should just have empty argument lists.
It's considered best practi... | {
"domain": "codereview.stackexchange",
"id": 10557,
"lm_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++, c++11, tree, template, pointers",
"url": null
} |
python, python-3.x, sql, csv
for table_name in tables_order:
print(table_name)
with open('/home/andykw/cloned_projects/dadoo/dadoo-ingest-repmdata/mockdata_fr/' + table_name + '.csv', 'r') as file:
# it opens csv files in the directory
s = file
... | {
"domain": "codereview.stackexchange",
"id": 35627,
"lm_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, sql, csv",
"url": null
} |
python, python-3.x, gui, pyqt
def closeEvent(self, event):
"""
Save session data, clear cache, and close with or without saving.
Args:
event: QCloseEvent object.
Return:
None
"""
if not self.label_file and not self.session_data.empty:
... | {
"domain": "codereview.stackexchange",
"id": 37586,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, gui, pyqt",
"url": null
} |
slam, navigation, visual-odometry, ros-melodic, rtabmap-odometry
Title: Improving odometry from RTAB mapping
I'm using real-time appearance-based mapping (rtabmap_ros) to perform SLAM with a first-generation Kinect RGBD sensor, and this is working fairly well. However, the odometry is generated by rtabmap wholly thr... | {
"domain": "robotics.stackexchange",
"id": 32824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, visual-odometry, ros-melodic, rtabmap-odometry",
"url": null
... |
c++, c++11, multithreading, concurrency, queue
Other things you should (probably) take care of | {
"domain": "codereview.stackexchange",
"id": 29035,
"lm_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++, c++11, multithreading, concurrency, queue",
"url": null
} |
quantum-mechanics, hilbert-space, wavefunction, probability, normalization
(ii) The wave function must have a real expectation value of kinetic energy on physical grounds. The kinetic energy operator is proportional to $-\partial^2/\partial x^2$ and has an expectation value proportional to
$$\int_{-\infty}^\infty dx\,... | {
"domain": "physics.stackexchange",
"id": 79894,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, wavefunction, probability, normalization",
"ur... |
and it’s astoundingly bad. So you might have one sentence like this: All analyses were conducted using the BayesFactor package in R , and unless otherwise stated default parameter values were used. This is because the contingencyTestBF() function needs one other piece of information from you: it needs to know what samp... | {
"domain": "kvb.hu",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407214714477,
"lm_q1q2_score": 0.8329491877465816,
"lm_q2_score": 0.8558511469672594,
"openwebmath_perplexity": 479.9039466795225,
"openwebmath_score": 0.6960655450820923,
"tags": null,
... |
algorithms, optimization, search-algorithms, heuristics, reinforcement-learning
$$\nabla f(x) = ((f(x+e_1)-f(x-e_1))/2, \dots, (f(x+e_4)-f(x-e_4))/2),$$
where $e_1=(1,0,0,0)$, $e_2=(0,1,0,0)$, and so on. Now given the ability to compute $f$ on a point of your choice, by computing $f$ on 8 inputs, you can estimate $\n... | {
"domain": "cs.stackexchange",
"id": 16078,
"lm_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, optimization, search-algorithms, heuristics, reinforcement-learning",
"ur... |
c#, entity-framework
return dbResult;
}
// ============================
// SAVECHANGES FUNCTION
// ============================
public DbResult SaveChanges()
{
DbResult dbResult;
try
{
_MyDBEntities.SaveChanges();
dbResult = DbResult.Success("Sav... | {
"domain": "codereview.stackexchange",
"id": 2754,
"lm_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#, entity-framework",
"url": null
} |
special-relativity, time-dilation
I don't get one idea in this illustration. What is confusing for me is this sentence: "Keeping the speed of light constant for all inertial observers, requires a lengthening of the period of this clock from the moving observer's perspective".
I have understood that the axiom of speci... | {
"domain": "physics.stackexchange",
"id": 91808,
"lm_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-dilation",
"url": null
} |
java, programming-challenge, time-limit-exceeded
} Alternative approach
You are repeating a lot of work. Each time you advance a character, you rebuild the matching. But you don't need to do that. Instead create an array that says where to find the next instance of that character in the string.
public static int ... | {
"domain": "codereview.stackexchange",
"id": 29473,
"lm_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, programming-challenge, time-limit-exceeded",
"url": null
} |
c#, object-oriented, snake-game
ClearBuffer();
switch (pressedKey.Key)
{
case ConsoleKey.D:
case ConsoleKey.RightArrow:
return Direction.right;
case ConsoleKey.S:
case ConsoleKey.Dow... | {
"domain": "codereview.stackexchange",
"id": 44662,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, object-oriented, snake-game",
"url": null
} |
classical-mechanics, everyday-life
Title: Why does motion help you balance on ice skates? It's almost impossible to balance on a single ice skate if you're standing still. But give yourself just a little forward motion—it doesn't take very much—and it suddenly becomes easy. You can stand there on one leg and glide e... | {
"domain": "physics.stackexchange",
"id": 10370,
"lm_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, everyday-life",
"url": null
} |
javascript, jquery, api
Extensibility
With modular, namespaced code, usually developers forget to open their modules to extensibility. Because module pattern is like putting a cage around their code, developers forget to actually provide a way to make their module extendable.
You should provide a way (like provide a ... | {
"domain": "codereview.stackexchange",
"id": 2846,
"lm_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, api",
"url": null
} |
Something to get you started:
The greatest common divisor of 271 and 2015 is 1, thus 271 has an inverse (mod 2015).
You may find the inverse of 271 (mod 2015) by using the Euclidean algorithm.
Multiplying both sides by this inverse will give you x equivalent to some number (mod 2015).
Hint:
$271x\equiv272\pmod{201... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540716711546,
"lm_q1q2_score": 0.8118245991651625,
"lm_q2_score": 0.8289388104343892,
"openwebmath_perplexity": 734.3014759003223,
"openwebmath_score": 0.8129776120185852,
"tag... |
python, python-3.x, recursion
[('Pilsener',), ('Flensburger Pilsner',)],
[('Pilsener',)],
[('Schierlinger Roggen',)],
[('Gose',)],
[('Hefeweizen',), ('Spezial',), ('Kellerpils',)],
[('Maisbier',), ('Weizenbier',), ('Dunkel',), ('Hell',)],
[(... | {
"domain": "codereview.stackexchange",
"id": 38369,
"lm_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, recursion",
"url": null
} |
python, django
class Ringtone(models.Model):
contenido = models.ForeignKey(Contenido)
grupo = models.ManyToManyField(Artista)
archivo = models.FileField(upload_to="uploads")
class Wallpaper(models.Model):
contenido = models.ForeignKey(Contenido)
categoria = models.ForeignKey(Categoria)
arc... | {
"domain": "codereview.stackexchange",
"id": 1409,
"lm_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, django",
"url": null
} |
java, strings
Title: Getting the lengths of each word in its String parameter Is this a smart method?
public static ArrayList<Integer> getWordLengths( String s )
{
String str = " " + s + " ";
ArrayList<Integer> list = new ArrayList<Integer>();
for ( int i = 0; i < str.length(); i++ )
{
if ( ... | {
"domain": "codereview.stackexchange",
"id": 11302,
"lm_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
} |
# Doesn't polynomial long division violate the general rules of division?
Doesn't polynomial long division violate the general rules of division? As we don't divide each term in the numerator by the whole denominator (like with the division of the real numbers), what we do is dividing each term in the numerator (start... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540722737479,
"lm_q1q2_score": 0.8400586795668437,
"lm_q2_score": 0.8577680977182187,
"openwebmath_perplexity": 152.0433131248455,
"openwebmath_score": 0.9137605428695679,
"tag... |
$$\tau = \vec{r} \times \vec{F} = 0$$
Therefore, this problem follows law of conservaion of angular momentum, which leads to constant area swept per time.
Also, the conservation of total energy is based on the conservative force (derived from a potential). Thus, we have both laws of conservation.
Assume the force ce... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668706602659,
"lm_q1q2_score": 0.8259714340085746,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 579.4207906640013,
"openwebmath_score": 0.8057845234870911,
"tag... |
physical-chemistry, quantum-chemistry
Title: Does possibility of Tunneling influence Ground State Energy of PIB with and without finite energy barriers? Suppose there are two Particle in a Box models with the same initial energy and same size. Suppose model A has a finite wall or barrier in between the two infinite wa... | {
"domain": "chemistry.stackexchange",
"id": 9104,
"lm_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, quantum-chemistry",
"url": null
} |
Rearrange the terms we can find $\Phi(c)$. Once again, we can use the qnorm(c) function in R to find $c$.
\begin{align} \Phi(c)&=\frac{1.95}{2}=0.975\\ &=\Phi^{-1}(0.975)\\ &=\boxed{1.96} \end{align}
Example:
Let $X\sim \text{Norm}(3, 25)$, calculate:
• $\mathbb P(X>4)$
\begin{align} \mathbb P(X>4)&=1-\mathbb P(X<4... | {
"domain": "muchen.ca",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961633590876,
"lm_q1q2_score": 0.8048834946839576,
"lm_q2_score": 0.8104789086703225,
"openwebmath_perplexity": 3449.4275360412807,
"openwebmath_score": 0.9962314367294312,
"tags": nul... |
beginner, swift, calculator, enum, core-data
enum CalculationFormula: Int {
case Epley
case Brzychi
case Baechle
case Lander
case Lombardi
case MayhewEtAl
case OConnerEtAl
case TotalFormulas
var formulaName: String {
switch self {
case .Epley:
return "Epley"
case .Brzychi:
... | {
"domain": "codereview.stackexchange",
"id": 20529,
"lm_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, swift, calculator, enum, core-data",
"url": null
} |
cosmology, dark-matter
Am I roughly correct that the above is the argument for the existence of dark matter? I'm looking for the building blocks of the argument, its foundation in terms of measurements and theories. (And I do understand that the case for dark matter lies in a convergence of several lines of evidence... | {
"domain": "physics.stackexchange",
"id": 5030,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, dark-matter",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.