text stringlengths 1 1.11k | source dict |
|---|---|
cc.complexity-theory, reference-request, survey, books, p-vs-np
So my advice is this: Take your time in knowing the problem. Every time you figure out a solution, assume you are wrong somehow and try to find the problem with it. That way you'll learn much.
As for references, I would recommend Sipser's book as well. After finishing it, I would recommend "Computational Complexity:A modern approach" by Arora and Barak, a more complexity-oriented book, that requires a good understanding of the concept of computation. | {
"domain": "cstheory.stackexchange",
"id": 2228,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, reference-request, survey, books, p-vs-np",
"url": null
} |
deep-learning, transformer
The source sequence would be How are you <EOS>
The input to the encoder would be How are you <EOS>. Note that there is no <start> token here.
The target sequence would be I am fine <EOS> . The output of the decoder will be compared against this in the training.
The input to the decoder would be <start> I am fine <EOS>.
Notice that the input to the decoder is the target sequence shifted one position to the right by the token that signals the beginning of the sentence. The logic of this is that the output at each position should receive the previous tokens (and not the token at the same position, of course), which is achieved with this shift together with the self-attention mask. | {
"domain": "datascience.stackexchange",
"id": 9039,
"lm_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-learning, transformer",
"url": null
} |
quantum-field-theory, mass, quantum-electrodynamics, renormalization, dimensional-analysis
Lorentz covariance dictates that the tensor structure $\Pi^{\mu\nu}$ comes from either $p^{\mu}p^{\nu}$ or $g^{\mu\nu}$.
We can therefore Taylor expand around $p=0$:
$$\begin{align} \Pi^{\mu\nu}(p,m)~=~&A(m) g^{\mu\nu}\Lambda^2\cr
&+ \{B(m) g^{\mu\nu}p^2 + C(m) p^{\mu}p^{\nu}\} \ln\Lambda \cr
&+ \text{finite terms},\end{align}\tag{1} $$
where $\Lambda$ is a UV momentum cut-off.
Then by differentiation:
$$\begin{align} \frac{\partial\Pi^{\mu\nu}(p,m)}{\partial m}~=~&A^{\prime}(m) g^{\mu\nu}\Lambda^2\cr
&+ \{B^{\prime}(m) g^{\mu\nu}p^2 + C^{\prime}(m) p^{\mu}p^{\nu}\} \ln\Lambda \cr
&+ \text{finite terms}.\end{align}\tag{2} $$
The LHS of eq. (2) has SDOD $D=1$, so the singular terms$^1$ on the RHS of eq. (2) must vanish. This answers OP's question: The divergent terms do not depend on the fermion mass $m$.
Let us mention for completeness that from a Ward identity, we know that the vacuum polarization should be transversal, so in fact
$$ A~=~0, \qquad B + C ~=~0.$$
References: | {
"domain": "physics.stackexchange",
"id": 85377,
"lm_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, mass, quantum-electrodynamics, renormalization, dimensional-analysis",
"url": null
} |
performance, c, brainfuck
fclose(f);
return 1;
}
while(!feof(f)){
switch (fgetc(f)) {
case '<':
pos = (pos - 1) & 0xFFFF;
break;
case '>':
pos = (pos + 1) & 0xFFFF;
break;
case '[':
++brackets;
ret = snprintf(outbuffer, buflen, "%swhile(mem[%d]){", outbuffer, pos);
if (ret < 0 || ret >= buflen) {
fprintf(stderr, "Internal compiler error.\n");
free(outbuffer);
fclose(f);
return 1;
}
break;
case ']':
--brackets;
ret = snprintf(outbuffer, buflen, "%s}", outbuffer);
if (ret < 0 || ret >= buflen) {
fprintf(stderr, "Internal compiler error.\n");
free(outbuffer);
fclose(f); | {
"domain": "codereview.stackexchange",
"id": 22673,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, c, brainfuck",
"url": null
} |
quantum-mechanics, electrons
As far as the mathematics goes there is only the probability and no continuity between two space points so that a classical velocity could be defined.
They can only have discrete amount of energies (energy levels). If it doesn't have enough energy to go to higher energy level,
The electron remains at its energy level, unless a photon with the appropriate energy hits the atom. Orbitals might mathematically overlap in space, particularly if there are many electrons, this does not mean there is an energy exchange, it just means that the probabilities of two energy orbital can overlap in space. Only if there is a probability for an energy transfer to a lower state then the space overlap has a meaning. This is how electron capture happens with nuclei , the S level overlaps with the nucleus and there exists a probability for the electron to be captured by a proton given the energy balances of the system.
it will come back to the lower one. This happens instantaneously. | {
"domain": "physics.stackexchange",
"id": 35499,
"lm_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, electrons",
"url": null
} |
waves
Title: Why inversion of wave for rope fixed at one end? Setup: A rope is fixed at one end to a wall. You swing the other end up and down once. A wave starts travelling. It moves, hits the wall, then flattens, then is created again underneath (inversed), and then starts travelling back. The inversion itself makes sense. The wall responds with a force downwards on the rope when the wave in the rope tries to pull the wall upwards to continue (Newtons 3rd law). But why is there a delay?
At the point where the wave is perfectly flat, what is in that exact moment pulling the rope downwards? In that moment the wave is not pushing the wall upwards anymore, so the wall will also not give any force. Or am I wrong? Where to has the energy in the travelling wave been converted which gives it back to the rope in the flattened moment? Putting comment into answer, as requested: | {
"domain": "physics.stackexchange",
"id": 17730,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves",
"url": null
} |
discrete-signals, statistics, adaptive-filters, adaptive-algorithms
$$y[n]=h[n]*u[n]+\nu[n]$$
$y[n]$ and $u[n]$ are known and $\nu[n]$ is an additive noise component.
With a long enough FIR filter you can model any linear system $h$ with any accuracy. You can opt for a shorter filter length in expense of limited modelling accuracy. A key parameter is the sampling rate of the signals. If the signals are over sampled unnecessarily then the required length for $w$ increases.
Suppose that we settle for a certain modelling accuracy and we want to find $w$. If all the samples of $u[n]$ are available and $h$ remains constant you can find an estimate of $h$ namely $w$ using a least square estimation. This estimation will have a limited accuracy. But it is the best you can do. This error is referred to as the Least square error which here I (a bit wrongly) consider the same as Mean Square Error (MSE error). | {
"domain": "dsp.stackexchange",
"id": 8725,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discrete-signals, statistics, adaptive-filters, adaptive-algorithms",
"url": null
} |
work, potential, voltage, batteries
Title: I don't understand something about battery voltage I'm trying to understand voltage and there is a site that says that the battery do work to a positive charge to move it from the low potential terminal (negative) to the high potential terminal (it gains potential energy doing that):
"The battery simply supply the energy to do work upon the charge (positive charge) to move it from the negative terminal to the positive terminal. By providing energy to the charge, the cell is capable of maintaining an electric potential difference across the two ends of the external circuit."
(from the beginning of the fifth paragraph from this site : http://www.physicsclassroom.com/class/circuits/Lesson-1/Electric-Potential-Difference ) | {
"domain": "physics.stackexchange",
"id": 36071,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "work, potential, voltage, batteries",
"url": null
} |
experimental-physics, conventions, error-analysis, data-analysis, data
Title: Standard convention for $x$ error bars What is the standard convention regarding the error bars of the independent quantity in a graph? In what situations should I show the $x$ error bars? In case both $x$ and $y$ uncertainties are comparable or neither can be disregarded, should I show both or only the greater one?
I know this matter is more related to aesthetics and convenience, but I wonder if there is more straight rule for that. If you are measuring y at some value x, and both quantities have uncertainty, then in principle you should show the uncertainties on both axes.
In some circumstances you might omit the x error bars. This would be the case if the y value depends on x such that
$$\Delta y \gg |dy/dx| \Delta x,$$
where $dy/dx$ is your best estimate of the gradient of $y(x)$. In other words, where y changes by much less than its error bar over a change in x equal to the x error bar. | {
"domain": "physics.stackexchange",
"id": 32205,
"lm_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, conventions, error-analysis, data-analysis, data",
"url": null
} |
non-linear-systems, linear-systems
Title: Are all systems really non-linear? A few years ago I had a course on control and systems engineering. In one of the first chapters of the book we used, it was stated that "all physical systems are nonlinear".
When discussing this in class, the professor said that he wasn't really convinced that this statement was true. If I remember it correctly, he made a case along the lines of "maybe all systems are linear, but we don't want to deal with or understand the additional dynamics". | {
"domain": "physics.stackexchange",
"id": 74428,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "non-linear-systems, linear-systems",
"url": null
} |
imu, navigation, odometry, ros-kinetic, robot-localization
0, 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3] | {
"domain": "robotics.stackexchange",
"id": 30758,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "imu, navigation, odometry, ros-kinetic, robot-localization",
"url": null
} |
special-relativity, visible-light
Title: Einstein's elevator : factor 2 missing between SR and GR Reading Semon et al. (2009) (https://doi.org/10.1119/1.3088883), I have found this:
"The reason the historical approach
is not generally used in advanced texts is that although
the examples of a uniformly accelerating elevator and
a rotating material disk were instrumental in the development
of Einstein’s thought as he was creating the theory of
general relativity, the examples are problematic when analyzed
with the mathematical formalism of the completed
theory. For example, using the accelerating elevator to predict
the bending of light in a gravitational field leads to a
result that differs by a factor of 2 from that predicted by the
field equations of general relativity (and verified by experiment
)."
Do you understand what the author is saying ? I would really appreciate to compare the calculations and see the missing factor 2. And understand why apparently it is not a problem.
Thank you ! | {
"domain": "physics.stackexchange",
"id": 46618,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, visible-light",
"url": null
} |
condensed-matter, crystals
Is this BZ equivalent to the former one and if so how to prove it? Sure there areas are same, but can one to one correspondence of 'k' points be proved?
How do we discretize 'k' points such that the honeycomb BZ is generated? | {
"domain": "physics.stackexchange",
"id": 56808,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "condensed-matter, crystals",
"url": null
} |
typescript, angular-2+, rxjs
Not unsubscribing will result in unnecessary memory consumption and/or can create unexpected sideeffects. The function that should be executed at emits, is stored at the Subject. That means even when your component is long ago destroyed, the function will still "live" at the Subject. And will be executed at each emit...
But you could make unsubscribing a bit nicer with a Subscription Object
private subscriptions: Subscription = new Subscription();
...
this.subscriptions.add( myOberservable.subscribe(value => doMagic(value)) );
this.subscriptions.add( myOtherOberservable.subscribe(value => doMoreMagic(value)) );
...
this.subscriptions.unsubribe() // will unsubscribe all added subscriptions at once | {
"domain": "codereview.stackexchange",
"id": 40862,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "typescript, angular-2+, rxjs",
"url": null
} |
soft-question, education, geometry, linear-algebra, clifford-algebra
of determinants are encoded in the wedge product of arbitrary number of vectors. Cylindrical and spherical coordinate systems are best taught in terms of exponential rotation operators, because students immediately see what are the axis of rotation, the angle of rotation, and the vector to be rotated. Vector calculus is also simpler because the gradient, divergence, and curl becomes part of a single spatial derivative operator which may act on scalars or vectors. This becomes very useful when we want to combine all the four Maxwell's equations into one. I think, the more one knows too much math such as tensors, spinors, and differential forms, the more it becomes difficult to understand geometric algebra. Geometric algebra is best taught to the little ones. | {
"domain": "physics.stackexchange",
"id": 7490,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "soft-question, education, geometry, linear-algebra, clifford-algebra",
"url": null
} |
java, object-oriented, number-guessing-game
Prompter is not only prompting, it is doing everything. I therefor suggest that you rename Game to Main, and Prompter to Game.
Even though your naming is great, it is a little bit off from time to time. For exmaple:
adminSetup does not setup something that has to do with administration tasks, it initializes the game.
playerSetup does not only setup the player, it also starts the game.
getGuess is not only getting a guess, it loops until the guess is correct.
Functions should be named after what they do, and they should only do that one thing.
String numberOfItems = askQuestion("Maximum of lentils in the jar: ");;
while(isNan(numberOfItems)) {
numberOfItems = askQuestion("Maximum of lentils in the jar: ");
}
jar.setItemName(itemName);
jar.setNumberOfItems(Integer.parseInt(numberOfItems)); | {
"domain": "codereview.stackexchange",
"id": 20879,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, object-oriented, number-guessing-game",
"url": null
} |
general-relativity, black-holes, quantum-gravity, quantum-interpretations
Secondly, GR is not as badly understood as all that, although it is not as well understood as one would like, mostly because numerical methods are in their infancy, and one's intuition must come laboriously from analyzing exact solutions when these are available. The example I gave of particles oscillating into and out of an extremal black hole is not really new (don't give me too much credit), the new thing there is the holographic interpretation, namely that the coming-out is an ordinary coming out event in this universe. The oscillations of particles into and out of a near-extremal black hole were appreciated in the 1960s, but each oscillation takes you to a disconnected branch classically, because crossing a horizon takes an infinite amount of t-time. This is not possible quantum mechanically, since this disconnected maximally extended thing is not compatible with unitarity. | {
"domain": "physics.stackexchange",
"id": 96608,
"lm_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, black-holes, quantum-gravity, quantum-interpretations",
"url": null
} |
quantum-operation, kraus-representation
$$
\Phi(X) = \sum_{k=1}^n A_k X A_k^{\dagger}.
$$
To make the necessary equations clear, let us assume that the channel has the form $\Phi:\mathrm{L}(\mathcal{X})\rightarrow \mathrm{L}(\mathcal{Y})$ for finite-dimensional Hilbert spaces $\mathcal{X}$ and $\mathcal{Y}$. Let us also define $\mathcal{Z} = \mathbb{C}^n$; the complementary channel we will define will take the form $\Psi:\mathrm{L}(\mathcal{X})\rightarrow \mathrm{L}(\mathcal{Z})$. (For the channel in the question itself, we will have $\mathcal{X}$, $\mathcal{Y}$, and $\mathcal{Z}$ all equal to $\mathbb{C}^2$, but it helps nevertheless to assign different names to these spaces.)
Define an operator
$$
A = \sum_{k=1}^n A_k \otimes | k\rangle,
$$
which is a linear operator mapping $\mathcal{X}$ to $\mathcal{Y}\otimes\mathcal{Z}$. This gives us a Stinespring representation
$$
\Phi(X) = \operatorname{Tr}_{\mathcal{Z}} \bigl( A X A^{\dagger}\bigr).
$$
The channel
$$ | {
"domain": "quantumcomputing.stackexchange",
"id": 3624,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-operation, kraus-representation",
"url": null
} |
moveit
log file: /home/unais/.ros/log/6883204e-309a-11e3-b71a-0c6076593c99/move_group-1*.log
Originally posted by unais on ROS Answers with karma: 313 on 2013-10-08
Post score: 0
The error message is pretty explanatory -- the controller is unable to connect to the action specified. Does your driver actually expose a FollowJointTrajectoryAction interface named arm_controller/follow_joint_trajectory?
Originally posted by fergs with karma: 13902 on 2013-10-08
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by unais on 2013-10-08:
hi, fergs .. I have not get an idea. Is it I need to edit any launch file? . As a newbe to move it I can't able to understand the naming . What can i do to overcome this issue?
Comment by fergs on 2013-10-08:
You need to post more information for anyone to be able to help -- you have posted nothing about what robot/drivers you are using, or any details of your launch files or controllers.yaml. | {
"domain": "robotics.stackexchange",
"id": 15799,
"lm_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",
"url": null
} |
fruit, measurement, decay
Title: A way to measure ripeness of a fruit I'm doing an experiment how fast fruits ripen and decay
I'm wondering how to measure the ripeness of a fruit(banana, mango, tomato, kiwi etc.) so that I will get a quantitative results.
I have looked at using penetrometer to see how squishy it is. Is there any other ways to do it?
If not, I'm thinking of getting qualitative results. Is there any tips of making good qualitative results?
thanks
Sorry, I am not sure if this falls into Biology category Asides from just eyeballing the change in color/consistency, Wikipedia suggests using iodine for a qualitative measurement (though without reference): | {
"domain": "biology.stackexchange",
"id": 6717,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fruit, measurement, decay",
"url": null
} |
ros, ros-comm, log4cxx, update
and
sudo apt-get autoremove
together with erasing build dirs and rebuilding in my workspace by (in the catkin_ws folder:)
rm -r devel
rm -r build
catkin_make
solved the issue...
(See http://answers.ros.org/question/120541/problem-of-running-rosrun-turtlesim-turtlesim_node/?answer=120596#post-id-120596)
Originally posted by Wolf with karma: 7555 on 2014-01-23
This answer was ACCEPTED on the original site
Post score: 5
Original comments
Comment by katsumoto on 2014-01-23:
Problem solved. Thanks.
Comment by carsten on 2014-01-23:
Had the same problem after upgrading hydro-packages. Now solved. Thank you.
Comment by Mago Nick on 2014-01-26:
I Still get the error, I am running ubuntu 12.04 LTS, any suggestions? | {
"domain": "robotics.stackexchange",
"id": 16738,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-comm, log4cxx, update",
"url": null
} |
matlab, beamforming
clear all
close all
N = 10;
n = (-(N-1)/2:(N-1)/2).';
theta = pi*(-1:0.001:1);
u = cos(theta);
d = 1/2;
vv = exp(j*2*pi*d*n*u);
theta_T = 30/180*pi;
w = 1/N*ones(N,1).*exp(j*n*pi*cos(theta_T));
B = w'*vv;
B = 10*log10(abs(B).^2);
figure
h=polardb(theta,B,-40);
hold off
While not a big deal, you actually are using MPDR (see Van Trees) not MVDR when you include the desired signal in the covariance matrix. It only matters if you don't exactly steer in that direction. To be honest, most of the literature doesn't make the distinction but the terms optimal and adaptive have been muddled for decades.
As the @Hkxs points out, you are using both time and frequency domain features to your code. MVDR is a narrowband beamformer usually taken at the same temporal DFT bin from each sensor. The temporal signal is not necessary to calculate the beam pattern and if you want to retain that feature, to steer by phase multiplication,
signal = exp(1j*2*pi*Fc*t); | {
"domain": "dsp.stackexchange",
"id": 6110,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, beamforming",
"url": null
} |
forces, work, definition, power, calculus
But I wanted a proper proof not involving differentials! The work $W$ is not equal to $F\cdot x$ generally. The correct form is
$$W=\int F \cdot dx$$
So $dW=F\cdot dx$ and $P=\dfrac{dW}{dt}=F\cdot\dfrac{dx}{dt}=F\cdot v$ | {
"domain": "physics.stackexchange",
"id": 41811,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, work, definition, power, calculus",
"url": null
} |
• "To be picky, induction should be needed" Why so ? – user8277998 Nov 11 '17 at 22:13
• @DuncanRamage That's why I said “to be picky”; just be aware that induction is being used (and its formalization in the present case is trivial). – egreg Nov 11 '17 at 23:08
• @123 and DuncanRamage: "Performing the row reduction of type ..." is actually not a single row reduction, but $n-1$ row reductions applied in a row (no pun intended). And the order of these reductions matters. So, yes, there is a hidden induction in your proof, unless you replace the $n-1$ row reductions by a multiplication by some triangular matrix (recommended if you want to formalize the proof). – darij grinberg Nov 12 '17 at 6:38 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9711290863690796,
"lm_q1q2_score": 0.8154900788711112,
"lm_q2_score": 0.8397339656668286,
"openwebmath_perplexity": 297.5474686662399,
"openwebmath_score": 0.8135237097740173,
"tags": null,
"url": "https://math.stackexchange.com/questions/2515679/a-simple-determinant-determinant-of-a-companion-matrix"
} |
recursion, vb.net, overloading
Dim wsList As New List(Of Worksheet)
Try
For Each wb In SearchBooks
For Each ws In wb.Worksheets
wsList.Add(ws)
Next
loFound = Me.GetTable(SearchName:=SearchName, SearchSheets:=wsList.ToArray, ExactMatch:=ExactMatch)
If Not loFound Is Nothing Then Return loFound
Next
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Return Nothing
End Function
Public Overloads Function GetTable(ByVal SearchName As String, ByVal SearchApps() As Microsoft.Office.Interop.Excel.Application, Optional ByVal ExactMatch As Boolean = False) As ListObject
Dim loFound As ListObject
Dim wbList As New List(Of Workbook)
Try
For Each app In SearchApps
For Each wb In app.Workbooks
wbList.Add(wb)
Next | {
"domain": "codereview.stackexchange",
"id": 14658,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "recursion, vb.net, overloading",
"url": null
} |
they could be graphed on the Cartesian (rectangular) coordinate system. This calculator converts between polar and rectangular coordinates. Use power reducing formulas 9. now the rest is a matter of simplification:. In the entry line, type cos(t) All of the trigonometric functions and the inverse trigonometric functions can be found in the trigonometry section of the catalog. ; Daniels, Callie, ISBN-10: 0321671775, ISBN-13: 978-0. Find exact values of composite functions with inverse trig functions 8. We're converting from rectangular form to trigonometric form and we're starting with the complex number z equals negative root 2 plus i times root 2. Trigonometric substitution. Search this site. I'm not looking for the answer here. 1 Answer Cesareo R. 1 Complex Numbers 8. Parametric curves have a direction of. x =3cosθ and y =4sinθ, 02≤θ≤ π by eliminating the parameter finding the corresponding rectangular equation. Write the equations of the circle in parametric form. Thank you for | {
"domain": "outdoortown.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517456453798,
"lm_q1q2_score": 0.8646361687069855,
"lm_q2_score": 0.8840392878563336,
"openwebmath_perplexity": 665.260664865313,
"openwebmath_score": 0.822030246257782,
"tags": null,
"url": "http://aipc.outdoortown.it/parametric-to-rectangular-with-trig.html"
} |
quantum-mechanics, lagrangian-formalism, gauge-theory, topology, quantum-anomalies
This means that there must be a non-unique ground state somewhere in $\theta\in[0,2\pi)$ by the following reasoning (I'm merely rephrasing the authors' argument on page 23 a bit more explicitly):
As we vary $\theta$ smoothly, the energy of the ground state we start with also varies smoothly. We also know that the theory is truly $2\pi$ periodic when we turn the background $A$ off, i.e. reaches the same spectrum again. Since in principle one can scale the energy levels as far apart as one likes, there is a version of this theory where the partition function is strongly dominated by the ground state, but anomaly hasn't shrunk at all, so it looks as if the "ground state" has changed. | {
"domain": "physics.stackexchange",
"id": 58541,
"lm_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, lagrangian-formalism, gauge-theory, topology, quantum-anomalies",
"url": null
} |
arduino, ros-kinetic
void loop()
{
nh.spinOnce();
delay(1);
}
Is that right ? , and should I just
change PWM to x in the code ??
Originally posted by hamzh.albar@gmail.com on ROS Answers with karma: 35 on 2018-07-22
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 31320,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "arduino, ros-kinetic",
"url": null
} |
combustion
$$\ce{C8H8 ->[O2] 8CO2 + 4H2O}\tag{3}$$
1.000 mole of a gas at STP ( $\pu{0 °C}$ and $\pu{100 kPa}$) has a volume of $\pu{22.711 L/mol}$.
Let's suppose that a huge excess of oxygen gas was used for the combustion. After the combustion the system is brought back to STP, and all the water is present as vapor. So the upper limit of the gaseous products is:
$$V_\mathrm{gas, UL} =3.7446 \times 12\times 22.711 = \pu{1020.52 L} \ce{->[round to 3] \pu{1.20\times 10^3 L}}\tag{4}$$
Now suppose that a stoichometric amount of oxygen gas was used for the combustion. After the combustion the system is brought back to STP, and some of the water is present as vapor, but most is present as the liquid. The vapor pressure of water at $\pu{0 °C}$ is $\pu{0.6113 kPa}$. So the lower limit of the gaseous products is:
\begin{align}
V_\mathrm{gas, LL} &= (3.7446 \times 8\times 22.711) \times \left(\dfrac{\pu{100 kPa}}{\pu{100 kPa} - \pu{0.6113 kPa}}\right) \\ | {
"domain": "chemistry.stackexchange",
"id": 13781,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "combustion",
"url": null
} |
sql-server, r
# Connection Obj ----
con <- dbConnect(
odbc(),
Driver = "SQL Server",
Server = "BMH-HIDB",
Database = "SMSPHDSSS0X0",
Trusted_Connection = "TRUE"
)
# Tables ----
pav <- dplyr::tbl(
con
, in_schema(
"smsdss"
, "BMH_Plm_PtAcct_V"
)
) %>%
filter(
tot_chg_amt > 0
, Dsch_Date >= '2019-01-01'
, Plm_Pt_Acct_Type == "I"
) %>%
select(
Plm_Pt_Acct_Type
, tot_chg_amt
, PtNo_Num
, Pt_No
, Dsch_Date
, from_file_ind
)
pdv <- tbl(
con
, in_schema(
"smsdss"
, "c_patient_demos_v"
)
)
# Query ----
geo_add <- tbl(
con
, in_schema(
"smsdss"
, "c_geocoded_address"
)
)
a <- pdv %>%
left_join(
pav
, by = c(
"pt_id"="Pt_No"
, "from_file_ind" = "from_file_ind"
)
, keep = T
) | {
"domain": "codereview.stackexchange",
"id": 39847,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sql-server, r",
"url": null
} |
classical-mechanics, hamiltonian-formalism, phase-space, constrained-dynamics, poisson-brackets
Title: Dirac bracket for a constrained particle I am trying to work through a simple example of how to use the Dirac bracket from the following paper. In particular section 4 where the authors consider a constrained particle with the following Hamiltonian,
\begin{equation}
H=\frac{\boldsymbol p^2}{2m}+V(\boldsymbol x).\tag{4.4}
\end{equation}
They state that the Dirac brackets for the time evolution of the canonical coordinates are given by,
\begin{equation}
\boldsymbol{\dot x}=\frac{1}{m}[\boldsymbol p-(\boldsymbol p\cdot\boldsymbol n)\cdot \boldsymbol n]=\frac{\boldsymbol p}{m}
\end{equation}
\begin{equation}
\boldsymbol{\dot{p}}=\boldsymbol F-[\boldsymbol F\cdot \boldsymbol n+\frac{1}{m}\boldsymbol p\cdot [(\boldsymbol p\cdot \frac{\partial }{\partial \boldsymbol x})\boldsymbol n]]\boldsymbol n. \tag{4.5}
\end{equation} | {
"domain": "physics.stackexchange",
"id": 25963,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, hamiltonian-formalism, phase-space, constrained-dynamics, poisson-brackets",
"url": null
} |
vba, internet-explorer
And nothing in the Initialize handler. But this whole binding point is moot, I'll get back to why.
There's this Make function:
Public Function Make(...)
The function is being assigned a new instance of HtmlFields, and then that instance is being modified:
Set Make = New HtmlFields
With Make
If tagName = "" Then
Err.Raise 720, "HtmlFields.Make", "tagName cannot be a null string"
End If
.Add "tagName", UCase(tagName)
.Add "className", className
.Add "value", value
.Add "innerText", innerText
.Add "innerHTML", innerHTML
.Add "type", typeName
.Add "title", title
.Add "href", href
.Add "style", style
End With
I like the usage you've made of the With statement, but not how you're using the function's handle as a simple object variable; you and I know that it can be used like that, but it's always better not to. I'd much rather like to see this:
Set result = New HtmlFields
With result | {
"domain": "codereview.stackexchange",
"id": 10585,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, internet-explorer",
"url": null
} |
c#, beginner
// this exists only because the IDE complains about returning a value.
throw new NotImplementedException();
}
private static bool TrustAllCertificates(
object sender,
System.Security.Cryptography.X509Certificates.X509Certificate certificate,
System.Security.Cryptography.X509Certificates.X509Chain chain,
System.Net.Security.SslPolicyErrors errors)
{
return true;
}
private static void DisplayProgramUsage()
{
Console.WriteLine("\r\nDisplays certificate inforamtion about URI\r\n");
Console.Write("{0} URI[:PORT] [/V]\r\n", System.Diagnostics.Process.GetCurrentProcess().ProcessName);
}
private class ProcessingParameter
{
public string Uri { get; private set; }
public int Port { get; private set; }
public bool Verbose { get; private set; }
private ProcessingParameter()
{
Port = 443;
Verbose = false;
} | {
"domain": "codereview.stackexchange",
"id": 23479,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner",
"url": null
} |
c++, performance, beginner, strings, random
const char charset[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','8','9'};
int main()
{
std::cout << "Please enter the number of passwords to generate here: ";
int num_pass;
std::cin >> num_pass;
std::random_device dev;
std::mt19937_64 rng(dev());
std::vector<std::string> passwds;
std::uniform_int_distribution<std::mt19937_64::result_type> dist(0, sizeof(charset) - 1); | {
"domain": "codereview.stackexchange",
"id": 34429,
"lm_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, beginner, strings, random",
"url": null
} |
Let $$x_{0}$$ be a point of maximisation for $$F.$$ Assume $$F$$ is not identically $$0$$ or else $$f$$ is and the problem is trivial. We claim that there exists $$c \in (0, b)$$ such that $$F(c)<0.$$ If $$x_{0}=0$$ or $$b$$ then $$F\leq 0$$ so if $$F$$ is not identically $$0$$ choose an other point of $$(0, b)$$ to be $$c.$$ If $$x_{0} \in (0, b)$$ then since $$g({x}_{0})>0, F(x_{0})< \displaystyle \int_{0}^{x_{0}}F(t)dt \leq x_{0}F(x_{0}).$$
If $$F(x_{0}) \neq 0$$ we get $$x_{0} \geq 1,$$ a contradiction. Hence $$F(x_{0})=0$$ and since $$F$$ is not identically $$0$$ there exists some $$c \in (0, b)$$ such that $$F(c)<0.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109065748189,
"lm_q1q2_score": 0.8543354164533535,
"lm_q2_score": 0.8633916117313211,
"openwebmath_perplexity": 46.023787109297345,
"openwebmath_score": 0.9803618788719177,
"tags": null,
"url": "https://math.stackexchange.com/questions/3627804/show-that-there-is-a-c-in0-1-such-that-fc-int-0cfxdx"
} |
python, game, python-3.x
def lose(gameState):
print("Oh no! You lost! That was your {} time today. Better luck".format(
getOrdinal(gameState.gamesLost * -1)), "next time!")
print("You have played {} games so far, winning {}.".format(
gameState.gamesPlayed, gameState.gamesWon))
return endText(gameState)
def endText(gameState):
print("This give you {}% win and you have a {} game win streak.".format(
gameState.gamesWon // gameState.gamesPlayed * 100,
gameState.winStreak))
while True:
inp = getBoolFromInput("Would you like to play again? ",
None, ("again"), ("notagain"))
if inp is None:
print("Please type yes or no.")
continue
return inp | {
"domain": "codereview.stackexchange",
"id": 11361,
"lm_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, game, python-3.x",
"url": null
} |
c++, game
return 0;
}
Now, I’m not saying this is a good design. If you add more item types, things will get unwieldy very quickly. But it will be thousands of times more efficient than your current design, what with all the dynamic allocation and indirection and so on.
So what would be a better design? Well, rather than dynamic polymorphism… you could use static polymorphism.
It’ll be much easier to show than explain, but the basic idea is that it doesn’t make sense to shoehorn weapons, armour, and potions into some vague “item” type—they’re obviously completely unrelated things that you just happen to want to stick in the same inventory slots. So let’s make it so:
// for brevity, i'm not going to show the COMPLETE classes for the three
// item types, but you should get the gist of it
class Armor
{
std::size_t _name_idx;
int _def;
public:
auto def() const noexcept -> int;
auto to_string() const -> std::string;
}; | {
"domain": "codereview.stackexchange",
"id": 40467,
"lm_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",
"url": null
} |
# Angle of Elevation
6 posts / 0 new
Angle of Elevation
The angle of elevation of a point C from a point B is 29042'; the angle of elevation of C from another point A 31.2 m directly below B is 59023'. How high is C from the horizontal line through A?
$\alpha = 90^\circ - 59^\circ 23' = 30^\circ 37'$
$\beta = 90^\circ + 29^\circ 42' = 119^\circ 42'$
$\theta = 180^\circ - \alpha - \beta = 29^\circ 41'$
$\dfrac{x}{\sin \beta} = \dfrac{31.2}{\sin \theta}$
$x = 54.73 ~ \text{m}$
$y = x \sin 59^\circ 23'$
$y = 47.098 ~ \text{m}$ answer
Thanks a lot sir its a great help.
Thanks a lot sir its a great help. I had another solution using tangent got the same answer..
AB=A'B'=31.2m
AA'=BB'=X
A'C=y=31.2 + y'
y=31.2 + y'
tan 29042'=y'/x
x = y'/ tan 29042'
tan 59023'=y/x
tan 59023'=(31.2+y')/(y'/(tan 29042')
(tan 59023')(y')/(tan29042')=31.2 +y'
2.9625y'-y'=31.2
y'=31.2/1.9625
y'=15.898m
y=31.2 + 15.898
y=47.098m Ans
Yes. also an straightforward solution. | {
"domain": "mathalino.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9926541721216356,
"lm_q1q2_score": 0.825037607858659,
"lm_q2_score": 0.8311430415844385,
"openwebmath_perplexity": 6418.799221957315,
"openwebmath_score": 0.42581722140312195,
"tags": null,
"url": "https://www.mathalino.com/forum/trigonometry/angle-elevation"
} |
everyday-life, material-science, crystals, states-of-matter, ice
Pressure melting and frictional heating can cause a liquid water film to form on top of the ice, while premelting can cause a liquid-like layer to form.
Premelting
Premelting refers to the formation of quasi-liquid layers (QLLs) on the surface of a solid crystal even below its melting point. This quasi-liquid layer forms because molecules on the surface are bonded to fewer other molecules when compared to molecules which are below the surface. Therefore, molecules on the surface are less firmly held in place and can move around more.
Question
If premelting occurs when molecules on the surface of a crystal move around because they are bonded to relatively fewer other molecules, does this happen with other crystals such as sugar at room temperature? | {
"domain": "physics.stackexchange",
"id": 72751,
"lm_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-life, material-science, crystals, states-of-matter, ice",
"url": null
} |
quantum-field-theory, standard-model
In the standard model the dangerous anomaly affects the hypercharge gauge boson (which becomes part of the photon and $Z^0$ after the Higgs mechanism kicks in). The condition that the total anomaly vanishes is
$$ \sum_\text{all doublets} Y_L = 0, $$
and
$$ \sum_\text{left handed} Y_L^3 - \sum_\text{right handed} Y_R^3 = 0, $$ | {
"domain": "physics.stackexchange",
"id": 8771,
"lm_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, standard-model",
"url": null
} |
dirac-equation, antimatter, spinors, helicity
Physically: the right-chiral state $v_1$ has spin pointing in the $+z$ direction. But its momentum is $\textbf p = -p_z \hat z$. Therefore they are antiparallel. Again, right-chiral has left-handed helicity. Next, the left-chiral state $v_2(p)$ has spin pointing in the $-z$ direction. And its momentum is $\textbf p = -p_z \hat z$. Therefore they are parallel. Therefore left-chiral has right-handed helicity.
Fortunately, the mathematical and the physical way of obtaining the result agree. | {
"domain": "physics.stackexchange",
"id": 65953,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dirac-equation, antimatter, spinors, helicity",
"url": null
} |
electricity, electrical-resistance
Title: Does the resistance in the secondary circuit of a potentiometer circuit affect the balance length? I just learnt how potentiometer circuits work, and I was taught that the resistance in the secondary circuit does not change the balance length as no current flows through the secondary circuit and thus the only potential drop is through the EMF of the unknown battery in the secondary circuit. However my proffessor mentioned that if the resistance of bulb x was decreased in this particular arrangement, the balance length would shorter!
The reason he gave was "This is because with a lower resistance
bulb used for X, the current flowing in the lower circuit increases, the voltage drop
across the internal resistor increases, and hence the terminal potential difference | {
"domain": "physics.stackexchange",
"id": 67338,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, electrical-resistance",
"url": null
} |
java, interview-questions, json, csv
2,4,1,78,Shany,Kessler,1983-10-12
2,11,2,162,Loyal,Mertz,1964-11-21
8,10,1,775,Hettie,Kris,1969-1-21
14,1,1,1238,Jon,Pagac,1973-1-16
8,4,1,728,Katrina,Kovacek,1962-5-29
3,12,1,304,Jaime,Barrows,1968-2-25
14,11,1,1337,Casey,Gibson,1988-10-15
12,1,2,1140,Melany,Blanda,1978-1-11
5,2,1,415,Nelda,Hartmann,1973-8-30
10,6,1,990,Nelle,Gislason,1988-2-15
3,12,1,306,Gunnar,Hartmann,1977-7-6
11,6,1,1080,Hoyt,Nikolaus,1987-4-21
... | {
"domain": "codereview.stackexchange",
"id": 32296,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, interview-questions, json, csv",
"url": null
} |
c#, cryptography, aes
/// <summary>
/// Gets or sets the passphrase for use with AES encryption.
/// </summary>
public string Passphrase { get; set; }
/// <summary>
/// Constructs a new instance of <see cref="AesCrypto"/> from the specified values.
/// </summary>
/// <param name="salt">The <see cref="Salt"/> used in encryption.</param>
/// <param name="passphrase">The <see cref="Passphrase"/> used in encryption.</param>
public AesCrypto(byte[] salt, string passphrase)
{
if (string.IsNullOrWhiteSpace(passphrase))
{
throw new ArgumentException($"The parameter {nameof(passphrase)} is required.");
}
if (salt == null || salt.Length == 0)
{
throw new ArgumentException($"The parameter {nameof(salt)} is required.");
}
Salt = salt;
Passphrase = passphrase;
} | {
"domain": "codereview.stackexchange",
"id": 16754,
"lm_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#, cryptography, aes",
"url": null
} |
meteorology, atmosphere
Surely both of my apparatus cannot be wrong.
Is there an explanation for this? They apply a correction to the actual barometer readings and report what the estimated pressure would be at sea level.
Basically they use an imaginary column of air between the barometer and sea level and add its weight to the pressure measured at the barometer.
This lets them make pressure maps instead of just almost altitude maps.
https://www.faa.gov/regulations_policies/handbooks_manuals/aviation/pilot_handbook/media/PHAK%20-%20Chapter%2011.pdf
https://www.ec.gc.ca/manobs/default.asp?lang=En&n=4349ABDA-1 | {
"domain": "earthscience.stackexchange",
"id": 704,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "meteorology, atmosphere",
"url": null
} |
evolution, mutations, sexual-reproduction
It does go on into some theories how it might work.
As for yeast, Rodriguez et al. (2012)
Mismatch repair (MMR) is a major DNA repair pathway in cells from all branches of life that removes replication errors in a strand-specific manner, such that mismatched nucleotides are preferentially removed from the newly replicated strand of DNA. Here we demonstrate a role for MMR in helping create new phenotypes in nondividing cells. We show that mispairs in yeast that escape MMR during replication can later be subject to MMR activity in a replication strand-independent manner in nondividing cells, resulting in either fully wild-type or mutant DNA sequence. In one case, this activity is responsible for what appears to be adaptive mutation. This replication strand-independent MMR activity could contribute to the formation of tumors arising in nondividing cells and could also contribute to mutagenesis observed during somatic hypermutation of Ig genes. | {
"domain": "biology.stackexchange",
"id": 9626,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, mutations, sexual-reproduction",
"url": null
} |
c#, beginner, file
You can use this:
Console.WriteLine("District {0} has {1} citizens", x, countDist[x]);
These lines are a headache:
for (int x = 1; x <= 22; x++)
for (int y = 0; y < districtData.Length; y++)
if (districtData[y] == x)
countDist[x]++;
You should get in the habit of using braces for all for loops and all but the simplest if statements. Also, the variable names x and y aren't very descriptive. Why not rename x to districtCount, and rename y to districtNumber?
for (int districtCount = 1; districtCount <= 22; districtCount++)
{
for (int districtNumber = 0; districtNumber < districtData.Length; districtNumber++)
{
if (districtData[districtNumber] == districtCount)
{
countDist[districtCount]++;
}
}
} | {
"domain": "codereview.stackexchange",
"id": 12801,
"lm_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, file",
"url": null
} |
thermodynamics, fluid-dynamics, acoustics, rocket-science, efficient-energy-use
Title: Sound from a rocket I have been watching programmes commemorating the Apollo 11 mission. One obvious feature of the launch is the sound. It was mentioned that water was sprayed into the pit below the rocket not (primarily) for cooling as you may expect but to prevent the sound energy bouncing back from the concrete and damaging the engines.
I expect that there are very many inefficiencies in a real rocket and far more fuel is required that a naive application of the Tsiolkovsky rocket equation (Wikipedia) would suggest. One of these inefficiencies, probably not the largest, is the energy lost as sound. | {
"domain": "physics.stackexchange",
"id": 59339,
"lm_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, fluid-dynamics, acoustics, rocket-science, efficient-energy-use",
"url": null
} |
javascript, performance, object-oriented, design-patterns
pub can be optimized. PubSub pattern is fire and forget. Fire some event, and the caller doesn't care who receives it. Thus, there is no need to throw an error if the event is in the registry or not.
Also, order of events should never be relied upon. Events can fire at any time, at any order by anyone. Knowing the order means you know who called, which means your code is coupled.
Taking advantage of this fact, we can use timers to fire our events instead of a loop. Handlers are third-party code, which are potentially long-running (like contain a 100k loop). The main advantage of doing so is to provide a gap between handler calls, giving other tasks like UI rendering, a chance to execute.
Regarding params, you can allow pub to accept normal args, not just one. You can just slice them after the event name onwards.
lib.pub = function(event){
if(!events[event]) return;
var params = Array.prototype.slice.call(arguments, 1);
var handlerIndex = 0;
var timer = setInterval(function(){ | {
"domain": "codereview.stackexchange",
"id": 15945,
"lm_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, object-oriented, design-patterns",
"url": null
} |
• It sounds very plausible to me. I think $s_1\le s_2$ is very important (as opposed to $s_1<s_2,$ where the claim would be too strong). Can't say how to prove it, though. Sep 4, 2018 at 13:49
• @user3342072 The conjecture would not hold for $s_1=s_2$, it is easy to construct a smooth function $f\colon [0,1] \to \mathbb{R}$ which is strictly increasing from 0 to 1/3, equal to 0 from 1/3 to 2/3, and strictly increasing from 2/3 to 1. Sep 4, 2018 at 14:34
• @user3342072 Not necessarily. There is a counterexample if one assumes $s_1=s_2$ (but $s_1<s_2$ works) and another one if $s_1<s_2$ is assumed (but $s_1=s_2$ works).
– mfl
Sep 4, 2018 at 14:44 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812299938005,
"lm_q1q2_score": 0.800572188127008,
"lm_q2_score": 0.8267117983401364,
"openwebmath_perplexity": 105.92063157566784,
"openwebmath_score": 0.8739438652992249,
"tags": null,
"url": "https://math.stackexchange.com/questions/2905088/improved-intermediate-value-theorem/2905219"
} |
homework-and-exercises, kinematics
This trick is to consider a particular limiting case. If you imagine throwing a (soft, so nobody on the ground gets hurt) projectile from a very tall building, it is a pretty straightforward matter to convince yourself of the following: The additional "hang time" that you get from an upward component of the velocity will be small compared to the amount of time that the projectile will take to fall down the height of the tall building. This means that in order to cover the most ground, what you should really do is put all of the available energy into covering as much distance as possible, since you already have a large amount of "hang time" available to begin with. That is, the relative value of adding projectile time decreases.
Anyway, I hope this is a helpful way to think about it! | {
"domain": "physics.stackexchange",
"id": 24768,
"lm_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, kinematics",
"url": null
} |
physiology, herpetology, poison, amphibians
Thus, the well being of the frog in the water of the swimming pool depends on the time the frog spends in the water. Eventually, with extended exposure the chlorine concentration will exceed the one compatible will life and the frog will die. This time is multifactorial variable, thus cannot be assessed easily - the weight and the skin surface area and skin permeability will affect the frog survival in a great degree. | {
"domain": "biology.stackexchange",
"id": 4373,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physiology, herpetology, poison, amphibians",
"url": null
} |
thermodynamics, condensed-matter, computational-physics, phase-transition, spin-models
for(z = 0; z < Lz; z++)
for(y = 0; y < Ly; y++)
for(x = 0; x < Lx; x++) // sweep lattice fine
{
m_cos += cos(theta[x][y][z]);
m_sin += sin(theta[x][y][z]);
}
*mx=m_cos
*my=m_sin
return;
}
and then calculating m as
m=sqrt(mx*mx+my*my)/N_site
By the way, for checking the overall behaviour, it is not necessary to calculate energy and magnetization ever step, but every 10 to 50 or so would be enough (to speed things up; put an additional counter that you will reset accordingly ). | {
"domain": "physics.stackexchange",
"id": 16552,
"lm_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, condensed-matter, computational-physics, phase-transition, spin-models",
"url": null
} |
by degree and number of terms. linear binomial is a factor of the given polynomial. Classify polynomials through identification of degree and leading coefficient. Browse by topic and download free PDFs or subscribe for access to multiple formats. Identify the degree, type, leading coefficient, and constant term of the polynomial function ƒ(x) = 5x º 2x3. The printable exercises on this page include identifying the types of polynomials based on the number of terms and the degree, naming the polynomials, MCQs, matching polynomial and its name and more!. Zero to four extrema. We wouldn't want to cross an asymptote either; we've heard some scary rumors. State the degree of the polynomial. See Examples 1-2. 1 - identify and classify one-variable polynomials-evaluate functions using a number or an expression - what the degree and lead coefficient tell us about # of zeroes, # of turning m points, far-end behavior - composition revisited 7. Comparing Models Using a graphing calculator, | {
"domain": "angolodeisaporifirenze.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668673560625,
"lm_q1q2_score": 0.8154900123842859,
"lm_q2_score": 0.8311430394931456,
"openwebmath_perplexity": 1195.5481175479692,
"openwebmath_score": 0.5297784209251404,
"tags": null,
"url": "http://lksz.angolodeisaporifirenze.it/classifying-polynomials-calculator.html"
} |
electromagnetism, rigid-body-dynamics
Title: $E$-field and $B$-field of a moving charged body? While reading an Introduction to Electrodynamics by D.J. Griffiths if became confused about what happens in electrodynamics when a macroscopic charged body, could be either a conductor or dielectric, is moving with respect to an inertial reference frame. I'm experiencing difficulty understanding this with Maxwell's equations, because in the book all problems deal with continuous charge and current distributions that do not change position in time, mainly circuits. My reasoning is that each charge element $dq_i$ on the moving body, such as a moving sphere, has a position $\vec{r_i}(t)$ and velocity $\vec{v_i}(t)$ creating a velocity vector field $\vec{v}(x,y,z,t)$ that gives a current volume density $\vec{dJ}(x,y,z,t)=\vec{v}(x,y,z,t)dq$ at each position where there is a moving charge element. Now since the body moves all charge elements $dq$ change position, hence the local charge density $\rho(x,y,z,t)$ and current volume | {
"domain": "physics.stackexchange",
"id": 96132,
"lm_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, rigid-body-dynamics",
"url": null
} |
c#, beginner, classes, constructor
Title: Tiny Validity class Here is a part of my new code replacing the old and deprecated old-school one.
Let's get to business right away:
I document everything with Documentation comments, which are proving very useful so far.
I present you my new tiny class called Validity, of which goal is to indicate if something is valid or not, and if not, then there should be specified a reason for it.
Note: I actually tried to use struct instead, but as it appears, parameterless constructors are from C# >= 10 or something like that there.
There shall be absolutely no problem for you to review as I documented, well, everything. I welcome all of your tips to make it perfect as in more effective or better to use, safer, or whatsoever...
/* I have a bunch of localized strings to my language. */
private const string INPUT_EMPTY = "Input is empty"; | {
"domain": "codereview.stackexchange",
"id": 43144,
"lm_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, classes, constructor",
"url": null
} |
waves, acoustics, frequency, wavelength, harmonics
as $f={c \over \lambda}=n{c \over 2 L}$. The frequencies are multiples of ${c \over 2L}$
For waves in a pipe the argument is similar except that (1) $c$ is the speed of sound and (2) there is a difference between pipes which are open or closed at both ends (like a flute) and pipes which are closed at one end but open at the other (like a trumpet) for which the pictures are different and the rule is that an odd number of quarter-wavelengths fit into the length. That's why brass instruments have such a distinctive sound; they miss all the even harmonics. | {
"domain": "physics.stackexchange",
"id": 65626,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves, acoustics, frequency, wavelength, harmonics",
"url": null
} |
c++, object-oriented, parsing
: (text)) +
" ";
for (unsigned int i = 0; i < children.size(); i++)
if (i == children.size() - 1)
LispExpression += children[i].getLispExpression() + ")";
else
LispExpression += children[i].getLispExpression() + " ";
return LispExpression;
}
int interpretAsACompileTimeConstant() {
if (std::regex_match(text, std::regex("^\\d+$")))
return std::stoi(text);
if (text == "+")
return children[0].interpretAsACompileTimeConstant() +
children[1].interpretAsACompileTimeConstant();
if (text == "-")
return children[0].interpretAsACompileTimeConstant() -
children[1].interpretAsACompileTimeConstant();
if (text == "*")
return children[0].interpretAsACompileTimeConstant() *
children[1].interpretAsACompileTimeConstant();
if (text == "/")
return children[0].interpretAsACompileTimeConstant() / | {
"domain": "codereview.stackexchange",
"id": 38968,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, object-oriented, parsing",
"url": null
} |
pcl, rosmake, pcl-ros
[rosmake-0] Finished <<< test_rospack ROS_NOBUILD in package test_rospack
[ rosmake ] Results:
[ rosmake ] Built 58 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/ira/.ros/rosmake/rosmake_output-20120708-170257
[ rosmake ] WARNING: Rosdep did not detect the following system dependencies as installed: libvtk-qt Consider using --rosdep-install option or `rosdep install flann cminpack pcl_ros pcl`
ira@ira-K42JP:~/code/ros/sam_pcl/perception_pcl_electric_unstable$ | {
"domain": "robotics.stackexchange",
"id": 10088,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pcl, rosmake, pcl-ros",
"url": null
} |
beginner, python-3.x, game
def getdata(url):
headers = {
'User-agent':
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19582"}
r = requests.get(url, headers=headers)
return r.text
def main():
print('This is trivia, made by MY_NAME. Have fun!')
print()
while True:
try:
amount = int(input('How many questions would you like to answer? '))
print()
except ValueError:
print()
print('Must be a natural number.')
print()
else:
if amount < 10 or amount > 145:
print('Must be a natural number above 10 and less than 145.')
print()
else:
break
htmldata = getdata('https://www.scarymommy.com/best-trivia-questions-answers/')
soup = BeautifulSoup(htmldata, 'html.parser')
q = str(soup.find_all(text=True))
questions = []
answers = [] | {
"domain": "codereview.stackexchange",
"id": 41412,
"lm_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, python-3.x, game",
"url": null
} |
ros, turtlebot, gui
Originally posted by Pablo Iñigo Blasco with karma: 2982 on 2011-10-23
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Arkapravo on 2011-11-05:
@Pablo Iñigo Blasco : Fully agree with you, I would have started with wx python or probably pygame
Comment by AHornung on 2011-10-25:
I would suggest using Qt instead (there's also PyQt). It has a nicer API and afaik most wx code in ROS is being ported to Qt (or at least it is planned to).
Comment by LiMuBei on 2011-10-24:
I second this, since wxWidgets is already in ROS (C++ at least), so less dependencies. Also, I like wxWidgets :) | {
"domain": "robotics.stackexchange",
"id": 7058,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, turtlebot, gui",
"url": null
} |
$$|\nabla u (0)| \le C\sup_{\partial B} |u|$$
for any function harmonic on a neighborhood of $\overline B.$
Proof: This comes from differentiating through the integral sign in the Poisson integral representation of $u$ on the unit sphere. Doing this will give an appropriate bound on $|\partial u/\partial x_k (0)|,$ $k=1,\dots ,n.$ This proves the claim.
Now suppose $u$ is harmonic on $\mathbb R ^n$ and $|u|\le M$ everywhere. For any $r>0,$ we can set $u_r(x) = u(rx).$ Note each $u_r$ is harmonic on $\mathbb R^n$ and $|u_r|\le M.$ Using the above, we get
$$|\nabla u_r (0)| \le C\sup_{\partial B} |u_r|\le C\cdot M.$$
But $\nabla u_r (0) = r\nabla u (0).$ This shows $|\nabla u (0)| \le CM/r.$ Now let $r\to \infty$ to see $|\nabla u (0)| =0.$ Finally, apply this to any translate of $u$ to see $|\nabla u | =0$ everywhere. This implies $u$ is constant.
Quote (the full paper!) of A Proof of Liouville's Theorem: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137942490254,
"lm_q1q2_score": 0.8287166277523279,
"lm_q2_score": 0.8438950986284991,
"openwebmath_perplexity": 119.3832000082911,
"openwebmath_score": 0.9706851840019226,
"tags": null,
"url": "https://math.stackexchange.com/questions/2797061/proof-of-liouvilles-theorem-for-harmonic-function"
} |
$$\left[ { - \pi ,\pi } \right]$$ and having period \(2\pi. Application to laboratory and field situations is emphasized throughout. When the inverse Fourier transform is performed, the result is naturally a complex matrix whose imaginary part is a null matrix (all. com - id: 1bb289-ZWI0O. Periodic Functions and Fourier Series 1 Periodic Functions A real-valued function f(x) of a real variable is called periodic of period T>0 if f(x+ T) = f(x) for all x2R. Spectral Analysis - Fourier Decomposition • Any periodic wave can be decomposed in a Fourier series. This Fourier series features an in nite sum of sinc. The discrete signal in (c) xn[] consists only of the discrete samples and nothing else. Sawtooth wave, its description as a Fourier series, and as a line SPECTRUM. A Fourier series on [-L,L] is 2L periodic, and so are all its partial sums. com - id: 1bb289-ZWI0O. It is done by applying Euler's rule to. This has important implications for the Fourier Coefficients. In the Fourier | {
"domain": "chiesaevangelicapresbiteriana.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8007645837009872,
"lm_q2_score": 0.8198933293122507,
"openwebmath_perplexity": 720.3926557973892,
"openwebmath_score": 0.8425406813621521,
"tags": null,
"url": "http://yfwv.chiesaevangelicapresbiteriana.it/fourier-series-of-sawtooth-wave-pdf.html"
} |
general-relativity, gravity, curvature, stress-energy-momentum-tensor
$$\sqrt{\frac{A}{4π}}−r_{\mathrm{meas}}=\frac{G}{3c^2}\cdot M,$$
wherein $G$ is Newton's gravitational constant, $c$ is the speed of light in vacuum, and $M=4π\rho r^3/3$. I don't know what $r$ is supposed to be, but it's presumably $\sqrt{\frac{A}{4\pi}}$. Feynman gratifyingly points out that $\frac{G}{3c^2}\approx 2.5\times 10^{−28}$ meters per kilogram (for Earth, this corresponds to a radius excess of about $1.5$ mm). Feynman is also careful to point out that this is a statement about average curvature.
Penrose's criticism is: "the 'active' mass which is the source of gravity is not simply the same as the energy (according to Einstein's $E=mc^2$); instead, this source is the energy plus the sum of the pressures". Damned if I know what that means -- whose pressure on what?
So, taking into account Penrose's criticism but maintaining Feynman's intuitive style, what is the active mass $M$? I'll try and answer in an intuitive way as best I can (as you asked for on the crosslink). | {
"domain": "physics.stackexchange",
"id": 3284,
"lm_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, curvature, stress-energy-momentum-tensor",
"url": null
} |
experimental-physics, harmonic-oscillator, spring
Title: Real-World Example for the Horizontal Spring-Block Oscillator I am wondering whether there exists a spring that behaves like those shown in a multitude of physics textbooks, where a mass stretched/compressed to a certain point oscillates back and forth in some way. Is it even physically viable for a spring to behave that way when connected on one end to a solid, immovable entity, and on the other to a mass lying upon a low-friction surface? I have only seen springs that strictly compress or stretch, but not both, so the image of the spring block oscillator with both compression and stretching properties is baffling. Is there a real-world example of this, or a good explanation of why it cannot actually occur? Yes, there are springs design to work well in both compression and tension, though they generally
cost a fair amount, and
will extend farther than they will compress. | {
"domain": "physics.stackexchange",
"id": 29570,
"lm_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, harmonic-oscillator, spring",
"url": null
} |
python, beginner, python-3.x, socket, udp
promp_handler.py
import networking
def pull_sys_info(sockt):
user_str = networking.receive_data(sockt)
cwd = networking.receive_data(sockt)
return user_str, cwd
# i was craving for some color
def pull_prompt(sockt):
user_str, cwd = pull_sys_info(sockt)
user_str = "\u001b[31m" + user_str + "\u001b[0m:"
cwd = "\u001b[34m" + cwd + "\u001b[0m$"
return user_str + cwd | {
"domain": "codereview.stackexchange",
"id": 31554,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, socket, udp",
"url": null
} |
quantum-mechanics, angular-momentum, quantum-spin, group-theory, representation-theory
$$
where you can see why we call this latter "spin 0" representation "trivial." (It generates the trivial representation of the group where all members are represented by the number $1 = e^0$).
Here, we have only provided an example for z-angular momenta, which is fairly simple. However, the block diagonalization "works" for all the momentum components. | {
"domain": "physics.stackexchange",
"id": 94073,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, angular-momentum, quantum-spin, group-theory, representation-theory",
"url": null
} |
php, object-oriented
In software engineering, a design pattern is a general reusable
solution to a commonly occurring problem
If your code doesn't follow this I do become really confused. I have to do a lot of read-up, and stuff. Your code becomes a surprise, which generally is really bad in terms of maintainability.
So If your mapper is actually a repository, please please name it as so. But then keep in mind that a repository is suggesting behavior too.
On the should the authenticator store to session thing: The authenticator directly: no. Maybe you want to re-use it without storing users to a session directly (e.g. API-Calls, ...). Commonly it is the job of a Service to provide concrete login / logout functionality. This usually is a two-step process: authenticate the user at a authenticator, and on success, store the result in a session. This keeps your authenticators reusable for situations where you don't want to start a session. | {
"domain": "codereview.stackexchange",
"id": 6378,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, object-oriented",
"url": null
} |
error-correction, textbook-and-exercises
Answer to c)
With this error-correcting code, we always assume that we have only one qubit error. If there are two qubit errors then this technique with its syndrome may indicate to do something that will not correct the error. In this example, $00, 00, 01$ indicates (wrongly, because our assumption of one qubit error is not true for this error example) that $9$th qubit has got an error. | {
"domain": "quantumcomputing.stackexchange",
"id": 1954,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "error-correction, textbook-and-exercises",
"url": null
} |
microcontroller, avr
Title: Sam C21 Xplained Pro - Linux toolchain I recently got a ATSAMC21N Xplained Pro dev board.
I was planning to use avr-g++ and avrdude to do development (I’m running Linux so Atmel Studio isn’t an option). I’ve used avr-gcc and avrdude in the past for Atmel development but the SAM C21 chip doesn’t seem to be on the supported target list.
Does anyone have an idea about what toolchain I could use to build and deploy the program to the board? The SAM chips have ARM cores, so you should look compiliing with arm-none-eabi-gcc and flashing/debugging with openocd instead.
OpenOCD is a program that communicates with debugging probes for a number of processor/microcontroller architectures, analogous to avrdude for AVR. You will have to figure out how to configure openocd to talk to your board. A quick google search brought me this guide, which might point you in the right direction, although I don't have a SAM breakout board to verify it with. | {
"domain": "robotics.stackexchange",
"id": 2211,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "microcontroller, avr",
"url": null
} |
mass, dark-matter, higgs, weak-interaction
happily lived through the 50's and the 60's without any need of a Higgs mechanism. Note however that a mass term for the photon would not be gauge invariant, so QED only works with massless photon, and again, that's fine because it fits very well with experimental results. | {
"domain": "physics.stackexchange",
"id": 43774,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mass, dark-matter, higgs, weak-interaction",
"url": null
} |
symmetry, symmetry-breaking, spin-chains, tensor-network
Because the corresponding MPS is not injective, the tensors $A^i$ exhibit
a non-trivial symmetry $G$ on the virtual level represented by the
matrices that commute simultaneously with all $A^i$ ($\sigma^z$ in this GHZ
case). MPS with this property are called $G$-injective. Note that this
symmetry is dual to the physical symmetry which permutes the blocks
(represented by $\sigma^x$ in the case under consideration). | {
"domain": "physics.stackexchange",
"id": 96094,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "symmetry, symmetry-breaking, spin-chains, tensor-network",
"url": null
} |
discrete-signals, convolution, linear-systems, impulse-response
You actually only need one set of input and output to solve this. Given the impulse response length, we know that
$$y[n]=\sum_{k=0}^{3}h[k] \cdot x[n-k]$$
You can work through the sum one element at a time and solve for the new coefficient of the impulse response. Let's use $x_1$ and $y_1$
$$0 = y[0]=h[0] \cdot x[0] = h[0] \cdot 1 \rightarrow h[0] = 0$$
$$1 = y[1]=h[0] \cdot x[1] + h[1] \cdot x[0] = 0 + h[1] \cdot 1 \rightarrow h[1] = 1$$
$$0 = y[2]=h[0] \cdot x[2] + h[1] \cdot x[1] + h[2] \cdot x[0]= 0 + 0 + h[2] \cdot 1 \rightarrow h[2] = 0$$
and so forth. It's a bit tedious but will give you the right answer with a single set of input and output.
Please note that you only need the first four outputs to calculate the entire impulse response. The last two outputs are "dependent variables". If they don't come out correctly, it would mean that your system is not LTI. The second set of input and output is redundant. You can try the method on either one and should get the same result | {
"domain": "dsp.stackexchange",
"id": 5982,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discrete-signals, convolution, linear-systems, impulse-response",
"url": null
} |
biochemistry, cellular-respiration
Note added by David:
On checking I find, in contrast to Berg, Lehninger’s book defines $\ce{P_i}$ as monohydrogen phosphate ($\ce{HPO4^{2-}}$), and Fersht actually writes the equation of the reaction (16-1) with $\ce{HPO4^{2-}}$ rather than $\ce{P_i}$. | {
"domain": "biology.stackexchange",
"id": 6337,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, cellular-respiration",
"url": null
} |
r, categorical-data
| dog | round one | round two |
| --------------- | --------- | --------- |
| Dog1_criteria1 | A | B |
| Dog1_criteria2 | A | E |
| Dog1_criteria3 | A | E |
| Dog1_criteria4 | B | M |
| Dog2_criteria1 | A | E |
| Dog2_criteria2 | B | M |
| Dog2_criteria3 | A | E |
| Dog2_criteria4 | C | B |
.... | {
"domain": "datascience.stackexchange",
"id": 9008,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "r, categorical-data",
"url": null
} |
work with the upper half-plane, as shown in Figure 10. Find the area under a curve and between two curves using Integrals, how to use integrals to find areas between the graphs of two functions, with calculators and tools, Examples and step by step solutions, How to use the Area Under a Curve to approximate the definite integral, How to use Definite Integrals to find Area Under a Curve. Determine the volume of the solid of revolution formed by revolving the area enclosed by the curve, the x-axis and the given ordinates through one revolution about the x-axis: y = 5x; x = 1, x = 4. 9500, which is why we have used 1. Students will also examine solubility curve graphs to explore how environmental factors affect the amount of solubility present in solutions. P O qA Kl 9lI qr ki Tg ZhOt7s q vr ue2s geJr lvWeEdM. Typesof°ow. 1 Introduction. create math worksheets in word. Tangents and Normal to a Curve A tangent is a line that touches a curve. Recall that the integral can represent the area | {
"domain": "carlosfassanelli.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877717925421,
"lm_q1q2_score": 0.8250566284314385,
"lm_q2_score": 0.8499711775577736,
"openwebmath_perplexity": 601.1477546563357,
"openwebmath_score": 0.7026122808456421,
"tags": null,
"url": "http://vbsu.carlosfassanelli.de/area-between-two-curves-problems-and-solutions-pdf.html"
} |
particle-physics, neutrinos, beyond-the-standard-model
Title: If $U$ determines the mixing between fields and $U^*$ determines the mixing between states-Why? In this pdg review, Eq. (14.1), the mixing between the flavour neutrino fields and neutrino fields corresponding to mass eigenstates are denoted as $$\nu_{lL}=\sum\limits_{j}U_{lj}\nu_{jL}\tag{1}$$ where $U$ stands for the neutrino mixing matrix. On the other hand, the mixing between flavour eigenstates and mass eigenstates, in Eq. (14.27), is given by $$|\nu_{lL}\rangle=\sum\limits_{j}U^*_{lj}|\nu_{jL}\rangle\tag{2}.$$
Why did they use $U$ in Eq.(14.1) and its complex conjugate $U^*$ in Eq.(14.27)? I guess this is not a typo because I have seen it at other places as well. | {
"domain": "physics.stackexchange",
"id": 49689,
"lm_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, neutrinos, beyond-the-standard-model",
"url": null
} |
c++, algorithm, recursion, c++20, constrained-templates
Godbolt link is here.
All suggestions are welcome.
The summary information:
Which question it is a follow-up to?
recursive_any_of and recursive_none_of Template Functions Implementation in C++
What changes has been made in the code since last question?
I am trying to implement recursive_find_if_all template function in this post. | {
"domain": "codereview.stackexchange",
"id": 45353,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, recursion, c++20, constrained-templates",
"url": null
} |
python, performance, algorithm, primes, mathematics
answer = num/den
ans = answer%m
print ans
This code runs for small values of \$n\$ (when \$n <= 100\$). But for large values of \$n\$ ~ \$10^5\$, the code seems to be inefficient, exceeding the time limit of 2 sec. How can I generalize and optimize this computation? Your function is slow for large values of n because the intermediate
values of num and den quickly grow to huge integers, making the multiplication slow.
You can improve that
by reducing each intermediate result "modulo m", so that all numbers will
always be in the range 0 ... m-1.
The final division num/den must then be computed as a "modular division":
def mod_div(a, b, m):
"""modular division
Returns a solution c of a = b * c mod m, or None if no such number c exists.
"""
g, x, y = egcd(b, m)
if a % g == 0:
return (a * (x // g)) % m
else:
return None | {
"domain": "codereview.stackexchange",
"id": 10625,
"lm_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, algorithm, primes, mathematics",
"url": null
} |
civil-engineering, bridges
I would assume that they make it easier to cross larger bodies of water because there is less structure to be secured below the surface. In areas of deep water, support structures can become unfeasibly large. These larger spans could, though, make the pontoon bridges susceptible to damage from strong winds and currents. Are there plans to use pontoon bridges to cross long distances? Theoretically pontoon bridges with rope anchors keeping them to the bottom would work against wind and flow, overcoming the problem jhabbot mentioned in his answer (same as train length limit - stretching force).
In practice these come with more problems of their own.
They drift on water surface and as result, rise and fall with water waves. The larger the body of water they span, the higher the waves; at certain point in stormy weather the bridge would just launch the vehicles into the air. | {
"domain": "engineering.stackexchange",
"id": 29,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "civil-engineering, bridges",
"url": null
} |
javascript, css
.input-group label {
width: 45%; }
#exec {
margin-left: 47%; } }
<div class="wrap">
<div class="input-group">
<textarea></textarea>
</div>
<div class="input-group">
<div class="input-group-part">
<label for="array-name">Name of array: </label>
<input type="text" id="array-name" value="testData" />
</div>
<div class="input-group-part">
<label for="separator">Word-Separator: </label>
<input type="text" id="separator" size="5" value="-" />
</div>
</div> | {
"domain": "codereview.stackexchange",
"id": 21321,
"lm_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, css",
"url": null
} |
Here's another way to look at propositional logic questions, which can be especially useful if you are interested in computer science at it allows you to gain some exposure to examples of binary functions.
We can represent $p$ and $q$ by bits (taking on the value of either 0 or 1), where the case $p=1$ corresponds to the statement that $p$ is true, and the case $p=0$ similarly means that $p$ is false.
If we consider two bits $p$ and $q$, then we can analyze the truth value of propositions like $p \wedge q$ or $p \rightarrow q$ by creating binary functions (i.e. we evaluate the value of the function modulo 2) that take $p$ and $q$ as input. Then, given truth values of $p$ and $q$, we can evaluate our function to tells us whether the desired proposition is true or false. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9719924802053234,
"lm_q1q2_score": 0.8035576533585751,
"lm_q2_score": 0.8267118004748677,
"openwebmath_perplexity": 428.82292117180634,
"openwebmath_score": 0.945174515247345,
"tags": null,
"url": "https://math.stackexchange.com/questions/1611309/is-p-land-p-to-q-to-q-a-tautology/1611327"
} |
everyday-chemistry, gas-laws
Title: Why would breathing pure oxygen be a bad idea? My textbook mentions that SCUBA tanks often contain a mixture of oxygen and nitrogen along with a little helium which serves as a diluent.
Now as I remember it, divers take care not to surface too quickly because it results in 'the Bends', which involves the formation of nitrogen bubbles in the blood and is potentially fatal.
If that's the case, why not use pure oxygen gas in SCUBA tanks? It seems like a good idea since it would | {
"domain": "chemistry.stackexchange",
"id": 6647,
"lm_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, gas-laws",
"url": null
} |
harmonic-oscillator, spring
In a nutshell, I want to understand the difference between $x$ and $A$ in the above formula. Let's start by plotting the damped harmonic oscillation equation:
$$x = Ae^{-\gamma t} \cos (\omega t)$$ | {
"domain": "physics.stackexchange",
"id": 28133,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "harmonic-oscillator, spring",
"url": null
} |
homework-and-exercises, special-relativity, spacetime, time-dilation, length-contraction
Now I have to calculate the time needed for the ball to reach Sam (who is standing left to catch the ball) in the eyes of Adam. | {
"domain": "physics.stackexchange",
"id": 19344,
"lm_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, special-relativity, spacetime, time-dilation, length-contraction",
"url": null
} |
c++, c++11
/** @return true if the specified key is comparable to a stored value of the specified value type, false otherwise. */
template< class ValueType, class KeyType >
bool contains( const KeyType& key ) const
{
if( auto* value_set = find_set<ValueType>() )
{
return value_set->contains( key );
}
return false;
}
/** @return true if the value is comparable to a stored value of the same type. */
template< class ValueType >
bool contains( const ValueType& value ) const
{
return contains<ValueType, ValueType>( value );
} | {
"domain": "codereview.stackexchange",
"id": 7122,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++11",
"url": null
} |
But I am stuck here. Thought of applying $F^{-1}$ from both sides, but we don't know if such an operator exists and besides, it would lead me to nothing, I presume.
I will appreciate any help.
-
can the dimension be infinite ? – Yann Hamdaoui May 6 '14 at 16:30
Yes, nothing about dimension in the problem. – Mateusz May 6 '14 at 16:33
By "$\lambda \vee -\lambda$", do you mean "$\lambda$ or $-\lambda$"? $\vee$ is a boolean operator; it doesn't do all the things the English conjunction does. – user2357112 May 6 '14 at 23:50
If you want the infinite dimensional case handled, why do you accept an answer that does not? Please unaccept that anwser, at least temporarily to give the answerer the option to delete the question. – Marc van Leeuwen May 7 '14 at 8:35
If
$F^2v = \lambda^2 v \tag{1}$
with $v \ne 0$, then
$(F^2 - \lambda^2)v = 0, \tag{2}$
so that
$(F + \lambda)(F - \lambda)v = 0; \tag{3}$
if now
$(F -\lambda)v = 0, \tag{4}$
then
$Fv = \lambda v, \tag{5}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731158685838,
"lm_q1q2_score": 0.8001190756672025,
"lm_q2_score": 0.8311430562234877,
"openwebmath_perplexity": 201.14836589556018,
"openwebmath_score": 0.9520748257637024,
"tags": null,
"url": "http://math.stackexchange.com/questions/783819/eigenvalue-of-f2-and-f"
} |
See this answer: Supremum of closed sets
By definition of sup(A), every open ball(“segment in R”) around sup(A) contains at least one element from A, thus making it by definition belonging to Closure(A). | {
"domain": "learn-math.top",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232889752296,
"lm_q1q2_score": 0.850362387077934,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 1563.8769121707087,
"openwebmath_score": 0.9840782284736633,
"tags": null,
"url": "http://www.learn-math.top/for-a-bounded-subset-aa-of-rmathbbr-supasupa-is-in-the-closure-of-aa/"
} |
python, scikit-learn, hyperparameter-tuning, grid-search, pipelines
Title: how to pass parameters over sklearn pipeline's stages? I'm working on a deep neural model for text classification using Keras. To fine tune some hyperparameters i'm using Keras Wrappers for the Scikit-Learn API.
So I builded a Sklearn Pipeline for that:
def create_model(optimizer="adam", nbr_features=100):
model = Sequential()
model.add(Dense(512, activation='relu', input_shape=(nbr_features,)))
...
model.compile(loss='binary_crossentropy', optimizer=optimizer,metrics=["accuracy"])
return model
estimator = Pipeline([("tfidf", TfidfVectorizer()),
('norm', StandardScaler(with_mean=False)),
("km", KerasClassifier(build_fn=create_model, verbose=1))])
grid_params = {
'tfidf__max_df': (0.1, 0.25, 0.5, 0.75, 1.0),
'tfidf__max_features': (100, 500, 1000, 5000,),
... }
gs = GridSearchCV(estimator,
param_grid,
...) | {
"domain": "datascience.stackexchange",
"id": 6009,
"lm_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, scikit-learn, hyperparameter-tuning, grid-search, pipelines",
"url": null
} |
python, unit-testing, binary-search
which makes it transparently obvious that we're avoiding
running off the end.
But bisect_left() is perfectly happy to return an index of 0.
Don't we want to verify that index - 1 hasn't walked
off the other end of the array?!?
I confess it is not completely clear to me how lo and hi
figure into this.
The test suite did not consider them, but it should.
The underlying bisect_left uses lo and hi,
so there's a good case for keeping them as-is.
Let me float a radical proposal.
Consider accepting a single range argument,
and then you pass .start and .stop to bisect_left.
Or not, whatever.
It slightly simplifies the promises
and is perhaps a little easier to reason about
in the presence of potential
OBOBs.
postcondition
I really liked how the one sentence ("Finds the index...") states a
contract.
I would like it even more if it was believable,
if I knew for certain it was always true after my call.
There's an easy way to do that: use assert before returning. | {
"domain": "codereview.stackexchange",
"id": 45412,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, unit-testing, binary-search",
"url": null
} |
planetary-systems
I can't help you much there, but I can give you a starter. The density $\rho$ of a circumstellar disk at a distance $r$ (as given by Michael Woolfson in On the Origin of Planets) is
$$\rho (r)=C \exp \left[-\frac{(r-r_{\text{peak}})^2}{2 \sigma ^2} \right]$$
where $\sigma$ is one standard deviation and $r_{\text{peak}}$ is the peak density, and $C$ is a constant.
As promised, here are some more, set forth by Woolfson.
The disk decays over time; its density at time $t$ is approximated by
$$\rho_t=\rho e^{- \gamma t}$$
where $\gamma$ is a decay constant. If you've taken certain math course, you've probably seen this equation many times before, just in with $\rho=y$ and $\gamma=k$. | {
"domain": "astronomy.stackexchange",
"id": 914,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "planetary-systems",
"url": null
} |
ros, ros-kinetic
Title: use objectdetection model predict the image subscribed by kinect topic
I use the tensorflow object detection API train a model, I want to use the image topic in the kinect camera and identify it with the trained model. I found that recognition is much less effective than using image recognition directly. Why is that? Is it caused by predicting the image in rosimage format after converting it to cv::mat? Is there any way to solve it?
image_topic = "/kinect2/qhd/image_color"
self._cv_bridge = CvBridge()
self._sub = rospy.Subscriber(image_topic, Image, self.mycallback, queue_size=1)
def mycallback(self,image):
cv_image = self._cv_bridge.imgmsg_to_cv2(image_msg, "bgr8")
pil_img = Image.fromarray(cv_image)
Originally posted by ffzj on ROS Answers with karma: 28 on 2019-06-22
Post score: 0
I have solved the problem, bgr8 is not the suitable type foe the model ,i have changed the cv_image type to rgb8. | {
"domain": "robotics.stackexchange",
"id": 33239,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-kinetic",
"url": null
} |
for most boolean algebra problems. It prevents the need to remember each and every Boolean algebraic theorem. BOOLEAN ALGEBRA AND MINIMIZATION 1.1 Introduction: The English mathematician George Boole (1815-1864) sought to give symbolic form to Aristotle‘s system of logic. There is no Negative Marking. Although any of these methods can be employed using pen and paper, it is far easier (and more productive) to implement searching algorithms on a … Section 5.5 Boolean Function Minimization. It provides a formal algebraic system to manipulate logic equations so that the minimum can be found. Boolean Algebra: Basic Operations. Boolean Algebra & Minimization Online Test : SET 1. This is a Boolean algebra solver, that allows the user to solve the complex algebraic expressions through applying the rules that are used in algebra over logic. Rules of Boolean Algebra Table 4-1 lists 12 basic rules that are useful in manipulating and simplifying Boolean expressions. Viewed 37 times 2 $\begingroup$ | {
"domain": "abc-instal.ro",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517050371972,
"lm_q1q2_score": 0.8129098237626483,
"lm_q2_score": 0.8459424334245618,
"openwebmath_perplexity": 982.6859258591757,
"openwebmath_score": 0.5752015113830566,
"tags": null,
"url": "http://abc-instal.ro/2bpngy/c7e075-boolean-algebra-minimization"
} |
phonons
Title: Do phonons age / decay? Photons and phonons are massless entities, if my understanding is correct. Unlike photons, phonons do not travel at the speed of light, being "excitations of a classical acoustic wave." Because aging is relative to speed, and the speed of light is the cosmic speed limit, do phonons, in fact, age? And if so, is this aging unrelated to decay, given the phonon's massless quality? This depends heavily on the context. In real materials, phonons will scatter off impurities, be influenced by the environment etc. So if you start a material with a single phonon in it, it will eventually decay.
However, if everything is idealized, we have perfectly harmonic potentials and no influence from the environment whatsoever, a single phonon will just remain in its state forever. This is very similar to a frictionless ideal pendulum, which, once set in motion, will just continue to make harmonic oscillations forever. | {
"domain": "physics.stackexchange",
"id": 42442,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "phonons",
"url": null
} |
many-body
$$
V = \sum_{i = 1}^N V_i
$$
with
$$
V_1 = \sum_{i=1}^N E_i
$$
$$
V_2 = \sum_{i=1}^N \sum_{j=i+1}^N E_{ij} - E_i - E_j
$$
$$
V_3 = \sum_{i=1}^N \sum_{j=i+1}^N \sum_{k=j+1}^N \biggl(
(E_{ijk} - E_i - E_j - E_k) - (E_{ij} - E_i - E_j)\\ - (E_{jk} - E_j - E_k) - (E_{ki} - E_k - E_i)\biggr)
$$
and so on. In these equations, $E_i$ is the energy consisting only of particle $i$, $E_{ij}$ is the energy of a system containing only particles $i$ and $j$, $E_{ijk}$ is the energy of a system with three partilces, $i$, $j$ and $k$, and so on. I believe it has to do with the Inclusion-Exclusion Principle from combinatorics. (link: http://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle)
In doing so, one is making the assumption that the interaction energies between distinct, separate bodies decreases as the number of bodies being taken into account increases. | {
"domain": "physics.stackexchange",
"id": 87039,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "many-body",
"url": null
} |
that we should not rely too much on our intuition when solving extra information about the name of the child increases the conditional probability of $$P(H|C_1)=0.5,$$ You pick a random day. about them to explain your confusion. Here we have four possibilities,$GG=(\textrm{girl, girl}), GB, BG, BB$, If the child is a boy, his name will not be Lilia. and$P(GG)=P(GB)=P(BG)=P(BB)=\frac{1}{4}$. Let$R$be the event that it's rainy,$T$be the event that there is heavy traffic,$=\frac{e^{-\frac{2}{5}}-e^{-\frac{3}{5}}}{e^{-\frac{2}{5}}}$,$=\sum_{i=1}^{M} P(A|C_i)P(B|C_i)P(C_i) \hspace{10pt}$,$\textrm{ ($A$ and $B$ are conditionally independent)}$,$\textrm{ ($B$ is independent of all $C_i$'s)}$,$=\frac{2}{3} \cdot \frac{1}{4} \cdot \frac{3}{4}$,$ = P(R,T,L)+P(R,T^c,L)+P(R^c,T,L)+P(R^c,T^c,L)$,$=\frac{1}{12}+\frac{1}{24}+\frac{1}{24}+\frac{1}{16}$,$= \frac{1}{2}. A family with two girls is more We have already found 0 This ... Marilyn gave a solution concluding that you should switch, and if you | {
"domain": "lavalldebo.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006255,
"lm_q1q2_score": 0.8721473695055755,
"lm_q2_score": 0.8933093968230773,
"openwebmath_perplexity": 850.0292654408531,
"openwebmath_score": 0.9161287546157837,
"tags": null,
"url": "https://lavalldebo.org/43xcagqf/3c3493-conditional-probability-problems-with-solutions-pdf"
} |
angular-momentum, rotational-dynamics, moment-of-inertia, angular-velocity
The main point about the positive semidefiniteness of $I$ is that it encodes a much simpler relationship than its components lead you to believe. To see this relationship, you start with the fundamental definition of the angular momentum of a single particle,
$$
\vec L= \vec r \times \vec p = \vec r\times m\vec v,
\tag 3
$$
and then you use the fundamental definition of the angular velocity vector - that any particle rotating about the origin with (vectorial) angular velocity $\vec \omega$ will have velocity
$$
\vec v = \vec \omega \times\vec r,
\tag 4
$$
and you put this into the expression for the angular momentum:
$$
\vec L = \vec r\times m(\vec \omega\times\vec r).
\tag 5
$$ | {
"domain": "physics.stackexchange",
"id": 36405,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "angular-momentum, rotational-dynamics, moment-of-inertia, angular-velocity",
"url": null
} |
complexity-theory, np-complete, np-hard, np, factoring
By between, I mean that it runs in super-polynomial time (not in P), but sub-exponential time (NP-hard is believed to take exponential time or greater).
By complete, I mean that reductions exist. E.g. just like how NP-complete problems like TSP and 3-SAT can be reduced to each other, the "in-between" class of problems similarly should have reductions to each other.
As an example, integer-factorization is widely believed not to be NP-hard, but not to be in P either, so it is a perfect candidate for this class. But is there a wide range of problems that can be reduced to/from integer factorization to create a "complete" class? Or are the problems between P and NP-hard mostly disconnected? One could reasonably defend a Yes or No answer. | {
"domain": "cs.stackexchange",
"id": 20306,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, np-complete, np-hard, np, factoring",
"url": null
} |
python, python-3.x, regex, portability, utf-8
Consider re-assigning decoded output immediately after calling run_ltl2ba().
The prog regex (\s\S\w\W) is not obvious to me -- I would appreciate a comment and/or a sample text line you hope to match. The usual assert idiom would be simply assert match, or more informatively, assert match, output, since the group(1) dereference is redundant with assert match, you're guaranteed to raise an error either way.
There are two calls for closing the output graph, which is fine, it just makes me wonder if there's a way to get a with clause to close upon leaving scope.
In get_ltl_formula(), please drop parens in if (file is not None):. Testing if file: would suffice. If you dropped the generic fatal Exception handler, the end result would be much the same.
In run_ltl2ba(), there's an opportunity to run a loop over 'dslpoca'.split(''), if desired. | {
"domain": "codereview.stackexchange",
"id": 26808,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, regex, portability, utf-8",
"url": null
} |
rotational-kinematics, vector-fields, angular-velocity
There are scenarios where it would make sense to talk about a velocity field, such as when describing fluid flow (notably not a rigid body). Similarly, it is sometimes interesting to talk about the angular velocity field of the fluid -- although instead of angular velocity, one typically speaks of the vorticity field, which you can think of as being proportional to the mean angular velocity of particles in a fluid element relative to the center of mass of the fluid element. | {
"domain": "physics.stackexchange",
"id": 91805,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rotational-kinematics, vector-fields, angular-velocity",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.