text stringlengths 1 1.11k | source dict |
|---|---|
symmetry: A= 2 Z ˇ=3 0 Z 2+2cos 3 1rdrd = 9 p 3 2 ˇ. 1 (Iterated Integrals). To apply a double integral to a situation with circular symmetry, it is often convenient to use a double integral in polar coordinates. It is assumed the student is already familiar with it. Simple Powers. They are also simple types and can be initialized with literals. Integral is a Education Resources Awards finalist 2020. Thus, A= Z ˇ=3 ˇ=3 Z 2+2cos 3 1rdrd = 9 p 3 2 ˇ. FInd the area bounded by the cardioid r = 1+sinθ. 0 templates and 2. Multiple Integration. f x as x ranges from x a to x. Chapter 13: Multiple Integrals The value of the double integral is the volume of the solid region shown in Figure 2. Expected value. Multiple Integrals Double Integrals As many problems in scienti c computing involve two-dimensional domains, it is essential to be able to compute integrals over such domains. Concept Synthesis Paper on Personal Nursing Philosophy Instructions: Write about the two bullet points presented | {
"domain": "sissynene.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130586647623,
"lm_q1q2_score": 0.803936390061388,
"lm_q2_score": 0.8128673155708975,
"openwebmath_perplexity": 1002.5570864988887,
"openwebmath_score": 0.841425359249115,
"tags": null,
"url": "http://qxwx.sissynene.it/multiple-integral.html"
} |
perl
I'd also rather not put a space between the << and the 'END'. The heredoc-marker is syntactically one single token, and you can't specify the marker with other quoting operators like << q(END).
As we now use single quotes, no escapes are available, so your \n won't work any more. No problem, just use a literal newline:
<<'EOF';
Usage:
virename [OPTIONS] [file_names]
...
EOF | {
"domain": "codereview.stackexchange",
"id": 4144,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "perl",
"url": null
} |
quantum-mechanics, statistical-mechanics, heisenberg-uncertainty-principle
a function cannot be both time limited and band limited (a function
and its Fourier transform cannot both have bounded domain)
as well as having a more precise statement
a function and its Fourier transform cannot both have finite support
along with a proof on the Bandlimiting page.
A less formal argument is that the original wavefunction may be expressed as $\psi(x)W(x)$ where $W(x)$ is a rectangular window function (equal to unity for $x\in I$ and zero outside), and therefore the Fourier transform must be a convolution of the Fourier transforms $c(p)$ and a sinc function of the form $\dfrac{\sin kp}{kp}$ where $k$ is some constant. Since the latter has infinite bandwidth in $p$, the convolution must also have infinite bandwidth. | {
"domain": "physics.stackexchange",
"id": 52832,
"lm_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, statistical-mechanics, heisenberg-uncertainty-principle",
"url": null
} |
java, javafx
Button button = new Button("Check results");
button.setOnAction(event -> {
// check if exercises are solved correctly
int correctExercises = 0;
for (int i = 0; i < exercises.length; i++) {
int guess = 0;
try {
guess = Integer.parseInt(textFields[i].getText());
} catch (Exception e) {
e.printStackTrace();
}
if (exercises[i].compare(guess)) {
correctExercises++;
}
}
// display a message
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Congratulations!");
alert.setHeaderText(null);
String message = "You solved " + correctExercises +
" of " + numberOfExercises + " exercises correctly!";
alert.setContentText(message);
alert.showAndWait(); | {
"domain": "codereview.stackexchange",
"id": 33856,
"lm_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, javafx",
"url": null
} |
thermodynamics, temperature, entropy
I was looking for a more explicit mathematical result which shows you can
not conserve energy and follow Δ≥0 at the same time.
You can conserve energy and have $\Delta S_{tot}$ ≥0 at the same time. It happens when the cycle is not reversible.
The First Law (energy conservation) and the Second law are completely independent laws. A cycle in which a process (or processes) is irreversible complies with the first law but generates entropy that must be transferred to the surroundings as additional (to the reversible cycle) heat. That in turn means less of the heat taken in does work in an irreversible cycle than the same cycle carried out reversibly. Since the entropy (and all other properties) of the system is unchanged for a complete cycle, the heat transferred to the surroundings results in $\Delta S>0$ for the surroundings.
Hope this helps. | {
"domain": "physics.stackexchange",
"id": 63838,
"lm_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, temperature, entropy",
"url": null
} |
homework-and-exercises, thermodynamics, fluid-dynamics, density
You should add to your list of equations: $\rho_{c,1} = 8kg/m^3 - (t)0.1kg/m^3/sec$. This is very important because you are trying to solve for time. Here you can immediately see that the solution set is limited to values between 0 and 80 seconds since density cannot be negative.
I don't see any basis for your equation 5. Instead, the rate of change of the volume of the gas outside the ball equals the negative of the rate of change of the volume of the ball.
At equilibrium, the pressure in the container and ball will only differ by any elastic force of the ball. | {
"domain": "physics.stackexchange",
"id": 12097,
"lm_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, thermodynamics, fluid-dynamics, density",
"url": null
} |
inertial-frames, maxwell-equations, lorentz-symmetry, dirac-equation, galilean-relativity
Title: How does one check whether an equation is Lorentz Invariant or Galilean Invariant? As a physics student, I hear this term a lot that this equation is Lorentz Invariant or galilean Invariant e.g Dirac equation is Lorentz Invariant. Even in a non-linear pde class e.g the KdV equation this comes up. How does one check whether an equation is Lorentz Invariant in practice? Could someone please give me an example of these two cases and how to check their in variance? \begin{equation}
x = \gamma x^{\prime} + \gamma v t^{\prime} \qquad t = \gamma t^{\prime} + \gamma \frac{v}{c^2}x^{\prime}
\end{equation}
Now we transform the derivatives
\begin{equation}
\frac{\partial}{\partial t^{\prime}} = \frac{\partial x}{\partial t^{\prime}} \frac{\partial}{\partial x} + \frac{\partial t}{\partial t^{\prime}} \frac{\partial}{\partial t} = \gamma v \frac{\partial}{\partial x} + \gamma \frac{\partial}{\partial t}
\end{equation}
\begin{equation} | {
"domain": "physics.stackexchange",
"id": 62159,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inertial-frames, maxwell-equations, lorentz-symmetry, dirac-equation, galilean-relativity",
"url": null
} |
• @Szabolcs So I will use Delaunay triangulation in my case. May I ask what is the theorectical complexity of Delaunay triangulation? – H42 Jun 14 '18 at 14:21
• Delaunay triangulation can be done in O(n log n), so it should be faster for large enough sets. As suggested by @Szabolcs , however, DistanceMatrix will be much faster than Outer even if it has the same O(n^2) complexity, so this is what you should compare to timingwise... – Fidel I. Schaposnik Jun 14 '18 at 15:13 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9334308165850443,
"lm_q1q2_score": 0.8142759315850592,
"lm_q2_score": 0.8723473846343394,
"openwebmath_perplexity": 1521.4639742658176,
"openwebmath_score": 0.4133446514606476,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/175226/how-to-connect-all-points-in-a-graph-generated-by-a-set-of-given-vertexes"
} |
ideal-gas, bose-einstein-condensate, chemical-potential
Title: What does chemical potential $\mu = 0$ mean? First off, just to be clear, the chemical potential being equal to zero is different from not having a chemical potential at all (e.g. a photon gas)?
Now: physically, what does having chemical potential $\mu=0$ mean for a gas?
A Bose-Einstein condensate exists below a critical temperature $T_c$, at which $\mu$ hits $0$. What's the connection between chemical potential and Bose-Einstein condensation? When the chemical potential is 0 the extra free energy needed to add or remove a particle to the system is 0(i.e $\mu=\frac{dA}{dN}=0$. So particles can leave and enter the system without changing the (free) energy. | {
"domain": "physics.stackexchange",
"id": 23629,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ideal-gas, bose-einstein-condensate, chemical-potential",
"url": null
} |
λn be its eigenvalues still ''... Matrix I of the matrix dummy '' version JQuery.js library has been used the set eigenvectors... Matrix have 6 different parameters g1, g2, k1, k2, B,.. In the matrix and click on the Space Shuttle in order to to! Word eigen '' roughly translates as own '' or to. A has two distinct eigenvalues, it is diagonalizable any particular matrix a need eigenvectors Discover the beauty of!. Matrix below if Av = λv article points to 2 interactives that show how is! Eigenvectors of a 2 × 2 matrix this website, you agree to our Cookie Policy so let 's the! nxxn system will produce n corresponding eigenvectors can be used to communicate with,! Matrix right here is equal to 0 our Cookie Policy let us find eigenvalues... Eigenvector corresponding to the eigenvalue: we know that a − λ I 2 is an... That 's left is to use the rule of Sarrus nxxn system and. By Faraz [ solved matrices and determinants in engineering by Faraz [ solved, associated with the for. With HTML, | {
"domain": "abroad-tostudy.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806552225684,
"lm_q1q2_score": 0.8039715402273174,
"lm_q2_score": 0.8198933315126792,
"openwebmath_perplexity": 882.8701783520148,
"openwebmath_score": 0.8298553824424744,
"tags": null,
"url": "http://abroad-tostudy.com/ajiqe/91580c-how-to-find-eigenvalues-of-a-2x2-matrix"
} |
electromagnetism, electromagnetic-induction
finite, and not zero, which is more realistic anyway. This may make the calculation a bit more complicated, but that won't worry us. The real difficulty is that different parts of the wire now appear as different circuits, linked by different amounts of flux. We are no longer sure what we mean by the flux through the circuit. In fact, because the electromotive force is different from the different filamentary loops into which the circuit can be divided, some redistribution of current density must occur when rapidly changing currents flow in the ring. Hence the inductance of the circuit may depend somewhat on the rapidity of $I,$ ... | {
"domain": "physics.stackexchange",
"id": 27622,
"lm_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, electromagnetic-induction",
"url": null
} |
object-oriented, game, objective-c, simulation, ai
[self calculateDestinationPositionByFloor];
if (![self isAtFloorDestinationPosition]) {
[self doFloorMovement];
} else if (![self isAtVerticalDestinationPosition]) {
[self doVerticalMovement];
} else {
self.movementState = DwarfMovementStateReadyToMoveToNewTower;
}
}
-(void) doMovementForMovementState:(DwarfMovementState)movementState {
//the destination floor has already been chosen
[self calculateDestinationPositionByFloor]; | {
"domain": "codereview.stackexchange",
"id": 8632,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "object-oriented, game, objective-c, simulation, ai",
"url": null
} |
homework-and-exercises, electrostatics, electric-fields
Title: Electric Field of a Disk an Infinite Distance Away The electric field of radius $R$ and a uniform positive surface charge density $\sigma$ at a distance $x$ from its center is given as $$E = \frac{\sigma}{2 \epsilon_0}\left( 1 - \frac{1}{\left(\frac{R^2}{x^2}\right) + 1}\right).$$
I am asked to show that for $x\gg R$, that $E = \frac{Q}{4\pi\epsilon x^2}$.
This is what I've done (but it's wrong):
So since $\sigma$ is the charge density of the disk, $\sigma = \frac{Q}{\pi R^2}$. Substituting this, we get
$$E = \frac{Q}{2\pi R^2 \epsilon_0}\left( 1 - \frac{1}{\left(\frac{R^2}{x^2}\right) + 1}\right).$$ Further, as $x \gg R$, then the $\frac{R^2}{x^2}$ term evaluates to 0, so $E$ is therefore 0 at these conditions. | {
"domain": "physics.stackexchange",
"id": 90048,
"lm_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, electrostatics, electric-fields",
"url": null
} |
cm^{2} of material is available to make a box with a square base and an open top, find the largest possible volume of the box. That figure is a square The rectangle that has the largest area for a given perimeter is a square. And we're doing to include the base 'cause the surface area is how much, it's the area of the gold foil that is needed. What is the area of the base of the pyramid? Enter your answer in the box. Each square tile has an area of 5 m 2. In geometry, a square pyramid is a pyramid having a square base. pyramid calculator - step by step calculation, formula & solved example problem to find the total base area, total volume, lateral surface area, total surface area & slanting height in different measurement units between inches (in), feet (ft), meters (m), centimeters (cm) & millimeters (mm). Find the surface area of the trapezoidal prism. A net can be helpful when finding surface area. And all of its faces are rectangles. Using the previous example, multiply 3 by 4 to | {
"domain": "auralicht.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575193498701,
"lm_q1q2_score": 0.8166458533833736,
"lm_q2_score": 0.8311430499496096,
"openwebmath_perplexity": 333.35130182291016,
"openwebmath_score": 0.7742525935173035,
"tags": null,
"url": "http://kgll.auralicht.de/surface-area-of-a-box-with-a-square-base.html"
} |
Now use the Fourier series representations:
$$-\log(\sin(\theta))=\sum_{k=1}^\infty\frac{\cos(2k \theta)}{k}+\log(2)$$
and
$$-\log(\cos(\theta))=\sum_{k=1}^\infty(-1)^k\frac{\cos(2k \theta)}{k}+\log(2)$$
Substituting, exchanging the respective sums and integrals, we get
\begin{align}\int_0^{\pi/2} d\theta \, \log{(1+\tan{\theta})} &= \frac{\pi}{4} \log{2} + \sum_{k=1}^{\infty} \frac1{2 k^2} \left [1-(-1)^k \right ] \sin{\frac{\pi}{2} k} \\ &= \frac{\pi}{4} \log{2} + \sum_{k=1}^{\infty} \frac{(-1)^k}{(2 k+1)^2} \\ &= \frac{\pi}{4} \log{2} + G\end{align}
where $G$ is Catalan's constant.
• Great!Thank you very much! incredible! – HGF Dec 18 '14 at 15:35 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109068841395,
"lm_q1q2_score": 0.8135651207955079,
"lm_q2_score": 0.8221891392358015,
"openwebmath_perplexity": 13274.551053629835,
"openwebmath_score": 1.0000100135803223,
"tags": null,
"url": "https://math.stackexchange.com/questions/1073332/how-to-compute-the-integral-int-pi-2-0-ln1-tan-thetad-theta"
} |
file, powershell
Additionally, I am positive that there easier ways to set up the COM Objects that I am using, and parsing filenames (and reusing them, but that is more complex probably).
How can I make this code better idiomatic Powershell? A first thing to note is that you are creating a lot of COMObjects in a similar manner, we can simply extract that behavior as a separate function. Then, we note that you are expecting file names as parameters where you could expect an item instead; that allows you to pass on items to Create-List3 instead, thus allowing for piping Get-ChildItem into rather than doing extra conversion calls back and forth. | {
"domain": "codereview.stackexchange",
"id": 2098,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "file, powershell",
"url": null
} |
javascript, performance, game, dom, timer
updateTime(currentMinute, currentHour, currentDay, currentMonth, currentDateNumber, currentYear);
}
There's a lot of repetition, so it feels like I should be able to DRY it up, but because each if statement differs slightly, I haven't been able to come up with a way of rewriting the method in a way that is more efficient but also still readable.
Other methods used:
function twoDigitFormat(input) {
formatted = ("0" + input).slice(-2)
return formatted;
} | {
"domain": "codereview.stackexchange",
"id": 28488,
"lm_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, game, dom, timer",
"url": null
} |
javascript, beginner, jquery, html
$(document).on('click', 'h3', function() {
//do your thing
}); | {
"domain": "codereview.stackexchange",
"id": 29347,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, beginner, jquery, html",
"url": null
} |
electromagnetism, optics, electromagnetic-radiation, radiation, dielectric
I'm trying to understand how exactly we get $\nabla \left[ \left( \rho \dfrac{\partial{\epsilon}}{\partial{\rho}} \right)_T \dfrac{\langle \mathbf{E}^2 \rangle}{8 \pi} \right] = \nabla \left[ \left( \rho \dfrac{\partial{n}}{\partial{\rho}} \right)_T \dfrac{I}{c} \right]$. I've been doing a lot of research to try and understand this, but I'm stuck. | {
"domain": "physics.stackexchange",
"id": 70015,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, optics, electromagnetic-radiation, radiation, dielectric",
"url": null
} |
c++, template-meta-programming, transactions
template<class TransactionManagerType, class ActionType>
class Transaction {
public:
explicit Transaction(TransactionManagerType *transactionManager) :
transactionManager(transactionManager), finalized(false) {}
virtual ~Transaction() = default;
const optional<ActionType> &getAction() const {
return actionOpt;
}
void setAction(ActionType action) {
assert(!finalized);
if (actionOpt) {
// undo the existing action, if any
actionOpt->undo(transactionManager);
}
// perform the new action
action.perform(transactionManager);
// set the existing action
actionOpt = action;
}
void finalize() {
assert(!finalized); | {
"domain": "codereview.stackexchange",
"id": 31953,
"lm_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++, template-meta-programming, transactions",
"url": null
} |
homework-and-exercises, kinematics
For (b) you can use the angular constant acceleration equations. You have $\alpha$, $t$, and the starting angular velocity $\omega_0=0$. Using $$\omega_f = \omega_0+\alpha t$$ gives
$$\omega_f = 0 + {1\over200}\times10= 0.05\textrm{rad/s}$$
For a list of these equations (hopefully they are familiar already but if not...) see http://en.wikipedia.org/wiki/Equations_of_motion#Constant_circular_acceleration | {
"domain": "physics.stackexchange",
"id": 21487,
"lm_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
} |
neural-networks, machine-learning, applications, binary-classification
Title: Can you use machine learning for data with binary outcomes? I am totally new to artificial intelligence and neural networks and have a broad question that I hope is appropriate to ask here.
I am an ecologist working in animal movement and I want to use AI to apply to my field. This will be one of the few times this has been attempted so there is not much literature to help me here.
My dataset is binary. In short, I have the presence (1) and absence (0) of animal locations that are associated with a series of covariates (~20 environmental conditions such as temperature, etc.). I have ~1 million rows of data to train the model on with a ratio of 1:100 (presence:absence).
Once trained, I would like a model that can predict if an animal will be in a location (or give a probability) based on new covariates (environmental conditions).
Is this sort of thing possible using AI? | {
"domain": "ai.stackexchange",
"id": 2515,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, machine-learning, applications, binary-classification",
"url": null
} |
# Solve $y'(x)+2y(x)+3y(-x)=0$
I just arrived to an extremely weird ODE and I was wondering how could I solve it: $$y'(x)+2y(x)+3y(-x)=0.$$ Actually, I am not even sure if it is possible to prove that it has a unique solution (provided an initial condition). I tried to put it on wolfram alpha but I didn't get anything. My first thought was to use "separation of variables" method but I don't think that it will help because of the term $$y(-x)$$. Actually I am completely clueless.
Edit: I am actually wondering if this ODE has non-symmetric solutions, that is, neither odd nor even solutions.
• @DinnoKoluh Oh yes, sorry maybe I forgot to say. I am actually trying to understand if this ODE has nonsymmetric solutions (I mean, non-odd neither even solutions) – Sharik Apr 2 at 21:24
• Oh, okay. One trivial that I see is $y(x) = 0$. – Dinno Koluh Apr 2 at 21:25
Decompose $$y(x)$$ as a sum of its even and odd part: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9711290913825542,
"lm_q1q2_score": 0.8175213759179462,
"lm_q2_score": 0.8418256472515684,
"openwebmath_perplexity": 114.7691754330456,
"openwebmath_score": 0.9547612071037292,
"tags": null,
"url": "https://math.stackexchange.com/questions/3607062/solve-yx2yx3y-x-0"
} |
matlab, quantization
my_pixel_depth = 2 ^ desired_bit_depth;
%converts grayscale to an indexed image at the appropriate depth
[ind_im, reduced_colormap ] = gray2ind(my_gray_image, my_pixel_depth)
%displays your new image
figure()
subplot(1,2,1);imshow(my_gray_image); title('original')
subplot(1,2,2);imshow(ind_im,reduced_colormap); title(sprintf('reduced to %d bits',desired_bit_depth))
% save indexed png
imwrite(ind_im, reduced_colormap, 'test.png', 'bitdepth', desired_bit_depth); | {
"domain": "dsp.stackexchange",
"id": 2480,
"lm_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, quantization",
"url": null
} |
ros, ros-kinetic, create-autonomy
Originally posted by hannah1 on ROS Answers with karma: 18 on 2020-02-12
Post score: 0
Solved - those install instructions clone a different bitbucket
Originally posted by hannah1 with karma: 18 on 2020-02-12
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 34425,
"lm_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, create-autonomy",
"url": null
} |
robotic-arm, rviz, ros-groovy, ubuntu
Title: ERROR: cannot launch node of type [rviz/rviz]: rviz
while I launching files in my ros groovy I have got this error message
ERROR: cannot launch node of type [rviz/rviz]: rviz
ROS path [0]=/opt/ros/groovy/share/ros
ROS path [1]=/home/unais/x_warm/src
ROS path [2]=/opt/ros/groovy/share
ROS path [3]=/opt/ros/groovy/stacks
could you know what may be the issue
Originally posted by unais on ROS Answers with karma: 313 on 2013-12-09
Post score: 0
rviz is not uspported for ubuntu groovy on arm plateform.
See the Ubuntu ARM build farm status:
namniart.com/repos/status/groovy.html
Originally posted by David Galdeano with karma: 357 on 2013-12-12
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 16402,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "robotic-arm, rviz, ros-groovy, ubuntu",
"url": null
} |
java, xml, dom, xslt, xsd
logDebug( "CREATE RESULT OUTPUT STREAM" );
// This enables writing the results to standard output.
Result out = new StreamResult( new OutputStreamWriter( System.out ) );
logDebug( "TRANSFORM THE XML AND WRITE TO STDOUT" );
// Transform the document using a given stylesheet.
transformer.transform( new DOMSource( xml ), out );
}
/**
* Answers whether the given XSL document version is greater than or
* equal to the given required version number.
*
* @param xsl The XSL document to check for version compatibility.
* @param version The version number to compare against.
*
* @return true iff the XSL document version is greater than or equal
* to the version parameter.
*/
private static boolean versionAtLeast( Document xsl, float version ) {
Element root = xsl.getDocumentElement();
float docVersion = Float.parseFloat( root.getAttribute( "version" ) );
return docVersion >= version;
} | {
"domain": "codereview.stackexchange",
"id": 10341,
"lm_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, xml, dom, xslt, xsd",
"url": null
} |
c#, asynchronous, task-parallel-library
await Task.Run(() => Parallel.ForEach(request.Reports, report =>
{
var (reportPath, bindingOrder, reportParameters) = report;
var exportedImage = _exporter.Export(_reportServerUrl, reportPath, export, reportParameters);
if (exportedImage.Result == null)
{
throw new InvalidOperationException($"Could not render report {reportIdentifier} with binding order {bindingOrder}.");
}
reportDictionary.GetOrAdd(bindingOrder, exportedImage.Result);
})); Here's pure async example without any workarounds.
private async Task ProcessReport(Report report, ConcurrentDictionary<int, string> reportDictionary)
{
var (reportPath, bindingOrder, reportParameters) = report;
var exportedImage = await _exporter.Export(_reportServerUrl, reportPath, export, reportParameters);
if (exportedImage == null)
{
throw new InvalidOperationException($"Could not render report {reportIdentifier} with binding order {bindingOrder}.");
} | {
"domain": "codereview.stackexchange",
"id": 40858,
"lm_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#, asynchronous, task-parallel-library",
"url": null
} |
newtonian-mechanics, newtonian-gravity, pressure, fluid-statics
$$p V = k_B T = n R T = N k_B T$$
As you can see using $n := \frac{m}{M}$ and $\rho := \frac{m}{V}$
$$p \, v = \frac{p}{\rho} = R_m T$$
a higher pressure also corresponds to a higher density $\rho$ and thus also to a lower mean free path. This means again that you do not need a temperature gradient in an ideal gas to fulfill and explain the hydrostatic pressure. The fluid column above in an ideal gas presses the molecules closer together reducing the density and thus leading to a higher static pressure: Particles are not faster (as you would expect for higher temperature) but there are simply more particles hitting an area element exchanging a larger amount of momentum. | {
"domain": "physics.stackexchange",
"id": 89044,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, newtonian-gravity, pressure, fluid-statics",
"url": null
} |
strings, substrings
is an incorrect string.
An operation consists of taking a contiguous subsequence of the input string and 'flipping' every bracket in that subsequence.
Given an arbitrary string of brackets (of even length), the task is to find the smallest number of such operations needed to change it to a 'correct' string of brackets.
Another way to look at this problem is to have a string of +1s and -1s, and to try to find the smallest number of operations (of multiplying every number on an interval by -1) needed to make every prefix of this string nonnegative and every suffix nonpositive. The DP suggested in the comments by Yuval Filmus indeed works: we can solve the problem in $\mathcal{O}(n^{2})$ by DP. | {
"domain": "cs.stackexchange",
"id": 15373,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "strings, substrings",
"url": null
} |
java, matrix
if (empty[0] < current[0] - 1) {
// If empty too high in the right column, move empty
// tile down
steps++;
empty[0]++;
}
if (empty[0] > current[0]) {
// If empty below current, move out from that that
// column
steps++;
if (empty[1] < 2)
empty[1]++; | {
"domain": "codereview.stackexchange",
"id": 6656,
"lm_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, matrix",
"url": null
} |
NodeRecPtr n = makeCone(10, 5, 32, true, false);
Always be careful with the resolution parameters. Big values can lead to really huge geometry data. Especially the sphere resolution depth should be used moderatly, because this one uses a recursive subdivison algorithm proportional to 4res, meaning a value of four is already a pretty smooth sphere and a value of 64 will kill your machine (unless you have enough memory for about 1038 polygons)! For better control use the LatLongSphere?, it has nicer texture coordinates anyway.
All of these geometry-generating methods return a NodeTransitPtr? ready to be inserted into a scenegraph. Often you have already existing nodes and are only in need of the geometry. In this case you do not need to throw your node away as there are the same functions that return a GeometryTransitPtr?. You only need to append a "Geo" to the above functions.
//Another way to generate the cone
NodeRecPtr n = Node::create(); | {
"domain": "opensg.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.960951703918909,
"lm_q1q2_score": 0.8007846957492477,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 1165.5234625527432,
"openwebmath_score": 0.3680899441242218,
"tags": null,
"url": "http://opensg.org/wiki/Tutorial/OpenSG2/Basics"
} |
waves, speed-of-light, thermal-radiation, frequency
Could you explain why not ? As for me what you described is same back-body, only shielded with some coating outside which doesn't pass radiation outwards. Keep in mind, that black body doesn't have any radiating direction limitations. So part of black body radiation goes inside back to black body as well. So this blackbody emitted radiation going inwards,- you named "transmitted" radiation. So yes, for this type of backwards radiation same black body radiation effectivity law applies.
Closest analog to such construct is black holes, which absorb every type of radiation and (almost) emit none, except for gravitational waves (but for these black-body law does not apply, because it's just space-time curvature and not EM waves). Also there is a Hawking radiation. For this type radiation of black hole,- indeed black-body radiation law applies. For example, black hole with mass $1~M_☉$ according to Wien displacement law, | {
"domain": "physics.stackexchange",
"id": 94601,
"lm_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, speed-of-light, thermal-radiation, frequency",
"url": null
} |
home-experiment, analytical-chemistry, solutions
Title: Home-made way to detect lye in solution I believe that electrolysis of salt water creates lye ($\ce{NaOH}$ - sodium hydroxide). In salt water, there's $\ce{Na+}$, $\ce{Cl-}$, $\ce{H+}$ and $\ce{OH-}$ as of ionts.
So at cathode, you get $\ce{Na2}$ and that should react with water into $\ce{NaOH}$.
I want to test, if this is true - how do I do it with household items? The solution didn't react with aluminium. The easiest way to measure the pH of a solution is to use an acid-base indicator. Limited to household supplies only, I would suggest a solution made from red cabbage, which should turn blue-greenish in the alkaline region. | {
"domain": "chemistry.stackexchange",
"id": 1769,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "home-experiment, analytical-chemistry, solutions",
"url": null
} |
. . $\displaystyle \sum_{k=1}^n k^3\;= \;\frac{n^2(n+1)^2}{4}$
Note that the third formula is the square of the first formula,
. . making it easier to memorize.
. . This means: .$\displaystyle (1 + 2 + 3 + 4 + 5)^2\:=\:1^3+2^3+3^3+4^3+5^3$
It looks like a bad joke or a terrible blunder, doesn't it?
5. Originally Posted by Soroban
We have a series of constants at the third differences.
. . Hence, $\displaystyle f(n)$ is a third-degree polynomial ... a cubic.
Tell me something, is this a famous method? This is the second time I seen it used on this forum. When I was younger I developed many theorems concerning differences of a sequence. One of them you just used. (A sequence is a polynomial of degree n if and only if it takes n steps to reach a constanct sequence).
---
I have a elegant prove with this rule that,
$\displaystyle a^{(m)}_k=\sum_{k=1}^nk^m$ is always a polynomial sequence. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.985936372130286,
"lm_q1q2_score": 0.8634702604917618,
"lm_q2_score": 0.8757870029950159,
"openwebmath_perplexity": 2342.3804025705745,
"openwebmath_score": 0.9577927589416504,
"tags": null,
"url": "http://mathhelpforum.com/algebra/4627-formula-1-1-2-1-2-3-1-2-3-4-a.html"
} |
php, powershell, active-directory
Title: Active directory password changer I have written this Active Directory password changer script. Comments and testing is appreciated for things I may have overlooked, since this is my first AD Script.
There are two parts: PHP and PowerShell.
This is being run on an IIS Server with PHP 5.4.x with Fast CGI and PowerShell 2.x.
The IIS_IUSRS is a manager of a group of all people who can change their own password with this method (as I exclude any account with access to the server).
If IIS_IUSRS is not a manager of a group of people you will get "Access Denied" in the log.
My goal with this script is to change passwords of people that cannot locally access domain computers. While I want this script as secure as possible, limiting those that can change their password and not allowing those with elevated permissions to change password. I was unable to find an escape character function and had to make my own. | {
"domain": "codereview.stackexchange",
"id": 10751,
"lm_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, powershell, active-directory",
"url": null
} |
navigation, costmap-2d, costmap, global-costmap, clear-costmap
<!--
set up time nicely so there is no problem with old, outdated timestamps; rosparam set use_sim_time true
-->
<param name="/use_sim_time" value="true"/>
<node pkg="rosbag" type="play" name="rosbagplayer" args="/home/lukas/rosbags/kitchen_3.bag
/tf:=/tf_old
/move_base/DWAPlannerROS/parameter_descriptions:=/deadEnd2a
/move_base/DWAPlannerROS/parameter_updates:=/deadEnd2b
/move_base/global_costmap/costmap:=/deadEnd2c
/move_base/global_costmap/inflation_layer/parameter_descriptions:=/deadEnd2d
/move_base/global_costmap/inflation_layer/parameter_updates:=/deadEnd2e
/move_base/global_costmap/obstacle_layer/clearing_endpoints:=/deadEnd2f
/move_base/global_costmap/obstacle_layer/parameter_descriptions:=/deadEnd2g
/move_base/global_costmap/obstacle_layer/parameter_updates:=/deadEnd2h | {
"domain": "robotics.stackexchange",
"id": 17966,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, costmap-2d, costmap, global-costmap, clear-costmap",
"url": null
} |
algorithms, approximation, probabilistic-algorithms, 3-sat
Title: 3/2 - Approximation probabilistic algorithm for MAX-3-COLOR I have a textbook question here regarding Max-3-Coloring and need some assistance with it. I have searched for any type of information regarding it but haven't found anything substantial. Here is the question:
In MAX-3-COLOR you are given a graph $G=(V,E)$ and your goal is to
find a coloring of the vertices with only 3 colors $c: V \rightarrow
[3]$ that maximizes the quality function $q(c)$ - The number of edges
whose endpoint vertices are colored with different colors:
$\sum_{(i,j)\in E} (1_{c(i) \neq c(j)})$
Give a probabilistic $3/2$-approximation algorithm. (i.e $q(c)\geq 2/3 \cdot OPT$
with probability at least $1-\frac{1}{e^{k}}$ for any $k \in \mathbb{N}$ | {
"domain": "cs.stackexchange",
"id": 9053,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, approximation, probabilistic-algorithms, 3-sat",
"url": null
} |
simulation, ros-fuerte, stage
Comment by tonyParker on 2014-09-18:
Hi , I made the changes but now it says :
warn: worldfile roomba_lse_arena.world:32 : property [color] is defined but not used (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/worldfile.cc WarnUnused)
Comment by Sanjay Nag on 2019-08-15:
This didn't work for me!
Did anyone got this working on Stage_ROS kinetic? Facing the same issue! | {
"domain": "robotics.stackexchange",
"id": 9389,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "simulation, ros-fuerte, stage",
"url": null
} |
It is a good start, not much more is needed.
You have $3k=n$ and $5j=n$. It follows that $3k=5j$.
Note that $3k=5j$ in particular says that $3$ divides $5j$. It is a standard fact of number theory that if a prime $p$ (here $p=3$) divides a product $ab$, then $p$ divides $a$ or $p$ divides $b$ (or both). Clearly $3$ does not divide $5$. So $3$ divides $j$.
Let $j=3w$. Then $n=5j=(5)(3w)=15w$.
Remark: $1.$ The fact that if a prime $p$ divides $ab$, then $p$ divides $a$ or $p$ divides $b$ is sometimes called Euclid's Lemma. Books VII to IX, and to a fair degree Book X of Euclid's Elements are number-theoretic in character.
$2.$ We do not really need Euclid's Lemma in this case. For we only want to show that if $3$ divides $5j$, then $3$ divides $j$. If $3$ does not divide $j$, then $j$ leaves a remainder of $1$ or $2$ on division by $3$. In either case, you can show that the remainder when $5j$ is divided by $3$ is not $0$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307708274401,
"lm_q1q2_score": 0.8344632050001368,
"lm_q2_score": 0.8577681031721325,
"openwebmath_perplexity": 68.53250664589433,
"openwebmath_score": 0.978648841381073,
"tags": null,
"url": "https://math.stackexchange.com/questions/342128/for-every-integer-n-15-mid-n-iff-3-mid-n-and-5-mid-n"
} |
graphs, trees, network-flow, clustering, group-theory
But to my understanding, I need to calculate the longest simple path (and not repeat any nodes) and that requires an acyclic graph. Given the context of my problem, most of the times there would be no way to turn my graph acyclic given that all the nodes would be strongly connected.
Lastly, I considered creating a list of trees (image 3). Where each root would be the origin car, and each child node would be a car that the root could pick-up. For each level of depth the available seats of the root would decrease until no more combinations existed. Then I would group trees' levels together and try to achieve the best combination and minimum of cars. | {
"domain": "cs.stackexchange",
"id": 12731,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs, trees, network-flow, clustering, group-theory",
"url": null
} |
Seriously, no MCT? Your proof for nonnegative looks good. For the proof for simple,
For your proof for simple, it comes down to this: Does the switch between
$$\int_\Omega\sum_{n=1}^{\infty} \text{(random variables)} = \sum_{n=1}^{\infty}\int_\Omega \text{(random variables)}$$
build on the switch between $$\sum_{i=1}^k\sum_{n=1}^{\infty} \text{(real numbers)} = \sum_{n=1}^{\infty}\sum_{i=1}^k \text{(real numbers)}$$
The answer is yes, and based on your proof you would seem to know that. Let's expand your proof in more detail. In particular, how did we get your step (a) below?
$$\int_\Omega(\sum_{n=1}^{\infty}f_n)d\mu \stackrel{a}{=} \sum_{i=1}^k\sum_{n=1}^\infty x_{n,i}\mu(A_{n,i})\stackrel{b}{=}\sum_{n=1}^\infty\sum_{i=1}^k x_{n,i}\mu(A_{n,i})\stackrel{c}{=}\sum_{n=1}^{\infty}\int_\Omega f_nd\mu$$
$$\int_\Omega\sum_{n=1}^{\infty}f_nd\mu$$
$$= \int_\Omega\sum_{n=1}^{\infty}\sum_{i=1}^k x_{n,i}1_{A_{n,i}}d\mu$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241956308277,
"lm_q1q2_score": 0.8119252991669399,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 341.91865526634746,
"openwebmath_score": 0.9569154381752014,
"tags": null,
"url": "https://math.stackexchange.com/questions/2748802/show-that-int-omega-sum-n-1-inftyf-nd-mu-sum-n-1-infty-int-om"
} |
php, natural-language-processing
Addendum 2: Reconsider general concept of word_stem()
When following your links to the original code I see that word_stem() is a rather long function consisting of above 40 disconnected if statements similar to the two above (or four in modified post), spanning over 300 lines. That is a heavy function, and raise some concerns: | {
"domain": "codereview.stackexchange",
"id": 16956,
"lm_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, natural-language-processing",
"url": null
} |
Ex. 12.2 | Q 3.5 | Page 200
Express the number appearing in the given statements in standard form
Thickness of a thick paper is 0.07 mm
Ex. 12.2 | Q 4 | Page 200
In a stack there are 5 books each of thickness 20 mm and 5 paper sheets each of thickness 0.016 mm. What is the total thickness of the stack?
Ex. 12.1Ex. 12.2
## NCERT solutions for Class 8 Mathematics Textbook chapter 12 - Exponents and Powers
NCERT solutions for Class 8 Mathematics Textbook chapter 12 (Exponents and Powers) include all questions with solution and detail explanation. This will clear students doubts about any question and improve application skills while preparing for board exams. The detailed, step-by-step solutions will help you understand the concepts better and clear your confusions, if any. Shaalaa.com has the CBSE Class 8 Mathematics Textbook solutions in a manner that help students grasp basic concepts better and faster. | {
"domain": "shaalaa.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877684006775,
"lm_q1q2_score": 0.8046407660923071,
"lm_q2_score": 0.8289388125473628,
"openwebmath_perplexity": 5217.219587630928,
"openwebmath_score": 0.5507830381393433,
"tags": null,
"url": "https://www.shaalaa.com/textbook-solutions/c/ncert-solutions-class-8-mathematics-textbook-chapter-12-exponents-powers_263"
} |
general-relativity, spacetime, differential-geometry, metric-tensor, curvature
Title: How is spacetime locally Lorentzian at the center of a large mass? Following up on the questions raise here and trying to get a little more clarity on what it means to be 'local' and 'flat'. In the first chapter of Gravitation, the author(s) state:
The geometry of spacetime is locally Lorentzian everywhere | {
"domain": "physics.stackexchange",
"id": 75961,
"lm_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, spacetime, differential-geometry, metric-tensor, curvature",
"url": null
} |
ros, rosdep, ros-fuerte, dependencies, debian
ROS path [30]=/home/john/ros/geometry_experimental
ROS path [31]=/home/john/ros/perception_pcl
ROS path [32]=/home/john/ros/vision_opencv
ROS path [33]=/home/john/ros/visualization
ROS path [34]=/home/john/ros/executive_smach_visualization
ROS path [35]=/home/john/ros/slam_gmapping
ROS path [36]=/home/john/ros/filters
ROS path [37]=/home/john/ros/orocos_kinematics_dynamics
ROS path [38]=/home/john/ros/geometry_tutorials
ROS path [39]=/home/john/ros/nodelet_core
ROS path [40]=/opt/ros/fuerte/stacks
ROS path [41]=/opt/ros/fuerte/share
ROS path [42]=/opt/ros/fuerte/share/ros
pcl_ros: No definition of [pcl] for OS [debian]
python_qt_binding: No definition of [ros] for OS [debian]
navfn: No definition of [pcl] for OS [debian]
image_proc: No definition of [opencv2] for OS [debian]
rviz: No definition of [python-qt-bindings] for OS [debian]
gazebo_worlds: Missing resource protobuf
ROS path [0]=/opt/ros/fuerte/share/ros
ROS path [1]=/home/john/ros/navigation | {
"domain": "robotics.stackexchange",
"id": 10412,
"lm_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, rosdep, ros-fuerte, dependencies, debian",
"url": null
} |
ros, pr2-tabletop-manipulation-apps
Title: Starting the Manipulation Pipeline: self_filter.yaml
ROS Electric
Ubuntu Natty Narwhal
Hello everybody,
I'm following the tutorial Starting the Manipulation Pipeline".
When I run roslaunch pr2_tabletop_manipulation_launch pr2_tabletop_manipulation.launch I have the following error message:
error loading <rosparam> tag:<br> file does not exist [/opt/ros/electric/stacks/pr2_arm_navigation/pr2_arm_navigation_perception/config/self_filter.yaml]<br> XML is <rosparam command="load" file="$(find pr2_arm_navigation_perception)/config/self_filter.yaml"/>
Indeed self_filter.yaml does not exist in the directory.
Could someone please point me in the right direction here?
Thanks | {
"domain": "robotics.stackexchange",
"id": 7317,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, pr2-tabletop-manipulation-apps",
"url": null
} |
binary, cellular-automata
I cannot find any reference anywhere that explains how to change between a real number and a growth rule. In 1d, the situation is well documented, such as here: https://mathworld.wolfram.com/ElementaryCellularAutomaton.html but in 2d the exact mapping of bits is nowhere to be found. I'd really like to make a program, so that I can for instance enter the number 465 and it will draw the pattern 465 from the Wolfram book. The other stack exchange answer I linked to above provides a possible binary mapping, however the method given there does not produce the same numbers as in the Wolfram reference. The binary value of 465 is 111010001 which does not help me at all. This particular shape is based on adding a cell when exactly one neighbor is currently occupied, so shouldn't we expect to have 4 1's in a row, one for each of the four neighbors? And to make this even more confusing, the last two digits seem to be swapped from the description given on the Wolfram page itself... It seems clear | {
"domain": "cs.stackexchange",
"id": 16744,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "binary, cellular-automata",
"url": null
} |
### Use Problem-Based Optimize Live Editor Task
To find a feasible point, launch the Optimize Live Editor task from a Live Script by choosing Task > Optimize on the Code tab or Insert tab. Choose the problem-based task.
Set the problem variable x to have lower bound –5 and upper bound 5. Set the problem variable y to have lower bound –10 and upper bound 10. Set the initial point for x to 2 and for y to –2.
Set the Goal to Feasibilty.
Create inequalities represending the three constraints. Your task should match this picture.
Switch the task mode to Solve problem. The task chooses the fmincon solver, and reaches the following solution.
### Effect of Initial Point
Starting from a different initial point can cause fmincon to fail to find a solution. Set the initial point for x to –2.
This time fmincon fails to find a feasible solution.
### Try Different Solver | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808701643914,
"lm_q1q2_score": 0.8082042588339089,
"lm_q2_score": 0.8244619306896955,
"openwebmath_perplexity": 2772.9576951375357,
"openwebmath_score": 0.4055088460445404,
"tags": null,
"url": "https://de.mathworks.com/help/optim/ug/feasibility-problem-based-optimize.html"
} |
c#, array
is the Aha! solution of using reversals, with the following pseudocode
reverse(A, 0, K-1);
reverse(A, K, A.length()-1);
reverse(A, 0, A.length()-1);
assuming that reverse(A, I, J) operation reverses elements of array A from I-th element to J-th element, inclusive, that is, if $$A=\{a_0,a_1,...,a_i,a_{i+1}...,a_j,a_{j+1}...,a_{N-1}\}$$ then $$\text{reverse}(A, i,j)=\{a_0,a_1,...,a_j,...,a_{i+1},a_i,a_{j+1},...,a_{N-1}\}$$
For example, given array A = [3, 8, 9, 7, 6] and K = 3,
the function should return [9, 7, 6, 3, 8].
Steps, corrected for the account of different meaning for K, namely whether it is number of elements to move from left to right ("Programming Pearls"), or from right to left (an example):
[3, 8,| 9, 7, 6] - original array
[8, 3,| 9, 7, 6] - reversed first part
[8, 3,| 6, 7, 9] - also reversed second part
[9, 7, 6,| 3, 8] - the solution
The idea by @forsvarir, namely: | {
"domain": "codereview.stackexchange",
"id": 20715,
"lm_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#, array",
"url": null
} |
time-complexity, sat, boolean-formulas
Somewhat more general problem is quantifier elimination, i.e. you're given $\exists X. f$ with some free variables $Y$, where $X$ and $Y$ are sets of variables. The output is a formula $f'$ that has only free variables $Y$ and has the same set of satisfying assignments as $\exists X. f$. Some recent papers on the problem [2][3].
(am a coauthor of the [3]).
[1] McMillan: Applying SAT Methods in Unbounded Symbolic Model Checking. CAV 2002
[2] Goldberg,Manolios: Quantifier elimination via clause redundancy. FMCAD 2013
[3] Klieber et: al Solving QBF with Free Variables. CP 2013 | {
"domain": "cstheory.stackexchange",
"id": 2647,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "time-complexity, sat, boolean-formulas",
"url": null
} |
. . $$=\;15\sin\cos x - 60\sin x\cos^3\!x + 48\sin x\cos^5\!x$$
. . . . . $$- 20\sin^3\!x\cos x + 80\sin^3\!x\cos^3\!x - 64\sin^3\!x\cos^5\!x$$
Now integrate that term by term.
#### ZaidAlyafey
##### Well-known member
MHB Math Helper
$$\displaystyle \int \sin(ax) \cos(bx) \, dx$$
Can be transformed to
$$\displaystyle \frac{1}{a}\int \sin(x) \cos(c x) \, dx$$
Try integration by parts twice .
#### DreamWeaver
##### Well-known member
Soroban, you a meenie! Bad mammal!
EDIT:
[ps. High five??? ]
#### Ackbach
##### Indicium Physicus
Staff member
$$\displaystyle \int \sin(ax) \cos(bx) \, dx$$
Can be transformed to
$$\displaystyle \frac{1}{a}\int \sin(x) \cos(c x) \, dx$$
Try integration by parts twice .
You wouldn't even need to transform. Just integrate by parts twice and "solve" for the integral. | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147161743549,
"lm_q1q2_score": 0.8060723001291507,
"lm_q2_score": 0.8289388125473629,
"openwebmath_perplexity": 2378.4359211074047,
"openwebmath_score": 0.8925041556358337,
"tags": null,
"url": "https://mathhelpboards.com/threads/integration-of-trig-function.6790/"
} |
c++, design-patterns, memory-management, pointers, reference
Avoiding, Identifying Bugs
Class Flexibility
Code Readability
Some alternative implementations I can think of:
Using raw pointers instead of const references for the Data class
Using inheritance and implementing the "view" functions within the Data class
There are some important things to note about this code as well. The View class can not be copied or moved, meaning that its lifespan is identical to that of the Data class. There is also the flexibility of being able to mutate the View class when Data::view() is called, for example, setting a scalar. The two classes are mutual friends, but the Data only really has a use for the constructor of the View.
Data.h
#ifndef DATA_H
#define DATA_H
#include "View.h"
class Data {
public:
Data(const int value) :
view_(*this),
value_(value)
{}
const View& view() const { return view_; }
int value() const { return value_; }
private:
friend View;
const int value_;
const View view_;
};
#endif // DATA_H | {
"domain": "codereview.stackexchange",
"id": 19283,
"lm_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++, design-patterns, memory-management, pointers, reference",
"url": null
} |
machine-learning, computer-vision, feature-extraction
The Euclidean distance measures the space between the two points as the length of a line that crosses the inside of the circle.
Instead, the geodesic distance is defined as the shortest line or path (let's say) that connects the two points by travelling only on the surface (circumference) of the manifold, the circle in this case. Meaning that you can't travel in the inside of that space. | {
"domain": "ai.stackexchange",
"id": 4002,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, computer-vision, feature-extraction",
"url": null
} |
The regular period for tangents is Ï. The horizontal stretch can typically be determined from the period of the graph. The standard period of a tangent function is radians. Graph one complete period for the function. Tangent graph is not like a sine and cosine curve. Tangent Graph. Examples: 1. The domain of the tangent function is all real numbers except whenever cosâ¡(θ)=0, where the tangent function is undefined. See figure below for main panel of the applet showing the graph of tangent function in blue and the vertical asymptotes in red. The value of $$k$$ affects the period of the tangent function. In other words, it completes its entire cycle of values in that many radians. 1 tan 3 y x =â Find the period . A tangent function has an amplitude (steepness) of 3, period of Ï, a transformation of Ï/2 to the right, and a transformation down 1. Graph: t = tan x; Graph: y = a tan bx; Example; Graph: t = tan x Graph. A period is the width of a cycle. Determine the period of a | {
"domain": "iita.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9504109784205502,
"lm_q1q2_score": 0.8290885345070689,
"lm_q2_score": 0.8723473879530492,
"openwebmath_perplexity": 1179.9577146280094,
"openwebmath_score": 0.773389995098114,
"tags": null,
"url": "http://bulletin.iita.org/stephanie-tsicos-orlwmt/s0qho.php?a53d6b=tangent-graph-period"
} |
organic-chemistry, reaction-mechanism
Scheme 1: Example esterification of (R)-butan-2-ol | {
"domain": "chemistry.stackexchange",
"id": 8354,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism",
"url": null
} |
forces, cosmology, gravity, space-expansion, dark-energy
PS: Examples of people mentioning a point where there is a balance between Dark Energy and gravity:
https://old.reddit.com/r/cosmology/comments/16x0uud/what_effects_does_dark_energy_have_in_the/
https://imgur.io/IMUhq
https://academic.oup.com/mnras/article/422/4/2945/1048646?login=false
https://arxiv.org/abs/1206.1433
https://astronomy.stackexchange.com/questions/54826/dark-energy-affecting-the-ejection-and-infall-of-material-in-galaxies Dark energy exerts a repulsive gravitational influence. | {
"domain": "physics.stackexchange",
"id": 97410,
"lm_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, cosmology, gravity, space-expansion, dark-energy",
"url": null
} |
c, performance
stop = clock();
double elapsed = (double)(stop - start) / CLOCKS_PER_SEC * 1000;
double average = elapsed / loops;
printf("Loops:\t%i\tElapsed time:\t%f\tAverage:\t%f\n", loops, elapsed, average);
}
free(big_pile);
}
I compile it under XCode on a MacBook Air running OSX Lion. This allow me to change the build target to 32- or 64-bit. When I run the program (and verify that the program is actually running in the correct bit-mode) I see no real difference in time.
Is this the right way to measure performance difference between 32- and 64-bit?
Is XCode/the compiler playing tricks on me?
Is there anything else wrong?
Note Sorry for the C. C isn't my native tongue ;-) | {
"domain": "codereview.stackexchange",
"id": 1121,
"lm_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",
"url": null
} |
c++, performance, error-handling, formatting, arduino
const uint8_t Hall[NUM_LOOPS] = { 3, 4, 5, 6, 7};
/** Array for storing relevant LED pins; (DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES) */
const uint8_t LED[] = { 11, 13, 10, 1};
/** Remove comment ('//') to enable potentiometer-driven scroll speed */
//const uint8_t POT_PIN_SPEED = 8;
/** Remove comment ('//') to enable potentiometer-driven LED display brightness */
//const uint8_t POT_PIN_SPEED = 9; | {
"domain": "codereview.stackexchange",
"id": 42168,
"lm_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, error-handling, formatting, arduino",
"url": null
} |
The matrix is diagonalisable as the minimal polynomial has only distinct roots.
Note that once you have one matrix that satisfies $A^2+A=I$, you have infinity many, since for every invertible matrix $P$ we get $$(P^{-1}AP)^2+(P^{-1}AP)=I\qquad\text{and}\qquad \det(P^{-1}AP)=1$$ Now, if $4\mid N$, then choose the matrix $$A=diag(\phi,-1-\phi,\ldots,\phi,-1-\phi)$$ where $\phi=\frac{\sqrt{5}-1}{2}$. Since $\phi^2+\phi=1$, we have that $A^2+A=I$. In addition, $\det A=(\phi(-1-\phi))^{N/2}=(-1)^{N/2}=1$ because $4\mid N$.
Suppose now that If $4\nmid N$. Since $f(A)=O$ for $f(x)=x^2+x-1$ and since $f(x)$ is simple above $\mathbb{R}$ it follows that $A$ is similar to a diagonal matrix $D$ that has $\phi$ and $-1-\phi$ along its main diagonal. But unless $4\mid N$, we get that $\det A=\det D\neq 1$.
• But the determinant will not be $1$. – quid Jul 6 '16 at 16:04
• I fixed that. The other cases can be done similarly. – boaz Jul 6 '16 at 16:06 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986363162714234,
"lm_q1q2_score": 0.8323870384822468,
"lm_q2_score": 0.8438950986284991,
"openwebmath_perplexity": 98.82039928851111,
"openwebmath_score": 0.97709059715271,
"tags": null,
"url": "https://math.stackexchange.com/questions/1851084/matrix-equation-a2a-i-when-deta-1"
} |
python, beginner, python-3.x
# print the decoded capacitor values
for i in result:
print(i) Variable usage
Assign cmdargs once, and get it right the first time. Put a more insightful comment there. Rename it to cmd_args for readability.
# Skip argv[0], which is the name of this program
cmd_args = sys.argv[1:] | {
"domain": "codereview.stackexchange",
"id": 10057,
"lm_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",
"url": null
} |
ros, array, message
Is this okay? Please let me know if you know any more information!
The Code
Here is the most important parts of my program as of now:
class ImageConverter {
ros::NodeHandle nh_;
image_transport::ImageTransport it_;
image_transport::Subscriber image_sub_;
image_transport::Publisher image_pub_;
ros::Publisher circle_pub_;
public:
ImageConverter()
: it_(nh_)
{
// Subscribe to the Bottom Raw Image
image_sub_ = it_.subscribe("/ardrone/bottom/image_raw", 1,
&ImageConverter::imageCb, this);
// Advertisng the Circles being detected from this
circle_pub_ = nh_.advertise<zlab_drone::Circles>("/circles", 1);
}
void imageCb(const sensor_msgs::ImageConstPtr& msg)
{
// Find the circles from a particular video
cv::vector<cv::Vec3f> circles;
cv::HoughCircles(img_bin, circles, CV_HOUGH_GRADIENT, 1, 70, 140, 15,
20, 400);
std::vector<zlab_drone::Circle> v; | {
"domain": "robotics.stackexchange",
"id": 27094,
"lm_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, array, message",
"url": null
} |
particle-physics, atoms, popular-science, nuclear-engineering, fusion
Alas, as far as I know this simply doesn't happen.
Which implies that doing it by intent is not merely beyond current technology, but that it is hard to envision what improvements might lead to a way to start thinking about how to finesse it. The time, space and energy scales involved are all extremely demanding. | {
"domain": "physics.stackexchange",
"id": 8472,
"lm_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, atoms, popular-science, nuclear-engineering, fusion",
"url": null
} |
"Obviously this $\epsilon$, $\delta$ definition implies continuity, but is the opposite also implied?"
This depends on what you take to be your definition of continuity. Remember, a definition is an if and only if statement, we just suppress the only if portion. So if the $\epsilon$-$\delta$ condition is how you define continuity, then of course continuity implies the condition, but be aware of where your definition can be applied. This is why the open set characterization of continuity is useful: because it is defined for any space where we care about continuity and it is equivalent to the $\epsilon$-$\delta$ characterization on those spaces where both can apply. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9504109812297141,
"lm_q1q2_score": 0.803992983751917,
"lm_q2_score": 0.845942439250491,
"openwebmath_perplexity": 160.59274018035487,
"openwebmath_score": 0.9422575235366821,
"tags": null,
"url": "https://math.stackexchange.com/questions/1025890/what-does-continuity-in-general-mean"
} |
experimental-chemistry, mixtures, distillation
Title: Fractional Distillation Why does the long length of the fractionating column in fractional distillation enable more effective separation of two liquids in a mixture?
(basically what's the purpose of the fractionating column being long in relation to the effectiveness of the fractional distillation process) It simply spreads the temperature change over a longer distance, enabling separation of distillates with boiling points close to each other. "Generally the component parts boil at less than 25 °C from each other under a pressure of one atmosphere."
Imaging reading a mercury thermometer one cm tall as compared with one 100 cm tall: it would be difficult to distinguish temperatures on the smaller one. In the fractionation column below, it helps keep the outputs separate. | {
"domain": "chemistry.stackexchange",
"id": 4205,
"lm_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-chemistry, mixtures, distillation",
"url": null
} |
Any answers will be appreciated. I know $\mathbf Q$ has closure $\mathbf R$, but can $\mathbf Q$ be expressed as the sum of two nowhere dense sets? Or will some other example work?
• You can make $A$ to be the integers and $B= \sqrt{2} A$ – PenasRaul Sep 1 '14 at 21:58
• @PenasRaul This does not seem to work because $A+B\neq\mathbb{Q}$ – user2097 Sep 1 '14 at 22:01
• @user2097 An additive subgroup of $\mathbb{R}$ is either cyclic or dense. Since both $\mathbb{Z}$ and $\sqrt{2}\mathbb{Z}$ are additive subgroups and their sum is not cyclic, their sum is dense. On the other hand both are closed with empty interior. – egreg Sep 1 '14 at 23:25
• @egreg The OP wants $A+B=\mathbb{Q}$ if I understand the question correctly. – user2097 Sep 1 '14 at 23:29
• @user2097 My impression is that the title and the question don't match and that asking about $\mathbb{Q}$ is just an attempt. And there is “Or will some other example work?” – egreg Sep 1 '14 at 23:33 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575121992375,
"lm_q1q2_score": 0.8122918773953598,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 371.23774599166285,
"openwebmath_score": 0.8929101228713989,
"tags": null,
"url": "https://math.stackexchange.com/questions/916388/construct-an-example-in-mathbf-r-where-a-and-b-are-two-nowhere-dense-sets/916401"
} |
molecular-biology, transformation
What I will do next time is to spin down the culture and take it up in max. 50 ml of medium before freezing. This way freezing will be faster as well as thawing. I have also done minipreps from stock cultures (glycerol stocks of plasmids in E.coli) which accidentally stayed out of the freezer for two days. Here the yields where not so great (but the density of the culture was also much lower), but the quality after standard miniprep was good and the plasmids worked both for subsequent cloning as well as for retransformation to make new stocks. | {
"domain": "biology.stackexchange",
"id": 2441,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, transformation",
"url": null
} |
php, performance, mysql
Here is the table structure:
# Field, Type, Null, Key, Default, Extra
'idweather', 'int(11)', 'NO', 'PRI', NULL, 'auto_increment'
'date', 'datetime', 'YES', 'MUL', NULL, ''
'rainfall', 'float', 'YES', '', NULL, ''
'windspeed', 'float', 'YES', '', NULL, ''
'dewpoint', 'float', 'YES', '', NULL, ''
'pressure', 'float', 'YES', '', NULL, ''
'bmp085_temp', 'float', 'YES', '', NULL, ''
'dht22_temp', 'float', 'YES', '', NULL, ''
'abs_hum', 'float', 'YES', '', NULL, ''
'gust', 'float', 'YES', '', NULL, ''
'uvi', 'float', 'YES', '', NULL, ''
'light', 'float', 'YES', '', NULL, ''
'rel_humidity', 'float', 'YES', '', NULL, ''
'wind_dir', 'varchar(5)', 'YES', '', NULL, '' You SQL commands seem rather overelaborated. Let me first rewrite it in a more readable way:
SELECT DATE_FORMAT(date,'%H:%i'), dht22_temp
FROM weather
INNER JOIN
(SELECT max(dht22_temp) as ts
FROM weather
WHERE date(date) = curdate())
AS ds ON weather.dht22_temp = ds.ts
ORDER BY date DESC
LIMIT 1 | {
"domain": "codereview.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": "php, performance, mysql",
"url": null
} |
From this,at this point, we can get the pdf of $Z={X_1- z_1 \over \sqrt{z_2}}$ using transformation.
By the way, the MVUE would be like this : $$\psi(z_1,z_2)={\Gamma({n-1 \over 2}) \over \sqrt{\pi} \Gamma({n-2 \over 2})} \int ^{\theta_c} _{-{\pi \over2}} cos^{n-3} \theta d\theta$$ while $\theta_c = sin^{-1} ({\sqrt{n}(c-z_1)\over(n-1)\sqrt{z_1}})$ and would be 1 if $c \geq z_1+{n-1 \over \sqrt{n} \sqrt{z_2} }$
I am not a native English speaker and there could be some awkward sentences. I am studying statistics by myself with text book introduction to mathmatical statistics by Hogg. So there could be some grammatical or mathmatical conceptual mistakes. It would be appreciated if someone correct them. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.975946445706356,
"lm_q1q2_score": 0.8215767502760619,
"lm_q2_score": 0.8418256492357358,
"openwebmath_perplexity": 431.87932427218533,
"openwebmath_score": 0.8963122963905334,
"tags": null,
"url": "https://stats.stackexchange.com/questions/181964/the-pdf-of-fracx-1-barxs"
} |
python, console, hangman
src/hangman/conversation.py
from __future__ import annotations
from collections.abc import Callable, Generator
from dataclasses import dataclass
from typing import ClassVar, Literal
from .choice_list import ChoiceList
def _response_is_valid_choice(
response: str,
choices: ChoiceList | None
) -> bool:
'''
Checks if the response is a valid choice.
'''
assert choices is not None
return response in choices
def _no_op(_response: str, _choices: ChoiceList | None) -> Literal[True]:
'''
A validator that always returns ``True``.
'''
return True | {
"domain": "codereview.stackexchange",
"id": 45097,
"lm_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, console, hangman",
"url": null
} |
# How do I visualise dependency of two events?
Background/Context: I tried to solve the question
For a certain probability experiment, the probability that event $$A$$ will occur is $$\frac 12$$ and the probability that event $$B$$ will occur is $$\frac 13$$. Which of the following values could be the probability that the event $$A \bigcup B$$ will occur? (select all that apply) $$a) \frac 13$$ $$b) \frac 12$$ $$c) \frac 34$$
Since the question gives no information about the dependency I assume both extreme cases:
[Independent] $$p(A \bigcup B) = p(A) + p(B) = \frac 12 + \frac 13 = \frac 56$$
[Dependent] $$p(A \bigcup B) = p(A) + p(B)-p(A \bigcap B) = \frac 56 - p(A \bigcap B)$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676502191265,
"lm_q1q2_score": 0.8076986865593272,
"lm_q2_score": 0.8244619350028204,
"openwebmath_perplexity": 198.04803418793279,
"openwebmath_score": 0.8360623717308044,
"tags": null,
"url": "https://math.stackexchange.com/questions/3223588/how-do-i-visualise-dependency-of-two-events"
} |
c#, asp.net, asp.net-mvc-4
if (author == null)
{
return HttpNotFound();
}
/*var books = from b in be.books
join a in be.authors
on b.author_id equals a.id
where b.author_id == author_id
select b;
ViewBag.author_name = aut.name;*/
//pass the author to the view and in the view you can iterate on the author.Books collection
//if the foreign keys are correct in the database
//or you setted everything correctly in code first approach
return View(author);
}
} | {
"domain": "codereview.stackexchange",
"id": 3154,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, asp.net, asp.net-mvc-4",
"url": null
} |
everyday-chemistry, safety
Ventilation (from personal experience, this one is often overlooked).
Ventilation is often an essential requirement for safe storage of hazardous
chemicals. Its main function is to allow dilution and extraction of vapours or
gases that may escape / seep out from containers during storage so they no
longer present problems from the viewpoint of noxious smell, hazardous
personal exposure or creation of an explosive atmosphere. | {
"domain": "chemistry.stackexchange",
"id": 2612,
"lm_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, safety",
"url": null
} |
extra-terrestrial
You can extrapolate #1 from just about every science fiction movie ever made. But I don't mean anything like the starship Enterprise, or the Death Star. To become a Type III civilization, a civilization first has to reach Type II status. What does that entail? Well, among a lot of other things, shunning war. I know that might be hard to believe, but think about this: Could a single nation get off this planet on a large scale all by itself?
A good example is the International Space Station. To get the project going, it needed the combined help of the U.S., Russia, Japan, China, and the E.S.A. Admittedly, we're entering a new age of space travel. SpaceX, Blue Origin, Virgin Galactic, Reaction Engines, and other companies are showing that they can get people and things to orbit or suborbital trajectories. Maybe an entire country isn't needed to do something grand; maybe a single company can do it. | {
"domain": "astronomy.stackexchange",
"id": 484,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "extra-terrestrial",
"url": null
} |
wavefunction, quantum-spin, fermions, spin-statistics
Title: Connection between singlet, triplet two-electron states and the Slater determinant I'm confused about a number of things concerning two-electron systems and spin.
Here is (perhaps too much) exposition, skip to "the problem" if you want:
Consider the helium atom in the simplified picture where we ignore electron-electron repulsion, and let $\psi_{nlm}$ be the usual space-wavefunctions, and let $\chi_{\uparrow}$, $\chi_{\downarrow}$ denote the simultaneous eigenfunctions of $\mathbf{S}^2$ and $S_z$. Then write the one-electron wavefunctions as
$$ \phi(i) = \psi(\mathbf{r}_i) \chi(s_i), \qquad i \in \{1,2\}$$
where $i$ is short for the space and spin coordinates $(\mathbf{r}_i, s_i)$.
Given two one-electron wavefunctions $\phi_1$, $\phi_2$ we can always form a corresponding antisymmetric two-electron wavefunction with the Slater determinant:
$$\phi(1,2) = \frac{1}{\sqrt{2}} \det \begin{bmatrix} \phi_1(1) & \phi_1(2) \\ \phi_2(1) & \phi_2(2) \end{bmatrix}.$$ | {
"domain": "physics.stackexchange",
"id": 30245,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wavefunction, quantum-spin, fermions, spin-statistics",
"url": null
} |
php, object-oriented, mysql
Title: OOP PHP for handling upvoting kinda new to OOP, and I wanna know if i'm heading into the right direction. Also I should mention I'm not using AJAX
AnswerVoteManager.php
<?php
require '../config.php';
interface voting
{
public function voted();
public function redirect();
public function vote();
public function deleteVote();
public function addVote();
public function subtractVote();
public function updateVote();
public function insertVote();
public function getCurrentvote();
}
class AnswerVoteManager
{
private $dbh;
protected $answerID;
protected $title;
protected $voter;
protected $vote_type;
/**
* @return mixed
*/
public function getAnswerID()
{
return $this->answerID;
}
/**
* @param mixed $answerID
*/
public function setAnswerID($answerID)
{
$this->answerID = $answerID;
}
/**
* @return mixed
*/
public function getTitle()
{
return $this->title;
}
/**
* @param mixed $title
*/
public function setTitle($title)
{
$this->title = $title;
} | {
"domain": "codereview.stackexchange",
"id": 23257,
"lm_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, mysql",
"url": null
} |
quantum-field-theory, renormalization, quantum-chromodynamics, non-perturbative
Yes, $T^{\mu}_{\mu}\sim \beta F^{2}$ is valid to all orders.
Observe that $T^{\mu}_{\mu}$ is RG-invariant and scheme-independent, so $M^{2}$ also is. The product $\beta F^{2}$ is RG-invariant and scheme-independent, unlike the two factors taken separately. | {
"domain": "physics.stackexchange",
"id": 68394,
"lm_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, renormalization, quantum-chromodynamics, non-perturbative",
"url": null
} |
ros, kinect, openni, sensor
Original comments
Comment by isura on 2014-07-10:
Any update on this?
Comment by Cyril Jourdan on 2014-12-12:
Anyone managed to get the skeleton tracking with the Kinect v2 ? that would be awesome^^!
Comment by srik11 on 2016-01-17:
Any update on the new kinect (kinect for xbpx one) ? Has anyone managed to get it run.?
Would highly appreciate your help regarding the same.
Comment by Cyril Jourdan on 2016-01-18:
I got it working on Ubuntu 14.04 and ROS Indigo up to the point where I can see the colored point cloud in Rviz. I think you just have to follow the instructions here : https://github.com/code-iai/iai_kinect2
Comment by srik11 on 2016-01-18:
Hey, I tried the same. I installed libfreenect2. But for me the issue is that I cannot even run with Protonect. So I was wondering whether my USB controller has any issue. I get no devices found when I run Protonect. Although the USB port is USB 3.0. Which USB controller are you using?
Comment by Cyril Jourdan on 2016-01-19: | {
"domain": "robotics.stackexchange",
"id": 16409,
"lm_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, kinect, openni, sensor",
"url": null
} |
We are able to write: which means ' the sum of all terms like m 3 ' . Set-Builder Notation. In order to master the techniques explained here it is vital that you undertake plenty of practice exercises so that they become second nature. explaining using examples how to overcome or try to overcome the difficulties in interpreting this notations. Sigma Notation Exercises ; Topics ... Sigma Notation Examples. After the definition is learned, all that is left for you to specifically do here is read the table and perform the necessary arithmetic. The sum notation uses the capital Greek letter sigma as follows: Thus if x 1 = 6, x 2 = 7 and x 3 = -2, then. To make it easier to write down these lengthy sums, we look at some new notation here, called sigma notation (also known as summation notation). $\endgroup$ â nbro Dec 19 '16 at 15:33 Example 1. Series : Sigma Notation : ExamSolutions : A-Level Maths In this tutorial you are shown the meaning behind sigma notation for the sum of a sequence | {
"domain": "kernel.md",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305381464927,
"lm_q1q2_score": 0.8167884346819511,
"lm_q2_score": 0.8479677526147223,
"openwebmath_perplexity": 630.1821140030605,
"openwebmath_score": 0.9468434453010559,
"tags": null,
"url": "https://kernel.md/cqjgxqdr/sigma-notation-examples-6f0a07"
} |
java, excel
Class fields should always have an explicit access modifier (public, private, or protected). Generally, if they're constants (as you use them), they are either public static final or private static final with the name in ALL_CAPS_WITH_UNDERSCORES. For an understanding of static, you can see this StackOverflow Q&A.
So... private static final String[] COLUMN_NAMES = { "Column 1", "Column 2", "Column 3" };
excel() {
table = new JTable( dataValues, columnNames );
}
Constructors and methods should also have an explicit access modifier. (public JTableConverter())
public void toExcel(JTable table, File file) { | {
"domain": "codereview.stackexchange",
"id": 6364,
"lm_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, excel",
"url": null
} |
graphs, colorings
Title: Reducing a graph without changing its chromatic number Does reducing a graph (removing or replacing vertices or edges) without changing its chromatic number has a specific name?
Take this cactus graph as an example (although my question is about an arbitrary graph): | {
"domain": "cs.stackexchange",
"id": 13033,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs, colorings",
"url": null
} |
c#, .net, image, file
}
}
public void InitTimer()
{
timer1 = new Timer();
timer1.Tick += new EventHandler(timer1_Tick); //calls method
timer1.Interval = 2000; // in miliseconds (1 second = 1000 millisecond)
timer1.Start(); //starts timer
}
private void timer1_Tick(object sender, EventArgs e)
{
File_Length(); //checking the file length every 2000 miliseconds
} Let's start here:
string[] filename = Directory.GetFiles(path, "*.tif");
If you know there can be only one file then you can try to get it right away with SingleOrDefault
var imageFileName = Directory.GetFiles(path, "*.tif").SingleOrDefault();
the condition will then become
var fileExists = !string.IsNullOrEmpty(imageFileName);
if (!fileExists)
{
return;
}
Further you don't need all this code | {
"domain": "codereview.stackexchange",
"id": 16606,
"lm_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#, .net, image, file",
"url": null
} |
python, python-2.x, primes, comparative-review, fibonacci-sequence
This would be run as:
_list = list(get_falsifiers(start, end))
Note that _list is a poor naming choice since it refers to the type and not the value. Something like falsifiers would be better.
These:
def fibonacci_conjecture(end):
return (True not in map(is_prime, [fibo(i)*fibo(i)+41 for i in range(end+1)]))
def second_way(end):
return (True not in map(is_prime, [i**2+41 for i in range(end+1) if is_fibo(i)]))
def third_way(end):
return (True not in map(is_prime, [fibo(i)*fibo(i)+41 for i in range(end+1) if minus_four(i)]))
would be better as
def fibonacci_conjecture(end):
return not any(map(is_prime, [fibo(i)*fibo(i)+41 for i in range(end+1)]))
def second_way(end):
return not any(map(is_prime, [i**2+41 for i in range(end+1) if is_fibo(i)]))
def third_way(end):
return not any(map(is_prime, [fibo(i)*fibo(i)+41 for i in range(end+1) if minus_four(i)])) | {
"domain": "codereview.stackexchange",
"id": 13154,
"lm_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-2.x, primes, comparative-review, fibonacci-sequence",
"url": null
} |
components strongly connected components example problems by one, that strongly connected Decomposing. That in my example, consider the problem of identifying clusters in a set of items other vertex Google Bing., a strongly connected subgraph a classic application of depth-first search ( DFS ) very powerful efficient! To Cout the number of test cases algorithm also called Tarjan ’ s trace the strongly connected components example problems of the graph other! Will have the highest finish times are extracted from open source projects of friend! Links from the first line of the steps described above on the graph \ ( )! Of depth-first search ( DFS ) graph, Check if it is strongly connected components example problems connected components in an graph... But relies on the transposed graph first the strongly connected components of an arbitrary graph! Many graph application the input consists of 'T ' denoting the number of test follow... ; Status ; Ranking ; WEBISL - web islands a graph is a | {
"domain": "brandhome.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9736446448596305,
"lm_q1q2_score": 0.845928542955405,
"lm_q2_score": 0.8688267813328976,
"openwebmath_perplexity": 682.6030261600721,
"openwebmath_score": 0.4783529043197632,
"tags": null,
"url": "https://museum.brandhome.com/pros-and-kbh/e70454-strongly-connected-components-example-problems"
} |
Since the set of $v_1\times v_2, v_1, \tilde{v}_2$ is pairwise orthogonal, we have $$\langle v_3, v_3\rangle = \frac{\langle v_3, v_1\times v_2\rangle^2}{\langle v_1\times v_2, v_1\times v_2\rangle} + \frac{\langle v_3, v_1\rangle^2}{\langle v_1, v_1\rangle} + \frac{\langle v_3, \tilde{v}_2\rangle^2}{\langle \tilde{v}_2, \tilde{v}_2\rangle}.$$ Now it's just a matter of bumping terms around to isolate $\langle v_3, v_1\times v_2\rangle^2$. Note specifically that $$\langle v_1\times v_2, v_1\times v_2\rangle = \langle v_1, v_1\rangle \langle v_2, v_2\rangle - \langle v_1, v_2\rangle^2$$ and $$\langle \tilde{v}_2, \tilde{v}_2\rangle = \frac{\langle v_1, v_1\rangle \langle v_2, v_2\rangle - \langle v_1, v_2\rangle^2}{\langle v_1, v_1\rangle}.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071506607352,
"lm_q1q2_score": 0.8233908457658506,
"lm_q2_score": 0.8289388083214156,
"openwebmath_perplexity": 1029.1432281292584,
"openwebmath_score": 0.7454670071601868,
"tags": null,
"url": "https://math.stackexchange.com/questions/1954789/express-scalar-triple-product-atb-times-c-in-inner-products"
} |
In similar way, I found the probabilities for cases when the first ball is the blue one or black one.
I found that the result is 0.4074. Can someone just check if this is correct? Thanks in advance.
• The number of draws isn't specify in your question. Do you draw a ball exactly four times? In that case you could use binomial distribution. – Alain Remillard Feb 15 '20 at 15:55
• It is going to be much easier on you if you treat blue and red balls as the same category, "not black". This will reduce the case work considerably. – JMoravitz Feb 15 '20 at 15:58
How many draws do you make? From your example I guess 4 but it is not specified in the question.
This could be interpreted as an binomial distribution $$X \sim Bin(n=4, p = 1/3)$$ so what you should calculate is $$P(X \geq 2) = 1- P(X \leq 1) = 1- (P(X = 1) + P(X = 0)) \approx 0.4075$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98901305931244,
"lm_q1q2_score": 0.8386511869115653,
"lm_q2_score": 0.8479677583778257,
"openwebmath_perplexity": 472.7121326860843,
"openwebmath_score": 0.8620211482048035,
"tags": null,
"url": "https://math.stackexchange.com/questions/3547645/probability-of-drawing-two-or-more-black-balls"
} |
c++, c++14
template <typename InputIt, typename Distance>
inline void safe_advance(InputIt& curr, InputIt first, InputIt last,
Distance offset) {
details::safe_advance_helper(
curr, first, last, offset,
typename std::iterator_traits<InputIt>::iterator_category());
}
template <typename InputIt, typename Distance>
inline auto safe_next(InputIt curr, InputIt first, InputIt last,
Distance offset) {
safe_advance(curr, first, last, offset);
return curr;
}
template <typename InputIt, typename Distance>
inline auto safe_prev(InputIt curr, InputIt first, InputIt last,
Distance offset) {
safe_advance(curr, first, last, -offset);
return curr;
}
} // namespace my
#endif
Review | {
"domain": "codereview.stackexchange",
"id": 17003,
"lm_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++14",
"url": null
} |
et al. Despite this, the kinematics and mechanics of quadrupedal turns are not well understood. For example, the area on the left can be made from a rectangle minus a triangle and circle. See how the eigenvectors of the inertia tensor change as you change a configuration of point masses or the shape of a solid plate of material Wolfram Demonstrations Project 12,000+ Open Interactive Demonstrations. I The moment of inertia of an object. (The answer only makes sense if the axis is coplanar to the quarter-circle and bisects it through the origin). List of moments of inertia (5158 views - Calculations (Mech&Elec)) In physics and applied mathematics, the mass moment of inertia, usually denoted by I, measures the extent to which an object resists rotational acceleration about a particular axis, and is the rotational analogue to mass. The following is a list of second moments of area of some shapes. Polar moment of inertia (denoted here as I p) can also be found by summing the x and y planar | {
"domain": "ricominciodalmesdi.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127413158322,
"lm_q1q2_score": 0.8257190309516621,
"lm_q2_score": 0.8354835432479661,
"openwebmath_perplexity": 410.50764068409853,
"openwebmath_score": 0.6430168151855469,
"tags": null,
"url": "http://lwwx.ricominciodalmesdi.it/moment-of-inertia-of-triangle-about-apex.html"
} |
gazebo
I changed the zbar_ros nodes a little bit to show an OpenCV window to make sure the translation to OpenCV images was going well. This was the case, so the problem was still unknown.
While on the verge of a mental breakdown, desperately staring at my screen, I noticed a difference between the QR code in simulation and the physical code on my desk: it was mirrored! Apparently, the QR code reader on my phone allows for mirrored QR codes, and was able to recognize it in the simulation, while zbar_ros does not support mirrored QR codes.
So, in short: mirroring my textures solved everything. | {
"domain": "robotics.stackexchange",
"id": 26869,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
2) Start with x+ y+ z= 1 and write, say, z= 1- x- y. Replace z in $(x- 2)^2+ (y+ 2)^2+ (z- 1)^2= 1600$ with that to get $(x- 2)^2+ (y+2)^2+ (x+y)^2=16$. Again solve the that equation for x as a function of y or y as a function of x to get a single parameter.
4. Aug 20, 2013
### jackmell
You really should learn how to plot these things to get an intuitive feel for them. Since the radius of the sphere is greater than the distance from the x-y plane, it will intersect the x-y plane in a circle. Contrast a small sphere far away from the x-y plane which does not. Anyway, since the intersection is a circle, then we can parameterize that circle in terms of sines and cosines like you did but not exactly. So we have $x+y+z=1$ and $(x-2)^2+(y+2)^2+(z-1)^2=1600$. So what happens when we let z=0? Well, we have the equation:
$$(x-2)^2+(y+2)^2=1599$$
and we know $z=1-(x+y)$
Ok then, bingo-bango. Please provide a nice-looking plot of all this. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426428022031,
"lm_q1q2_score": 0.8179366931222477,
"lm_q2_score": 0.8397339676722393,
"openwebmath_perplexity": 344.55964096352045,
"openwebmath_score": 0.8414036631584167,
"tags": null,
"url": "https://www.physicsforums.com/threads/parametrize-plane-sphere-intersection.706372/"
} |
neuroscience, neurophysiology, neuroanatomy, histology
Fig. 1. Anatomy of a nerve bundle. source: EasyNoteCards
Macroscopic view of a nerve targeted for epineurial repair. source: wikipedia | {
"domain": "biology.stackexchange",
"id": 8177,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neuroscience, neurophysiology, neuroanatomy, histology",
"url": null
} |
Re: Five-minute challengeMessage #42 Posted by Gerson W. Barbosa on 22 Jan 2011, 10:32 a.m.,in response to message #32 by Thomas Klemm Quote: Quote: Can you come up with a rough approximation that can be computed on a 4-banger? Actually, your solution meets David Hayden's second question ("Can you find the exact (within 2 decimal places) answer?") while being able to do it on a 4-banger. Well done! Quote: Quote: I was also surprised at how far off the "assume a right triangle" approximation is. This shows you can do better even without a fancy solver. By resorting to Pythagoras instead to the Taylor's series for cosine, the approximation is improved: e = r - sqrt(r2 - ((L-1)/2)2) e = L*sqrt(L/24) - sqrt(L3/24 - (L-1)2/4) e = 44.4971906 That's very close to Crawl's approximation but, unlike his or yours, far from concise. Adding another term to the first series would require solving a quartic equation in order to find the radius. Fortunately, it is reducible to a quadratic equation and | {
"domain": "hpmuseum.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812336438724,
"lm_q1q2_score": 0.8172121804777902,
"lm_q2_score": 0.8438951025545426,
"openwebmath_perplexity": 2360.261065647501,
"openwebmath_score": 0.824374258518219,
"tags": null,
"url": "http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv020.cgi?read=177273"
} |
thermodynamics, carnot-cycle
Both the circles are my reversible heat engine. On the left, it is running "forwards" and yielding work $W$ from the nett flow $Q_C$ into the cold reservoir at temperature $T_C$ after extracting heat $Q_H$ from the hot reservoir at temperature $T_C$. On the right it has work $W$ done on it for a nett flow nett flow $Q_C$ out from the cold reservoir, and the total $Q_H=Q+Q_C$ is pumped into the hot reservoir. By definition of the thermodynamic temperature in terms of heat flow ratios in reversible heat engines, as I discuss in my answer here, then
$$\frac{Q_H}{T_H}=\frac{Q_C}{T_C}\tag{1}$$
and, by energy balance
$$Q_H = W+Q_C\tag{2}$$
The engine is reversible, so that all the magnitudes of the energy quantities are the same; their signs are opposite: instead of the heat engine doing work $W=Q_H-Q_C$, we must do work on the heat engine to pump $Q_C$ from the cold reservoir and thereafter dump the total energy $Q_H=W+Q_C$ back into the hot reservoir. | {
"domain": "physics.stackexchange",
"id": 16520,
"lm_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, carnot-cycle",
"url": null
} |
galaxy, galactic-dynamics, gravitational-lensing
"What we found was quite puzzling; despite forming stars at a high rate, and therefore being the site of highly energetic processes, SPT0418-47 is the most well-ordered galaxy disc ever observed in the early Universe," stated co-author Simona Vegetti, also from the Max Planck Institute for Astrophysics. "This result is quite unexpected and has important implications for how we think galaxies evolve." The astronomers note, however, that even though SPT0418-47 has a disc and other features similar to those of spiral galaxies we see today, they expect it to evolve into a galaxy very different from the Milky Way, and join the class of elliptical galaxies, another type of galaxies that, alongside the spirals, inhabit the Universe today. | {
"domain": "astronomy.stackexchange",
"id": 4717,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "galaxy, galactic-dynamics, gravitational-lensing",
"url": null
} |
c#, cryptography
protected void calcTransform()
{
uint AA = A, BB = B, CC = C, DD = D;
uint F = 0;
int g = 0; | {
"domain": "codereview.stackexchange",
"id": 16025,
"lm_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",
"url": null
} |
chatgpt, image-generation, text-generation
I have never gotten a result that mentioned elephants. If the comment concerning elephants is left out however, most poems will talk about animals in the zoo and then also mention them.
Given the observed challenges in the exclusion of elements (like elephants) in pictures, but the relative ease of that for texts, what are the fundamental reasons for this? Is this due to some inherent differences in training or model architecture in both applications? The difference is due to qualities of text training data used in training the two types of model.
The LLM models are trained on large amounts of text, and learn grammar rules very well. There are lots of examples of negation in the training data. The trained models can process what negation means in phrases, and what that may mean for the following phrases, i.e. what they are likely to generate when a term such as "no elephants" is in the previous context. | {
"domain": "ai.stackexchange",
"id": 4165,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "chatgpt, image-generation, text-generation",
"url": null
} |
java, performance, beginner, object-oriented
{
Binary x = this;
int dp = x.decimal * y.decimal;
int bp = fromDectoBin(dp);
Binary p = new Binary(bp);
return p;
}
public Binary by(Binary y)
{
Binary x = this;
int dq = x.decimal / y.decimal;
int bq = fromDectoBin(dq);
Binary q = new Binary(bq);
return q;
}
public Binary mod(Binary y)
{
Binary x = this;
int dq = x.decimal % y.decimal;
int bq = fromDectoBin(dq);
Binary q = new Binary(bq);
return q;
}
public Binary or(Binary y)
{
Binary x = this;
int xb = x.binary;
int yb = y.binary;
String xsb = (readyBitwise(xb, yb))[0];
String ysb = (readyBitwise(xb, yb))[1];
int[] xba = toBitArray(xsb);
int[] yba = toBitArray(ysb);
int s = xba.length;
int[] fa = new int[s];
int xd, yd;
for
(int i = 0; i < s; i++)
{ | {
"domain": "codereview.stackexchange",
"id": 36834,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, beginner, object-oriented",
"url": null
} |
c++, performance, image
src = src / 1023.0;
cv::imshow(title + " in rgb", src);
cv::waitKey(0);
}
void Preprocessor::ShowImage(std::vector<float> channel, uint16_t width, uint16_t height, std::string title)
{
cv::Mat image(height, width, CV_32F);
for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
image.at<float>(i, j) = channel[i*width + j] / 1023.0;
}
}
cv::imshow(title, image);
cv::waitKey(0);
}
static uint16_t Clip(uint16_t data, uint16_t min, uint16_t max)
{
return std::min(std::max(data, min), max);
} Preprocessor.h
using namespace std; | {
"domain": "codereview.stackexchange",
"id": 21795,
"lm_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, image",
"url": null
} |
thermodynamics
How do I get from here to actually calculating the heat capacity, that is the partial derivative?
P.S. I apologize if I'm mixing or misunderstanding notions here, but the way I was taught thermodynamics was horrible, just learning how to solve particular problem types without understanding the physics of it at all, and I hadn't yet had time to look for some source to correct all these misconceptions. Would be greatful if someone could recommend a mathematically rigorous text on thermodynamics that doesn't make unexplained simplifications and helps intuitively grasp the physics of it. Let's start by computing heat capacities in a context that is a bit more general than polytropic processes; those defined by the constancy of some state variable $X$.
For concreteness, let's assume we are considering a thermodynamic system, like an ideal gas, whose state can be characterized by its temperature, pressure, and volume $(T,P,V)$ and for which the first law of thermodynamics reads
\begin{align} | {
"domain": "physics.stackexchange",
"id": 8268,
"lm_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",
"url": null
} |
algorithm-analysis, runtime-analysis, search-algorithms
If the distance between the two is large, you can subdivide:
|> <||> <|
And so on until the element is found. This could be parallelized, since each searcher has a computable range of indices it searches over. You would have to synchronize in some way to prevent the "other" branches from continuing to search once you found the element, which is probably difficult to pull off in practice.
I believe this could find the element in $O(\log(n))$ time, using $O(\log{n} \cdot 2^{\log{n}}) \approx O(n \log{n})$ memory (which is a lot, but it's unsorted).
What's the name of this algorithm? It's a parallel linear search, with an over-complicated way to divide up the array into a power-of-2 number of chunks. (Since you only split in half with multiple levels of recursion, instead of the usual chunk_size = n/cores_available which can keep all cores busy even if their number isn't a power of 2.) | {
"domain": "cs.stackexchange",
"id": 21667,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm-analysis, runtime-analysis, search-algorithms",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.