text stringlengths 1 1.11k | source dict |
|---|---|
electromagnetism, optics, visible-light
$R_s=(\frac{n_1cos\theta_i-n_2cos\theta_t}{n_1cos\theta_i+n_2cos\theta_t})^2$
$R_p=(\frac{n_1cos\theta_t-n_2cos\theta_i}{n_1cos\theta_t+n_2cos\theta_i})^2$
Effective reflectance $R_{eff}=\frac{1}{2}(R_s+R_p)$. In the case of normal incidence, shown in this image, $\theta_i=\theta_t=0$.
As such, $R=(\frac{n_1-n_2}{n_1+n_2})^2$ since $cos(0)=1$. | {
"domain": "physics.stackexchange",
"id": 56196,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, optics, visible-light",
"url": null
} |
nyquist, reconstruction, digital-to-analog
For 44.1 kHz sampling frequency, Fig. 1 gives a lower bound on linear-phase oversampling digital filter performance as function of delay introduced by the filter, when pass band and stop band ripple are equally weighted. This bound does not depend significantly on the oversampling ratio. DAC manufacturers may choose a different weighting for example to gain lower stop band ripple by increasing the pass band ripple, as in the case of AK4499. They may also optimize the filters by other criteria than strict equiripple. For example, the filter may include compensation for attenuation of high frequencies by the analog circuitry (zero-order hold, RC-filters, etc.), and the filter delay characteristics may suffer from using a computationally efficient multi-rate implementation. | {
"domain": "dsp.stackexchange",
"id": 7741,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nyquist, reconstruction, digital-to-analog",
"url": null
} |
neural-network, keras, weighted-data
Gradually transforming
the training task, from an easy one (maybe convex) where
examples illustrate the simpler concepts, to the target one (with more
difficult examples)
The basic idea is to start small, learn easier aspects of the
task or easier sub-tasks, and then gradually increase the difficulty
level. From the point of view of building representations, advocated
here, the idea is to learn representations that capture low-level abstractions
first, and then exploit them and compose them to learn slightly
higher-level abstractions necessary to explain more complex structure
in the data. By choosing which examples to present and in which
order to present them to the learning system, one can guide training
and remarkably increase the speed at which learning can occur.
learning deep architectures for ai by yoshua bengio | {
"domain": "datascience.stackexchange",
"id": 3089,
"lm_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, keras, weighted-data",
"url": null
} |
ros, lidar, velodyne-pointcloud, velodyne
Title: Velodyne point cloud node doesn't work
I have a 32 HDl and VLP 16. I built the velodyne package by compiling it from source as I wanted to use VLP-16 driver.
When I try to run the velodyne pointcloud node for the HDL 32, I get the following error
$ rosrun velodyne_pointcloud cloud_node _calibration:=32db.yaml
[ INFO] [1458049427.031892132]: correction angles: 32db.yaml
YAML Exception: yaml-cpp: error at line 0, column 0: bad conversion
[ERROR] [1458049427.036928149]: Unable to open calibration file: 32db.yaml
[ INFO] [1458049427.043593822]: Reconfigure Request
Originally posted by b-sriram on ROS Answers with karma: 105 on 2016-03-15
Post score: 0
This is apparently a bug caused by a recent source update affecting the YAML reader.
See issue #84.
Originally posted by joq with karma: 25443 on 2016-03-19
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by joq on 2016-03-22:
It's fixed now in the mastersource. | {
"domain": "robotics.stackexchange",
"id": 24115,
"lm_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, lidar, velodyne-pointcloud, velodyne",
"url": null
} |
ros, eigen3, ros-kinetic
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( INCLUDE_DIRS include
# LIBRARIES image_publisher CATKIN_DEPENDS cv_bridge roscpp sensor_msgs std_msgs dynamic_reconfigure message_runtime
#opencv2
# DEPENDS system_lib DEPENDS Eigen #Eigen library )
###########
## Build ##
###########
find_package(OpenCV) find_package(Eigen REQUIRED)
#eigenlibrary
set( PROPRIETARY_FUNCTIONS_H include/image_publisher/function_file.h ) | {
"domain": "robotics.stackexchange",
"id": 30810,
"lm_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, eigen3, ros-kinetic",
"url": null
} |
the exponent on the $$x$$ is a zero (this also explains the degree…) and so we can see that it really is a polynomial in one variable. In mathematics, the degree of a polynomial is the highest of the degrees of the polynomial's monomials (individual terms) with non-zero coefficients. Once assessed, you will also need to apply for 609996 Associate Degree of Advanced Manufacturing via UAC. The term shows being raised to the seventh power, and no other in this expression is raised to anything larger than seven. The highest power is the degree of … To obtain the degree of a polynomial defined by the following expression x^3+x^2+1, enter : degree(x^3+x^2+1) after calculation, the result 3 is returned. The degree of is 6. Polynomial is a mathematical expression consisting of variables, constants that can be combined using mathematical operations addition, subtraction, multiplication and whole number exponentiation of … In turbomachinery, Degree of reaction or reaction ratio (R) is defined as | {
"domain": "marc-petit.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.966914019704466,
"lm_q1q2_score": 0.8516550522881167,
"lm_q2_score": 0.8807970873650401,
"openwebmath_perplexity": 1161.8103084296717,
"openwebmath_score": 0.5583773255348206,
"tags": null,
"url": "https://marc-petit.com/wwhy41x0/276140-degree-of-expression"
} |
astronomy, visible-light, spectroscopy
Why are the absorption lines so wide on the second spectrum? Are they even absorption lines at all, or another phenomenon altogether? These are spectra from the Sloan Digital Sky Survey (SDSS). The first spectrum is that of a star hotter than Sun. There are prominent, but not particularly strong, hydrogen lines. Note the sodium line, the G band, and the H and K calcium lines. The second spectrum is that of a star significantly cooler than Sun. The wide bands you see are molecular bands, probably TiO (titanium oxide) and similar metallic species. These molecular bands are the signature of cool, red stars. Note the very strong sodium line and the prominent lines of singly ionized calcium in the infrared. | {
"domain": "physics.stackexchange",
"id": 6783,
"lm_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, visible-light, spectroscopy",
"url": null
} |
rivers, ecology, coriolis, estuary
Title: How does the Coriolis effect affect rivers and estuaries I'm quite confused about this since it is said to influence major currents in the sea the winds to the formation of gyres in the ocean and as well as influencing the weather at times due to the planet's rotation and the direction of where the winds are going.
Are there any effects(positive/negative such as sudden algal blooms) generated by the Coriolis effect that can affect the rivers and the inhabitants near it? The effects of Coriolis in rivers and estuaries are more subtle than in the open ocean. Coriolis tends to be a second or third order process in fast-moving and relatively small systems like rivers. | {
"domain": "earthscience.stackexchange",
"id": 1024,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rivers, ecology, coriolis, estuary",
"url": null
} |
statistics, feature-scaling
Title: PCA and maintaining relationship with target variable I'm rather new to PCA and was hoping to have some confusion cleared up. Lets say for example we have a feature matrix that's nx100 and I want to get it down to something a bit smaller, p-dimensions, without losing too much variance.
After applying PCA and receiving and new feature matrix nxp, I would use x_reduced to predict some target variable y.
My question is, after the transformation, the new reduced feature matrix has been rotated by the eigenvectors and is sitting on a new basis. Yet, our y has not changed relative to X_reduced.
I'm unsure about how y_original and x_reduced can be used for training since y has not changed with respect to x_reduced. | {
"domain": "datascience.stackexchange",
"id": 679,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistics, feature-scaling",
"url": null
} |
I've used a few tricks:
• Testing matrix multiplication and seeing what it does, e.g. by multiplying a translation with a rotation
• Typing out a matrix by hand and seeing what it does, e.g. if I make the 4th element "10", does it translate X by 10?
$y=xA$ and $y=Ax$ don't affect basic matrix operations
Those two styles only prescribe how transform matrices are created. Given known matrices, it doesn't actually affect the basic matrix operations and the order of their arguments.
For example, for matrix multiplication, the order only swaps because the matrices themselves are not the same in the different programs.
No matter which style a program uses, the following operations should remain identical across them.
• Transpose: $A^T$
• Matrix multiplication: $AB$
• Inverse: $A^{-1}$
• Determinant: $\det A$
• Minor: $M_{i,j}$
• Cofactor: $C_{i,j}$
• ... and pretty much all of them
Appendix: a table of matrix math conventions for popular programs | {
"domain": "otterstack.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8203211640585232,
"lm_q2_score": 0.8311430520409023,
"openwebmath_perplexity": 2971.5895878376386,
"openwebmath_score": 0.5106235146522522,
"tags": null,
"url": "https://blog.otterstack.com/posts/202212-why-is-matrix-math-different/"
} |
optics, visible-light
My last question concerns this old painters belief, that every color can be obtained by mixing red (R), yellow (Y) and blue (B) or the belief that every color can be obtained by mixing cyan (C), magenta (M) and yellow (Y). Both models, the RYB and the CMY model, are subtractive. When one mixes these colors, doesn't one ignore the luminance? I.e. don't the painters want to say that they can obtain each chromaticity by mixing these colors? (Of yourse, if they want to say this, it is also not really true since the gamut of these three colors determine a certain region in the shoe sole plane from the previous questions which is not the complete sole.) Yes, a color is a point in LMS space. At least, that's the signal that the eye tells to the brain starting signal which is post-processed by neurons in the eye and brain. For example, the brain does some inferences on what the lighting condition is etc., so that an object looks like it has one color even if half of it is in sunlight and half | {
"domain": "physics.stackexchange",
"id": 11535,
"lm_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",
"url": null
} |
Then what about irrational numbers? This extension uses continuity, and a complete proof would take more care and time than we wish to devote to it. But we can state it easily as follows. Note that 2^x is an increasing function on rational numbers, since for every positive n and m, 2^m/n = nth root(2^m) is greater than one. Hence for any rational numbers r < s, we have s-r a positive rational number, so 2^s = 2^(r+(s-r)) = 2^r 2^s-r where 2^s-r is greater than 1. Since we get 2^s from 2^r by multiplying 2^r by a number greater than 1, 2^s > 2^r, i.e. 2^x is an increasing function. Then we extend it to irrational values just by keeping it increasing. I.e. define for any irrational number x, 2^x to be the smallest real number not smaller than 2^r for any rational number r < x. Put another way, choose an infinite decimal expansion for x. Then for each n, taking an approximation by only using the first n digits, gives us a sequence of approximations to x from below, by rational numbers. If | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877038891777,
"lm_q1q2_score": 0.8164215919756966,
"lm_q2_score": 0.8311430436757312,
"openwebmath_perplexity": 626.8308290929708,
"openwebmath_score": 0.8821554183959961,
"tags": null,
"url": "https://www.physicsforums.com/threads/logarithm-question.209250/"
} |
r
Title: How to create this function for lapply? I have two lists of dataframes. List x and list my_list. Each having four dataframes and their names are same for the two lists, i.e., bray-curtis, Chao1, FB, and Shannon.
The dataframes within the two lists have same element names, but they contain different information. This is because list x has been generated after some operations on list my_list.
Now I want to write a function and run that on list x with `lapply. the command I want to write as a function is
forest(x$Chao1, slab = paste(my_list$Chao1$StudyID)) | {
"domain": "bioinformatics.stackexchange",
"id": 1814,
"lm_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",
"url": null
} |
electric-circuits, electric-current, electrical-resistance, capacitance, inductance
$$\vec E_c \ne \vec E_p$$
But what is $\vec E_p$ then? It doesn't seem like an electrostatic field since the voltage $V(t)$ provided by the capacitor is time dependent.
What is the mechanism that keeps accelerating the particles, so drifting velocity increases to its maximum, as the voltage drops to zero? And how does this mechanism correspond to $\vec E_p$? Your assumption that the current "keeps increasing" while the capacitor electric field is decreasing does not seem to correspond to what happens.
Let's start with a charged capacitor at a voltage Vo, in a circuit where the discharging resistor is separated by a switch.
Before the switch is flipped, the capacitor has a charge +Qo on one plate and a charge -Qo on the other one. Well, more or less because the wire and the switch contact will become part of the conducting body and some charge will be present there, too, but let's not look into this now. | {
"domain": "physics.stackexchange",
"id": 90898,
"lm_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, electric-current, electrical-resistance, capacitance, inductance",
"url": null
} |
ai.artificial-intel, semantics, formal-modeling
Clearly (to the human reader) the first two statements are much more similar to one another than they are to the third statement. Does there exist any theory that would allow a computer to draw the same conclusion? What about if we allow longer excerpts such as new articles? | {
"domain": "cstheory.stackexchange",
"id": 264,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ai.artificial-intel, semantics, formal-modeling",
"url": null
} |
enzymes, enzyme-kinetics
Title: What does "thermodynamic equilibrium" mean for an enzyme-substrate complex? From Fersht, Enzyme Structure and Mechanism p. 87:
The Michaelis-Menten mechanism assumes that the enzyme-substrate
complex is in thermodynamic equilibrium with free enzyme and
substrate.
In my understanding what this means is that the (E-, S- and ES-concentration dependent) rates of association and dissociation have equated.
So we're kind of in this situation: | {
"domain": "biology.stackexchange",
"id": 2334,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "enzymes, enzyme-kinetics",
"url": null
} |
quantum-mechanics, homework-and-exercises, operators, harmonic-oscillator, commutator
\end{align}
I can't see any commutators in above relations, so how do the commutators i just calculated help us to get and solve these two relations?
I am sorry for asking such a basic questions. I am a self-taught and a real freshman to commutators algebra. The commutators in the above expressions are sued to change the order of the Hamiltonian and annihilation or creation operators. I'll show you the first one in some detail, the second one should not give you problems afterwards. | {
"domain": "physics.stackexchange",
"id": 7592,
"lm_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, homework-and-exercises, operators, harmonic-oscillator, commutator",
"url": null
} |
javascript, tree
}, {
"id": "13020104",
"children": [],
"name": "13020104 Tolerance Testing (general product construction)"
}, {
"id": "13020105",
"children": [],
"name": "13020105 Constructional consequence analysis (general product construction)"
}, {
"id": "13020106",
"children": [],
"name": "13020106 Calculation, Simulation (general product construction)"
}, {
"id": "13020107",
"children": [],
"name": "13020107 Verification, Validation (general product construction)"
}, {
"id": "13020190",
"children": [],
"name": "13020190 General product construction (unspecified)"
}],
"name": "130201 General product construction"
}, {
"id": "13020200",
"children": [{
"id": "13020290",
"children": [],
"name": "13020290 Construction product acoustics (unspecified)"
}], | {
"domain": "codereview.stackexchange",
"id": 29273,
"lm_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, tree",
"url": null
} |
physical-chemistry, kinetics, photochemistry, fluorescence
Title: Nitrogen dioxide fluorescence quenching and lifetime Nitrogen dioxide fluorescence quenching:
$$
\begin{align}
\ce{NO2 + h\nu &->[$\varphi_\mathrm{Ia}$] NO2^{\ast}}\tag{I}\\
\ce{NO2^{\ast} &->[$k_2$] NO2 + h\nu'}\tag{II}\\
\ce{NO2^{\ast} + NO2 &->[$k_3$] 2 NO2}\tag{III}\\
\ce{NO2^{\ast} + Xe &->[$k_4$] NO2 + Xe}\tag{IV}\\
\ce{NO2^{\ast} + NO2 &->[$k_5$] 2 NO + O2}\tag{V}\\
\end{align}
$$
The fluorescence lifetime of $\ce{NO2^{\ast}}$ in the presence of all the reactions, $\tau$, measured at $\pu{298 K}$ at different concentrations (molecules per litre) of the reactants:
$$
\begin{array}{crrr}
\hline
\text{Experiment} & \tau/\pu{μs} & [\ce{Xe}]/\pu{L-1} & [\ce{NO2}]/\pu{L-1}
\\
\hline
1 & 3.38 & \pu{1.6E19} & \pu{3.2E18} \\
2 & 1.89 & \pu{1.6E19} & \pu{6.4E18} \\
3 & 3.64 & \pu{0.8E19} & \pu{3.2E18} \\
\hline
\end{array}
$$
What is the real fluorescence lifetime of $\ce{NO2^{\ast}}?$ | {
"domain": "chemistry.stackexchange",
"id": 13822,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, kinetics, photochemistry, fluorescence",
"url": null
} |
python, object-oriented, multithreading, classes, tkinter
def update_ticker(self):
flt_price = float(self.price)
if randint(0, 9) == 0:
self.direction = CHAR_EVEN
else:
increase_percent = randlimit(-5, 5)
# TODO implementar normalvariate(0, 0.02) o gauss(0, 0.02)
flt_change = flt_price * increase_percent / 100
flt_new_price = flt_price + flt_change
self.price = "{:.2f}".format(flt_new_price)
if flt_change < 0:
self.direction = CHAR_DOWN
elif flt_change == 0:
self.direction = CHAR_EVEN
else:
self.direction = CHAR_UP
self.change = "({:+.2f})".format(flt_change)
def ticker_to_text(self):
return " | {} {} {} {} ".format(self.symbol, self.price, self.direction, self.change) | {
"domain": "codereview.stackexchange",
"id": 8652,
"lm_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, multithreading, classes, tkinter",
"url": null
} |
python, tic-tac-toe
all_data.py:9:8: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name)
all_data.py:11:8: R1723: Unnecessary "else" after "break" (no-else-break)
************* Module data_base
data_base.py:7:0: C0301: Line too long (119/100) (line-too-long)
data_base.py:8:4: C0103: Variable name "move_list_X" doesn't conform to snake_case naming style (invalid-name)
data_base.py:9:4: C0103: Variable name "move_list_O" doesn't conform to snake_case naming style (invalid-name)
data_base.py:50:9: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
data_base.py:50:39: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
data_base.py:1:0: W0611: Unused import all_data (unused-import)
data_base.py:2:0: C0411: standard import "import json" should be placed before "import all_data" (wrong-import-order)
************* Module main
main.py:12:0: C0301: Line too long (121/100) (line-too-long) | {
"domain": "codereview.stackexchange",
"id": 42057,
"lm_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, tic-tac-toe",
"url": null
} |
computational-physics, ising-model, correlation-functions, critical-phenomena
Knowing this, it is easy to see that at every step in your Markov chain you don't have to look at all possible $L^2$ pairs of spins. Instead you can only look at a subset of pairs, where you have all distances $r$ you are interested in within this subset. | {
"domain": "physics.stackexchange",
"id": 20322,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computational-physics, ising-model, correlation-functions, critical-phenomena",
"url": null
} |
image-processing, computer-vision, image-segmentation
Title: Detection periodic elements in image I am working on a university project in which I need to find a periodic net element in an image.
The net is a set of diagonal lines in a specific angle ( which I don't know in advance ) on a noisy image. They are hard to detect so I would like to use all the information I can get my hands on.
My current algorithm is based on using edge detection + hough transform to find lines at specific angle range.
I was wondering if there is any way to detect periodic signals in image? Something based on ff2 or something like that...
Thanks, Another approach might be to perform the Radon / Hough transform first, then detect the points.
e.g. R = radon(I,0:179) in MATLAB.
It gives this image: | {
"domain": "dsp.stackexchange",
"id": 999,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, computer-vision, image-segmentation",
"url": null
} |
javascript, homework, dom
//Create button
var button_tag = document.createElement('button');
var button_text = document.createTextNode('Submit');
button_tag.appendChild(button_text);
button_tag.type = 'button';
button_tag.id = 'button_' + this.count; | {
"domain": "codereview.stackexchange",
"id": 33554,
"lm_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, homework, dom",
"url": null
} |
python, csv
while pagecount <5401:
"""
#movie-entries go from http://www.the-numbers.com/movie/budgets/all/1
#to http://www.the-numbers.com/movie/budgets/all/5401
#so there are 5400 entries
"""
request = Request("http://www.the-numbers.com/movie/budgets/all/"+str(pagecount))
request.add_header('User-agent', 'wswp')
website = urlopen(request).read().strip()
soup = BeautifulSoup(website,'lxml')
"""#obsolete
headertags = soup.find("table").find_next("tr").find_all("th")
headers= []
for line in headertags:
headers.append(line.string)
headers[0] = 'ID'
"""
#movie-entries go from http://www.the-numbers.com/movie/budgets/all/1
#to http://www.the-numbers.com/movie/budgets/all/5401
#so there are 5400 entries | {
"domain": "datascience.stackexchange",
"id": 2202,
"lm_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, csv",
"url": null
} |
• I do not understand your objection; I rather suspect that we mean the same thing. The last bullet point is correct. There might be a misunderstanding: Of course I do not claim that the ordered tuple $(\lambda_1,\dots,\lambda_n)$ is $C^\infty$. I claim that one can choose another tuple of eigenvalue functions which is $C^\infty$. I mention the ordered tuple only to state the sufficient condition under which this other choice is possible. May 4 '20 at 3:40
• OK I agree with your comment. May 7 '20 at 10:16 | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357625461396,
"lm_q1q2_score": 0.8340922556081543,
"lm_q2_score": 0.8519527963298946,
"openwebmath_perplexity": 222.73043348661173,
"openwebmath_score": 0.9387015104293823,
"tags": null,
"url": "https://mathoverflow.net/questions/358634/differentiability-of-eigenvalues-of-positive-definite-symmetric-matrices/358637"
} |
just started to learn stochastic and I have a basic understanding of the event before waiting. I 'm struggling with this Question this Question problem examines customer arrivals to a is! N2 ( t ) $shown below 100 days, to a shop is shown.!: the number of points of a success During a small road, is on average very. Every 24 hours that there are two arrivals in$ ( 3,5 ] $and$ N t! ] = ( 1,2 ] sections of a success During a small road, is on average cars...: a Poisson random variable can take on any positive integer value characterize inhomogeneous. And r =1 is called a Poisson random variable can take on positive..., a coin with $P ( H ) =\frac { 1 } 2... Stochastic and I 'm struggling with this Question$ emergencies per hour an emergency room new... Point, on a small road, is on average 10 e-mails every hours... | {
"domain": "privaluefoundation.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517443658749,
"lm_q1q2_score": 0.8370667000168348,
"lm_q2_score": 0.8558511396138365,
"openwebmath_perplexity": 958.4604196767826,
"openwebmath_score": 0.9235484600067139,
"tags": null,
"url": "http://privaluefoundation.com/a-z-qvhuxd/0rsnc.php?1a5bcb=poisson-process-problems"
} |
special-relativity, resource-recommendations, relativity, history, aether
Introduction to Special Relativity is concise and somehow comprehensive. For a detailed history of ether theories before relativity, you can see Whittaker's A History of the Theories of Aether & Electricity. | {
"domain": "physics.stackexchange",
"id": 76348,
"lm_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, resource-recommendations, relativity, history, aether",
"url": null
} |
timer, typescript
TypeScript specific notes:
Turn on strict null checks. Yesterday. Without it, TypeScript ignores a whole class of errors.
Turn on no implicit any. Once turned on this will point out that the on method has a return type of any
Don't create a class to just hold properties. An interface is fine.
interface CountDownValues {
days: number;
hours: number;
minutes: number;
seconds: number;
}
Consider initializing properties where they are declared when using classes.
Other: | {
"domain": "codereview.stackexchange",
"id": 33813,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "timer, typescript",
"url": null
} |
and complex components in terms of r and θ where r is the length of the vector Get the free "Convert Complex Numbers to Polar Form" widget for your website, blog, Wordpress, Blogger, or iGoogle. and the angle θ is given by Because and because lies in Quadrant III, you choose θ to be θ = π + π/3 = 4π/3. Converting a complex number to polar form. Note that 0. The absolute value of , denoted by , is the distance between the point in the complex plane and the origin . 11 COMPLEX NUMBERS - POLAR FORM. Complex numbers satisfy many of the properties that real numbers have, such as commutativity and associativity. Recall that using the polar form, any complex number It is often useful to consider complex numbers in their polar form (Theta, R). real b= Complex Numbers:The Polar Form. 20 Oct 2020 The number you wrote in not correct according to MATLAB syntax. Polar form of complex number: The real part of a complex exponential function can be used to represent an AC voltage or current. Start | {
"domain": "toromecanico.es",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357259231532,
"lm_q1q2_score": 0.8159628254882636,
"lm_q2_score": 0.8311430499496096,
"openwebmath_perplexity": 434.16522965605,
"openwebmath_score": 0.8907320499420166,
"tags": null,
"url": "https://toromecanico.es/lottery-winning-vc4t8/ozm---complex-number-to-polar-form---d0egx.html"
} |
c#, random
Title: Generating Biased Random Values (Walker's Alias Method) Am simply wondering if I made any egregious mistakes while implementing the Alias Method as an IEnumerator<TElement>; would also like to know if there are any sorts of general improvements that can be made to the design of the class.
Usage:
var seed = SecureRandom.Default.NextUInt32();
var rng = Pcg32XshRr.New(seed, 1U);
var generator = ProbabilisticEnumerator
.New(
elementWeights: new Dictionary<string, int> {
{ "A", 1 },
{ "B", 2 },
{ "C", 4 }
},
randomNumberGenerator: rng
);
var summary = generator
.Take(100000)
.GroupBy(item => item)
.Select(item => new {
Element = item.Key,
Count = item.Count(),
})
.OrderBy(item => item.Element);
foreach (var item in summary) {
Console.WriteLine($"{item.Element} | {item.Count}");
} | {
"domain": "codereview.stackexchange",
"id": 34251,
"lm_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#, random",
"url": null
} |
computational-geometry, computer-vision, image-processing, linear-algebra
The answer is no - it is impossible. Each point on the image1 may in general correspond to an entire line on the image2 (see https://en.wikipedia.org/wiki/Epipolar_geometry). The homography matrix is a projection matrix of one plane on another and, therefore, is useful when you have a plane object ( chessboard, book, painting etc.) pictured on both images. | {
"domain": "cs.stackexchange",
"id": 11018,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computational-geometry, computer-vision, image-processing, linear-algebra",
"url": null
} |
meteorology, atmosphere, jet-stream
Title: Centrifugal Force in the Navier Stokes Equations The Navier-Stokes equations are a set of nonlinear differential equations that diagnose wind speed and direction. They are (approximately) expressed as $$\frac{d\vec{u}}{dt}=-\frac{1}{\rho}\nabla P+f\hat{k}\times\vec{u}-g\hat{k}+\nu \nabla^2\vec{u}$$Where $\frac{d}{dt}=\frac{\partial}{\partial t}+u\frac{\partial}{\partial x}+v\frac{\partial}{\partial y}+w\frac{\partial}{\partial z}$, $f$ is the coriolis parameter, $\rho$ is density, $P$ is pressure, $g$ is gravity, $\nu$ is the kinematic viscosity, and $\vec{u}$ is the wind vector.
In synoptic meteorology, it is taught that in jet streaks, the curvature of the jet streak influences the acceleration by the centrifugal force. However, in the equation above, I see no centrifugal component. | {
"domain": "earthscience.stackexchange",
"id": 1735,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "meteorology, atmosphere, jet-stream",
"url": null
} |
value (default = 0). 1 The Real Case We will now prove Theorem 9. This course contains 47 short video lectures by Dr. Let’s translate diagoinalizability into the language of eigenvectors rather than matrices. Positive definite functions, and their generalisations conditionally positive. Symmetry is an omnipotent phenomenon in real world objects, whether natural or artificial. (5) For any matrix A, rank(A) = rank(AT). The wave-functions, which do not all share the symmetry of the Hamiltonian,. , the magnetic moments of atoms) or on the whole of space (e. The matrix associated with a quadratic form B need not be symmetric. All the eigenvalues of M are. Math 223 Symmetric and Hermitian Matrices. Say the eigenvectors are v 1; ;v n, where v i is the eigenvector with eigenvalue i. As before let V be a finite dimensional vector space over a field k. If v1 and v2 are eigenvectors of A. Complex numbers will come up occasionally, but only in very simple ways as tools for learning more about real | {
"domain": "ionoale.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9896718477853187,
"lm_q1q2_score": 0.8181733803731045,
"lm_q2_score": 0.8267117855317474,
"openwebmath_perplexity": 383.32462228033,
"openwebmath_score": 0.8360525369644165,
"tags": null,
"url": "http://xtij.ionoale.it/basis-of-symmetric-matrix.html"
} |
homework-and-exercises, newtonian-mechanics, energy, work, power
Title: Please help me find the error in my solution of the work done by gravity in a falling chain problem The problem is as follows:
A uniform chain of length $l$ and mass $m$ overhangs a smooth table with one third of the chain hanging off the table. Find the work done by gravity when it completely falls of the table.
The first way to solve this problem is pretty simple, by calculating the loss in potential energy. I wanted to try a different approach so I did this:
Where $F$ is force on chain
$$F= v(dm/dt)+m(dv/dt)$$
Now here $dv/dt=g$
And let $dm/dx=k$ (where $x$ is length of chain)
Therefore $F = kv^2 + kgx$
Now
$$v^2=u^2+2gx$$
$u=0$ (given)
Therefore $v^2=2gx$
Therefore $F=2kgx+kgx$
$F=3kgx$
Therefore work done is
$$\int F \,dx\int3kgx\,dx=3kgx^2/2$$
Now putting limits from $l/3$ to $l$
We get
$4kgl^2/3$
The denominator should be $9$ not $3$, and i don't see where I've gone wrong. Please help. You can't assume that $\dfrac {dv}{dt}=g$ in this case. | {
"domain": "physics.stackexchange",
"id": 83084,
"lm_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, energy, work, power",
"url": null
} |
Our solutions for $$x$$ are $$\frac13$$ and $$\frac12$$. Using $$y=\frac1{6x}$$, we get the coordinate pairs to be $$(\frac13,\frac12)$$ and $$(\frac12,\frac13)$$.
• In the quadratic equation, it's easier to compute if we just first multiply both sides with $6$ to get $6x^2 -5x +1=0$, and get only integers to compute with. The determinant becomes $(-5)^2 - 4\cdot 6 = 1$ so we get a nice result. – Henno Brandsma Nov 18 '18 at 6:27
• Thanks for the answer! – Jullian Santos Nov 18 '18 at 6:27
1) Substitute $$\;xy=\frac{1}{6}$$ into the 2nd equation to get $$\;x+y=\frac{5}{6}$$
2) Solving $$\;xy=\frac{1}{6}$$ and $$\;x+y=\frac{5}{6}\;$$ is equivalent to finding the zeros of the function $$f(z)=z^2+\frac{5}{6}z+\frac{1}{6}=0,\;$$ so using the quadratic formula, $$\;x=-\frac{1}{3}\;\text{and}\; y=-\frac{1}{2}\;$$ or $$\;y=-\frac{1}{3}\;\text{and}\;x=-\frac{1}{2}.$$
• Would you check your quadratic equation? The signs. – user376343 Dec 29 '18 at 10:00 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241982893259,
"lm_q1q2_score": 0.809854403830678,
"lm_q2_score": 0.8354835309589073,
"openwebmath_perplexity": 375.8154172051815,
"openwebmath_score": 0.9999594688415527,
"tags": null,
"url": "https://math.stackexchange.com/questions/3003186/how-do-you-solve-these-2-equations"
} |
homework-and-exercises, general-relativity, metric-tensor, calculus
Title: Inverse metric in Newtonian limit of GR I am reading Carroll's book. So looking at the Newtonian limit we write $g_{\mu\nu} = \eta_{\mu\nu} + h_{\mu\nu}$ where $h_{\mu\nu}$ is some small perturbation. He says that because $g^{\mu\nu}g_{\nu\sigma} = \delta^{\mu}_{\sigma}$ then, to first order in $h$, we have $g^{\mu\nu} = \eta^{\mu\nu} - h^{\mu\nu}$ where $h^{\mu\nu} = \eta^{\mu \rho} \eta^{\nu \sigma}h_{\rho \sigma}$. I don't see how this is the form of $g^{\mu \nu}$ to first order in $h$ though. Suppose $g$ does indeed have that form, then \begin{align*} g^{\mu \nu}g_{\nu \sigma} &= (\eta^{\mu \nu} - h^{\mu \nu})(\eta_{\nu \sigma} + h_{\nu \sigma}) \\ &= \eta^{\mu \nu} \eta_{\nu \sigma} + \eta^{\mu \nu} h_{\nu \sigma} - h^{\mu \nu} \eta_{\nu \sigma} - h^{\mu \nu}h_{\nu \sigma} \end{align*} | {
"domain": "physics.stackexchange",
"id": 31294,
"lm_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, general-relativity, metric-tensor, calculus",
"url": null
} |
P.S. You realize that the c in y = c(x - 2)(x + 2) is not the same as the c in y = ax2 + bx + c, do you?
19. Jan 31, 2012
### Eleeist
No. I actually realized that just now :). I thought you meant "c" as y-intercept. But now that you explained that it is rather "a", then I understand the logic.
Thanks for detailed explanation.
20. Jan 31, 2012
### LCKurtz
Good job of catching that eumyang. I hadn't caught that his difficulty was with the fact I had used "c" instead of "a" in my explanation. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018398044144,
"lm_q1q2_score": 0.8105322212543487,
"lm_q2_score": 0.8311430394931456,
"openwebmath_perplexity": 933.404385735308,
"openwebmath_score": 0.5667492151260376,
"tags": null,
"url": "https://www.physicsforums.com/threads/how-to-find-function-with-given-roots-and-point.572746/"
} |
quantum-mechanics, thermodynamics, statistical-mechanics, condensed-matter, solid-state-physics
Title: What is the relation between chemical potential and the number of particles? Chemical potential is defined as the change in energy due to change in the number of particles in a system. Let we have a system which is defined by the following Hamiltonian:
$$H = -t \sum_i^L c_i^\dagger c_{i+1} + V\sum_i^L n_i n_{i+1} -\mu \sum_i^L n_i$$
where $c^\dagger (c)$ are creation (annihilation) operators, $n$ is number operator, $t$ is hopping parameter, $V$ is nearest-neighbor interaction, $L$ is the total number of sites and $\mu$ is chemical potential.
What I understand by chemical potential is, if we set $μ=$some constant, then no matter how many sites ($L$) we add to the system, the number of particles will always be conserved. (Please correct me if I am wrong)
QUESTION: | {
"domain": "physics.stackexchange",
"id": 55533,
"lm_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, thermodynamics, statistical-mechanics, condensed-matter, solid-state-physics",
"url": null
} |
general-relativity, research-level, lagrangian-formalism, action, navier-stokes
There's no Lagrangian for the Navier-Stokes equations because they include viscosity, i.e. energy dissipation, and for such irreversible systems with friction-like terms, one can't write down a fundamental description based on the action. However, one may find a generalized description of this sort, "stochastic least-action description", which has some extra integration over random variables, see e.g. http://arxiv.org/abs/0810.0817 | {
"domain": "physics.stackexchange",
"id": 3283,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, research-level, lagrangian-formalism, action, navier-stokes",
"url": null
} |
To change a polar equation into cartesian coordinates ... remember the equations \begin{eqnarray*} r^2=x^2+y^2 \\ x=r \cos(\theta) \\ y=r \sin ( \theta) \end{eqnarray*} Now use the double angle formula for sin ($\sin(2 \theta) = 2 \sin(\theta) \cos( \theta)$) & multiply the equation by $r^2$. The polar equation becomes \begin{eqnarray*} (x^2+y^2)^{\frac{3}{2}}=4 x y \end{eqnarray*} Now use the Desmos online graphing calculator https://www.desmos.com/calculator/zxgizn9onc
Your equation is $r=2 \sin 2 \theta$ ... Multiplying by $r^2$ & using the double angle formula $\sin(2 \theta) = 2 \sin(\theta) \cos( \theta)$ ... We have \begin{eqnarray*} \color{green}{r^3}= 4 \color{red}{r\sin(\theta)} \color{blue}{r \cos( \theta)} \end{eqnarray*} Now recall that $\color{blue}{x=r \cos( \theta)}$ , $\color{red}{y=r\sin(\theta)}$ and $\color{green}{r=(x^2+y^2)^{\frac{1}{2}}}$ So \begin{eqnarray*} \color{green}{(x^2+y^2)^{\frac{3}{2}}}= 4 \color{blue}{x} \color{red}{y}. \end{eqnarray*} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9711290955604489,
"lm_q1q2_score": 0.8006589732633066,
"lm_q2_score": 0.8244619350028204,
"openwebmath_perplexity": 299.9940462305628,
"openwebmath_score": 0.9670236110687256,
"tags": null,
"url": "https://math.stackexchange.com/questions/2301104/determine-x-and-y-for-polar-graphs-with-the-angle-2-theta"
} |
ros-groovy, gazebo-1.9
and see if you can find the path to the gazebo_ros folder. As suggested by your link, if you are on groovy you need to install the gazebo_ros package from source, which is also described in the link you shared, try the steps in there again and let me know if that worked.
cheers
EDIT:
I just checked the installation guide for groovy and it seems to me that in the instructions it never actually switches to the groovy-devel branch but would only rename the ros_gazebo_pkgs folder to groovy-devel, so use the this command instead:
git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b groovy-devel
(@OSRF, you could maybe update this in the wiki, if I'm not telling any wrong stuff here ;), I am still on my roadtrip and wasn't following the latest developments)
Originally posted by ffurrer with karma: 349 on 2013-07-21
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 3382,
"lm_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-groovy, gazebo-1.9",
"url": null
} |
computer-architecture, memory-access
Another kind of memory access is an instruction fetch, which happens when the program counter gets a new value as part of running the instructions in the program. It usually just steps forward but a branch instruction can jump to a new location. Either way, no memory access is needed when the instructions are already cached.
In your example, the sequence of register/memory instructions have to load into the CPU before it can execute them. That requires instruction fetches.
(A Harvard architecture CPU has one bus to/from data memory and a second bus to/from instruction memory, so it can fetch from both in parallel. In that case the distinction between an instruction fetch and a data fetch is starker.)
The instructions themselves had to get into memory somehow. An interpreter or loader put them there, treating those instructions as data. | {
"domain": "cs.stackexchange",
"id": 6054,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-architecture, memory-access",
"url": null
} |
quantum-mechanics, angular-momentum, operators, eigenvalue
Title: If $L_z$ has a $0$ eigenfunction, since $[L_x, L_y] = i\hbar L_z,$, then can $L_x, L_y$ have a simultaneous eigenfunctions? In the lecture Quantum Mechanics by Dr. Adams in ocw.mit.edu, in the 16th lecture at 7:11, it is stated that since
$$[L_x, L_y] = i\hbar L_z,$$
there is no state s.t it is eigenfunction of both $L_x, L_y$. In fact, this is stated whenever the commutator of any two operators is nonzero. | {
"domain": "physics.stackexchange",
"id": 54449,
"lm_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, angular-momentum, operators, eigenvalue",
"url": null
} |
• Uhh, I didn't know that you need 15 rep to vote for answers on your own question. I gave you a thumbs up for your question, so at least you are over the 15 rep boundary now :) – halirutan Jul 31 at 0:14 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9441768588653856,
"lm_q1q2_score": 0.8043941186894495,
"lm_q2_score": 0.8519528000888387,
"openwebmath_perplexity": 4483.844940378154,
"openwebmath_score": 0.5430141687393188,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/203018/where-is-a-small-difference-between-result-of-normal-finite-integral-and-taking"
} |
thermodynamics, classical-mechanics, work, atoms
Heat is energy transfer due solely to temperature difference. Any energy transfer by heat to the wall would be due to the temperature of our hand being greater than the wall.
An increase in temperature due to friction is actually energy transfer by friction work, not by heat. If you rub your hands together on a cold day to keep warm, you are doing friction work. It is the friction work that increases the temperature of your hands skin. In any event, simply pushing on a wall does not involve kinetic friction unless you rub your hands against the wall.
In any event, simply pushing on a wall does ..... the wall." Had I
assumed that there is some frictional force between the hand and wall,
which leads to increase in temperature of wall compared to initial
condition, would it then be heat (transfer of thermal energy) or work
done by friction (increase in the mechanical energy of the atoms in
the wall in contact) or both? | {
"domain": "physics.stackexchange",
"id": 63925,
"lm_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, classical-mechanics, work, atoms",
"url": null
} |
java
Title: Performing batch insertion for a single row I've following code that insert single row in if (rows == 1) { part and inside loop it is batch insert.
So I'm thinking to skip single insert and have it in batch insert code.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int rows = jTable.getRowCount();
if (rows == 1) {
String itemName = (String) jTable.getValueAt(0, 0);
int itemQty = (int) jTable.getValueAt(0, 1);
Double itemPrice = (Double) jTable.getValueAt(0, 2);
Items items = new Items();
items.setName(itemName);
items.setPrice(itemPrice);
items.setQty(itemQty);
items.setTransactionNumber(manager.getTransNo());
manager.saveItems(items); | {
"domain": "codereview.stackexchange",
"id": 33354,
"lm_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
} |
neural-networks, python
Title: Neural network returns similar output I was following Daniel Shiffman's tutorials on how to write your own neural network from scratch. I specifically looked into his videos and the code he provided in here. I rewrote his code in Python, however, 3 out of 4 of my outputs are the same. The neural network has two input nodes, one hidden layer with two nodes and one output node. Can anyone help me to find my mistake? Here is my full code.
import random
nn = NeuralNetwork(2,2,1)
inputs = np.array([[0, 0], [1, 0], [0, 1], [1, 1]])
targets = np.array([[0], [1], [1], [0]])
zipped = zip(inputs, targets)
list_zipped = list(zipped)
for _ in range(9000):
x, y = random.choice(list_zipped)
nn.train(x, y)
output = [nn.feedforward(i) for i in inputs]
for i in output:
print("Output ", i)
#Output [ 0.1229546] when it should be around 0
#Output [ 0.6519492] ~1
#Output [ 0.65180228] ~1
#Output [ 0.66269853] ~0 | {
"domain": "ai.stackexchange",
"id": 502,
"lm_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-networks, python",
"url": null
} |
javascript, array
var array = [{
"name": "Truck",
"status": "Cancelled",
"id": 10
},
{
"name": "Bus",
"status": "Approved",
"id": 11
},
{
"name": "Car1",
"status": "Approved",
"id": 12
},
{
"name": "Car2",
"status": "Cancelled",
"id": 19
},
{
"name": "Car3",
"status": "Cancelled",
"id": 13
}
];
const cars = array.filter(item => item.name.startsWith('Car'));
for (const car of cars) {
car.isFirstLayer = false;
car.isLastLayer = false;
}
cars[0].isFirstLayer = true;
cars[cars.length - 1].isLastLayer = true;
console.log(array); | {
"domain": "codereview.stackexchange",
"id": 38304,
"lm_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, array",
"url": null
} |
quantum-field-theory, path-integral, correlation-functions
Title: I want to understand a trick in the derivation of the Schwinger-Dyson equations In the book of Ashok Das, Field theory-path integral approach, he begin the demonstration of the Schwinger-Dyson equation using the fact that the $\delta Z[J]=0$, so
\begin{equation}
\delta Z[J]=\int \mathcal{D} \phi \frac{\delta S[\phi,J]}{\delta \phi(x)} e^{iS[\phi,J]}=0,
\end{equation}
but we already know that
\begin{equation}
\frac{\delta S[\phi, J]}{\delta \phi(x)}=F(\phi(x))-J(x),
\end{equation}
where $F(\phi(x))$ is the equation of motion.
So if we go back to the first equation and use the identification
\begin{equation}
\phi(x)\rightarrow -i\frac{\delta}{\delta J(x)},
\end{equation}
we conclude that
$$
\int \mathcal{D}\phi\left(F(\phi(x))-J(x)\right)e^{iS[\phi,J]}=\left(F\left(-i\frac{\delta }{\delta J(x)}\right)-J(x)\right)\int \mathcal{D}\phi e^{iS[\phi,J]}
$$
$$ | {
"domain": "physics.stackexchange",
"id": 66511,
"lm_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, correlation-functions",
"url": null
} |
ros2
def generate_launch_description():
node1 = Node(package='demo_nodes_cpp',
executable='talker',
name='node1',
exec_name='node1')
node2 = Node(package='demo_nodes_cpp',
executable='listener',
name='node2',
exec_name='node2')
node3 = Node(package='demo_nodes_cpp',
executable='listener',
name='node3',
exec_name='node3')
node4 = Node(package='demo_nodes_cpp',
executable='listener',
name='node4',
exec_name='node4')
already_started_nodes = set()
def start_next_node(event: ProcessStarted, context: LaunchContext):
print(f'node {event.process_name} started.')
already_started_nodes.update([event.process_name])
if len(already_started_nodes) == 3:
print(f'all required nodes are up, time to start node1')
return node1 | {
"domain": "robotics.stackexchange",
"id": 38313,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2",
"url": null
} |
ros2
Original comments
Comment by christophebedard on 2023-02-14:
Can you share your launch file and the code that reads command line arguments?
Comment by christophebedard on 2023-02-14:
Also, can you clarify what exactly is complaining about the --ros-args? Is it your own code, or is ROS 2 itself complaining about it?
Comment by christophebedard on 2023-02-14:
In short, --ros-args is always added to the commandline arguments, but at the end after any arguments: https://github.com/ros2/launch_ros/blob/6daacbce4bade7ed40f86f16a30a08b4d7ee9272/launch_ros/launch_ros/actions/node.py#L209. If you write code to read these commandline arguments, you might need to filter it out.
Comment by Sam_Prt on 2023-02-20:
Oh ok, I thought it was more of an either/or logic. Thanks for your help ! Would you like to post an answer so I can accept it ?
Comment by christophebedard on 2023-02-20:
sure, done!
Comment by christophebedard on 2023-02-21: | {
"domain": "robotics.stackexchange",
"id": 38273,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2",
"url": null
} |
of triangles. Not Helpful 0 Helpful 2. 23 pages. January 6, 2020 Craig Barton Based on a Shape. If the question concerns lengths or angles in a triangle, you may need the sine rule or the cosine rule. In trigonometry, the law of cosines (also known as the cosine formula, cosine rule, or al-Kashi's theorem) relates the lengths of the sides of a triangle to the cosine of one of its angles.Using notation as in Fig. Calculate correctly and unknown side and angle in a triangle using the Sine Rule. pdf, 436 KB. Save. Calculating the necessary aircraft heading angle to compensate for the wind velocity and travel along a desired direction to a destination is a classic problem in aircraft navigation. Finish Editing. Mathematics. Tracing paper may be used. Sine, Cosine and Tangent (often shortened to sin, cos and tan) are each a ratio of sides of a right angled triangle:. A, side b faces angle a, side b faces angle c ) lesson on mixed and... Of an angle is involved at all one obtuse angle will | {
"domain": "logivan.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9579122696813394,
"lm_q1q2_score": 0.8179734997285646,
"lm_q2_score": 0.8539127492339909,
"openwebmath_perplexity": 831.5475465293068,
"openwebmath_score": 0.6519672870635986,
"tags": null,
"url": "https://logivan.com/nous-les-rkyjpm/93723d-sine-and-cosine-rule"
} |
nuclear-physics, quantum-chromodynamics, chirality, pions
First off, in the above statement, I don't know what $J^5_\mu(x)$ is supposed to mean. Does it mean the current associated with diagonal chiral rotations, $J^5_\mu(x)=\bar\psi (x)\gamma_\mu\gamma_5 \psi (x)$? I thought this current had nothing to do with the pions, only the $\eta$-meson? In the standard PCAC relation (6), this current does not appear at all.
The only sensible-looking way I can make sense of the negative-pion version of the PCAC in that footnote is if I take
$$J^5_\mu\overset{?}{=}J^5_{\mu,1}+iJ^5_{\mu,2}=\bar\psi (x)\left(\tau^1+i\tau^2 \right)\gamma_\mu\gamma_5 \psi (x) \tag{7}$$
So my second question is, what is $J^5_\mu (x)$ in the above-quoted footnote, and how does the new PCAC (involving the negative pion) relate to the original one? | {
"domain": "physics.stackexchange",
"id": 82818,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, quantum-chromodynamics, chirality, pions",
"url": null
} |
quantum-interpretations, error-analysis, wavefunction-collapse, thought-experiment, quantum-measurements
As an example of the latter, imagine a position detector which yields two possible outcomes - that the particle is in the interval $[-a,a]$, or that it is not (of course, this could be generalized to an entire ruler). We then construct the corresponding projection-valued measure via the indicator function
$$\chi(x) = \begin{cases}1 & x\in[-a,a]\\ 0 & \text{else}\end{cases}$$
$$\mathbb I = P_\mathrm{in}+P_\mathrm{out} = \int \chi(x) |x\rangle\langle x| \mathrm dx + \int (1-\chi(x))|x\rangle\langle x| \mathrm dx$$
Given a pre-measurement state $|\psi\rangle$, the post-measurement state corresponding to the particle being detected inside $[-a,a]$ is $P_\mathrm{in}|\psi\rangle = \int \chi(x) \psi(x) |x\rangle$, while the post-measurement state corresponding to the particle not being found is $P_\mathrm{out}|\psi\rangle=\int (1-\chi(x))\psi(x)|x\rangle$. The respective probabilities of obtaining these outcomes are | {
"domain": "physics.stackexchange",
"id": 76884,
"lm_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-interpretations, error-analysis, wavefunction-collapse, thought-experiment, quantum-measurements",
"url": null
} |
moveit, ros-melodic
Either you maintain your own scene entirely using a PlanningSceneMonitor and do not care about move_group at all, or you write MoveGroupCapabilitys and run your workload in move_group directly.
Mixing these approaches is always difficult
Comment by Rufus on 2020-05-20:
@v4hn Yeah I'm starting to feel my approach of maintaining a local PlanningSceneMonitor is fundamentally flawed. Where can I find more information regarding writing MoveGroupCapability so I can use the existing move_group stuff? Is it the MoveGroup C++ Interface you're talking about? | {
"domain": "robotics.stackexchange",
"id": 34978,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "moveit, ros-melodic",
"url": null
} |
javascript, snake-game, webgl
#gameover{
position:absolute;
z-index: 100;
font-size:60px;
font-family:Verdana;
margin: 0;
top: 50%;
left: 50%;
opacity:0;
transform: translate(-50%, -50%);
}
</style>
</div>
<div id="canvas"></div>
<p id="p"></p>
<p id="e"></p>
<script type="text/javascript" src="https://cdn.rawgit.com/alexgibson/shake.js/master/shake.js"></script>
<script src="https://threejs.org/build/three.min.js"></script>
<script>
//========================
// One times
//========================
window.random = Math.random
window.floor = function(a){ return ~~a}
window.newGeometry = THREE.Geometry
window.newBufferGeometry = THREE.BufferGeometry
window.newMesh = THREE.Mesh
window.newLineSegments = THREE.LineSegments
window.newMeshBasicMaterial = THREE.MeshBasicMaterial
window.newVector3 = THREE.Vector3
window.newLineBasicMaterial = THREE.LineBasicMaterial | {
"domain": "codereview.stackexchange",
"id": 30557,
"lm_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, snake-game, webgl",
"url": null
} |
• Well you can always talk about the geometric realization of an abstract simplicial complex, so in a sense any property you can define 'concretely' also applies to abstract simplicial complexes. At the beginning of math.mit.edu/~rstan/pubs/pubfiles/89.pdf Stanley talks about several notions of subdivision for simplicial complex (but none are quite as abstract/formal as what you can do with Barycentric subdivision). Apr 8, 2021 at 13:26
• Ok, thank you again for your answers, and for the reference ! Apr 8, 2021 at 14:06 | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357205793903,
"lm_q1q2_score": 0.8049185835722721,
"lm_q2_score": 0.8198933447152497,
"openwebmath_perplexity": 397.0169301073423,
"openwebmath_score": 0.6932774186134338,
"tags": null,
"url": "https://mathoverflow.net/questions/389646/what-is-a-subdivision-of-an-abstract-simplicial-complex"
} |
homework-and-exercises, newtonian-mechanics, newtonian-gravity, rocket-science
Title: A simple doubt on classical mechanics problem Question:
"At a certain instant of time, the mass of a rocket going up vertically is $100 kg$. If it is ejecting $5 kg$ of gas per second at a speed of $400 m/s$, the acceleration of the rocket would be? (assume $g=10m/s^2$)" | {
"domain": "physics.stackexchange",
"id": 75496,
"lm_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, newtonian-gravity, rocket-science",
"url": null
} |
algorithms, big-o-notation
Can $c$ be dependent on $n$? By definition it seems like the answer is no since $c$ is a constant.
The choice of $c = (n-1)n^{5}$ is dubious. Consider the term $(n-1)^{22}n^{5}$, the largest portion is $(n-1)^{23}$, not $n^{5}$. | {
"domain": "cs.stackexchange",
"id": 17669,
"lm_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, big-o-notation",
"url": null
} |
c#, sharepoint
Status = item["Status"].ToString()
})
.Distinct()
.Select(
r =>
new Customer
{
Persona = r.Persona,
CustomerName = r.CustomerName,
Email = r.Email,
Organization = r.Organization,
PhoneNumber = r.PhoneNumber,
Street = r.Street,
Suburb = r.Suburb,
Postcode = r.Postcode,
OrderDate = r.OrderDate.Date,
DispatchedDate = r.DispatchedDate,
Status = r.Status
})); | {
"domain": "codereview.stackexchange",
"id": 15379,
"lm_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#, sharepoint",
"url": null
} |
machine-learning, decision-trees
Title: What exactly is a Gini Index I am going through the tutorial at this site. Here, I can see the author is explaining the derivation of Gini Index. I want to understand the following terms
Group
Classes : As far as I have understood, it represents the possible values of labels in the data which we are supposed to classify. Please correct me if I am wrong. | {
"domain": "datascience.stackexchange",
"id": 4575,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, decision-trees",
"url": null
} |
slam, navigation, ros-melodic
Once you leave the planar-land of SLAM, you are now entering an active research field. Within ROS, its great that anyone can publish a package and have it available for the world, but that also creates varying quality and maintained implementations. This is especially true in edge research fields were every couple years someone's new approach deems their prior work no longer state of the art. None of the packages that I do know of visual or dense SLAM are going to be trivial for a hobbyist to configure or use (needing high quality and highly calibrated cameras / extrinsic). Many times, these are use-case specific and may not be as general as lidar slam. ORB-SLAM is the one I usually point people to, but there are also about 5 different popular implementations with their own special quirks on GitHub. | {
"domain": "robotics.stackexchange",
"id": 34468,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, ros-melodic",
"url": null
} |
electric-circuits, electric-current, electrical-resistance, batteries, short-circuits
c] The brightness of $A$ and $B$ decreases while $C$ goes off.
d] The brightness of $A$ and $B$ increases while $C$ goes off.
For my opinion the answer to this question is D because the switch (which has a resistance of $0\, \Omega$ has a node connected before the third bulb C) that "interrupts" the circuit. But, going into detail, according to Kirchhoff's first law the current should also go on the third bulb as in the first red node it divides into two currents $I_1$ and $I_2$. The current $I_1$ goes for example in the key $S$ and $I_2$ in the third bulb. The key and the third bulb have the same potential difference. I believe that the current $I_2$ passes through the third bulb but the current passing through it is so small that it does not turn on. | {
"domain": "physics.stackexchange",
"id": 56021,
"lm_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, electric-current, electrical-resistance, batteries, short-circuits",
"url": null
} |
\begin{align*} y_v = f(x_v) &= x_{v}^{2} + 12x_{v} \\ &= (-6)^{2} + 12(-6) \\ &= 36 -72 \\ &= -36 \end{align*}
So, the minimum is at
$$(-6, -36)$$
-
Usually, when we have to find the minimum of a quadratic expression, we try to complete the square.
We have $y=x^2 + 12x$ . We want to find the minimum possible value of y.
$$y=x^2 + 12x \\= x^2 +2(6)(x) + 6^2 - 6^2 \\=(x+6)^2 - 36$$
The lowest possible value of the term in square i.e. $(x+6)^2$ is $0$ when $x = -6$.
So the lowest possible value of $y = x^2 + 12x$ is $-36$.
Here is a graph.
Another way to do it is by using the vertex formula, which @okarin has done.
-
HINT :
Notice that $$y=x^2+12x=(x+6)^2-36$$ represents a parabola.
This parabola has the minimum value at its vertex $(-6,-36)$.
Hence, the answer is $-36$.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305360354471,
"lm_q1q2_score": 0.826228435065978,
"lm_q2_score": 0.8577681086260461,
"openwebmath_perplexity": 247.84567487309678,
"openwebmath_score": 0.9930889010429382,
"tags": null,
"url": "http://math.stackexchange.com/questions/624595/what-is-the-minimum-value-of-x%C2%B212x/624610"
} |
Thanks
-
Doubt it. I would go with $\mathcal{P}_{\text{fin}}(\mathbb{N})$ or, depending on what exactly you're doing, just $S$. – Qiaochu Yuan Aug 4 '11 at 14:52
(some) people think of $2^{<\omega}$ (finite length binary strings) as the set of all finite subsets of $\omega.$ – jspecter Aug 4 '11 at 14:54
I think $2^{<\omega}$ is pretty ambiguous (what does a terminal $0$ mean?). The notation I see most often is some version of $[\omega]^{<\omega}$, with one or both occurrences of $\omega$ replaced by $\mathbb{N}$ or $\aleph_0$, depending on personal preference. Alternatively, I have also seen FIN, which has a nice blunt simplicity about it. – user83827 Aug 4 '11 at 15:07
@user10: It looks like some more comprehensive answers have popped up in the meantime, so I'll just keep my comment as a comment unless you feel strongly otherwise. – user83827 Aug 4 '11 at 15:40
Several possible notations for $\{A\subseteq\omega\mid |A|<\omega\}$: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995733060718,
"lm_q1q2_score": 0.8491674906693192,
"lm_q2_score": 0.8791467706759584,
"openwebmath_perplexity": 484.4202491961179,
"openwebmath_score": 0.9860823154449463,
"tags": null,
"url": "http://math.stackexchange.com/questions/55591/notation-for-the-set-of-all-finite-subsets-of-mathbbn"
} |
Note that in general, (not (A and B)) is logically equivalent to ((not A) or (not B)).
-
Or does "Zach blocks emails and texts from Jennifer" mean "Zach blocks emails and Zach blocks texts from Jennifer"? Don't you love the ambiguities of natural language? (Of course, the translation you give is almost certainly the intended meaning.) – Code-Guru Dec 11 '12 at 4:11
• $P(x, y)$: x blocks emails from y
• $Q(x, y)$: x blocks texts from y
• $z$: Zach
• $j$: Jennifer
$P(z, j)$: Zach blocks emails from Jennifer;
$Q(z, j)$: Zach blocks texts from Jennifer.
You essentially negated: $P(z, j) \land Q(z, j)$.
So did the text.
The text applied "distribution of negation over conjunction" (one of DeMorgan's Laws): | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9637799462157138,
"lm_q1q2_score": 0.8595095965569697,
"lm_q2_score": 0.8918110404058913,
"openwebmath_perplexity": 1948.8392717562258,
"openwebmath_score": 0.7580549120903015,
"tags": null,
"url": "http://math.stackexchange.com/questions/255934/negating-zach-blocks-e-mails-and-texts-from-jennifer/255940"
} |
urdf, arm-navigation, mesh
Originally posted by shart115 on ROS Answers with karma: 86 on 2011-12-13
Post score: 4
Yeah, I encountered the same problem.
Relevant Bug Report
Originally posted by David Lu with karma: 10932 on 2011-12-13
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 7621,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "urdf, arm-navigation, mesh",
"url": null
} |
c#, task-parallel-library, windows-phone
});
} Minor
You should get rid of the Class suffix. There is no value in attaching the type as a suffix to the name.
You don't need to write this everywhere to access members.
You have an Elapsed property which is not used.
Bugs/Major | {
"domain": "codereview.stackexchange",
"id": 5912,
"lm_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#, task-parallel-library, windows-phone",
"url": null
} |
homework-and-exercises, classical-mechanics, hamiltonian-formalism, phase-space
you need to integrate between $q_1$ and $q_2$ such that
$$
V_0\tan^2\frac{\pi q_1}{2a}=V_0\tan^2\frac{\pi q_2}{2a}=E\, .
$$
The substitution needed to complete the integral is of the type
$$
q=\arctan\left(\frac{\nu}{\sqrt{A(1+\nu^2)}}\right)\, .
$$ | {
"domain": "physics.stackexchange",
"id": 39490,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, classical-mechanics, hamiltonian-formalism, phase-space",
"url": null
} |
dataset, data, data-science-model
Title: How to calculate an average cliff date? Please let me know if this question belongs elsewhere.
In my simple data set focused on sales pursuit opportunities, I have the following columns available.
Pursuit Name
Status(Open, Won, Lost)
Date Entered
Date Closed | {
"domain": "datascience.stackexchange",
"id": 9184,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dataset, data, data-science-model",
"url": null
} |
cpu, cpu-pipelines
Title: How to make single cycle processor pipelined? I was asked that how can one make a single cycle processor pipelined on a CS course without any specifications regarding the design.
I suppose, that I should answer that what should be changed on architecture level.
I am familiar with the meaning of pipelining.
I came up with the following basic idea: registers should be added to hold the intermediate values between pipelining input and output, which should be controlled by a common clock (including i/o).
Is my idea a plausible answer to the question?
At my level, I do not think that I am supposed to give a working example for it, but I am happy so any.
This is an example of a pipelined architecture. You mainly put register files (which introduce some delays) to save data from one stage to another. Think of it like assembling a car, the chasis is done in one stage then it waits (in our case storage is the Register File (RF) then it goes for the other stage... | {
"domain": "cs.stackexchange",
"id": 15147,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cpu, cpu-pipelines",
"url": null
} |
bash, shell
} I would like to remove the duplicated command.
last_file () {
(
set -e
[[ -n "$1" ]] && cd "$1"
printf '%s/%s\n' "$(pwd -P)" "$(ls -rt | tail -n 1)"
)
}
The whole body is run in a subshell.
set -e makes the subshell abort if the given argument is not a directory. You did something similar with cd "$1" && echo ...
printf is better than echo | {
"domain": "codereview.stackexchange",
"id": 44197,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bash, shell",
"url": null
} |
c++, c++20, sfml
}
}
ImGui::SFML::Shutdown();
return 0;
}
IEntity.h:
#pragma once
#include <SFML/Graphics.hpp>
class IEntity : public sf::Drawable, public sf::Transformable
{
public:
virtual void update(sf::Time dt)=0;
virtual void eventProcess(sf::Event event,sf::Time dt)=0;
virtual ~IEntity(){}
};
IEntityWithGui:
#pragma once
#include "IEntity.h"
class IEntityWithGui : public IEntity
{
public:
virtual void processGui()=0;
virtual ~IEntityWithGui() {}
};
shapeObj.hpp:
#pragma once
#include "IEntityWithGui.h"
class ShapeObj : public IEntityWithGui
{
public:
ShapeObj(sf::RenderWindow &window); | {
"domain": "codereview.stackexchange",
"id": 45229,
"lm_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, sfml",
"url": null
} |
bacteriology, infection, epidemiology
Title: Age-Dependent STD Infection It seems that young females (comparing age 15 vs age 24) are 20x more likely to get chlamydia
from a single unprotected sexual encounter with an infected male. What are the reasons for
this? Are there other diseases with such extreme age-dependence?
Reference:
Estimating age-dependent per-encounter chlamydia trachomatis acquisition
risk via a Markov-based state-transition model. The "Description of the analyzed data set" section seems suspicious to me: | {
"domain": "biology.stackexchange",
"id": 5714,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bacteriology, infection, epidemiology",
"url": null
} |
java, tree, binary-search
public TreeNode(T item, List<TreeNode<T>> childNodes) {
this.item = item;
this.childNodes = childNodes;
}
}
Answer to the second question, Since you know the specific nary there isn't a need to use an array list. In practice however for small nary values less than 10 there is no great drawback or performance penalty for using an ArrayList, there is tho greater memory usage.
/**
* Constructs an empty list with the specified initial capacity.
*
* @param initialCapacity the initial capacity of the list
* @throws IllegalArgumentException if the specified initial capacity
* is negative
*/
public ArrayList(int initialCapacity) {
super();
if (initialCapacity < 0)
throw new IllegalArgumentException("Illegal Capacity: "+
initialCapacity);
this.elementData = new Object[initialCapacity];
}
/**
* Constructs an empty list with an initial capacity of ten.
*/
public ArrayList() {
this(10);
} | {
"domain": "codereview.stackexchange",
"id": 5776,
"lm_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, tree, binary-search",
"url": null
} |
matlab, convolution, impulse-response
$ 0=\ln{(\frac{\alpha x_{_{RMS}}}{f_{_{RMS}}})} \Rightarrow \frac{\alpha x_{_{RMS}}} {f_{_{RMS}}}=1 \Rightarrow \frac{f_{_{RMS}}}{ x_{_{RMS}}} =\alpha$
where $\alpha$ is your normalization constant, and as you can see it would depend on the function involved. However, it is important to notice that for the same time interval, $x_{_{RMS}}$ may change if the sampling rate changes, so the normalization value (if it exists, since f might not be integrable in the chosen interval) may depend on the sample rate, tending to be closer to 1 as the sample rate increases. The normalization constant for most functions will in fact depend on the chosen interval, so thinking in terms of a normalization constant is just an approximation. In particular calculating the gain of a filter is not a simple problem, and in many cases the gain depends on the frequency, so you choose a particular frequency to estimate the gain of the filter. | {
"domain": "dsp.stackexchange",
"id": 1903,
"lm_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, convolution, impulse-response",
"url": null
} |
quantum-mechanics, mathematical-physics, harmonic-oscillator, hilbert-space, representation-theory
(Since we have cut any reference to geometry, there is no longer any reason why $\nu$ should be a half, so we have generalized it to an arbitrary real number $\nu\in\mathbb{R}$.)
II) Next assume that the physical states live in an inner product space $(V,\langle \cdot,\cdot \rangle )$, and that $V$ form a non-trivial irreducible unitary representation of the Heisenberg algebra,
$$ {\cal A}~:=~ \text{associative algebra generated by $\hat{a}$, $\hat{a}^{\dagger}$, and ${\bf 1}$}.\tag{4}$$
The spectrum of a semi-positive operator $\hat{N}=\hat{a}^{\dagger}\hat{a}$ is always non-negative,
$$ {\rm Spec}(\hat{N})~\subseteq~ [0,\infty[.\tag{5}$$ | {
"domain": "physics.stackexchange",
"id": 2681,
"lm_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, mathematical-physics, harmonic-oscillator, hilbert-space, representation-theory",
"url": null
} |
For example for $k=4$, the digit sums $0$, $1$ and $2$ appear in $1$, $4$ and $10$ numbers, respectively.
How to get from the $k$ array to the $k+1$ array? Well, that means using one more digit. How many numbers have a certain digit sum $i$ now? If the added digit is $3$, then the earlier $k$ digits must sum to $i-3$. So look up in the $k$ array how many $k$-digit numbers have digit sum $i-3$. Same for the other $9$ digit options. And then just add up those ten possibilities. So if we call the array $f$, you get $f_{k+1}[i] = \sum_{d=0}^9 f_k[i-d]$ (Where out-of-bounds indexes hold value $0$).
A Ruby implementation/demo:
k = 4
p k.times.reduce([1]) { |f| ([0] * 9 + f + [0] * 9).each_cons(10).map(&:sum) }
Output:
[1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 282, 348, 415, 480, 540, 592, 633, 660, 670, 660, 633, 592, 540, 480, 415, 348, 282, 220, 165, 120, 84, 56, 35, 20, 10, 4, 1] | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211612253742,
"lm_q1q2_score": 0.810215835134914,
"lm_q2_score": 0.8311430520409023,
"openwebmath_perplexity": 474.88231810878784,
"openwebmath_score": 0.6242581605911255,
"tags": null,
"url": "https://math.stackexchange.com/questions/2387879/weak-composition-with-restrictions0-9/2391431"
} |
ros, ros-melodic, static-transform-publisher, turtlebot3
<remap from="move_base/local_costmap/costmap_updates" to="$(arg namespace)/move_base/local_costmap/costmap_updates" />
<remap from="move_base/local_costmap/footprint" to="$(arg namespace)/move_base/local_costmap/footprint" />
<remap from="move_base/local_costmap/inflation_layer/parameter_descriptions" to="$(arg namespace)/move_base/local_costmap/inflation_layer/parameter_descriptions" />
<remap from="move_base/local_costmap/inflation_layer/parameter_updates" to="$(arg namespace)/move_base/local_costmap/inflation_layer/parameter_updates" />
<remap from="move_base/local_costmap/obstacle_layer/parameter_descriptions" to="$(arg namespace)/move_base/local_costmap/obstacle_layer/parameter_descriptions" />
<remap from="move_base/local_costmap/obstacle_layer/parameter_updates" to="$(arg namespace)/move_base/local_costmap/obstacle_layer/parameter_updates" /> | {
"domain": "robotics.stackexchange",
"id": 37123,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-melodic, static-transform-publisher, turtlebot3",
"url": null
} |
c#, unit-testing, nunit
var result = _sut.Execute();
Assert.AreEqual(expectedResult, result);
}
[Test]
public void NewMethod_ReturnsTrue()
{
var result = _sut.NewMethodProxy();
Assert.That(result, Is.True);
}
public class MyServiceProxy : MyService
{
public virtual bool NewMethodProxy()
{
return base._newMethod();
}
public bool? NewMethodStub { get; set; }
public bool? LegacyMethodStub { get; set; }
protected override bool _newMethod()
{
if (NewMethodStub.HasValue)
{
return NewMethodStub.Value;
}
return base._newMethod();
}
protected override bool _legacyMethod()
{
if (LegacyMethodStub.HasValue)
{
return LegacyMethodStub.Value;
}
return base._legacyMethod();
}
}
} | {
"domain": "codereview.stackexchange",
"id": 23783,
"lm_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, nunit",
"url": null
} |
computer-architecture, operating-systems, history, c
a DAG, not a ladder, and maybe it need not even be strictly acyclic
always, but whatever. Let’s pretend no branching for now.) Each rung
in the ladder communicates with the rung below it through an API, that
is, a little language which the lower rung created so you can tell it
what you want it to do. You could even say that the rung is just
some useful combinations of the API beneath it, packaged into an API
for some higher rungs to use.
Breaking things up into layers/stages/rungs is beneficial for
understanding and reuse. First and fairly obviously, if you can factor
out the function of one rung, you can reuse that rung, and it becomes
worth it to devote significant effort to optimizing that rung. But
second and maybe less obvious, if your program is in layers which
communicate through limited-size APIs, it helps reduce combinatorial
explosion in the space of how programs can operate. Another way to say
this is with layers, there are fewer ways that things can go wrong at | {
"domain": "cs.stackexchange",
"id": 20546,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-architecture, operating-systems, history, c",
"url": null
} |
c++, object-oriented, linked-list, overloading
private:
void swap(LinkedList &other);
};
#endif
Implementation:
#include <iostream>
#include "linked_list.h"
LinkedList::LinkedList(): head(nullptr), tail(nullptr)
{
}
LinkedList::LinkedList(const LinkedList &list): LinkedList() // call base constructor
{
Node *curr = list.head;
while(curr != nullptr)
{
this->Append(curr->data);
curr = curr->next;
}
}
LinkedList::~LinkedList()
{
Node *curr = head;
while (curr != nullptr)
{
Node *next = curr->next;
delete curr;
curr = next;
}
head = tail = nullptr;
}
void LinkedList::swap(LinkedList &other)
{
using std::swap;
swap(this->head, other.head);
swap(this->tail, other.tail);
} | {
"domain": "codereview.stackexchange",
"id": 19556,
"lm_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, linked-list, overloading",
"url": null
} |
For a quadratic function, these second differences will all be the same. Your values actually are all the same, so your function can be expressed as a quadratic.
• how to convince myself that this method works? Any proof would be helpful. :) Oct 25, 2019 at 7:22
• In general, if $p(n) = a_k n^k + \ldots + a_1 n + a_0$, then $p(n+1) - p(n)$ will be a degree $k-1$ polynomial. Example; $p(n) = 2n^2 -3n + 1$; then $p(n+1) - p(n) = 2(n+1)^2 - 3(n+1) + 1 - (2n^2 -3n + 1)$,$= 2n^2 +4n + 2 -3n -3 + 2 - 2n^2 +3n - 1 = 4n$: the quadratic terms cancel. So if your data is fit by a degree-$k$ polynomial, the "first differences" will be fit with a degree $k-1$ polynomial, and so on. If some row of differences is all zeros, then the next row up is fit by a constant polynomial, the one after by a linear polynomial, and so on. Oct 25, 2019 at 18:13 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668668053619,
"lm_q1q2_score": 0.8133272954072736,
"lm_q2_score": 0.8289388104343892,
"openwebmath_perplexity": 199.04619796495666,
"openwebmath_score": 0.6802294254302979,
"tags": null,
"url": "https://math.stackexchange.com/questions/675110/what-is-the-minimum-degree-of-a-polynomial-given-the-initial-conditions"
} |
star, temperature, surface
Example of the sun:
mp=average mass of a particle=1,7E-027
M=total mass of the body=2E30
r=radius of the body=700000000
I'm using this equation to estimate the core temperature :
(G*mp*M)/(r*(3/2)*k)
which nets 15653011 for the sun which is close enough given that that is the only star core temperature known (afaik).
I'm using this to estimate the luminosity L:
4*PI*(r^2)*s*(Te^4)
which results in an error of ~1-5% with 90% of my sample stars which is close enough. For the sun this results in 3,95120075975041E+026 W which is only 2,7% off.
The problem is I need Te for the 2nd formula which I don't have in my scenario.
Due to the formula for L being dependent on the surface temperature to the power of 4 this value has to be relatively precise.
Assumptions of my model:
uniform distribution of particles: so every slice of the body has the same composition as the entire body.
perfect sphere: every body is a perfect sphere, no handling for elliptic bodies needed. | {
"domain": "astronomy.stackexchange",
"id": 1294,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "star, temperature, surface",
"url": null
} |
"""
class Solution:
def change(self, amount, coins):
dp = [[-1 for _ in range(amount+1)] for _ in range(len(coins)+1)]
# Fill in defaults
# if amount is zero you can always make that change with zero/no coins
for i in range(len(coins)+1):
dp[i][0] = 1
# if there are no coins there is no way to make change for amounts greater than zero
for i in range(1, amount+1):
dp[0][i] = 0
for coin in range(1, len(coins)+1):
for amount in range(1, amount+1):
actual_coin = coins[coin-1]
total = 0
# not use coin => remove the coin (move up by one)
total += dp[coin-1][amount]
# use coin => reduce the amount by the coin's value (move left by the coin's value)
if actual_coin <= amount:
total += dp[coin][amount-actual_coin]
# print(coin,actual_coin,amount,total)
dp[coin][amount] = total
return dp[-1][-1]
# only keep needed fields in memory
class Solution: | {
"domain": "paulonteri.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9559813501370535,
"lm_q1q2_score": 0.8218225111577803,
"lm_q2_score": 0.8596637487122111,
"openwebmath_perplexity": 6090.381773024074,
"openwebmath_score": 0.30743175745010376,
"tags": null,
"url": "https://dsa.paulonteri.com/Data%20Structures%20and%20Algorithms%2016913c6fbd244de481b6b1705cbfa6be/Recursion%2C%20DP%20%26%20Backtracking%20525dddcdd0874ed98372518724fc8753.html"
} |
python, python-3.x, game, dice
if abc == "e":
check = True
while check:
print("player 1 enter your details")
username1=input("Username = ")
password=input("Password = ")
with open("username + password.txt","r") as username_finder:
for line in username_finder:
if(username1 + ":" + password) == line.strip():
print("you are logged in")
print("player 2 enter your details")
while check:
print("incoreect password or username please try again")
username2=input("Username = ")
password=input("Password = ")
with open("username + password.txt","r") as username_finder:
for line in username_finder:
if(username2 + ":" + password) == line.strip():
check = False | {
"domain": "codereview.stackexchange",
"id": 33121,
"lm_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, game, dice",
"url": null
} |
ds.algorithms, graph-algorithms
By visiting each vertex's neighbors, each edge in $H$ is traversed. Each neighbor visitation step adds $O(n)$ steps to the path. Each travel to a successive vertex adds another $O(n)$ steps. So, in total length of $P = (u_{a_1}, u_{a_2}, \ldots, u_{a_p})$ is $O(n^2)$.
Let $SEQ = (x_0, x_{a_1}, x_{a_2}, x_{a_3},\ldots,x_{a_p}, x_{n+1})$ be the sequence of variables.
Let $G = (V, A)$ be the complete, directed graph on three vertices adjoined with a universal source and a universal sink. Explicitly, let $V = \{v_1, v_2, v_3, v_{source}, v_{sink}\}$. There is an arc from $v_{source}$ to $v_i$ and from $v_i$ to $v_{sink}$ for $i=1,2,3$. And, for all $i,j = 1,2,3, i \neq j$ there is an arc from $v_i$ to $v_j$.
Finally, we claim that a valid relaxed node assignment from $SEQ$ to $G$ exists iff $H$ is 3-colorable. Let $c:U \rightarrow \{1,2,3\}$ be a 3-coloring of $H$. Let $f:X \rightarrow V$ be defined by:
$f(x_0) = v_{source}$
$f(x_{n+1}) = v_{sink}$
$f(x_i) = v_{c(u_i)}$ | {
"domain": "cstheory.stackexchange",
"id": 659,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ds.algorithms, graph-algorithms",
"url": null
} |
c++, algorithm, depth-first-search
The Maze class knows how to parse arguments and create a maze. The path finding class knows how to do a depth first search (although it doesn't tell the caller that's what it is doing--we could switch to another search type with no one the wiser). Both know how to display themselves.
Now main isn't cluttered with all sorts of implementation details that callers shouldn't need to know. E.g. that heights and widths need to be odd numbers. Or that you need to parse, normalize, initialize the maze, and then choose endpoints--in that order. Why should a caller need to know that the random selection can choose the end to be the same place as the start?
And of course we got rid of the global variables. A side effect of this is that we could create and search more than one maze now. The original program only allowed for one. | {
"domain": "codereview.stackexchange",
"id": 21077,
"lm_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, depth-first-search",
"url": null
} |
java, interview-questions, json, csv
public void addDivision(Integer id, Division division) {
Objects.requireNonNull(id); Objects.requireNonNull(division);
divisions.put(id, division);
}
public Map<Integer, Division> getDivisions() {
return Collections.unmodifiableMap(divisions);
}
/**
* Class representing division in survey data
*/
public final static class Division {
private Map<Integer, Team> teams;
private transient final Integer id;
private final Employee.SortOrder sortOrderOfDataOrEmployees; | {
"domain": "codereview.stackexchange",
"id": 32296,
"lm_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, interview-questions, json, csv",
"url": null
} |
02 Feb 2014, 08:17
1
Bunuel wrote:
sachinrelan wrote: | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.941654159388319,
"lm_q1q2_score": 0.8130162924378116,
"lm_q2_score": 0.8633916011860786,
"openwebmath_perplexity": 5603.288978855842,
"openwebmath_score": 0.580459475517273,
"tags": null,
"url": "https://gmatclub.com/forum/louie-takes-out-a-three-month-loan-of-1000-the-lender-101506-20.html"
} |
javascript, library, genetic-algorithm
return return_population;
}),
//Evaluates the current fittest
evaluate_population: (function(input, population, generations, mutation_rate, expansion_multiplier, maximum_population, average_fitness_score, time_began) { | {
"domain": "codereview.stackexchange",
"id": 30658,
"lm_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, library, genetic-algorithm",
"url": null
} |
ros, rviz, library, qt
//设置定时器的回调函数。按周期调用sendvle
connect(output_timer, SIGNAL(timerout()), this, SLOT(sendVel()));
output_timer->start(100);
}
//更新线速度
void TeleopPanel::update_Linear_velocity() {
//获取输入框内的数据
QString temp_string = output_topic_editor_1->text();
//将字符串转换为浮点数
float lin = temp_string.toFloat();
//保存当前输入值
linear_velocity_ = lin;
}
void TeleopPanel::update_Angular_velocity {
QString temp_string = output_topic_editor_2->text();
float ang = temp_string.toFloat();
angular_velocity_ = ang;
}
//更新topic命名
void TeleopPanel::setTopic(const QString &new_topic) {
//检查topic是否改变
if (new_topic != output_topic_) {
output_topic_ = new_topic;
//如果命名空,不发布任何信息
if (output_topic_ == "") {
velocity_publisher_.shutdown();
}
//否则初始化publisher
else {
velocity_publisher_ =
nh.advertise<geometry_msgs::Twist>(output_topic_.toStdstring(), 1);
}
Q_EMIT configChanged();
}
} | {
"domain": "robotics.stackexchange",
"id": 29401,
"lm_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, library, qt",
"url": null
} |
to the... You work out the derivatives of many functions ( with examples below ) follow the... ( 4x + 2 ) and that is the derivative of your original function vector derivative rules single variable calculus with., this will follow from the usual product rule in single variable calculus DX/DT and! ) and that is the derivative of Y, DY/DT bold lowercase are vectors rule... Are vectors attempt the proofs one of the most common examples of a function at point. The following theorem, but the reader is encouraged to attempt the proofs xp of and. Bb -- - -B+A -- a function at any point ) and that is the derivative of x, you! Apply for vector derivatives interpretation that must go along with it are vectors will in... Angular acceleration, which is the derivative of Y, DY/DT the most common examples of function! Xp of a and B arefunctions of the most common examples of a vector x derivatives all the! The elements xp of a function at any point an expression before erentiating. Common examples | {
"domain": "krizak.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.984336352207334,
"lm_q1q2_score": 0.8701920018018818,
"lm_q2_score": 0.8840392817460332,
"openwebmath_perplexity": 579.1642646842395,
"openwebmath_score": 0.8595079779624939,
"tags": null,
"url": "http://krizak.com/7ep86ie/g58j054.php?cd1127=vector-derivative-rules"
} |
special-relativity, acceleration
Title: 2 different formulas for proper acceleration derived from the same equation I was looking at this answer which eventually stated this about the proper acceleration (when $\vec v$ is parallel to $\vec a$):
$$
\vec \alpha =\gamma^3 \vec a = \gamma^3 \dfrac{d\vec v}{dt}=\dfrac{du}{dt}=\dfrac{d}{dt}\dfrac{d\vec x}{d \tau}
$$
Now, I'm programming a relativistic integrator and to do this I used the first and last part of this equation and switched the derivatives around:
$$
\vec \alpha= \dfrac{d}{d\tau} \dfrac{d\vec x}{dt} = \dfrac{d\vec v}{d\tau}
$$
Now this seems to work as I can recreate the hyperbolic curve obtained from Rindler coordinates if I choose $\alpha$ to be constant. (I have numerically compared this and it works). So to clarfiy I would do this integration step: $dv = \alpha d\tau$, where $dv$ is the change of velocity in the coordinate frame.
Now this all seems fine until we look back at the first equation and use $dt = \gamma d\tau$:
$$ | {
"domain": "physics.stackexchange",
"id": 99006,
"lm_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, acceleration",
"url": null
} |
equation (PDE) on a rectangular grid. LAPLACE’S EQUATION AND POISSON’S EQUATION In this section, we state and prove the mean value property of harmonic functions, and use it to prove the maximum principle, leading to a uniqueness result for boundary value problems for Poisson’s equation. Solving the 2D Poisson equation$\Delta u = x^2+y^2$Ask Question Asked 2 years, 11 months ago. (1) Here, is an open subset of Rd for d= 1, 2 or 3, the coe cients a, band ctogether with the source term fare given functions on. Both codes, nextnano³ and Greg Snider's "1D Poisson" lead to the same results. In the previous chapter we saw that when solving a wave or heat equation it may be necessary to first compute the solution to the steady state equation. We will consider a number of cases where fixed conditions are imposed upon. These equations can be inverted, using the algorithm discussed in Sect. Lecture 04 Part 3: Matrix Form of 2D Poisson's Equation, 2016 Numerical Methods for PDE - Duration: 14:57. | {
"domain": "marcodoriaxgenova.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9923043544146898,
"lm_q1q2_score": 0.8673506481763438,
"lm_q2_score": 0.8740772368049822,
"openwebmath_perplexity": 682.703101573481,
"openwebmath_score": 0.7900996208190918,
"tags": null,
"url": "http://marcodoriaxgenova.it/jytu/2d-poisson-equation.html"
} |
special-relativity, spacetime, causality
Finally, since 45º is the line for light, does this mean that you can not have any object with a world line of lower angle, since this would imply that its speed is faster than that of light? The world lines exists independent of the frame you choose. That is, Minkowski space-time is an affine space (like the euclidean space $\mathbb E^n$, not to be confused with $\mathbb R^n$) where there are no frames. Here you can "draw" world lines, and doesn't matter that there is none inertial frames yet. Then, when you select the frame you are actually selecting an inertial frame and some "special" point in the Minkowski space-time to be chosen as the origin (nothing special with this selection).
As Einstein state, simultaneity is a relative concept... so, as long as you stay in this frame, time can be "absolute" for you. So, when you choose a frame, you are choosing a way time flows and a way to measure distances in the Minkowski space-time. | {
"domain": "physics.stackexchange",
"id": 26015,
"lm_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, spacetime, causality",
"url": null
} |
r, python, phylogenetics, phylogeny
Title: Plot phylogenetic tree from list of edges I have a dataset that I wish to convert to tree or phylo format like in the ape package, in order to plot the phylogenetic tree. It is formatted like a list of edges and species names for the leaves. The dataset is quite large, but I have made an example dataset that represents it:
df <- data.frame(c(8,8,7,6,6,7,9,9,9),
c(1,2,3,4,5,6,7,8,9),
c(9, 9, 12, 14, 17, 19, 21, 23, 9),
c("a","b","c","d","e", "node1", "node2", "node3", "node4"))
names(df) <- c("parent","node","branch.length", "label") | {
"domain": "bioinformatics.stackexchange",
"id": 2433,
"lm_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, python, phylogenetics, phylogeny",
"url": null
} |
Furthermore, $$F(1_{Z/G}) = F(1 \cdot Z) = \tau_1 = id_G$$ and $$F(gZ)F(hZ) = \tau_g\tau_h = \tau_{gh} = F(ghZ) = F(gZhZ)$$
thus proving that $$F$$ is not only a bijection but an isomorphism.
Intutively, what is happening is that conjugation by some $$g \in G$$ is 'not affected by the component of $$g$$ in $$Z$$'. By that I mean that if $$g = sz$$ with $$z \in Z$$, $$\tau_{sz} = \tau_s$$. So we can group elements which only differ in a traslation via an element of the center, since their conjugation will be the same: that is exactly what $$G/Z(G)$$ is. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561685659696,
"lm_q1q2_score": 0.8031224696172571,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 106.019512011222,
"openwebmath_score": 0.9408128261566162,
"tags": null,
"url": "https://math.stackexchange.com/questions/2962740/detail-in-bijection-between-inng-and-g-zg?noredirect=1"
} |
### 1.2. Theorem
• Consider $\displaystyle \sum_{n=0}^{\infty} a_n$. And $a_n \ge 0$, $\displaystyle \lim_{n \to \infty} \frac{a_{n+1} }{a_n} = L$.
• If $L < 1$, then $\displaystyle \sum_{n=0}^{\infty} a_n$ converges.
• If $L > 1$, then $\displaystyle \sum_{n=0}^{\infty} a_n$ diverges.
• If $L = 1$, then the ratio test is inconclusive.
#### Detailed | {
"domain": "ericyy.me",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9925393549912599,
"lm_q1q2_score": 0.8068027965906854,
"lm_q2_score": 0.8128673110375457,
"openwebmath_perplexity": 736.8790473389977,
"openwebmath_score": 0.9929570555686951,
"tags": null,
"url": "https://cs.ericyy.me/calculus-two/week-3.html"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.