text stringlengths 49 10.4k | source dict |
|---|---|
c#, programming-challenge, winforms
private long Solve3()
{
long NumberToCheck = 600851475143;
long LargestPrimeFactorFound = 0;
long SquareRoot = SquareRootRoundedUp(NumberToCheck);
for (long i = 2; i <= SquareRoot; i++)
{
if (Number... | {
"domain": "codereview.stackexchange",
"id": 19369,
"lm_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, winforms",
"url": null
} |
python, tensorflow, linux
Title: Different available packages in TensorFlow virtualenv? I have installed TensorFlow on Linux (Anaconda) by following the documentation which states that one should create and activate a virtual environment tensorflow. So far, so good (albeit it is not entirely clear why is this virtual ... | {
"domain": "datascience.stackexchange",
"id": 1519,
"lm_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, tensorflow, linux",
"url": null
} |
python, tkinter, sqlite
self.titlebar = tk.Menu(master)
self.help = tk.Menu(master , tearoff = False)
self.help.add_command(label = 'Help' , command =help_mthd )
self.titlebar.add_cascade(label = 'Help Options' ,menu = self.help)
master.config(menu = self.titlebar)
def statusUpdat... | {
"domain": "codereview.stackexchange",
"id": 31193,
"lm_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, tkinter, sqlite",
"url": null
} |
Exponential Growth and Decay. Find a bank account balance if the account starts with $100, has an annual rate of 4%, and the money left in the account for 12 years. Viewers can apply their new (or growing) algebraic knowledge to solve the word problems along with Sal. Exponential Exponential Growth and Decay Worksheet.... | {
"domain": "thebuildsuccess.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357567351325,
"lm_q1q2_score": 0.8470853127300599,
"lm_q2_score": 0.8652240808393984,
"openwebmath_perplexity": 853.2557488221838,
"openwebmath_score": 0.5186667442321777,
... |
The FEM parameters chosen in NDSolve are not very well thought of currently and I am open to suggestions.
• It seems (but I am not sure I understand what you are trying to achieve) your use of the DirichletCondition is not quite correct; it should be something like DirichletCondition[ w[r] == 0, r \[Element] boundary]... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.965899575269305,
"lm_q1q2_score": 0.8285178482894977,
"lm_q2_score": 0.8577681049901036,
"openwebmath_perplexity": 4060.6279178762175,
"openwebmath_score": 0.32957637310028076,
"ta... |
ros, moveit, move-group
Originally posted by bhavyadoshi26 on ROS Answers with karma: 95 on 2016-09-02
Post score: 1
Original comments
Comment by gvdhoorn on 2016-09-03:
If this is the output right after you've used the Setup Assistant (ie: you haven't changed anything in the generated launch files), could you please... | {
"domain": "robotics.stackexchange",
"id": 25665,
"lm_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, moveit, move-group",
"url": null
} |
Then using a half angle formula for $\cos^2$:
$\displaystyle \frac {\frac{1}{2} \cdot (1 + \cos(\frac{12}{x}))}{12} +c$ = $\frac{1}{24} \cdot \cos(\frac{12}{x}) + C$, where $C=c+\frac{1}{24}$
You did everything right, but you're constant of integration "absorbs" the $\frac{1}{24}$
$$\frac{1}{24}+C=C$$
The $C$ is an... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769099458927,
"lm_q1q2_score": 0.8925562403535439,
"lm_q2_score": 0.9149009486120849,
"openwebmath_perplexity": 949.4613467960729,
"openwebmath_score": 0.8925501108169556,
"tag... |
quantum-state, entanglement, teleportation, bell-basis
$^1$ There are two levels of state-channel duality. The first maps linear operators to states. The second maps superoperators to linear operators. In the present context, the former is sufficient. | {
"domain": "quantumcomputing.stackexchange",
"id": 5202,
"lm_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-state, entanglement, teleportation, bell-basis",
"url": null
} |
java, email
/**
* The listen method listen to incoming client's datagrams and requests
* @throws Exception
*/
private void listen() throws Exception {
// listen to incoming client's requests via the ServerSocket
//add your code here
String data = null;
Socket client ... | {
"domain": "codereview.stackexchange",
"id": 40879,
"lm_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, email",
"url": null
} |
$\exists N_1: \forall n > N_1: \size {y_n - l} < \epsilon$
As $\ds \lim_{n \mathop \to \infty} z_n = l$ we know that:
$\exists N_2: \forall n > N_2: \size {z_n - l} < \epsilon$
Let $N = \max \set {N_1, N_2}$.
Then if $n > N$, it follows that $n > N_1$ and $n > N_2$.
So:
$\forall n > N: l - \epsilon < y_n < l + \e... | {
"domain": "proofwiki.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474910448,
"lm_q1q2_score": 0.8265835371898037,
"lm_q2_score": 0.8354835330070838,
"openwebmath_perplexity": 862.3393280002998,
"openwebmath_score": 0.9311439394950867,
"tags": nul... |
reinforcement-learning, policy-gradients, pytorch, ddpg
However, if our policy is deterministic then $\pi(\cdot|s)$ is a point mass (a distribution which has probability 1 for a specific point and 0 everywhere else) for a certain action, so $\mathbb{E}_{a\sim\pi}[ Q(s,a)] = Q(s,a=\pi(s)) = v_\pi(s)$. Thus the objectiv... | {
"domain": "ai.stackexchange",
"id": 2182,
"lm_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, policy-gradients, pytorch, ddpg",
"url": null
} |
gazebo, ros2, ros-control, gazebo-ros-control
And this is my controllers YAML file:
controller_manager:
ros__parameters:
update_rate: 100 # Hz
use_sim_time: true
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
gripper_action_controller:
type: position_contr... | {
"domain": "robotics.stackexchange",
"id": 38546,
"lm_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, ros2, ros-control, gazebo-ros-control",
"url": null
} |
complexity-theory, np-complete, reductions, np-hard, 3-sat
Title: System of equalities and inequalities is NP-hard using a reduction from 3COLORING We are require to show that a problem where the input is a system of equalities and inequalities, each involving polynomials of degree at most 2 (with integer coefficient... | {
"domain": "cs.stackexchange",
"id": 21118,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, np-complete, reductions, np-hard, 3-sat",
"url": null
} |
php, security
logout.php
$params = session_get_cookie_params();
setcookie('stay_loggedIn', '', time() - 3600, $params['path'], $params['domain'], $params['secure'], isset($params['httponly'])); I think this is a bad approach on two fronts (the second one is more important):
Having to check a randomly generated 'hash'... | {
"domain": "codereview.stackexchange",
"id": 34226,
"lm_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, security",
"url": null
} |
bandwidth, baseband
Title: Why are all baseband signals low-pass? A baseband signal is just a signal that has not been used to modify a carrier signal. Now, I have noticed that all baseband signals are low-pass too. Why is that?
I can understand why digital baseband signals are always low-pass: because the frequency 0... | {
"domain": "dsp.stackexchange",
"id": 12389,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bandwidth, baseband",
"url": null
} |
The two angles adjacent to the base of an isosceles triangle A statement that can be proved easily using the theorem The Corollary to the Triangle Sum Theorem states that the acute angles of a right triangle are complementary. Without loss of generality suppose that for isosceles triangle ABC, A is at (0,0), B is at (2... | {
"domain": "sumcoop.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9896718496130619,
"lm_q1q2_score": 0.8068126433802972,
"lm_q2_score": 0.8152324871074607,
"openwebmath_perplexity": 587.6750757794822,
"openwebmath_score": 0.685784101486206,
"tags":... |
# All Questions
2k views
### Is it possible to change the colors of the highlighted code in the Mathematica frontend?
With Format -> Edit Stylesheet... it is possible to adjust text-properties, text-colors, formatting of equations, etc of a notebook and to use this style-definitions again by installing it as ...
2k ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9381240142763573,
"lm_q1q2_score": 0.8262969008295346,
"lm_q2_score": 0.8807970889295664,
"openwebmath_perplexity": 1756.4354073436443,
"openwebmath_score": 0.5250992774963379,
"ta... |
### Redbelly98
Staff Emeritus
Looks good.
By the way, this is a little easier using eV energy units. That way you won't have all those 1.6e-19's to contend with:
hc = 1240 eV-nm (a good number to remember in the future)
moc2 = 511 keV or 511e3 eV
KE = 30.0e3 eV
so that
λdB = 1240 eV-nm / √[2 × 511e3 × 30.0e3 eV2 +... | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305307578324,
"lm_q1q2_score": 0.8575585855657087,
"lm_q2_score": 0.8902942319436397,
"openwebmath_perplexity": 2839.2872517755036,
"openwebmath_score": 0.6254527568817139,
"ta... |
performance, c, compression
bio->c += m;
if (bio->c == 32) {
bio_flush_buffer(bio);
bio_reset_after_flush(bio);
}
n -= m;
}
}
static uint32 bio_read_bits(struct bio *bio, size_t n)
{
uint32 w;
size_t s;
/* reload? */
if (bio->c == 32) {
bi... | {
"domain": "codereview.stackexchange",
"id": 37346,
"lm_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, c, compression",
"url": null
} |
java, security, cryptography, aes
/**
* Get the header of the {@link Safe}
*
* @return
*/
public Map<String, String> getPublicHeader()
{
return publicHeader;
}
/**
* Get all {@link Block} contained in the {@link Safe}
*
* @return
*/
public Map<Stri... | {
"domain": "codereview.stackexchange",
"id": 30955,
"lm_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, security, cryptography, aes",
"url": null
} |
experimental-physics, heisenberg-uncertainty-principle, spectroscopy
Title: Finding natural linewidth's I want to check whether my fit parameter for the width of a Lorentzian fit on my digital spectroscopy data for Helium (the 5875 Angstrom line) is what you would expect from the uncertainty principle, but I can't fin... | {
"domain": "physics.stackexchange",
"id": 28981,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, heisenberg-uncertainty-principle, spectroscopy",
"url": nu... |
resource-recommendations, material-science, continuum-mechanics, stress-strain, moment
Title: Horizontal Beam Bending Due to Gravity I just thought about this problem recently but am not sure where to find a solution. I am not certain which parameters are important in this problem, so please bear with me.
Assume tha... | {
"domain": "physics.stackexchange",
"id": 48930,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "resource-recommendations, material-science, continuum-mechanics, stress-strain, mo... |
catkin, external-libraries, ros-hydro, find-package, dependencies
Which is incredibly ugly, but at least the ugliness is captured in a single package opencv3 and not distributed to other packages.
Originally posted by trianta2 on ROS Answers with karma: 293 on 2014-04-17
Post score: 0
catkin_package(DEPENDS foo) onl... | {
"domain": "robotics.stackexchange",
"id": 17683,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin, external-libraries, ros-hydro, find-package, dependencies",
"url": null... |
satisfiability
Title: Hardness of Approximation of MAX-3SAT This is probably a duplicate of this question, but I need a somewhat blunter answer. Let's say I have a polynomial time algorithm that finds an assignment that satisfies more than $\frac{7}{8}$ of the clauses of a satisfiable 3SAT instance. Do I collect my ... | {
"domain": "cs.stackexchange",
"id": 8472,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "satisfiability",
"url": null
} |
python, sql, postgresql, discord
Sql Select :
def sql_select(conn, statement):
cur = conn.cursor()
cur.execute(str(statement))
return cur.fetchone() BIGSERIAL
is a PostgreSQL extension and non-standard. Consider instead GENERATED ALWAYS AS IDENTITY.
Otherwise, the biggest problem with this code is that i... | {
"domain": "codereview.stackexchange",
"id": 41431,
"lm_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, sql, postgresql, discord",
"url": null
} |
\begin{align} \sum_{n=1}^\infty\frac{x^n-1}{n(1+x)^n} &=\log\left(1-\frac1{1+x}\right)-\log\left(1-\frac{x}{1+x}\right)\\ &=\log(x)\tag{5} \end{align}
• $(2)$ is also $(10)$ from this answer. – robjohn Oct 24 '16 at 11:34
• @ robjohn. Thank you I see. – 926reals Oct 25 '16 at 2:38 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877007780706,
"lm_q1q2_score": 0.8007928541795087,
"lm_q2_score": 0.8152324960856175,
"openwebmath_perplexity": 679.3937672315192,
"openwebmath_score": 0.9521764516830444,
"tag... |
beginner, html, css, layout
}
.red-dot-1 {
position: absolute;
color:#ff0000;
top: 28px;
left: 782px;
font-size: 5px;
}
.notify {
position: absolute;
color: rgb(3, 3, 3,0.6);
top: 32px;
left: 840px;
font-size: 1em;
}
.red-dot-2 {
position: absolute;
color: #ff0000;
t... | {
"domain": "codereview.stackexchange",
"id": 34424,
"lm_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, html, css, layout",
"url": null
} |
ros-melodic, roslaunch, rosbag, network, remote-launch
Launch of the following nodes most likely failed: rosbag/record
Does anyone have an idea on what is going wrong here?
Originally posted by max11gen on ROS Answers with karma: 164 on 2020-02-24
Post score: 0
export ROS_MASTER_URI=10.0.0.2
As the name of the va... | {
"domain": "robotics.stackexchange",
"id": 34481,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic, roslaunch, rosbag, network, remote-launch",
"url": null
} |
thermodynamics, pressure
\end{equation}
But the relation $-p = \left(\frac{\partial U}{\partial V}\right)_T$ can't be correct because we have the very general relation
$$C_p - C_v = \left(p + \left(\frac{\partial U}{\partial V}\right)_T\right)\left(\frac{\partial V}{\partial T}\right)_p \neq 0.$$
So there are two opti... | {
"domain": "physics.stackexchange",
"id": 51274,
"lm_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, pressure",
"url": null
} |
# Antiderivative and definite integral
If $f$ is a continuous, real-valued function on interval $[a,b]$, then the fundamental theorem of calculus tells us that
$$\int_a^x f(t)dt=F(x)$$
where $F(x)$ is antiderivative, i.e. $F(x)'=f(x)$.
If so, why I can't find the equality $\int f(x)dx=\int_a^x f(t)dt=F(x)$ anywhere... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102580527664,
"lm_q1q2_score": 0.8123672601816389,
"lm_q2_score": 0.8397339736884712,
"openwebmath_perplexity": 245.71138200926248,
"openwebmath_score": 0.9863078594207764,
"ta... |
natural-language-processing, reference-request, natural-language-understanding, text-summarization
Title: How would you build an AI to output the primary concept of a paragraph? My thinking is you input a paragraph, or sentence, and the program can boil it down to the primary concept(s).
Example:
Input:
Sure, it woul... | {
"domain": "ai.stackexchange",
"id": 1860,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "natural-language-processing, reference-request, natural-language-understanding, text-sum... |
rotational-dynamics, reference-frames
Now suppose that the particles are indeed stuck together to form a rigid body. We see that the body is moving so that: 1) the CofM remains fixed, 2) all the distances between the particles are fixed. (This second condition is what is meant by a $rigid$ body after all).
A motion... | {
"domain": "physics.stackexchange",
"id": 37763,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rotational-dynamics, reference-frames",
"url": null
} |
geophysics, geography, earth-observation
The earth's shadow cast on the moon during an eclipse. It is easy to observe and the flat earth counter argument is so insane that if it is offered you should just walk away.
Shadows differ from place to place. The same experiment as Eratosthenes but you can carry this out loca... | {
"domain": "earthscience.stackexchange",
"id": 2710,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geophysics, geography, earth-observation",
"url": null
} |
javascript, d3.js
function updateChart(data) {
// Divisions
var divisions = d3.nest().key(d=>d.division).entries(data);
var divisionCharts = d3.select("body").selectAll("svg").data(divisions, d=>d.key);
var divisionChartsEnter = divisionCharts.enter().append("svg").attr("width", 200).attr("height", 75);
... | {
"domain": "codereview.stackexchange",
"id": 31307,
"lm_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, d3.js",
"url": null
} |
lambda-calculus, semantics, typing, type-inference, type-checking
$\lambda$-abstraction, and thus without changing its type.
By writing $\Gamma, x: \tau_1$, we are considering a context $\Gamma$
where the variable $x$ has type $\tau_1$, ignoring what the type of
$x$ may have been in context $\Gamma$ alone. If $x$ cou... | {
"domain": "cs.stackexchange",
"id": 3134,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lambda-calculus, semantics, typing, type-inference, type-checking",
"url": null
} |
retaught graphing roses and then we began converting from polar form to rectangular and rectangular to polar. Polar Graph Paper Radians. Until now, we have worked in one coordinate system, the Cartesian coordinate system. Draw a horizontal line to the right to set up the polar axis. 3 Polar Coordinates 667 y x Polar ax... | {
"domain": "ciadarredamenti.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9898303401461468,
"lm_q1q2_score": 0.8373394866206931,
"lm_q2_score": 0.8459424334245618,
"openwebmath_perplexity": 598.200690655468,
"openwebmath_score": 0.9244123101234436,
"tag... |
c#, .net
public bool IsSynchronized
{
get
{
return ((IList)_List).IsSynchronized;
}
}
public object SyncRoot
{
get
{
return ((IList)_List).SyncRoot;
}
}
#endregion
#region Methods
private void OnCollectionChanged(... | {
"domain": "codereview.stackexchange",
"id": 4763,
"lm_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
} |
data-structures, functional-programming
Title: Does immutability in functional programming really exist? Although I work as a programmer in my daily life and use all the trendy languages (Python, Java, C, etc) I still have no clear view of what functional programming is. From what I've read, one property of functional... | {
"domain": "cs.stackexchange",
"id": 21705,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "data-structures, functional-programming",
"url": null
} |
Examples
--------
>>> f = lambda x: x**2 - x - 1
>>> secant(f,1,2,5)
1.6180257510729614
'''
if f(a)*f(b) >= 0:
print("Secant method fails.")
return None
a_n = a
b_n = b
for n in range(1,N+1):
m_n = a_n - f(a_n)*(b_n - a_n)/(f(b_n) - f(a_n))
f_m_n = f(m_n)
if f(a_n)*f_m_n < 0:
a_n = a_n
b_n = m_n
elif f(b_n)*f_m_n < 0:
... | {
"domain": "ubc.ca",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9884918529698321,
"lm_q1q2_score": 0.8104578763294714,
"lm_q2_score": 0.8198933293122507,
"openwebmath_perplexity": 867.208416866174,
"openwebmath_score": 0.8062421083450317,
"tags": null,
... |
objective-c, opengl, cocoa
if (!shaderValue) MOLogError(@"Shader %@ not found.",shaderKey);
return [shaderValue pointerValue];
}
- (GLint)uniformLocationForName:(NSString*)varName
{
NSNumber* uniformLocation = [[[self uniformVariablesByShader] objectForKey:[self currentShader]] objectForKey:varName];
if... | {
"domain": "codereview.stackexchange",
"id": 941,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "objective-c, opengl, cocoa",
"url": null
} |
python, gui, tkinter, matplotlib, sympy
# execute main loop on base instance
root.mainloop()
Again I would like to thank any advice and criticisms offered up in advance! There are a lot of PEP 8 issues in your code. I recommend reading through that document.
It is recommend to avoid using eval, as it makes your code... | {
"domain": "codereview.stackexchange",
"id": 24993,
"lm_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, gui, tkinter, matplotlib, sympy",
"url": null
} |
1. Find the pmf of $$Y$$.
2. How could you use simulation to approximate the long run average value of $$Y$$?
3. How could you simplify the calculation in the previous part? In other words, based on the theoretical distribution of $$Y$$, what would be the corresponding mathematical formula for the theoretical long run ... | {
"domain": "bookdown.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850857421198,
"lm_q1q2_score": 0.8234516974577494,
"lm_q2_score": 0.8376199673867852,
"openwebmath_perplexity": 309.1255820688306,
"openwebmath_score": 0.9020584225654602,
"tags": n... |
c, caesar-cipher
Title: Caesar cipher in C I've written a simple program that encrypt and decrypt a string using Caesar cipher.
There are some examples to show how it works:
$ cae encrypt "Hello World!" 5
Mjqqt Btwqi!
$ cae decrypt "Mjqqt Btwqi!" 5
Hello World!
$ cae encrypt "Hello world!"
Ebiil Tloia!
$ cae decrypt ... | {
"domain": "codereview.stackexchange",
"id": 27319,
"lm_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, caesar-cipher",
"url": null
} |
homework-and-exercises, forces
Title: Which force to resolve?
In the above image the particle is effectively moving 'out of the page' in circular motion. We want to solve for $\alpha$, the slope is smooth, and the particle is moving neither up nor down the slope.
Which is correct? $R\cos \alpha = mg$ or $R = mg \cos ... | {
"domain": "physics.stackexchange",
"id": 28149,
"lm_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",
"url": null
} |
python
Title: Task management program in Python I made a simple program in Python
stores tasks in the file
allows the user to manage them.
I'm interested if my implementation is efficient and could I do something better. I'm not sure whether loading all data from file to memory and again saving it in the file is a g... | {
"domain": "codereview.stackexchange",
"id": 39542,
"lm_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
} |
asynchronous, f#, concurrency
Title: Is this a good use of Async in F#? I've hacked together some code to read the content from a sequence of files:
let fileContents =
[ "filename1"; "filename2"; "etc" ]
|> Seq.map(fun file -> async {
use fs = new FileStream(file, FileMode.Open, FileAccess.Read, FileS... | {
"domain": "codereview.stackexchange",
"id": 6285,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asynchronous, f#, concurrency",
"url": null
} |
quantum-mechanics, quantum-information, quantum-entanglement, measurement-problem
M2'. Local interactions involving only qubits $a_i$ do not affect the state statistics of qubits $b_i$, and conversely. | {
"domain": "physics.stackexchange",
"id": 27259,
"lm_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, measurement-problem"... |
php, database, laravel
Title: Multi-User Roles in Laravel I am very new to Laravel. I am building a website where multiple users can have one or more roles. I have a users table and a user_roles table. Each user_roles column has a user_id and an enum field where they can be a "referee", "coach", or "player". Whenever ... | {
"domain": "codereview.stackexchange",
"id": 14450,
"lm_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, database, laravel",
"url": null
} |
python, algorithm
and then instead of:
result = getNumberFromStringAndMappingInfo(inResultStr, dictCharAndDigit)
I would write:
result = int(decipher(inResultStr))
This would avoid the need for the getNumberFromStringAndMappingInfo function.
Instead of building a string strFromStrList that concatentates the addends ... | {
"domain": "codereview.stackexchange",
"id": 31785,
"lm_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",
"url": null
} |
pid, differential-drive
What is a better approach?
There are several things you can do, depending on what your tolerance for errors are and how much effort you want to put into correcting them.
The first step would be to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I s... | {
"domain": "robotics.stackexchange",
"id": 222,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pid, differential-drive",
"url": null
} |
matlab, digital-communications, mimo, channel, svd
Title: Delayed waves existing MIMO eigenmode transmission Assume that the numbers of transmitting antennas, receiving antennas, and delayed waves are $N_t$, $N_r$, and $N_p$, respectively. The channel matrix is three-dimensional ($N_r$, $N_t$, $N_p$).
In eigenmode tra... | {
"domain": "dsp.stackexchange",
"id": 12288,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, digital-communications, mimo, channel, svd",
"url": null
} |
$$-\pi z^2+\pi z+4\sqrt{1-2z-z^2}\left(\frac{z^2}3+\frac z6-\frac56\right)+(6-z)\sqrt{1-2z-z^2}+\frac{15}2\arctan{\frac{1+z}{\sqrt{1-2z-z^2}}}+\frac12\arctan\frac{1-3z}{\sqrt{1-2z-z^2}}-4\arcsin\frac{1+z}{\sqrt2}+4(z-1)z\arccos\frac z{\sqrt{1-2z}}$$
but refuses to evaluate it with limits. Substituting the limits by ha... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986979508737192,
"lm_q1q2_score": 0.8046177662778635,
"lm_q2_score": 0.8152324938410784,
"openwebmath_perplexity": 382.1676020260141,
"openwebmath_score": 0.9619895815849304,
"tags... |
notation, chaos-theory
$$\sigma \, : \, \Sigma \, \to \, \Sigma$$ $$\sigma \big(s_0, s_1, s_2, ..., s_n, ...\big) = \big(s_1, s_2, ..., s_{n+1}, ...\big)$$ The claim is that the dynamics of $f$ on $I$ is equivalent (indistinguishable, whatever happens for one system, the same happens for the other) to the dynamics of ... | {
"domain": "physics.stackexchange",
"id": 40037,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "notation, chaos-theory",
"url": null
} |
electricity, power, statistics
Title: Calculating kWh from time series of kW I have a time series of kW where each sample is measured at regular intervals (10 seconds). Could anyone explain to me how could I calculate the total power consumed (kWh) over an hour?
Thanks In general, if you have a list of datapoints $p_n... | {
"domain": "physics.stackexchange",
"id": 13261,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, power, statistics",
"url": null
} |
c++, c++11, queue
{
if (empty())
{
throw std::out_of_range("List<Type>::top: empty stack");
}
return tail->element;
}
//--------------------------------------------------------------------------
template <typename Type>
size_t Deque<Type>::size() const
{
return count;
}
//------------------... | {
"domain": "codereview.stackexchange",
"id": 31457,
"lm_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, queue",
"url": null
} |
$$\le \frac{1}{2}<\ln 2=\ln(1+1)\le \ln(1+x)$$
because $1=\ln e<\ln 4=\ln 2^2$, i.e. $1<2\ln 2$, because $e<4$ and $\ln x$ is strictly increasing when $x>0$.
There is an easy way to prove. Note that $$(1+t)(1-t)=1-t^2\le 1$$ and hence $$\frac{1}{1+t}\ge1-t.$$ Integrating from $0$ to $x$, one has $$\int_0^x\frac{1}{1+... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795106521339,
"lm_q1q2_score": 0.8329071831108635,
"lm_q2_score": 0.8438951104066293,
"openwebmath_perplexity": 198.8789545929558,
"openwebmath_score": 0.9677405953407288,
"tag... |
neutrinos, helicity
Title: Neutrino helicity Neutrinos are produced in beta decays with a given helicity. My question is wether this helicity is a constant of this movement or is it variable? Your starting point
Neutrinos are produced in beta decays with a given helicity.
is plain unsound. Neutrinos are produced wi... | {
"domain": "physics.stackexchange",
"id": 48640,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neutrinos, helicity",
"url": null
} |
redox, stoichiometry
My attempt:
\begin{align}
m(\ce{O2}) &= \pu{ 6.58 g} & \implies&& n(\ce{O2}) &= \pu{0.206 mol}\\
m(\ce{F2}) &= \pu{15.63 g} & \implies&& n(\ce{F2}) &= \pu{0.411 mol}
\end{align}
I also made the equations, where X was the unknown metal:
\begin{align}
\ce{X + y/2 O2 &-> XO_y}\\
\ce{X + z/2 F... | {
"domain": "chemistry.stackexchange",
"id": 8198,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "redox, stoichiometry",
"url": null
} |
pharmacology
Title: Why is Benzylpenicillin better in Bacterial Meningitis than Amoxicillin? Both are beta lactams.
However, benzylpenicillin, which is also called penicillin G i.e. narrow group antibiotic.
I have now in both the following as a mechanism of action
Binds to PBP in bacterial cell wall, causing defici... | {
"domain": "biology.stackexchange",
"id": 9068,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pharmacology",
"url": null
} |
electromagnetism, lagrangian-formalism, momentum, field-theory, noethers-theorem
Below I present what I hope to be a less-confusing development along with same lines as Susskind.
The Lagrange density for electromagnetism in the $A_0=0$ gauge is:
$$
\mathcal{L}=\frac{1}{2}\dot{\vec{A}}^2 - \frac{1}{2}(\vec \nabla \time... | {
"domain": "physics.stackexchange",
"id": 97986,
"lm_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, lagrangian-formalism, momentum, field-theory, noethers-theorem",... |
special-relativity, angular-momentum, dirac-equation, spinors, clifford-algebra
Internal angular momentum as Lorentz group generator
As a demonstration, consider a cloud of non-interacting particles in Minkowski space-time that you are viewing from afar. Let me use 3+1 splitted Minkowski coordinates so that I can defi... | {
"domain": "physics.stackexchange",
"id": 89501,
"lm_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, angular-momentum, dirac-equation, spinors, clifford-algebra",
... |
homework-and-exercises, electrostatics, electric-fields, potential, capacitance
The potential that comes from just one cable is:
$$V_i = -\int_0^r \vec{E} d\vec{r} = \frac{Q}{2\pi L\epsilon_0} \ln \left( \frac{r_i}{|\vec{r}-\vec{r_i}|} \right) $$
Where we assumed that $V(0) = 0$, since this was imposed when we had the... | {
"domain": "physics.stackexchange",
"id": 96638,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electrostatics, electric-fields, potential, capacitance",
... |
electromagnetism, special-relativity, charge
(1)
For a proof see the footnote under my $\color{blue}{\textbf{ANSWER A}}\:$ here : How do we prove that the 4-current jμ transforms like xμ under Lorentz transformation?. | {
"domain": "physics.stackexchange",
"id": 52313,
"lm_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, special-relativity, charge",
"url": null
} |
evolution
Title: Why can't we propose a solid theory regarding origin of life? What information is greatly lacking which does not allow us to propose a solid theory for origin of life ? First of all, we do have some solid theories to explain the origin of life. That said, the main thing missing in order to be able t... | {
"domain": "biology.stackexchange",
"id": 7843,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution",
"url": null
} |
12. Aug 20, 2004
### HallsofIvy
Staff Emeritus
Actually, (cos(x)+ i sin(x))n= cos(nx)+ i sin(nx) can be proved directly without using Taylor series or Euler's formula:
(cos(x)+ i sin(x))2= cos2(x)+ 2i sin(x)cos(x)- sin2(x)= (cos2(x)- sin2(x))+ i (2sin(x)(cos(x))
which is equal to cos(2x)+ i sin(2x) by trig identitie... | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713878802045,
"lm_q1q2_score": 0.8294267238207041,
"lm_q2_score": 0.8418256472515683,
"openwebmath_perplexity": 1015.8625495780658,
"openwebmath_score": 0.9071497917175293,
... |
For the author's proof, the first equation given follows from $$\frac{1}{ab}\geq\frac{4}{(a+b)^2}$$ by simply adding a bunch of terms of that form, but the second equation. The second equation follows from Cauchy-Schwarz, which says (when restricted to real numbers) that $$\left(\sum_{i\in I} \alpha_i \beta_i\right)^2 ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9648551515780318,
"lm_q1q2_score": 0.8365639194474974,
"lm_q2_score": 0.8670357598021707,
"openwebmath_perplexity": 308.7654040100039,
"openwebmath_score": 0.8704067468643188,
"tag... |
Step 1:
Multiply the 1st row of the first matrix and 1st column of the second matrix, element by element. The result goes in the position (1, 1)
$\left[ {\begin{array}{*{20}{l}} \color{red}{1}&\color{red}{3}&\color{red}{5}\\ 2&4&6 \end{array}} \right] \cdot \left[ {\begin{array}{*{20}{l}} \color{blue}{3}&6\\ \color{b... | {
"domain": "mathportal.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9946150617189832,
"lm_q1q2_score": 0.8266674021630286,
"lm_q2_score": 0.8311430562234877,
"openwebmath_perplexity": 262.4977137983196,
"openwebmath_score": 0.8934695720672607,
"tags":... |
smoothing, interpolation, peak-detection
Im my script I had to test for if the derivative changes from negative to positive to get the function to give the desired result, however this confuses me.
Should not the derivative for a maximum go from positive to negative?
Is there some better way to distinguish between max... | {
"domain": "dsp.stackexchange",
"id": 230,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "smoothing, interpolation, peak-detection",
"url": null
} |
Third edit: $X_\ell$ or $X_u$ could be empty... and also $X_m$ empty with one of them.
• RANGE WILL BE WITHIN 10^18 – savvi singh Jul 12 '14 at 19:34
• Ah... Then all the numbers will be small enough that this will not be slow. (In particular, the product of the $n_i$ will be no worse than a few thousand, which is a v... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936073551713,
"lm_q1q2_score": 0.8324865428346753,
"lm_q2_score": 0.8459424353665381,
"openwebmath_perplexity": 191.17967005023604,
"openwebmath_score": 0.7351123690605164,
"ta... |
haskell, parsing, scheme
Avoid shadow bindings
e.g. in makeFunc
Supply type signatures for all toplevel functions
Use pure values and functions whenever possible
Is there a reason you use an IORef [(String, IORef LispVal)] instead of simply [(String, LispVal)] (or better a HashMap from unordered-containers)?
Don't un... | {
"domain": "codereview.stackexchange",
"id": 8156,
"lm_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, parsing, scheme",
"url": null
} |
mathematical-programming
One solution I thought might work would be to convert the 3D version of C into a point on a triangle expressed as a weighting of its vertices (where each vertex corresponds to one of C's components), and then convert that point in 2D coordinate space into a categorisation based on where it fal... | {
"domain": "cs.stackexchange",
"id": 16983,
"lm_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-programming",
"url": null
} |
python, beginner, game
***********************************************
***********************************************
***********************************************
***********************************************
***********************************************
************************************... | {
"domain": "codereview.stackexchange",
"id": 42780,
"lm_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, game",
"url": null
} |
java, performance
The custom method makes use of a tiny hack in order to print the two byte pairs of a MAC segment.
It seems that the algorithm spends most of the time within the array to hex string formating. I'd therefore highly suggest to change from the String formatter to a custom one as this only requires a frac... | {
"domain": "codereview.stackexchange",
"id": 21355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance",
"url": null
} |
convolution, and transforms of signals. This video presents how to perform linear convolution using the Discrete Fourier Transform (DFT). Example: up-sampling a signal by a factor of 2 to create. The FFT & Convolution •The convolution of two functions is defined for the continuous case –The convolution theorem says tha... | {
"domain": "coopruah.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471680195556,
"lm_q1q2_score": 0.82822778291892,
"lm_q2_score": 0.8418256512199033,
"openwebmath_perplexity": 860.205398522123,
"openwebmath_score": 0.8229966163635254,
"tags": null,... |
c++, c++20
Title: Array based queue implementation with C++20 I implemented a queue that holds elements on an array as underlying data type:
#include <cstddef>
#include <cassert>
#include <concepts>
#include <stdexcept>
#include <type_traits>
#include <iostream>
namespace mine {
template <std::semiregular T, std::siz... | {
"domain": "codereview.stackexchange",
"id": 40026,
"lm_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++20",
"url": null
} |
algorithms, graphs
Title: "Breadth course" problem – find maximum independent set given all maximal cliques One of the undergraduate degree requirements at my university is that all Letters and Science students must take a "breadth course" in each of seven categories. If a course has multiple associated categories, yo... | {
"domain": "cs.stackexchange",
"id": 9964,
"lm_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, graphs",
"url": null
} |
thermodynamics, cosmology, chemical-potential
Title: Intuition about the cosmological significance of the chemical potential A definition of the chemical potential that has always served me well is
$$\mu_i = \Big(\frac{\partial U}{\partial N_i}\Big)_{S,V},$$
that is, the amount of energy one would have to add to a sys... | {
"domain": "physics.stackexchange",
"id": 30551,
"lm_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, cosmology, chemical-potential",
"url": null
} |
special-relativity, visible-light, speed-of-light, inertial-frames, observers
Title: What will the observer observe? Consider the case where observer $A$ is at rest, and observer $ B$ is moving with speed $\frac{c}{2}$ (where $c$ is the speed of light) propagating a wave with wave speed $c$. So my question is what wil... | {
"domain": "physics.stackexchange",
"id": 49789,
"lm_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, visible-light, speed-of-light, inertial-frames, observers",
... |
python, python-3.x
Title: Random Forest - ValueError: Input contains NaN, infinity or a value too large for dtype('float32') I'm trying to apply the RandomForest method to a dataset and I get this error:
ValueError: Input contains NaN, infinity or a value too large for dtype ('float32')
Could someone tell me what I ca... | {
"domain": "datascience.stackexchange",
"id": 6950,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x",
"url": null
} |
special-relativity, relativity, inertial-frames
So could rotations mix space and time? Well, not if we demand causality stays true. You can always find a rotation that would invert the direction of the time difference between two events.
The only other possibility is a boost where we replace our $K$ matrix with $K = ... | {
"domain": "physics.stackexchange",
"id": 31559,
"lm_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, relativity, inertial-frames",
"url": null
} |
temperature, water
Title: Sudden Localized Surface Water Temperature Increase In Eastern Lake Superior, Canada As can be seen in the below sequence of NOAA images spanning 15 hours (most recent at top), in extreme eastern Lake Superior the surface water (but not bottom water) temperature increased dramatically in a lo... | {
"domain": "earthscience.stackexchange",
"id": 375,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "temperature, water",
"url": null
} |
javascript
I have a chart.js Pie chart that I'm feeding this data to. I'm using the name for the labels and the count for the size of each slice of the pie chart. Now, due to how chart.js works, I have to supply some hexadecimal colors to use as background colors, and the order in which the background color is being d... | {
"domain": "codereview.stackexchange",
"id": 40386,
"lm_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
} |
gazebo
Title: What unit is "SetForce" on a revolute joint?
I have not been able to determine the unit used for applying force to a joint with SetForce(). I assume that its argument is Torque [Nm] but I didn't find it in the documentation and must admit that the name of the method confuses me a bit?
Is there a reason ... | {
"domain": "robotics.stackexchange",
"id": 4306,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
php, array, recursion
Title: Adjacency list with array data I came through a question on Stack Overflow, which shows this array structure:
array (size=4)
0 =>
array (size=3)
'id' => int 1
'name' => string 'Anniversary' (length=11)
'parent' => int 0
1 =>
array (size=3)
'id' => int ... | {
"domain": "codereview.stackexchange",
"id": 14391,
"lm_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, array, recursion",
"url": null
} |
java, homework, rational-numbers
public class Main {
public static void main(String[] args) {
Fraction f1 = new Fraction(45, 21);
Fraction f2 = new Fraction(9, 12);
// add
Fraction f3 = f1.add(f2);
System.out.println(f1 + " + " + f2 + " = " + f3);
// substract
... | {
"domain": "codereview.stackexchange",
"id": 30072,
"lm_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, homework, rational-numbers",
"url": null
} |
c#, algorithm, tree, pathfinding
Title: A* path finding algorithm for a red-black tree So far I've implemented a way to add to my RedBlackTree (will be used with A* pathfinding - hence the F value). I'm not entirely sure how to improve it further.
I want to add a remove function to this tree, but can't find anything ... | {
"domain": "codereview.stackexchange",
"id": 37261,
"lm_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, tree, pathfinding",
"url": null
} |
php
return new WeatherStatus(
$json->weather[0]->main,
(float) $json->main->temp,
);
}
}
Also notice how I wrap each statement in separate try-catch to only catch what can be caught. As long as they are handled the same way you try-catch both together but maybe you should catch their common ancestor... | {
"domain": "codereview.stackexchange",
"id": 39282,
"lm_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",
"url": null
} |
c++, performance, api, symbolic-math
#include <memory>
#include <vector>
namespace mx
{
class SField;
class Var;
namespace IMPLEMENTATION
{
class Node;
class VarNode;
class ConstNode;
class UnOp;
class BinOp;
class BaseUnOp;
class BaseBinOp;
... | {
"domain": "codereview.stackexchange",
"id": 45345,
"lm_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, api, symbolic-math",
"url": null
} |
python, parsing
42 8.41701e-006 2e-005 2.02e-005
43 1.22973e-005 2e-005 2.02e-005
44 1.66192e-005 2e-005 2.02e-005
45 2.13463e-005 2e-005 2.02e-005
46 2.64597e-005 2e-005 2.02e-005
47 3.19739e-005 2e-005 2.02e-005
48 3.78825e-005 2e-005 2.02e-005
49 4.419... | {
"domain": "codereview.stackexchange",
"id": 36156,
"lm_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, parsing",
"url": null
} |
ros, ros-melodic, documentation
Title: docs.ros.org down/broken?
docs.ros.org seems to be broken. For example here is the link for the AsyncSpinner for melodic (I get a 404): http://docs.ros.org/melodic/api/roscpp/html/classros_1_1AsyncSpinner.html
Originally posted by tyler-picknik on ROS Answers with karma: 241 o... | {
"domain": "robotics.stackexchange",
"id": 34388,
"lm_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, ros-melodic, documentation",
"url": null
} |
python, python-3.x, datetime, reinventing-the-wheel
Furthermore, you can make is_leap_year a one-liner, since the if-else blocks and zero-comparisons are a bit verbose for my taste of "pythonicness":
def is_leap_year(year):
return not year % 4 and (year % 100 or not year % 400)
Also I find it a bit intricately, t... | {
"domain": "codereview.stackexchange",
"id": 23825,
"lm_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, datetime, reinventing-the-wheel",
"url": null
} |
lstm, rnn, pytorch, bias, weight-initialization
Although I don't see how that match the variables in the pytorch documentation that I linked to above, such as:
~LSTM.weight_ih_l[k]
– the learnable input-hidden weights of the \text{k}^{th}k
th
layer (W_ii|W_if|W_ig|W_io), of shape (4hidden_size, input_size) for k = 0... | {
"domain": "datascience.stackexchange",
"id": 11080,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lstm, rnn, pytorch, bias, weight-initialization",
"url": null
} |
electricity
Title: Potential drop in a wire having negligible resistance What causes a potential drop in a resistor or load? Why a wire having neglible resistance have same potential across it?
The given figure is of a stretched wire potentiometer.
My question is why point a and A have same potential after connection... | {
"domain": "physics.stackexchange",
"id": 61889,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity",
"url": null
} |
organic-chemistry, reaction-mechanism
Could someone show how this mechanism works or explain a bit about how the presence of $\ce{HgSO4}$ and $\ce{H2SO4}$ affect the reaction? Let's first look at the acid-catalyzed hydration of an alkyne. Just like in the analogous reaction of alkenes, the new proton goes to the least... | {
"domain": "chemistry.stackexchange",
"id": 4509,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism",
"url": null
} |
particle-physics, antimatter, cp-violation, baryons
Title: What is the correct term for the "polarity" of matter (matter vs. antimatter)? Are fractional polarities allowed? What is the correct term for the "polarity" of matter (matter vs. antimatter)?
Are neutral polarities allowed? (1,0,-1)
Are fractional polarities ... | {
"domain": "physics.stackexchange",
"id": 1769,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, antimatter, cp-violation, baryons",
"url": null
} |
clustering, scikit-learn, k-means
Title: How to interpret silouette coefficient? I'm trying to determine number of clusters for k-means using sklearn.metrics.silhouette_score. I have computed it for range(2,50) clusters. How to interpret this? What number of clusters should I choose? They are all bad. A good Silhouett... | {
"domain": "datascience.stackexchange",
"id": 1150,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clustering, scikit-learn, k-means",
"url": null
} |
species-identification, entomology
Title: I need help identifying a bug Basically this tiny bug plopped on top of my laptop keyboard. And as much as I disdained bugs, this one didn't look like anything I've ever seen. It had something that resembled bits of a dandelion on its back, and its body seemed like half a moth... | {
"domain": "biology.stackexchange",
"id": 8108,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "species-identification, entomology",
"url": null
} |
To define Luzin sets, we focus on the Euclidean space $\mathbb{R}$. Let $A \subset \mathbb{R}$. The set $A$ is said to be a Luzin set if for every set $W \subset \mathbb{R}$ that is of first category in the real line, $A \cap W$ is at most countable. The Russian mathematician Luzin in 1914 constructed such an uncountab... | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429619433693,
"lm_q1q2_score": 0.8278033273593683,
"lm_q2_score": 0.8418256492357358,
"openwebmath_perplexity": 239.6477656412658,
"openwebmath_score": 0.995428204536438,
"tags": n... |
python, beginner, python-3.x, tic-tac-toe
Title: A Simple Tic-Tac-Toe Game I wrote a simple tic-tac-toe game in Python. I'm pretty much a novice, but I do have some experience with coding other things in Python. I just wanted to see if I was capable of writing a simple tic-tac-toe game, since I never really went throu... | {
"domain": "codereview.stackexchange",
"id": 43268,
"lm_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, tic-tac-toe",
"url": null
} |
fluid-dynamics, acoustics, everyday-life, frequency, spectroscopy
Title: Early warning system for car crashes? Like the sound system used for recognizing and locating gunshots(gunfire locator) could one be built for car accidents? Even though a car accident has a much wider range of potential sound could enough shared... | {
"domain": "physics.stackexchange",
"id": 34202,
"lm_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, acoustics, everyday-life, frequency, spectroscopy",
"url": null
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.