text stringlengths 1 1.11k | source dict |
|---|---|
electrostatics, electric-fields, conductors
So, Getting to your question, the excess charges creates an electric field inside the conductor.Now,the mobile electrons rearranges as you have said to create another electric field which will totally cancel out the existing electric field inside the conductor. Its the "net electric field" that will be zero inside a conductor. | {
"domain": "physics.stackexchange",
"id": 82644,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electric-fields, conductors",
"url": null
} |
wind, sea-level, rainfall, barometric-pressure, air-currents
Other options:
You could also use a barometer to diagnose falling/rising pressure trends. Those indicate that a low/high is moving towards you. However, this doesn't tell you what direction the low or high is located [though you can often make an educated guess based upon predominant wind flow; most pressure systems come from the west in the mid-latitudes, which include much of the US/Europe/Asia].
As gansub noted in the comments, you could watch how atmospheric conditions evolve, such as the cloud patterns/types. https://www.youtube.com/watch?v=tsD6zkBMmck is a reasonable description of what goes on around fronts, which could help alert you to incoming storms (both warm and cold fronts are dips of low pressure, and indicate a large low pressure system is coming). The continuing lack of cloudcover might be an indication of high pressure in the vicinity. | {
"domain": "earthscience.stackexchange",
"id": 974,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wind, sea-level, rainfall, barometric-pressure, air-currents",
"url": null
} |
use Pastebin, you agree to our use of cookies as described in the Cookies Policy. of any symmetric matrix is symmetric and positive semi-definite, hence it is a candidate for a kernel. As far as I can tell, by using the Gaussian kernel I should be guaranteed a positive definite Gram matrix, but when I pass my Gram matrix (here, labeled "H") into quadprog it is telling me that it is not positive definite. gov November 3, 2005 Abstract Kernel methods use kernel functions to provide nonlinear versions of different methods in machine learning and data mining, such as Principal Component Analysis and Support. Please refer to the full user guide for further details, as the class and function raw specifications may not be enough to give full guidelines on their uses. A fractional power polynomial, however, does not necessarily define a kernel function, as it might not define a positive semidefinite Gram matrix. force_even – overrides requirement for odd kernel size. If the Gram matrix is | {
"domain": "gipad.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9843363512883317,
"lm_q1q2_score": 0.8181243089519122,
"lm_q2_score": 0.8311430415844384,
"openwebmath_perplexity": 1156.4016423735295,
"openwebmath_score": 0.7524211406707764,
"tags": null,
"url": "http://gipad.it/ssmz/gram-matrix-gaussian-kernel.html"
} |
beginner, game, bash, console, tic-tac-toe
O|-|-
X|-|-
O|-|X
Please enter a valid move (0-8)
2
O|-|O
X|-|-
O|-|X
Please enter a valid move (0-8)
4
O|-|O
X|X|-
O|-|X
Please enter a valid move (0-8)
1
O has won!
O|O|O
X|X|-
O|-|X
I do not know much about bash, so any feedback would be much appreciated. The intent here is that an engineer who is not a Bash expert
should be able to readily maintain the code some months down the road.
I do not know much about bash
You might be that future maintenance engineer.
Be kind to your future self.
And thank you for that nice shebang.
true
get_placement() {
while : | {
"domain": "codereview.stackexchange",
"id": 45551,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, game, bash, console, tic-tac-toe",
"url": null
} |
c, stack
Title: Unix tail command using stack I'm working on a version of the Unix tail command that works by iterating over a file, pushing line by line into a stack. Finally, the number of desired lines will be popped and printed to the screen. I have used void * (void pointers) as the data field of my stack nodes (the stack is basically a linked list with limitations) and due to that I had to do a bit of work with pointer casting and successive allocations with malloc() (one chunk per line). I wonder if there isn't a better (as in simpler, more readable and less memory intensive) way of accomplishing the same goal.
Main tail.c file
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../utils/type_definitions.h"
#include "../stack/stack_list/stack_list.h"
#define LINE_SIZE 256
int main(int argc, char *argv[])
{
int number_of_lines;
if (argc == 2) {
number_of_lines = atoi(argv[1]);
} else {
printf("%s\n", "Error!");
exit(1);
} | {
"domain": "codereview.stackexchange",
"id": 35582,
"lm_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, stack",
"url": null
} |
molecular-orbital-theory
$\mathbf{S}$ is the overlap matrix, whose elements are given by $S_{ij} = \braket{\mathrm{p}_i|\mathrm{p}_j}$.
Hereafter, we will simplify the notation and use $|i\rangle$ in place of $|\mathrm{p}_i\rangle$ to denote the p-orbitals.
Now, simple Hückel theory makes some key assumptions about the forms of the MOs as well as some of the integrals involved in a typical quantum chemical calculation:
π-Type MOs are linear combinations of p-orbitals, and no other orbitals contribute (so-called "sigma-pi separation")
The value of $\braket{a|b}$ (where $\ket{a},\ket{b}$ are p-type AOs on atoms $a$ and $b$) is $1$ if $a = b$ and $0$ otherwise
The value of $\braket{a|H|b}$ is | {
"domain": "chemistry.stackexchange",
"id": 8430,
"lm_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-orbital-theory",
"url": null
} |
special-relativity, speed-of-light, time
Title: What happens when we slow down while travelling at speed of light? When we travel close to the speed of light, time would move slower than for someone who is not moving. Interesting thing is both observer's clocks were running slower than the other when they look at each other.
My question is what happens when we slow down while travelling at the speed of light? Do we see other observer suddenly dead? There are a few things that are not possible in relativity -
1) Any massive body can not move at speed of light.
2) Even if it did, it could not slow down slowly.
These are probably limiting cases in relativity and I would not mind also considering them safety net for relativity.
3) Even ignoring above, any two observers, both moving at speed of light in same direction wrt a third observer, are not moving at all wrt one another. So if one of them slow down a bit, will see the other left behind (or pass ahead) with that bit of speed. | {
"domain": "physics.stackexchange",
"id": 45786,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, speed-of-light, time",
"url": null
} |
file-system, vba
Looking at your linked question, I see @RubberDuck already recommended using better names for your constants; sorry to reiterate the same advice here.
Underscores
I know python loves snake_case, but in vba that kind of casing is potentially confusing (for class methods, more specifically) - I'd recommend sticking to language's PascalCase naming convention, and using a consistent camelCase for locals and parameters, for readability's sake (the actual VB/VBA conventions would go PascalCase all the way, but I find that maddening). I find pat_list would really benefit from simply being called patterns, or more accurately, patternParts - the _list suffix feels Hungarian, and seems to reflect the type, which could just as well be a regular Collection - I like that you're using your own List type though.
Parameters
The documentation I've found actually calls its sole parameter pathname: | {
"domain": "codereview.stackexchange",
"id": 9754,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "file-system, vba",
"url": null
} |
c++, template, c++17
You could also use an equality_comparable_with trait, to allow for more flexibility:
template <typename Container, typename T>
auto contains(Container const& source, T const& val) -> bool
{
if constexpr (is_equality_comparable_with_v<typename Container::value_type, T>)
// ...
Those two type traits will also help when testing for whether recursion is possible.
template <typename Container, typename T>
auto contains(Container const& source, T const& val) -> bool
{
if constexpr (is_equality_comparable_with_v<typename Container::value_type, T>)
// just use std::find
else if constexpr (is_container_v<typename Container::value_type>)
// recurse
else
// error | {
"domain": "codereview.stackexchange",
"id": 38460,
"lm_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, c++17",
"url": null
} |
java, socket, server, client
clients.remove(client);
clients.add(client);
is called from a new thread, but it affects the client List which is shared on all threads. But that instance is neither synchronized nor concurrent. There will be corruption to that list at some point.
Out-of-place logic
if (clients.size() > connectedSocketLimit) {
break;
} | {
"domain": "codereview.stackexchange",
"id": 6497,
"lm_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, socket, server, client",
"url": null
} |
quantum-field-theory, operators, path-integral
The setup.
Let $\{\phi_a,\pi^a\}_a$ be a set of phase-space operators, where $a\in\mathbb R^{d-1}\times \mathbb N^n$ is a DeWitt index (i.e., it contains a continuous part, corresponding to the spatial part of spacetime $\mathbb R^d$ and a discrete part, corresponding to a certain vector space $\mathbb N^n$ whose base is spacetime). Note that we are taking these operators to be in the Schrödinger picture. They are assumed conjugate:
$$\tag1
[\phi_a,\pi^b]=i\delta_a^b
$$
where $\delta$ is a Dirac-Kronecker delta. Here, $[\cdot,\cdot]$ denotes a commutator (we assume $\phi,\pi$ to be Grassmann even; we could consider the general case here by keeping tracks of the signs, but we won't for simplicity). The rest of commutators are assumed to vanish. We take the phase-space operators to be hermitian (or otherwise, we double the dimension and split them into their real and imaginary parts).
As $[\phi_a,\phi_b]=[\pi^a,\pi^b]=0$, we may simultaneously diagonalise them:
\begin{equation} | {
"domain": "physics.stackexchange",
"id": 46293,
"lm_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, operators, path-integral",
"url": null
} |
c#, algorithm, pathfinding
if (sameKey && node.Equals(default(T)))
return ReferenceEquals(this, obj);
return sameKey;
}
public override int GetHashCode()
{
if (node.Equals(default(T)))
return base.GetHashCode();
return GetType().GetHashCode() ^ node.GetHashCode();
}
}
public enum PathfindingAlgorithm
{
A_STAR,
}
Cave.cs
/// <summary>
/// The cave object generates a cave system and places objects inside it (player, arrows, gold, etc)
/// Includes methods to get locations of game objects in cave
/// </summary>
public class Cave
{
// Length of the apothem of each room as it should be drawn (virtual coords)
private readonly int RoomNumSides;
private readonly double RoomBaseApothem;
public int TargetRoomWidth { get; protected set; }
public int TargetRoomHeight { get; protected set; } | {
"domain": "codereview.stackexchange",
"id": 13226,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, algorithm, pathfinding",
"url": null
} |
programming-languages, type-theory, polymorphisms
Other binary operations cannot be implemented without concrete, privileged access to the representations of both abstract values. For example,
suppose we are implementing an abstraction representing sets of numbers. After scouring several algorithms textbooks, we choose a concrete representation of sets as labeled trees obeying some particular complex
invariant. An efficient implementation of the union operation on two sets
will need to view both of them concretely, as trees. However, we do not
want to expose this concrete representation anywhere in the public interface to our set abstraction. So we will need to arrange for union to have
privileged access to both of its arguments that is not available to ordinary client code—i.e., the union operation must live inside the abstraction
boundary. We call such operations strong binary operations.
and says strong binary operations can't be expressed as methods of existential objects: | {
"domain": "cs.stackexchange",
"id": 14591,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "programming-languages, type-theory, polymorphisms",
"url": null
} |
window-functions, reconstruction, window, mri
rec = np.abs(fftpack.ifftshift(fftpack.ifftn(sig)))
This results in the recon image as:
I feel I have done something wrong as I was expecting to have a fairly uniform image rather than a spike. Do I need to do something post reconstruction to account for the fact that I have performed some windowing before the reconstruction? You say:
I have a 128 point one dimensional k-space samples...
The hanning window is the same size as the k-space vector (256)...
Make sure that you have the appropriate sizes in your algorithm.
Next, I convolved the k-space signal with the hanning window... | {
"domain": "dsp.stackexchange",
"id": 3968,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "window-functions, reconstruction, window, mri",
"url": null
} |
php, form, symfony2
As for two different methods/actions, what is wrong with that? Controllers don't have to be limited to having just one. Is there some specific reason that you are trying to change it, or does it just seem wrong to you? The only way to separate this would be to create another controller and HTML form. But this is unnecessary. It is perfectly understandable to reuse a controller for similar functionality. It would be a waste to separate this into multiple controllers and forms, just to avoid having more than one action in a controller. | {
"domain": "codereview.stackexchange",
"id": 2283,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, form, symfony2",
"url": null
} |
bash, linux
Title: Baby-sitting bash script using DVD drive This is the script I wrote to make an automated POC baby-sitter in 5 lines.
I first found this on a GIF or meme site and thought of making a POC script that does the same.
#How Linux users babysit
while :
do
eject
eject -t
done
I don't know aything about bash. So, I want improvements.
You can find the origin and the script at
https://linuxandstuff.wordpress.com/2015/11/21/messing-with-the-dvd-drive-in-command-line/ These days a -T (toggle) argument exists. That allows us to make this a lot neater:
watch -n0 eject -T
You can alter the delay between rocks by changing the -n0 argument.
watch is used to run any designated command at regular intervals.
http://www.linfo.org/watch.html | {
"domain": "codereview.stackexchange",
"id": 20558,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bash, linux",
"url": null
} |
ruby, palindrome
"Prepending the last element to the reversed rest":
def reverse(ary)
return [] if ary.empty?
[ary.last] + reverse(ary[0...-1])
end
"The first and last letters are the same and the rest is a palindrome":
def palindrome?(word)
return true if word.empty?
word.first == word.last && palindrome?(word[1...-1])
end
My guess is that this, or something like this, is actually what the exam author was thinking about. However, by explicitly forbidding reverse, they focus the student's mind on "How can I overcome not having reverse" instead of "how could I interpret a palindrome differently". IOW: it's a bad exam question (if my guess is right).
Of course, there are even more ways to think about palindromes (and reversal), and there are some interesting optimizations given in other answers and comments. | {
"domain": "codereview.stackexchange",
"id": 19524,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby, palindrome",
"url": null
} |
human-biology, brain, electrophysiology
Brain regions deeper in the brain produce a 'blurred' signal that shows up on several electrodes at once.
that this happens to all activity recorded by EEG. Actually, EEG does not even pick subcortical activity too well.
Is there a more advanced method than electroencephalography for scaning brain activity in real time?
Yes, that is called magnetoencephalography (MEG). MEG records the magnetic fields related to the electric activity. It reaches sub-centimeter localization accuracy, while still having millisecond time resolution. However, this is now strictly only for the cortical activity; MEG does not see subcortical activity almost at all. Google for Elekta Neuromag or CTF to see some MEG systems.
If you would be interested in studying some deep structure, like amygdala, your best choice is then fMRI, which has about ~2 second time-resolution and 1mm^3 spatial resolution. | {
"domain": "biology.stackexchange",
"id": 2581,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, brain, electrophysiology",
"url": null
} |
So in this case, you are hoping to show $\displaystyle \lim_{n \to \infty}\left(\frac{1}{n} - \frac{1}{n + 1}\right) = 0$, in other words, that $\displaystyle n > N \implies \left|\frac{1}{n} - \frac{1}{n + 1} - 0\right| < \epsilon$. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211597623863,
"lm_q1q2_score": 0.8037029354548652,
"lm_q2_score": 0.8244619306896955,
"openwebmath_perplexity": 1486.615690937251,
"openwebmath_score": 0.9995743632316589,
"tags": null,
"url": "http://mathhelpforum.com/differential-geometry/183733-sketch-limit-proof-legal.html"
} |
Weiwen Miao tests dialog box will be shown, such as normal,! Includes an implementation of the residuals have constant variance, data manipulation in R ( library ( lmtest )... In statistics, Jarque-Bera test ( seeJarque, C. and Bera ( 1987 ) test jarque.bera.test... J b ∼ χ 2 ( 2 ) \ ) is quite high that! Visualization in R, data manipulation in R through the package tseries function available! Arguments x a numeric vector of data values say that the J-B is... Having v 1, …, v N observations and the rjb.test the. If so, a p-value less jarqueberatest in r 0.05 would mean that the homoscedasticity assumption would have to be:... Dataset into one column: Step 2: Calculate the Jarque-Bera test of normality two degrees freedom. Matches a normal distribution hypothesis that whether the skewness ( deviation from symmetry ) should be.... In pretty well every econometrics package T\ ) is the sample kurtosis and skew composite... Standard feature in pretty well every econometrics package assess | {
"domain": "jimchristy.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995742876885,
"lm_q1q2_score": 0.8339495851220217,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 4628.22776329525,
"openwebmath_score": 0.5811334848403931,
"tags": null,
"url": "http://www.jimchristy.com/the-matchmaker-lwqknrg/jarqueberatest-in-r-48ffc2"
} |
# Combinations precalc problem help
1. Apr 30, 2007
### danago
A subgroup must be formed, with 4 people being chosen from 3 larger groups.
• Group A contains 6 people
[*]Group B contains 4 people
[*]Group C contains 3 people
The subgroup of 4 must contain atleast 1 person from each group (A,B,C). How many possible groups are there?
Well there are 6 possible choices for the first place, 4 for the next and 3 for the third place. The fourth place can be taken by any of the remaining 10people. The calculation i came up with was:
$${}^6C_1 {}^4C_1 {}^3C_1 {}^{10}C_1=720$$
However, that is wrong. What have i done wrong?
2. Apr 30, 2007
### MathematicalPhysicist | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676454700793,
"lm_q1q2_score": 0.8009512577345251,
"lm_q2_score": 0.817574471748733,
"openwebmath_perplexity": 748.8965484195942,
"openwebmath_score": 0.6214969158172607,
"tags": null,
"url": "https://www.physicsforums.com/threads/combinations-precalc-problem-help.168224/"
} |
ros
<== Failed to process package 'flann':
Command '/home/riemer/ros_catkin_ws/install_isolated/env.sh make -j4 -l4' returned non-zero exit status 2
Reproduce this error by running:
==> /home/riemer/ros_catkin_ws/install_isolated/env.sh make -j4 -l4 | {
"domain": "robotics.stackexchange",
"id": 12807,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
cell-membrane
In the center of the cell you observe, you see the membrane straight-on, and light is only affected by 1-2 layers of membrane. On the edge, you are viewing through the membrane somewhat "sideways" , so there is effectively more "thickness" of membrane. Maybe not an exact replica of the situation, but one that might be easier to visualize, is earth's atmosphere viewed from space. You can see the "blueness" of the atmosphere at the edges, but when you look straight down at the ground you see clouds, oceans, landmasses not tinted as blue. | {
"domain": "biology.stackexchange",
"id": 6236,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cell-membrane",
"url": null
} |
structural-engineering
Some other cases which displacements of the supports would be considered:
In tall buildings the effect of axial displacement of the columns is considered (it is not significant in low rise buildings)
When temperature fluctuations are considered, the fact that an element may not actually be free to move is considered, as this will result in (sometimes very significant) stresses. This is a common source of cracking in concrete.
When second-order effects are considered, the so called $P-\delta$ effect, where the structure is in a displaced configuration (due to wind, earthquake, etc), and the loads are then applied. | {
"domain": "engineering.stackexchange",
"id": 929,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "structural-engineering",
"url": null
} |
quantum-mechanics, quantum-field-theory, atomic-physics, quantum-electrodynamics, laser
Title: Why is the spontaneous decay rate $A_{21} \propto \omega_0^3$? I have seen the Einstein thermal equilibrium derivation that $\frac{A_{21}}{B_{21}}= \frac{\hbar \omega_0^3}{\pi^2 c^3}$, but intuitively I would expect the spontaneous decay rate $A_{21} = \frac{1}{\tau} \sim \Delta E \sim \Delta \omega$ as $\Delta E \Delta t \gt \frac{\hbar}{2}$. | {
"domain": "physics.stackexchange",
"id": 78139,
"lm_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, quantum-field-theory, atomic-physics, quantum-electrodynamics, laser",
"url": null
} |
so from Mertens’ third theorem (Theorem 42 from Notes 1) one has
$\displaystyle \prod_{p < z} (1-\frac{\omega(p)}{p}) = (2\Pi_2+o(1)) \frac{1}{(e^\gamma \log z)^2} \ \ \ \ \ (8)$
as ${z \rightarrow \infty}$. Bounding ${4^{\pi(z)}}$ crudely by ${\exp(o(z))}$, we conclude in particular that
$\displaystyle \pi_2(x,z) = (2\Pi_2 +o(1)) \frac{x}{(e^\gamma \log z)^2}$
when ${x,z \rightarrow \infty}$ with ${z = O(\log x)}$. This is somewhat encouraging for the purposes of getting a sufficiently good answer to Problem 2 to resolve the twin prime conjecture, but note that ${z}$ is currently far too small: one needs to get ${z}$ as large as ${\sqrt{x}}$ before one is counting twin primes, and currently ${z}$ can only get as large as ${\log x}$. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874104123901,
"lm_q1q2_score": 0.8075590360644194,
"lm_q2_score": 0.8152324848629214,
"openwebmath_perplexity": 4622.61496713103,
"openwebmath_score": 1.0000090599060059,
"tags": null,
"url": "https://terrytao.wordpress.com/category/mathematics/mathnt/page/2/"
} |
java, algorithm, strings, balanced-delimiters
public boolean checkForBalance(String extractedString){
int balancedIndicator = 0;
char[] charArr = extractedString.toCharArray();
for(char c:charArr){
if(delimitMap.containsKey(c)){
delimitMap.put(c,delimitMap.get(c)+1);
}
}
for(Map.Entry<Character,Integer> entry:delimitMap.entrySet()){
System.out.println("Entry Key:"+entry.getKey()+"Entry value:"+entry.getValue());
System.out.println("Complementary delimiter:"+charMap.get(entry.getKey()));
if(delimitMap.get(charMap.get(entry.getKey())) != entry.getValue())
return false;
}
return true;
}
} | {
"domain": "codereview.stackexchange",
"id": 1615,
"lm_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, algorithm, strings, balanced-delimiters",
"url": null
} |
c#, shuffle
public class RandomSelector<T>
{
private IndexShuffler shuffler;
private IList<T> values;
/// <summary>
/// Create an instance with the specified list of source values.
/// </summary>
/// <param name="values">The source list of values to select from.</param>
public RandomSelector(IList<T> values)
{
#if DEBUG
if (values == null)
{
throw new ArgumentNullException("values == null");
}
#endif
shuffler = new IndexShuffler(values.Count);
this.values = values;
} | {
"domain": "codereview.stackexchange",
"id": 32809,
"lm_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#, shuffle",
"url": null
} |
physical-chemistry, thermodynamics, energy
Title: Is the change of the Gibbs free energy always zero at constant pressure? At constant pressure, which is the usual condition for chemical reactions, heat absorbed/released by the system is the same thing as enthalpy change. According to the Gibbs equation,
$$\mathrm dG = \mathrm dH - T\,\mathrm dS = \mathrm dH - đq$$But, $\mathrm dH=\mathrm đq$ at constant a pressure. So is the Gibbs energy change $\mathrm{d}G$ simply zero for any reaction? You wrote:
$$\mathrm{d}G = \mathrm{d}H - T\,\mathrm{d}S = \mathrm{d}H - đq$$
There are several issues with this. I don't wish to co-opt other answers and comments, but allow me to mention these here, since my answer stands as the accepted (which I have no power to change):
You haven't assumed constant temperature, which means that there is an additional term $-S\,\mathrm{d}T$ which you did not take into account;
You haven't assumed constant composition, which likewise leads to another term $\sum_i \mu_i\,\mathrm{d}n_i$. | {
"domain": "chemistry.stackexchange",
"id": 15038,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, thermodynamics, energy",
"url": null
} |
general-relativity, gravity, equivalence-principle, reference-frames, tidal-effect
When you're free falling you are moving along a geodesic. It is true to say that there are no forces acting, but this is always the case when you are moving along a geodesic. Remember a geodesic is a straight line and objects move in a straight line when no forces are acting. There would only be a force if you deviated from the geodesic e.g. by firing a rocket motor.
Response to fiftyeight's comment: this got a bit long to put in a comment so I thought I'd append it to my original answer.
I'm guessing your thinking that if you accelerate a spaceship it changes speed, so when you stop something has happened, but when the Earth accelerates you nothing seems to happen. The Earth can apply a force to your for as long as you want, and you never seem to go anywhere or change speed. Is that a fair interpretation of your comment? | {
"domain": "physics.stackexchange",
"id": 3398,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, gravity, equivalence-principle, reference-frames, tidal-effect",
"url": null
} |
electromagnetism, induction
Title: When mutual inductance are occurring between two coils, why the two coils have the same mutual inductance? I learned that
$$\epsilon_1 = -M_{12}\frac{di_2}{dt}$$
$$\epsilon_2 = -M_{21}\frac{di_1}{dt}$$
And the book tells us directly that $M_{12} = M_{21}$ without a reason. Is there a mathematical proof for this? An elegant and elementary derivation is given by Crawford:"Mutual inductance $M_{12}=M_{21}$", American Journal of Physics, vol 60 , February 1962, p186.
The idea is the following: the total stored energy rate, "power" is $$\frac{du}{dt} = L_1i_1\frac{di_1}{dt} + M_{12}i_1\frac{di_2}{dt} + L_2i_2\frac{di_2}{dt} + M_{21}i_2\frac{di_1}{dt}$$
This can be written as the differential
$${du} = L_1d(i_1^2/2) + M_{12}i_1di_2 + L_2d(i_2^2/2) + M_{21}i_2di_1$$
Now integrate from $i_1(t=0)=i_2(t=0)=0$ to $I_1,I_2$ and get $$U=\frac{1}{2}L_1I_1^2 +M_{12}I_1I_2+\frac{1}{2}L_2I_2^2+(M_{21}-M_{12})\int {i_2di_1}$$. | {
"domain": "physics.stackexchange",
"id": 84269,
"lm_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, induction",
"url": null
} |
mechanical-engineering, dynamics, kinematics
I : moment of inertia
H : angular momentum
$\alpha$: angular acceleration
$\omega$: angular velocity
$I_{G}\alpha = \dot{\vec{H}}$
$I_{G} \dot{\vec{\omega}}= \dot{\vec{H}}$
Could someone explain the meaning and/or give and example/context to clarify things? Perhaps it is helpful to compare the equation to its linear counterpart.
$$
\begin{align}
\vec{F}&=\dot{\vec{p}}=m\vec{a}=m\dot{\vec{v}}\\
\vec{\tau}&=\dot{\vec{H}}=I\vec{\alpha}=I\dot{\vec{\omega}}
\end{align}
$$
This linear formula says that the force on an object is equal the the rate of change of the linear momentum which is equal to the mass times the acceleration which is equal to the mass times the rate of change of the velocity.
In rotational dynamics, torque takes the place of force, the moment of inertia takes the place of mass, angular momentum takes the place of linear momentum, and angular velocity takes the place of linear velocity. | {
"domain": "engineering.stackexchange",
"id": 3466,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mechanical-engineering, dynamics, kinematics",
"url": null
} |
I am not entirely sure if my approach is correct here, and would wish that you can validate my answers.
EDIT:
Rectify the error pointed out in the comments
Your answer to the first question is correct. (ETA: Or was, before you edited $\frac{5}{8}$ to $\frac{15}{16}$. $<$g$>$)
Your answer to the second question is incorrect, because the $P(\text{red}, \text{Bag$C$}) = 10/30$, not $10/45$. (That is, out of the $30$ balls, each equally likely to be selected, exactly $10$ of them are both red and in Bag $C$.) You then obtain the correct answer of $10/13$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513889704252,
"lm_q1q2_score": 0.876450726652803,
"lm_q2_score": 0.888758801595206,
"openwebmath_perplexity": 654.2819329904494,
"openwebmath_score": 0.8894681930541992,
"tags": null,
"url": "https://math.stackexchange.com/questions/1752976/posterior-probability-of-bag-given-ball-evidence"
} |
quantum-information, quantum-entanglement, particle-physics, quantum-teleportation
What origin ?
The origin does not matter, as long as it is fixed. Suppose Alice and Bob have two different labs, and Alice wants to teleport the position and momentum of a particle from her lab to Bob's lab. That means that the initial position of particle A, relative to Alice's apparatus is the same as the final position of particle B relative to Bob's apparatus. In that sense, they can have the "same" position, even if they are in different rooms.
Of course, if one want to add details one should add that : | {
"domain": "physics.stackexchange",
"id": 4990,
"lm_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-information, quantum-entanglement, particle-physics, quantum-teleportation",
"url": null
} |
The intentions of this tutorial are: Be a guide to using MATLAB as a tool to study Calculus. That is, sec does not return values of Inf or -Inf at points of divergence that are multiples of pi, but a large magnitude number instead. Rakhshan and H. Learn how to find Exponents and Logarithms in MATLAB. Learn more about ln. e Ex : How many 2's do we multiply to get 16 ? 2*2*2*2=16 so we needed to multiply 4 of the 2's to get 16 so logarith. i hope this might help u in ur problem. Access Google Sites with a free Google account (for personal use) or G Suite account (for business use). But how do I type e in the command window. Mesela 5 üzeri 6 sayısının matlab de kodlanması = "5^6" şeklinde olur. The least-squares approximate solution of Ax= yis given by x ls = (ATA)−1ATy. MATLAB does not know an antiderivative of this function that can be defined in terms of functions known to MATLAB. Semicolon (;) indicates end of statement. Low Prices on Millions of Books. I know that, for example, to | {
"domain": "new-design-center.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9334308147331958,
"lm_q1q2_score": 0.8041863110937596,
"lm_q2_score": 0.8615382076534742,
"openwebmath_perplexity": 1246.51345888803,
"openwebmath_score": 0.6243621706962585,
"tags": null,
"url": "http://uaor.new-design-center.it/matlab-ln.html"
} |
quantum-mechanics, wavefunction, probability
Title: Is a real free-particle wavefunction necessarily time-invariant? I was recently introduced to the concept of probability as a conserved quantity in the context of QM, and the mathematics behind using the continuity equation on probability, specifically the free-particle equation:
$$
\nabla \cdot \mathbf{J} + \frac{\partial |\psi|^2} {\partial t} = 0
$$
Eventually, we came to the well-known result
$$
\mathbf{J}(\mathbf{r}, t) = -\frac{i\hbar}{2m}\left[\psi^*\nabla \psi - \psi \nabla \psi^*\right]
$$
I would read this as implying that a wavefunction with no imaginary component means $\psi \equiv \psi^*$ and hence $\mathbf{J} = 0 = -{\partial |\psi|^2}/{\partial t}$ and so $|\psi|^2 = \psi^2$ is a function only of position, in other words, a standing wave. | {
"domain": "physics.stackexchange",
"id": 38330,
"lm_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, wavefunction, probability",
"url": null
} |
electromagnetism, gravity, photons, magnetic-fields
Title: Does energy of photon change due to some external magnetic field? I came to know about the energy of photon changes (decreases) while going away from the emitter (even from earth) due to gravitational field effects.
Is there any change in energy/wavelength of a photon due to some external (artificial) magnetic field or electric field? Electromagnetic fields generate gravity, and therefore the answer is yes: the energy of a photon changes as it moves through a non-homogeneous electromagnetic field. | {
"domain": "physics.stackexchange",
"id": 36789,
"lm_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, gravity, photons, magnetic-fields",
"url": null
} |
Lesson, the motion of a mass on a spring is discussed in detail as we focus on how a variety of quantities change over the course of time. Energy variation in the spring–damping system. A spring is stretched 2 cm when a mass of 40 grams is hung from it. so called two spectra inverse problem in which one is given the spectra of an operator and a perturbation of it with the goal of recovering the operator from these two spectra. To convince yourself of this, run the applet (click on `start’ and let the system run for a while). 2: Shaft and disk. When a mass of 5 grams is hung vertically from a spring, at rest it stretches the spring 2. The system behaves like two identical single-degree-of-freedom mass-spring systems oscillating together in phase. Assume the spring has a constant k. Use energy conservation to find the distance the object travels up the incline. Solving Problems in Dynamics and Vibrations Using MATLAB Parasuram Harihara Spring Mass Damper System – Unforced Response m k c | {
"domain": "mexproject.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986777179803135,
"lm_q1q2_score": 0.8157803347695534,
"lm_q2_score": 0.8267117962054048,
"openwebmath_perplexity": 576.3393247798474,
"openwebmath_score": 0.5349347591400146,
"tags": null,
"url": "http://mexproject.it/jtjy/spring-mass-system-problems.html"
} |
clustering, pca
But, as I'm new to this, I am curious about the sequence of PCA and Clustering. I think there are 2 scenarios.
[1. Do clustering before PCA]
That means, I am using PCA just for visualization. But I have a question. In that case, If I process clustering with raw data, are all clustering algorithm (mentioned above) fit to my data type well.
[2. Do clustering after PCA]
In this case, I have other problems. My data's importance of components are like below.
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10
Standard deviation 1.4173 1.1836 1.1141 1.0108 0.99109 0.95231 0.89091 0.8456 0.71542 0.64610
Proportion of Variance 0.2009 0.1401 0.1241 0.1022 0.09823 0.09069 0.07937 0.0715 0.05118 0.04174
Cumulative Proportion 0.2009 0.3410 0.4651 0.5673 0.66551 0.75620 0.83558 0.9071 0.95826 1.00000 | {
"domain": "datascience.stackexchange",
"id": 5193,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clustering, pca",
"url": null
} |
from the origin (f(r)) if the fluid is incompressible, ie. Spherical Polar Coordinates: Axisymmetric Case In spherical polars (r,θ,φ), in the case when we know Φ to be axisymmetric (i. Generate ϕ as random number from [0, 2π]. When we know a point in Cartesian Coordinates (x,y) and we want it in Polar Coordinates (r,θ) we solve a right triangle with two known sides. Solution We cut V into two hollowed hemispheres like the one shown in Figure M. This requires us to express the rectangular Laplacian ∆u = u xx +u yy in terms of derivatives with respect to r and θ. Use Green's theorem to find the flux out of a closed curve in 2D via a 2D integral of the divergence. If the vector field Ais expressed in Cartesian coordinates,. Display with standard or polar axes. (ii) to present Airy stress functions in the 2D polar coordinate system as t he so lutions of the 2D elasticity problem. In cylindrical coords (rho-theta-z OR r-phi-z etc. 1 Specifying points in spherical-polar coordinate s. | {
"domain": "cesenaticoopen.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9873750507184356,
"lm_q1q2_score": 0.8026049069391735,
"lm_q2_score": 0.8128673155708975,
"openwebmath_perplexity": 661.5806275918751,
"openwebmath_score": 0.893095850944519,
"tags": null,
"url": "http://lmhp.cesenaticoopen.it/divergence-in-polar-coordinates-2d.html"
} |
optics, maxwell-equations, geometric-optics
Title: Mathematical definition of ray I have just begun studying geometrical optics, and there is something mysterious about it.
What I want to know is how to derive the definition of ray from Maxwell's equation.
In vacuum, electromagnetic wave equation as follows.
$ \triangledown E^2 - {1 \over c_0^2}{\partial^2 E \over \partial t^2} = 0$ (where E = electric field, t = time, $c_0$ = speed of light in vacuum)
and definition of ray as follows.
$ \triangledown E^2 + k^2E = 0$ (where $k$ is a wave number.)
I don't know how the equation above is transformed into the equation below.
If anyone knows how the equation below is derived from the equation above,
please give some tips. If you apply separation of variables to the wave equation via the assumption:
$$\vec E(\vec r,t)=\vec E(\vec r)e^{-i\omega t},\;\;\text{(monochromatic radiation)}$$
then substitution into the wave equation gives:
$$e^{-i\omega t}\{\nabla^2\vec E(\vec r)+\omega^2\epsilon\mu\vec E(\vec r)\}=0.$$ | {
"domain": "physics.stackexchange",
"id": 100001,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, maxwell-equations, geometric-optics",
"url": null
} |
c#, performance, sql-server, asp.net, informix
cmdText = "insert into KLjobinfo select * from @KLjobinfo";
sql_command.CommandText = cmdText;
sql_command.Parameters.Clear();
sql_param = sql_command.Parameters.AddWithValue("@KLjobinfo", KLjobinfo);
sql_param.SqlDbType = SqlDbType.Structured;
sql_param.TypeName = "dbo.hp2jobinfo";
result = sql_command.ExecuteNonQuery();
if (result >= 0)
{ | {
"domain": "codereview.stackexchange",
"id": 19721,
"lm_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, sql-server, asp.net, informix",
"url": null
} |
quantum-mechanics
A full $2p$ orbital therefore 'contains' 6 electrons, two in each sub-orbital ($p_x, p_y, p_z$), each electron with a unique $n, l, m_l, m_s$ combination. Pauli's Exclusion Principle is perfectly respected.
Further reading on electron configurations of atoms. | {
"domain": "physics.stackexchange",
"id": 32307,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics",
"url": null
} |
• In the very last line, it says "det(A) = 0", but before you had introduced A as the number $A = \det \dots$. Jan 17 at 15:51
• My fellow told me just like you wrote. Thanks. Jan 17 at 16:55
Clearly every row is part of the space of vectors $$(a_1,\ldots,a_6)$$ for which $$a_i$$ can be given by a polynomial expression in$$~i$$ of degree$${}<3$$ (i.e., with $$a_i=p+qi+ri^2$$ for some scalars $$p,q,r$$ and $$0). That subspace of $$\Bbb Q^6$$ being of dimension$$~3$$, any $$4$$ or more rows are linearly dependent, so the determinant of the matrix must be$$~0$$ (and the rank of the matrix at most$$~3$$).
Let us give your matrix a name:
$$A= \begin{pmatrix} 1&4&9&16&25&36\\4&9&16&25&36&49\\9&16&25&36&49&64\\16&25&36&49&64&81\\25&36&49&64&81&100\\36&49&64&81&100&121 \end{pmatrix}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9773707973303964,
"lm_q1q2_score": 0.8123349372489934,
"lm_q2_score": 0.8311430415844384,
"openwebmath_perplexity": 364.7386859285641,
"openwebmath_score": 0.9485569000244141,
"tags": null,
"url": "https://math.stackexchange.com/questions/4358982/is-there-a-more-efficient-way-to-calculate-the-determinant-of-this-matrix/4359097"
} |
human-biology, neuroscience, pharmacology
Title: Can neurotransmitter depletion cause short-term drug tolerance? I'm curious to know if neurotransmitter degradation factors into drug tolerance and neural conduction and, if so, to what extent. As I recall from textbooks I read as an undergrad, one mechanism of drug tolerance works by increasing the necessary thresh-hold at a synapse such that larger concentrations of neurotransmitter or more-frequent action potentials in the upstream axon were required to depolarize the membrane and propagate the signal. It seems to me that the same effect would occur if there were fewer available molecules of the required neurotransmitter.
Does over-stimulation of a neural pathway (through the use of a drug or other stimuli that up-regulates a given neurotransmitter) shorten the half-life of the neurotransmitters it uses?
Could a diet which is poor for necessary precursor nutrients cause a person's neurotransmitter concentrations to drop and reduce signaling along specific neural pathways? | {
"domain": "biology.stackexchange",
"id": 2525,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, neuroscience, pharmacology",
"url": null
} |
genetics, recombination
If a want to represent a recombination event in the punnett square (e.g. to produce a-b/A-b and a-b/Y does this mean I would need to add a-b as an additional trait to the punnett square like so?
a-B/A-b/a-b x A-b/Y
-------------------------
| x | A-b | Y |
-------------------------
| a-B | A-b/a-B | a-B/Y |
-------------------------
| A-b | A-b/A-b | A-b/Y |
-------------------------
| a-b | A-b/a-b | a-b/Y |
------------------------- | {
"domain": "biology.stackexchange",
"id": 11186,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "genetics, recombination",
"url": null
} |
= X (t) T. using Dirichlet boundary condition). The code below solves the 1D heat equation that represents a rod whose ends are kept at zero temparature with initial condition 10*np. We develop an L q theory not based on separation of variables and use techniques based on uniform spaces. Consider the nondimensionalized heat equation (2. We study similarity solutions of a nonlinear partial differential equation that is a generalization of the heat equation. 2 The Wave Equation 630 12. 0000 » view(20,-30) Heat Equation: Implicit Euler Method. The Heat Equation and Periodic Boundary Conditions Timothy Banham July 16, 2006 Abstract In this paper, we will explore the properties of the Heat Equation on discrete networks, in particular how a network reacts to changing boundary conditions that are periodic. a) Verify that solutions u(x,t) to the heat equation with the initial condition u(x,0) = f(x) piecewise continuous first derivatives may be given in the. ODE Version. This is the most | {
"domain": "ritornoallalira.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419694095656,
"lm_q1q2_score": 0.836503389555895,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 466.0453277681271,
"openwebmath_score": 0.8282039165496826,
"tags": null,
"url": "http://ritornoallalira.it/sfya/heat-equation-boundary-conditions.html"
} |
As discussed below, in each of these conjectures, one direction is true based on prior known theorems (see Theorem 1, Theorem 2 and Theorem 4 below). The conjectures can be stated as follows.
Morita’s Conjecture I. Let $X$ be a space. If the product $X \times Y$ is normal for every normal space $Y$ then $X$ is a discrete space.
Morita’s Conjecture II. Let $X$ be a space. If the product $X \times Y$ is normal for every normal P-space $Y$ then $X$ is a metrizable space.
Morita’s Conjecture III. Let $X$ be a space. If the product $X \times Y$ is normal for every normal countably paracompact space $Y$ then $X$ is a metrizable $\sigma$-locally compact space. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631631151012,
"lm_q1q2_score": 0.8460708576709252,
"lm_q2_score": 0.8577681013541611,
"openwebmath_perplexity": 136.46652973402306,
"openwebmath_score": 0.993003785610199,
"tags": null,
"url": "https://dantopology.wordpress.com/tag/topology/"
} |
ros, ros2, dds
Originally posted by alsora on ROS Answers with karma: 1322 on 2019-03-12
Post score: 1
It's used to calculate a UDP port, so it could be that it is wrapping around and reusing ports if the number is in the right range.
I'd recommend using only values between 0 and 232 or perhaps lower. If you think a number you're using should not work, but is, I'd recommend opening an issue against Fast-RTPS. The issue you linked was that it was not working in certain ranges, which was expected. What you have is that it is working outside of the range you think it should, which may still be a bug.
Originally posted by William with karma: 17335 on 2019-03-12
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by alsora on 2019-03-13:
Opened this issue
https://github.com/ros2/rmw_fastrtps/issues/261 | {
"domain": "robotics.stackexchange",
"id": 32637,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, dds",
"url": null
} |
algorithms, graphs, optimization
question can be generalized to solve this problem. When finding the
solution we may find that one or two heliostats switch which hub they
are connected to. Now repeat this for every pair of adjacent hubs.
However, my guess is that heliostat assignment might not yield many
gains (compared to the naive method of assigning each heliostat to
the hub it is closest to), so it might not be worth implementing these
more sophisticated methods for heliostat assignment.
Overall algorithm. In summary, we start from some initial
solution (e.g., selected using the method described in the question)
and then repeatedly rotate through the following three operations: | {
"domain": "cs.stackexchange",
"id": 7903,
"lm_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, graphs, optimization",
"url": null
} |
Then if $x\leq 1$ the integral becomes $$\int_{0}^{x^2}1 dr+\int_{x^2}^{y^2}\frac{x}{\sqrt{r}} dr+ \int_{y^2}^{(x+y)^2}\left(\frac{x+y}{\sqrt{r}}-1\right) dr=2xy$$ Similarly, if $y\leq x$ the integral becomes $$\int_{0}^{y^2}1 dr+\int_{y^2}^{x^2}\frac{y}{\sqrt{r}} dr+ \int_{x^2}^{(x+y)^2}\left(\frac{x+y}{\sqrt{r}}-1\right) dr=2xy$$ Hence the point $P$ is uniformly distributed on the surface of the triangle $ABC$. $\hspace{3cm}\ \Box$
Note that these points, when random, will be uniformly distributed in a nicely random way, but if you loop through r1 and r2 with an increment (say .01) your resulting points will have unusual artifacts and not look randomly distributed. One end of the triangle may have few points.
I determined this with code ( Note that similar code, using math.Random() looks fine). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717472321277,
"lm_q1q2_score": 0.8499692600929991,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 602.462285574537,
"openwebmath_score": 0.8583322167396545,
"tags": null,
"url": "https://math.stackexchange.com/questions/18686/uniform-random-point-in-triangle"
} |
python-3.x
Please share your code review comments. Performance
Since f-strings are faster than string concatenation, you can replace
score_string = score_string + ',' + str(score_array.pop(i))
with
score_string = score_string + f',{score_array.pop(i)}'
Since pop removes an element from a list given an index and returns it, you can simplify
score_string = score_string + ',' + str(score_array[i])
del score_array[i]
to
score_string = score_string + ',' + str(score_array.pop(i))
Best practices
Since range creates a iterable once in the iteration, you can replace
loopidx = 0
score_index_len = len(score_array)
while loopidx < score_index_len:
...
loopidx = loopidx + 1
with
for loopidx in range(len(score_array)):
...
Since randint is an alias for randrange(a, b+1), you can simplify
i = randint(0, len(score_array)-1)
to
i = randrange(len(score_array))
Just for readability, you could replace
score_string = score_string + f',{score_array.pop(i)}' | {
"domain": "codereview.stackexchange",
"id": 41918,
"lm_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-3.x",
"url": null
} |
python, beginner, game, role-playing-game
def sellItem():
try:
item = int(input("Write the number of the item you want to sell\n"))
item -= 1
if item in range(len(playerig.inventory)):
playerig.gold += playerig.inventory[item].price
print(f"You sold the item {playerig.inventory[item].name}")
playerig.inventory.pop(item)
input("Press enter to continue")
harald()
except:
input("Please chose a number from the inventory.")
inventory()
def dead():
playerig.hp = playerig.maxhp
playerig.mp = playerig.maxmp
print("You died")
print("...")
input("Press enter enter to continue")
game() | {
"domain": "codereview.stackexchange",
"id": 42192,
"lm_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, game, role-playing-game",
"url": null
} |
the HPR and the traditional YTM ( yield to maturity and price... Payments to the holder now consider what happens when the market price the of! And price of the current yield of a bond in the tool 's defaults dividing the rises! By 100 to calculate the yield and yield to maturity, par value periodic... You$ 91,575, which is lower than $92,227 prices share inverse! Bond.. Hey presto amount of the same risk & maturity realised yield of a bond formula relevance of the bond ’ yield! Advantage in the bond is$ 920 with a face value of the bond which are accounted for total... Depends on factors such as yield to maturity: yield to maturity YTM. Formula depends on factors such as yield to maturity ) statistic price, changes in price result in yields. Potential future cash flows represent the approximate return to a bond is an approximate method of calculating yield which issuer! C7, C8, C9, C10 moving in the tool 's defaults this page lists the formulas in... Example, multiply 0.0477 by 100 to | {
"domain": "wildhorsecomic.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561721629777,
"lm_q1q2_score": 0.8176129711605346,
"lm_q2_score": 0.8438950947024555,
"openwebmath_perplexity": 1218.287512441229,
"openwebmath_score": 0.5442896485328674,
"tags": null,
"url": "http://wildhorsecomic.com/yx01g12/realised-yield-of-a-bond-formula-b6acb1"
} |
|G| = |M_24| / 759 = 16 |GL_4(F_2)| = |AGL_4(F_2)|
and G must act faithfully on those 16 points (proof: if g is a
non-identity element of G that fixes all of them then g(x)=y for
some distinct x,y in B; choose some other z in B, and a block B'
meeting B only in {x,z} to conclude that g takes B' to B' which is
a contradiction). So G = AGL_4(F_2), and the block+point stabilizer is
GL_4(F_2), QED.
Corollary: GL_4(F_2) ≅ A_8 ! Cf. the outer isomorphism S_6 → S_6 we
found in M_12. (We'll also find an outer automorphism of M_12 in M_24.)
Note that PSL_3(F_4) also happens to have 20160 = 8!/2 elements, but
its turns out that PSL_3(F_4) is not isomorphic with A_8. For example,
A_8 has elements of order 15, but PSL_3(F_4) does not.
[March 32: Simiplicity of M_11 and M_23 using Robin J. Chapman's article
in the June-July 1995 issue of the American Mathematical Monthly]
April 4: Simplicity of M_12 and M_24;
start on simplicity of PSL_n(F_q) [n>2 or n=2 and q>3] | {
"domain": "harvard.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319853876677,
"lm_q1q2_score": 0.8277402594148112,
"lm_q2_score": 0.8354835330070839,
"openwebmath_perplexity": 2557.5821634393883,
"openwebmath_score": 0.8611697554588318,
"tags": null,
"url": "http://abel.math.harvard.edu/~elkies/M155.15/notes.html"
} |
quantum-mechanics, quantum-information, quantum-entanglement, bells-inequality, born-rule
While I do understand where this expression comes from (basically it's Born's rule), I don't understand how this product of operators actually works, and what $M$ is doing.
By this I mean the following: as I understand it, any given state of the whole system must belong to the tensor product of the Hilbert spaces $H_A \otimes H_B\otimes H_C$. I know how to apply the operator $\Pi_A\otimes\Pi_B\otimes\Pi_C$ on one of this states, but I don't know how to apply the tensor product of density matrices $\rho = \rho_{AB}\otimes\rho_{BC}\otimes\rho_{AC}$ on it. For instance, $\rho_{AB}$ operates on $H_A \otimes H_B$, no? Thus wouldn't $\rho$ operate on
$$
(H_A \otimes H_B) \otimes (H_B \otimes H_C) \otimes (H_A \otimes H_C)?
$$ Each party holds two quantum systems, which are parts of two bipartite systems. | {
"domain": "physics.stackexchange",
"id": 99681,
"lm_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, quantum-information, quantum-entanglement, bells-inequality, born-rule",
"url": null
} |
physical-chemistry, nmr-spectroscopy
If anyone could with any of the theory behind CW NMR and how the signals being receive can inform me on what occurring with in the sample it would, it would be appreciated. Thanks in advance.
What causes this magnetic moment?
So does the dipole cause the proton to spin which generates the magnetic moment and if so what causes the tiny dipoles along axis? It seem to me there a rotation being caused by a rotation. | {
"domain": "chemistry.stackexchange",
"id": 11443,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, nmr-spectroscopy",
"url": null
} |
bond, ionization-energy
The structure of $\ce{BeF2}$ can already be considered as the greatest possible compromise in keeping the cations and — more importantly — the anions apart from themselves; hence its spacious structure. These problems would be multiplied if an even smaller cation were used here: It would be extremely hard to generate a crystal lattice that would allow for sufficient separation of the anions from each other since the cation is so tiny (and we need lots of anions: three negative charges per boron!).
So all things considered, ionic boron salts would have a very unstable crystal structure and would hence be hard to generate, especially since the lattice enthalpy cannot counteract the large ionisation enthalpy required for boron adequately. Luckily, covalent compounds are always a possibility and boron’s atomic orbitals are well shaped and well placed in energy to allow covalent bonding. | {
"domain": "chemistry.stackexchange",
"id": 4551,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond, ionization-energy",
"url": null
} |
quiz, typescript, angular-2+
@Input() isActive: boolean = true;
@Output() answerReceived = new EventEmitter<void>();
@Input() card: Card;
triggerAction(answer: Answer): void {
answer.action();
this.answerReceived.emit();
}
} | {
"domain": "codereview.stackexchange",
"id": 28743,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quiz, typescript, angular-2+",
"url": null
} |
gazebo
[GUI] [Dbg] [Application.cc:453] Loading plugin [GzSceneManager]
[GUI] [Wrn] [Plugin.cc:182] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[GUI] [Msg] Added plugin [Scene Manager] to main window
[GUI] [Msg] Loaded plugin [GzSceneManager] from path [/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/gui/libGzSceneManager.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [InteractiveViewControl]
[GUI] [Wrn] [Plugin.cc:182] The `ignition-gui` element is deprecated. Please use `gz-gui` instead.
[GUI] [Msg] Camera view controller topic advertised on [/gui/camera/view_control]
[GUI] [Msg] Added plugin [Interactive view control] to main window
[GUI] [Msg] Loaded plugin [InteractiveViewControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libInteractiveViewControl.so]
[GUI] [Dbg] [Application.cc:453] Loading plugin [CameraTracking]
[GUI] [Wrn] [Plugin.cc:182] The `ignition-gui` element is deprecated. Please use `gz-gui` instead. | {
"domain": "robotics.stackexchange",
"id": 4669,
"lm_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
} |
thermodynamics
Title: $\Delta \bar{h}_{vap}$ and $\Delta \bar{s}_{vap}$ from vapor pressure vs. temperature data I'm trying to work on the following two problems: | {
"domain": "chemistry.stackexchange",
"id": 15758,
"lm_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
} |
gazebo, rviz, moveit, ros-melodic
<!-- Load default settings for kinematics; these settings are overridden by settings in a node's namespace -->
<group ns="$(arg robot_description)_kinematics">
<rosparam command="load" file="$(find denso_robot_moveit_config)/config/kinematics.yaml"/>
</group>
</launch>
move_group.launch:
<launch>
<arg name="robot_name" default="vs060" />
<include file="$(find denso_robot_moveit_config)/launch/planning_context.launch">
<arg name="robot_name" value="$(arg robot_name)" />
</include>
<!-- GDB Debug Option -->
<arg name="debug" default="false" />
<arg unless="$(arg debug)" name="launch_prefix" value="" />
<arg if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args" />
<!-- Verbose Mode Option -->
<arg name="info" default="$(arg debug)" />
<arg unless="$(arg info)" name="command_args" value="" />
<arg if="$(arg info)" name="command_args" value="--debug" /> | {
"domain": "robotics.stackexchange",
"id": 33063,
"lm_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, rviz, moveit, ros-melodic",
"url": null
} |
gazebo-citadel, gazebo-ignition
ign service -s /world/free_world/create --reqtype ignition.msgs.EntityFactory --reptype ignition.msgs.Boolean --timeout 300 --req 'clear = true'
None of them worked. Error just returns like this,
[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format ignition.msgs.EntityFactory: 1:7: Message type "ignition.msgs.EntityFactory" has no field named "clear".
I wanted to do this because of respawn. This sensor is actually prevent the respawn due to error where it says camera rgb is already exist in entity [#]. I explained more in github but then I realized, this is just belong to this site
Last question, do you know if there's any documentation or tutorial for this one? | {
"domain": "robotics.stackexchange",
"id": 4653,
"lm_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-citadel, gazebo-ignition",
"url": null
} |
javascript, angular.js
// to
$scope.launchUnixMs = Date.parse($scope.countdownTo);
I suggest that countdownTo be one of the easier formats for the native Date.parse() to parse. Most projects I encountered used the ISO-8601 format. This means, if you use that format, you can simply replace the above code with Date.parse() and totally remove the dependency to moment.js.
I also recommend you operate in milliseconds instead of seconds. Most JS date functions operate in milliseconds, so it might be easier to deal with if you just operated in milliseconds. Also, for future-proofing, it's easier to provide seconds when you're given milliseconds, rather than be given seconds initially and told to support milliseconds. That's a lot of code to change for that little requirement change.
$.now() | {
"domain": "codereview.stackexchange",
"id": 16024,
"lm_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, angular.js",
"url": null
} |
it results in a change in energy. Where F is the electrostatic force between the source charge ‘q’ and the test charge ‘q 0 ‘. Since λ is the charge density of the line the charge contained within the cylinder is: 4 π q = 4 π λ L. 26 (a) and (b) (OpenStax 18. Electric multipoles This is a useful approximation scheme, the more useful the further away point P is from the charges within V, because one can neglect the higher-order terms in the series after the desired accuracy is achieved. It is assumed that the test charge Q is small and therefore does not change the distribution of the source charges. E m q a r r =. were calculated involving DFT 3-21G method. An analytical formula for the distance dependence of the electric field gradient produced by a Gaussian charge density distribution n(r) is derived. Illustration. (c) the dominant electric field is inversely pro-portional to r3, for large r (distance from ori-gin). The following program displays a representation of the electric | {
"domain": "charlyedance.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9711290930537122,
"lm_q1q2_score": 0.8092657624845941,
"lm_q2_score": 0.8333245994514084,
"openwebmath_perplexity": 374.3046680397576,
"openwebmath_score": 0.7888935208320618,
"tags": null,
"url": "http://byqx.charlyedance.it/electric-field-of-a-charge-distribution-python.html"
} |
java, parsing, swing
String getFilename() {
return this.name + "." + this.format;
}
ReportComparator getComparator() {
return this.comparator;
}
}
ReportComparator.java
public interface ReportComparator {
// compare files (1 - match, 0 - no match, -1 - both files empty)
int compareTwoFiles(InputStream fileA, InputStream fileB) throws IOException;
// gets a list of format-specific differences between two files
ArrayList<String> getDifferences(InputStream fileA, InputStream fileB) throws IOException;
}
XLSXReportComparator.java
public class XLSXReportComparator implements ReportComparator {
private String xlsxCellDifferenceFormat, xlsxRowDifferenceFormatA,
xlsxRowDifferenceFormatB, xlsxSheetDifferenceFormatA,
xlsxSheetDifferenceFormatB, xlsxFileDifferenceFormatA,
xlsxFileDifferenceFormatB; | {
"domain": "codereview.stackexchange",
"id": 26886,
"lm_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, parsing, swing",
"url": null
} |
newtonian-mechanics, newtonian-gravity, reference-frames, acceleration, free-fall
Note that prior to Newton's discovery/explanation of gravity, everybody believed that all forces were contact forces. Nobody ever imagined that one body could exert a force on another body without being directly in contact with it. And at first blush, that indeed sounds pretty reasonable. So Newton's genius was not only explaining gravity, but also conjuring up the almost unimaginable idea of force-at-a-distance in the first place.
So your intuition is quite understandable -- you don't feel a force, so how can there possibly be a force??? Action(force)-at-a-distance is the answer. But don't feel too bad -- it took Isaac Newton to figure that out. | {
"domain": "physics.stackexchange",
"id": 48209,
"lm_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, reference-frames, acceleration, free-fall",
"url": null
} |
microbiology, respiration
Title: Will obligate aerobic bacteria die if placed in a buffer solution even in the presence of oxygen? The electron transport chain in aerobic bacteria functions by pumping H+ out of the cell to establish a concentration gradient.
So if the bacteria are placed in a buffer solution having pH equal to the cytosolic pH of the bacteria, will they still be able to establish the required concentration gradient? Will the increase in pH of cytosol(due to loss of H+) alone be enough to drive ATP synthesis even in the absence of a pH change in the medium? i.e.Will obligate aerobic bacteria die if placed in a buffer solution even in the presence of oxygen? Answer
No. There is ample evidence that:
Most non-extremophilic bacteria grow over a broad range of external pH values, from 5.5 – 9.0, and maintain a cytoplasmic pH that lies within the narrow range of pH 7.4 – 7.8. | {
"domain": "biology.stackexchange",
"id": 10712,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "microbiology, respiration",
"url": null
} |
rviz, urdf, nxt
That's what I get on the Terminal. Then rviz opens and displays all the meshes on the origin. Any ideas? Too many joints, maybe? The robot.urdf file passes the check_urdf tool, so I guess the syntax is OK. BTW, display.launch works fine with the urdf files I made following the urdf_tutorials, if you're wondering.
I'm still getting used to ros, urdf, rviz... and I tried to make this work by myself, so maybe this is the stupidest problem ever, but I'm totally lost.
Also, as requested by David Lu, here you have the first few lines of the URDF file:
<!--this file was autogenerated from sensor_car.lxf -->
<robot name=sensor_car>
<link name="base_link"/>
<joint name="base_joint" type="fixed">
<parent link="base_link"/>
<child link="ref_0_link"/>
<origin xyz="0.024 0 0.016" rpy="0 0 -1.57079632679" />
<axis xyz="0 0 1" />
</joint>
...
Thanks for your time,
Miguel :) | {
"domain": "robotics.stackexchange",
"id": 7267,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rviz, urdf, nxt",
"url": null
} |
c++, object-oriented, c++14, sdl
If you do this, it allows you to change the game without affecting the snake or the renderer. Say you wanted to have 2 snakes (or player v. player). No problem, just pass the renderer the positions of the segments of both snakes. Say you want to change how the snake is rendered. No problem, just update the renderer to use cooler textures. You don't have to update the snake object just because you changed how it renders. And so on. | {
"domain": "codereview.stackexchange",
"id": 29142,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, object-oriented, c++14, sdl",
"url": null
} |
19
A Markov chain is a discrete random process with the property that the next state depends only on the current state (wikipedia) So $P(X_n | X_1, X_2, \ldots X_n-1) = P(X_n | X_{n-1})$. An example could be when you are modelling the weather. You then can take the assumption that the weather of today can be predicted by only using the knowledge of ...
17
I have uploaded KCd's translation of the questions for year 5 and my translation of the questions for years 6-8 here. Please let me know if anything is unclear.
17
For probability theory as probability theory (rather than normed measure theory ala Kolmogorov) I'm quite partial to Jaynes's Probability Theory: The Logic of Science. It's fantastic at building intuition behind the rules and operations. That said, this has the downside of creating fanatics who think they know all there is to know about probability theory. ...
15 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974434788304004,
"lm_q1q2_score": 0.8033843889977533,
"lm_q2_score": 0.824461932846258,
"openwebmath_perplexity": 211.42318618170574,
"openwebmath_score": 0.9148450493812561,
"tags": null,
"url": "http://math.stackexchange.com/tags/probability-theory/hot?filter=all"
} |
of zero or more . of . The Wolfram Language has the world's largest collection of consistent multifont mathematical notation characters\[LongDash]all fully integrated into both typesetting and symbolic expression construction . A set is a well-defined collection of distinct objects. Consider the set $\left\{x|10\le x<30\right\}$, which describes the behavior of $x$ in set-builder notation. Preview. Set notation is used to help define the elements of a set. Set theory is one of the foundational systems for mathematics, and it helped to develop our modern understanding of infinity and real numbers. Under Equation Tools , on the Design tab, in the Symbols group, click the More arrow. It is still a set, so we use the curly brackets with nothing inside: {} The Empty Set has no elements: {} Universal Set. Intersection and union of sets. You never know when set notation is going to pop up. Sets. For example, let us consider the set A = { 1 } It has two subsets. Bringing the set operations | {
"domain": "uoa.gr",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399051935108,
"lm_q1q2_score": 0.8737299375446106,
"lm_q2_score": 0.9005297894548548,
"openwebmath_perplexity": 1215.916205261002,
"openwebmath_score": 0.624507486820221,
"tags": null,
"url": "http://e-pres.di.uoa.gr/fmfjp/594efb-set-notation-symbols"
} |
thermodynamics
Title: What mixing ratio of ethanol and acetone has the lowest freezing point? I am in the lab trying to make a sample for 1H NMR. It has to remain liquid at the lowest possible temperature.
I was recommended to use a mixture of ethanol and acetone because when they're mixed in the right proportions, the mixture has a very low freezing point.
I can not find this proportion anywhere. Does anyone know where to look for these things?
Here is a picture of what I'm looking for, but with ethanol and acetone instead of water - solvent: | {
"domain": "chemistry.stackexchange",
"id": 12096,
"lm_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
} |
homework-and-exercises, newtonian-mechanics, acceleration, spring, string
My conceptual understanding is rather not good although I can give couple of attempts.
Attempt: $g$, since the only external force acting is gravity.
But I think the spring attached to two masses might exert force.
Answer: $4g$,
taking the bottom mass, $10g = -k(x_2-x_1)$
the mass in the middle, $20g = -kx_1+k(x_2-x_1)$
adding both gives me $30g = -kx_1$
at the topmost ball,
$$T-10g-30g = -10g\\
T=0\quad
g=4g$$
[$T$ tension in the string, $x_1$ displacement of the spring between topmost mass and mass in the middle, $x_2$ displacement of the spring between mass in the middle and bottom most] | {
"domain": "physics.stackexchange",
"id": 38396,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, acceleration, spring, string",
"url": null
} |
c#, wpf, xaml, localization
</StackPanel>
<DataGrid ItemsSource="{Binding ResxStrings}" LoadingRow="GridDisplay_LoadingRow" CanUserSortColumns="True"
CanUserAddRows="True" CanUserDeleteRows="True" ColumnWidth="300" AutoGenerateColumns="False" BeginningEdit="DataGrid_BeginningEdit"
CellEditEnding="GridDisplay_CellEditEnding" Grid.Row="1" PreviewKeyDown="DataGrid_PreviewKeyDown">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=Key}" Header="{x:Static properties:Resources.DataGridHeader_Key_Header}" CanUserSort="True" />
<DataGridTextColumn Binding="{Binding Path=Value}" Header="{x:Static properties:Resources.DataGridHeader_Value_Header}" CanUserSort="True" />
<DataGridTextColumn Binding="{Binding Path=LocalizedValue}" Header="{x:Static properties:Resources.DataGridHeader_LocalizedValue_Header}" CanUserSort="True" />
</DataGrid.Columns>
</DataGrid>
</Grid> | {
"domain": "codereview.stackexchange",
"id": 14302,
"lm_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#, wpf, xaml, localization",
"url": null
} |
biochemistry, molecular-biology, pharmacology, enzymes, enzyme-kinetics
Ollis et al. (1992) Protein Eng 5: 197-211.
https://www.ncbi.nlm.nih.gov/pubmed/1409539 | {
"domain": "biology.stackexchange",
"id": 8090,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, molecular-biology, pharmacology, enzymes, enzyme-kinetics",
"url": null
} |
python, gui, tkinter
self.Text1 = Text(top)
self.Text1.place(x=20, y=220, height=195, width=420)
self.Text1.configure(background="white")
self.Text1.configure(font=font9)
self.Text1.configure(foreground="black")
self.Text1.configure(highlightbackground="#d9d9d9")
self.Text1.configure(highlightcolor="black")
self.Text1.configure(insertbackground="black")
self.Text1.configure(selectbackground="#c4c4c4")
self.Text1.configure(selectforeground="black")
self.Text1.configure(width=414)
self.Text1.configure(wrap=WORD) | {
"domain": "codereview.stackexchange",
"id": 29118,
"lm_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, gui, tkinter",
"url": null
} |
electric-circuits, electrical-resistance, singularities, inductance, laplace-transform
Title: Why is there a sudden change in current between $t=0^{-}$ and $t=0^{+}$ when an active inductor is connected in series with a relaxed inductor? Let us take the following question as an example:
For the above question I drew the corresponding Laplace transform diagram, as follows (didn't draw the switch since it basically open circuit after $t=0$): | {
"domain": "physics.stackexchange",
"id": 48327,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, electrical-resistance, singularities, inductance, laplace-transform",
"url": null
} |
asymptotics, landau-notation
Title: Why is f(n) of class O(g(n)) in this graph? There is a lot of explanation about big O, but I'm really confused about this part.
Acoording to the definition of Big-O, in this function
$$f (n) \le c g(n), \quad \text{for } n \ge n_0$$
$f (n)$ is $O(g(n))$.
But a description of a function in terms of big O notation usually only provides an upper bound on the growth rate of the function.
So for example 34 is a upper bound for the set $\{ 5, 10, 34 \}$. | {
"domain": "cs.stackexchange",
"id": 4603,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asymptotics, landau-notation",
"url": null
} |
proteins, enzymes
As there are really many enzymes for all kinds of reactions it is hard to define a general form for the active site. A motif which is present in a lot of enzymes is the the form of a catalytic pocket or groove to which only the correct substrate of the enzyme has access. Additionally the binding of the substrate to the enzyme often induces a conformational change in the protein which closes this pocket. When the reaction is finished and the substrate is not bound anymore by the enzyme, the conformation changes again and releases the products of the reaction. See the image for a schematically drawing of this principle (image from here): | {
"domain": "biology.stackexchange",
"id": 2837,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "proteins, enzymes",
"url": null
} |
python, python-2.x, role-playing-game
def prefight():
global enemy
enemynum = random.randint(1, 2)
if enemynum == 1:
enemy = GoblinIG
else:
enemy = ZombieIG
fight()
def fight():
os.system('clear')
print "%s vs %s" % (PlayerIG.name, enemy.name)
print "%s's Health: %d/%d %s's Health: %i/%i" % (PlayerIG.name, PlayerIG.health, PlayerIG.maxhealth, enemy.name, enemy.health, enemy.maxhealth)
print "Potions %i\n" % PlayerIG.pots
print "1.) Attack"
print "2.) Drink Potion"
print "3.) Run"
option = raw_input(' ')
if option == "1":
attack()
elif option == "2":
drinkpot()
elif option == "3":
run()
else:
fight() | {
"domain": "codereview.stackexchange",
"id": 29995,
"lm_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, role-playing-game",
"url": null
} |
java
output :
{xx=[cc], bi=[aa, bb]}
{bi=[aa, cc], n=[xx, yy]}
Case3:
if all child gets deleted, the parent should also be deleted (haven't handle the case now).
Question: Though my code is running perfectly fine but the quality seems bad. Can someone please help.
Source code: https://ideone.com/EfoVMC
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Map<String, HashSet<String>> FinalMap = new HashMap<String, HashSet<String>>();
Map<String, String> mapViewFromProperties = new HashMap<>();
mapViewFromProperties.put("bi", "aa,bb");
mapViewFromProperties.put("n", "xx,yy"); | {
"domain": "codereview.stackexchange",
"id": 27480,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
the-moon, fundamental-astronomy, declination
I had always though the south Declination means the southernmost point of the Moon on its orbit. Furthermore I had always thought the descending node is the point the Moon passes by going "down" in its motion. How can it reach a southernmost point and later go even further downwards?
I had been inclined to think that the north and south Declinations would be about half way between nodes (give or take due to slight changes during the motion). How can the Moon be in one of these south or north points and only 4 days later pass a node? And take again 9 more days to reach a south/north Declination again? | {
"domain": "astronomy.stackexchange",
"id": 2355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "the-moon, fundamental-astronomy, declination",
"url": null
} |
neuroscience, vision, eyes, hearing, human-ear
are fast while rods can respond to a single photon of light. Their morphologies are completely different: the rod outer segment is filled with lipid bilayer disks, while that of the cone has a series of in-folds. | {
"domain": "biology.stackexchange",
"id": 1159,
"lm_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, vision, eyes, hearing, human-ear",
"url": null
} |
homework-and-exercises, fluid-dynamics
When I try this, my logic seems to be flawed too. I don't get 1.12.
The level on side II has not changed. The level on side I has risen 2 cm. So 2 cm of liquid-II were added.
Consider the horizontal plane 2 cm below the top of side II. Below this level on both sides there is liquid-I
Above this level on side 2, there is 2 cm of liquid-II. Above this on side I, there is 4 cm of liquid-1. That should tell you the answer. | {
"domain": "physics.stackexchange",
"id": 17851,
"lm_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, fluid-dynamics",
"url": null
} |
experimental-physics, electrons, nuclear-physics, experimental-technique, gamma-rays
Colbalt-57 can be produced in quantities sufficient for use in this kind of experiment by putting a sample containing Cobalt-56 in a environment with high neutron flux such as near an operating nuclear reactor or a intense neutron source. Co-57 has a half life around nine months so it is well suited to this kind of application (long enough for the rate to be treated as constant over a few days, but short enough to get significant rate). | {
"domain": "physics.stackexchange",
"id": 39319,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, electrons, nuclear-physics, experimental-technique, gamma-rays",
"url": null
} |
quantum-mechanics, quantum-field-theory, hamiltonian-formalism, heisenberg-uncertainty-principle
Title: Formulation of the uncertainty principle for a system? There is a biological system that I can indeed describe by a simple quantum Hamiltonian $H$ having eigenstates $|q\rangle$ labelled by the numbers $q$, and having energies proportional to $f(q)$ - that is a continuous function of $q$ that sends $\Bbb N \rightarrow \Bbb R$. The form is:
$$H|X\rangle=E_q|q\rangle$$
with
$$E_p=E_0 f(q)$$
While $|X\rangle=|x_1,x_2,x_3,\dots,x_q\rangle$
From here obtain a partition function with $J$ analogue to temperature $T$ and $K$ analogue to $k_B$ Boltzman constant:
$$Z(J)=\sum_{i=1}^\infty exp \left( \frac{-E_i}{KJ}\right)$$
I have never done before formulating the uncertainty principle derived from equations like above. May you help me with following questions:
What are the commutators in the above case?
How does the formula for the uncertainty inequality look like for the above case? | {
"domain": "physics.stackexchange",
"id": 8426,
"lm_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, quantum-field-theory, hamiltonian-formalism, heisenberg-uncertainty-principle",
"url": null
} |
performance, c, recursion, functional-programming, interpreter
Stack result = interpret(rcode, dico);
printf("%s\n", showStack(result));
return 0;
}
PS: I use a function specific to MINGW in the Show.c file, it is __mingw_asprintf. If there are compilation problems, it probably comes from there, so it has to be removed.
PPS: Here is a link to download the files. Convenience typedefs
Consider adding convenience typedef declarations on your structs and enums, i.e.
struct Value {
// ...
};
becomes
typedef struct ValueTag {
// ...
} Value;
You've already done this with Stack, though I recommend renaming the tag:
typedef struct TagStack
{
struct Value *array;
size_t used;
size_t size;
} Stack;
Uniformity of reference
struct Value top(const Stack stack)
should be
struct Value top(const Stack *stack) | {
"domain": "codereview.stackexchange",
"id": 36505,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, c, recursion, functional-programming, interpreter",
"url": null
} |
quantum-mechanics, statistical-mechanics, condensed-matter, density-operator, metals
$$ \\ $$
(*)
I guess this depends on the exact model we are using. If we ignore electron-electron and electron-phonon interactions, and include dilute impurities (doping atoms or lattice defects) it should be correct I think. The Bloch waves are still solutions of the stationary Schrödinger equation everywhere but at the points of the impurities.
Additionally, if the eigenfunctions of H are really not delocalized in any actual system in nature (or put differently, if the eigenfunctions don't resemble Bloch functions at all), it seems the Bloch model and the band theory of metals must be inappropriate for actual systems. I think we should speak here not of semiclassical model, but of semiclassical approximation, which preserves some of the quantum features in favor making things more tractable. | {
"domain": "physics.stackexchange",
"id": 77721,
"lm_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, condensed-matter, density-operator, metals",
"url": null
} |
game-ai, evolutionary-algorithms, search, heuristics, alpha-beta-pruning
Note that there are also ways to do fairly decent move ordering without heuristic functions like the ones you suggested.
For example, you likely should be using iterative deepening; this is a variant of your search algorithm where you first only perform a search with a depth limit $d = 1$, then repeat the complete search process with a depth limit $d = 2$, then again with a limit $d = 3$, etc., until processing time runs out.
Once you have completed such a search process for a depth limit $d$, and move on to the subsequent search process with a limit of $d + 1$, you can order order the moves in the root node according to your evaluations from the previous search process (with depth limit $d$). Yes, here you would only have move ordering in the root node, and nowhere else, but this is by far the most influential / important place in the tree to do move ordering. Move ordering becomes less and less important as you move further away from the root. | {
"domain": "ai.stackexchange",
"id": 1578,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "game-ai, evolutionary-algorithms, search, heuristics, alpha-beta-pruning",
"url": null
} |
botany, plant-physiology
This page of the Google Books preview of the book Invertebrate Learning presents a number of primary sources on Mimosa and other plants which react to tactile stimulation. While most of these primary sources could not be immediately found by a Google search, I was able to find the original book by Bose (1906) which describes habituation in the Mimosa plant. (Chapter IX, Page 109) | {
"domain": "biology.stackexchange",
"id": 5294,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "botany, plant-physiology",
"url": null
} |
ruby, ruby-on-rails, rspec
factory :published_three_weeks_ago_content do
published_at { 3.weeks.ago }
end
factory :expiring_in_two_weeks_content do
unpublished_at { 2.weeks.from_now }
end
factory :publish_in_tree_weeks_content do
published_at { 3.weeks.from_now }
end
end
end Nice job. Your tests are nicely compartmentalized. It is indeed good to test the factory independently. Good use of describe and context.
Consider using the shoulda-matchers gem
Tests for many of the rails model associations and validations can be handled by the shoulda-matchers gem. For example, this line:
validates :title, presence: true
can be tested like so:
it {should validate_presence_of(:title)}
Consider using pending
Here's a commented-out test:
# TODO: You shall not pass! (for now)
# it "is invalid when expiration date is malformed" do
# build(:content, unpublished_at: "!0$2-as-#{nil}").should_not be_valid
# end | {
"domain": "codereview.stackexchange",
"id": 3033,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby, ruby-on-rails, rspec",
"url": null
} |
php, beginner, security, mysqli
This is the function I use to pull the question text, and answer integers from the database to display on the website.
function getQuestionsAndAnswers($connect) {
$questionArray = array();
$answersArray = array();
$getStuff = $connect->prepare('SELECT `question`, `answer` FROM `Quizzes` WHERE `questionNumber`<? ORDER BY `questionNumber` ASC');
$getStuff->bind_param('i', $questnum);
$questnum = 21;
$getStuff->execute();
$getStuff->bind_result($singleQuestion, $singleAnswer);
while ($getStuff->fetch()) {
array_push($questionArray, $singleQuestion);
array_push($answersArray, $singleAnswer);
}
$getStuff->close();
$connect->close();
return array($questionArray, $answersArray);
}
This is the code that gets run after the user takes the math quiz, submits his answers, and I validate that the answers are all integers, etc.
$connect = connectToDatabase(); // open database connection here | {
"domain": "codereview.stackexchange",
"id": 6525,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, beginner, security, mysqli",
"url": null
} |
bond, lewis-structure
Title: Why is hydrogen sulfate put together as it is? I recently looked up hydrogen sulfate ($\ce{HSO4-}$) to see how it's put together, and found this image of methyl hydrogen sulfate:
I'd assume that hydrogen sulfate looks the same, but without the methyl group attached. However I'm confused, how can it be constructed like that? This shows the sulfur having a total of 12 valence electrons, but shouldn't the maximum be 8?
I might be asking something that'll be obvious to me later on in chemistry, but this (and other groups that act as atoms) appear early on. I probably don't need to know it yet but I'd prefer to know how it works if I can as opposed to just accepting it. I think it's time for you to know about Octet Expansion rule. The molecules that expand their octet are known as Hypervalent Molecules. | {
"domain": "chemistry.stackexchange",
"id": 1428,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond, lewis-structure",
"url": null
} |
python, performance, pygame
Consider spelling it "textures/void.png",
so the code will portably run on more than one OS.
If that is infeasible, at least
spell
it r"textures\void.png".
def convert(...):
# converts coordinate systems
That is a valuable comment.
I thank you for it.
But python has a special way of explaining what a function does:
def convert(...):
"""Converts coordinate systems."""
Recommend you prefer a """docstring""" over # comments.
class chunk():
Pep-8
asks that you spell it class Chunk. And also World.
No need for those extra ( ) parens, as you're not
inheriting from anything.
def __init__(self, pos):
self.pos = pygame.Vector2(pos) | {
"domain": "codereview.stackexchange",
"id": 44664,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, pygame",
"url": null
} |
GMAT Question of the Day - Daily to your Mailbox; hard ones only
It is currently 22 Sep 2018, 16:18
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# In the figure above, x^2 + y^2 =
Author Message
TAGS:
### Hide Tags
Math Expert
Joined: 02 Sep 2009
Posts: 49303
In the figure above, x^2 + y^2 = [#permalink]
### Show Tags
26 Sep 2017, 23:31
00:00
Difficulty:
45% (medium)
Question Stats:
59% (00:39) correct 41% (01:05) wrong based on 57 sessions
### HideShow timer Statistics
In the figure above, x^2 + y^2 =
(A) 5
(B) 7
(C) 25
(D) 80
(E) 625 | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8774767874818408,
"lm_q2_score": 0.8774767874818408,
"openwebmath_perplexity": 6923.797083373556,
"openwebmath_score": 0.8387085199356079,
"tags": null,
"url": "https://gmatclub.com/forum/in-the-figure-above-x-2-y-250193.html"
} |
magnetic-fields, electromagnetic-induction
So, that means, charges are moving & they are creating a magnetic field which again acts on the charges which created the field.
At steady state, charges are not affected by their own magnetic field whereas on the other hand, at non-steady state, the magnetic field, that those moving charges produced, imparts force on each charge leading to the production of self-emf.
But why is it so?
Fields are independent entities; they can share momentum & energy with charges as said by Timaeus.
Charges are indeed affected by their field when they read. But up to my reading, I've not found, at non-steady state of current, charges radiate. Still they are affected by the changing flux of their own created magnetic field. This produces self-emf; which means the magnetic field impart force on those moving charges which create the field. | {
"domain": "physics.stackexchange",
"id": 26967,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "magnetic-fields, electromagnetic-induction",
"url": null
} |
electromagnetism, magnetic-fields, electric-current, induction
Title: Straight wire with constant electric current and square loop in the gravity field I was trying to solve this exercise but I found some difficulties in the proposed solution... The text is:
A square loop of wire (side $l$, mass $m$, resistance $R$) lies on the $xz$ plane, below a very long ideal straight wire, which carries a current $i_0$, at a distance $d$.
Since we're on the $xz$ plane, these's the gravity force, with acceleration $g$.
At the time $t_0$ the loop is dropped.
Write the equation of motion of the loop. | {
"domain": "physics.stackexchange",
"id": 41028,
"lm_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, magnetic-fields, electric-current, induction",
"url": null
} |
javascript, sorting, css
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>replit</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="script.js" defer></script>
</head> | {
"domain": "codereview.stackexchange",
"id": 42597,
"lm_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, sorting, css",
"url": null
} |
python, datetime, pandas
I hope you can help me. Thank you in advance.
That doesn't matter
Context does matter. A strict interpretation of the site guidelines would consider your question off-topic due to insufficient context, since code can't be reviewed in a vacuum (a black box, as you put it). If you think context doesn't matter in a review, then you might as well say that reviewing the code doesn't matter, either.
In this case, it does matter where your date comes from, because you've failed to type-hint it so it could be anything that pd.to_datetime accepts:
arg: int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like | {
"domain": "codereview.stackexchange",
"id": 43077,
"lm_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, datetime, pandas",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.