text stringlengths 1 1.11k | source dict |
|---|---|
simulation, stage
+{
+ boost::mutex::scoped_lock lock(msg_lock);
+ if(request.models_configurations.size()>lasermodels.size())
+ {
+ ROS_ERROR("Service stage model config: configurations.count > simulator_models.count");
+ return false;
+ }
+
+ for(unsigned int i=0;ilasermodels[i]->GetConfig();
+ if(cu... | {
"domain": "robotics.stackexchange",
"id": 7672,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "simulation, stage",
"url": null
} |
java, object-oriented, swing, quiz
public MultipleOptionQuestion(int score, String statement, String[] options, int rightOption, String clue) {
super(MULTIPLE_OPTION_SCORE);
this.statement = statement;
this.options = options;
this.clue = clue;
this.rightOption = rightOption;
... | {
"domain": "codereview.stackexchange",
"id": 29165,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, object-oriented, swing, quiz",
"url": null
} |
ros, navigation, 2dcostmap
<node pkg="my_odom" type="my_odom" name="my_odom" output="screen">
<param name="odom_param" value="param_value" />
</node>
<node pkg="robot_setup_tf" type="tf_broadcaster" name="transform_configuration_name" output="screen">
<param name="transform_configuration_param" value="par... | {
"domain": "robotics.stackexchange",
"id": 23176,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, 2dcostmap",
"url": null
} |
$TA = [T\vec a_1 \; T \vec a_2], \tag{4}$
so that $TA = \lambda A$ becomes
$TA = [T\vec a_1 \; T \vec a_2] = \lambda [\vec a_1 \; \vec a_2 ] = [\lambda \vec a_1 \; \lambda \vec a_2]; \tag{5}$
(5) shows that the "eigenmatrices" of the operator $T$ associated with eigenvalue $\lambda$ are precisely those non-zero matr... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363750229257,
"lm_q1q2_score": 0.8380174979283288,
"lm_q2_score": 0.8499711737573762,
"openwebmath_perplexity": 207.73504367285224,
"openwebmath_score": 0.9642894268035889,
"ta... |
...
\item Find the unique cubic polynomial P that satisfies
\begin{equation*}
P(-2) = 1, P(-1) = 4 P(0) = 2, P(2) = 4.
\end{equation*}
Write P in both the Lagrange and Newton forms
\begin{itemize}
\item Lagrange: $construct l_j for j \in [1,4]$ \par
\begin{equation*}
\begin{aligned}
l_1(x) = \frac{1}{-8}(x+1)x(x-2) \\... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540665491114,
"lm_q1q2_score": 0.8161198332011844,
"lm_q2_score": 0.8333245973817158,
"openwebmath_perplexity": 3968.528705159314,
"openwebmath_score": 0.9986394643783569,
"tag... |
python, performance, python-2.x, circular-list
def __setslice__(self, i, j, other):
i = max(i, 0); j = max(j, i)
if isinstance(other, type(Ring)):
sliced = other.data
#this is not correct. slice needs to take into account the offset from the ring in other
elif isinstance... | {
"domain": "codereview.stackexchange",
"id": 21739,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, python-2.x, circular-list",
"url": null
} |
electromagnetism, special-relativity, electric-current
violated in that the direction of the Poynting vector is switched for supraluminal observers relative to the direction for subluminal ones. This is because, for an accelerated particle, energy pulses, from a supraluminal standpoint, run inwards to the charged part... | {
"domain": "physics.stackexchange",
"id": 61315,
"lm_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, electric-current",
"url": null
} |
quantum-mechanics, electromagnetism, special-relativity, dirac-equation
Title: Non-relativistic limit of the Dirac equation with electromagnetic potentials I'm studying the Dirac equation using Walter Greiner's textbook, my question is about the following passage | {
"domain": "physics.stackexchange",
"id": 94301,
"lm_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, electromagnetism, special-relativity, dirac-equation",
"url":... |
c++, strings
If you're going to be doing using sv = std::string_view; in the defaults namespace anyway, you might as well use string view literals:
namespace defaults {
using namespace std::literals::string_literals;
constexpr auto title_case_exceptions_list = std::array{ "a"sv, "an"sv, // and so on
}
That sh... | {
"domain": "codereview.stackexchange",
"id": 31204,
"lm_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++, strings",
"url": null
} |
qiskit, qiskit-runtime
Title: How to get the simulation method used by AerSimulator(method='automatic')? Is it possible to obtain the simulation method by a simulation run when using AerSimulator(method='automatic')?
For example running a circuit:
simulation_run = AerSimulator(method='automatic').run(qc)
Then trying ... | {
"domain": "quantumcomputing.stackexchange",
"id": 5449,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "qiskit, qiskit-runtime",
"url": null
} |
gazebo-plugin, joint, errors, px4
#18 Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7ff285a41409, in
#17 Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7ff285a41ff4, in
#16 Object "/usr/lib/x86_64-linux-gnu/libgz-sim7-gz.so.7.6.0", at 0x7ff284fefc0d, in runServer
#15 Object "/lib/x86_64-linux-gnu/libgz-... | {
"domain": "robotics.stackexchange",
"id": 38919,
"lm_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-plugin, joint, errors, px4",
"url": null
} |
gazebo
Originally posted by gerkey with karma: 1414 on 2012-12-10
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 2855,
"lm_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
} |
opencv
//Needed to keep the HighGUI Window open
cv::waitKey(3);
//Convert cv::Mat to IplImage
cv_ptr_out->image = img_hsv;
//Convert CV image to ROS output image message and publish
try
{
image_pub.publish(cv_ptr_out->toImageMsg());
}
catch(... | {
"domain": "robotics.stackexchange",
"id": 24982,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "opencv",
"url": null
} |
linear-algebra, hash-function
Title: "Linear" hashing function Say we have two chunks of data $X$ and $Y$, which may be of different sizes, is there a non-trivial function $hash$, and operation $*$, such that:
$$hash(X+Y) = hash(X) * hash(Y)$$
...where $+$ is concatenation, and $*$ is associative (but not necessarily ... | {
"domain": "cstheory.stackexchange",
"id": 3983,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "linear-algebra, hash-function",
"url": null
} |
conservation-laws, field-theory, integration, calculus
From the line, $$-\int d^3x \space \epsilon_{abc} \space [ (\nabla^2\phi_b) \phi_c - m^2\phi_b\phi_c ] $$ I cannot actually see how could this end up with the expression,
$$ \int d^3x \space \epsilon_{abc} \space \nabla\phi_b \cdot \nabla\phi_c .$$
One idea that I... | {
"domain": "physics.stackexchange",
"id": 98852,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "conservation-laws, field-theory, integration, calculus",
"url": null
} |
cc.complexity-theory, co.combinatorics, functional-programming, ct.category-theory
Am I onto something (and what) here? Is it beneficiary (from learning standpoint) to try to look about computational complexity in this way? Are the structures, for which we can have "nice" initial algebras somehow too limited for some ... | {
"domain": "cstheory.stackexchange",
"id": 2858,
"lm_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, co.combinatorics, functional-programming, ct.category-theory... |
quantum-algorithms, architecture, neural-network
There are two lines of work that come to mind when you talk of "hardware-based neural networks" which try/claim to use photonics as a mean to speed-up processing, and make direct reference to speeding up machine learning tasks.
Shen et al. 2016 (1610.02365) propose a m... | {
"domain": "quantumcomputing.stackexchange",
"id": 118,
"lm_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-algorithms, architecture, neural-network",
"url": null
} |
ros, gazebo, gazebo7, ros-kinetic
Originally posted by seif_seghiri on ROS Answers with karma: 42 on 2022-01-03
Post score: 1
Original comments
Comment by osilva on 2022-01-03:
It’s not recommended to mix Gazebo versions with ROS1 distros. Not sure why teleop will be affected unless a plugin does not longer work.
Com... | {
"domain": "robotics.stackexchange",
"id": 37305,
"lm_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, gazebo7, ros-kinetic",
"url": null
} |
php, security, validation, image, network-file-transfer
$src = $in($image['tmp_name']);
$height = ($height == null || $height <= 0 ? imagesy($src) : $height);
$width = ($width == null || $width <= 0 ? imagesx($src) : $width);
$dst = imagecreatetruecolor($width, $height);
imagecopyresiz... | {
"domain": "codereview.stackexchange",
"id": 11800,
"lm_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, validation, image, network-file-transfer",
"url": null
} |
python, matplotlib, data-visualization
def three_dimension_scatterplot(X,Y,Z,**kwargs):
"""
Takes the X, Y and Z lists and plots them as a 3D scatter plot
through matplotlib.
Keyword arguments:
X -- List of the X-coordinates
Y -- List of the Y-coordinates
Z -- List of the Z-coordinates
... | {
"domain": "codereview.stackexchange",
"id": 15272,
"lm_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, matplotlib, data-visualization",
"url": null
} |
quantum-operation, terminology-and-notation, correlations
Basically, what is the difference between signalling and non-signalling, and what role does the channel play on that? Basically, it means that the correlations could be used to send a message. Or simply that Bob’s measurement outcomes can reveal some details of... | {
"domain": "quantumcomputing.stackexchange",
"id": 58,
"lm_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-operation, terminology-and-notation, correlations",
"url": null
} |
ros-humble, macos, create3, irobot, multipass
Creating a multipass instance with --bridged fixes:
multipass launch --name=create3-bridged --bridged --cpus=2 --disk=20GiB
VM Infor multipass info create3-bridged:
Name: create3-bridged
State: Running
IPv4: 10.211.67.5
192.168... | {
"domain": "robotics.stackexchange",
"id": 38798,
"lm_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-humble, macos, create3, irobot, multipass",
"url": null
} |
to the for a graph that includes the given points. (b)Determine if each function is one-to-one. 4 for a and 3 for x into an exponential function and determine the value of b. x f(x) 0 -5 1 2 2 9 3 16 4 23 5 x f(x) 0 1 1 2 2 4 3 8 4 Writing an Exponential Function Given Two Points. Write as y = m. BF. x y 0 2 1 Today we... | {
"domain": "markvanstone.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471642306268,
"lm_q1q2_score": 0.8111445197947971,
"lm_q2_score": 0.8244619177503205,
"openwebmath_perplexity": 1331.2939902469088,
"openwebmath_score": 0.5082195997238159,
... |
r, regression, machine-learning-model, logistic-regression
alphas <- seq(0.1,0.9,by=0.1);
lambdas <- 10^seq(-3,3,length=100)
#Logistic Elastic-Net Regression
en <- train(Survived~. ,
data = trainData,
method = "glmnet",
preProcess = NULL,
trControl = trainControl("re... | {
"domain": "datascience.stackexchange",
"id": 10609,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "r, regression, machine-learning-model, logistic-regression",
"url": null
} |
quantum-mechanics, condensed-matter, crystals, electronic-band-theory
Bloch's theorem states that the eigenvalues and eigenvectors of a periodic one-electron Hamiltonian can be labeled by Bloch's wavevectors $\bf k$ lying in the first Brillouin zone. For each $\bf k$ there is an infinite set of solutions of the eigenv... | {
"domain": "physics.stackexchange",
"id": 63725,
"lm_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, crystals, electronic-band-theory",
"url": n... |
fft, signal-detection, snr, analog-to-digital, quantization
Title: Performance Effects of Dropping ADC Least Significant Bits before DSP processing (Besides the Obvious) What would be the effect of dropping LSBs of an ADC on the performance of a DSP system apart from the obvious reduction in dynamic range. For example... | {
"domain": "dsp.stackexchange",
"id": 11555,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, signal-detection, snr, analog-to-digital, quantization",
"url": null
} |
java, bitcoin, blockchain
} The first thing I want to talk about is:
while (true) {
try {
String message = messageQueue.takeMessage();
This loop smells. Instead of using your custom class delegating to BlockingQueue, your messages can be handled by standard java library classes.
... | {
"domain": "codereview.stackexchange",
"id": 15668,
"lm_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, bitcoin, blockchain",
"url": null
} |
I then complete the square for: $\frac{-(x-y)^2 - 4ktay}{4kt}$
to get:
$$u(x, t) = 2 \exp(ax-a^2kt) \frac{1}{4\sqrt{kt\pi}} \int_{0}^{\inf} \exp(\frac{-(y+2kat-x)^2}{4kt}) dy$$
I then use: $$1 = \frac{1}{4\sqrt{kt\pi}} \int_{-\inf}^{\inf} \exp(\frac{-(y+2kat-x)^2}{4kt}) dy$$
(**) to write: $$\frac{1}{2} = \frac{1}{4... | {
"domain": "toronto.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407137099625,
"lm_q1q2_score": 0.8023999136534241,
"lm_q2_score": 0.8244619263765707,
"openwebmath_perplexity": 5894.181448976416,
"openwebmath_score": 0.6830965280532837,
"tags": nu... |
gscam, ubuntu-precise, ubuntu
│/gscam/image_raw/theora/parameter_descriptions
│/gscam/image_raw/theora/parameter_updates
│/rosout ... | {
"domain": "robotics.stackexchange",
"id": 14307,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gscam, ubuntu-precise, ubuntu",
"url": null
} |
$\displaystyle \frac{\log \epsilon}{\sqrt{-\log \delta}+\sqrt{-\log (\epsilon \delta)}}$
shows ${\phi(\delta)\rightarrow 0}$ as ${\delta\rightarrow 0}$. Choose ${\delta}$ so that ${|\phi(\delta)|<\epsilon}$ and define ${\ell(x)=x\sqrt{-\log \delta}}$. Then for ${\epsilon \,\delta\le |x|< \delta}$ we have ${|f(x)-\ell(... | {
"domain": "calculus7.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462187092608,
"lm_q1q2_score": 0.805405850789278,
"lm_q2_score": 0.8152324848629214,
"openwebmath_perplexity": 281.12506918884645,
"openwebmath_score": 0.9988199472427368,
"tags": ... |
orbit, the-moon, planet, gravity
So, do planets move in circles? To a first approximation, yes. But if you do careful astronomical observations, you will find them to move in ellipses (explained by Newtonian gravity). Even more detail, and you notice precession of these ellipses (due to oblateness, other planets, gene... | {
"domain": "astronomy.stackexchange",
"id": 7138,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "orbit, the-moon, planet, gravity",
"url": null
} |
quantum-mechanics, hilbert-space, operators, mathematical-physics, observables
$^{\dagger}$ In chapter $2$, page $48$ of Quantum Mechanics I. Galindo and Pascual. Springer it is noted that the in order to write $(1)$, it is assumed that the corresponding operator has no continuous singular spectrum, but I don't know e... | {
"domain": "physics.stackexchange",
"id": 88013,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, operators, mathematical-physics, observables",
... |
evolution, genetics, allele
Title: How can a recessive allele propagate until they manifest? Suppose a specific gene has two possible alleles. In a given population all members have only the dominant one. By a mutation on member receives the first recessive allele of that population. Is it possible that one day the de... | {
"domain": "biology.stackexchange",
"id": 2009,
"lm_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, genetics, allele",
"url": null
} |
$$c=...210210210210210210120120120120120...$$
surely is non-wandering. Thus, there must be at least one more set $C$ with $c\in C$ so that $$\Omega(T)=L\cup R\cup C.$$ Maybe the set $C$ can be determined.
Background
The background of this is the following: There is a theorem saying that in order to compute the topol... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429151632047,
"lm_q1q2_score": 0.809891580090722,
"lm_q2_score": 0.8221891327004133,
"openwebmath_perplexity": 113.32071120682777,
"openwebmath_score": 0.9403144121170044,
"tag... |
homework-and-exercises, newtonian-mechanics, conservation-laws, velocity, collision
Title: Elastic collision with one moving object hitting a stationary object In an elastic collision, I understand that momentum is conserved and kinetic energy is conserved. If billiard ball of silver (with velocity $v_{(Ag)}$ impacts ... | {
"domain": "physics.stackexchange",
"id": 78882,
"lm_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, conservation-laws, velocity, collisio... |
It turns out that they do not satisfy the relations. Here is where the comments to the question come in. It is better to choose $\Phi=(1\;n)(2\;n-1)\cdots(\lfloor\frac{n}{2}\rfloor\;\lceil\frac{n}{2}\rceil)$ and $\Psi=(1\;2\;\cdots\;n)$. This choice looks a little weird, but if you label the vertices of a regular $n$-g... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769092358048,
"lm_q1q2_score": 0.8065209410534441,
"lm_q2_score": 0.8267117983401363,
"openwebmath_perplexity": 218.19843004834325,
"openwebmath_score": 0.6256442666053772,
... |
atmosphere, climate, climate-change, co2
Title: Why do greenhouse gases affect ocean temperature so much? As I understand it, greenhouse gases absorb infrared radiation from the sun. Much of that radiation would otherwise continue and be absorbed on the planet surface in the ocean or on land.
If CO2 increases are cau... | {
"domain": "earthscience.stackexchange",
"id": 2499,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "atmosphere, climate, climate-change, co2",
"url": null
} |
pairs satisfies an exponential function if the y-values are multiplied by a constant amount as the x-values change by a constant amount. Plug both values of b into the either equation to find a. Exponential Growth An exponential growth function has the form y = 𝑥, where b > 1. Strand: FUNCTIONS - Building Linear or Ex... | {
"domain": "residencemaiori.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9914225143328517,
"lm_q1q2_score": 0.8386863801025874,
"lm_q2_score": 0.8459424392504911,
"openwebmath_perplexity": 826.3457215131704,
"openwebmath_score": 0.48758867383003235,
... |
java
Title: Java code to delete comments from an input string I wrote this code to delete comments from an input string (such as a Java file converted to string) and it works great. For simple curiosity, I was wondering if there was a more elegant way of presenting the function that I wrote.
I'm looking for some advi... | {
"domain": "codereview.stackexchange",
"id": 27856,
"lm_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
} |
c
/* parse command line args */
for (int i = 0; i < argc; ++i) {
if (!lstrcmpA(argv[i], "--line") || !lstrcmpA(argv[i], "-l")) {
show_lines = true;
}
else if (i + 1 < argc && !lstrcmpA(argv[i], "-r")) {
++i;
if (!lstrcmpiA(argv[i], "true")) {
... | {
"domain": "codereview.stackexchange",
"id": 39637,
"lm_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
} |
c#, multithreading, .net, .net-2.0
Thread th = new Thread(() => WorkerMethodAsync(reader));
th.Start();
th.Join();
};
//Stop the timer and print final output
t.Dispose();
Output(null);
Console.WriteLine("Press any key to exit.... | {
"domain": "codereview.stackexchange",
"id": 24834,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, multithreading, .net, .net-2.0",
"url": null
} |
c, linked-list, memory-management, pointers
// do not proceed if list container corrupt
if (list->head != NULL) {
llist_node *head = list->head;
// free rest of list first
if (head->next != NULL) {
llist_node *next = head->next;
while (next != NULL) {
llist_node *next_next = next->ne... | {
"domain": "codereview.stackexchange",
"id": 6249,
"lm_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, linked-list, memory-management, pointers",
"url": null
} |
c++, algorithm, vectors
} else {
// unsorted version - search for each index in begin..end
const auto pred = [&](const T&) {
return std::find(begin, end, current_index++) != end;
};
v.erase(std::remove_if(v.begin(), v.end(), pred), v.end());
}
}
template <typename T, t... | {
"domain": "codereview.stackexchange",
"id": 32497,
"lm_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, vectors",
"url": null
} |
c++, unit-testing
TEST_CASE("Testing NDArray Indexing with a 2D array with positive padding", "[NDArray][padding]"){
std::uint32_t width = 1 + rand()%20;
std::uint32_t height = 1 + rand()%20;
std::int32_t padding_x = rand()%5;
std::int32_t padding_y = rand()%5;
rafko_utilities::NDArrayIndex idx({width, heigh... | {
"domain": "codereview.stackexchange",
"id": 43993,
"lm_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",
"url": null
} |
special-relativity
I start to have problems when I move to non-intertial motion. If I take my reference frame to be the same, and the particle's reference frame to now be its instantaneous reference frame, from what I can see nothing should change, apart from the particle's velocity is now some (as yet unspecified) fu... | {
"domain": "physics.stackexchange",
"id": 17553,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity",
"url": null
} |
newtonian-mechanics, newtonian-gravity, angular-momentum, orbital-motion, celestial-mechanics
As it formed, each planet was surrounded by a circumplanetary disk. Some satellites formed from the material in this disk; others satellites were asteroids that collided with other objects orbiting a planet, lost energy, and ... | {
"domain": "physics.stackexchange",
"id": 98276,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, newtonian-gravity, angular-momentum, orbital-motion, celestia... |
sql, postgresql
'[{"Type": "Mobile", "Number": "7895674563"}]',
'[]'
), ( 4,
'Soumil',
'Roy',
'[{"Type": "Mobile", "Number": "8798765632"}]',
'[{"Type": "Home", "Email": "soumil@xyz.com"}]'
); | {
"domain": "codereview.stackexchange",
"id": 25800,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sql, postgresql",
"url": null
} |
java, beginner, array, gui
// If the user passed, the program continues
if (pass == true) {
// Checking if ID# already exists
if (employees.contains(Integer.parseInt(inputs[0].getText()))) {
// Displaying error message if entered ID# exists
display.setTex... | {
"domain": "codereview.stackexchange",
"id": 22602,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner, array, gui",
"url": null
} |
• I love this approach! :D. Thank you! – user860374 May 21 '15 at 20:59
• Of course, first you have to show that continuity is equivalent to something about sequences. – GEdgar May 21 '15 at 21:01
• @GEdgar - we have that theorem in the book later on :). So should be fine to use this :) – user860374 May 21 '15 at 21:03... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517443658749,
"lm_q1q2_score": 0.823349042746328,
"lm_q2_score": 0.8418256472515683,
"openwebmath_perplexity": 104.16074007210379,
"openwebmath_score": 0.9222249388694763,
"tag... |
matlab
Then run with:
[t,K] = ode45(@pendulum_cartesian, [0,10], [0.1;0.00017;0.1;0]);
theta = atan(K(:,2)/K(:,1));
plot(t,theta); | {
"domain": "engineering.stackexchange",
"id": 1464,
"lm_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",
"url": null
} |
reductions
Title: How to partition a set into disjoints subsets each of given size? The input: Given a set $U=\{1, \ldots, k\}$ called the universe. Let $C=\{S_1, \ldots, S_n\}$ be a collection of subsets of $U$ and let $ s_j$ be a nonnegative integer for all $j=1,\ldots,n$ such that $\sum_{j=1}^{n} s_j=k$.
The questi... | {
"domain": "cs.stackexchange",
"id": 7722,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reductions",
"url": null
} |
c++, c++11, iterator
private:
ContainerT& m_container;
};
template<typename ContainerT>
auto Reverse(ContainerT& iContainer)
{
return ReverseContainerView<ContainerT>(iContainer);
}
template<typename ContainerT>
auto Reverse(const ContainerT& iContainer)
{
return ReverseContainerView<const ContainerT>(i... | {
"domain": "codereview.stackexchange",
"id": 32346,
"lm_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, iterator",
"url": null
} |
c, database, circular-list, embedded
#ifndef BUCKET_H_
#define BUCKET_H_
#define BUCKET_SIZE 32 // Range 10-32000 Memory in bytes allocated to bucket for edge storage
#define BUCKET_MAX_FEEDS 32 // Range 2-64 Number of unique feeds the bucket can hold
#define BUCKET_MAX_VALUE_SIZE 64 ... | {
"domain": "codereview.stackexchange",
"id": 40696,
"lm_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, database, circular-list, embedded",
"url": null
} |
gazebo, turtlebot, multiple, namespace, tf-prefix
<remap from="map" to="/map" />
</node>
</launch>
The important note is to notice this remapping at the end. This file will be wrapped with
namespace so we have to remove namespace from all appearances of map (there is only one map).
Now we can launch our multiple na... | {
"domain": "robotics.stackexchange",
"id": 10613,
"lm_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, turtlebot, multiple, namespace, tf-prefix",
"url": null
} |
c#, asp.net-mvc-4
$('@(ViewBag.SetFocusTo)').focus();
$('#RmaNumber, #SerialNumber').keydown(function (event) {
if (event.keyCode == 13 || event.keyCode == 9) {
var RmaNumber = $('#RmaNumber').val();
var SerialNumber = $('#SerialNumber').val();
eve... | {
"domain": "codereview.stackexchange",
"id": 5137,
"lm_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#, asp.net-mvc-4",
"url": null
} |
computation-models
Title: Is there a model of computation based on discrete event dynamic systems? I asked a question here about discrete event dynamic systems. They are systems whose state evolution depends on asynchronous events. It can be combined with flow to produce a hybrid system.
There must be an event-based m... | {
"domain": "cs.stackexchange",
"id": 12385,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computation-models",
"url": null
} |
performance, c, strings, search, rags-to-riches
Function ran in 198460 clock cycles
Produced output: string
Function ran in 448832 clock cycles
Produced output: this is not a test
Program ended with exit code: 0
The only thing I would like to be reviewed in this question is the speed of the rmSubstr function. Othe... | {
"domain": "codereview.stackexchange",
"id": 10298,
"lm_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, strings, search, rags-to-riches",
"url": null
} |
c++, validation, template, interval, overloading
inline PixelComponent operator-(const PixelComponent& other){
PixelComponent result;
result = value - other.value;
return result;
}
inline PixelComponent operator*(const PixelComponent& other){
PixelComponent result;
resu... | {
"domain": "codereview.stackexchange",
"id": 40029,
"lm_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++, validation, template, interval, overloading",
"url": null
} |
quantum-computing, cr.crypto-security
Title: Dependent corrections in measurement-based Universal Blind Quantum Computation In Universal Blind Quantum Computation the autors describe a measurement-based protocol which allows an almost classical user to perform arbitrary computations on a quantum server without reveali... | {
"domain": "cstheory.stackexchange",
"id": 354,
"lm_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-computing, cr.crypto-security",
"url": null
} |
word totient. That term was introduced by J J Sylvester, (According to Graham, Knuth and Patashnik, "Concrete Mathematics") who had a habit of making up new words for math terms. "The reference they give is to a paper from 1883: "On the number of fractions contained in any 'Farey series' of which the limiting number is... | {
"domain": "com.es",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9919380075184122,
"lm_q1q2_score": 0.8222559140729097,
"lm_q2_score": 0.8289388125473628,
"openwebmath_perplexity": 1112.7468124861077,
"openwebmath_score": 0.47979435324668884,
"tags": null,... |
java, linked-list, generics
foundElement.setNext(element);
nextElement.setPrevious(element);
}
/**
* PRECONDITION
* head != null, value != null, position > 0
* POSTCONDITION
* An additional element is added to the list.
*/
private void leftInsert(T value, int position){
... | {
"domain": "codereview.stackexchange",
"id": 5245,
"lm_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, linked-list, generics",
"url": null
} |
php, beginner, object-oriented, classes
public function getStatus() {
return $this->status;
}
} I don't think you understand OOP. Well actually, you don't understand OOP!
Naming
Class names should be nouns. E.g.: UserPasswordValidator or EmailValidator. The methods on those classes should be v... | {
"domain": "codereview.stackexchange",
"id": 11024,
"lm_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, beginner, object-oriented, classes",
"url": null
} |
conformal-field-theory
To see that, we look at the transformation rule of primary fields, which by their definition, is $$\mathcal{O}'(z',\bar{z}')=(\partial_z z')^{-h}(\partial_{\bar{z}}\bar{z}')^{-\bar{h}}\mathcal{O}(z,\bar{z}).$$ Compare that to the transformation rules of a tensor with $n$ lower indices. $$T_{u_1u... | {
"domain": "physics.stackexchange",
"id": 32745,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "conformal-field-theory",
"url": null
} |
#### fresh_42
Mentor
2018 Award
I gave the way in a spoiler, But I don't really care. As long my answer was correct. The pleasure of solving it is enough.
Sorry, but I searched twice now for problem #6, and all I could find is post #14 with a result, not a way to the result. To be precise, it wasn't even a result, jus... | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9678992905050948,
"lm_q1q2_score": 0.8086639287383891,
"lm_q2_score": 0.8354835432479661,
"openwebmath_perplexity": 669.3860391679539,
"openwebmath_score": 0.8599011898040771,
"tag... |
strings, software-testing, bit-manipulation, testing
In this case the function bits is a stateful interface, so you have to deal with that, but the same techniques for testing stateful interfaces should work fine here. In particular, the "input" is a sequence of operations on the data structure / API, and the "output... | {
"domain": "cs.stackexchange",
"id": 11133,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "strings, software-testing, bit-manipulation, testing",
"url": null
} |
catkin
Originally posted by Dirk Thomas with karma: 16276 on 2013-11-13
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by mikepurvis on 2013-11-15:
Fantastic, that was just what I was looking for. | {
"domain": "robotics.stackexchange",
"id": 16083,
"lm_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",
"url": null
} |
filters, impulse-response, matched-filter, derivation
\begin{align}
Y(\omega) &=& H(\omega)S(\omega) \\
& = & e^{-j\omega t_0}S^*(\omega) S(\omega)\\
& = & e^{-j\omega t_0} ||S(\omega)||^2
\end{align}
In the case where the envelope of $S(\omega)$ is rectangular (as in your example) then $||S(\omega)||^2$ is equa... | {
"domain": "dsp.stackexchange",
"id": 7223,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, impulse-response, matched-filter, derivation",
"url": null
} |
java, beginner, game
System.out.println(playerChoice + " beats " + computerMoveChoice + ". Player wins!");
playerScore++;
} else {
System.out.println(computerMoveChoice + " beats " + playerChoice + ". The computer wins!");
computerScore++;
}
printCurrentScore... | {
"domain": "codereview.stackexchange",
"id": 21418,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner, game",
"url": null
} |
java, performance, hash-map
Since you know that the length of the array is divisible by two, you can pick both key and value from it at the same time without having to track the state the loop is in, and advance the loop counter by 2.
The loop becomes quite simple now:
Map<KeyT, ValueT> outputMap = new HashMap<>(keysA... | {
"domain": "codereview.stackexchange",
"id": 45312,
"lm_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, hash-map",
"url": null
} |
javascript, jquery, html, css, html5
<body>
<div id="menu">
<span>Hover for items!</span>
<a href="#1">Item 1</a>
<a href="#2">Item 2</a>
<a href="#3">Item 3</a>
</div>
</body> Markup :
I am not sure the content you are displaying is supposed to be a navigation menu or just options. In the first ca... | {
"domain": "codereview.stackexchange",
"id": 13701,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, html, css, html5",
"url": null
} |
or contingency. That is, a statement and its negation can never have the same truth value. Definition: A compound statement is a contradiction if there is an F beneath its main connective in every row of its truth table. The ntheorem package provides nine predefined theorem styles, listed in Table 4. Some sentences have... | {
"domain": "chiavette-usb-personalizzate.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.970239907775086,
"lm_q1q2_score": 0.8545844878495524,
"lm_q2_score": 0.8807970904940926,
"openwebmath_perplexity": 467.3208727966209,
"openwebmath_score": 0.5699777... |
ios, swift
let courseOne = "DFGhKzW5Ze"
// Assign the "currentCourse" variable to the correct course
var currentCourse = courseOne
// Check which course the user is voting for
var userVotes: Int!
var userId: String!
// Query the user database to find their hasVoted & their object ID (based o... | {
"domain": "codereview.stackexchange",
"id": 14692,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ios, swift",
"url": null
} |
I hope you remember sines and. 12), can be identified as an integral in which contributions g(ω) at all angular frequencies ω are summed to describe a function f(t). RUBIN Abstract. , they have a phase shift of +π/2. When calculating the Fourier transform Mathematica does not need to know the meaning of your input. , t... | {
"domain": "horseitaly.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9898303434461161,
"lm_q1q2_score": 0.8115553066325789,
"lm_q2_score": 0.819893340314393,
"openwebmath_perplexity": 809.6156763894696,
"openwebmath_score": 0.913366973400116,
"tags": nu... |
ros, turtlebot, ros-kinetic, opencr, turtlebot3
Title: Simulated or stubbed out OpenCR serial communications
I would like to use the TurtleBot3 SBC stack as a test case for some architectural security research.
It would be convenient not to connect to the OpenCR board, ask I'd like to run the stack in a VM.
I don't c... | {
"domain": "robotics.stackexchange",
"id": 34240,
"lm_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, turtlebot, ros-kinetic, opencr, turtlebot3",
"url": null
} |
cosmology, expansion, redshift
According to this paper, the CMBR was measurably hotter in the past (less-technical synopsis here). The researchers observed absorption lines in a gas cloud located in a distant galaxy and found that the pattern of lines seen could only be explained if the CMBR temperature at time of ab... | {
"domain": "astronomy.stackexchange",
"id": 3415,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, expansion, redshift",
"url": null
} |
c++, sdl, visual-studio
You can simplify this even further by writing:
void addColliableObject(Object* co)
{
m_colliableObjects.emplace_back(co);
} | {
"domain": "codereview.stackexchange",
"id": 39866,
"lm_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++, sdl, visual-studio",
"url": null
} |
python, validation, integer
Title: Valid memory address in Python I am looking for suggestions of improving this function to check whether a memory address is appropriate or not.
def isweird(addr, cpu_name):
"""Check if a memory address is weird
Args:
addr (str): a memory address
cpu_name (str)... | {
"domain": "codereview.stackexchange",
"id": 21743,
"lm_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, validation, integer",
"url": null
} |
python, python-3.x
Similarly, you can break out of the j loop when mul <= maxi because mul goes decreasing.
for i in range(999, 99, -1):
for j in range(9, 0, -1):
mul = i * j
if mul <= maxi:
break
else:
for x in range(99, 9, -1):
y, r = divmod(mul, x... | {
"domain": "codereview.stackexchange",
"id": 11898,
"lm_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
} |
bioinformatics, dna, sequence-alignment, blast
Query 61 TGGTGCCCAGGCTGGAGTGCAGTGGCGTGATCTCGGCTCGCTACANNCTCCACCTCCCAG 120
||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||
Sbjct 68 TGGTGCCCAGGCTGGAGTGCAGTGGCGTGATCTCGGCTCGCTACAACCTCCACCTCCCAG 127
Query 121 CCGCCTGCCCTGGCCTCCCAAAGTGCCGAG... | {
"domain": "biology.stackexchange",
"id": 4511,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bioinformatics, dna, sequence-alignment, blast",
"url": null
} |
regular-languages, context-free, finite-automata, pushdown-automata, pumping-lemma
$s = a^{m}b^{n}b^{n}a^{m}$ and use the pumping lemma that is not regular. Well?
Any idea? Let
$$ P = \{ww^{R} : w\in \{a, b\}^{*} \} $$
$$R_a=\{u\in \{a, b\}^{*} : |u|_{a}\equiv 0\ (\text{mod}13) \} $$
$$R_b=\{u\in \{a, b\}^{*} : |u|... | {
"domain": "cs.stackexchange",
"id": 13241,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regular-languages, context-free, finite-automata, pushdown-automata, pumping-lemma",
... |
python, python-3.x
Title: Extending Python list functionalities I am extending the functionalities of a Python list and I would like to include a method to normalize a vector to the [0, 1] range, by using element-wise operations. I came out with this solution, but find that using two classes does not seem clean. The m... | {
"domain": "codereview.stackexchange",
"id": 28735,
"lm_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
} |
In [17]:
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
plt.figure(figsize=(10, 5))
plt.loglog(N, sol_times_a, label='A: Iterative', marker='o', clip_on=False)
plt.loglog(N, sol_times_b, label='B: Eratosthenes', marker='o', clip_on=False)
plt.legend(loc=0)
plt.xlabel('n')
plt.ylabel('time (s... | {
"domain": "jupyter.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9924227591803558,
"lm_q1q2_score": 0.8248452830554608,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 1872.1354544680582,
"openwebmath_score": 0.49042361974716187,
"tags": n... |
In addition, suppose each of them have homogeneous boundary conditions. In general, superposition preserves all homogeneous side conditions. A first order Differential Equation is Homogeneous when it can be in this form: We can solve it using Separation of Variables but first we create a new variable v = y x. The metho... | {
"domain": "quadri-canvas.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668695588647,
"lm_q1q2_score": 0.8089347294893187,
"lm_q2_score": 0.8244619285331332,
"openwebmath_perplexity": 442.1441670526314,
"openwebmath_score": 0.8055364489555359,
"tags... |
a special type of motion known as vertical circular motion. In this chapter we are going to look at the motion of objects that are either projected, thrown, or shot directly into the air, be it vertically upwards, downwards or when objects are dropped. Accelerations in the horizontal projectile motion and vertical proj... | {
"domain": "zoldterv.hu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018419665618,
"lm_q1q2_score": 0.8062108622714075,
"lm_q2_score": 0.8267117919359419,
"openwebmath_perplexity": 788.8755055509969,
"openwebmath_score": 0.38295450806617737,
"tags... |
python, beginner, python-3.x, role-playing-game
import math
import random
#import tkinter
class NPC:
def __init__(self, name='Shrouded Figure', agil=0.0, char=0.0, endur=0.0, stren=0.0, tough=0.0, will=0.0, wis=0.0, luck=0.0, focus=0.0, magpot=0.0, level=None, gold=0, skills={}, inven={}, equipment={}):
#... | {
"domain": "codereview.stackexchange",
"id": 28639,
"lm_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, role-playing-game",
"url": null
} |
quantum-mechanics, electromagnetism, vacuum, particle-physics
Or will something else happen?
Second question: I'm assuming different things will happen if the particles are different things, for example if Particle A was a proton and Particle B was an electron they would just pull together? Or the electron would begi... | {
"domain": "physics.stackexchange",
"id": 10114,
"lm_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, electromagnetism, vacuum, particle-physics",
"url": null
} |
frame
The rotation matrices that describe the orientations are ($R_{w,l}$ represents rotation from $w$ to $l$, values are rounded):
$R_{w,l} = \left[ \begin{array}{{c}}
0.94&0&-0.34\\
0.07&0.98&0.2\\
0.33&-0.21&0.92
\end{array}\right]$, $R_{w,r} = \left[ \begin{array}{{c}}
0.94&0&0.34\\
-0.07&0.98&0.2\\
-0.33&-0.21&0.... | {
"domain": "robotics.stackexchange",
"id": 1677,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "frame",
"url": null
} |
java, optimization, serialization
// this is the full size of the header
static constexpr uint32_t m_head_offset = m_off_already_replicated + 1;
And CustomerAddress is a typedef for uint64_t and it is made up like this -
typedef uint64_t CustomerAddress;
void client_data(uint8_t datacenter,
uint... | {
"domain": "codereview.stackexchange",
"id": 10411,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, optimization, serialization",
"url": null
} |
# Help with separable equation
#### Kris
##### New member
( 4*x+1 )^2 dy/dx = 27*y^3
I'm trying to separate this into a separable equation. Does it matter which way I do it? I.e taking all xs to the left or all ys to the left or does it not matter as long as x and y are on different sides?
#### MarkFL
Staff member... | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9902915249511565,
"lm_q1q2_score": 0.8586181698652723,
"lm_q2_score": 0.8670357649558006,
"openwebmath_perplexity": 349.76344192528086,
"openwebmath_score": 0.858676016330719,
"ta... |
c, linked-list
if (i == NULL) {
return;
}
printf("%s\n",i->name);
printIslands(i->nextIsland);
}
Again do not be lulled into false sense of security by recursion prefer to use a loop.
void printIslands(island *i){
for(;i != NULL; i = i->next) {
printf("%s\n",i->name);
}
} | {
"domain": "codereview.stackexchange",
"id": 12680,
"lm_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, linked-list",
"url": null
} |
c++, beginner, linked-list
LinkedList.cpp
#include <iostream>
#include "LinkedList.h"
LinkedList::LinkedList()
{
head = new Node(0);
}
LinkedList::~LinkedList()
{
}
int LinkedList::get_count(){
return count;
}
void LinkedList::AddNode(int _value){
Node *node = new Node(_value);
Node *previousNode ... | {
"domain": "codereview.stackexchange",
"id": 12401,
"lm_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, linked-list",
"url": null
} |
quantum-field-theory, path-integral, yang-mills, functional-determinants
Now observe that the integrand $$\int\mathcal{D}[A]\left(\Delta[A]\delta[\mathcal{F}(A[U])]e^{-S[A]}\right)$$
under the integral $\int\mathcal{D}[U]$ is actually independent of $U$, therefore it can be replaced by $$\int\mathcal{D}[A[U]]\left(\De... | {
"domain": "physics.stackexchange",
"id": 88276,
"lm_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, path-integral, yang-mills, functional-determinants",
"url"... |
supermassive-black-hole
Title: How can a supermassive black hole be 13 billion years old? A supermassive black hole was discovered recently that is 13 billion years old. This blackhole is 1.6 billion times the mass of the sun. How can this blackhole have formed so quickly after the big bang? Do theories predict superm... | {
"domain": "astronomy.stackexchange",
"id": 5195,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "supermassive-black-hole",
"url": null
} |
c#, object-oriented, console
Title: Console-based ATM client as a class library I have completed my bank ATM application in C# class library project. For simplicity, the data of this version will be stored in the List instead of a database. The basic feature are
Login
Check balance
Place cash deposit
Withdraw cash
Ma... | {
"domain": "codereview.stackexchange",
"id": 35137,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, object-oriented, console",
"url": null
} |
terminology, meteorite, meteoroid
A piece of rock or metal that has fallen to the earth's surface from outer space as a meteor.
But, meteors impact other planets. Are they still meteorites? Or is there another word for them. And, if they are still called meteorites, what is the threshold for an object to be impact... | {
"domain": "astronomy.stackexchange",
"id": 3703,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "terminology, meteorite, meteoroid",
"url": null
} |
factorising
• Sep 14th 2009, 03:18 AM
mark
factorising
hi, could someone help me with this please:
a polynomial is given by $p(x) = x^3 - 6x^2 + 9x - 4$
a) factorise p(x) completely- i did this question and came up with $(x - 1)^2 (x - 4)$ but then the next question i didn't get
b) hence solve the equation $y^6 - 6... | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769156265969,
"lm_q1q2_score": 0.8311454868036812,
"lm_q2_score": 0.8519528019683105,
"openwebmath_perplexity": 670.582728526257,
"openwebmath_score": 0.7861676216125488,
"tags... |
fourier-transform, sampling, convolution, zero-padding
Title: Why do the lengths of the sampled signals $x_1, \: x_2$ have to be $\text{length}(x_1)+\text{length}(x_2)-1$? We know that convolution in time is equivalent to multiplication in frequency (Fourier).
$$x_1(t) \ast x_2(t) \leftrightarrow X_1(\omega)X_2(\omega... | {
"domain": "dsp.stackexchange",
"id": 10546,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fourier-transform, sampling, convolution, zero-padding",
"url": null
} |
reference-request, soft-question, formal-methods, algebraic-topology
The crucial approach to scaling such analyses is modularity which allows decomposing the problem into sub-problems. Indeed this usually consists in identifying cycle-like things, typically either cycles in the control flow graph or the call graph, an... | {
"domain": "cstheory.stackexchange",
"id": 5043,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reference-request, soft-question, formal-methods, algebraic-topology",
"url": nu... |
quantum-mechanics, quantum-entanglement
Title: Is it ok to think in entangled particles as one in function of the other? As I read in this question: If two particles are entangled and you collapse the wave function of one of the particles. Does the other particle collapse as well?
Two entangled particles share the sa... | {
"domain": "physics.stackexchange",
"id": 41484,
"lm_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",
"url": null
} |
python, python-3.x, parsing, math-expression-eval
if sFun[index] == "(": #if "(" put on stos
stos.append(sFun[index])
index += 1
continue
if sFun[index] == ")":
for i in range(len(stos)-1,0,-1): #if ")" move all operands till ... | {
"domain": "codereview.stackexchange",
"id": 37416,
"lm_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, parsing, math-expression-eval",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.