text stringlengths 1 1.11k | source dict |
|---|---|
java, performance, game
g.setColor(color);
g.fillRect(x, y, x + cellWidth(), y + cellHeight());
System.out.println(cellWidth());
g.setColor(Color.BLACK); //border to cells, purely aesthetic
g.drawLine(x, y, x, y + cellHeight());
g.drawLine(x, y + cellHeight(), x + cellWidth(), ... | {
"domain": "codereview.stackexchange",
"id": 13519,
"lm_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, game",
"url": null
} |
algorithms, strings, substrings
Title: Finding the smallest string that contains a given set of substrings The algorithm I am looking for has the following requirements: Input is a set of strings. You are looking for a string containing all input strings. The resulting string should be as short as possible. At least s... | {
"domain": "cs.stackexchange",
"id": 10826,
"lm_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, strings, substrings",
"url": null
} |
classical-mechanics, momentum
Note: I had posted this question on the Mathematics Stack Exchange - there was some helpful discussion around the problem, but I had not figured on factoring in momentum and other physical attributes (was originally just thinking about the angles). I am thinking now that it's more applica... | {
"domain": "physics.stackexchange",
"id": 39802,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, momentum",
"url": null
} |
graphs
The edge was not on a cycle. In that case, removing the edge increases the number of connected components by one: otherwise, $u,v$ are connected by some simple path not involving $(u,v)$, which together with $u,v$ would form a cycle. Therefore by the induction hypothesis, the number of cycles in the new graph i... | {
"domain": "cs.stackexchange",
"id": 12712,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs",
"url": null
} |
javascript, search
def add_range(self, value: T, start: int, stop: int):
self._root.add_range(value, start, stop, 0, self._size)
def get_point(self, point: int) -> Optional[T]:
try:
return self._root.get_point(point)
except AttributeError:
return None
if __name__ =... | {
"domain": "codereview.stackexchange",
"id": 40868,
"lm_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, search",
"url": null
} |
cc.complexity-theory, np-hardness, complexity-classes
all of these inputs. Now, $D^r_g$ is defined as a CNF/DNF switch of $C^k_g$, so there might be a number of new errors on T0, coming from this switch. On T1 also, there are no new errors on $C^k_g$ - each error has to be present on either of gate inputs, and similar... | {
"domain": "cstheory.stackexchange",
"id": 4084,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, np-hardness, complexity-classes",
"url": null
} |
c, image, bmp
FILE *in_file = stdin;
struct flags options = { false, false, false, false, stdout };
int result = EXIT_SUCCESS;
parse_options(long_options, "grsbho:", &options, argc, argv);
if ((optind + 1) == argc) {
in_file = (errno = 0, fopen(argv[optind], "rb"));
if (!in_file) {
... | {
"domain": "codereview.stackexchange",
"id": 45150,
"lm_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, image, bmp",
"url": null
} |
quantum-field-theory, mathematics, foundations
unworkable (such as performing derivations in an interaction picture)? How is possible to meaningful derivations with mathematically meaningless formalism? Excellent question! One that addresses the very nature of the scientific method as applied to physics. My views here... | {
"domain": "physics.stackexchange",
"id": 60970,
"lm_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, mathematics, foundations",
"url": null
} |
c++, c++20, odbc
int main()
{
auto odbc = ...;
OdbcBinder<Incident> binder(odbc,
&Incident::id,
&Incident::comments,
...
&Incident::timeSend
);
std::vector<Incident> v = binder.GetResult(...);
}
The idea being that the constructor of OdbcBinder sees all the columns... | {
"domain": "codereview.stackexchange",
"id": 42334,
"lm_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, odbc",
"url": null
} |
quantum-mechanics
$$
where $V$ is the quantum potential function. In addition, the StackExchange links here and here both suggest that the force truly is proportional to the overall energy, agreeing with my professor.
So, in short, what's going on here? Why is the force dependent on $\langle \hat{H} \rangle$, not $\la... | {
"domain": "physics.stackexchange",
"id": 73375,
"lm_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",
"url": null
} |
c#, beginner, mvc, controller
if (queryCount < 1)
{
// checks external database of students
try
{
var bsh = ExternalDB.v_View.FirstOrDefault(s => s.ID == StudentID);
if (bsh == null)
{
ViewBag.Message = "Student ID # not found in the syste... | {
"domain": "codereview.stackexchange",
"id": 23396,
"lm_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, mvc, controller",
"url": null
} |
-
I suppose we all have our own "ad hoc" methods. I would have "noticed" that multiplying by $3$ gives $x \equiv 21 \equiv 8$ (mod $13$). I have always believed that Gauss invented modular arithmetic. It is certainly discussed at length in Disquisitiones Arithmeticae, which I own a copy of. – Geoff Robinson Jul 24 '12... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426412951847,
"lm_q1q2_score": 0.8336355135381395,
"lm_q2_score": 0.8558511488056151,
"openwebmath_perplexity": 484.1728047110517,
"openwebmath_score": 0.8980107307434082,
"tag... |
statistical-mechanics, resource-recommendations
Khinchin on a mathematical formulation of statistical mechanics
Jaynes on a statistical inference interpretation of statistical mechanics
Fermi with the Pasta-Ula-Fermi problem
Kolmogorov-Arnold and Moser for the KAM theorem
Oliver Penrose (brother of Roger Penrose) has ... | {
"domain": "physics.stackexchange",
"id": 9286,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, resource-recommendations",
"url": null
} |
c, reinventing-the-wheel, library, integer
unsigned int FromStringToUnsignedInteger(char inputString[])
{
unsigned long long boundariesChecker;
unsigned int returnResult; returnResult = 0;
int counter; counter = 0;
// if the ASCII value is not between 48 and 57 inclusive, that's an error, except for '\... | {
"domain": "codereview.stackexchange",
"id": 9853,
"lm_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, reinventing-the-wheel, library, integer",
"url": null
} |
audio, frequency-spectrum
As your audio amplitude is not full scale 100% but less, the decibel scale is always negative referenced to full scale.
If you are expecting positive decibel values, it likely comes from the fact that sound pressure is referenced to (approximately) the smallest audible level to humans, 20 mic... | {
"domain": "dsp.stackexchange",
"id": 12189,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "audio, frequency-spectrum",
"url": null
} |
= 1; x n+1 = (1=2)x n + 1;n2N:. Sequences that are not convergent are said to be divergent. • If f 0 (r) = 0, the sequence converges at least quadratically to the fixed point (this is sometimes called superconvergence in the dynamical systems literature). WIJSMAN(i) 0. Absolute and conditional convergence Remarks: I Sev... | {
"domain": "jf-huenstetten.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071502644802,
"lm_q1q2_score": 0.8665088798375652,
"lm_q2_score": 0.8723473697001441,
"openwebmath_perplexity": 560.7047789038782,
"openwebmath_score": 0.8878056406974792,
... |
ros, installation, catkin, rosrun
Title: Installing a catkin package without work space
To my understanding, catkin provides 2 different functionalities:
a way to handle dependencies between packages in the installation process and
a tool to create ROS services and messages.
As I am already using appropriate tools ... | {
"domain": "robotics.stackexchange",
"id": 16338,
"lm_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, installation, catkin, rosrun",
"url": null
} |
newtonian-mechanics, energy, kinematics, speed
This is the original demonstration of the laws of elastic collisions by Christian Huygens, who argued that if you drop two masses on pendulums, and let them collide, their center of mass has to go up to the same height, if you catch the balls at their maximum point. From ... | {
"domain": "physics.stackexchange",
"id": 89780,
"lm_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, energy, kinematics, speed",
"url": null
} |
c#, beginner, object-oriented, quiz
private void Init()
{
students = fileManager.LoadStudents();
test = fileManager.LoadTest();
}
/// <summary>
/// Verifies that the login details match what is in the system
/// </summary>
/// <param name="username">The username of the student<... | {
"domain": "codereview.stackexchange",
"id": 29733,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, object-oriented, quiz",
"url": null
} |
quantum-mechanics, quantum-entanglement, faster-than-light, bells-inequality, non-locality
$$\rho=1/2*|\uparrow_z\rangle\langle\uparrow_z|+1/2*|\downarrow_z\rangle\langle\downarrow_z|=1/2*|\uparrow_m\rangle\langle\uparrow_m|+1/2*|\downarrow_m\rangle\langle\downarrow_m| $$
This means that the statistical distribution o... | {
"domain": "physics.stackexchange",
"id": 43828,
"lm_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-entanglement, faster-than-light, bells-inequality, non-... |
navigation, ros-melodic, ubuntu, transform, robot-localization
Camera odometry velocity (X,Y)
Sensor Output Sample:
From: rostopic list echo /
header:
seq: 0
stamp:
secs: 1517941154
nsecs: 288109779
frame_id: "camera"
child_frame_id: ''
pose:
pose:
position:
x: 0.0
y: 0.0
z:... | {
"domain": "robotics.stackexchange",
"id": 33290,
"lm_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, ros-melodic, ubuntu, transform, robot-localization",
"url": null
} |
complexity-theory, np-complete, reductions
Title: Understanding reductions for NP-completeness Let's I have to make the following reduction:
$$\text{CLIQUE}\le_p \text{VERTEX-COVER}$$
The technique of building the reduction is -
Assume you can find a $\text{VERTEX-COVER}$ of size $k$, in polynomial time.
Building a n... | {
"domain": "cs.stackexchange",
"id": 11950,
"lm_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",
"url": null
} |
vba, excel, subroutine
If v Like "City/State:*" Then s2.Cells(K, 6) = Split(Split(v, ": ")(1), ", ")(1)
If v Like "County:*" Then s2.Cells(K, 7) = Split(v, ": ")(1)
If v Like "Home Phone:*" Then s2.Cells(K, 8) = Split(v, ": ")(1)
If v Like "Work Phone:*" Then s2.Cells(K, 9) = Split(... | {
"domain": "codereview.stackexchange",
"id": 28124,
"lm_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, excel, subroutine",
"url": null
} |
ruby
Title: How do I avoid multiple chain calls? Imagine code that reads from a file, cleans the data and finally writes the cleaned data to a new file.
Let's briefly define these methods as Ruby stubs:
def write(filename, data)
File.open(filename, "w") do |f|
f.write(data.to_yaml)
end
end
def read(filena... | {
"domain": "codereview.stackexchange",
"id": 27357,
"lm_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",
"url": null
} |
Prompt: if y is an integer , is y^2 divisible by 4?
Fact #1: In order for an integer N to be divisible by 4, N must have at least two factors of 2 in its prime factorization.
Fact #2: When you square a number, say T^2, whatever prime factors are in the prime factorization of T are doubled in the prime factorization o... | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9579122720843811,
"lm_q1q2_score": 0.8728302326482829,
"lm_q2_score": 0.9111797166446537,
"openwebmath_perplexity": 2076.712551461292,
"openwebmath_score": 0.6103289723396301,
"tags": n... |
javascript, performance, jquery, canvas
This is the (actual size) blend mask I've devised to control the most basic blending technique. There are six color ranges, each representing which tile to pull blend a texture from, and at which opacity:
0<Red<127: Top Right
0<Green<127: Mid Right
0<Blue<127: Bot Right
128<Red... | {
"domain": "codereview.stackexchange",
"id": 2632,
"lm_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, performance, jquery, canvas",
"url": null
} |
# Empty set and universal instantiation
I am having trouble understanding when is a set not being an empty set an important criterion. I was working on the following:
Suppose $R$ is a relation on $A$. Let $B=\{ X\in P(A)\mid X \neq \emptyset \}$, and define a relation $S$ on $B$ as follows:
$S=\{ (X,Y)\in B\times B\... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9621075744568837,
"lm_q1q2_score": 0.8234208711048118,
"lm_q2_score": 0.8558511469672594,
"openwebmath_perplexity": 195.05507752758044,
"openwebmath_score": 0.9365362524986267,
"ta... |
c#, performance, enum
public TestResult(string name)
{
this.name = name;
this.milliseconds = new List<double>();
}
public List<double> Milliseconds
{
get
{
return this.milliseconds;
}
}
public ... | {
"domain": "codereview.stackexchange",
"id": 15996,
"lm_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, enum",
"url": null
} |
c++, beginner, object-oriented, game
If it truly is a high score per player, then it should not be made static. If this is not per-player, perhaps it deserves to live in Game instead.
Object ownership
Your Game::console is passed in from the ConsoleFactory, where you are then responsible for deleting it. The safer way... | {
"domain": "codereview.stackexchange",
"id": 37977,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, object-oriented, game",
"url": null
} |
quantum-field-theory, operators, path-integral
to argue that, at least in the 't Hooft-Feynman gauge $\xi=1$, the propagators and ground-state wave-functional are identical to the scalar case (up to a unit matrix in colour space), so that the derivation in the reference holds for a bosonic field of arbitrary spin. The... | {
"domain": "physics.stackexchange",
"id": 46293,
"lm_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, operators, path-integral",
"url": null
} |
javascript, google-chrome, ascii-art
{
return cells[cursor.y] ? cells[cursor.y][cursor.x] || " " : " ";
}
function stringify()
{
var s = '', x, y;
for( y = 0 ; y < cells.length ; y++ )
{
if( cells[y] )
for( x = 0 ; x < cells[y].length ; x++ )
s = s + ( cells[y][x] || " " )... | {
"domain": "codereview.stackexchange",
"id": 8234,
"lm_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, google-chrome, ascii-art",
"url": null
} |
ros, fovis
Originally posted by Pep Lluis Negre with karma: 111 on 2013-02-27
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Spym on 2013-02-27:
Here the results: http://pastebin.com/uAXXdSJq. Sadly, I see no corellation neither with frame switching nor number of keypoints. M... | {
"domain": "robotics.stackexchange",
"id": 12994,
"lm_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, fovis",
"url": null
} |
electromagnetism, waves
A lead (or lead equivalent) apron is a protective garment which is designed to shield the body from harmful radiation, usually in the context of medical imaging. Both patients and medical personnel utilize lead aprons, which are customized for a wide range of usages.
This part of the question... | {
"domain": "physics.stackexchange",
"id": 50665,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, waves",
"url": null
} |
organic-chemistry, reaction-mechanism, stereochemistry
Title: Mechanism of substitution reaction with no change in stereochemistry
When (2S,3R)-3-iodobutan-2-ol undergoes a substitution reaction with sodium azide the only organic product from the reaction is (2S,3R)-3-azidobutan-2-ol. Give a mechanism for the rea... | {
"domain": "chemistry.stackexchange",
"id": 5044,
"lm_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, stereochemistry",
"url": null
} |
c#, sql, file-system
Title: Moving files according to paths in database I'm trying to move a large number of files. I get the path of source and destination from database.
It takes hours to move images, and I was wondering if there is a faster way for moving large numbers of files.
Table example:
source
destination
... | {
"domain": "codereview.stackexchange",
"id": 42326,
"lm_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#, sql, file-system",
"url": null
} |
metric-tensor, tensor-calculus, notation
Title: Einstein summation convention: tensor multiplication with the identity? Suppose we have the following expression $M_{\mu\nu}\omega^{\mu\nu}$, where $M_{\mu\nu} = [M]_{\mu\nu}$ and $\omega_{\mu\nu} = [\omega]_{\mu\nu}$. Now I tell you $w = I$ with $I$ being the identity. ... | {
"domain": "physics.stackexchange",
"id": 96935,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "metric-tensor, tensor-calculus, notation",
"url": null
} |
classical-mechanics, energy, angular-momentum, rotation, rotational-kinematics
In fairness to myself, as I said in my original post, I hypothesized that the marbles probably had picked up a substantial angular velocity by the time they touched the horizontal channel.
Many of the comments in essence reiterated this, wh... | {
"domain": "physics.stackexchange",
"id": 26921,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, energy, angular-momentum, rotation, rotational-kinematics",
... |
cc.complexity-theory, circuit-complexity
There is an excellent book by Jukna which studies different types of branching programs in depth. | {
"domain": "cstheory.stackexchange",
"id": 2257,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, circuit-complexity",
"url": null
} |
python, unit-testing, functional-programming, regex, validation
assert calculate_cost_of_one_paper(
DAYS_PER_WEEK,
set([
date_type(year=2022, month=1, day=2),
date_type(year=2022, month=1, day=2)
]),
(
COST_PER_DAY,
DELIVERY_DATA
)... | {
"domain": "codereview.stackexchange",
"id": 43240,
"lm_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, unit-testing, functional-programming, regex, validation",
"url": null... |
electrostatics, electric-circuits, electricity, electric-fields
Title: Does EMF depend on distance between electrodes in a battery? E.m.f of a cell is defined as work done to carry a unit charge from cathode to anode in internal circuit.
Should not work done increase with distance between distance between electrodes, ... | {
"domain": "physics.stackexchange",
"id": 90663,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electric-circuits, electricity, electric-fields",
"url": null
} |
error-handling, linux, sh, posix
# check if the first argument is a number
# if not, print out an internal error without colors
if ! [ "${1}" -eq "${1}" ] 2> /dev/null
then
printf "print_error_and_exit() internal error\\n\\n\\tThe first argument is not a number: %b!\\n\\tExpected an exit code from ... | {
"domain": "codereview.stackexchange",
"id": 36081,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "error-handling, linux, sh, posix",
"url": null
} |
ros, rviz, ros-kinetic
The user clicks on configure, choose the topics he wants to be displayed (hovering the mouse will display the topic type in a tooltip).
The topics are updated to display the last message available; this might not suit applications with high update rates as it will probably make values hard to r... | {
"domain": "robotics.stackexchange",
"id": 30114,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, rviz, ros-kinetic",
"url": null
} |
constraints. For example is concave, and it is quasiconvex. IFunctional forms of Blaschke-Santal o inequality and its converse { Ball, Artstein-Klartag-Milman, Fradelizi-Gordon-Reisner, Meyer, Lehec, Rotem. The differences between concave and quasi-concave functions can be illustrated with the function 16. log-concave ... | {
"domain": "ratingcomuni.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9902915215128427,
"lm_q1q2_score": 0.8073178155988499,
"lm_q2_score": 0.8152324826183822,
"openwebmath_perplexity": 806.5898227378684,
"openwebmath_score": 0.7924344539642334,
"t... |
biochemistry, molecular-biology, transcription
To detect the influence of NusA on heat-induced aggregation, we used
lactate dehydrogenase (LDH). LDH was incubated at 48°C in the absence
or presence of NusA. As shown in Fig. 2b, LDH slowly aggregated at
48°C without the protection of NusA. However, when this experiment... | {
"domain": "biology.stackexchange",
"id": 6400,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, molecular-biology, transcription",
"url": null
} |
density. The most important parameter in kernel density estimation is the bandwidth: there exists a large literature on fixed and variable bandwidth (adaptive kernel). A number of possible kernel functions is listed in the following table. Kernel Density Estimation. (We’ll do it in one dimension for simplicity.) An ove... | {
"domain": "com.vn",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987946220838664,
"lm_q1q2_score": 0.81452404225853,
"lm_q2_score": 0.8244619242200082,
"openwebmath_perplexity": 852.6969839257266,
"openwebmath_score": 0.7269203066825867,
"tags": null,
"u... |
So this is going to-- if I look at the trace-- so now, let me. So I just want to look at the diagonal here. So it's the trace. You remember, the trace of a matrix-- of a matrix M is the sum down the diagonal M11, M22, down to Mnn. It's the diagonal sum. And-- everybody with me here now? So that term on the diagonal-- A... | {
"domain": "mit.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771805808551,
"lm_q1q2_score": 0.8135602194622262,
"lm_q2_score": 0.8244619306896956,
"openwebmath_perplexity": 598.0650838059803,
"openwebmath_score": 0.7693259716033936,
"tags": null,
... |
c#, timer, task-parallel-library
Is this a well conducted measurement algorithm? Is there something that is amiss? while (Watch.Elapsed.Milliseconds < minimumTime)
It probably won't affect this code, but Milliseconds doesn't do what you probably think it does. I think you want TotalMilliseconds.
public static Task<T... | {
"domain": "codereview.stackexchange",
"id": 13429,
"lm_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#, timer, task-parallel-library",
"url": null
} |
of radicals and some of the common mistakes students often make with radicals. Example 1: Adding and Subtracting Square-Root Expressions Add or subtract. A. The index is as small as possible. Subtract Radicals. The terms are unlike radicals. Use the radical positions table as a reference. Combining Unlike Radicals Exam... | {
"domain": "valentinsuarez.es",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9433475746920262,
"lm_q1q2_score": 0.8073651037889531,
"lm_q2_score": 0.8558511469672594,
"openwebmath_perplexity": 1167.2609355511377,
"openwebmath_score": 0.8289449214935303,
... |
neural-network, rbm
Title: Hidden neuron representation of weights In an RBM, if we represent the weights learned by the hidden units, they show that the neural net is learning basic shapes. For example, for the mnist dataset, they learn features of the numbers they are trying to classify.
In a regular feed-forward ne... | {
"domain": "datascience.stackexchange",
"id": 820,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-network, rbm",
"url": null
} |
c#, unit-testing, linked-list, interview-questions, comparative-review
The 'edge case' you have is because you've got a quick-and-nasty definition of a linked list as just 'the head node' (or null). The effect is that you are exposing a highly mutable data-structure which is easy to misuse. Much much better, would be ... | {
"domain": "codereview.stackexchange",
"id": 31536,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, unit-testing, linked-list, interview-questions, comparative-review",
"url... |
I have been researching this question on my own time along with generally studying finite groups of small order in an attempt to better understand their structure, and I have come up with some results in those efforts that I haven't seen mentioned in this thread or the other similar ones I've found on this site. I had ... | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.960361159764527,
"lm_q1q2_score": 0.8044176813750883,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 241.06847763095027,
"openwebmath_score": 0.8658945560455322,
"tags... |
thermodynamics, mass-energy
So to find the energy released, you can do Mass difference equal to=m1-m2, to get how much mass was lost. Then multiply this Mass difference with c^2 to get total amount of energy gained. So essentially the formula would be E=(m1-m2)c^2 because not all of the mass is converted to energy.
Mo... | {
"domain": "physics.stackexchange",
"id": 99858,
"lm_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, mass-energy",
"url": null
} |
java
Title: Calculating multiple car prices from a file My application needs to read a file, which includes a list of cars from different factories, and calculate the prices (by this I mean mean add up their prices).
I suppose my solution is efficient. Is there any better approach to it?
Company Price other details... | {
"domain": "codereview.stackexchange",
"id": 8528,
"lm_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
} |
electromagnetism, quantum-field-theory, quantum-electrodynamics, field-theory
Title: Does Gauss-Faraday law play any role in the quantization of the electromagnetic field? The Gauss-Faraday law, in the covariant form, reads
$
\epsilon^{\alpha\beta\gamma\delta} F_{\gamma\delta,\alpha} = 0,
$
while the vacuum field equa... | {
"domain": "physics.stackexchange",
"id": 42125,
"lm_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, quantum-field-theory, quantum-electrodynamics, field-theory",
... |
fluid-dynamics
Title: Question about propellers A ship moves forwards because a rotating propeller sends water backwards. The diameter of the propeller is as large as possible because in order to be efficient it must push the the greatest feasible amount of water with the lowest acceleration. Could someone explain me ... | {
"domain": "physics.stackexchange",
"id": 29269,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics",
"url": null
} |
optics, visible-light, laser
I apologize if my question is vague, I'm just having trouble seeing their connection.
Thanks Below is a diagram of a 4-level gain medium (courtesy of wikipedia).
The pump pumps electrons into the 4th energy state, a state with more energy than the laser transition. Usually, there is a ... | {
"domain": "physics.stackexchange",
"id": 5770,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, visible-light, laser",
"url": null
} |
astronomy, telescopes
According to those articles the limit of detection is about magnitude 20. If you have a look at http://www.physics.sfasu.edu/astro/asteroids/sizemagnitude.html this tells you how to convert magnitude to diameter and even includes a javascript calculator to do the calculation for you.
I feel as th... | {
"domain": "physics.stackexchange",
"id": 3652,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astronomy, telescopes",
"url": null
} |
ros, gazebo, spawn-model, ros-groovy
I didn't see any origin in the tutorial page you referenced however, were you to post the sdf file, that may help.
cheers
Peter | {
"domain": "robotics.stackexchange",
"id": 12379,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, gazebo, spawn-model, ros-groovy",
"url": null
} |
ros, multithreading
Thanks for help, hope someone will be able to help me clarify that.
Caroline
Originally posted by CarolineQ on ROS Answers with karma: 395 on 2013-06-05
Post score: 4
If you're in a nodelet use the multi threaded nodelet interface.
If you're not use the Asynchronous spinner.
The nodelet interface... | {
"domain": "robotics.stackexchange",
"id": 14440,
"lm_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, multithreading",
"url": null
} |
virtual-particles
So, tl;dr: "Virtual particles" are not a special type of particle, and there are Feynman diagrams with internal propagators corresponding to all the fields in the Lagrangian. | {
"domain": "physics.stackexchange",
"id": 23710,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "virtual-particles",
"url": null
} |
java, parsing, android
Title: Parsing a file for an Android device I am trying to parse InputEvents of an Android device.
Background:
For an android device we have a utility getevent which gives all the touch events that are sent to a device.
getevent -l gives all the input events to the device.
Every event has 3 ... | {
"domain": "codereview.stackexchange",
"id": 13654,
"lm_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, parsing, android",
"url": null
} |
gravity, space, asteroids
Title: Can asteroids fall on earth and hit the surface at 90 degree angle? I always Saw in movies ,cartoons every where that asteroids hit the earth at an angle
(not 90 degree).
But Why ?
We are living in 3-dimensional world(probably more....) .So is there an every chance that
an asteroid ... | {
"domain": "physics.stackexchange",
"id": 49783,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, space, asteroids",
"url": null
} |
programming-challenge, rust, k-sum
}
}
}
}
if status{
result
}else{
panic!("Not found");
}
// result
}
} Proper name and description
Rename the question and give it proper description and tags accor... | {
"domain": "codereview.stackexchange",
"id": 41634,
"lm_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-challenge, rust, k-sum",
"url": null
} |
homework-and-exercises, newtonian-mechanics, forces, spring
Title: Mass-Spring Damper system - moving surface I need help with a physics problem, I don't know much about dampers, how can this be solved? | {
"domain": "physics.stackexchange",
"id": 5536,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, forces, spring",
"url": null
} |
quantum-mechanics, optics, solid-state-physics, time-reversal-symmetry
Title: Why does circularly polarized light break time-reversal symmetry? I've encountered some interesting paper on 2D materials where authors use circularly polarized light to break time-reversal symmetry to split energy levels.
Here you can find ... | {
"domain": "physics.stackexchange",
"id": 24042,
"lm_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, optics, solid-state-physics, time-reversal-symmetry",
"url": ... |
Arithmetic Sequences All you need! Enter the first three terms in the sequence, and let the calculator do the rest. The Ratio Test can be used on any series, but unfortunately will not always yield a conclusive answer as to whether a series will converge absolutely or diverge. Discuss the pointwise convergence of the s... | {
"domain": "macchiaelettrodomestici.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874087451302,
"lm_q1q2_score": 0.8276194740974071,
"lm_q2_score": 0.8354835391516132,
"openwebmath_perplexity": 354.85524078365097,
"openwebmath_score": 0.8631737828... |
$$\left\langle \frac{dE}{dx} \right\rangle = \frac{1}{2} F_T \cdot A^2 k^2$$
Then I simply considered that $k = \frac{2 \pi}{\lambda}$ and replaced the variables with the values the problem had already given me or I found out. The answer I got was $\left\langle \frac{dE}{dx} \right\rangle \approx 0.99$ J/m, which agrr... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471680195556,
"lm_q1q2_score": 0.8261698800651048,
"lm_q2_score": 0.8397339616560072,
"openwebmath_perplexity": 179.47264402019243,
"openwebmath_score": 0.8160133361816406,
"ta... |
optics, spacetime-dimensions, scaling, camera, image-processing
Imagine a Ball is thrown into the scene. Since I know gravitation and the time difference between each pixel, could this be a way too? I mean the horizontal and vertical trajectory are independend from each other, that's why I could retrieve the way in di... | {
"domain": "physics.stackexchange",
"id": 22999,
"lm_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, spacetime-dimensions, scaling, camera, image-processing",
"url": null
} |
complexity-theory, graphs, np-complete
In the following figure, suppose that S = {s1, s2, s3} such that s1 = {1, 2, 3}, s2 = {1, 4}, and s3 = {2, 5}. Fig. 2 shows the weighted DAG G′ of the LSTMC problem corresponding to the hitting set problem HS(S). In this example, the set A, namely the union of all elements of S, ... | {
"domain": "cs.stackexchange",
"id": 7250,
"lm_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, graphs, np-complete",
"url": null
} |
To avoid fading-related problems, DVB-T has the Guard Interval, for each sent symbol:
There's a trailing time in each symbol that is ignored by receivers.
It can be 1/4 of the symbol time cycle ('noisy' channels) or just 1/32 ('quiet' channels). Data from the useful section is repeated into the guard interval, but re... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226287518852,
"lm_q1q2_score": 0.836185942818613,
"lm_q2_score": 0.8558511524823263,
"openwebmath_perplexity": 1368.2268415162953,
"openwebmath_score": 0.9102275967597961,
"tag... |
np-hardness, counting-complexity, reductions
Alternatively, is there a polynomial-time algorithm assuming NP=P?
Clearly having access to a #SAT oracle suffices, so the complexity lies somewhere between NP and #P.
I feel like this should have been studied before, but I can't find an answer on Google.
I know how to sol... | {
"domain": "cstheory.stackexchange",
"id": 3394,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "np-hardness, counting-complexity, reductions",
"url": null
} |
python, python-3.x, hash-map, meta-programming
Now my dicts.py looks like(removed doctests to save some space):
from collections import Iterable
class LimitedDict(dict):
_allowed_keys = set()
def __init__(self, *, allowed_keys=None, **kwargs):
if not isinstance(allowed_keys, Iterable):
... | {
"domain": "codereview.stackexchange",
"id": 12204,
"lm_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, hash-map, meta-programming",
"url": null
} |
of the Subspace Spanned by Four Matrices, Find an Orthonormal Basis of the Range of a Linear Transformation. 2.5 Complex Eigenvalues Real Canonical Form A semisimple matrix with complex conjugate eigenvalues can be diagonalized using the procedure previously described. The eigenvalues can be real or complex. The only r... | {
"domain": "thekandybshow.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9678992932829917,
"lm_q1q2_score": 0.8493091516215903,
"lm_q2_score": 0.8774767762675405,
"openwebmath_perplexity": 326.5004848723243,
"openwebmath_score": 0.852203905582428,
"tags... |
ros
Title: How is the distance of an 3d object measured in ROS
Hi,
I obtained 3d image using 2d urg-04lx-ug01 .There is an object at a distance of 1 meter. How do ı see that distance in Rviz or in a terminal ? or can ı see object distance ?
Originally posted by Mekateng on ROS Answers with karma: 85 on 2017-09-28
Po... | {
"domain": "robotics.stackexchange",
"id": 28943,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
c++
} else if (link.second != 0 && field.get_current_frame()[link.first + 1][link.second - 1].character != current_block.shape) {
new_frame[current_block.links[i].first][current_block.links[i].second] = {Frame::BACKGROUND, colors.at("reset")};
current_block.links[i].firs... | {
"domain": "codereview.stackexchange",
"id": 45395,
"lm_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++",
"url": null
} |
scala
Languages such as Eiffel and Spec# natively support this so-called design by contract approach to programming. Natively, because contract elements such as preconditions, postconditions and invariants are built into the language. There is a significant difference, however, when the contracts are looked at. Eiffel... | {
"domain": "codereview.stackexchange",
"id": 4004,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "scala",
"url": null
} |
ros, ros-kinetic, ros-canopen
How to init vcan0?
For setting up vcan, just follow the directions in the driver documentaion, section 6.4
And how to send messages using a dictionary in canopen_chain_node .
You cannot send message using a dictionary.
But you can use the (currently undocumented) set_object service to ... | {
"domain": "robotics.stackexchange",
"id": 30052,
"lm_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-kinetic, ros-canopen",
"url": null
} |
quantum-mechanics, condensed-matter, solid-state-physics, electronic-band-theory, tight-binding
$\bullet$ How does one draw the inference that this Hamiltonian leads to only one band and not more than one? Is it because of the energy $E(k)$ a single-valued function of $k$?
$\bullet$ What is(are) the simple possible mo... | {
"domain": "physics.stackexchange",
"id": 46918,
"lm_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, condensed-matter, solid-state-physics, electronic-band-theory, ... |
human-biology, virology, skin, saliva, rabies
We investigated 19 deaths due to rabies in the past 7-year period. Of these, five were caused by “scratches/abrasions without any bleeding” and no postexposure prophylaxis (PEP) was sought. All injuries were caused either by unvaccinated pups below 3 months of age or by st... | {
"domain": "biology.stackexchange",
"id": 11947,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, virology, skin, saliva, rabies",
"url": null
} |
java, performance, algorithm, mergesort
// FALL THROUGH!
case 0:
runsLeft = queue.size();
offset = fromIndex;
final E[] tmp = source;
source = target;
target = tmp;
break;
... | {
"domain": "codereview.stackexchange",
"id": 10893,
"lm_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, algorithm, mergesort",
"url": null
} |
• All odd numbers are written as 4x+3 and 4x+1 May 29 '20 at 18:28
Brute force approach(python):
def multiples_of_hundred(n):
sum = 0
for i in range(1, n + 1):
if ((i * (i+1)) % 100) == 0:
sum += 1
return sum/n
Returns 4% (0.04) for multiples of 100.
• interestingly, the maximum (when testing the first 10,000 posi... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692352660529,
"lm_q1q2_score": 0.8074239694456515,
"lm_q2_score": 0.826711787666479,
"openwebmath_perplexity": 378.6047668604409,
"openwebmath_score": 0.8792098164558411,
"tags... |
classical-mechanics, aerodynamics, propulsion, fluid-dynamics
Title: Is the well known textbook-formula for net-thrust oversimplified or do I have a misinterpretation? In order to understand how Jet-Engines works I came across the "famous" formula for net-thrust:
https://en.wikipedia.org/wiki/Turbojet#Net_thrust
$F_{t... | {
"domain": "physics.stackexchange",
"id": 71726,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, aerodynamics, propulsion, fluid-dynamics",
"url": null
} |
photons, energy-conservation, electrons, atomic-physics, laser
Title: Why is it necessary to supply constant electricity to make a laser work? As we know that in lasers there are excited atoms. When energy is provided in the form of light, heat or electricity to these atoms, these excited atoms after sometime go to a ... | {
"domain": "physics.stackexchange",
"id": 21338,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "photons, energy-conservation, electrons, atomic-physics, laser",
"url": null
} |
Kudos [?]: 1 [0], given: 6
GMAT Date: 11-09-2011
Re: How many different positive integers are factor of 441 ? [#permalink]
### Show Tags
13 Apr 2012, 04:55
Yeah you are absolutely right!
Powers of prime factors adding one on to it and multiply
(2+1)*(2+1)=9
Posted from my mobile device
Kudos [?]: 1 [0], given: 6... | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8757869981319863,
"lm_q2_score": 0.8757869981319863,
"openwebmath_perplexity": 2244.2720344210197,
"openwebmath_score": 0.4927178621292114,
"tags": null,
"url"... |
java, performance, memory-management, jdbc
private void listDrivers() {
java.util.Enumeration enumeration = java.sql.DriverManager.getDrivers();
while (enumeration.hasMoreElements()) {
Driver driverAsObject = (Driver) enumeration.nextElement();
System.out.println("Driver: " + dr... | {
"domain": "codereview.stackexchange",
"id": 10774,
"lm_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, memory-management, jdbc",
"url": null
} |
There’s a lot going on here, but in its most simplified version, we thought we would get a curve on the center line at $\theta =0$, 1 unit above at $\theta =\frac{\pi}{2}$, on at $\theta =\pi$, 1 unit below at $\theta =\frac{3\pi}{2}$, and returning to its starting point at $\theta =2\pi$. We had a very rough “by hand... | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9920620054292072,
"lm_q1q2_score": 0.8432241090798748,
"lm_q2_score": 0.849971175657575,
"openwebmath_perplexity": 907.1379292646518,
"openwebmath_score": 0.753693699836731,
"tags": nu... |
c#, .net, multithreading
/// <summary>
/// Send the next group of events using the data sender.
/// </summary>
/// <param name="messages">Event list to send.</param>
private void ProcessMessages(List<Message> messages)
{
foreach (Message m in messages)
{
... | {
"domain": "codereview.stackexchange",
"id": 23698,
"lm_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, multithreading",
"url": null
} |
electric-circuits, potential, electrical-resistance, voltage, power
In a nutshell what is the V stand for in the formula - The supply voltage or the the potential drop across the bulb and why ?
P.S- This question came to my mind while solving this Question If you increase the resistance of the bulb by 10 ohm, the tota... | {
"domain": "physics.stackexchange",
"id": 28423,
"lm_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, potential, electrical-resistance, voltage, power",
"url": nul... |
fluid-mechanics, fluid
Title: shape of cylinder in the fluid mechanics in the following picture, we should find the viscosity of fluid and we have to have the Area surface of cylinder that is in touch with the fluid.
the area surface depends on the bottom of the shape.
but i have no idea what's the shape of this cylin... | {
"domain": "engineering.stackexchange",
"id": 2053,
"lm_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-mechanics, fluid",
"url": null
} |
navigation, mapping, rviz, ros-melodic
Title: merged map flickers on Rviz
I am running ROS Melodic, though I'm using the package multirobot_map_merge which was developed for Kinetic and Lunar. Works fine if configured, the issue is that on Rviz the resulting map is constantly flickering. You can see what I mean in th... | {
"domain": "robotics.stackexchange",
"id": 34029,
"lm_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, mapping, rviz, ros-melodic",
"url": null
} |
complexity-theory, formal-languages, reductions, encoding-scheme
Similarly, according to Karp, $T \leq_K U$ where $T \subset D$ and $U \subset D'$ if $e(T) \leq_K e'(U)$ where $e: D \rightarrow \Sigma^*$ and $e': D' \rightarrow \Sigma^*$. However, when we are actually proving $T \leq_K U$ for some real $T$, $U$, $D$,... | {
"domain": "cs.stackexchange",
"id": 17754,
"lm_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, formal-languages, reductions, encoding-scheme",
"url": null
} |
python, excel, sqlite, pandas
integer = workbook1.add_format({'num_format': '0', 'align': 'center'})
worksheet1.set_column('B:HU', 4, integer)
writer.save()
def main():
video_data = video_base()
intent_added = video_intent(video_data)
cleaned = cleanup(intent_added)
feed_data = feed_position... | {
"domain": "codereview.stackexchange",
"id": 13868,
"lm_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, excel, sqlite, pandas",
"url": null
} |
quantum-mechanics, optics, electromagnetic-radiation, atomic-physics, laser
From an experimental perspective, what you have to do is simply start with a laser pulse with a fairly long wavelength and slow period (usually in the near-infrared), shine it into a gas cell, and make sure that the pulse is intense. How inten... | {
"domain": "physics.stackexchange",
"id": 97424,
"lm_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, optics, electromagnetic-radiation, atomic-physics, laser",
"u... |
ros
Original comments
Comment by JonW on 2013-09-03:
Since i is in the range of zero to nine, could the value you are setting in the red channel be rounding down to zero?
Comment by tuxware on 2013-09-04:
Good point, but that's not it. Changed it to a switch case statement with 5 "hard coded" colors, still not working... | {
"domain": "robotics.stackexchange",
"id": 15384,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
forces, inertial-frames
Although you mentioned B fields, by far the most common environmental factor is temperature. Most devices only work well in a certain temperature range and they fail either above or below it. As a result, most manufacturers will specify the operating range of temperature in their documentation.... | {
"domain": "physics.stackexchange",
"id": 86523,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, inertial-frames",
"url": null
} |
data-structures, distributed-systems, hash-tables
rendezvous hashing, also called highest random weight hashing (HRW):
A client with a list of computers Cj looks up some key K by giving each computer a score Sj = hash( K | Cj ).
The key, value pair K,V is stored on the computer with the highest score.
(For two-failure... | {
"domain": "cs.stackexchange",
"id": 7142,
"lm_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, distributed-systems, hash-tables",
"url": null
} |
javascript, performance, game
fillField: function (x, y, color)
{
this.c.fillStyle = color;
this.c.fillRect(x * scale, y * scale, scale, scale);
},
replaceField: function (before, after)
{
for (var i = 0; i < this.field.length; ++i)
{
... | {
"domain": "codereview.stackexchange",
"id": 12230,
"lm_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, performance, game",
"url": null
} |
quantum-mechanics, electromagnetic-radiation, visible-light, wave-particle-duality
Once we we include interactions with virtual electrons that emerge from the vacuum, however, then
photons can interact with these electrons and exchange momentum. This process is called Delbrück scattering. It is hard to see beca... | {
"domain": "physics.stackexchange",
"id": 84323,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, electromagnetic-radiation, visible-light, wave-particle-duality... |
python, object-oriented, tic-tac-toe, simulation
def __repr__(self):
return "{}".format(self.__class__.__name__)
def __call__(self, board, win_result):
self.count_wins_and_ties[win_result] += 1
def report_outcome_statistics(self):
total_games = sum(self.count_wins_and_ties.values())
... | {
"domain": "codereview.stackexchange",
"id": 33676,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, object-oriented, tic-tac-toe, simulation",
"url": null
} |
use ordered arrangements of r elements Discrete! Studying finite, Discrete Mathematics permutations and Combinations when r objects are out. Reference books on Discrete Mathematics comprehensively C. counting problem - Discrete Math -,...: 3600 the information that determines the ordering is called the key X onto X. I ... | {
"domain": "neuropsychologycentral.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936115537341,
"lm_q1q2_score": 0.8601738328144543,
"lm_q2_score": 0.8740772450055545,
"openwebmath_perplexity": 828.5639289170634,
"openwebmath_score": 0.52963411808... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.