text stringlengths 1 1.11k | source dict |
|---|---|
In the Disk method Integration, if we create a three-dimensional shape of a solid region obtained by the revolution of our function. And divide it into an infinite number of discs of different radius having infinitesimal thicknesses, we will be able to find the volume of each disc with a different radius.
You can also use integration by parts calculator with steps on home page of this integral website.
### Rotation along X-axis
If the function to be revolved is along the x-axis, then integral represents the volume of the solid of revolution:
$$V \;=\; \int_a^b (π R^2) (w)$$ $$\text{Or, } V \;=\; \int_a^b π f(x)^2 \; (Δx)$$ $$V \;=\; \int_a^b π f(x)^2 \; dx$$
### Rotation along Y-axis
If the function to be revolved is along the y-axis, then integral represents the volume of the solid of revolution:
$$V \;=\; \int_a^b (π R^2) (w)$$ $$\text{Or, } V \;=\; \int_a^b π f(y)^2 \; (Δy)$$ $$V \;=\; \int_a^b π f(y)^2 \; dy$$ | {
"domain": "calculator-integral.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9899864293768268,
"lm_q1q2_score": 0.802363127677583,
"lm_q2_score": 0.8104789155369047,
"openwebmath_perplexity": 297.1223134158401,
"openwebmath_score": 0.6490435600280762,
"tags": null,
"url": "https://calculator-integral.com/blog/volume-of-solid-revolution"
} |
gravity, black-holes, photons, mass, mass-energy
BH masses have been experimentally constrained by observations of accretion flows in X-ray binaries with stellar-mass BHs and by gravitational-wave detections from stellar-mass binary-BH mergers ($5 \lesssim m \lesssim 100 M_{\odot}$), and by accretion-powered active-galactic nuclei and dynamically through effects on nearby stars and gas from super-massive BHs ($10^5 \lesssim m \lesssim 10^9 M_{\odot}$). This is a nice graphic. The first confident detection of an intermediate-mass BH, called GW190521, was achieved recently by LIGO/Virgo gravitational wave detection. Stellar mass black holes form as the end-products of stellar evolution, while the origin of super-massive black holes is less certain but thought to originate from "seeds." These astrophysical BHs, for various reasons, are expected to have spin and are modeled as Kerr BHs. | {
"domain": "physics.stackexchange",
"id": 73704,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, black-holes, photons, mass, mass-energy",
"url": null
} |
optics, atomic-physics, plasma-physics, geomagnetism
So why is the top of the aurora red (with no trace of green)?
Be careful here because the bottom of the aurora has red-to-magenta-to-violet colors as well, but much more faint. So we often do not see them with our eyes unless it's a very strong geomagnetic storm, in which case most of the emission is red, not green3.
Footnotes
The separation starts to occur above ~85 km in altitude.
This is also in the UVC range, which can penetrate down to ~40-50 km and has the highest interaction cross-section with diatomic and triatomic oxygen (i.e., ozone).
The emissions are also seen at much lower latitudes than normal, sometimes down to the Caribbean as in the Carrington event of 1859. | {
"domain": "physics.stackexchange",
"id": 46151,
"lm_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, atomic-physics, plasma-physics, geomagnetism",
"url": null
} |
special-relativity, spacetime, conventions, dirac-matrices, wick-rotation
Source 2: arXiv https://arxiv.org/abs/0912.2560
(Minkowski metric $(+,-,-,-)$). In going to the Euclidean metric $\eta^{\mu \nu}=\delta_{\mu \nu}$, one takes
\begin{equation}
\partial_{0}^{M} \rightarrow i \partial_{0}^{E}, \quad \partial_{i}^{M} \rightarrow \partial_{i}^{E}
\end{equation}
and defines
\begin{align}
\gamma_{M}^{0}=\gamma_{E}^{0}, \quad \gamma_{M}^{i}=i \gamma_{E}^{i}
\end{align}
such that
\begin{align}
\left(\gamma_{E}^{\mu}\right)^{\dagger}=\gamma_{E}^{\mu}.
\end{align}
So the Dirac gamma matrices in Euclidean spacetime are hermitian according to this source.
Source 3: The answer in SE post Hermitian properties of Dirac operator
I quote from the accepted answer: "[in the Euclidean theory]... $\bar{\gamma}^{\mu}=\gamma^{\mu}$, not $\gamma^{\mu \dagger}=\gamma^{\mu}$, which is false."
So this source says that $\bar \gamma^\mu:= (\gamma^\mu)^\dagger \gamma^0 = \gamma^\mu$ in the Euclidean theory (if my definition of overbar is consistent with that used in the answer). | {
"domain": "physics.stackexchange",
"id": 87736,
"lm_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, conventions, dirac-matrices, wick-rotation",
"url": null
} |
as given below. Relation represented as an adjacency matrix following three properties: 1 of given... The transitive closure of R is the set a as given below and R a relation represented as adjacency! Warshall transitive closure and the Floyd Warshall in determining the transitive closure R. Transitive relations, we see that ~ and ~ * b of given... By briefly explaining about transitive closure of a is the relation Rt on a program calculates transitive closure uses. Us consider the set a closure is joining all powers of the matrix of. Order for a … for transitive relations, we see that ~ and ~ * are the.. Uses Warshall 's algorithm given graph = R2 R from 1 to.. R2 is certainly contained in the transitive closure, but they are not equal... A = { a, b, c } let R be a relation represented as an matrix! The application of Floyd Warshall in determining the transitive closure of a relation represented an! R from 1 to |A| 1 to |A| Warshall in determining the transitive closure, but they not. | {
"domain": "westwoodmanagementmilwaukee.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9615338079816758,
"lm_q1q2_score": 0.824773025364197,
"lm_q2_score": 0.8577680977182187,
"openwebmath_perplexity": 557.9454185234155,
"openwebmath_score": 0.8817446231842041,
"tags": null,
"url": "http://westwoodmanagementmilwaukee.com/chocolate-cnmyxp/transitive-closure-of-a-relation-bbc4fc"
} |
=============================
If we want more precise information, we see that Euclid's algorithm runs the distance, and we get that $$gcd(t^a-1,t^b-1)=t^{gcd(a,b)}-1.$$
-
@Jyrki: see the problem's constraints: $2 \leq t, a, b \leq 2^{31} - 1$. Hence, t = 0 is not a counterexample. – amWhy Jun 17 '11 at 16:38
Good explication even for a computer science student. – razpeitia Jun 17 '11 at 16:42
See here and its links for a more general viewpoint. – Bill Dubuque Jun 17 '11 at 16:56
@amWhy: Sorry, my bad. I thought I saw $0$ as the lower bound for $t$. I will edit. – Jyrki Lahtonen Jun 17 '11 at 17:04
@Jyrki: no problem! The fact is, you took the challenge to "make the problem more interesting", and in doing so, tackled the OP's question! No harm done! – amWhy Jun 17 '11 at 17:10 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138112138841,
"lm_q1q2_score": 0.821019495977864,
"lm_q2_score": 0.8397339656668287,
"openwebmath_perplexity": 688.2654141587906,
"openwebmath_score": 0.8680461049079895,
"tags": null,
"url": "http://math.stackexchange.com/questions/45918/prove-or-refute-that-fracta-1tb-1-is-not-a-integer-if-a-mod-b-neq-0"
} |
• @dB' I found this paper of using Gini in a text application: proceedings.mlr.press/v10/sanasam10a/sanasam10a.pdf (I prefer this answer to the accepted one, simply as it does the best job of distinguishing your A and B !) Mar 5 '18 at 21:14 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759615719875,
"lm_q1q2_score": 0.8394838113344022,
"lm_q2_score": 0.8558511414521922,
"openwebmath_perplexity": 741.0379543803717,
"openwebmath_score": 0.7436737418174744,
"tags": null,
"url": "https://stats.stackexchange.com/questions/325549/how-to-measure-dispersion-in-word-frequency-data/326166#326166"
} |
gauge-theory, field-theory, atomic-physics, gauge-invariance, berry-pancharatnam-phase
But it is not a usual gauge field for various reasons.
First of all, the Berry connection is a "gauge field" on the parameter space and not the space-time. Secondly, the Berry phase is a purely geometrical/topological object and does not have any dynamics. So I don't think it makes sense to have a Maxwell/Yang-Mills term in the (spacetime) Lagrangian, since these terms contain the dynamical features of a gauge field. Also for this reason, I don't think it makes any sense to talk about conserved currents, etc. for the Berry connection.
It is however possible to have emergent dynamical gauge fields, but I only know about these examples in strongly interacting theories (search for example for quantum spin-liquids). | {
"domain": "physics.stackexchange",
"id": 5644,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gauge-theory, field-theory, atomic-physics, gauge-invariance, berry-pancharatnam-phase",
"url": null
} |
filesystems, big-data
Title: Why splitted text files is bigger than a large one with the same content? I have this large text file that when unzipped has about 2GB.
I split this one into multiple(more than 5 million) files and now I have a folder of about 20GB, how is this possible? Filesystem overhead.
Every time you create a file, the filesystem reserves space on disk to store the file name, and other metadata like its permissions, creation date, etc. It also has to maintain a sort of index of all the (possibly sparse) blocks occupied by each file. The index might be a simple list or a tree, depending on the filesystem.
Finally, note that most filesystems can not allocate only a portion of a block for a file, so the allocated space needs to be rounded up to the block size. This rounding affects both the file blocks, and the index blocks. | {
"domain": "cs.stackexchange",
"id": 8687,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filesystems, big-data",
"url": null
} |
javascript, algorithm, object-oriented, hash-map
constructor(key, val, next) {
this.key = key;
this.val = val;
this.next = next;
}
};
}
Map
Note that the ECMAScript core library does contain a Map datatype which more or less does what you want already.
Also, since you are implementing a symbol table, the restriction that object keys can only be strings or symbols is not really much of a restriction, and you can simply use objects for your symbol tables.
I am assuming this is actually an exercise for implementing a linked list, and not an exercise about writing a compiler, though.
The Result
This is what it looks like, merging in also CaptainPerformance's improvement providing an iterator. I left the Node class in, just as an example, but normally, I would eliminate it and simply use an object, as in CaptainPerformance's answer.
class SymbolTable {
#first;
static #Node = class Node {
key;
val;
next; | {
"domain": "codereview.stackexchange",
"id": 39441,
"lm_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, algorithm, object-oriented, hash-map",
"url": null
} |
entomology, blood-circulation
Regulation of blood meal size in the mosquito
La Crosse Virus Infection Alters Blood Feeding Behavior in Aedes
triseriatus and Aedes albopictus (Diptera: Culicidae)
Visualizing Non Infectious and Infectious Anopheles gambiae Blood
Feedings in Naive and Saliva-Immunized Mice | {
"domain": "biology.stackexchange",
"id": 7259,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "entomology, blood-circulation",
"url": null
} |
performance, python-3.x
We could get something like:
def calculate_hash(s: str, length: Optional[int] = None) -> int:
if length is not None:
s = islice(s, 0, length)
else:
length = len(s)
power = BASE ** (length - 1)
ret_hash = 0
for c in s:
ret_hash += char_to_int(c) * power
power /= BASE
return ret_hash % MOD | {
"domain": "codereview.stackexchange",
"id": 41269,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, python-3.x",
"url": null
} |
ros, pr2, ros-indigo
Title: I tried to install PR2 simulation on Indigo but i get the command like this --- E: Unable to locate package ros-indigo-pr2-desktop
output:
sudo apt-get install ros-indigo-pr2-desktopReading package lists... Done
Building dependency tree
Reading state information... Done
N: Ignoring file 'ros-latest.list.' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'ros-latest.list.' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'ros-latest.list.' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Unable to locate package ros-indigo-pr2-desktop | {
"domain": "robotics.stackexchange",
"id": 25893,
"lm_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, pr2, ros-indigo",
"url": null
} |
python, performance, strings
Allow texts with only one character, and length 1 – Both of these conform to at most two distinct characters, and should be included in the final set
Bug: When a character not in the set appears, you set length to 1 – You clear the set and set it to current character, and set length to one, but if your text is ceeeeebbbbbb (and you come to the b the length should really be 5 (or 6) and your distinct set should consist of e and b. You forget that the e could still be part of the longest substring, even though the combination c and e didnt't yield the longest one.
Use of set is kind of heavy – It kind of make sense to use a set to keep the two distinct character, and if it was larger subset I would argue that is wise, but as it is only two characters, it is faster to just keep track of the last two characters, and use that for length calculations. | {
"domain": "codereview.stackexchange",
"id": 16931,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, strings",
"url": null
} |
physical-chemistry, boiling-point, distillation
One may argue the term boiling point leans more toward the characterization of a compound (e.g., water) with a denomination like $bp = \pu{100 ^\circ{}C} (\pu{1 atm})$.
On the other hand, distillation temperature leans more toward the (technical) application of distillations in synthesis and chemical engineering (large scale distillation, steam cracker, etc) as a unit operation. Here, temperature and pressure are set as process parameters, e.g. solvent x was removed from the reaction mixture by distillation at a pressure of $\approx \pu{10 mbar}$ and $\pu{80 ^\circ{}C}$, or to yield blends of a distillate (e.g., kerosene) for which only a range of boiling points is provided (e.g., petrol ether of $40\ldots\pu{60 ^\circ{}C}$). | {
"domain": "chemistry.stackexchange",
"id": 17151,
"lm_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, boiling-point, distillation",
"url": null
} |
solar-system, orbital-mechanics, comets, meteor-shower
Left: From What (actually) is Jupiter doing to this year's Perseids meteor shower? Right: From Why would the Perseids meteor rate fall off after maximum faster than the increase before maximum? - click each for full size
The cometary particles need not retain the exact same orbit as the comet in order to stay close together near perihelion, thus where their orbit passes Earth's orbit.
Slight changes in the orbital parameters of the released dust particles can include slighly higher or lower aphelion, and thus change the revolution time and the time of perihelion (Earth) passage enough to spread out the particles. Over many revolutions it will eventually spread out over the whole orbit.
Additionally the orbits by the dust particles are subject to changes due to interaction with the solar wind and solar radiation which will over time change their orbits (yorp effect, Yarkovsky effect, radiation pressure etc). | {
"domain": "astronomy.stackexchange",
"id": 4403,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "solar-system, orbital-mechanics, comets, meteor-shower",
"url": null
} |
javascript, node.js, web-scraping, express.js
(This will perform slightly worse but will be much easier to maintain IMO)
BTW there is a bug here:
var article = { title : "", url : "", image_src : ""};
...
$(".articles li .img img").each(function(){
...
articles[i] = article;
});
You are assigning (sharing) the same article over and over not creating a new one. Each time through the loop you just overwrite the attributes. | {
"domain": "codereview.stackexchange",
"id": 25026,
"lm_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, node.js, web-scraping, express.js",
"url": null
} |
c++, beginner, simulation, sdl
// no initial instruction
opcode = 0;
// nothing to draw initially
draw_flag = false;
// initialize random number generator
gen.seed(rd()); | {
"domain": "codereview.stackexchange",
"id": 35571,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, simulation, sdl",
"url": null
} |
definitions, logic, knowledge-representation, norvig-russell, knowledge-base
Title: When is a knowledge base consistent? I am studying a knowledge base (KB) from the book "Artificial Intelligence: A Modern Approach" (by Stuart Russell and Peter Norvig) and from this series of slides.
A formula is satisfiable if there is some assignment to the variables that makes the formula evaluate to true. For example, if we have the boolean formula $A \land B$, then the assignments $A=\text{true}$ and $B=\text{true}$ make it satisfiable. Right?
But what does it mean for a KB to be consistent? The definition (given at slide 14 of this series of slides) is:
a KB is consistent with formula $f$ if $M(KB \cup \{ f \})$ is non-empty (there is a world in which KB is true and $f$ is also true). | {
"domain": "ai.stackexchange",
"id": 956,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "definitions, logic, knowledge-representation, norvig-russell, knowledge-base",
"url": null
} |
python, object-oriented, python-2.x, graphics, pygame
Now, you might have to get your local planet or player variable from some other collection, but you don't want to have to know it's tracked in the game's player's logbook, indexed by planet's name, and stored in an an attribute called is_explored. Only the tiny function that answers that question should have to know any of that extra stuff, and then if you ever move the information, only that one function has to be updated.
Once you've chosen the new way to ask if a planet has been discovered and explored, update your code to use it. Then look for repetition, or otherwise unnecessary checks. They're distracting to read, and possibly slow your code down. For example, you currently create a list planets_to_blit that includes only planets that have been discovered. Then you iterate over this list to draw halos, but first check again whether the planet was discovered. | {
"domain": "codereview.stackexchange",
"id": 21573,
"lm_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, python-2.x, graphics, pygame",
"url": null
} |
ros, ros-hydro, rosconsole
Originally posted by demmeln with karma: 4306 on 2014-07-21
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by Andrzej Pronobis on 2014-07-22:
Thanks a lot Niko for a very informative answer!
Comment by m_jaeyoon_c on 2014-07-23:
Thank you! | {
"domain": "robotics.stackexchange",
"id": 18679,
"lm_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-hydro, rosconsole",
"url": null
} |
robot-state-publisher
Originally posted by kuku123 on ROS Answers with karma: 21 on 2015-08-20
Post score: 1
URDF is not only for Gazebo, or just for simulation purposes. URDF defines your robot's physical dimensions, joints, constraints etc. Therefore robot_state_publisher publishes states of your link in your robot, not necessarily in simulation. For example, also for actual robot, it publishes tf data between your base_link and laser sensor link (like base_laser_link) using distances defined in URDF. You do not need to publish them separately by writing some nodes.
For joint states, if you can publish the states of your joints to joint_states topic, it can also publish those, not only static link distances.
Originally posted by Akif with karma: 3561 on 2015-08-21
This answer was ACCEPTED on the original site
Post score: 4 | {
"domain": "robotics.stackexchange",
"id": 22499,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "robot-state-publisher",
"url": null
} |
only note that – in the case of a sign-magnitude representation – the sign bit is used only to represent the sign of the value (0 = positive, 1 = negative). ) Instructions Just type in any box, and the conversion is done "live". Assume that 185 and 122 are unsigned 8-bit decimal integers, calculate 185-122. In this scheme, if the binary number 010 2 encodes the signed integer 2 10, then its two's complement, 110 2, encodes the inverse: −2 10. Could someone give me a explanation of how to convert both negative and positive numbers to signed magnitude binary notation. negative 6 - 4-. Learn how to convert meters to feet with the help of our calculation examples and reference table. 4 Signed Integer Representation CMSC 2833 Lecture 15. Before we dive into the main topic lets talk a little about Decimal and Binary Number System that we are going to work with in this tutorial. Convert Hex to Binary. What is the largest positive number one can represent in a 12-bit 2's complement code? Write | {
"domain": "ecbu.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995723244552,
"lm_q1q2_score": 0.8028007124468136,
"lm_q2_score": 0.831143045767024,
"openwebmath_perplexity": 808.8451726687958,
"openwebmath_score": 0.4758775234222412,
"tags": null,
"url": "http://wkns.ecbu.pw/decimal-to-signed-magnitude-converter.html"
} |
circuit-construction, clifford-group
Title: What's a good Clifford+T circuit for a controlled-controlled-SWAP gate? Mosca and Mukhopadhyay give a Clifford+T circuit for a three-qubit Fredkin (controlled-SWAP) gate:
This uses four $T$ and three $T^\dagger$ gates at a T-depth of four.
What would the T-count and depth be for a four-qubit CCSWAP gate, e.g., a controlled-controlled-SWAP Gate? You can build a CCSWAP out of 6 T gates: | {
"domain": "quantumcomputing.stackexchange",
"id": 5063,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "circuit-construction, clifford-group",
"url": null
} |
javascript, ecmascript-6, html5, audio
<script>
(function () {
let difficultyMode = 'easy'; // default difficulty mode
let frequencyTrainer = startFrequencyTrainer(difficultyMode, null);
let frequency = frequencyTrainer.frequency;
let frequencyContainers = null; | {
"domain": "codereview.stackexchange",
"id": 32007,
"lm_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, ecmascript-6, html5, audio",
"url": null
} |
gazebo, transforms
Title: libgazebo_ros_diff_drive publishes tf based on wall clock time instead of sim time
I am using multiple turtlebot3 robots in my simulation with gazebo. The differential time plugin publishes a transform between the odom frame and the base_footprint frame. I also have a plugin which publishes the ground truth pose of the turtlebot3 libgazebo_ros_p3d.so.
I want to generate transformations between multiple turtlebot3 robots and to do this I have a seperate node which broadcasts transform between the base_link frame and the world frame. The problem is that the base_link to world transformations are published with the sim_time as I intend but for some reason the transformations between the base_footprint and odom frame are published with my computers clock time.
Because of this I cannot generate transformations between the odom frame and the world frame.
Heres what I would like my tf tree to be:
-------------------- world -------------------- | {
"domain": "robotics.stackexchange",
"id": 4326,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo, transforms",
"url": null
} |
python
def landscape_super(self):
self._super_ls=1
self._lss_hdri_file_jpg_surf=pygame.Surface([self._window_wh[0],self._window_wh[1]//2.01])
self._lss_hdri_file_jpg_surf.fill((200,220,255))
def _render_pygame_def_setup(self):
self._pygame_clock=pygame.time.Clock()
self._pygame_screen=pygame.display.set_mode((self._camera.w,self._camera.h),pygame.DOUBLEBUF|pygame.HWACCEL|pygame.HWSURFACE)
def _render_pygame_def_update(self):
self._pygame_screen.fill((0,70,0))
self.regulate_camera()
for idx,vclass in self._model.items():
for model in vclass:
for point in model.projected_des(self._camera):
if point!=None:
try:self._pygame_screen.set_at(point,(255,255,255))
except:pass | {
"domain": "codereview.stackexchange",
"id": 44349,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python",
"url": null
} |
randomized-algorithms, upper-bounds, pseudorandomness
$$\Pr(|\sum X_i - n/2| \geq t) = \Pr(|\sum W_i| \geq n) = \Pr(|\prod_{i=1}^k(a_i+b_i)| \geq n) = \Pr(a_i+b_i\neq 0 \text{ for every }i) = \frac{1}{2^k} = \frac{1}{2t}.$$
Here, we used that $\prod_{i=1}^k(a_i+b_i)$ equals $0$ if $a_i+b_i=0$ for some $i$, and equals $-n$ or $n$, otherwise.
Answer: in general, we cannot obtain a stronger upper bound than $O(1/t)$. | {
"domain": "cstheory.stackexchange",
"id": 2106,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "randomized-algorithms, upper-bounds, pseudorandomness",
"url": null
} |
fft
Title: Why does FFT generate a jaggedy signal I have an application that fills a buffer from my computer's microphone and does an FFT. My objective is to figure out what frequencies are in the sample.
I've tested the application by whistling as well as by playing this video from my cellphone into my computer's mic (I've tried two different mics to be sure). What I expect (taking the absolute frequency) is a smooth Gaussian-like curve with a mean at the frequency of the incoming tone, but what I'm getting is this: | {
"domain": "dsp.stackexchange",
"id": 2283,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft",
"url": null
} |
pressure, elasticity, moduli
Title: Why should bulk modulus always be positive?
The minus sign that appears in Equation 12.39 is for consistency, to ensure that $B$ is a positive quantity. Note that the minus sign ($–$) is necessary because an increase $\Delta p$ in pressure (a positive quantity) always causes a decrease $\Delta V$ in volume, and decrease in volume is a negative quantity | {
"domain": "physics.stackexchange",
"id": 93343,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pressure, elasticity, moduli",
"url": null
} |
quantum-mechanics, scales
When we observe the water in a glass, we see it as a static system in mechanical and thermodynamic equilibrium (with no apparent changes) for which, for instance, the Archimedes’ principle is valid. But a small microbe (of the size $10^{-6}$ m), would ‘see’ the same water as a very complicated fluctuating system which is not (locally) at mechanical equilibrium at all! The microbe needs (at least) some kind of Navier-Stokes equations (elaborate fluid dynamics) to describe the behaviour of the fluid surrounding it. If we also probe (e.g., with a ‘microscope’) the water at the micro-metre scales (the scale where the microbe lives), we will observe the same behaviour as the microbe. If we probe further into smaller scales (like the atomic scales) — as physicists have done — we will see that at that scale, quantum laws prevail, and that the laws at larger scales can be ‘derived’ (in principle) from such fundamental quantum laws. This shows the striking effect and importance of scales in the | {
"domain": "physics.stackexchange",
"id": 26723,
"lm_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, scales",
"url": null
} |
neuroscience, neurophysiology, action-potential, synapses
Title: How are presynaptic burst firing signals transmitted post-synaptically? Neurons can exhibit burst firing and this presynaptic process basically results in a flurry of action potentials being fired in a short time window.
I'm, however, wondering how these signals are further relayed once they synapse onto other neurons? Specifically, does each action potential in the burst volley generate another post-synaptic action potential, or is the bursting somehow averaged to then transmit either one or no action potential post-synaptically depending on long the burst train was? Short answer
It depends.
Background
It all depends on the neuronal circuit and neurotransmitter system under investigation. For example, raphe neurons release 5-HT in a burst-like fashion onto cortical dendrites. However, the postsynaptic effect is inhibitory, so no action potentials there (Gartside, 2000). | {
"domain": "biology.stackexchange",
"id": 10265,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neuroscience, neurophysiology, action-potential, synapses",
"url": null
} |
ros, serial, communication, turtlebot, workstation
Originally posted by Ken_in_JAPAN with karma: 894 on 2014-06-08
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by GT on 2016-05-31:
Hi
I am running Ubuntu 14.04, have installed rospeex voic controller for Turtlebot. When I run this comand from Turtlebot
$ source ~/catkin_ws/devel_isolated/setup.bash
$ rosrun rospeex_audiomonitor audio_monitor_epd
audio_monitor: cannot connect to X server
How to conect to X server? | {
"domain": "robotics.stackexchange",
"id": 8449,
"lm_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, serial, communication, turtlebot, workstation",
"url": null
} |
Solution
T41
Suppose that $A$ is an $m\times n$ matrix and $B$ is an $n\times n$ nonsingular matrix. Prove that the column space of $A$ is equal to the column space of $AB\text{,}$ that is $\csp{A}=\csp{AB}\text{.}$ (Compare with Exercise MM.T41 and Exercise CRS.T40.)
Solution
T45
Suppose that $A$ is an $m\times n$ matrix and $B$ is an $n\times m$ matrix where $AB$ is a nonsingular matrix. Prove that
1. $\nsp{B}=\set{\zerovector}$
2. $\csp{B}\cap\nsp{A}=\set{\zerovector}$
Discuss the case when $m=n$ in connection with Theorem NPNT.
Solution | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127402831221,
"lm_q1q2_score": 0.805704657737613,
"lm_q2_score": 0.8152324915965392,
"openwebmath_perplexity": 144.48185733870667,
"openwebmath_score": 0.9492066502571106,
"tags": null,
"url": "http://linear.ups.edu/fcla/section-CRS.html"
} |
organic-chemistry, carbonyl-compounds, stability, tautomer
Daryl L. Howard, Henrik G. Kjaergaard, Jing Huang, and Markus Meuwly, J. Phys. Chem. A 2015, 119 (29), 7980–7990.
Assuming that every transition leads to the formation of the associated structure, i.e. $\kappa =1$, which is reasonable for this small a barrier, we can approximate via transition state theory the rate for a reaction with a barrier of around 10 kJ/mol:
$$ k = \kappa\frac{k_\mathrm{B}T}{h}e^{\frac{- \Delta G^{\ddagger }}{RT}}\approx 1\times10^{11}~\mathrm{\frac{1}{s}}.$$
You might need to cool the system to about 50 K to actually see the formation of two minima. Of course for the symmetric case these two would be identical, so you would still need to mark one of the sides with an heavier isotope. This of course will influence the measurement, but I think you can get where this is going to.
If you are as confused as me about the correct IUPAC nomenclature of the compound see: How to name the tautomers of hexane-2,4-dione correctly according to IUPAC rules? | {
"domain": "chemistry.stackexchange",
"id": 5176,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, carbonyl-compounds, stability, tautomer",
"url": null
} |
forces, fluid-dynamics, home-experiment, buoyancy, bubbles
This viscous drag force would oppose the buoyancy's attempts to move it. Using a simple drag equation we would see a small but gradual movement upwards; as the drag equation only gives a drag force when there is a relative velocity between them. It is possible for the bubbles to flow at a hard to notice crawl. See for example pitch drop experiments where viscous effects can slow things so far that they barely appear to behave as fluids.
I'm not an expert in non-Newtonian fluids, so it's possible that the bubble is able to stop completely due to some higher order effects which the drag equation wouldn't consider. I don't know enough about that to say either way, but it might be beyond the scope of what you wanted to know anyways. Doing a simple search, I believe the effect of completely stopping could be explained by considering the sanitizer as a Bingham Plastic; which can resist a certain amount of stress before yielding; as a Newtonian fluid would to any amount of stress. | {
"domain": "physics.stackexchange",
"id": 50312,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, fluid-dynamics, home-experiment, buoyancy, bubbles",
"url": null
} |
black-holes, gravitational-waves, time-dilation, observers, event-horizon
The same principle applies to the merging black holes. We have two objects that can't actually be real black holes because in any finite universe we know real black holes cannot exist. However they are experimentally indistinguishable from real black holes. As these two objects approach each other the spacetime geometry changes and approaches that of a single rotating black hole - the Kerr metric. We know the geometry can never actually become Kerr because that would take an infinite time. However the geometry approaches the Kerr geometry so quickly that after a fifth of a second it is experimentally indistinguishable from the Kerr geometry. | {
"domain": "physics.stackexchange",
"id": 62305,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-holes, gravitational-waves, time-dilation, observers, event-horizon",
"url": null
} |
that a convergent sequence has a unique limit, i. Can you find an example ? While we now know how to deal with convergent sequences, we still need an easy criteria that will tell us whether a sequence converges. CONVERGENCE PETE L. the merging of distinct technologies, industries, or devices into a unified whole n. Therefore, {fn} converges pointwise to the function f = 0 on R. We note that absolute convergence of an infinite series is necessary and sufficient to allow the terms of a series to be. Order and Rates of Convergence 1 Order of convergence 11 Suppose we have that Then the convergence of the sequence x k to ¯x is said. ter estimates as well as the Potential Scale Reduction (PSR) convergence criteria, which compares several independent MCMC sequences. 1 n, 2 3 n are examples of null sequences since lim n = 0 and lim 2 3 n = 0. Exercises 15 2. You should be able to verify that the set is actually a vector subspace of ‘1. a sequence of xed numbers. F-convergence, lters and nets | {
"domain": "jf-huenstetten.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071502644802,
"lm_q1q2_score": 0.8665088798375652,
"lm_q2_score": 0.8723473697001441,
"openwebmath_perplexity": 560.7047789038782,
"openwebmath_score": 0.8878056406974792,
"tags": null,
"url": "http://tfzg.jf-huenstetten.de/convergent-sequence-examples-pdf.html"
} |
thermodynamics, entropy, reversibility
As for the calculation, we can write $\bar{T}_{\text{sys},2} > T_{\text{C}}$, where
$$\bar{T}_{\text{sys},2} = \frac{1}{\Delta S_2}\int_2 TdS$$
is the average temperature during Process 2. Similarly, during Process 4, the system is always cooler than the reservoir, so $\bar{T}_{\text{sys},4} < T_{\text{H}}$. The change in entropy for the cycle can be written in terms of the average temperatures as
\begin{align}
0 &= \Delta S_{\text{sys}} = \Delta S_1 + \Delta S_2 + \Delta S_3 + \Delta S_4
= \Delta S_2 + \Delta S_4\\
&=\frac{Q_2}{\bar{T}_{\text{sys},2}} + \frac{Q_4}{\bar{T}_{\text{sys},4}}
=\frac{-Q_{\text{C}}}{\bar{T}_{\text{sys},2}} + \frac{Q_{\text{H}}}{\bar{T}_{\text{sys},4}}
\\
& > \frac{-Q_{\text{C}}}{{T}_{\text{C}}} + \frac{Q_{\text{H}}}{{T}_{\text{H}}}
\end{align} | {
"domain": "physics.stackexchange",
"id": 26282,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, entropy, reversibility",
"url": null
} |
c++, simulation
#endif //ANTFACTORY_CPP_INCLUDED
food.cpp
#pragma once
#include <utility>
class Food
{
private:
short FoodSize;
int x;
int y;
int index;
public:
Food(int nx, int ny, int i, short ns)
{
x = nx;
y = ny;
index = i;
FoodSize = ns;
}
short BeTaken(short BiteSize)
{
if (FoodSize > BiteSize)
{
FoodSize -= BiteSize;
return BiteSize;
}
else
{
FoodSize = 0;
return FoodSize;
}
}
std::pair<int, int> getPos() {
return std::pair<int, int>(x, y);
}
};
foodFactory.cpp
#pragma once
#include <iostream>
#include <vector>
#include <cstdlib>
#include "food.cpp"
#include "board.cpp"
#define DEBUG | {
"domain": "codereview.stackexchange",
"id": 17821,
"lm_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++, simulation",
"url": null
} |
quantum-gate, hamiltonian-simulation, pauli-gates, hadamard
Title: Definitions of $D_y$ gate in Hamiltonian simulation: are they the same? I'm reading a Hamiltonian simulation example proposed in this paper. From their notation, the operator $D_y$ (sometimes it's called $H_y$) serves the function to diagonalize the Pauli matrix $\sigma_y(Y)$ (the corresponding circuit is illustrated below):
$$
D_y\ (or\ H_y)=HSX=\frac{1}{\sqrt{2}}\begin{bmatrix}
i & 1\\
-i & 1
\end{bmatrix}
\quad\quad\quad [A]
$$ | {
"domain": "quantumcomputing.stackexchange",
"id": 2119,
"lm_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-gate, hamiltonian-simulation, pauli-gates, hadamard",
"url": null
} |
algorithms, trees
Title: Is there a solution to the following thought experiment / problem involving trees? I am trying to find an algorithmic solution to a thought experiment that occurred to me recently. Please excuse me if the question is a bit naïve as I am not a CS expert.
Basically I have a tree with $n$ nodes, each of which is assigned a numeric label $l\in\{0,\ldots,k\}$, $k\in\mathbb{Z}, k\geq0$. More than one node can have the same label. An example of such a tree is shown below.
Please excuse me for the poor quality of my drawing.
My aim is to find a mapping $m$ of the labels $\{0,\ldots,k\}$ to the set $s\in\{A,\ldots,Z\}$ (i.e., from numbers to letters) such that each path from a root node to a leaf node becomes a human-readable English word.
In the example above, a possible mapping could be $1\to S, 2\to E, 3\to L, 4\to A, 5\to N, 6\to W, 7\to D$, yielding the following resulting tree: | {
"domain": "cs.stackexchange",
"id": 20059,
"lm_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, trees",
"url": null
} |
javascript, animation, collision, physics, paper.js
function onFrame() {
var onScreen = 0;
for (var i = 0; i < envelopes.length; i++) {
if (!envelopes[i].dead) {
onScreen++;
}
envelopes[i].updateSelf();
}
if (Date.now() > lastEnvelope + frequency && onScreen <= maxOnScreen) {
var dropX = view.bounds.width * (((Math.random() * fallRange) + fallMidpoint) / 100);
var envelope = new Path.Rectangle(new Point(dropX, -envelopeHeight), 100, envelopeHeight);
envelope.position = new Point(dropX, -envelopeHeight);
envelope.fillColor = {
hue: Math.random() * 360,
saturation: 1,
brightness: 1
}
envelope.velocity = initialVelocity;
envelope.removed = false;
envelope.updateSelf = function() {
if (this.bounds.bottom > view.bounds.height + 1000) {
this.remove();
envelopes.splice(i,1);
return;
};
function bounce() { | {
"domain": "codereview.stackexchange",
"id": 9502,
"lm_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, animation, collision, physics, paper.js",
"url": null
} |
statistical-mechanics, phase-transition, symmetry-breaking, ising-model, critical-phenomena
To conclude (finally!), let me just mention that it is possible to construct infinite-volume Gibbs measures (such as the measures $\mu_\beta^+$ and $\mu^-_\beta$ described above) directly in infinite-volume, without taking limits of finite-volume measures. This is interesting because this avoids any explicit symmetry breaking! I discussed this in another answer. | {
"domain": "physics.stackexchange",
"id": 67566,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, phase-transition, symmetry-breaking, ising-model, critical-phenomena",
"url": null
} |
electric-circuits, electric-fields, charge, potential, voltage
The charge flows this way because the potential is higher when we get closer to the conducting neutral wire ( colored in black in the previous image ) and is lower when we get further away from the wire ( so charge flows from higher potential to lower potential ), in addition, charge carriers in the circuit loop rearrange themselves, in such a way that the field inside the conducting loop is zero. This happens for extremely short time.
So there exists a charge flow in the circuit, but such charge flow won't turn the lamp on because the total current in the circuit will be zero ( since the superposition of two currents with equal magnitude but different directions will give zero ) ...
Ok then, in this specific example the total current in the circuit is zero... | {
"domain": "physics.stackexchange",
"id": 50550,
"lm_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-fields, charge, potential, voltage",
"url": null
} |
Last recommendation: still didn't test the algorithm, write a testcase against it using a brute force algorithm. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517488441416,
"lm_q1q2_score": 0.8041435105956897,
"lm_q2_score": 0.822189123986562,
"openwebmath_perplexity": 485.3492690730711,
"openwebmath_score": 0.48990562558174133,
"tags": null,
"url": "https://cs.stackexchange.com/questions/53849/largest-sum-divisible-by-n"
} |
human-biology, cell-biology, immunology, immune-system
PRRs exist in many different organisms in different kingdoms, including the fruit fly Drosophila melanogaster and plants like Arabidopsis thaliana, also known as thale cress. They have existed in humans (and many of our ancestors) since we evolved. The exact same PRRs that you and I have in our bodies were in the bodies of humans that lived 2,000, 20,000, and 200,000 years ago. Their genetic sequences may have changed very slightly over that time, but from a functional perspective they are the same. The reason for this is that (pathogenic) microbes have had the same PAMPs for millions and millions of years. PRRs are also not sequence-specific, instead recognizing molecular patterns - the chemical "shape" of a molecule. These patterns are evolutionarily conserved, meaning they are the same in species after species and remain essentially the same over long periods of evolutionary time. | {
"domain": "biology.stackexchange",
"id": 12119,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, cell-biology, immunology, immune-system",
"url": null
} |
In Counting Principles, we studied combinations.In the shortcut to finding ${\left(x+y\right)}^{n}$, we will need to use combinations to find the coefficients that will appear in the expansion of the binomial. A binomial coefficient C(n, k) also gives the number of ways, disregarding order, that k objects can be chosen from among n objects more formally, the number of k-element subsets (or k-combinations) of a n-element set. divided by k! Binomial Expansions 4.1. Also, we can apply Pascal’s triangle to find binomial coefficients. Binomial identities, binomial coefficients, and binomial theorem (from Wikipedia, the free encyclopedia) In mathematics, the binomial theorem is an important formula giving the expansion of powers of sums. The following topics will be covered in this post: What is Binomial Distribution? are the binomial coefficients, and n! For e.g. Binomial data and statistics are presented to us daily. Below is a construction of the first 11 rows of Pascal's triangle. Pascal's | {
"domain": "hlccc.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9603611631680358,
"lm_q1q2_score": 0.8104440785106697,
"lm_q2_score": 0.8438950986284991,
"openwebmath_perplexity": 710.6547183819509,
"openwebmath_score": 0.781328558921814,
"tags": null,
"url": "https://journey.hlccc.org/book-in-iffhkb/archive.php?page=binomial-coefficient-explained-84acc7"
} |
climate-change, carbon-cycle, methane
(Source: figures from The biomass distribution on Earth, Yinon M. Bar-On, Rob Phillips, and Ron Milo, PNAS June 19, 2018 115 (25) 6506-6511; first published May 21, 2018 https://doi.org/10.1073/pnas.1711842115) | {
"domain": "earthscience.stackexchange",
"id": 1753,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "climate-change, carbon-cycle, methane",
"url": null
} |
Look at $\triangle STQ$ and $\triangle TRQ$. Think of them as having bases $ST$ and $TR$. Then they have the same height. Since $ST=TR$, they also have equal bases. so they have the same area.
Thus our shaded $\triangle STQ$ has area half the area of $SRQ$, which has half the area of the parallelogram. Therefore the area of $\triangle STQ$ is $\frac{1}{2}\cdot \frac{1}{2}$, that is, $\frac{1}{4}$ of the area of the parallelogram.
Remark: The height of the parallelogram cannot be computed from the given information. But we do not need it to find the ratio of the areas.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.980280872180697,
"lm_q1q2_score": 0.8014526162385205,
"lm_q2_score": 0.8175744717487329,
"openwebmath_perplexity": 168.10198592777834,
"openwebmath_score": 0.8517221212387085,
"tags": null,
"url": "http://math.stackexchange.com/questions/174989/height-of-triangle-inside-a-parallelogram"
} |
algorithm, programming-challenge, recursion, objective-c, combinatorics
Computation time now: 0.28 s for 16 beads.
This can further be improved by working on a single array only, and
just exchanging the beads:
void calculateNumNecklaces(NSMutableArray *beadsArray, int fromPosition)
{
if (fromPosition == beadsArray.count) {
// All beads chosen, check if valid:
if (isPrime([beadsArray.lastObject intValue] + [beadsArray.firstObject intValue])) {
count += 1;
}
return;
}
// Is the bead at `fromPosition` a valid choice?
int previousNumber = [beadsArray[fromPosition - 1] intValue];
if (isPrime(previousNumber + [beadsArray[fromPosition] intValue])) {
calculateNumNecklaces(beadsArray, fromPosition + 1);
} | {
"domain": "codereview.stackexchange",
"id": 13087,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm, programming-challenge, recursion, objective-c, combinatorics",
"url": null
} |
beginner, powershell
if (-not [System.IO.Path]::IsPathRooted($path)) {
return "$dirRoot/$path"
} else {
return $path
}
}
# Setup directory names and create the backup directory.
$dateStr = $date.ToString("yyyyMMddHHmmss")
$prodDirName = Default-Parameter "Production" $prodDirName | Fix-Path
$stageDirName = Default-Parameter "Stage" $stageDirName | Fix-Path
$backupDirName = Default-Parameter "Backups/$dateStr" $backupDirName | Fix-Path
Write-Output "Creating backup directory: $backupDirName"
New-Item -ItemType Directory -Path $backupDirName | Out-Null
$prodDir = Get-Item $prodDirName
$stageDir = Get-Item $stageDirName
$backupDir = Get-Item $backupDirName
$logFile = "$backupDirName/Deployment.log" | {
"domain": "codereview.stackexchange",
"id": 30124,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, powershell",
"url": null
} |
swift, cryptography
// Sign data
let requestorData = requestorID.dataUsingEncoding(NSUTF8StringEncoding)!
// Generate a digital signature for our requestor from our cert
status = SecKeyRawSign(privateKey, .PKCS1, UnsafePointer(requestorData.bytes),
requestorData.length, signedBytes, &signedBytesSize)
if status != errSecSuccess {
print("Cannot sign the device id info: failed obtaining the signed bytes.")
return nil
}
let encryptedBytes = NSData(bytes: signedBytes, length: signedBytesSize)
let signedRequestorId = encryptedBytes.base64EncodedStringWithOptions([])
return signedRequestorId
}
You can use a Swift array instead of allocating a buffer:
var signedBytesSize: size_t = SecKeyGetBlockSize(privateKey)
var signedBytes = [UInt8](count: signedBytesSize, repeatedValue: 0) | {
"domain": "codereview.stackexchange",
"id": 21674,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "swift, cryptography",
"url": null
} |
python, beginner, python-3.x, recursion
@classmethod
def from_gui(cls):
width = 100 * 6
height = 100 * 6
cells = {}
win = GraphWin('KenKen', width + 200, height + 50)
prompt = Text(Point((width + 150) / 3, height + 25), 'How many groups are there?')
prompt.setSize(10)
prompt.draw(win)
input = Entry(Point(2 * (width + 150) / 3, height + 25), 5)
input.setSize(10)
input.draw(win)
groups = []
rows = []
cols = []
r = Rectangle(Point(width + 10, 20), Point(width + 190, 50))
r.setFill(color_rgb(255, 0, 0))
r.draw(win)
t = Text(Point(width + 100, 35), 'Remove')
t.setSize(10)
t.draw(win)
r = Rectangle(Point(width + 10, 60), Point(width + 190, 90))
r.setFill(color_rgb(0, 255, 0))
r.draw(win)
t = Text(Point(width + 100, 75), 'Enter')
t.setSize(10)
t.draw(win)
for i in range(6): | {
"domain": "codereview.stackexchange",
"id": 25772,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, recursion",
"url": null
} |
javascript, game-of-life
<input id="reset" type="button" value="Randomize" />
<input id="clear" type="button" value="Clear" />
</div>
<div id="controls">
<input id="next" type="button" value="Next Step" />
<span id="CurrentStep"></span>
<select id="delay">
<options>
<option value=1000>Slow (1 sec delay)</option>
<option value=400>Normal (400ms delay)</option>
<option value=200>Quick (200ms delay)</option>
<option value=60 selected="selected">Fast (60ms delay)</option>
<option value=0>As Fast As Possible</option>
</options>
</select>
<input id="auto" type="button" value="Auto Play" />
</div>
</div>
<div id="output"></div> In answer to your questions, optimizing key pieces of code and a small algorithm change can produce significant improvement.
All testing was done on a Win32 notebook with Intel Atom CPU N2600 @ 1.6 GHz and 1GB of RAM, running Mozilla Firefox and a text editor. | {
"domain": "codereview.stackexchange",
"id": 23510,
"lm_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, game-of-life",
"url": null
} |
python, performance, numpy, simulation, numba
# Set the current wake-wing influences to the normal component of the
# wake induced velocities at each panel.
self.current_wake_wing_influences = np.einsum(
"ij,ij->i", wake_induced_velocities, self.panel_normal_directions
)
else:
# If this is the first time step, set the current wake-wing influences to
# zero everywhere, as there is no
# wake yet.
self.current_wake_wing_influences = np.zeros(
self.current_airplane.num_panels
)
def calculate_vortex_strengths(self):
"""This method solves for each panel's vortex strength."""
# Solve for the strength of each panel's vortex.
self.current_vortex_strengths = np.linalg.solve(
self.current_wing_wing_influences,
-self.current_wake_wing_influences
- self.current_freestream_wing_influences,
) | {
"domain": "codereview.stackexchange",
"id": 40925,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, numpy, simulation, numba",
"url": null
} |
motor
Title: Motor controller calibration I bought 2 brushed motor controllers from China to use with my hobby-weight battle robot (http://www.banggood.com/ESC-Brushed-Speed-Controller-For-RC-Car-Truck-Boat-320A-7_2V-16V-p-915276.html).
These are intended for use with my 2 cordless drill motors which will be driving the left and right wheel respectively. The robot will therefore be steered in "tank mode" by varying the speed and direction of rotation of the 2 motors using the two joysticks on my Turnigy 9x transmitter.
My question is: I have seen videos on youtube where people calibrate brushless motor controllers (ESCs) using some system of pushing the joystick on a standard transmitter forward and listening to tones and then doing the same for reverse and so on. | {
"domain": "robotics.stackexchange",
"id": 479,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "motor",
"url": null
} |
machine-learning, neural-network, deep-learning, dataset, cnn
Title: Why do we scale down images before feeding them to the network? I have been seeing a lot where images are generally scaled down to either $64\times64$, $32\times32$ or other lower resolutions. Can someone please help me with this and answer a few questions:
Don't we lose image details by doing so?
What would be the consequences if we scale down the image to some other higher resolution such as $512\times512$ or $1024\times1024$ or something?
Can we feed the network without $1:1$ square images?
Don't we lose image details in doing so? | {
"domain": "datascience.stackexchange",
"id": 3820,
"lm_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, neural-network, deep-learning, dataset, cnn",
"url": null
} |
homework-and-exercises, electromagnetism, coulombs-law
a $E_y$ or $E_z$ component along the $x$-axis and impart the $z$ and $y$ rotations to see what happens to the system's description. You can soon prove that there can be no $E_y$ or $E_z$ because then the system's description would otherwise change after these half turns are imparted to it. | {
"domain": "physics.stackexchange",
"id": 9298,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism, coulombs-law",
"url": null
} |
quantum-field-theory, path-integral
Title: Funcional Integral in QFT I am reading Peskin and Schroeder's chapter on functional methods. They propose the amplitude:
$$
\langle \phi_b(\vec{x})|e^{-iHT}| \phi_a(\vec{x})\rangle
=
\int \mathcal{D}\phi\mathcal{D}\pi
\exp \bigg[
i\int_0^T \left(
\pi \dot\phi - \frac{1}{2}\pi^2 - \frac{1}{2} (\nabla\phi)^2-V(\phi)
\right) \bigg]
$$
They then said that we can complete the square and integrate over $\mathcal{D}\pi$ integral. How is this done?
I was able to complete the square: $\pi\dot\phi - \frac{1}{2} \pi^2=-\frac{1}{2}(\pi-\dot\phi)^2+\frac{1}{2}\dot\phi^2$ and rewrite the amplitude as:
$$
\langle \phi_b(\vec{x})|e^{-iHT}| \phi_a(\vec{x})\rangle
=
\int \mathcal{D}\phi
\exp \bigg[
i\int_0^T \left(
\frac{1}{2} \partial_\mu\phi\partial^\mu\phi-V(\phi)
\right) \bigg]
\int \mathcal{D}\pi \bigg[ -\frac{1}{2}i \int^T_0 (\pi-\dot\phi^2) \bigg]
$$
I am only confused about the functional integral (mathematically), how is it done? You do the following | {
"domain": "physics.stackexchange",
"id": 72646,
"lm_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",
"url": null
} |
The error is not because you simplified, it's because there is a mistake somewhere in your work after that. I can't tell you where exactly without seeing your work, but here's how it should go:
\begin{align*} x &= \frac{70 \pm \sqrt{(-70)^2 - 4(19)(-125)}}{2(19)}\\[0.3cm] &= \frac{70 \pm \sqrt{4900 + 9500}}{38}\\[0.3cm] &= \frac{70 \pm \sqrt{14400}}{38} \\[0.3cm] &= \frac{70 \pm 120}{38} \end{align*}
When simplified you get $x = 5$ and $x = -25/19$.
When to simplifying a quadratic is up to you. Remember, multiplying both sides by a number retains the equality, the same thing with adding, subtracting and dividing.
You could've left it the way it is, without simplifying, and you would have gotten the solution as it doesn't affect the roots.
It is for last equation :$$x=\frac { 35\pm \sqrt { { 35 }^{ 2 }+125\cdot 19 } }{ 19 } =\frac { 35\pm \sqrt { 3600 } }{ 19 } =\frac { 35\pm 60 }{ 19 }$$
But using $\frac{\sqrt{b^2-4ac}}{2a}$ in the reduced equation gives the same roots . | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9559813463747181,
"lm_q1q2_score": 0.8511046632184105,
"lm_q2_score": 0.8902942159342104,
"openwebmath_perplexity": 235.06836431886057,
"openwebmath_score": 0.9799789786338806,
"tags": null,
"url": "https://math.stackexchange.com/questions/1827223/when-to-simplify-a-quadratic-equation"
} |
general-relativity, lagrangian-formalism, differential-geometry, stress-energy-momentum-tensor, variational-calculus
$$ \omega_{\mu a b} = \tilde{\omega}_{\mu a b} + K_{\mu a b}$$
where $\tilde{\omega}_{\mu a b}$ the Levi-Civita connection and $K_{\mu a b}$ is the contortion tensor. $\tilde{\omega}_{\mu a b}$ depends on the dreibein and I know how this varies under $e_a^\mu$ but how does $K_{\mu a b}$ vary with respect to $e^\mu_a$? First of all, your action
$$
S = \int_M \mathrm{d}^{3+1}x |e| \frac{i}{2} ( \bar{\psi} \gamma^\mu D_\mu \psi - \overline{D_\mu \psi} \gamma^\mu \psi )
$$
is wrong. It should read
$$
S = \int_M \mathrm{d}^{3+1}x |e| \frac{i}{2} ( \bar{\psi} e^\mu_a\gamma^a D_\mu \psi - \overline{D_\mu \psi} e^\mu_a\gamma^a \psi ).
$$
And as for deriving the energy-momentum tensor, you should variate against spin connection $\omega_{\mu a b}$ and the tetrad $e$, independently. Follow these steps: | {
"domain": "physics.stackexchange",
"id": 62898,
"lm_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, lagrangian-formalism, differential-geometry, stress-energy-momentum-tensor, variational-calculus",
"url": null
} |
____________________________________________________________________
Monolithicity and Frechet-Urysohn property
As indicated at the beginning, the $\Sigma$-product $\Sigma(\omega_1)$ is monolithic (in fact strongly monolithic; see here) and is a Frechet-Urysohn space (see here). Thus the function space $C_p(\omega_1+1)$ is both strongly monolithic and Frechet-Urysohn.
Let $\tau$ be an infinite cardinal. A space $X$ is $\tau$-monolithic if for any $A \subset X$ with $\lvert A \lvert \le \tau$, we have $nw(\overline{A}) \le \tau$. A space $X$ is monolithic if it is $\tau$-monolithic for all infinite cardinal $\tau$. It is straightforward to show that $X$ is monolithic if and only of for every subspace $Y$ of $X$, the density of $Y$ equals to the network weight of $Y$, i.e., $d(Y)=nw(Y)$. A longer discussion of the definition of monolithicity is found here. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765563713599,
"lm_q1q2_score": 0.8405926301302505,
"lm_q2_score": 0.8577681013541611,
"openwebmath_perplexity": 251.470749248413,
"openwebmath_score": 0.999870777130127,
"tags": null,
"url": "https://dantopology.wordpress.com/category/compact-space/"
} |
php, beginner, object-oriented
Title: Phonebook - a small PHP project I'm new in PHP, MySQL and OOP, so I tried to write a small project to learn things better. The Pponebook should contains contacts which can be edited, deleted, added, sorted and it has pagination, too. Search is also available. This is my first project in PHP and I am using OOP for the first time, so I am sure that my code is complete mess.
Contact:
<?php
class Contact
{
private $name;
private $phone ;
private $address;
private $notes ;
private function isValid($var, $min_limit)
{
if(strlen(trim($var))>=$min_limit)
{
return true;
}
return false;
} | {
"domain": "codereview.stackexchange",
"id": 2061,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, beginner, object-oriented",
"url": null
} |
javascript, node.js
});
};
Note that async/await is just sugar syntax for promises. Few key things to remember when using it:
await "waits" for promises.
async functions return a promise.
Returned values from an async function resolves the promise it returns.
Thrown errors inside async rejects the promise it returns.
Nothing is wrong with chaining then in async/await, the syntax is perfectly legit. I often use it to inline some operations. However, it's usually not needed. If you're going async/await, go all-in with it.
This could be rewritten as:
active.mark_installed = mark_installed = async function(uuid) {
try {
const result = await ConsumerAccounts.findOne({_id: uuid})
return result.software_installed ? false : result.mark_installed(uuid)
} catch(error) {
}
}
active.ws_ping = async function(obj, cb) {
active.ping = async function(obj, cb) { | {
"domain": "codereview.stackexchange",
"id": 35183,
"lm_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, node.js",
"url": null
} |
metal
Title: Why does the cathode in an OLED require a low work function and the anode require a high work function? I am currently doing some research on organic light emitting diodes and am just trying to get my head around some of the terminology and concepts because I am more from the organic chemistry side don't have a strong material sciences/physics background.
My reading indicates that the work function is the amount of energy required to extract an electron from a material. Electrons are injected via the cathode and electrons are extracted from the anode (i.e hole injection)
I keep reading that for OLEDs, the cathode should have a low work function to match the energy of the LUMO of the electroluminescent layer, and the anode should have a high work function to match the HOMO. I've read this in many journals and review papers but none of them explain why. | {
"domain": "chemistry.stackexchange",
"id": 14945,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "metal",
"url": null
} |
quantum-mechanics
It should be possible to relax the smoothness condition using weak derivatives, but the situation does not seem to change remarkably.
Consider the anti-linear operator $(C\psi)(x):= \overline{\psi(-x)}$, the bar denoting the complex conjugation. It is norm preserving and $CC=I$, so it is a conjugation. It seems to me that $C\tilde{p}= \tilde{p}C$ with the domain I introduced above.
Therefore, in view of a theorem due to von Neumann, $\tilde{p}$ admits some self-adjoint extension. A careful analysis of the defect indices of $\tilde{p}$ would classify these extensions. Therefore we are not authorized to say that $\tilde{p}$ has the meaning of an observable, we have to choose a self-adjoint extension of it. Unfortunately, the spectrum depends on this choice. It is by no means obvious what the spectrum of a self-adjoint extension of $\tilde{p}$ is. | {
"domain": "physics.stackexchange",
"id": 11335,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics",
"url": null
} |
ros, diff-drive-controller
Originally posted by jarvisschultz with karma: 9031 on 2016-11-09
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by bluehash on 2016-11-09:
Thank you for the explanation!
It would be nice if the developer added that comment in... and also used brackets. | {
"domain": "robotics.stackexchange",
"id": 26190,
"lm_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, diff-drive-controller",
"url": null
} |
ros, rosservice, call-service, laser-assembler, pointcloud
Originally posted by ahendrix with karma: 47576 on 2014-10-21
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by ajain on 2014-10-21:
Okay. So if I subscribe to two different services for point_cloud2 from each assembler and then use pcl::concatenatePointCloud() to merge them, will it take care of assembling point clouds with closest timestamps and returning the merged point cloud with latest timestamp?
Comment by ahendrix on 2014-10-21:
It looks like you're trying to assemble only the most recent scan from each sensor into a composite cloud. Since the primary purpose of the laser assembler is to buffer and assemble multiple scans, it isn't really helping you here.
Comment by ahendrix on 2014-10-21:
It may be simpler to subscribe to the topics in question and assemble the scans yourself, using the source code for the laser scan assembler as inspiration. | {
"domain": "robotics.stackexchange",
"id": 19807,
"lm_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, rosservice, call-service, laser-assembler, pointcloud",
"url": null
} |
# Derivative of $\sqrt{x^TAx}$
Let $$x\in \mathbb{R}^n$$ and $$A\in\mathbb{R}^{n\times n}$$ be a positive semi-definite matrix.
Is there a way to express in closed form the following derivative?
$$\frac{\partial}{\partial x} \sqrt{x^TAx}$$
• In this context, are positive semidefinite matrices necessarily symmetric? Dec 7, 2020 at 15:47
• In any case, the answer will be $\frac{1}{2\sqrt{x^TAx}}(A + A^T)x$. Dec 7, 2020 at 15:48
• Thanks, Ben. If you post this as an answer I can close this thread and confirm the answer. It would be nice also if you can add some more information on the derivation. Dec 7, 2020 at 15:51 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771786365549,
"lm_q1q2_score": 0.8367552302912018,
"lm_q2_score": 0.8479677564567912,
"openwebmath_perplexity": 218.2181685892174,
"openwebmath_score": 0.9998688697814941,
"tags": null,
"url": "https://math.stackexchange.com/questions/3938624/derivative-of-sqrtxtax?noredirect=1"
} |
python, beginner, algorithm, object-oriented, complexity
def insert_in_beginning(self, data):
"""
Inserts an integer in the beginning of the linked list
"""
temp = Node(data)
temp.link = self.start
self.start = temp
def insert_at_end(self, data):
"""
Inserts an integer at the end of the linked list
"""
temp = Node(data)
if self.start is None:
self.start = temp
return
start = self.start
while start.link is not None:
start = start.link
start.link = temp
def insert_after(self, data, number):
"""
Inserts an integer after the x node
"""
start = self.start
while start is not None:
if start.info == number:
break
start = start.link | {
"domain": "codereview.stackexchange",
"id": 35742,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, algorithm, object-oriented, complexity",
"url": null
} |
tensor-calculus
Third Model: The metric tensor model + Einstein convention
I still don't have rigorous definition of what $A^{i}$ or $A_{i}$ mean much like the einstein summation model BUT we do know the following that given a metric tensor (as a rank 2 tensor) $g_{ij}$ that we have
$$ g_{ij}A^{i} = A_{j}$$
$$ g^{ij}A_{j} = A^{i} $$
This third model is the most interesting, we have literally that:
$$ g_{ij}A^{i} = \sum_{i=0}^{n}g_{ij}A^{i} = g_{0j}\alpha_0 + g_{1j}\alpha_1 \dots g_{nj}\alpha_n$$
But it's clear this is a different model as well, because of the following: | {
"domain": "physics.stackexchange",
"id": 60675,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tensor-calculus",
"url": null
} |
rust, iterator
This behavior is the same as that exhibited by a typical mechanical car odometer when limit == 10.
It can also be thought of as an N-digit counter with radix limit which adds with integer overflow.
Example Outputs
An odometer iterator with initial state [1,2,3] and limit = 4 should yield the following sequence:
[1, 2, 3] // First element yielded is the initial state
[1, 3, 0] // least significant digit rolls over here at `limit - 1 = 4`
[1, 3, 1]
[1, 3, 2]
[1, 3, 3]
[2, 0, 0] // digit 1 and 2 both roll over here
[2, 0, 1]
[2, 0, 2]
[2, 0, 3]
[2, 1, 0]
[2, 1, 1]
[2, 1, 2]
[2, 1, 3]
[2, 2, 0]
[2, 2, 1]
[2, 2, 2]
[2, 2, 3]
[2, 3, 0]
[2, 3, 1]
[2, 3, 2]
[2, 3, 3]
[3, 0, 0] // digit 1 and 2 both roll over here again
[3, 0, 1]
[3, 0, 2]
[3, 0, 3]
[3, 1, 0]
[3, 1, 1]
[3, 1, 2]
[3, 1, 3]
[3, 2, 0]
[3, 2, 1]
[3, 2, 2]
[3, 2, 3]
[3, 3, 0]
[3, 3, 1]
[3, 3, 2]
[3, 3, 3] // All three digits roll over after this element so iteration stops. | {
"domain": "codereview.stackexchange",
"id": 45409,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rust, iterator",
"url": null
} |
result was the 60% figure. 5 chance for heads. If we consider all possible outcomes of the toss of two coins as shown, there is only one outcome …. The 1 head, or 2 heads turn up. When we flip a coin there is always a probability to get a head or a tail is 50 percent. But since there are 6 ways to get 2 heads, in four flips the probability of two heads is greater than that of any other result. Keep in mind that those are just estimates though; you may get 90 heads and 10 tails in your 100 tosses, which would not yield the probability of 0. Although which game you must play will be chosen randomly, then you may decide whether to toss the coin 20 times or 50 times. 1134 probability of getting exactly 2 heads given that there were at least 2 heads in the 8 tosses. This can be interpreted as the average number of heads per sequence of 3 tosses if the experiment is repeated a large. • Random variable: a random numerical outcome. This is the Solution of Question From RD SHARMA book of CLASS | {
"domain": "fleckundzimmermann.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9884918495796061,
"lm_q1q2_score": 0.8149738923801968,
"lm_q2_score": 0.8244619242200081,
"openwebmath_perplexity": 198.6753487030207,
"openwebmath_score": 0.8667263984680176,
"tags": null,
"url": "http://fleckundzimmermann.de/probability-of-getting-2-heads-in-5-tosses.html"
} |
Example $$\PageIndex{3}$$: Applying the Direct Comparison Test
Determine the convergence of $$\sum\limits_{n=1}^\infty \dfrac1{3^n+n^2}$$.
SOLUTION
This series is neither a geometric or $$p$$-series, but seems related. We predict it will converge, so we look for a series with larger terms that converges. (Note too that the Integral Test seems difficult to apply here.)
Since $$3^n < 3^n+n^2$$, $$\dfrac1{3^n}> \dfrac1{3^n+n^2}$$ for all $$n\geq1$$. The series $$\sum\limits_{n=1}^\infty \dfrac{1}{3^n}$$ is a convergent geometric series; by Theorem 66, $$\sum\limits_{n=1}^\infty \dfrac1{3^n+n^2}$$ converges.
Example $$\PageIndex{4}$$: Applying the Direct Comparison Test
Determine the convergence of $$\sum\limits_{n=1}^\infty \dfrac{1}{n-\ln n}$$.
SOLUTION
We know the Harmonic Series $$\sum\limits_{n=1}^\infty \dfrac1n$$ diverges, and it seems that the given series is closely related to it, hence we predict it will diverge. | {
"domain": "libretexts.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474913588877,
"lm_q1q2_score": 0.804208246195291,
"lm_q2_score": 0.8128673223709251,
"openwebmath_perplexity": 334.1752304722175,
"openwebmath_score": 0.9928606748580933,
"tags": null,
"url": "https://math.libretexts.org/TextMaps/Calculus/Book%3A_Calculus_(Apex)/8%3A_Sequences_and_Series/8.3%3A_Integral_and_Comparison_Tests"
} |
c++, strings
Or as mentioned before, you could have a generic base that uses different functions in the std::transform() call. The generic base would basically be what's above, and then UpperCasePolicy will derive from GenericCasePolicy<ToUpper>, and the entire class body will just be a using directive for the constructor that takes the function object.
Note that using compile-time polymorphism allows flexibility in the types and calling conventions. We can declare functions noexcept or constexpr and get benefits from that. We can use different types for the chunk_type, and include as much information as you want. Also, rather than returning a chunk_type and the iterator, you might instead return a chunk struct that has all the info about the chunk including the iterator range. So the signature of transform_chunk could just be std::tuple<OutputIterator, InputIterator> transform_chunk(chunk, OutputIterator);, and transform_text() might be as simple as this: | {
"domain": "codereview.stackexchange",
"id": 31204,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, strings",
"url": null
} |
ros, ik, arm-navigation
Original comments
Comment by Rosen Diankov on 2012-02-02:
check to see if your STL file is binary. if it is, the first 5 letters cannot be 'solid'
Comment by Fei Liu on 2012-02-02:
Hi, Sefan, Thank you for your detailed explanation. I almost go through everything you suggest. I have a problem in using the mesh for my manipulator, I got "failed to load resource package://cob_description/ros/meshes/arm_v0/arm2.stl" when I try to generate urdf to collada. How you run your mesh?
Comment by Rosen Diankov on 2012-02-01:
Hi Stefan, excellent answer! In openrave changes a couple of hours ago, we increased the katana arm ik success rate by 15%. Also, you can bring in all of openrave to your shell by adding the following (recommended) line: source rospack find openrave/openrave_svn/openrave.bash rospack find openrave
Comment by mirsking on 2014-10-02: | {
"domain": "robotics.stackexchange",
"id": 8073,
"lm_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, ik, arm-navigation",
"url": null
} |
java, unit-testing, file-system
@Test
public void should_find_5_of_5_duplicates() throws IOException {
String content = "blah";
File file1 = createTempFileWithContent(content);
File file2 = createTempFileWithContent(content);
File file3 = createTempFileWithContent(content);
File file4 = createTempFileWithContent(content);
File file5 = createTempFileWithContent(content);
List<File> files = Arrays.asList(file1, file2, file3, file4, file5);
Set<Set<File>> duplicates = Collections.singleton(toSet(file1, file2, file3, file4, file5));
assertEquals(duplicates, duplicateFileFinder.findDuplicates(files));
}
@Test
public void should_find_2_of_3_duplicates() throws IOException {
String content = "blah";
String differentContent = "balm";
File file1 = createTempFileWithContent(content);
File file2 = createTempFileWithContent(content);
File file3 = createTempFileWithContent(differentContent); | {
"domain": "codereview.stackexchange",
"id": 44978,
"lm_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, unit-testing, file-system",
"url": null
} |
### Example 3.
Given two points in cylindrical coordinates $$A\left({3,\frac{\pi}{2},4}\right)$$ and $$B\left({1,\frac{3\pi}{2},7}\right)$$ find the distance between them.
Solution.
Let's convert the cylindrical coordinates of the points to Cartesian ones:
$x_A = \rho\cos\varphi = 3\cos\frac{\pi}{2} = 3\cdot0 = 0,\;\;y_A = \rho\sin\varphi = 3\sin\frac{\pi}{2} = 3\cdot1 = 3,\;\;z_A = 4;$
$x_B = \rho\cos\varphi = 1\cos\frac{3\pi}{2} = 1\cdot0 = 0,\;\;y_B = \rho\sin\varphi = 1\sin\frac{3\pi}{2} = 1\cdot\left({-1}\right) = -1,\;\;z_B = 7.$
Hence points $$A$$ and $$B$$ have the following coordinates $$x,y,z:$$
$A\left({0,3,4}\right) \text{ and } B\left({0,-1,7}\right).$
Now you can easily calculate the distance between these points:
$d\left({AB}\right) = \sqrt{\left({x_B - x_A}\right)^2 + \left({y_B - y_A}\right)^2 + \left({z_B - z_A}\right)^2} = \sqrt{\left({0 - 0}\right)^2 + \left({-1 - 3}\right)^2 + \left({7 - 4}\right)^2} = \sqrt{0 + 16 + 9} = \sqrt{25} = 5.$
### Example 4. | {
"domain": "math24.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.991554371311859,
"lm_q1q2_score": 0.8152452242540722,
"lm_q2_score": 0.8221891283434877,
"openwebmath_perplexity": 445.35461634896535,
"openwebmath_score": 0.9321155548095703,
"tags": null,
"url": "https://math24.net/cylindrical-coordinates.html"
} |
species-identification, entomology
Title: Help me identify the following insect This is my first post in this forum. I found the following insect at my kitchen in my apartment in Kolkata, India. Could you please help me identify the insect.
Thank you.
Best regards,
Saugata Might be a red palm weevil
Rhynchophorus ferrugineus
https://en.m.wikipedia.org/wiki/Rhynchophorus | {
"domain": "biology.stackexchange",
"id": 8373,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "species-identification, entomology",
"url": null
} |
I realized, that this is isochoric process. It can not be found on the table fixated @ final v = 1.6959 m3/kg which remains as is, no matter what. Assuming water vapor behaves an ideal gas above regions of the saturated vapor curve, we can find T using PV =mRT or T = PV/mR; where R- is specific gas constant of water of course. This holds true unless, you rebutted.
Do you have problem with this?
It's not so essential to prove your point. Let's just cut the chase, okay with you?
Well, we said we were going to do it strictly by using your steam tables (to make sure I'm not trying to pull a fast one). Later, we can compare with the ideal gas law, but, for now I'd like to stick with the steam tables. Besides, if you assume an ideal gas, you still will have to deal with the problem of determining the internal energy and the enthalpy at the final state. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9553191348157372,
"lm_q1q2_score": 0.8265651336092777,
"lm_q2_score": 0.8652240947405564,
"openwebmath_perplexity": 1027.876941015103,
"openwebmath_score": 0.6364243626594543,
"tags": null,
"url": "https://www.physicsforums.com/threads/when-is-dh-du.856385/page-2"
} |
c++, graph
template <typename T>
class Hist2D
{
public:
//histogram can be aligned in a variety of ways
enum class Alignment {
Front, Back, AtMax, ByX
};
//the defaults for Hist2D constructor are based on x varying from 0 to 23 hours and y varying from 0 to 25 (ranking, predetermined range from webscraping parameters)
Hist2D(int xBins=26, int yBins=28, double xMin = -.1, double xMax = 24, double yMin = -.1, double yMax = 25.1) :
m_xBins(xBins), m_yBins(yBins), m_xMin(xMin), m_xMax(xMax), m_yMin(yMin), m_yMax(yMax), m_xVals(xBins+1), m_yVals(yBins+1), m_matrixCount(boost::extents[yBins][xBins])
{
//all bins start counting from zero
std::fill(m_matrixCount.origin(), m_matrixCount.origin() + m_matrixCount.size(), 0); | {
"domain": "codereview.stackexchange",
"id": 15135,
"lm_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++, graph",
"url": null
} |
species-identification, microbiology, microscopy, protozoa
Image source: MicrobeWiki (originally from Haw River Program)
Fun fact from Wikipedia:
The stalk is made up of the spasmoneme [also called "myoneme" above], a contractile organelle, with rigid rod filaments, batonnets, surrounding it. The coiled spasmoneme and batonnets serve as a molecular spring, so that Vorticella can contract. The cell body can move hundreds of micrometers in milliseconds. The spasmoneme is said to have higher specific power than the engine of the average car. | {
"domain": "biology.stackexchange",
"id": 11079,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "species-identification, microbiology, microscopy, protozoa",
"url": null
} |
python, deep-learning, keras
Final thought - when you say the values are different each time you run the model cell, are you deleting/overwriting the model you already trained? If you are running the model cell on existing model/weight values then that's the same as training for more epochs and would usually have a large impact on your results. | {
"domain": "datascience.stackexchange",
"id": 3659,
"lm_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, deep-learning, keras",
"url": null
} |
solid-mechanics
$$ρ=\frac{2(1+ν)GI}{M}$$
So increasing $G$ (or $E$) will increase the radius of curvature. The larger the radius of curvature the less the vertical deflection. This agrees with intuition that the stiffer the material (greater $E$ or $G$), the less the deflection. So your observation that an increase in shear modulus increased vertical displacement would not be consistent if the material were isotropic. Perhaps, however, your observation is correct for an orthotropic material, but as I said I am not familiar with the analysis of orthotropic materials.
(2) What is the difference between vertical deflection, vertical deformation, and vertical displacement? I thought the former 2 were the same, and the latter is a quantitative measurement of the former 2? | {
"domain": "physics.stackexchange",
"id": 56045,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "solid-mechanics",
"url": null
} |
electromagnetism, general-relativity, special-relativity, tensor-calculus
$$
requires a factor of $4$ in the expression for $\phi$ because the
components of both tensors enter twice
$$
\phi=\left\langle \mathfrak{F},\Delta\mathfrak{x}\wedge\delta\mathfrak{x}\right\rangle =\left\langle \mathfrak{F},\mathfrak{S}\right\rangle =4\left(E^{1}S^{10}+E^{2}S^{20}+E^{3}S^{30}+B^{1}S^{23}+B^{2}S^{31}+B^{3}S^{12}\right).
$$
We may also write $\phi$ in the bad-old tensor form
$$
\phi=S^{\mu\nu}F_{\mu\nu}.
$$
But, as I say, even if I have the symbol manipulation correct, I don't understand the result. Will someone please explain this to me?
Image added, ex post facto to facilitate understanding of the accepted answer. It is from MTW Box 15.1-B. | {
"domain": "physics.stackexchange",
"id": 54371,
"lm_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, general-relativity, special-relativity, tensor-calculus",
"url": null
} |
java, console, formatting
// Loop through
for (int i = 0; i < numLines; i++) {
if (i == xPosition) {
System.out.print(sign);
} else {
System.out.print(filler);
}
}
}
// Prints the other lines
private static void printOtherLines(int numLines, int positionOne,
int positionTwo, char sign, char fill) {
int i = 0;
// Loop through
while (i < numLines) {
if (i == positionOne || i == positionTwo) {
System.out.print(sign);
} else {
System.out.print(fill);
}
i++;
}
}
// Draw the diamond to the console
public static void drawDiamond( int numLines, char sign, char fill )
{
// Diamonds can only be created for odd numbers
if( numLines % 2 != 0 )
{
boolean limitReached = false;
int halfWayPointMinus = numLines / 2 - 1;
int halfWayPointPlus = numLines / 2 + 1; | {
"domain": "codereview.stackexchange",
"id": 4576,
"lm_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, console, formatting",
"url": null
} |
c#, performance, animation, circular-list
while (true)
{
var offset = calcOffset(text.Length);
var left = span.Slice(0, offset);
var right = span.Slice(offset, text.Length - offset);
yield return (right, left);
}
} | {
"domain": "codereview.stackexchange",
"id": 32126,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, animation, circular-list",
"url": null
} |
c++, beginner
integer.add_number_changed_listener(IntegerListener(
[](int oldNum, int newNum) {
std::cout << "changed(from 2listener): (" << oldNum << ") -> (" << newNum << ")" << std::endl;
},
[](int increasedValue) {
std::cout << "increased by(from 2listener): (" << increasedValue << ")" << std::endl;
}));
std::cout << "first call: \n";
integer.set_number(2);
std::cout << "second call: \n";
integer.set_number(1);
} There’s actually quite a bit you can do to simplify the listener class, while at the same time making it easier and more flexible to use!
Let’s start with deleting the default constructor: you actually don’t need to do this. Classes get an automatically-generated default constructor only if there are no other constructors defined. But in your class, there is another constructor defined! So the default constructor is already deleted.
See for yourself! Try this: | {
"domain": "codereview.stackexchange",
"id": 38793,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner",
"url": null
} |
human-biology, proteins, energy, energy-metabolism
https://en.wikipedia.org/wiki/Adenosine_triphosphate
This small molecule has three phosphate groups, hence the name, and energy is released when one or two of those are separated from the molecule (creating ADP or AMP, Adenosine Diphosphate and Adenosine Monophosphate). This energy is what thermodynamically allows most endergonic reactions in the organism. The phosphate groups can then easily be added back, recycling the components back to ATP. This mediator, "currency" allows energy to be transferred from chemical reaction to chemical reaction: a reaction that "creates energy for the cell" really regenerates ATP, which goes wherever and is broken down in reactions that "use energy".
See for example this textbook describing how the breakdown of carbohydrates produces ATP:
https://opentextbc.ca/anatomyandphysiology/chapter/24-2-carbohydrate-metabolism/ | {
"domain": "biology.stackexchange",
"id": 10634,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, proteins, energy, energy-metabolism",
"url": null
} |
ros, gazebo, gripper, turtlebot-arm, arm-controller
[INFO] [WallTime: 1422289543.646707] [104.150000] Started controllers: joint_state_controller, gripper_joint, arm_controller
process[move_group-20]: started with pid [3501]
[ WARN] [1422289543.848301993, 104.300000000]: Gazebo ROS Kobuki plugin: NaN in d1. Step time: 0.01, WD: 0.07, velocity: -nan
[ WARN] [1422289543.849198941, 104.300000000]: Gazebo ROS Kobuki plugin: NaN in d2. Step time: 0.01, WD: 0.07, velocity: -nan
Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "base_footprint" from authority "unknown_publisher" because of a nan value in the transform (218.... | {
"domain": "robotics.stackexchange",
"id": 20667,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, gazebo, gripper, turtlebot-arm, arm-controller",
"url": null
} |
# 2048: How Many Fours?
### Problem
You have just completed a game of 2048, and you want to know what percentage of initial tiles were fours. How can you do so?
### Rules
First, the rules of 2048. In its basic form, this app consists of a 4×4 grid containing some tiles. On a turn, the user slides one of the four cardinal directions, and all tiles move until they have to stop. Tiles stop when they meet a wall or another tile; if two meeting tiles have the same number, they merge, and their new label is the sum of their tiles (that is, the next higher power of 2). Then the app randomly places a new 2 or 4 tile (what I’ll call an initial tile) somewhere in an empty cell. As the name suggests, the goal is to create a tile with 2048 on it (which is done by merging to 1024 tiles); the game is lost if you fill the grid and can’t merge any more cells. Whenever you merge two cells, you get the number of points equal to their sum, but you don’t get points for the initial tiles.
### Solution | {
"domain": "cliocorvid.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.990140142659816,
"lm_q1q2_score": 0.8251081398320371,
"lm_q2_score": 0.8333246015211009,
"openwebmath_perplexity": 460.4390363061422,
"openwebmath_score": 0.48323655128479004,
"tags": null,
"url": "https://cliocorvid.com/mathematics/other-mathematics/2048-how-many-fours/"
} |
results but i am not convinced that my code is a good code and i feel that its a very naive way of writing a 2*2 matrix multiplication program. Unlike general multiplication, matrix multiplication is not commutative. So first thing we need to check is if these matrices are compatible if we can multiply them together. Show that matrix multiplication is associative. CS 466: Transitive Closure vis-µa-vis Matrix Multiplication Arash Farzan September 23, 2008 In this lecture, we build on the Strassen method and see how problems are reduced to one another. This forum may not be the best place for a discussion of the many issues involved in performance number-crunching, but I'd very much appreciate comments, suggestions, etc. We call the constant a scalar, so officially this is called "scalar multiplication". For this algorithm to work efficiently, the number of rows and columns of consecutive matrices should be equivalent. C / C++ Forums on Bytes. On this page you can see many examples of | {
"domain": "iwno.pw",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9871787849789999,
"lm_q1q2_score": 0.8268806536759855,
"lm_q2_score": 0.837619959279793,
"openwebmath_perplexity": 485.57044798572787,
"openwebmath_score": 0.7652763724327087,
"tags": null,
"url": "http://kxmr.iwno.pw/matrix-multiplication-problem.html"
} |
experimental-physics, measurements, probability, instrument
In 2019, the kilogram was fixed based on universal constants, rather than a physical object. There were actually several separate efforts to define the kilogram in this way. The most famous are those of the Kibble Balance, balancing mass, voltage, and current, and the efforts of the Avagadro Project, which sought to balance mass and avagadro's constant (a count of how many atoms there are in an object). These approaches were completely unrelated. The kilogram was fixed in 2019, mostly in response to these two methods yielding consistent results out to 8 digits. This was a more consistent pair of values than the measurements of the IPK itself were, so we blessed them as "the kilogram." | {
"domain": "physics.stackexchange",
"id": 61494,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, measurements, probability, instrument",
"url": null
} |
ros, gentoo
changing mode of /usr/bin/rosws to 755
changing mode of /usr/bin/roslocate to 755
changing mode of /usr/bin/rosco to 755
changing mode of /usr/bin/rosinstall to 755
Found existing installation: vcstools 0.1.15
Uninstalling vcstools:
Successfully uninstalled vcstools
Running setup.py install for vcstools
File "/usr/lib64/python3.2/site-packages/vcstools/git.py", line 233
print "vcstools refusing to move away from dangling commit, to protect your work."
^
SyntaxError: invalid syntax
File "/usr/lib64/python3.2/site-packages/vcstools/vcs_base.py", line 194
raise NotImplementedError, "Base class get_version method must be overridden"
^
SyntaxError: invalid syntax | {
"domain": "robotics.stackexchange",
"id": 9018,
"lm_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, gentoo",
"url": null
} |
when the interval of convergence for a Taylor The Maclaurin series was the Taylor series diverges at x if the distance between x and b is larger than the radius of convergence. 9. This must be the Maclaurin series of tan. 4. Review of Taylor/Maclaurin Series Since the limit goes to 0, the expression is true for all T, i. Then substitute them into the general formula shown above. Example 49: Find the Maclaurin series of the function ? 푥 =? 푥 and its radius of convergence. Consider the power series P xn/np, where p is a real number. Finding Maclaurin Series. A power series is an infinite series . P(x) = C0 + C1(x - a) + C2(x - a)2 + 21 Apr 2018 Let's first find the Maclaurin series expansion for sinhx : f(x)=sinhx=ex−e−x2,f(0)= e0−e02=0. on the intersection of their intervals of convergence. (b) The power series P xn/nn has radius of convergence ∞. Power, Taylor, and Maclaurin Series Survival Guide One of the harder concepts that we have to become comfortable with during this semester is | {
"domain": "cpxlt.cn",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9923043544146899,
"lm_q1q2_score": 0.8353472495190016,
"lm_q2_score": 0.8418256412990657,
"openwebmath_perplexity": 299.1305186664839,
"openwebmath_score": 0.9300989508628845,
"tags": null,
"url": "http://cpxlt.cn/b5g/maclaurin-series-convergence.html"
} |
two-way table summarizing data on two categorical variables collected from the same subjects. If this page is mystical to you return to the previous page for an explanation of the notation and issue. association schemes and describe their structure. Associative definition is - of or relating to association especially of ideas or images. Associations can be described as a "has-a" relationship because the typical implementation in Java is through the use of an instance field. Composition and Aggregation are the two forms of association. The above examples indicate that changing the grouping doesn't make any changes to the answer. As a continuation of the National Association of Math Circles, mathcircles.org aims to nurture the growth of Math Circles nationwide by building a community of Math Circle leaders in which new and established leaders are connected, encouraged, and inspired. No relationship your Math skills with this basic Math practice test with addition, substraction | {
"domain": "driveyourself.nl",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9736446440948805,
"lm_q1q2_score": 0.8049235188208602,
"lm_q2_score": 0.8267118026095991,
"openwebmath_perplexity": 1763.0172602945775,
"openwebmath_score": 0.4765132963657379,
"tags": null,
"url": "http://driveyourself.nl/uwn1jl4/a7bc64-association-examples-math"
} |
electromagnetism, general-relativity, black-holes, resource-recommendations, kerr-newman-metric
Title: Electromagnetic four-potential for Kerr-Newman solution Any textbook or paper on the Kerr-Newman metric I found contains the solution for the electromagnetic tensor $
F^{\mu}_{\phantom{\mu} \nu}$.
Can you provide a (reliable) reference for the solution of electromagnetic four-potential $A_{\mu}$ (the derivation is not necessary)? I found the potential at the following paper -
Furuhashi, Hironobu, and Yasusada Nambu. "Instability of massive scalar fields in Kerr-Newman spacetime." Progress of theoretical physics 112.6 (2004): 983-995.
Also appear in "Black Hole Physics" by Frolov & Novikov (1997), Appendix D.
The expression (in natural units, Boyer-Lindquist coordinates) is -
$$\boxed{\vec{A}={rQ \over r^2+a^2\cos^2{\theta}}\left(-1,0,0,a\sin^2{\theta}\right)}$$
where $a$ is angular momentum per unit mass and $Q$ is the charge of the BH. | {
"domain": "physics.stackexchange",
"id": 28977,
"lm_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, general-relativity, black-holes, resource-recommendations, kerr-newman-metric",
"url": null
} |
computability, time-complexity
Title: Are there decision problems outside of NP? Consider any problem in NP-hard, then it has a polynomial reduction from a problem in NP in polynomial time. Though, it isn't clear by this definition whether there are decision problems in NP-hard that are not in NP.
Are there any known ones? The nondeterministic time hierarchy theorem shows that, e.g., $\mathrm{NP}\subsetneq\mathrm{NEXP}$, so any $\mathrm{NEXP}$-complete problem is $\mathrm{NP}$-hard but not in $\mathrm{NP}$. For a more extreme example, the halting problem is $\mathrm{NP}$-hard but not in $\mathrm{NP}$. | {
"domain": "cs.stackexchange",
"id": 13467,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computability, time-complexity",
"url": null
} |
c#, object-oriented, .net, parsing, math-expression-eval
charBuffer.Append(token);
lastExpressionWasCompound = true;
lastType = currentType;
continue;
}
if (lastExpressionWasCompound)
{
listOfParsedExpressions.Add(charBuffer.ToString());
listOfParsedTypes.Add(lastType);
charBuffer.Clear();
lastExpressionWasCompound = false;
}
if (currentType == ParsedSubstringType.Invalid && SkipInvalidChars)
{
continue;
}
listOfParsedTypes.Add(currentType);
String parsedExpression = currentType == ParsedSubstringType.WhiteSpace ? String.Empty : token.ToString();
listOfParsedExpressions.Add(parsedExpression);
}
if (charBuffer.Length > 0)
{
listOfParsedExpressions.Add(charBuffer.ToString());
listOfParsedTypes.Add(lastType);
}
}
ParserHelper
Setting aside what already been said about the tenary method. | {
"domain": "codereview.stackexchange",
"id": 34620,
"lm_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, .net, parsing, math-expression-eval",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.