text stringlengths 1 1.11k | source dict |
|---|---|
moveit, octomap
Title: Decay Octomap in MoveIt?
Hey guys,
Is there a way to automatically "decay" the octomap somehow in MoveIt? I have the problem that sometimes obstacles don't get deleted, because the obstacle moved towards the sensor, casting a shadow on the previously occupied space and therefore preventing it from realizing the space is now free.
If any information older than x in the octomap would get deleted, this problem could be prevented. Is there already an option implemented to do this? Or am I on the wrong path and there is another solution to this problem?
Thanks in advance,
Rabe
Originally posted by Rabe on ROS Answers with karma: 683 on 2014-07-04
Post score: 1
There is an OcTreeStamped class in OctoMap that can be used for this purpose (but you will have to implement it). In fact, the decaying was implemented just like that in the collider package (by now superseded by MoveIt and octomap_server). | {
"domain": "robotics.stackexchange",
"id": 18519,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "moveit, octomap",
"url": null
} |
complexity-theory, computer-architecture
Wozniak's epiphany was realizing that you could take a $25 microprocessor and turn it into a real computer. Apple Inc. is now valued a bit over 700 billion dollars, a direct consequence of Wozniak's realisation, so this was a kind of important event.
Not that it has much to do with computer science, except that eventually it put computers into everyone's hands. | {
"domain": "cs.stackexchange",
"id": 8574,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, computer-architecture",
"url": null
} |
electromagnetism, electric-current, biophysics, biology
(The course page was taken down, but it's still at the Wayback Machine): https://web.archive.org/web/20160402080329/https://www.centenary.edu/attachments/biophysics/bphy304/11a.pdf
This is the (passive) network model proposed for transmission of signal between nodes in myelinated nerves: | {
"domain": "physics.stackexchange",
"id": 11126,
"lm_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, electric-current, biophysics, biology",
"url": null
} |
Example 7b: Find the velocity and position equations for a downward acceleration of 9.8 m/sec 2 and an initial velocity of 1 m/sec downward. Velocity is the anti-derivative of acceleration
Example 7b: Find the velocity and position equations for a downward acceleration of 9.8 m/sec 2 and an initial velocity of 1 m/sec downward. Since velocity is the derivative of position, position must be the antiderivative of velocity. The power rule in reverse: Increase the exponent by one and multiply by the reciprocal of the new exponent.
Example 7b: Find the velocity and position equations for a downward acceleration of 9.8 m/sec 2 and an initial velocity of 1 m/sec downward. The initial position is zero at time zero. | {
"domain": "slideplayer.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105266327962,
"lm_q1q2_score": 0.8049308617403486,
"lm_q2_score": 0.8244619306896955,
"openwebmath_perplexity": 273.158497736386,
"openwebmath_score": 0.8384703397750854,
"tags": null,
"url": "http://slideplayer.com/slide/4184206/"
} |
general-relativity
I don't understand. How it's possible to mangle trajectory and coordinate system in that way that movement of a particle looks rectilinear even if it's totally not?
Look at the picture:
Movement of second particle is clearly non-rectilinear, how any trajectory may be stipulated so the movement of second particle could be rectilinear? As an example, consider an exponential curve, $e^x$. This is not linear, right?
If I plot it on a graph with the y-axis scaled logarithmically, it can be plotted as a straight line.
In the case of your P2, you can use a linear y-axis, but locally contract and expand the x-axis as necessary to produce a straight line. Would anybody in their right mind do this? Probably not, but that's not the point - you could do it. | {
"domain": "physics.stackexchange",
"id": 22979,
"lm_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",
"url": null
} |
logspace, circuit-depth
Title: What circuit depth is enough to compute a log-space complete problem? To the best of my knowledge it is unknown that $\mathsf{L}$ is subset of $\mathsf{NC}^1$.
(Here $\mathsf{NC}^1$ is the class of decision problems solvable by a family of Boolean circuits, with polynomial size, logarithmic depth , and bounded fan-in;
$\mathsf{L}$ is the class of decision problems solvable by a Turing machine restricted to use an amount of memory logarithmic in the size of the input.)
Let reduce restriction in the definition of $\mathsf{NC}^1$: assume we allow size, say $n^{O(\log \log n)}$ and depth $O(\log n \log \log n)$. Can we solve any problem in $\mathsf{L}$ by such circuits?
Are there any natural conjectures about it? It seems that nobody has added to the discussion of this question since February.
I'm quite sure that no better depth upper bound is known for L than $\log^2 n$, in the bounded fan-in circuit model, even with no size restriction. | {
"domain": "cstheory.stackexchange",
"id": 5690,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "logspace, circuit-depth",
"url": null
} |
notation
$\ce{H2 + Br2 <=> 2 HBr}\quad$ equilibrium
The two-sided arrow $\ce{<->}$ should not be used
for reactions to avoid confusion with resonance structures [...]
2.12.1 Other symbols, terms, and conventions used in chemical kinetics
[...]
(ii) Composite mechanisms
A reaction that involves more than one elementary reaction is said to occur by a composite mechanism. The terms complex mechanism, indirect mechanism, and stepwise mechanism are also commonly used. Special types of mechanisms include chain-reaction mechanisms, catalytic reaction mechanisms, etc. | {
"domain": "chemistry.stackexchange",
"id": 9248,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "notation",
"url": null
} |
particle-physics, standard-model, feynman-diagrams
Nevertheless, they will end up as hadrons, so you may do crude counting estimates and get an impression of the relative hadronic and leptonic cross sections involved at a given energy, etc. (LEP physics).
Feynman diagrams are also relatively simple to infer in weak interactions where the effective coupling is even weaker than EM, and flavors change in the signature ways the weak interactions restrict them to.
But when it comes to pure hadronic interactions, Feynman diagrams are only meaningful for small couplings, i.e. very "hard", energetic interactions of quarks and gluons, describable by perturbative QCD. One then utilizes a front-interface technology (structure functions, etc..) to account for the hadronization of these colored QCD pieces. | {
"domain": "physics.stackexchange",
"id": 65350,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, standard-model, feynman-diagrams",
"url": null
} |
(Also why do my LaTeX expressions look funny)
Thanks for the help
Related Differential Equations News on Phys.org
HallsofIvy
Homework Helper
Since y itself does not appear in that equation, there is a pretty standard method. Let u= y'. Then the equation becomes x2u'+ xu= 0 which is separable:
x2u'= -xu or (1/u)du= -(1/x)dx. Integrating, ln(u)= -ln(x)+ C or dy/dx= u= c/x (where c= eC) dy= (c/x)dx gives y= cln(x)+ D.
This also happens to be an "Euler-type" or "equi-potential" equation- the power of x in each term is equal to the order of the derivative. The change of variable, u= ln(x), so that x= eu, makes that an equation with constant coefficients: dy/dx= (dy/du)(du/dx)= (1/x)dy/du and d2y/dx2= d/dx(dy/dx)= d/dx((1/x)dy/du)= (1/x)d/du((1/x)dy/du)= (1/x)((1/x)d2y/du2)-(1/x2dy/dx.
The equation becomes d2y/dx2- dy/du+ dy/du= d2/du2= 0. Integrating once y'(u)= C. Integrating again y(u)= Cu+ D. Since u= ln(x), y(x)= Cln(x)+ D. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147197717785,
"lm_q1q2_score": 0.8284514451847963,
"lm_q2_score": 0.8519528019683106,
"openwebmath_perplexity": 1568.5958589663815,
"openwebmath_score": 0.8243198394775391,
"tags": null,
"url": "https://www.physicsforums.com/threads/having-trouble-with-this-deq.294621/"
} |
#### Lipschitz Continuity and Boundedness
So now it is to calculate the quadratic surrogate function if we know the parameter $L$. For twice continuous differentiable Lipschitz continuous function ($C_L^{1,1}(\mathbb R^n)$), $L$ is given by the upperbound of the notm of Hessian. The theorem is well-stated in Notes 6, and now we give a proof to it.
##### Proof
We use a very similar trick as the proof of Descent Lemma. | {
"domain": "zhuyi.fan",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401423688665,
"lm_q1q2_score": 0.8000997835824437,
"lm_q2_score": 0.8080672112416737,
"openwebmath_perplexity": 513.060857223317,
"openwebmath_score": 0.989271879196167,
"tags": null,
"url": "https://zhuyi.fan/post/selected-topics-on-gradient-descent-method.html"
} |
filter-design, stft, finite-impulse-response, approximation, hilbert-transform
In all those cases you have two filters whose phase frequency responses have a phase difference of exactly or close to 90 degrees over the desired frequency band.
If the filter outputs are used "in quadrature" (summed, with the other multiplied by the imaginary unit) to create an analytic signal, any phase frequency response ripple will become magnitude frequency response ripple of the composite negative frequency removal filter. | {
"domain": "dsp.stackexchange",
"id": 3688,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filter-design, stft, finite-impulse-response, approximation, hilbert-transform",
"url": null
} |
crystal-structure, solid-state-chemistry
From http://www.physics-in-a-nutshell.com/article/4/lattice-basis-and-crystal "A lattice is in general defined as a discrete but infinite regular arrangement of points (lattice sites) in a vector space". Notice how this says nothing about atoms, molecules or ions; it is purely a regular layout of points in space. We define the atoms and their positions via the basis . This is simply a list of species types and their positions relative to an arbitrary origin. We then associate the basis with the lattice points, that is we use the lattice points as the origin for the basis, and as we have a crystal (and so translational symmetry) every lattice point is associated with the same basis. Thus to define a crystal structure | {
"domain": "chemistry.stackexchange",
"id": 9937,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "crystal-structure, solid-state-chemistry",
"url": null
} |
c#
Title: Class simulating a circuit pin This class is the first of an open source project I just (a couple of days ago) started. The projects is meant to simulate circuits (logic gates and stuff) and this class is meant to manage pins. I'm developing everything following the Observer design pattern.
Could you take a look at the code and tell me anything you see that is wrong or could be better? I mean anything: readability issues, naming, comments, indentation, you name it.
/// <summary>
/// A pin used in the various logical gates.
/// </summary>
public class Pin : Observable<Pin>, IComparable<Pin>, IComparable<int>
{
#region variables
private PinValue _value;
private string _code;
private string _label;
#endregion
#region properties
/// <summary>
/// Get the ID of the Pin.
/// </summary>
public Guid Id
{
get;
private set;
} | {
"domain": "codereview.stackexchange",
"id": 15925,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#",
"url": null
} |
c++, json, c++17
And of course, you have to be careful to keep all these various moving compments in sync.
But the biggest problem is how clunky the user interface is. JValue seems so unnecessarily hard to use.
Let’s start right at the beginning. A JSON value is one of:
null
boolean
number
string
array
object
So what’s it like creating a JValue in each of these cases?
// null
auto v = JValue{JValueType::Null};
Ehhh. I mean… could be worse? But it also could just be: auto v = JValue{};. I mean, why not default to null anyway?
// boolean
auto v = JValue{true};
auto v = JValue{false};
Cool.
// number
auto v = JValue{6.28};
Cool… but… did you try this: v = JValue{0};?
// string
auto v = JValue{"char array"};
auto v = JValue{"std::string"s};
Cool… but… did you try this: v = JValue{"std::string_view"sv};?
All that’s left are arrays and objects… and here’s where things get tragic. If I have a vector of strings, I would like to simply be able to do:
auto v = JValue{strings}; | {
"domain": "codereview.stackexchange",
"id": 38461,
"lm_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++, json, c++17",
"url": null
} |
dataset, visualization
Title: Interactive Graphing while logging data I'm looking to graph and interactively explore live/continuously measured data. There are quite a few options out there, with plot.ly being the most user-friendly. Plot.ly has a fantastic and easy to use UI (easily scalable, pannable, easily zoomable/fit to screen), but cannot handle the large sets of data I'm collecting. Does anyone know of any alternatives?
I have MATLAB, but don't have enough licenses to simultaneously run this and do development at the same time. I know that LabVIEW would be a great option, but it is currently cost-prohibitive. | {
"domain": "datascience.stackexchange",
"id": 976,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dataset, visualization",
"url": null
} |
deep-rl, monte-carlo-tree-search, alphazero
Title: How does AlphaZero's MCTS work when starting from the root node? From the AlphaGo Zero paper, during MCTS, statistics for each new node are initialized as such:
${N(s_L, a) = 0, W (s_L, a) = 0, Q(s_L, a) = 0, P (s_L, a) = p_a}$. | {
"domain": "ai.stackexchange",
"id": 3881,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-rl, monte-carlo-tree-search, alphazero",
"url": null
} |
quantum-field-theory, energy-conservation, stress-energy-momentum-tensor, qft-in-curved-spacetime
To see this, expand using the product rule and apply energy-momentum
conservation and Killing's equation. Note that $\partial_\nu (K_\mu T^{\mu \nu})$ is not a scalar.
$H_K$ is not some field defined through spacetime so Lie derivatives aren't really appropriate here. The statement that $H_K$ is independent of $\Sigma$ can be proved as follows: for any $\Sigma, \Sigma'$ consider the volume in spacetime bounded by these two surfaces along with the timelike boundary at spatial infinity. Then integrate $ \nabla_\nu (K_\mu T^{\mu \nu})$ over this volume and apply the divergence theorem, assuming that $T_{\mu \nu}$ vanishes sufficiently quickly at spatial infinity. If we choose $\Sigma = \Sigma_t$ to be a surface of constant $t$, then this result can be specialised to
$$ \frac{\mathrm{d}}{\mathrm{d}t} H_K(\Sigma_t) = 0 \,,$$
which is what is meant by $H_K$ being conserved. | {
"domain": "physics.stackexchange",
"id": 50475,
"lm_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, energy-conservation, stress-energy-momentum-tensor, qft-in-curved-spacetime",
"url": null
} |
fluid-dynamics, simulations, navier-stokes, numerical-method
where $u,v$ are the components of velocity, and $\rho$ is the (constant) density of the fluid.
Is one of these correct? Or are they both acceptable, since ultimately they will each be approximated?
Sources:
[1] https://github.com/tunabrain/incremental-fluids/blob/master/1-matrixless/Documentation.md
[2] http://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/ Step (xi), "cavity flow". For an incompressible fluid $\dot\rho=0$. Then the continuity equation implies
$$
\nabla\cdot u = 0 .
$$
We can now take the divergence of the Navier-Stokes equation and get
$$
-\nabla^2 P = \rho\nabla_j(u_i\nabla_i u_j).
$$
This means that the pressure is instantaneously determined by the velocity field (the pressure is no longer an independent hydrodynamic variable). The easiest way to solve this constraint is to convert the NS equation into an equation for the vorticity
$\omega=\nabla\times u$. This equation is
$$
\frac{\partial}{\partial t} {\omega} | {
"domain": "physics.stackexchange",
"id": 22507,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, simulations, navier-stokes, numerical-method",
"url": null
} |
javascript, beginner, object-oriented, tic-tac-toe, mvc
Next, you have to architect your program, so that any action that may eventually need to be sent over the wire is implemented as a JSON-serializable message. Here's the basic structure I like to use for this type of program (there's different ways of doing it, this is just what I've done in the past).
First, I'll make my model export two things - the current state, and an executeAction() function. All state modifications must be done by sending an action (which is just a plain object) to executeAction(). executeAction() will then read this object's properties and decide how to mutate the state.
// --- model.js --- //
export const currentState = { ...initial state... } | {
"domain": "codereview.stackexchange",
"id": 43220,
"lm_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, beginner, object-oriented, tic-tac-toe, mvc",
"url": null
} |
quantum-mechanics, molecular-dynamics, born-oppenheimer-approximation
$$|\psi \rangle =\sum _a \int \chi_a(R) |E_a(R)\rangle |R\rangle dR$$
where $\chi_a(R)$ is an amplitude function.
Note that:
$$H_\text{el} |E_a(R)\rangle |R\rangle = [ H_\text{el}(R) |E_a(R)\rangle ] |R\rangle = E_a(R) |E_a(R)\rangle |R\rangle $$
Therefore, the molecular eigenproblem $H_{\text{mol}} |\psi \rangle =\mathcal{E} |\psi \rangle$ can be written:
$$\sum_a \int (E_a + T_\text{nuc} + V_\text{nuc-nuc} - \mathcal{E}) \chi_a(R) |E_a(R)\rangle |R\rangle dR = 0$$
Multiplying by $\langle E_a(R)|$ on the left:
$$\int (E_a + T_\text{nuc} + V_\text{nuc-nuc} - \mathcal{E}) \chi_a(R) |R\rangle dR = 0$$
At last, we define a ket $|\chi_a\rangle \in \mathcal{S}_\text{nuc}$ such that $\chi_a(R) = \langle R | \chi_a \rangle$:
$$|\chi_a\rangle := \int \chi_a(R) |R\rangle dR$$
Then we can write:
$$(T_\text{nuc} + V_\text{nuc-nuc} + E_a - \mathcal{E}) | \chi_a \rangle = 0$$
HERE ENDS MY DERIVATION SO FAR. | {
"domain": "physics.stackexchange",
"id": 6303,
"lm_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, molecular-dynamics, born-oppenheimer-approximation",
"url": null
} |
neural-networks
Title: 1 hidden layer with 1000 neurons vs. 10 hidden layers with 100 neurons These types of questions may be problem-dependent, but I have tried to find research that addresses the question whether the number of hidden layers and their size (number of neurons in each layer) really matter or not.
So my question is, does it really matter if we for example have 1 large hidden layer of 1000 neurons vs. 10 hidden layers with 100 neurons each? Basically, having multiple layers (aka a deep network) makes your network more eager to recognize certain aspects of input data. For example, if you have the details of a house (size, lawn size, location etc.) as input and want to predict the price. The first layer may predict:
Big area, higher price
Small amount of bedrooms, lower price
The second layer might conclude:
Big area + small amount of bedrooms = large bedrooms = +- effect | {
"domain": "ai.stackexchange",
"id": 724,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks",
"url": null
} |
homework-and-exercises, lagrangian-formalism, variational-principle, action, free-fall
Is it possible to do this not using too complicated mathematical methods?
The equation is an " equals zero" one. Maybe it means that the derivative of something ( that I cannot identify) is zero and therefore that this something is constant.
What is this unidentified quantity and how does it relate to the path of the object? For each path, we can assign the following quantity known as action:
$$ S[\vec{r}]= \int_{t_1}^{t_2} dt( L)$$
Where,
$$ L = \text{ total kinetic energy} - \text{total potential energy}$$
The quantity 'S' is called a functional. A functional can be stated loosely as a function of functions. A concrete example of such objects being used to solve problems can be found in this post I made on MSE.
Anyhow, the great discovery was that the path which makes the action stationary (i.e: extremum of S) would be the path which the object follows. It turns out that the condition that the action is minimized/maxed is given as: | {
"domain": "physics.stackexchange",
"id": 77996,
"lm_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, lagrangian-formalism, variational-principle, action, free-fall",
"url": null
} |
Therefore, the suitable choice is of course $t=0$, and so the eigenvalue is $a+b$.
Thank you all for your replies. While I was just reflecting, I thought of the following solution, so, thought of sharing the following solution :
If $A= \begin{pmatrix} a&b&1 \\ c&d&1 \\ 1&-1&0\\ \end{pmatrix}$, then :
$A - \lambda I = \begin{pmatrix} a-\lambda&b&1 \\ c&d-\lambda&1 \\ 1&-1&-\lambda\\ \end{pmatrix}$
$\det ( A- \lambda I) = \det \begin{pmatrix} a-\lambda&b&1 \\ c&d-\lambda&1 \\ 1&-1&-\lambda\\ \end{pmatrix}$
Adding the first two columns and placing it in the first results in no change in the determinant value :
Hence :
$\det ( A- \lambda I) = \det \begin{pmatrix} a+b-\lambda&b&1 \\ c+d-\lambda&d-\lambda&1 \\ 0&-1&-\lambda\\ \end{pmatrix}$
$= (a+b-\lambda) \det \begin{pmatrix} 1&b&1 \\ 1&d-\lambda&1 \\ 0&-1&-\lambda\\ \end{pmatrix} = (c+d-\lambda) \det \begin{pmatrix} 1&b&1 \\ 1&d-\lambda&1 \\ 0&-1&-\lambda\\ \end{pmatrix}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769092358048,
"lm_q1q2_score": 0.8108439637222263,
"lm_q2_score": 0.831143045767024,
"openwebmath_perplexity": 257.52584574166684,
"openwebmath_score": 0.7755204439163208,
"tags": null,
"url": "https://math.stackexchange.com/questions/1227085/an-eigen-value-of-tiny-beginpmatrix-ab1-cd1-1-10-endpmatrix"
} |
ros, ekf, ekf-localization-node, ros-kinetic
Comment by Dragonslayer on 2020-06-05:
OK, its difficult for me to know the exact state of the project as all the files and stuff are on a timeline and maybe by now obsolete. Did you try the Zero z positions? I really dont get how a dvl can be upside down. Could you make it work with the manual 10° correction transform?
Comment by crazymumu on 2020-06-05:
Sorry, I didn't explain how DVL works. The DVL is point down to the seabed while echo sound. So the z velocity measurement is the depth direction. That' why it going down. And the DVL measurements only are 3-axis velocity.
Yes, the manual 10 degree is working. I included a static tf publisher in launch about 9.3 degree, which obtained from gps heading. This operation just change the path, not change the yaw data in the published data. | {
"domain": "robotics.stackexchange",
"id": 35023,
"lm_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, ekf, ekf-localization-node, ros-kinetic",
"url": null
} |
not refer to a new or different type of Fourier transform. m - located in folder MATLAB CodeBase\NVIDIA_3DSphericalDFT - this is the 3D Spherical Polar Fourier Transform test. Discrete Time Fourier Transform (DTFT) in MATLAB - Matlab Tutorial Online Course - Uniformedia. 1 Comment Show Hide all comments. Fast Fourier Transform from data in file. When we plot the 2D Fourier transform magnitude, we need to scale the pixel values using log transform to expand the range of the dark pixels into the bright region so we can better see the transform. I need to enhance my image using fast fourier transform. Formally, there is a clear distinction: 'DFT' refers to a mathematical transformation or function, regardless of how it is computed, whereas 'FFT' refers to a specific. Can I find related information about Fast Fourier Transform? Please help. MATLAB Links. m computes the fast fractional Fourier transform following the algorithm of [1] The m-file frft2. The Fourier transform is a powerful | {
"domain": "koehler-paderborn.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682451330956,
"lm_q1q2_score": 0.8322862814528735,
"lm_q2_score": 0.8418256432832333,
"openwebmath_perplexity": 499.8126290305673,
"openwebmath_score": 0.8244264721870422,
"tags": null,
"url": "http://ocve.koehler-paderborn.de/transform-fourier-matlab.html"
} |
ros, navigation, transform, amcl
<node pkg="amcl" type="amcl" name="amcl">
<param name="min_particles" value="500"/>
<param name="max_particles" value="3000"/>
<param name="kld_err" value="0.02"/>
<param name="update_min_d" value="0.20"/>
<param name="update_min_a" value="0.20"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.5"/>
<param name="recovery_alpha_slow" value="0.00"/>
<param name="recovery_alpha_fast" value="0.00"/>
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
<param name="gui_publish_rate" value="50.0"/> | {
"domain": "robotics.stackexchange",
"id": 28364,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, transform, amcl",
"url": null
} |
everyday-chemistry, toxicity
Title: Will squeezing lemon juice on top of foods with ferrocyanide additive release hydrogen cyanide gas? For example, will squeezing lemon juice on top of table salt with sodium ferrocyanide ($\ce{Na4[Fe(CN)6]}$) additive (E 535) release hydrogen cyanide gas?
Examples of ferrocyanide additives: | {
"domain": "chemistry.stackexchange",
"id": 9090,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "everyday-chemistry, toxicity",
"url": null
} |
algorithms, complexity-theory, stacks
Title: Maximizing the sum from m stacks using k pop's Assume you have m stacks each some elements within it. If you are allowed to do k pops , the objective is to maximize the sum(sum increases by the value of the popped element). What is the best algorithm which would be able to solve this problem.
Can the complexity be improved if the details of the elements in each stack is known beforehand. You can use dynamic programming to solve this problem in polynomial time.
Create a table $A[i,l]$ with $0\le i \le m$ and $0\le l\le k$, where $A[i,l]$ reprensents the optimal allocation using at most $l$ pops among the first $i$ stacks. We initiate by $A[.,0]=A[0,.]=0$ and we have the following inductive step :
$$
A[i+1,l]=\max\left\{A[i,l-t]+(t \text{ pops from stack } i+1), 0\le t \le l\right\}
$$
We can compute $A[m,k]$ in time $O(k^2m)$. | {
"domain": "cs.stackexchange",
"id": 11462,
"lm_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, complexity-theory, stacks",
"url": null
} |
spectroscopy
absorption cm⁻¹ m µm Hz THz J kJ/mol meV
high end 500 2.00E-5 20 1.5E+13 15 9.94E-21 5.98 62
C-O 1100 9.09E-6 9.09 3.3E+13 33 2.19E-20 13.2 136
C=C 1660 6.02E-6 6.02 5.0E+13 50 3.30E-20 19.9 206
C=O 1720 5.81E-6 5.81 5.2E+13 52 3.42E-20 20.6 213
C-H 3000 3.33E-6 3.33 9.0E+13 90 5.96E-20 35.9 372
O-H 3500 2.86E-6 2.86 1.05E+14 105 6.96E-20 41.9 434
low end 4000 2.50E-6 2.50 1.20E+14 120 7.95E-20 47.9 496 | {
"domain": "chemistry.stackexchange",
"id": 12169,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "spectroscopy",
"url": null
} |
c#, game, winforms, windows, collision
If you want to know whether the rectangles have a collision then use the IntersectsWith method that
Determines if this rectangle intersects with rect.
var isCollision = pictureRect.IntersectsWith(player.Rectangle());
Create and an extension to easier get the rectangle from a PictureBox.
public static Rectangle Rectangle(this PictureBox pictureBox)
{
return new Rectangle(
pictureBox.Location.X,
pictureBox.Location.Y,
pictureBox.Width,
pictureBox.Height
);
}
Naming
foreach(PictureBox s in rocks)
You should use more meaningful names than just s. A variable like pictureBox or pb would be much better because it's derived from the collection. The s does not have any meaning. Although in this case a rock would be perfect.
Health & Damage
health -= 10; | {
"domain": "codereview.stackexchange",
"id": 23364,
"lm_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#, game, winforms, windows, collision",
"url": null
} |
Imagine that we have a box that contains $m$ $p$'s, and next to it a box that contains $n$ $q$'s.
First we stop in front of the $p$-box, and decide how many $p$'s our divisor $d$ shall have. There are $m+1$ available options, namely $0, 1, \dots,m$.
Once we have decided on the number of $p$'s, move over to the $q$-box. For every choice of how many $p$'s the divisor $d$ shall have, there are $n+1$ ways to decide how many $q$'s the divisor $d$ shall have. Thus the total number of choices is $(m+1)(n+1)$.
Comment: Let $N=p_1^{m_1}p_2^{m_2}\cdots p_k^{m_k}$, where the $p_i$ are distinct primes. Using basically the same argument, we can show that $N$ has $(p_1+1)(p_2+1)\cdots(p_k+1)$ positive divisors. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.957277806109987,
"lm_q1q2_score": 0.826505629574379,
"lm_q2_score": 0.8633916134888613,
"openwebmath_perplexity": 467.68541140021216,
"openwebmath_score": 0.8850323557853699,
"tags": null,
"url": "http://math.stackexchange.com/questions/92810/to-find-number-of-divisor-of-pm-times-qn-when-p-and-q-are-primes/92838"
} |
logic, programming-languages, compilers, type-theory, type-checking
That's where my question comes in, because I don't know what type to infer from that expression. The resulting type is obvious, it is Int, but I don't know how to actually entirely check this program at the type level.
At the beginning, as you can see above, I had thought of a TConc type that represents concatenation in the same way as the TFun type represents a function, because in the end the concatenation sequence forms an unique function.
Another option, which I have not yet explored, would be to apply the function composition inference rule to each element of this expression sequence. I don't know how it would work with the stack-based. | {
"domain": "cs.stackexchange",
"id": 14427,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "logic, programming-languages, compilers, type-theory, type-checking",
"url": null
} |
energy, computational-physics, molecular-dynamics
Title: Lennard Jones Total system energy i am trying to implement/extend an implementation of Lennard-Jones potential simulation regarding Xenon molecules (for curious ones, the code can be found here functions (force_naive->lj_force)).
First and foremost i altered the above code to make collisions full elastic with the box bounds.
For box bounds:100 Ang, particles: 16348 and dt: 1e-15 sec i am trying to calculate the total energy of the system but the numbers doesnt make sense to me for example at beginning total energy is Xe+12 (Joules?!?!) and it continues rises until float overflow to inf.
For calculation of total energy i am using the typo found here page 5.
I think the problem is at velocity calculation. Someone any help? | {
"domain": "physics.stackexchange",
"id": 23518,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy, computational-physics, molecular-dynamics",
"url": null
} |
quantum-spin, group-representations, group-theory
Your spinor $\psi_\beta$ transforms in the $\frac{1}{2}$ representation. And $\psi^\dagger_\beta$ transforms in the complex conjugate representation $\frac{1}{2}^*$. If you look at your formula for the transformation of $\psi$ and $\psi^\dagger$ they are not the same. However, if you look at the transformation properties of $\psi^t_{\alpha}\varepsilon_{\alpha\beta}$ you will see that this transforms exactly the same as $\psi^\dagger$ because $\varepsilon \sigma^t \varepsilon= \sigma$ for all of the Pauli matrics $\sigma$. The operator you decomposed (correctly) transforms like $\psi^\dagger\otimes \psi$, which has a singlet part $\psi^\dagger_\alpha\delta_{\alpha\beta}\psi_\beta$. However, the two-state system which you were originally taught Clebsch-Gordon composition transforms like $\psi^\dagger \otimes \psi^\dagger$, (since you get it from creating two $\frac{1}{2}$ particles). To get it to look the same we insert a copy of the $\varepsilon$ matrix (using $\epsilon^2 = -1$. So the | {
"domain": "physics.stackexchange",
"id": 2715,
"lm_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-spin, group-representations, group-theory",
"url": null
} |
quantum-mechanics, particle-physics, angular-momentum, symmetry, parity
In other words, do I have $P(\nu_e+\overline{\nu}_e)= P(\nu_e)P(\overline{\nu_e})(-1)^l$ or $P(\nu_e)P(\overline{\nu_e})$.
To extend, what about in general for a decay $a \rightarrow b+c$. Can $b$ and $c$ always have a relative angular momentum $l$? If not, under which condition can they have one? (I know that in $\rho_0 \rightarrow \pi^+ + \pi^-$ we have to take into account a total $l$). Yes, orbital angular momentum is included when calculating the parity of a final state.
Note that decays to states with large $\ell$ are suppressed compared to states with small $\ell$. A hand-waving way to think about this is to imagine that the initial and final wavefunctions must overlap and recall the radial hydrogen wavefunctions, which go like $(r/a)^\ell$ near the origin; the length scale $a$ for a decay is set by the wavelengths of the particles in the final states. | {
"domain": "physics.stackexchange",
"id": 36833,
"lm_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, particle-physics, angular-momentum, symmetry, parity",
"url": null
} |
c++, beginner, game, stream
The second step is, of course, to add a similar deserialize method that takes an std::istream and creates an object from the values read. You then have a file parser read in the file, determine the block sizes, and call those deserializer methods.
The big upside of this solution is that it is relatively easy to implement while allowing you to encapsulate functionality away where it belongs, not in a monster class like you currently have. The downside is that the separation of concerns is still somewhat suboptimal, since you now have what are basically parser methods in game state classes. This can be somewhat mitigated through use of the factory design pattern, for example. Furthermore, this method can become messy if the complexity of the savefile and the game as a whole grows too large, but I am assuming that that is not the case for your project (and if it is, you will have to put a lot of thought in how to handle this well, anyway).
Other Tips and Tricks | {
"domain": "codereview.stackexchange",
"id": 29682,
"lm_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, game, stream",
"url": null
} |
java, multithreading, concurrency
/* Guest goes to bed */
System.out.println("Guest " + guestNum + " retires for the evening");
}
catch(Exception e) {
e.printStackTrace();
}
finally {
/* Attempt to join the thread */
try {
Hotel.joinedGuests();
System.out.println("Guest " + guestNum + " joined");
guest.join();
}
catch (InterruptedException e) {e.printStackTrace();}
}
}
}
class Employee implements Runnable{
/* Variables */
public static int ROOMNUM = -1;
public int employeeNum;
public Thread employee;
/**************************************/ | {
"domain": "codereview.stackexchange",
"id": 16531,
"lm_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, multithreading, concurrency",
"url": null
} |
java, recursion
public static String song() {
//The song consists of all verses up to verse 12, but the index starts from 0
//Print verses 0 to 11
return versesBelow(11);
}
public static String versesBelow(int verse) {
//Evil hack that allows me to check whether the input is zero without using a conditional ;)
try {
//Divide by verse. If the verse is zero, then an ArithmeticException is thrown.
//I am not using a conditional here!!!
int i = 1 / verse;
}
catch(ArithmeticException ex) {
//Stop the recursion
return verse(verse);
}
//else return this verse and all the verses below this one.
return versesBelow(verse - 1) + verse(verse);
} | {
"domain": "codereview.stackexchange",
"id": 17231,
"lm_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, recursion",
"url": null
} |
c++, opengl
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
glScalef(fScale, fScale,1);
backdrop();
citySkyLine();
window();
glPopMatrix();
}
}
if ((frame>=200) && (frame <500))
{
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
glScalef(1.5, 1.5,1); //maintain zoom
backdrop();
citySkyLine();
if ((frame>=330) && (frame <500))
{
morphSpotlight(); //morph window to create spotlight
}
window();
man();
glPopMatrix();
glDisable(GL_LIGHTING); //change text color
if ((frame>=210) && (frame <250))
{
glColor3f(1,1,1);
printText(300,310,3,GLUT_BITMAP_HELVETICA_18,"Is that someone at the door?"); | {
"domain": "codereview.stackexchange",
"id": 18089,
"lm_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++, opengl",
"url": null
} |
quantum-mechanics, semiconductor-physics
Second update
Let me clarify:
I apply the above operator to a wavefunction. I omit the constants.
$$
\left(-i \nabla+\vec{A} \right) \frac{1}{m} \left(-i \nabla+\vec{A} \right) \Psi=
$$
$$
=\left(-i \nabla+\vec{A} \right) \left(-i \frac{1}{m} \nabla \Psi+ \frac{1}{m} \vec{A} \Psi \right)=
$$
$$
=-\nabla \left( \frac{1}{m} \nabla \Psi \right)-i \nabla \left( \frac{1}{m} \vec{A} \Psi \right)-i \frac{1}{m} \vec{A} \nabla \Psi+\frac{1}{m} A^2 \Psi=
$$
$$
= \left[- \frac{1}{m} \Delta \Psi - \left( \nabla \frac{1}{m} \right) \left( \nabla\Psi \right) +\frac{1}{m} A^2 \Psi \right] - i \left[ 2 \frac{1}{m} \vec{A} \nabla \Psi + \vec{A} \left( \nabla \frac{1}{m} \right) \Psi + \frac{1}{m} \left( \nabla \vec{A} \right) \Psi\right]
$$
Now the first two terms are identical to the case with no magnetic field, and they are Hermitian together. Third term is obviously Hermitian. The fourth term (the first term of the imaginary part) is also Hermitian.
I have the problem with last two terms:
$$ | {
"domain": "physics.stackexchange",
"id": 26706,
"lm_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, semiconductor-physics",
"url": null
} |
beginner, programming-challenge, haskell
Challenge Summary
Each line input describes a bounding box with dimensions h and w, and an inner box with dimensions m and n (for height and width respectively).
The inner box starts in the top-right corner (0,0) and is travelling diagonally, towards (1,1). You're told the inner box is travelling at a velocity of v units per second.
I've interpreted all of the parameters as whole numbers, other than v, which is a real number.
An example line of input: 2 4 1 2 0.5.
The inner box can ricochet off of the bounding walls as it travels.
For each line of input, calculate the first corner that the inner box reaches (UR (upper right), LR (lower right) or LL (lower left)), along with the number of times the box ricocheted off of a wall before it reached that corner, and the time taken to get there. You can reduce the fromIntegral spam like this:
ricochet :: (Integral a, Fractional b) => a -> a -> a -> a -> b -> (Corner, a, b)
ricochet h w m n v
= (c,b,fromIntegral d / v) | {
"domain": "codereview.stackexchange",
"id": 24449,
"lm_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, programming-challenge, haskell",
"url": null
} |
2. Find the slope of the two chosen sides.
3. Calculate the slope of the perpendicular bisector of the two chosen sides.
4. Determine the equation of the perpendicular bisector of the two chosen sides.
5. Equate the two equations in Step 4 to each other to find the x-coordinate.
6. Plug the found x-coordinate into one of the equations in Step 4 to identify the y-coordinate.
• Method: Locating the Orthocenter of a Triangle
1. Find the slope of the two sides.
2. Calculate the slope of the perpendicular bisector of the two chosen sides.
3. Determine the equation of the perpendicular bisector of the two chosen sides with its corresponding vertex.
4. Equate the two equations in Step 3 to each other to find the x-coordinate.
5. Plug the found x-coordinate into one of the equations in Step 3 to identify the y-coordinate.
The perpendicular bisector divides a segment into two equal halves. | {
"domain": "studysmarter.us",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9920620075414419,
"lm_q1q2_score": 0.8267096689056421,
"lm_q2_score": 0.8333245932423308,
"openwebmath_perplexity": 438.71513286584263,
"openwebmath_score": 0.5520147681236267,
"tags": null,
"url": "https://www.studysmarter.us/explanations/math/geometry/perpendicular-bisector/"
} |
c#, multithreading, cache
return result;
}
/// <summary>
/// Returns valid value.
/// Member is thread-safe.
/// </summary>
/// <remarks>
/// If value is not loaded, the value will be reloaded.
/// If hard limit expired, the value will be reloaded.
/// If soft limit expired, the reload will be run in different thread and the current value will be returned.
/// </remarks>
/// <returns></returns>
public TValue GetValue() {
bool softLimitExpired, hardLimitExpired;
var result = this.PeekValue(out softLimitExpired, out hardLimitExpired);
if (object.ReferenceEquals(result, null)) {
// value is not loaded
result = this.ReloadValueSync();
}
if (hardLimitExpired) {
// value is expired
result = this.ReloadValueSync();
}
else if (softLimitExpired) {
// value is valid, but soft limit is expired, so we want reload value for usage in future | {
"domain": "codereview.stackexchange",
"id": 13066,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, multithreading, cache",
"url": null
} |
aerodynamics, aircraft, lift
This is also the reason that long thin wings are more efficient: they "lightly touch a lot of air", moving none of it very much.
Trying to replicate this efficiency with an engine is very hard: you need compressors for it to work at all (so you can mix air with fuel and have the thrust come out the back) and this means you will have a small volume of high velocity gas to develop thrust. That means a lot of energy is carried away by the gas. Think about the noise of an engine - that's mostly that high velocity gas. Now think of a glider: why is it so silent? Because a lot of air moves very gently.
I tried to stay away from the math but hope the principle is clear from this. | {
"domain": "physics.stackexchange",
"id": 80736,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "aerodynamics, aircraft, lift",
"url": null
} |
beginner, programming-challenge, haskell, fizzbuzz
I am entirely new to Functional programming, and my Haskell knowledge is from a single Pluralsight class, so I am looking for any amount of feedback, particularly for best practices. I also feel like the actual fizzBuzzSingle function can be solved in a list comprehension instead, but I'm still uncomfortable with the syntax so I didn't use one.
If my code is reading too object-oriented please let me know. I also did look up the other FizzBuzz questions on this site, but they all seem to not being handling file input, which seemed the hardest part to me, so it seemed worth posting this.
import System.Environment
fizzBuzzSingle :: Int -> Int -> Int -> String
fizzBuzzSingle f b n
| n `mod` f == 0 && n `mod` b == 0 = "FB"
| n `mod` f == 0 = "F"
| n `mod` b == 0 = "B"
| otherwise = show n
fizzBuzz :: (Int, Int, Int) -> [String]
fizzBuzz (f,b,end) = map (fizzBuzzSingle f b) [1..end] | {
"domain": "codereview.stackexchange",
"id": 17113,
"lm_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, programming-challenge, haskell, fizzbuzz",
"url": null
} |
javascript, algorithm, programming-challenge, time-limit-exceeded, k-sum
var twoSum = function(nums, target, out, seen){
let myMap = {}
for(let i = 0; i < nums.length; i++){
if(myMap[target - nums[i]] != undefined){
//If match found convert it to string so that we can test for dupicates
let val = [target - nums[i], nums[i], -target].sort((a,b) => a - b).join(',');
//Test for duplicates
if(!seen[val]) {
out.push(val)
seen[val] = true
}
}
myMap[nums[i]] = i;
}
} | {
"domain": "codereview.stackexchange",
"id": 40903,
"lm_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, programming-challenge, time-limit-exceeded, k-sum",
"url": null
} |
c#, parsing, wpf, mvvm, visual-studio
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Width" Value="{Binding (Grid.ActualWidth), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<Border>
<TextBlock Text="{Binding Name}" Style="{StaticResource NameStyle}" />
</Border>
<TextBlock Text="{Binding Message}" Style="{StaticResource MessageStyle}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<DockPanel Grid.Row="1" HorizontalAlignment="Right" >
<DockPanel.Resources>
<Style TargetType="Button"> | {
"domain": "codereview.stackexchange",
"id": 35350,
"lm_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#, parsing, wpf, mvvm, visual-studio",
"url": null
} |
quantum-algorithms, circuit-construction, simons-algorithm
Actually, I don't usually think about performing the measurement at this point; it's unnecessary (but would allow you to avoid the density matrix formalism in the following calculation). Instead, calculate the action of the final set of Hadamards, yielding the final output state
$$
\frac{1}{2^n}\sum_{x,z}(-1)^{x\cdot z}\ket{z}\ket{f(x)}.
$$
Here,
$$
x\cdot z= x_1z_1\oplus x_2z_2\oplus x_3z_3 \oplus\ldots \oplus x_nz_n,
$$
where $x_k$ is the $k^{th}$ bit of $x$.
Now we collect unique values of $f(x)$,
$$
\frac{1}{2^n}\sum_{z,f(x)}\left((-1)^{x\cdot z}+(-1)^{(x\oplus s)\cdot z}\right)\ket{z}\ket{f(x)}.
$$
One can therefore verify that the output of the algorithm is
$$
\frac{1}{2^{n-1}}\sum_{z: s\cdot z=0}(-1)^{x\cdot z}\ket{z}\sum_{f(x)}\ket{f(x)}.
$$ | {
"domain": "quantumcomputing.stackexchange",
"id": 102,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-algorithms, circuit-construction, simons-algorithm",
"url": null
} |
particle-physics, energy, radiation, cosmic-rays
Title: Cosmic ray hazards The Pierre Auger Observatory site mentions the detection of a 3E20 eV (48 J) cosmic ray whose energy, well above the GZK cutoff, was based on an analysis of its atmospheric shower. This was equivalent to the kinetic energy of a baseball with a speed of 79.5 m/s or 177 mph. Of course, cosmic rays with such ulta-high energies are extremely rare.
What kind of damage would occur if an astronaut or a space vehicle encountered such a cosmic ray? How would the damage differ from that from the hypothetical 79.5 m/s baseball? One must keep in mind also that it is the particle, not the shower that goes through the astronaut in dmckee's estimate above, where he treats the relativistic particle going through matter.
The shower in your question which gave the energy estimate of the parent particle is generated by cascade/sequential collisions of deep angle scattering over a long path. The energy is not released in one go unless the astronaut is very unlucky. | {
"domain": "physics.stackexchange",
"id": 617,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, energy, radiation, cosmic-rays",
"url": null
} |
• To find the largest, it suffices to compute the ratios between consecutive terms. That's less work than computing the terms individually. – Lord Shark the Unknown Aug 12 '18 at 20:19
• yep, i was editing my answer. – pointguard0 Aug 12 '18 at 20:23
The expectation is $7\cdot\dfrac 46=4.666\cdots$ greens, which is closest to $5$ (the distribution is unimodal).
A six-sided unbiased die with four green faces and two red faces is rolled seven times. Which of the following combinations is the most likely outcome of the experiment
The probability of rolling a green is $p=\frac{4}{6} =\frac{2}{3}$, the probability for rolling a red is $p=\frac{2}{6}=\frac{1}{3}$ They are complements of eachother.
Let $X\sim Bin(n,p)$ be a binomial distributed random variable. We let $k$ be the number of successes of rolling greens. Then $X \sim Bin(7,\frac{2}{3})$
the mass function is given by
$$f(k,7,\frac{2}{3}) =Pr(X=k) = \binom{n}{k} p^{k}(1-p)^{n-k}$$
$$\binom{n}{k} = \frac{n!}{k!(n-k)!}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.967899289579129,
"lm_q1q2_score": 0.8392032942894898,
"lm_q2_score": 0.8670357580842941,
"openwebmath_perplexity": 466.6542683306946,
"openwebmath_score": 0.7695024013519287,
"tags": null,
"url": "https://math.stackexchange.com/questions/2880668/die-is-rolled-seven-times-which-is-the-most-likely-outcome"
} |
• How much simpler would it be to factorise that quartic using difference of two squares first, though? – Prime Mover Jul 7 at 12:33
• it is simpler, but I wanted to prove directly that the even using the other way, you could obtain the nicer formula for the roots anyway, since the OP couldn't see it – Exodd Jul 7 at 12:36
• Fair comment. Fair play for multiplying through by 4 first, by the way, I didn't actually think of that. It does make it easier to handle. – Prime Mover Jul 7 at 12:38
• @Exodd Your answer taught me how to get the desired answer out of mine; +1 – JD_PM Jul 7 at 12:41
• In many cases I find that when a question asks "how does X lead to Y", people will often answer "here is how you find Y without using X" which might solve the broader problem but is not very useful to explaining what the question actually asked. So thank you for posting this Exodd. – David Z Jul 7 at 20:59 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812309063186,
"lm_q1q2_score": 0.8230961296379395,
"lm_q2_score": 0.8499711718571774,
"openwebmath_perplexity": 726.6973865907593,
"openwebmath_score": 0.7571957111358643,
"tags": null,
"url": "https://math.stackexchange.com/questions/3748511/how-to-solve-omega4-fracebm22-omega-02-omega2-omega-04-0-in-t/3748527"
} |
c#, linq, io
You can start processing immediately, reducing the total perceived execution time.
You use less memory than reading the whole list (not such an issue nowadays).
It's easy to be parallelized.
And we then arrive to the second point: parallelization. It's always tricky to make I/O bound code parallel but in this case you have two main tasks:
Read file content.
Calculate hash.
Even a very simple parallel approach will benefit from overlapping next read operation with previous hash calculation. Roughly something like this:
var allFiles = Directory.EnumerateFiles(directoryPath, "*.*", SearchOption.AllDirectories);
var hashedFiles = allFiles.AsParallel()
.Select(x => new { Path = x, Hash = CalculateHash(x) }); | {
"domain": "codereview.stackexchange",
"id": 26089,
"lm_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#, linq, io",
"url": null
} |
mars
The loss of most of the magnetic field of Mars makes its atmosphere less resistant to erosive solar wind.
(Actually things get more complicated, since sequestration and outgassing, meaning an exchange of atmosphere with rock, as well as sublimation, and resublimation of water and carbon dioxide take place. Water vapor is decomposed into hydrogen and oxygen by photolysis, hydrogen escapes to space due to its low molecular weight, and oxygen tends to be bound chemically to iron-bearing rocks. On the other hand solar wind provides a steady supply of hydrogen, which is bound by rocks in the top few micrometers; "ChemCam saw peaks of hydrogen and magnesium during the first shots that we didn’t see in subsequent firings.")
The history of the Marsian atmosphere isn't yet known in full detail. NASA's MAVEN mission is designed to find out more. | {
"domain": "astronomy.stackexchange",
"id": 355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mars",
"url": null
} |
image-processing, computer-vision
Title: Segmentation technique for handwritten text (cursive and unconstrained) Although I am new to the computer vision domain, I am tasked with automating handwritten text recognition from bank cheques. I first did some preprocessing(blurring and binarization) and then dilated it so that I could segment the words. But since the words are handwritten (cursive and unconstrained), the segmentation is failing most of the time. I read up on some research papers and it seems you can use neural networks for segmentation.Is that the correct approach? Are there other alternatives? Can someone shed some more light? As mentioned in comments there is no one right way to recognize handwriting. That said, Here are two techniques you could explore. | {
"domain": "cs.stackexchange",
"id": 10840,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, computer-vision",
"url": null
} |
illustrations below describe systems with 2, 3 or 4 load cells. The formula is: g = G•M/r². The median is a line drawn from the midpoint of any one side to the opposite vertex. 4 Pedal triangle 51 4. $\endgroup$ - kevin Aug 17 '17 at 20:20. Using specific algebraic equations, various weight and inch measurements of the aircraft combine to define the plane's formulaic center of gravity. Center of mass of a rigid body is also called its center of gravity. The center of mass of a two-particle system lies on the line connecting the particles (or, more precisely, their individual centers of mass). Aircraft Super Calculator 7. Here are a couple of center of gravity formulas you will need to write down. Gravity decreases with the square of the distance. Let's consider a triangle. John F Ehlers introduced this COG indicator in 2002. 5 * Offset Period of 45 Trade in the direction of the anaSuperTrendU11 with the WizPRC as a guide as to where to go short / long from. Centroid is located 2/3 of | {
"domain": "rafbis.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806506825456,
"lm_q1q2_score": 0.8254779448344705,
"lm_q2_score": 0.8418256512199033,
"openwebmath_perplexity": 304.50342906770857,
"openwebmath_score": 0.5220875144004822,
"tags": null,
"url": "http://rafbis.it/azhy/center-of-gravity-formula-for-triangle.html"
} |
For the derivation of Gauss quadrature formulas see Gautschi (2004, pp. 22–32), Gil et al. (2007a, §5.3), and Davis and Rabinowitz (1984, §§2.7 and 3.6). Stroud and Secrest (1966) includes computational methods and extensive tables. For further extensions, applications, and computation of orthogonal polynomials and Gauss-type formulas, see Gautschi (1994, 1996, 2004). For effective testing of Gaussian quadrature rules see Gautschi (1983).
For the classical orthogonal polynomials related to the following Gauss rules, see §18.3. The given quantities $\gamma_{n}$ follow from (18.2.5), (18.2.7), Table 18.3.1, and the relation $\gamma_{n}=\ifrac{h_{n}}{k_{n}^{2}}$.
# Gauss–Legendre Formula | {
"domain": "nist.gov",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874120796498,
"lm_q1q2_score": 0.8419707528838732,
"lm_q2_score": 0.849971181358171,
"openwebmath_perplexity": 1417.8425370774123,
"openwebmath_score": 0.9814050793647766,
"tags": null,
"url": "http://dlmf.nist.gov/3.5"
} |
python, random, quiz
I guess you thought that it was a good idea to make question into a float since (bananas1+bananas2)/2 creates a float. The idea is good but what happens if I guess something that is not a float? Your whole program crashes! A good way to avoid this is to catch the error before it happens
question = input('how many bananas do each of them get?')
try:
question = float(question)
except:
print('Error, number of bananas must be an integer')
continue | {
"domain": "codereview.stackexchange",
"id": 20647,
"lm_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, random, quiz",
"url": null
} |
c++, tree, functional-programming, binary-search
And finally the main function:
int main()
{
BstNode* root = NULL;
int i, note, j;
std::vector<std::string> test; //define a vector to store words from txt file
test = readFromTxt();
for (j = 0; j < test.size(); j++) //This loop is bulding the three passing english words
{
std::string str1 = test[j];
root = InsertNode(root, str1);
}
if (isBST(root, NULL, NULL)) //calling BST check function
{
std::cout << "Is BST\n";
}
else
{
std::cout << "Not a BST\n";
}
InPreorder(root);
Search(root, "in");
NodeDestructor(root, "in");
InPreorder(root);
Search(root, "in");
delete root;
return 0;
} | {
"domain": "codereview.stackexchange",
"id": 32603,
"lm_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++, tree, functional-programming, binary-search",
"url": null
} |
python, graph, breadth-first-search, depth-first-search
If the neighbours of 0 were added to the graph in the order 1, 2, 3, then the code in the post will visit the nodes in the order 0, 1, 4, 2, 3. But this is not a valid depth-first ordering — after 0, 1, and 4, the next node should be 3. The problem arises because node 3 was already marked as visited when it was pushed onto the stack as a neighbour of 0, and so it fails to be visited as a neighbour of 4.
This is a common mistake (see here for another example), because dfs as written would be a correct implementation of depth-first search on a tree (when there is exactly one path from the root to each node). It's only when there are multiple paths between nodes that the problem becomes evident.
To correct this, add a node to the visited set after popping it from the stack, rather than before pushing it on the stack, like this:
def dfs(self, node):
visited = [False for i in range(len(self.graph))]
stack = []
stack.append(node)
while stack:
node = stack.pop() | {
"domain": "codereview.stackexchange",
"id": 25007,
"lm_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, graph, breadth-first-search, depth-first-search",
"url": null
} |
javascript, performance, jquery, animation
Title: Sequential animations This is all about a whole lot of animations which should happen sequentially. That's why I am using promise().done() functions. In the end I'm binding a function to the mousemove event (similar to a dragging feeling on hover).
How can I optimize / shorten it?
function showSpecialNavigation(){
$('.special-navigation_section').each(function(i) {
$(this).delay(400*i).fadeIn('fast');
$(this).find('li').each(function(i2) {
$(this).delay(400*i).fadeIn('800');
});
}).promise().done(function(){
$(".special-navigation_section").each(function(i3) {
$(this).find('a.transition_text').fadeIn('800');
}).promise().done(function(){
$(".showup1").each(function(i4) {
$(this).delay(50*i4).fadeIn('fast').delay(10).find('img').fadeIn('fast');
}).promise().done(function(){
$(".showup2").each(function(i5) { | {
"domain": "codereview.stackexchange",
"id": 1570,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, performance, jquery, animation",
"url": null
} |
statistical-mechanics, entropy, quantum-information, information
Title: Ignorance in statistical mechanics Consider this penny on my desc. It is a particular piece of metal,
well described by statistical mechanics, which assigns to it a state,
namely the density matrix $\rho_0=\frac{1}{Z}e^{-\beta H}$ (in the
simplest model). This is an operator in a space of functions depending
on the coordinates of a huge number $N$ of particles.
The ignorance interpretation of statistical mechanics, the orthodoxy to
which all introductions to statistical mechanics pay lipservice, claims
that the density matrix is a description of ignorance, and that the
true description should be one in terms of a wave function; any pure
state consistent with the density matrix should produce the same
macroscopic result.
Howewer, it would be very surprising if Nature would change its
behavior depending on how much we ignore. Thus the talk about
ignorance must have an objective formalizable basis independent of
anyones particular ignorant behavior. | {
"domain": "physics.stackexchange",
"id": 2539,
"lm_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, entropy, quantum-information, information",
"url": null
} |
cell-biology, theoretical-biology
This one is the only easy one. This had to be violated by abiogenesis. There had to be a first cell (or group of cells created under common conditions).
The origins of the first cell(s) are variously explained by the RNA world, GADV-protein world, and other hypotheses. Whatever the case, however life started, it had to have a start. This means there must be one or more cells in the history of life that were spawned from some natural processes lacking a parent cell. | {
"domain": "biology.stackexchange",
"id": 5493,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cell-biology, theoretical-biology",
"url": null
} |
c++, performance, matrix, sse, simd
for( int i = 0; i < number_of_packets_; i++ )
{
outxs[i] = _mm_fmadd_ps(m02, zs[i],
_mm_fmadd_ps(m01, ys[i],
_mm_fmadd_ps(m00, xs[i], m03)));
outys[i] = _mm_fmadd_ps(m12, zs[i],
_mm_fmadd_ps(m11, ys[i],
_mm_fmadd_ps(m10, xs[i], m13)));
outzs[i] = _mm_fmadd_ps(m22, zs[i],
_mm_fmadd_ps(m21, ys[i],
_mm_fmadd_ps(m20, xs[i], m23)));
} | {
"domain": "codereview.stackexchange",
"id": 28370,
"lm_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, matrix, sse, simd",
"url": null
} |
signal-analysis
Title: LTI and Deterministic Channel Can someone explain me the statistical relationship of random signals with a linear time-invariant and deterministic channel to the output of the channel when having random signal as an input? If your input "random signal" is modeled as a zero-mean wide-sense-stationary random process $\{X(t)\}$ with autocorrelation function $R_X(t)$, then the output of the channel (which is basically an LTI system with impulse response $h(t)$) is also a zero-mean wide-sense-stationary process $\{Y(t)\}$ with autocorrelation function $R_Y(t)$ given by
$$R_Y = R_h \star R_X$$ | {
"domain": "dsp.stackexchange",
"id": 7124,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "signal-analysis",
"url": null
} |
newtonian-mechanics, rotational-dynamics, reference-frames, rigid-body-dynamics, angular-velocity
$$ \mathbf{I}_C = \mathbf{R}\, \mathbf{I}_{\rm body} \mathbf{R}^\top $$
As far as the future angular velocity $\vec{\omega}$, you have to integrate the rotational acceleration over time to find the result. Remember a force does to result with velocity, but with acceleration. And acceleration over time results in velocity. Similarly for rotational dynamics. | {
"domain": "physics.stackexchange",
"id": 60574,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, rotational-dynamics, reference-frames, rigid-body-dynamics, angular-velocity",
"url": null
} |
decision-trees, cross-validation, overfitting
However, it is not always necessary for Train MAE to be lower than Test MAE. It might happen "by chance" that the test set is relatively easier (than the training set) for the model to score higher accuracy hence leading to lower Test MAE!
Q2. Is this true only for DecisionTreeRegressor?
A2. No, this plot is not specifical for DecisionTreeRegressor. If you notice that in my explanation I haven't made any assumption on the model!
Q3. Is the graph incorrect?
A3. No, the graph is not wrong. We speak of the general case of what we are expecting on an average. If you were to draw a graph only for a particular/current instance of the model running you can have Train MAE above Test MAE. | {
"domain": "datascience.stackexchange",
"id": 6632,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "decision-trees, cross-validation, overfitting",
"url": null
} |
Last edited: Jul 14, 2014
5. Jul 14, 2014
### jbunniii
Or equivalently, compute the Taylor series. I wasn't sure how much background the OP had, though.
By the way, just to add to my previous post, if we're uneasy about how much error we introduce by approximating the denominator as $2$, this can be quantified more precisely. For example, for $-1/2 \leq x \leq 1/2$ we have $0 \leq x^2 \leq 1/4$ and so
$$2 \leq \sqrt{x^2 + 1} + 1 \leq \sqrt{5/4} + 1 \approx 2.118$$
Therefore for $-1/2 \leq x \leq 1/2$, we can bound (the upper branch of) the hyperbola above and below by two parabolas:
$$\frac{x^2}{2.118} \leq y-1 \leq \frac{x^2}{2}$$
or equivalently,
$$\frac{x^2}{2.118} + 1 \leq y \leq \frac{x^2}{2} + 1$$
If the OP knows some calculus, here are a couple of concepts which may be of interest: | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.973240719919151,
"lm_q1q2_score": 0.8001879328182088,
"lm_q2_score": 0.822189121808099,
"openwebmath_perplexity": 590.2654871057487,
"openwebmath_score": 0.9941378831863403,
"tags": null,
"url": "https://www.physicsforums.com/threads/why-is-the-hyperbola-round-at-the-bottom.761667/"
} |
c#, entity-framework, crud
MyDA.TryDataBase(dbEntities, "Changes saved successfully", () => dbEntities.SaveChanges());
}
} | {
"domain": "codereview.stackexchange",
"id": 2666,
"lm_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#, entity-framework, crud",
"url": null
} |
fft, amplitude-modulation
figure, ax = plt.subplots(2)
figure.suptitle("Input: Sine wave, 0.5Hz, amplitude sweep 0 - 10 - 0 Vpp", fontsize=16)
ax[0].plot(samples, inp_sig)
ax[0].title.set_text('Time domain')
ax[0].set_xlabel('Seconds (s)')
ax[0].set_ylabel('Voltage (V)') | {
"domain": "dsp.stackexchange",
"id": 10602,
"lm_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, amplitude-modulation",
"url": null
} |
semiconductor-physics
Furthermore, in order to recombine, electrons and holes need spatial overlap, so they must meet at tbe same position (or nearby). But even for high doping levels (above 1e18), one impurity and therefore one electron or hole is diluted in 10e4 crystal atoms. Recombination thus does not happen immediately, but statistically after a characteristic time. Keep in mind, intrinsic carriers are still generated thermally, so the carrier distributios are in an equilibrium. | {
"domain": "physics.stackexchange",
"id": 18757,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "semiconductor-physics",
"url": null
} |
thermodynamics, electromagnetic-radiation, power
The rate at which something inside the oven absorbs energy depends on what you put in. For example if you put in a cup of cooking oil it will absorb energy slowly and heat up slowly (I wouldn't try this at home as traces of water in the oil can boil explosively!!).
The 750W rating of the oven doesn't mean it pours 750W into whatever is inside it; it means that's the maximum amount of power it can pour in. The actual power absorbed will typically be less than this and possibly much less.
It would be an interesting experiment to try heating two (or more) mugs of coffee at the same time. I would bet you'll find the total energy absorbed increases as you put more mugs in, up to the 750W limit.
Later: | {
"domain": "physics.stackexchange",
"id": 30839,
"lm_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, electromagnetic-radiation, power",
"url": null
} |
navigation, costmap-2d
Title: costmap_2d requires macros.h header to build
On a fresh checkout of diamondback-full on Lucid, I was unable to get costmap_2d to build. It kept complaining of not finding ROS_DEPRECATED and ROS_INLINE_FORCE. I was able to overcome this problem by including macros.h in every src/*.cpp file.
Is there a better way of getting a build? What am I doing wrong?
Update after Eric's comment: I followed the instructions here:http://www.ros.org/wiki/diamondback/Installation/Ubuntu. Generally I go to my desired packages and do a rosmake && make. My std_msgs failed to build , citing "Header.h" was absent. I resolved the issue by manually copying msg_gen/include../Header.h to std_msgs/include. rosconsole had an unmet dependency of rostime, which I added in the manifest.xml and rebuilt.
Originally posted by PKG on ROS Answers with karma: 365 on 2011-07-16
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 6158,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, costmap-2d",
"url": null
} |
python, performance, numpy, numba
The point is that Python will print how long the calculation took to
run. Before modifications, the script takes 3.05 seconds to run on my
computer.
Now I can modify lsmput (I renamed LSMPut and some other functions
and variables because they names shouldn't contain capital letters
according to the Python style guide) and see which changes makes it
run faster.
Here follows the changes that impacted the runtime the most. Changing
z=np.array([np.random.standard_normal() for _ in range(paths)])
to
z = np.random.standard_normal(paths)
brings the runtime down to 2.43 seconds. Changing
ones=[1 for _ in range(len(X))]
to
ones = np.ones(len(X))
reduces the runtime further to 2.21 seconds. Precalculating the powers
of X in basis_funct like this
X2 = X**2
X3 = X**3
X4 = X**4
X5 = X**5
...
A = np.column_stack((ones, 1 - X, 1/2 * (2 - 4*X + X2), ...
saves an additional 100 milliseconds. Changing
itmPaths = [index for index,value in enumerate(K - S) if value > 0] | {
"domain": "codereview.stackexchange",
"id": 36991,
"lm_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, numba",
"url": null
} |
ai-design, autonomous-vehicles
On those rare occasions, the vehicles could digitally draw lots, as suggested, which is one place where unpredictability is adaptive. Doing skid experimentation like a race car driver on Main Street at midnight may be what some drunk teen might do, but that is a form of unpredictability that is not adaptive toward a sensible ordering of the priorities of driving. Neither would be texting or trying to eat and drive.
Determinism
Regarding determinism, in the context of the uses discussed, pseudo-random number generation of particular distributions will suffice. | {
"domain": "ai.stackexchange",
"id": 689,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ai-design, autonomous-vehicles",
"url": null
} |
organic-chemistry, aromatic-compounds, heterocyclic-compounds, aromaticity
Selenium is a bulky 4th period element and I think the size of selenium is too large to have conjugation with carbon atom and make the compound aromatic. Why is selenophene still aromatic?
Further, faster electrophilic aromatic substitution (EAS) than thiophene sounds suspicious. Why and how? Selenium — like sulfur — is a chalkogen/member of group 16. It is heavier than sulfur, and thus more metalloid. In this regard similar to the trend in the adjacent group 17 (the halogens) where iodine has more metal-like character than the other members, or group 15 (the tetrels) with carbon; yet silicon, germanium, tin, and lead. Thus, formally, selenophene is isoelectronic to thiophene, a with six π-electrons over five ring atoms an electron enriched heteroaromatic compund (compared to benzene).
But, comparing pyrrole, furan, thiophene and selenophene, Yadav arguments | {
"domain": "chemistry.stackexchange",
"id": 16314,
"lm_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, aromatic-compounds, heterocyclic-compounds, aromaticity",
"url": null
} |
quantum-field-theory, fourier-transform, propagator, klein-gordon-equation
$$
e^{ip(x-y)} = e^{i(p^{\mu}(x-y)_{\mu})} = e^{i(Et-\vec{p}\cdot(\vec{x}-\vec{y}))} = e^{i[-(-Et)-\vec{p}\cdot(\vec{x}-\vec{y})]}=e^{-i[p^{0}t+\vec{p}\cdot(\vec{x}-\vec{y})]}
$$
However, it seems that I can not write $e^{-i[p^{0}t+\vec{p}\cdot(\vec{x}-\vec{y})]}$ as $e^{-ip(x-y)}$, where $p^{0}=-E(\vec{p})$. Where is the problem? Yeah, basically as hft said in his comment, the main point is the integrals are only in the space/momentum components and not in time/energy components.
And because you are integrating over all momenta $\vec{p}$, for every $\vec{x}-\vec{y}$ you pass, you will also pass through a $\vec{y}-\vec{x}$. Meaning that effectively, and only inside the integral:
\begin{equation}
\vec{x}-\vec{y}=\vec{y}-\vec{x}
\end{equation} and because this only happens in space components the time component of $p$ which is $E$ will gain a minus sign, telling you that you are dealing with "negative energy" particles (antiparticles):
$$ | {
"domain": "physics.stackexchange",
"id": 89534,
"lm_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, fourier-transform, propagator, klein-gordon-equation",
"url": null
} |
programming-languages, object-oriented, abstract-data-types
LIST_MODULE_SINGLY_LINKED cannot inter-operate with LIST_MODULE_DYNAMIC_ARRAY because we can't feed data created, say with the constructor of LIST_MODULE_DYNAMIC_ARRAY, to the observer of LIST_MODULE_SINGLY_LINKED because LIST_MODULE_SINGLY_LINKED assumes a representation for a list (as opposed to an object, which only assumes a behaviour).
This is analogous to a way that two different groups from abstract algebra cannot interoperate (that is, you can't take the product of an element of one group with an element of another group). This is because groups assume the closure property of group (the product of elements in a group must be in the group). However, if we can prove that two different groups are in fact subgroups of another group G, then we can use the product of G to add two elements, one from each of the two groups.
Comparing the ADTs and objects | {
"domain": "cs.stackexchange",
"id": 5879,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "programming-languages, object-oriented, abstract-data-types",
"url": null
} |
virology, enzymes, amino-acids
It can also be regarded as a recognition site for the enzyme.
The relevance of this to the virulence of some viruses is as follows. Many RNA viruses are translated into one or more polyproteins that are subsequently cleaved proteolytically at specific sites to generate further proteins. In certain instances these sites are ‘polybasic’, and the products generated by the cleavage of such sites play a role in the virulence of viruses.
This is nicely illustrated by a paper by Nao et al. in mBio on the mutation of haemagglutinin (HA) cleavage site of Avian Influenza Virus, where increasing the number of basic amino acids increased the virulence. I included an illustrative figure from that publication. | {
"domain": "biology.stackexchange",
"id": 11470,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "virology, enzymes, amino-acids",
"url": null
} |
# Thread: Continuity in 2 variables.
1. ## Continuity in 2 variables.
Find the limit or show that the limit does not exist,
$\lim_{(x,y) \to (0,0)} \frac{xy \cos y}{3x^2+y^2}$
2. First we set...
$x= \rho\cdot \cos \theta$
$y= \rho\cdot \sin \theta$
... and imnmediately we obtain...
$\lim_{(x,y) \rightarrow (0,0)} \frac{x\cdot y\cdot \cos y}{3 x^{2} + y^{2}} = \lim_{\rho \rightarrow 0} \frac{\rho^{2}\cdot \sin \theta\cdot \cos \theta \cdot \cos (\rho\cdot \sin \theta)}{\rho^{2}\cdot (3 \cos^{2} \theta + \sin^{2} \theta)} = \frac{\sin \theta \cos \theta}{1+2 \cos^{2} \theta}$
Since the limit depends form $\theta$ the limit itself doesn't exist...
Kind regards
$\chi$ $\sigma$
3. Originally Posted by chisigma
First we set...
$x= \rho\cdot \cos \theta$
$y= \rho\cdot \sin \theta$
... and imnmediately we obtain... | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631675246404,
"lm_q1q2_score": 0.8383802648748201,
"lm_q2_score": 0.8499711794579723,
"openwebmath_perplexity": 490.76371098226787,
"openwebmath_score": 0.9804583191871643,
"tags": null,
"url": "http://mathhelpforum.com/calculus/93104-continuity-2-variables.html"
} |
quantum-mechanics, operators, momentum, fourier-transform, commutator
Title: Commutator identities and Fourier transform Is it possible to derive one side of the arrow below from the other by using only the Fourier transform and its reciprocal?
$$[\hat{p},f(\hat{x})]=-i\hbar f'(\hat{x}) \leftrightarrow [\hat{x},f(\hat{p})]=i\hbar f'(\hat{p})$$ Under some hypotheses on $f$ the answer is positive. I consider the simplest case below.
If $U$ is a unitary operator on the Hilbert space $H$ and $A: D(A) \to H$ is a self-adjoint operator over the same Hilbert space, form spectral calculus it arises that $$Uf(A)U^{-1} = f(UAU^{-1})\tag{1}$$ for every measurable function $f : \mathbb R \to \mathbb R$.
Regarding momentum $P$ and position $X$ operators over $H= L^2(\mathbb R, dx)$, it holds $$U P U^{-1} =-X\:,\quad U X U^{-1} =P \tag{2}$$ | {
"domain": "physics.stackexchange",
"id": 45996,
"lm_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, operators, momentum, fourier-transform, commutator",
"url": null
} |
hydrostatic-equilibrium
However, Carroll and Ostlie take an approach I haven't been able to understand. At this point they define
$$F_{top} = -(F_{bottom} + dF_P)$$
where $dF_P$ -I'll write it $dF$ hereafter- is called the differential force caused by the change in pressure due to a change in $r$. Substitution into the first equation and a few other steps here ($dF = A dP$) lead to $dP/{dr} = -\rho g$ as needed.
I have had trouble with the following: $dF$ needs to be negative because otherwise $F_{top}$ is greater in magnitude than $F_{bottom}$ which makes no sense- if $|F_t| > |F_b| $ then pressure isn't acting against gravity, is it? Pressure itself would be pushing the cylinder down in that case. ($b$ is 'bottom', $t$ is 'top'.)
But if $dF$ is negative, then the way the (second) equation is written makes no sense. Wouldn't it make more sense to say $F_t = -F_b + dF$ ? | {
"domain": "astronomy.stackexchange",
"id": 4113,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "hydrostatic-equilibrium",
"url": null
} |
python, tkinter, gui
from tkinter import filedialog
from tkinter.scrolledtext import ScrolledText
import pandas as pd
import tkinter as tk
import os
import re
import sys
################ FUNCTIONS ################
def save_to_file(wordlist):
"""Save list to CSV format and save CSV to script directory"""
script_directory = os.path.dirname(sys.argv[0]) # Path where script is being run from
df = pd.DataFrame(data={"Results": wordlist})
df.to_csv(script_directory+"/mycsv.csv", sep=",", index=False, line_terminator='\n')
def print_to_textbox(wordlist):
"""Print all lines in wordlist to textbox"""
for lines in wordlist:
text_box.insert("end", "\n"+lines)
if len(wordlist) == 0:
text_box.insert("1.0", "\nNothing To Display") | {
"domain": "codereview.stackexchange",
"id": 39601,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, tkinter, gui",
"url": null
} |
Oi:t"t@Zd1=sb+w]n2^/
Explanation
O % produce literal 0. Initiallizes count of co-prime pairs.
i % input number, say N
: % create vector 1, 2, ... N
t % duplicate of vector
" % for loop
t % duplicate of vector
@ % loop variable: each element from vector
Zd % gcd of vector and loop variable. Produces a vector
1=s % number of "1" in result. Each "1" indicates co-primality
b+w % accumulate into count of co-prime pairs
] % end
n2^/ % divide by N^2
• Couldnt you be even shorter with an approach like the one I used in octave? – flawr Dec 27 '15 at 0:11
• Indeed! Thank you! 3 bytes less. You should have done it yourself in MATL :-) – Luis Mendo Dec 27 '15 at 4:33
• I would have tried if it wasn't way past my bedtime=) – flawr Dec 27 '15 at 9:30
# Samau, 12 bytes
Disclaimer: Not competing because I updated the language after the question was posted. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104967684475,
"lm_q1q2_score": 0.8135491362002469,
"lm_q2_score": 0.8418256412990657,
"openwebmath_perplexity": 3691.9333193422767,
"openwebmath_score": 0.5103477835655212,
"tags": null,
"url": "https://codegolf.stackexchange.com/questions/67773/co-primality-and-the-number-pi/71027"
} |
statistical-mechanics
Does this mean, if I have a system consisting of s particles, that there is an interaction with a particle outside my system? So my system is not closed? No, this is talking about correlations between s random particles. The s-particle distribution function is a 2*d*s (so 6s in 3 dimensional space) dimensional PDF that statistically describes s particles. For s=1, this is just the normal density in phase space. For s=2, this might show, for example, that more often than not two particles are traveling away from each other (maybe they just collided). A good source for this is Ch. 2 in "The Statistical Physics of Particles" by Mehran Kardar. | {
"domain": "physics.stackexchange",
"id": 15957,
"lm_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",
"url": null
} |
file-system, windows, powershell, active-directory
# Option to continue or cancel the script
$Continue = Read-Host -prompt "Does this look correct? Y or N?"
If (($Continue -eq "N") -or ($Continue -eq "No")) {
Write-Host "Please Start over. This Script is now Exiting. `r`n" -Foreground "White" -Background "Red"
Exit
}
else {
Write-Host "Make sure to verify all folders and and AD Groups once complete. `r`n" -Foreground "Yellow" -Background "Black"
}
#Ensure ActiveDirectory module is imported
Import-Module ActiveDirectory
#Set additional values based off of answers to the previous questions. This allows the correct formatting to be used.
$FileShareFull = $Server -replace '\s'
$NameFull = $NAME -replace '[\s_\\]+'
$ADNameRO = "FS-$FileShareFull-$NameFull-RO".toupper()
$ADNameRW = "FS-$FileShareFull-$NameFull-RW".toupper()
$ADGroupPath = $Path.toupper() | {
"domain": "codereview.stackexchange",
"id": 20195,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "file-system, windows, powershell, active-directory",
"url": null
} |
quantum-mechanics, energy, time, momentum, operators
I wouldn't call it "momentum in the direction of time" because that phrase, at least to me, implies that energy is more momentum-like than it really is. | {
"domain": "physics.stackexchange",
"id": 4467,
"lm_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, energy, time, momentum, operators",
"url": null
} |
general-relativity, gravity, length-contraction
The $dr$ in the bottom diagram is the distance in Schwarzschild coordinates while the $dr$ in the top diagram is the distance you'd measure with a ruler, and it's obviously bigger than the Schwarzschild $dr$.
I suppose in this sense you could claim that the ruler is length contracted near to the black hole, because it takes more rulers than you expect to cover the distance $dr$.
If you want the gory details, including an equation for how to calculate lengths measured towards the event horizon then see the questions:
How much extra distance to an event horizon?
How to calculate spatial distance in space-time?
The measured distance, s, between the two Schwarzschild radii $r_1$ and $r_2$ is given by:
$$ s = \left[ r\sqrt{1-\frac{r_s}{r}} + \frac{r_s}{2} log \left( 2r \left( \sqrt{1-\frac{r_s}{r}} + 1 \right) - r_s \right) \right]_{r_1}^{r_2} $$ | {
"domain": "physics.stackexchange",
"id": 17450,
"lm_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, gravity, length-contraction",
"url": null
} |
javascript, php, jquery, ajax, api
My guess is that your biggest bottleneck is this line (I have nothing to back this up, just a guess):
@file_get_contents("http://api.justin.tv/api/stream/list.json?channel={$index}", 0, null, null);
According to the docs the data in the list function is cached for 60 seconds. So no reason to poll more often than that. http://apiwiki.justin.tv/mediawiki/index.php/Stream/list. Polling more often is just wasting resources.
As an aside, as a general rule you should try to limit your use of global variables. Not sure if this would affect any of the performance problems so I won't go into specifics on that unless asked. | {
"domain": "codereview.stackexchange",
"id": 2640,
"lm_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, php, jquery, ajax, api",
"url": null
} |
ros
From this, I get the error AttributeError: 'Pose' object has no attribute 'pose'. Any ideas why?
Comment by Tristan9497 on 2021-03-16:
Good thing you included the try except block, look up transforms are often failing so you will not get errors.
First i recommend to remove the while loop out of the sub function otherwise you'll be stuck there forever if the transformation is not available.
Can you show me where you build the pose attribute you put into do_transform_pose as self.pose?
like the error says you are trying to access an attribute pose that is not available. Check if that is even defined or out of scope.
Furthermore what is required_position? This should be the odometry frame.
Other than that i think this is going into the right direction.
Comment by Py on 2021-03-16:
Ok thanks for the info. Glad it's going in the right direction! Good plan - I'll take out the while loop. The required_position is set as the odom frame when the function is used. | {
"domain": "robotics.stackexchange",
"id": 36124,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
ros, ros2, colcon
Title: CMake error when building rclcpp
I got some errors when building rclcpp using colcon build. The error message is shown below. Any idea where the problem is? I had sourced ${ROS_WS}/install/setup.bash before running colcon build.
root@48fcb45ebd09:/opt/ros_ws# cat log/latest_build/rclcpp/stderr.log
CMake Error at test/CMakeLists.txt:3 (find_package):
By not providing "Findtest_msgs.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"test_msgs", but CMake did not find one.
Could not find a package configuration file provided by "test_msgs" with
any of the following names:
test_msgsConfig.cmake
test_msgs-config.cmake
Add the installation prefix of "test_msgs" to CMAKE_PREFIX_PATH or set
"test_msgs_DIR" to a directory containing one of the above files. If
"test_msgs" provides a separate development package or SDK, be sure it has
been installed. | {
"domain": "robotics.stackexchange",
"id": 36083,
"lm_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, ros2, colcon",
"url": null
} |
experimental-physics, gravitational-waves, vibrations, gravitational-wave-detectors
Title: Can the vibrations from the Earth affect gravitational wave detectors? I was very interested in gravitational wave detectors and how they work exactly. From what I know they set up two lasers with mirrors set up to cancel each other out. Then if movement is detected from gravitational wave changes then light from the laser can pass through.
So can't vibrations of the earth or some other medium of energy be affecting this like changes in air pressure, earth plate movement, etc.? Summary Yes they can. False positives arising from the acoustic sources you name are ruled out by seismological analysis and the examination of correlation between the separate gravitational wave detection stations. | {
"domain": "physics.stackexchange",
"id": 55487,
"lm_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, gravitational-waves, vibrations, gravitational-wave-detectors",
"url": null
} |
ne.neural-evol, genetic-algorithms
For mutation, the general rule of thumb has always been to mutate each allele independently with probability 1/n. Like any heuristic, that's only a starting point, and you should let experiment guide you in making any adjustments, but if I'm understanding you correctly, you have 192 alleles, so a 4% mutation rate gives an expectation of about 8 mutations per individual, which I would guess is too high.
Or do you mean you make a single mutation to 4% of the generated offspring? If that's the case, it's probably too low. I'd start with a method that mutates every single individual by a randomly selected amount, with the expected amount being one flip. Some individuals will get two or three flips, others will not be altered at all. | {
"domain": "cstheory.stackexchange",
"id": 1138,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ne.neural-evol, genetic-algorithms",
"url": null
} |
gauge-theory, group-theory, quantum-electrodynamics
In turn after all of this, we may look to the theory of such a vector field $A_\mu$ and a fermion field $\psi$ and observe that what actually happend is that the free $\psi$ theory had one global $U(1)$ symmetry and the inclusion of $A_\mu$ promoted it to a local symmetry. One may then try to generalize this: what if we have a theory with global symmetry characterized by some Lie group $G$ and we try to make it local? It turns out that one has to introduce one analogous $A_\mu$ which is now seem to be $\mathfrak{g}$-valued where $\mathfrak{g}$ is the Lie algebra of $G$. In this way one lands on non-abelian gauge theories. | {
"domain": "physics.stackexchange",
"id": 85690,
"lm_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, group-theory, quantum-electrodynamics",
"url": null
} |
general-relativity, quantum-gravity, qft-in-curved-spacetime
He then mentions that well-posedness is not trivial to satisfy, since the straightforward generalizations to curved spacetime of fields of spin $s > 1$ are not well-posed (this is shown in pages 374-375 of Wald's General Relativity). Quoting page 375 of General Relaivity, "for $s > 1$ there is no natural generalization to curved spacetime of the notion of a 'pure' massless spin $s$ field".
What I find particularly surprising in these remarks is that linearized gravity is described by a spin $s = 2$ field. Hence, if I've read these statements correctly, they imply that one cannot describe the "propagation of free gravitons" on curved backgrounds (where I use quotation marks because I do not mean to imply a particle interpretation, but rather a quantized perturbation). | {
"domain": "physics.stackexchange",
"id": 81326,
"lm_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, quantum-gravity, qft-in-curved-spacetime",
"url": null
} |
python, tkinter
class Game(object):
def __init__(self):
self.colors = ["green", "red", "yellow", "blue"]
self.i = 0
self.round = 1
self.moves = []
self.cpu_moves = []
self.btns = []
for row in range(2):
Grid.rowconfigure(frame, row, weight=1)
for col in range(2):
Grid.columnconfigure(frame, col, weight=1)
btn = Button(frame, width=150, height=150, bg=self.colors[0],
command=lambda b=self.i: self.user_select(b))
btn.grid(row=row, column=col)
self.btns.append(btn)
self.colors.remove(self.colors[0])
self.i += 1 | {
"domain": "codereview.stackexchange",
"id": 37796,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, tkinter",
"url": null
} |
ros2
Originally posted by guru_florida with karma: 280 on 2019-12-21
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by gvdhoorn on 2019-12-22:
I'm not entirely sure where right now, but I would suggest to report this to a GH issue tracker of one the repositories hosting this infrastructure, as I agree with you this does not seem like a proper way to handle this, and ROS Anwers Q&As like this one do not really work very well as bug reports.
Comment by guru_florida on 2019-12-22:
You're right. I thought the same after I wrote this and found the right repo ros2/rcl. Still worth keeping this for the next user though. ;)
https://github.com/ros2/rcl/issues/553 | {
"domain": "robotics.stackexchange",
"id": 34182,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2",
"url": null
} |
inorganic-chemistry, bond, electronegativity
But in the case of $\ce{NCl3}$, you can notice there is a lone pair on the central $\ce{N}$ atom. Most importantly, there is an introduction of vacant low lying $\ce{3d}$ orbital of $\ce{Cl}$ where the lone pair of $\ce{N}$ can delocalise. This effect is known as $\ce{p\pi-d\pi}$ backbonding. So, due to this backbonding, which is quite strong, the bond between $\ce{N}$ and $\ce{Cl}$ adopts a significant double bond character.
Although the electronegativity difference is decreased in the case of $\ce{NCl3}$ and bond pair is shifted away from central $\ce{N}$, this introduction of double-bond character increase the repulsion between the bond pairs even more, and that's why the bond angle increases. | {
"domain": "chemistry.stackexchange",
"id": 14407,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, bond, electronegativity",
"url": null
} |
the abstract definitions and calculations of probability. 125) plus the probability of getting 1 head (0. You can now earn points by answering the unanswered questions listed. However, all tests are written by humans, and human nature makes it impossible for any test to be truly. Multiple choice questions> Answer the following questions and then press 'Submit' to get your score. What's the probability of getting all the correct answer in a 4 choice of 25 multiple choice questions? If someone does not know the answers of all the questions, and he sat for an examination consisting multiple choice. This feature is not available right now. To pass the test a student must get 60% or better on the test. In how many ways can a president and vice president be selected from a club of 20 students? Show all work! A) 20 B) 39 C) 40 D) 380. Hope you can help me to get the hang of it. The marking on the ball will determine her answer to the question. Multiple Choice: Multiple Choice This activity | {
"domain": "rk-verlag.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232899814556,
"lm_q1q2_score": 0.8147003584810419,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 403.91889231761394,
"openwebmath_score": 0.5498582124710083,
"tags": null,
"url": "http://uoya.rk-verlag.de/probability-of-getting-multiple-choice-questions-right.html"
} |
# Induction Proof
## Homework Statement
Ʃ 1/√k ≥ 1/√n (under sigma should be "k=1" and above should be "n", and n is a positive integer)
## The Attempt at a Solution
I. Base case when n=1 is correct.
II. Inductive Hypothesis: Assume true for k=m, where k<m<n, m is a positive integer.
III. Ʃ 1/√m + 1/√m+1 ≥ 1/√n, since Ʃ 1/√m ≥ 1/√n, and Ʃ 1/√m + 1/√m+1 ≥ Ʃ 1/√m.
By the principle of induction, Ʃ 1/√k ≥ 1/√n.
(I'm sorry for leaving out some subscripts under epsilon. I couldn't find how to get k=1 under there or "n" above).
## The Attempt at a Solution
Related Calculus and Beyond Homework Help News on Phys.org
You are on the right track, but I find your presentation a little unclear.
You should start by saying the result it true for n = 1.
Then you assume ##\sum_{k = 1}^n (1/\sqrt{k}) \ge 1/\sqrt{n}##. Given this assumption you must show that ##\sum_{k = 1}^{n+1} (1/\sqrt{k}) \ge 1/\sqrt{n+1}##. This is not what you wrote in your step 3. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9559813501370535,
"lm_q1q2_score": 0.8339478131018261,
"lm_q2_score": 0.8723473663814338,
"openwebmath_perplexity": 534.1638370411099,
"openwebmath_score": 0.766269862651825,
"tags": null,
"url": "https://www.physicsforums.com/threads/induction-proof.715878/"
} |
the steady-state heat flow, described by the equation ∇2T = 0, where T = T(x,y,z) is the temperature distribution of a certain body. 21 Scanning speed and temperature distribution for a 1D moving heat source. Implicit Time Marching and the Approximate Factorization Algorithm 7. Core Criteria: (a) Given a difierential equation, determine if the equation is linear or non-linear. To this end, first the governing differential equations discussed in Chapter 1 are expressed in terms of polar coordinates. In particular, the computational complexities of the Chebyshev--Galerkin method in a disk and the Chebyshev. At each integer time unit n, the heat at xat time nis spread evenly among its 2dneighbours. In this Parametric Curve, we vary parameter s from the initial angle of the spiral, theta_0, to the final angle of the spiral, theta_f=2 \pi n. Since there is no dependence on angle Θ, we can replace the 3D Laplacian by its two-dimensional form, and we can solve the problem in radial and axial | {
"domain": "clodd.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.990874360724436,
"lm_q1q2_score": 0.8382226737020003,
"lm_q2_score": 0.845942439250491,
"openwebmath_perplexity": 860.6210905666301,
"openwebmath_score": 0.8832836747169495,
"tags": null,
"url": "http://rlle.clodd.it/2d-heat-equation-in-polar-coordinates.html"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.