text stringlengths 1 1.11k | source dict |
|---|---|
algorithms, data-structures, avl-trees
The case of deletion is similar to the case of insertion.
Further explanation will be omitted.
Thanks to OP, who contributed to this answer. | {
"domain": "cs.stackexchange",
"id": 15266,
"lm_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, data-structures, avl-trees",
"url": null
} |
This means that from $p(x) = q(x)(x-a) + r(x)$ we cannot in general conclude that $p(c) = q(c)(c-a) +r(c)$ unless $c$ commutes in $R$ with $a$. So the Remainder Theorem may fail to hold (if the coefficients involved do not commute with $a$ in $R$), which in turn means that the Factor Theorem may fail to hold So one has... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969660413474,
"lm_q1q2_score": 0.8418125987728079,
"lm_q2_score": 0.855851154320682,
"openwebmath_perplexity": 133.98094318109878,
"openwebmath_score": 0.9433526992797852,
"tag... |
ros, uvc-cam, uvc-camera
[ INFO] [1416757839.936490924]: using default calibration URL
[ INFO] [1416757839.936732155]: camera calibration URL: file:///home/przemek/.ros/camera_info/camera.yaml
[ WARN] [1416757839.938720327]: [camera] does not match name narrow_stereo in file /home/przemek/.ros/camera_info/camera.yaml
... | {
"domain": "robotics.stackexchange",
"id": 20122,
"lm_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, uvc-cam, uvc-camera",
"url": null
} |
buckling, stability, wood
So, I wonder if someone has better information on the critical bending stress for a rectangular section? Where is my derivation going wrong?
Thank you! You are comparing lateral-torsional buckling from bending with flexural buckling from compression (column buckling). That comparison doesn't ... | {
"domain": "engineering.stackexchange",
"id": 4752,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "buckling, stability, wood",
"url": null
} |
ruby, interview-questions, rspec
expect(co.total).to eq(66.78)
end
it 'activates a discount when two or more lavender hearts are bought' do
co = Checkout.new(@promotional_rules)
co.scan(@lavender_heart)
co.scan(@kids_t_shirt)
co.scan(@lavender_heart)
expect(co.tota... | {
"domain": "codereview.stackexchange",
"id": 22755,
"lm_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, interview-questions, rspec",
"url": null
} |
python, functional-programming, pandas, data-visualization
# delete the copy to free up memory
del dfc
I am new to functional programming, and from what I read, I shouldn't alter the data being passed in. In this case, I shouldn't alter df, so I made a copy instead and deleted the copy at the end of the function.... | {
"domain": "codereview.stackexchange",
"id": 25904,
"lm_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, functional-programming, pandas, data-visualization",
"url": null
} |
LEMMA: If P is a polynomial which can be written as $P=Q.R$, where Q and R are symmetrical polynomials, then P is symmetrical too.
Let $Q(X)=b_{s}X^{s}+ \ldots + b_{0}$ and $R(X)=c_{t}X^{t}+\ldots+c_{0}$. We have that $a_{i}=\sum_{j=0}^{i}b_{j}c_{i-j}$ and $a_{n-i}=\sum_{j=0}^{i}b_{s-j}c_{t-(i-j)}$. Since Q and R are ... | {
"domain": "madhavamathcompetition.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.973240714486111,
"lm_q1q2_score": 0.813126586618457,
"lm_q2_score": 0.8354835289107307,
"openwebmath_perplexity": 3923.7057711962125,
"openwebmath_score": 0.9783799052238464... |
In. We can begin graphing by plotting the point (0, 1) We know that the slope is rise over run, $m=\frac{\text{rise}}{\text{run}}$. A function may also be transformed using a reflection, stretch, or compression. Plot the points and graph the linear function. However, in linear algebra, a linear function is a function t... | {
"domain": "co.id",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.983596967483837,
"lm_q1q2_score": 0.8857583575641955,
"lm_q2_score": 0.900529776774399,
"openwebmath_perplexity": 420.482420127325,
"openwebmath_score": 0.5752109885215759,
"tags": null,
"ur... |
java, game, ai
I haven't defined application - it's just a shim that stands between the UI layer and an in memory representation of the state of the UI.
Another way of thinking about it: the UI layer is very difficult to test, so you want the code that lives there to be so trivial that it can't possibly hide a bug... | {
"domain": "codereview.stackexchange",
"id": 16086,
"lm_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, game, ai",
"url": null
} |
performance, beginner, c, programming-challenge, primes
//List of primes to use | {
"domain": "codereview.stackexchange",
"id": 9003,
"lm_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, beginner, c, programming-challenge, primes",
"url": null
} |
speed, vision
Title: Can a human size object move so fast that it ceases to be observable? In many anime, comics, movies, etc, we see a lot of super human beings moving and fighting at such high speeds that a regular human being cannot see that they are fighting or moving pass by.
In particular, in the first battle be... | {
"domain": "physics.stackexchange",
"id": 15738,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "speed, vision",
"url": null
} |
thermodynamics, entropy
Title: Change in entropy for a variable temperature process A sample of cooler water is placed in a large heat reservoir, mass $m$ and specific heat $c_p$ . I want to compute the change in entropy for the sample and the reservoir ( the environment ). I think I can do this with $$\Delta S_{sampl... | {
"domain": "physics.stackexchange",
"id": 91379,
"lm_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, entropy",
"url": null
} |
discrete-signals, fourier-transform, dft, continuous-signals
Answers are free to formulate their own expression for $x[n]$ and $x(t)$. An incomplete example is $x(t) = \cos(\omega t + \phi)$ (missing sampling rate, etc). Answers can also merely specify the steps required to perform this calculation, but it should be e... | {
"domain": "dsp.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": "discrete-signals, fourier-transform, dft, continuous-signals",
"url": null
} |
fluid-dynamics, drag, flow, viscosity, navier-stokes
Our goal is now to find an analytical description for the drag. As we can imagine for highly turbulent (high Reynolds number) flow this is almost impossible to obtain as the flow will be chaotic, with no true steady state and instead depend on forming eddies. On the... | {
"domain": "physics.stackexchange",
"id": 65614,
"lm_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, drag, flow, viscosity, navier-stokes",
"url": null
} |
electromagnetism, optics, waves, visible-light, reflection
$$ \hat{\textbf{p}}_{ref} = (\hat{\textbf{x}} \cos \psi + \hat{\textbf{y}} \sin \psi) \cos \theta_{inc} + \hat{\textbf{z}} \sin \theta_{inc}$$
$$ \hat{\textbf{p}}_{tr} = -(\hat{\textbf{x}} \cos \psi + \hat{\textbf{y}} \sin \psi) \cos \theta_{tr} + \hat{\textbf... | {
"domain": "physics.stackexchange",
"id": 86844,
"lm_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, optics, waves, visible-light, reflection",
"url": null
} |
java, beginner, swing, calculator
@Override
public void actionPerformed(ActionEvent ae) {
if(ae.getSource() == button[0]) numberButtons("7");
if(ae.getSource() == button[1]) numberButtons("8");
if(ae.getSource() == button[2]) numberButtons("9");
if(ae.getSource() == button[3]) operatorButtons(0); //... | {
"domain": "codereview.stackexchange",
"id": 13904,
"lm_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, swing, calculator",
"url": null
} |
general-relativity, gravity, spacetime, curvature
Donβt I still observe relativistic effects such as light not traveling in straight lines, even though there doesnβt seem to be any spacetime 'curvature' involved anywhere?
Yes you do. Light curves downwards wherever there's a gradient in gravitational potential. Or, i... | {
"domain": "physics.stackexchange",
"id": 70949,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, gravity, spacetime, curvature",
"url": null
} |
exists $N_\varepsilon\geq 0$ such that, for all $n\geq N_\varepsilon$, $$\left\lvert \frac{1}{n^2}\sum_{k=0}^n r\left(\frac{k}{n^2}\right)k \right\rvert \leq \frac{1}{n^2}\sum_{k=0}^n \left\lvert r\left(\frac{k}{n^2}\right)\right\rvert k \leq \varepsilon \frac{1}{n^2}\sum_{k=0}^n k = \frac{\varepsilon}{2}\cdot \frac{n(... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9873750484894196,
"lm_q1q2_score": 0.8291323729888673,
"lm_q2_score": 0.8397339736884712,
"openwebmath_perplexity": 258.74892103222925,
"openwebmath_score": 0.9327635765075684,
"ta... |
python, interview-questions, simulation
def breed_animals(self):
babies = []
male_available = False
for animal in self.population:
if animal.gender == 2 and animal.age >= animal.minimum_breeding_age:
#check for at least one male of age
male_available ... | {
"domain": "codereview.stackexchange",
"id": 29689,
"lm_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, interview-questions, simulation",
"url": null
} |
moon-phases
Title: Calculate moon illumination given moon age trying to compute moon illumination percent from moon day.
To get moon day in pseudo code I do:
LUNAR_MONTH = 29.530588853
KNOWN_NEW_MOON = JulianDay("2000-01-06 06:14")
age = (julian_day_now - KNOWN_NEW_MOON).abs % LUNAR_MONTH
So that shows me right now a... | {
"domain": "astronomy.stackexchange",
"id": 6832,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "moon-phases",
"url": null
} |
nuclear-physics, fusion
So, to get your protons to fuse, the Coulomb barrier can be approximated by the electrostatic potential between two point charges outside the range of the strong force (${\sim}\mathrm{fm}$). If you put this into the SchrΓΆdinger equation, you get a tunneling probability describing how many of th... | {
"domain": "physics.stackexchange",
"id": 12297,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, fusion",
"url": null
} |
radioactivity, laboratory-safety
Plutonium metal. Plutonium isotopes are primarily alpha-emitters so they pose little risk outside the body. Here the plastic bag, gloves, and outer (dead) layer of skin would each alone stop the emitted alpha particles from getting into the body.
What Happens to It in the Body? When pl... | {
"domain": "physics.stackexchange",
"id": 8801,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "radioactivity, laboratory-safety",
"url": null
} |
mathematical-physics, quantum-information, group-representations, representation-theory, lie-algebra
Title: Do generalized Pauli Operators generate SU(n)? A commonly used generalization of Pauli Operators is the "clock" and "shift" operators summarized here.
Pauli Operators are generators of SU(2). Are these generali... | {
"domain": "physics.stackexchange",
"id": 36828,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematical-physics, quantum-information, group-representations, representation-t... |
spectroscopy, infrared-radiation
Title: Why does the fringe contrast disappear for a divergent beam (FTIR using a Michelson Interferometer)? I am reading "Fourier Transform Spectroscopy" by Griffiths and Haseth.
In section 2.6 Effect of Beam Divergence, the authors state that: When the extreme ray is out of phase with... | {
"domain": "physics.stackexchange",
"id": 82302,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "spectroscopy, infrared-radiation",
"url": null
} |
thermodynamics, electric-circuits, signal-processing
As noted by Slereah in the comments, signals would propagate much slower: by roughly a factor of $10^5$.
Thermal conductivities of common materials vary by about a factor of $10^5$ between the most thermally conductive and insulating objects. For electrical conduct... | {
"domain": "physics.stackexchange",
"id": 68689,
"lm_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, electric-circuits, signal-processing",
"url": null
} |
gate-synthesis, cirq
Norbert Schuch has a comment on the answer saying the decomposition appears in his thesis in 2002. I wasn't able to get his thesis to check as the link he gave is dead now, but I don't doubt he also found it or that the original discovery predates mine by more than a decade. | {
"domain": "quantumcomputing.stackexchange",
"id": 3996,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gate-synthesis, cirq",
"url": null
} |
$$k \tilde{k} = \left( x^{m n + m} - x^{m n} + x^b - x^c - x^m + 1 \right) \times \\ \left( x^{m n + m} - x^{m n} - x^{m n + m - c} + x^{m n + m - b} - x^m + 1 \right)$$ Looking at the coefficient of $$x^{2 m n}$$, since $$n > 2$$ the positive contribution of $$\left( - x^{m n} \right) \left( x^{- m n} \right)$$ must c... | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9899864273087513,
"lm_q1q2_score": 0.8271173639999769,
"lm_q2_score": 0.8354835391516133,
"openwebmath_perplexity": 70.57976805565131,
"openwebmath_score": 0.8920658230781555,
"tags... |
climate-change, climate, satellites
Title: Do satellites decrease the amount of solar radiation reaching Earth? According to this website, there were 3,372 active satellites in orbit at the beginning of 2021. Furthermore, SpaceX is planning to launch 12,000 satellites to provide cheap internet for everybody, among oth... | {
"domain": "earthscience.stackexchange",
"id": 2349,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "climate-change, climate, satellites",
"url": null
} |
machine-learning, reinforcement-learning, game-ai, javascript
Title: How can I apply reinforcement learning to solve this asteroid game? Introduction
An attractive asteroid game was described in the paper Learning Policies for Embodied Virtual Agents through Demonstration (2017, Jonathan Dinerstein et al.):
In our fi... | {
"domain": "ai.stackexchange",
"id": 725,
"lm_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, reinforcement-learning, game-ai, javascript",
"url": null
} |
semiconductor-physics
Title: Understanding minority charge injection
Due to the applied voltage, electrons from n-side cross the
depletion region and reach p-side (where they are minority
carries). Similarly, holes from p-side cross the junction and reach
the n-side (where they are minority carries). This process un... | {
"domain": "physics.stackexchange",
"id": 79631,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "semiconductor-physics",
"url": null
} |
c++, beginner, c++14, pointers
This will also make your exists() method work properly.
Constructor with pointer argument: explicit rCPtr(T* pT)
First, good job using explicit. That's good default for single-argument constructors.
Here, the only line that can possible throw is refCount = new long;. So, just as in the d... | {
"domain": "codereview.stackexchange",
"id": 41059,
"lm_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, c++14, pointers",
"url": null
} |
homework-and-exercises, classical-mechanics, energy-conservation, orbital-motion, perturbation-theory
Title: Is energy conserved under perturbation (Classical System)? Surprisingly, I don't see this question on here, so here goes.
If I have a classical system and perturbation is applied is the energy before and after ... | {
"domain": "physics.stackexchange",
"id": 92007,
"lm_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, energy-conservation, orbital-motion, ... |
navigation, odometry, visual-odometry, rviz, robot-localization
And in addition odom that I get is very inaccurate.
So what's problem? Why everything is yellow?
Originally posted by Andrey on ROS Answers with karma: 43 on 2018-02-12
Post score: 2
Original comments
Comment by gvdhoorn on 2018-02-13:
Odometry arrows c... | {
"domain": "robotics.stackexchange",
"id": 30025,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, odometry, visual-odometry, rviz, robot-localization",
"url": null
} |
Note that it may also be the case that $$Z_n \stackrel{P}{\longrightarrow} \theta$$ for a fixed, nonrandom value $$\theta$$.
## 18.4 Almost Sure Convergence
$$\{Z_i\}$$ converges almost surely (or βwith probability 1β) to $$Z$$, written
$Z_n \stackrel{a.s.}{\longrightarrow} Z$
if
$\Pr\left(\{\omega: |Z_n(\omega) -... | {
"domain": "jdstorey.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9891815532606978,
"lm_q1q2_score": 0.8446747488301256,
"lm_q2_score": 0.8539127585282744,
"openwebmath_perplexity": 1896.773078847897,
"openwebmath_score": 0.9824956655502319,
"tags": n... |
Here is the bad type of example mentioned in comments by @whuber.
SeedRandom[1111];
n = 3; p =
SparseArray[{Band[{1, 1}] -> 0, Band[{1, 2}] -> 1}, {n, n}]; q =
Rationalize[RandomReal[{0, 1}, {n, n}], 10^-3]; a = Inverse[q].p.q;
na = N[a];
MatrixRank[MatrixPower[na, #]] & /@ Range[Length@na]
(* Out[318]= {2, 1, 3} *... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232874658904,
"lm_q1q2_score": 0.8485613735754924,
"lm_q2_score": 0.863391602943619,
"openwebmath_perplexity": 727.8552952130527,
"openwebmath_score": 0.40167033672332764,
"tag... |
optics, experimental-physics, photons, measurements
What is the state of the art in sustained photon counting in the visible range (perhaps 450-600 nm), and is it at the level where one could reasonably time every photon without having to drop counting rates drastically below the fluorescence lifetime itself? The pho... | {
"domain": "physics.stackexchange",
"id": 28974,
"lm_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, experimental-physics, photons, measurements",
"url": null
} |
java, mysql
private OrgLevel(final String s) {
orgLevel = s;
}
public String getOrgLevel() {
return orgLevel;
}
}
public DatabaseUtil() {
}
public static Connection getConnection() throws ClassNotFoundException, SQLException {
String connectio... | {
"domain": "codereview.stackexchange",
"id": 12690,
"lm_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, mysql",
"url": null
} |
quantum-field-theory, hilbert-space, operators, observables, dirac-delta-distributions
Conversely, the algebraic approach is quite effective in describing notions a bit vague or cumbersome as the spontaneous breaking of symmetry and also to simultaneously handle unitarily inequivalent representations of the same algeb... | {
"domain": "physics.stackexchange",
"id": 70631,
"lm_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, hilbert-space, operators, observables, dirac-delta-distribut... |
Well, whubers code produces exactly that list of locations with its innermost section.
The next item is %% 10; that takes a number and produces its remainder on division by ten. So our list becomes $$1, 3, 5, 6, 8, 9, 1, 2, 3, 4, 6, 7, 8, 1, 2, 4, 6, 7, 8$$. If we break that into three groups --- those that came from ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995713428387,
"lm_q1q2_score": 0.8507615170365108,
"lm_q2_score": 0.8807970748488297,
"openwebmath_perplexity": 438.7224639689237,
"openwebmath_score": 0.7439496517181396,
"tag... |
machine-learning, predictive-modeling
Title: How does one deploy a model, after building it in Python or Matlab? I have been playing around with a lot of different machine learning models (clustering, neural nets, etc...), but I am sort of stuck on understanding what happens after you finish building the model in Pyth... | {
"domain": "datascience.stackexchange",
"id": 3339,
"lm_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, predictive-modeling",
"url": null
} |
python, beginner, python-3.x, regex, file-system
Title: Searching repositories for files with forbidden strings I wrote a small tool for searching git repositories for forbidden strings that I don't want to commit publicly. It's still something basic but it does the job.
The project contains three files.
config.py - t... | {
"domain": "codereview.stackexchange",
"id": 32393,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, regex, file-system",
"url": null
} |
java, mysql, jdbc
When saving the number you list all columns as parameters in the SQL. Including the automatically generated index, which you insert as zero. That was confusing. You should list only the columns that you provide as "INSERT INTO numbers_tabl (number, min, max) ..." and let the database handle the colum... | {
"domain": "codereview.stackexchange",
"id": 37297,
"lm_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, mysql, jdbc",
"url": null
} |
c++, sorting, data-visualization, sdl
SDL_SetRenderDrawColor(m_Renderer, 0, 0, 0, 255);
}
This version inverts the picture so that the bars are anchored to the bottom instead of the top of the image. If you prefer it as it was originally done, just uncomment the code line.
Simplify by better using standard algorithm... | {
"domain": "codereview.stackexchange",
"id": 39088,
"lm_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++, sorting, data-visualization, sdl",
"url": null
} |
nuclear-physics, hydrogen, stability, binding-energy, isotopes
More on this decay:
Tritium is the heaviest isotope of hydrogen with nuclear charge Z = 1.Tritium is radioactive and decays with a half-life of 12.3 years by Ξ² decay into helium isotope 3, with charge Z = 2. The mean kinetic energy release in the Ξ²-electro... | {
"domain": "physics.stackexchange",
"id": 36673,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, hydrogen, stability, binding-energy, isotopes",
"url": null
} |
refraction, geometric-optics, boundary-conditions, variational-principle
(Leaving aside the rays resulting into reflection, for simplicity.)
Broadly speaking, if I phrase it right, Snell's law is a corollary of Fermat's principle.
So far, plain sailing.
Step 2: A similar refraction problem with a single interface
Let... | {
"domain": "physics.stackexchange",
"id": 84785,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "refraction, geometric-optics, boundary-conditions, variational-principle",
"url"... |
fft, dft, phase
phase = np.angle(yf)
phase[np.abs(yf) < 0.1] = 0
plt.figure(3)
plt.xlim(0, 100)
plt.plot(phase[:l.size//2])
plt.show()
Results: the first figure is the cosine, the second is the phase and the third is the phase but with a threshold value added so that all the smaller values than this threshold are set... | {
"domain": "dsp.stackexchange",
"id": 11359,
"lm_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, dft, phase",
"url": null
} |
parallel, clustering, aws
Bandwidth and RAM are non-trivial concerns in my projects, but it's easy to spot when those are the bottlenecks and readjust. It's much harder, I'd imagine, to benchmark the right mix of cores to instances without repeated testing, and my projects vary too much for any single test to apply to... | {
"domain": "datascience.stackexchange",
"id": 20,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "parallel, clustering, aws",
"url": null
} |
turing-machines
Title: Two Turing machines $M_1$ and $M_2$ with $L(M_1) \subseteq L(M_2)$ Suppose $M_1$ and $M_2$ are two Turing machines such that $L(M_1)\subseteq L(M_2)$. Which of the following is true?
(A) On every input on which $M_1$ does not halt, M2 does not halt
(B) On every input on which $M_1$ halts, $M_2... | {
"domain": "cs.stackexchange",
"id": 12828,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turing-machines",
"url": null
} |
python, performance, python-2.x, random, dice
return total_score
def _winner(self):
return max(self.players_scores, key = self.players_scores.get)
def _print_scores(self):
print "\n------------------------------------------\nScores table\n"
for player, score in self.players_scores:
... | {
"domain": "codereview.stackexchange",
"id": 11403,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, python-2.x, random, dice",
"url": null
} |
c#, .net
return CloneUser;
}
But then my coworker sent me this code, saying it's better to clone this way, but can't tell me why :
public FMSUser(FMSUser user)
: EntityBase(user)
{
this.Username = user.Username;
this.IsEnabled = user.IsEnabled;
this.IsNeedPasswordReset = user.IsNeedPasswordReset;
this.L... | {
"domain": "codereview.stackexchange",
"id": 7555,
"lm_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#, .net",
"url": null
} |
ros, catkin, ros-groovy
make[1]: *** [baxter_common/baxter_core_msgs/CMakeFiles/baxter_core_msgs_generate_messages_cpp.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed | {
"domain": "robotics.stackexchange",
"id": 20435,
"lm_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, catkin, ros-groovy",
"url": null
} |
python, algorithm, python-2.x, machine-learning
As naming it something useful will be hard in the current context.
I'd also change this function to iterate through the list,
rather than through a range and index,
and to remove the == 1 as that can change how the function works.
This is as bool([1]) is True, but [1] ==... | {
"domain": "codereview.stackexchange",
"id": 22240,
"lm_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, algorithm, python-2.x, machine-learning",
"url": null
} |
object-oriented, vba, weak-references
Private Type TReference
Address As Long
End Type
#End If
...
#If Win64 Then
Public Property Get Address() As LongPtr
Address = this.Address
End Property
Public Property Let Address(ByVal value As LongPtr)
this.Address = valu... | {
"domain": "codereview.stackexchange",
"id": 37789,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "object-oriented, vba, weak-references",
"url": null
} |
general-relativity, black-holes, spacetime, curvature
(original source)
I hope I helped and did not ramble too much. If you found my explanation helpful and not too boring then look up more and even try listening to Leonard Susskind, or Brian Greene, both really interesting and have videos on YouTube. It is really int... | {
"domain": "physics.stackexchange",
"id": 15725,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, spacetime, curvature",
"url": null
} |
brushless-motor
Title: How to assemble brushless motors and propellers? I'm building a quadcopter and I've received my motors and propellers.
What's the right way to assemble those together?
I'm not confident with what I've done, as I'm not sure the propeller would stay in place on a clockwise rotating motor.
I mean, ... | {
"domain": "robotics.stackexchange",
"id": 137,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "brushless-motor",
"url": null
} |
electrical-engineering
Title: Does a 3-phase electricity grid need to be synchronised and are the phases split between houses? Note: This may be UK-specific, I'm not sure.
I overheard part of a conversation about 3-phase electricity, one guy was saying that mains generators use 3 coils (or something) and as it spins i... | {
"domain": "engineering.stackexchange",
"id": 198,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrical-engineering",
"url": null
} |
optimization, matlab
elseif(M==L)
Plm(L,M) = (2*L-1)*Plm(1,1)*Plm(L-1,L-1);
else
Plm(L,M) = 0;
end
end
end
Pl = sparse(Pl);
Plm = sparse(Plm);
end At first glance I can see a few points where you can start to optimize yo... | {
"domain": "codereview.stackexchange",
"id": 2051,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optimization, matlab",
"url": null
} |
homework-and-exercises, electromagnetism, magnetic-fields, vectors, calculus
=\left \lbrace \sum_i \left(\frac{\partial }{\partial x_i'} + 0+ 0 + \frac{\partial t'}{\partial x_i'}\frac{\partial }{\partial t'}\right) \hat{i}\right\rbrace[\rho(x_i',x_j',x_k',t')]_{ret}\\
$$
So the primed spacial derivatives are taken wh... | {
"domain": "physics.stackexchange",
"id": 21410,
"lm_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, vectors, calculus",
"... |
c#, performance, multithreading, .net
private static void SecondThreadFunction()
{
Thread.Sleep(timeToRunSecondThread);
}
private static void WriteThreadProgressToScreen(string threadName, int timeToRunThread, long currentElapsedMiliseconds)
{
Console.WriteLine($"{threadName} progress ... | {
"domain": "codereview.stackexchange",
"id": 21262,
"lm_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, multithreading, .net",
"url": null
} |
for an unknown (variable) is a monomial. Degree of Polynomials. Polynomials apply in fields such as engineering, construction and pharmaceuticals. In 3x 3 y 2 - 4xy 3 + 6x, the degree is 5, since the highest exponent total comes from the first term, and 3 + 2 = 5. If the degree n of a polynomial is even, then the arms ... | {
"domain": "assistimi.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754488233528,
"lm_q1q2_score": 0.804963763409399,
"lm_q2_score": 0.8175744828610095,
"openwebmath_perplexity": 385.2108957500392,
"openwebmath_score": 0.7044321894645691,
"tags"... |
scattering, cosmic-microwave-background
The probability that a photon, which arrives at the observer at the present epoch, suffered its last scattering
event between $z$ and $z-dz$
is:
$$1-e^{-\tau(z)}-(1-e^{-\tau(z-dz)})=(1-e^{-\tau(z)})-(1-e^{-\tau(z-dz)})=\frac{d}{dz}\{1-e^{-\tau(z)}\}dz$$
and we have done, apar... | {
"domain": "physics.stackexchange",
"id": 52051,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "scattering, cosmic-microwave-background",
"url": null
} |
ros, gazebo7, ros-kinetic, nvidia
Originally posted by kane_choigo with karma: 195 on 2020-05-07
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 34898,
"lm_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, gazebo7, ros-kinetic, nvidia",
"url": null
} |
java
} Speed concerns
Many of your operations are \$O(n)\$ and could be made faster. You didn't say which operations were the most commonly used operations, so I'm not sure if you care about the following.
add(), nextIndex()
These are both \$O(n)\$ operations, because they both need to search the array for a free slo... | {
"domain": "codereview.stackexchange",
"id": 21203,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
python, stack
Title: Directory Stacks with Python I implemented basic pushd and popd functionality for a Python script. What's a more academic/formal way to implement a directory stack?
_directory_stack = {0:getcwd()}
def pushd(target: str):
"""Push a new directory to the top of the stack and changes to it.
... | {
"domain": "codereview.stackexchange",
"id": 34428,
"lm_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, stack",
"url": null
} |
java, beginner, converting
Also - this assumes the extension is three characters, so won't work correctly with a .yaml file. You can use a library like apache-commons to do this in a more foolproof way.
String outputFilePath = FilenameUtils.removeExtension(sourceFilePath)
+ ".json";
Simplify File Writing Wit... | {
"domain": "codereview.stackexchange",
"id": 27172,
"lm_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, converting",
"url": null
} |
javascript, jquery, backbone.js, marionette.js
// Don't allow dblclick to bubble up to the list item and cause a play.
return false;
}, 100, true)
});
The end result of this logic is:
Single-click on child view runs _addToStream (once)
Double-click on child view runs _addToStream (once)
Double-click on ... | {
"domain": "codereview.stackexchange",
"id": 9247,
"lm_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, backbone.js, marionette.js",
"url": null
} |
python, algorithm, graph
Here is an example of a non-rectangular matrix:
[
[1, 1, 1, 2],
[2, 1, 2, 2],
[4, 1, 1, 0],
[4, 4, 1, 0],
[9, 0, 9, 9, 8, 1],
[5, 0, 0, 5, 4],
[5, 5, 7, 2, 9],
[],
[5, 5, 7, 2, 9]
]
Edit: explanation of program purpose
Here is an image that describes wha... | {
"domain": "codereview.stackexchange",
"id": 27291,
"lm_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, algorithm, graph",
"url": null
} |
\begin{align} P \land Q & \equiv Q \land P, &\text{\land commutativity} \\ P \land (Q \lor R) & \equiv (P \land Q) \lor (P \land R), &\text{\land distribution} \\ P \land \lnot P & \equiv \bot &\text {(3)} \\ P \lor \bot &\equiv P, & \text{\bot annihilation} \end{align}
where $$\bot$$ denotes falsehood. With that in mi... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877679766943,
"lm_q1q2_score": 0.8067803899949365,
"lm_q2_score": 0.8311430478583169,
"openwebmath_perplexity": 622.8530920482219,
"openwebmath_score": 0.9999747276306152,
"tag... |
# Compute $\int_0^{\pi/2}\frac{\cos{x}}{2-\sin{2x}}dx$
How can I evaluate the following integral?
$$I=\int_0^{\pi/2}\frac{\cos{x}}{2-\sin{2x}}dx$$
I tried it with Wolfram Alpha, it gave me a numerical solution: $0.785398$.
Although I immediately know that it is equal to $\pi /4$, I fail to obtain the answer with pen... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9783846647163009,
"lm_q1q2_score": 0.819514532934338,
"lm_q2_score": 0.8376199694135332,
"openwebmath_perplexity": 619.3771670601869,
"openwebmath_score": 1.0000097751617432,
"tags... |
newtonian-mechanics, friction
Title: Are coefficients of friction invariant by switching the materials? I don't have the ability to make the experiment to answer these questions :
Let $A$ and $B$ be two materials. Is the static coefficient of friction of $A$ on $B$ equal to the static coefficient of friction of $B$ on... | {
"domain": "physics.stackexchange",
"id": 23153,
"lm_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, friction",
"url": null
} |
c++, thread-safety, concurrency, queue, producer-consumer
What you want is to store the counters in a struct. (See update below.)
Even then, I donβt see what prevents an element from being dequeued before it is fully enqueued. TMPMCQueue::dequeue only checks that its retrieved values of the two cursors (at separate ... | {
"domain": "codereview.stackexchange",
"id": 42602,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, thread-safety, concurrency, queue, producer-consumer",
"url": null
} |
social
The mail systems that automatically decipher handwritten addresses on your packages, they use machine vision and have probably been doing it since mid-90s.
Algorithmic trading bots on stock markets - they handle something like 85% of all trades.
Many modern CPUs use AI techniques, including neural networks, to ... | {
"domain": "ai.stackexchange",
"id": 198,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "social",
"url": null
} |
type-theory, type-inference
fun exec (xs, ys, _ ::: $zs) = (xs, ys, zs)
| exec args = let val xs = rotate args in (xs, nil, xs) end
(* public operations *)
val empty = (Nil, nil, Nil)
fun snoc ((xs, ys, zs), y) = exec (xs, y :: ys, zs)
fun uncons (x ::: $xs, ys, zs) = SOME (x, exec (xs, ys, zs))
| unc... | {
"domain": "cstheory.stackexchange",
"id": 3717,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "type-theory, type-inference",
"url": null
} |
homework-and-exercises, forces, newtonian-gravity, continuum-mechanics, structural-beam
Title: Fixed rectangular structure and gravitational force Suppose I have rectangular structure hanging from the ceiling. | {
"domain": "physics.stackexchange",
"id": 33597,
"lm_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, forces, newtonian-gravity, continuum-mechanics, structural... |
haskell, functional-programming
Title: Palindrome test in Haskell I am new to Haskell and, coming from a OO/procedural programming background, I want to make sure my code follows the functional way of doing things. I built this short module to test if a given string is a palindrome (same backwards and forwards, case-s... | {
"domain": "codereview.stackexchange",
"id": 3486,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "haskell, functional-programming",
"url": null
} |
thermodynamics
Title: In search for a physical model for $\Delta S$ for conducting objects The situation is familiar: A cold object is in contact with a hot object and there is an energy transfer in between them, $Q$.
I know that $Q_{hot} = -Q_{cold}$ and that, because this is a spontaneous process, that $\Delta S > 0... | {
"domain": "physics.stackexchange",
"id": 35104,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics",
"url": null
} |
sensor-msgs, message-filters, transform
Originally posted by dejanpan on ROS Answers with karma: 1420 on 2011-03-02
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 4920,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sensor-msgs, message-filters, transform",
"url": null
} |
demodulation, digital-communications, embedded-systems
Title: Which digital modulation scheme would be suitable for transmitting digital data through the output of a PC soundcard I need to output a data stream at $40\textrm{ kbit/s}$ or faster out of a computer system whose only accessible output peripheral is the aud... | {
"domain": "dsp.stackexchange",
"id": 509,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "demodulation, digital-communications, embedded-systems",
"url": null
} |
c++, regex, c++17
return regex_element_t(a.str() + traits::or_sign + b.str());
}
static regex_element_t match_any() {
return regex_element_t(string_t(1, '.'));
}
static regex_element_t match_character(char_t ch) {
return regex_element_t(string_t{} + ch);
}
static regex_elemen... | {
"domain": "codereview.stackexchange",
"id": 33438,
"lm_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++, regex, c++17",
"url": null
} |
java, optimization, performance
foundBetter = bestNormIScore > oldNormIScore;
if( foundBetter ) {
wordsInSpan[ start ][ end ][ parentState ] = bestWordsInSpan;
}
}
if( foundBetter ) {
iScore_start_end[ parentState ] = bestIScore; | {
"domain": "codereview.stackexchange",
"id": 3447,
"lm_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, optimization, performance",
"url": null
} |
python, converting, numbers-to-words
if __name__ == "__main__":
main()
I hope you will find it more pleasing and that my comments will help you. Also, despite the big number of comments, your initial code was pretty good.
Disclaimer : I have done everything only based on your example (which was enough to spot mista... | {
"domain": "codereview.stackexchange",
"id": 39585,
"lm_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, converting, numbers-to-words",
"url": null
} |
python
Title: How can I apply proportional (p) distances (Nucleotide) using bioPython I am working on phylogenetic tree generation. I used BioPython and ClustalW 2.x.x for this purpose. I have generate the tree using BioPython but when I try to generate tree using "MegaSoftware GUI" tool my tree does not matched with ... | {
"domain": "bioinformatics.stackexchange",
"id": 324,
"lm_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",
"url": null
} |
(x+1)^{n+1}} ) The coefficients are the numbers in the second row of Pascal's triangle: 2 r Β s), which is what we need if we want to express a line in terms of the line above it. 1 Β is equal to {\displaystyle x+1} Β (these are the Has 10 players and wants to know how many initial distributions of 's and 's in the 10th... | {
"domain": "co.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.965899573306072,
"lm_q1q2_score": 0.8209868013963152,
"lm_q2_score": 0.8499711813581708,
"openwebmath_perplexity": 906.4556793242757,
"openwebmath_score": 0.857445240020752,
"tags": null,
"... |
c, programming-challenge
Output: 2
Example Input:
1
1
2
1 2
Output: NO | {
"domain": "codereview.stackexchange",
"id": 33465,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c, programming-challenge",
"url": null
} |
javascript, jquery, html5, canvas
container.enable = function() {
draggable = true;
$(canvas).attr("active", "true");
div.css({
"z-index": 2
});
};
container.disable = function() {
draggable = false;
$(canvas).attr... | {
"domain": "codereview.stackexchange",
"id": 34315,
"lm_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, html5, canvas",
"url": null
} |
We seem to have very fast convergence, but what has gone wrong with the type $(3,3)$ approximant? The first plot below reveals that the problem is another spurious pole. In such cases, one can often get better results by calling ratinterp with a value of $N$ specified bigger than the default of $m+n$. In this case the ... | {
"domain": "chebfun.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9912886152849367,
"lm_q1q2_score": 0.8425667497497071,
"lm_q2_score": 0.8499711756575749,
"openwebmath_perplexity": 1128.9669326252672,
"openwebmath_score": 0.8389889597892761,
"tags": n... |
homework-and-exercises, newtonian-mechanics, rotational-dynamics, rotation
Title: How to find the angular velocity and tension in the string? A light string with a particle of mass $m$ at one end, wraps itself around a fixed vertical cylinder of radius $a$. The entire motion is in the horizontal plane(neglect gravity)... | {
"domain": "physics.stackexchange",
"id": 40077,
"lm_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, rotational-dynamics, rotation",
"ur... |
electric-circuits, electrical-resistance
Title: How calculate resistance between two points for arbitrary resistor grid? I need to calculate resistance in an electrical grid.
Grid is a graph. Edges of a graph are resistors. How calculate resistance between any two vertexes for arbitrary graph?
I know Kirchoff law and ... | {
"domain": "physics.stackexchange",
"id": 2181,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, electrical-resistance",
"url": null
} |
deep-learning, convolutional-neural-networks, generative-adversarial-networks, generative-model, image-generation
Title: If the goal of training of a GAN is to have $P_g=P_{data}$, shouldn't this produce the exact same images? Referring to the blog, Image Completion with Deep Learning in TensorFlow, it clearly says th... | {
"domain": "ai.stackexchange",
"id": 1256,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-learning, convolutional-neural-networks, generative-adversarial-networks, generativ... |
c++, event-handling, pointers, callback
I clear events before each poll, and in the destructor so I don't have memory leaks/too much on the heap
void windowEventManager::clearEvents()
{
for (auto &eventCheck : _subscribedEvents)
{
if (eventCheck.data)
{
... | {
"domain": "codereview.stackexchange",
"id": 22483,
"lm_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++, event-handling, pointers, callback",
"url": null
} |
genetics, homework, pedigree
Title: How do you find probabilites of carrying an X linked recessive disease in a blank pedigree given only one phenotype?
In the above pedigree, the black square indicates the male
affected with Hemophilia which is a X-linked recessive trait. What is the
probability that the proposed ch... | {
"domain": "biology.stackexchange",
"id": 8219,
"lm_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, homework, pedigree",
"url": null
} |
Theorem 1.14 (p.5) [Fisher's inequality] In a nonempty 2-design with k<v
we have bβ₯v.
Proof: We have written a nondegenerate v*v matrix as a product of two
matrices each of rank at most b. QED
What if equality holds? First of all M is a square matrix, and (1.8) bk=vr
means that b=v iff k=r, so (1.11) means M and J ... | {
"domain": "harvard.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9908743632845277,
"lm_q1q2_score": 0.819167516223836,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 3260.0613332805115,
"openwebmath_score": 0.862601101398468,
"tags": nul... |
vba, web-scraping, html5
For Each post In posts
post.Click
Next post
End Sub
There doesn't seem to be a local className or id I can use to limit the elements returned. So I tried using a variable, holding the latest month, e.g. myStringVar = "November 2017", and testing for the presence of this withi... | {
"domain": "codereview.stackexchange",
"id": 29061,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, web-scraping, html5",
"url": null
} |
Graphs of Sine and Cosine Example 3: Sound Application Use a sine function to graph a sound wave with a period of 0. Those functions were predefined for you, meaning that you didn't have to tell the computer how to compute the sine and cosine of an angle. Focus on creating a graph and formula from a story (starting fro... | {
"domain": "rafbis.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541732082084,
"lm_q1q2_score": 0.8624445117417647,
"lm_q2_score": 0.8688267626522814,
"openwebmath_perplexity": 518.5260431003412,
"openwebmath_score": 0.7441229820251465,
"tags": ... |
programming, qiskit, quantum-algorithms
The output is something like:
ββββββββββββββββββββββββββββββββββββββββ
q_0: β€0 ββ€ X ββ€Mβ
β initialize(0.5,0.5,0.5,0.5) βββ¬ββ¬βββ₯β
q_1: β€1 βββ€Mββββ«β
ββββββββββββββββββββββββββββββββ ββ₯β β
c: 2/ββββββββββββββ... | {
"domain": "quantumcomputing.stackexchange",
"id": 2301,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "programming, qiskit, quantum-algorithms",
"url": null
} |
quantum-mechanics, quantum-information, quantum-entanglement, definition, faster-than-light
Your interpretation of that description is indeed correct. However, quantum-mechanical entanglement goes much further than that property, and this is exactly the content of Bell's theorem.
To be more precise, Bell's theorem is ... | {
"domain": "physics.stackexchange",
"id": 55611,
"lm_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, quantum-entanglement, definition, faster-t... |
1525057, and 1413739. If Matrices Commute$AB=BA\$, then They Share a Common Eigenvector, Find Eigenvalues, Eigenvectors, and Diagonalize the 2 by 2 Matrix, Matrix of Linear Transformation with respect to a Basis Consisting of Eigenvectors, Quiz 11. In all cases, when the complex part of an eigenvalue is non-zero, the s... | {
"domain": "icemed.is",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936050226358,
"lm_q1q2_score": 0.8135617981448421,
"lm_q2_score": 0.8267118026095992,
"openwebmath_perplexity": 362.18596150976043,
"openwebmath_score": 0.7310795187950134,
"tags":... |
qiskit, circuit-construction, universal-gates
Using this gate would still give you the right results.
Finally, note that you can use the same last trick to implement the OR gate with only 4 qubits: just use an MCX gate, which represents the logical AND and negate it:
for input_ in ['000','100','010','001', '110','011... | {
"domain": "quantumcomputing.stackexchange",
"id": 4817,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "qiskit, circuit-construction, universal-gates",
"url": null
} |
formal-languages, regular-languages, regular-expressions
It would be nice to see a proof or counterexample. Is there some case where it's obviously wrong that I missed? Has anyone seen this (or something similar) before? Your conjecture is disproved by Keith Ellul, Bryan Krawetz, Jeffrey Shallit and Ming-wei Wang in... | {
"domain": "cs.stackexchange",
"id": 173,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "formal-languages, regular-languages, regular-expressions",
"url": null
} |
machine-learning, image-processing, pattern-recognition
I have looked at a bank of gabor filter features, but they are computationally expensive. It would of great help if someone could point me out in the general direction for working forward. Any help is appreciated.
EDIT - I found the solution in D.W.'s answer belo... | {
"domain": "cs.stackexchange",
"id": 6630,
"lm_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, image-processing, pattern-recognition",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.