text stringlengths 1 1.11k | source dict |
|---|---|
nuclear-physics, atomic-physics, atoms, subatomic
Different bounding force: while Nuclei are solely bound by nuclear force Neutron Stars are bound principally by Gravitational force.
Different densities: The typical densities of the nuclei that surround us are around $\rho_0 = 0.15\, nucleons/fm^3$, whereas in neutron stars densities range from $0.2 \rho_0$ in the crust to $>2 \rho_0$ in the core. This is very much related to the force responsible for the bounding mentioned before.
Different n/p ratio: While most stable nuclei range from a neutron to proton ratio of 1 to 1.5, and we have been able to produce nuclei with these ratios for many isotopes, none reaches the fraction found in neutron stars, which is protons ~ 10% of neutrons! Again this is due to the gravitational nature of the bounding, rather than nuclear. | {
"domain": "physics.stackexchange",
"id": 16403,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, atomic-physics, atoms, subatomic",
"url": null
} |
newtonian-mechanics, classical-mechanics
Title: Is tension same in a chain with uniform mass distribution? I have been troubled by this question for a long time. Let's say that I have a chain with mass 'M' and length 'L', now I know that if the mass wasn't distributed uniformly, then the tension would have been different at different lengths, however, if the mass is uniformly distributed, then will this chain have same tension at same distributions of mass? Here is a chain of length $L$ and mass $M$ hanging under it's own weight. Suppose $x$ locates a point where I cut into the chain and examine the tension, $T(x)$: | {
"domain": "physics.stackexchange",
"id": 81591,
"lm_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, classical-mechanics",
"url": null
} |
electricity
Title: How is it possible that I get electric shocks from so many things? This probably isn't the typical stack exchange question, but I still hope someone can explain this to me :)
A read in the title I get a lot of electric shocks, here are some examples
If I get in or out a car and touch the metal chassis (I think this is quite common)
If I press the button of the elevator, even when I wear gloves (I don't get this I mean gloves aren't great conductors :') )
When I touch the rubber part you rest your arms on on an escalator (Again rubber?)
When I plug in something in an electrical output (like my mobile phone charger), these shocks really hurt bad
When I touch a person | {
"domain": "physics.stackexchange",
"id": 36992,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity",
"url": null
} |
c, n-queens
void printSqMatrix(int** matrix, long long Dim) {
for (int i = 0; i < Dim; i++) {
for (int j = 0; j < Dim; j++) {
printf("%d ", matrix[i][j]);
}
puts("");
}
}
int solve(int** chessBoard, long long row_index, long long boardSize) {
if (row_index == boardSize) {
return 1;
}
long long j;
for (j = 0; j < boardSize; j++) {
if (isSafe(chessBoard, row_index, j, boardSize)) {
chessBoard[row_index][j] = 1;
int retVal = solve(chessBoard, row_index + 1, boardSize);
if (retVal == 1) {
return 1;
}
else if (retVal == -1) {
puts("Something seriously wrong with execution");
exit(1);
}
chessBoard[row_index][j] = 0;
}
}
if (j == boardSize) {
return 0;
}
return 1; //never reaches here (written to solve a warning saying not all codepaths return a value
} | {
"domain": "codereview.stackexchange",
"id": 38143,
"lm_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, n-queens",
"url": null
} |
mathematics, theory-of-everything
Title: If a theory of everything exists, is it necessarily unique? There is a lot of interesting debate over whether a "theory of everything" (ToE) is allowed to exist in the mathematical sense, see Does Gödel preclude a workable ToE?, Final Theory in Physics: a mathematical existence of proof? and Arguments Against a Theory of Everything. Since as far as I can tell this is still an open question, let's assume for now that formulating a ToE is possible. I'm curious about what can be said about the uniqueness of such a theory. | {
"domain": "physics.stackexchange",
"id": 23572,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematics, theory-of-everything",
"url": null
} |
quantum-field-theory, path-integral, double-slit-experiment, interference, gauge-invariance
Imagine electrons confined to move along two wires as shown, but which are otherwise free. They're drawn separately so as to be visible, but we are imagining them to be infinitesimally close together. The dotted region denotes the interior of the solenoid (the only place where the magnetic field is nonzero); in the exterior, the vector potential is given by $\vec A = \frac{\varphi_0}{2\pi r}\hat \phi$, where we've chosen to use the Coulomb gauge.
We now ask about the phase acquired by each "beam" of particles as they travel from $A$ to $B$ along their respective paths. If $\varphi_0=0 \implies \vec A = 0$, then the two 1D plane waves would take the form
$$\psi_{\uparrow}(\ell,t)=\psi_{\downarrow}(\ell,t) = \psi_0 e^{i(k\ell - \frac{\hbar k^2}{2m} t)}$$
where $\ell$ is the distance traveled along the wire. Since the distances are the same for the top and bottom path, the two beams which left $A$ in phase are also in phase when they meet again at $B$. | {
"domain": "physics.stackexchange",
"id": 76729,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, path-integral, double-slit-experiment, interference, gauge-invariance",
"url": null
} |
You can also think in vector form:
$Var(a^T X) = a^T Var(X) a$
where $a$ could be a vector or a matrix, $X = (x_1, x_2, \dots, x_3)^T$, is a vector of random variables. $Var(X)$ is the covariance matrix.
If $a = (1, 1, \dots, 1)^T$, then $a^T X$ is the sum of all the $x's$
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9736446502128797,
"lm_q1q2_score": 0.8351613283169121,
"lm_q2_score": 0.8577681068080749,
"openwebmath_perplexity": 396.7721571469583,
"openwebmath_score": 0.93498295545578,
"tags": null,
"url": "http://math.stackexchange.com/questions/115518/determining-variance-from-sum-of-two-random-correlated-variables"
} |
fft, fourier-transform
Here is my code:
typedef std::complex<float> Complex;
Complex chunk[N];
float Fs = 176400; // How many time points are needed i,e., Sampling Frequency
const double T = 1 / Fs; // At what intervals time points are sampled
float value;
float value2;
for (int i = 0; i < N; i++)
{
value2 = (float)(1 * sin(2 * M_PI * 43000 * (i * T))); // Original Signal
Complex value3 = {(float)(1 * sin(2 * M_PI * 12000 * (i * T))), 0}; // The frequency I want to add
double multiplier = 0.5 * (1 - cos(2*M_PI*i/256)); // Hamming Window
chunk[i] = {value2 * multiplier, 0 };// generate (complex) sine waveform
chunk[i] = chunk[i] * value3; // Frequency Mixer
} your original signal is a real-valued sine - so, that's not one spike to begin with, but two.
Nothing in your code actually computes a complex sine, so that's your bug!
You will have to review what a complex sine is (hint: it's not a complex number where the imaginary part is 0!). The rest will clear itself up. | {
"domain": "dsp.stackexchange",
"id": 10485,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, fourier-transform",
"url": null
} |
satisfiability
So my question is, can I make a lower upper bound on the number of variables, above which the instances will always be trivial?
I have a feeling that $\frac{1}{2}mk$ should be possible (I even think I had the argument for this in my head at some point), because $mk$ is actually an upper bound on the number of literals, not variables, but I can't be sure that all literals are present in both negated and unnegated form, and therefore can't seem to find an argument for this. If you want to prove the worst-case running time of your algorithm, you probably don't need to prove that. It's probably enough that there exists instances of SAT with (say) $\frac12 mk$ variables that are NP-hard; and that can be proven.
When each variable occurs only twice in the formula, SAT can be solved in polynomial time (via resolution). | {
"domain": "cs.stackexchange",
"id": 11655,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "satisfiability",
"url": null
} |
gas-laws, phase, gas-phase-chemistry
However, the only resources I've been able to find so far relate to the vapour pressure, which is a function of only temperature and this seems incomplete.
Can anybody point me in the right direction on how to approach this problem? Some factors that seem to complicate things are: | {
"domain": "chemistry.stackexchange",
"id": 17632,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gas-laws, phase, gas-phase-chemistry",
"url": null
} |
ros
Title: How to subscribe hark_msgs types
i am using ROS Hydro in ubuntu 12.04. and I want to create a subscriber of hark_msgs. whenever I run a simple publisher designed in HARK from batchflow, I am able to view the messages in the terminal (using rostopic echo). When I am trying to create a subscriber ,I get this message:
Could not find a configuration file for package hark_msgs.
Set hark_msgs_DIR to the directory containing a CMake configuration file
for hark_msgs. The file will have one of the following names:
hark_msgsConfig.cmake
hark_msgs-config.cmake
(whenever I include hark_msgs in the dependencies, I get the above error.)
I found the folder where hark_msg related (.msg) files are but .cmake files are no where to be seen. Any help would be appreciated.
Originally posted by keshav_sarraf on ROS Answers with karma: 66 on 2014-06-18
Post score: 0
I created a rosbuild package to subscribe hark_msgs and it worked. | {
"domain": "robotics.stackexchange",
"id": 18303,
"lm_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
} |
newtonian-mechanics, forces, newtonian-gravity, free-body-diagram
Imagining it on a molecular scale, why do we observe the second image and not the first? I know my drawing is bad, but thats supposed to be a lattice of atoms (the slope) with the box's weight pushing down on it. The box's weight is pushing straight down on the atoms, so why don't they push back straight up?
Edit: removing this section as it is largely irrelevant and a bad example
And what if there isn't multiple points to average? What if the object only touches the slope at a single point? How does it know which way is perpendicular?
And I know a lot of these "laws" exist because "thats what we observe," I just want to understand why we observe it.
Imagining it on a molecular scale, why do we observe the second image and not the first?
The first image is fine. We choose, for convenience, to separate some of those drawn force vectors into components normal to the surface and tangential to the surface. | {
"domain": "physics.stackexchange",
"id": 91022,
"lm_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, forces, newtonian-gravity, free-body-diagram",
"url": null
} |
This question is partially inspired by the following question: Probability distribution to maximize the expected distance between two points
• I made some edit on your question so that formulas are better to read, I hope. – Sangchul Lee Feb 18 at 4:29
• It definitely depends on the choice of $M$. I can set up variational argument to obtain a characterization of the maximizer, and in the case where the convex hull of $M$ is a finite-dimensional polytope, then I can give a formula computing the optimal constant. For a very specific case where the convex hull of $M$ is a regular $n$-gon (so that its $n$ vertices $v_1, \cdots, v_n$ also lie in the original set $M$), the expectation is maximized by $X, Y$'s uniformly distributed on $\{v_1, \cdots, v_n\}$. – Sangchul Lee Feb 18 at 8:30
Here is a note on some of my observations, but this answer is far from being complete, as I did not explain many steps. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363729567545,
"lm_q1q2_score": 0.8128669949539545,
"lm_q2_score": 0.8244619199068831,
"openwebmath_perplexity": 94.88652348966326,
"openwebmath_score": 0.994627058506012,
"tags": null,
"url": "https://math.stackexchange.com/questions/3116001/what-is-the-largest-possible-expectation-of-difference-between-two-i-i-d-random?noredirect=1"
} |
c#, algorithm, programming-challenge, recursion
Common interview question
Recursive function is the most common mock interview question. I have practiced recursive function again and again to be interviewer and interviewee from March 2017 to Jan. 2018 over 150 mock interviews, I have learned so many things in the problem solving of recursive function through so many peers.
Usually the recursive function can be written in 10 minutes after a lot of practice, in my opinion. I almost make all possible mistakes in those practice, and then I start to learn where to discipline myself, and go through the rituals, which are to find base case and solve the problem only once before inductive step.
The algorithm was hard for me to figure out in the anonymous mock interview last week, since I have never worked on the exactly same algorithm before. I got a rating of 2 out 4 since major hint was given to me. The recursive function should be designed to return both maximum and minimum numbers. | {
"domain": "codereview.stackexchange",
"id": 34647,
"lm_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, programming-challenge, recursion",
"url": null
} |
terminology, asymptotics, landau-notation
Never mind that Landau notation gets into trouble when two independent variables are around, anyway.
Meaning that many people use it in a sloppy way. Not saying that that's a good thing. Many questions on this site are based in wrong understanding of terms that are founded in teachers promoting sloppiness in the name of (alleged) clarity (imho). | {
"domain": "cs.stackexchange",
"id": 2565,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "terminology, asymptotics, landau-notation",
"url": null
} |
ros, ros2, ament, cmake
list(APPEND ALL_PROTO_SRCS
"${PROJECT_BINARY_DIR}/${DIR}/${FIL_WE}.pb.cc")
list(APPEND ALL_PROTO_HDRS
"${PROJECT_BINARY_DIR}/${DIR}/${FIL_WE}.pb.h")
file(MAKE_DIRECTORY
${PROJECT_BINARY_DIR}/${DIR})
add_custom_command(
OUTPUT
"${PROJECT_BINARY_DIR}/${DIR}/${FIL_WE}.pb.cc"
"${PROJECT_BINARY_DIR}/${DIR}/${FIL_WE}.pb.h"
COMMAND
"${PROTOBUF_PROTOC_EXECUTABLE}"
ARGS
--cpp_out ${PROJECT_BINARY_DIR}/${DIR}
--proto_path ${PROJECT_SOURCE_DIR}/${DIR}
${ABS_FIL}
DEPENDS
${ABS_FIL}
COMMENT
"Running C++ protocol buffer compiler on ${ABS_FIL}"
VERBATIM ) endforeach() set_source_files_properties(${ALL_PROTO_SRCS}
${ALL_PROTO_HDRS} PROPERTIES GENERATED
TRUE)
set(dependencies Protobuf )
set(library_name my_protobuf)
include_directories(
${PROJECT_BINARY_DIR} )
add_library(${library_name} SHARED
${ALL_PROTO_HDRS} ${ALL_PROTO_SRCS}
)
ament_target_dependencies(${library_name}
${dependencies} ) | {
"domain": "robotics.stackexchange",
"id": 32451,
"lm_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, ament, cmake",
"url": null
} |
-
One quick reason: a manifold is always Z/2Z orientable. This allows results like Poincare duality to work. – Soarer Jun 23 '11 at 8:21
Thanks! Where can I find a reference for this? I tried in Bott-Tu (Differential Forms etc.) and Irapidly noticed that the third book of Fomenko "Modern Geometry" spends lots of words about Z/2 cohomology, but I'm lacking a precise place. – tetrapharmakon Jun 23 '11 at 8:29
Have you checked in Massey's Algebraic Topology book, or Bredon's Geometry and Topology book? – user641 Jun 23 '11 at 8:36
Another (more technical) thing is that it's easier to work in char 2, because you can ignore all signs — which makes many computations much, much easier (say, try to compute homology — or just Euler char — of a real Grassmannian...). – Grigory M Jun 23 '11 at 8:48 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9546474194456936,
"lm_q1q2_score": 0.832784179601372,
"lm_q2_score": 0.8723473846343393,
"openwebmath_perplexity": 510.331414110226,
"openwebmath_score": 0.9069976210594177,
"tags": null,
"url": "http://math.stackexchange.com/questions/47100/mathbbz-2-mathbbz-coefficients-in-homology"
} |
control-engineering, car
Title: Why does "Google self-driving car"'s roof camera rotate? I'm intrigued by this video in which the roof camera rotates continuously. One reason could be to capture 360 degrees around, but then again two cameras or more could do the same job capturing different parts of the landscape. It seems to me a waste of energy in making the camera rotate, and also having mobile parts make it more vulnerable to breaking. I don't see why not using a system of many static cameras. It isn't an ordinary video camera. It's a high-resolution LIDAR that uses laser beams to measure the distance to thousands of points on every rotation. I believe the one used by the car in that video is the Velodyne HDL-64e, which I have used myself on a similar project. | {
"domain": "engineering.stackexchange",
"id": 1160,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "control-engineering, car",
"url": null
} |
javascript, algorithm, programming-challenge, functional-programming, ecmascript-6
if (digits.length === 1) { return [...strDigits[digits]]; }
const res = [];
const combine = (cur, n) => {
if (cur.length === digits.length) {
res.push(cur);
return;
}
[...strDigits[digits[n]]].forEach(x => {
combine(cur + x, n + 1);
});
};
combine('', 0);
return res;
};
Functional approach
/**
* @param {string} digits
* @return {string[]}
*/
var letterCombinations = function(digits) {
if (digits === '') { return []; }
const strDigits = {
'2': 'abc',
'3': 'def',
'4': 'ghi',
'5': 'jkl',
'6': 'mno',
'7': 'pqrs',
'8': 'tuv',
'9': 'wxyz',
};
const combine = (cur, n) => cur.length === digits.length
? cur
: [...strDigits[digits[n]]].flatMap(x => combine(cur + x, n + 1)); | {
"domain": "codereview.stackexchange",
"id": 34831,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, algorithm, programming-challenge, functional-programming, ecmascript-6",
"url": null
} |
This part doesn't seem right to me. Can someone help me with this part?
• What are your calculations in (A) ? – callculus Jul 18 '15 at 14:12
Your marginal density for $X$ is correct. But indeed your computation for the marginal density of $Y$ is flawed; $Y$ takes values in $[0,9]$ (since $0<x<y$ and $x<y<x+2$). To compute the marginal density of $Y$, we need to integrate the joint density over $S$ with respect to $x$. For $0<y<2$, we have $0<x<y$ and $$f_Y(y)=\int_0^2 \frac1{14}\mathsf dx = \frac1{14}y$$ For $2<y<7$, we have $0<x<2$ and $$f_Y(y) = \int_0^2\frac1{14}\mathsf dx = \frac17.$$ (the bounds for that one are hard to see unless you draw a plot of $S$.) For $7<y<9$, we have $y<x<9$ and $$f_Y(y) = \int_y^9\frac1{14}\mathsf dx = \frac1{14}(9-y).$$
Hence $$f_Y(y) = \frac1{14}y 1_{(0,2)}(y) + \frac17 1_{(2,7)}(y) + \frac1{14}(9-y) 1_{(7,9)}(y).$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639661317859,
"lm_q1q2_score": 0.8315141311937881,
"lm_q2_score": 0.855851143290548,
"openwebmath_perplexity": 103.60023496266942,
"openwebmath_score": 0.9731684327125549,
"tags": null,
"url": "https://math.stackexchange.com/questions/1365571/bivariate-random-variable"
} |
ros, navigation, odometry, navsat-transform-node, robot-localization
</node>
</launch>
Originally posted by Mondo on ROS Answers with karma: 1 on 2018-06-29
Post score: 0
Original comments
Comment by Tom Moore on 2018-07-02:
Please post your full configuration for the EKF and navsat_transform_node. Also, please post one sample input message from every sensor input. IMU + GPS-only state estimation usually doesn't work very well, but I can't say more without more information.
Comment by Mondo on 2018-07-02:
Edited just right now.
I see what you're trying to do. You shouldn't need the datum parameter; that's really there to force the GPS origin to a given point, rather than letting the first GPS reading be the GPS origin.
The problem is that navsat_transform_node was written to handle this situation:
Robot starts driving indoors and generating nav_msgs/Odometry messages with its current pose. No GPS signal is available.
Robot drives outside and gets a GPS fix. | {
"domain": "robotics.stackexchange",
"id": 31131,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, odometry, navsat-transform-node, robot-localization",
"url": null
} |
1992, 1996 } for which the given function can not be defined ) nonprofit organization F... Independent variable, x, for which the given function can not be defined y-values... To do to check whether the relation was a function ) nonprofit organization be.! Worked example: domain and range of a function was to look for duplicate x-values a free, education. I had to do to check whether the relation was a function is all the values! ( c ) ( 3 ) nonprofit organization a 501 ( c ) ( 3 ) nonprofit organization 3! ; the range is the set of y-values that are output for the domain elements 1 and 2 are with... Determine the domain and range of a function and ask you to find the domain and of... Free, world-class education to anyone, anywhere give you a function was to look for duplicate.... Is all the possible values of the notation used refer to the ordered that! Function can not be defined the graph is a function to look for duplicate.! Given function can not be defined ) nonprofit | {
"domain": "caverider.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676448764484,
"lm_q1q2_score": 0.8458368199836824,
"lm_q2_score": 0.8633916047011595,
"openwebmath_perplexity": 496.92027047785183,
"openwebmath_score": 0.5560239553451538,
"tags": null,
"url": "http://caverider.com/9rq3cvl5/article.php?a77076=domain-and-range-notes"
} |
python, python-3.x, sql, functional-programming
A replacement for a mini-class containing state information for each
git-repo. This closure returns a tuple of functions.
Args:
repo_path (str) - absolute path to git-repo.
Return:
Tuple of functions
"""
rep_hash = repo_hash(repo_path)
rep_date = repo_date(repo_path)
def read_and_annotate(file_path: str) -> pd.DataFrame:
"""Return a data-frame with identifying columns."""
delim_data = (pd.read_csv(file_path, usecols=[i for i in range(0, 12)],
error_bad_lines=False, warn_bad_lines=False,
memory_map=True)
.assign(repo_root=repo_path,
repo_hash=rep_hash,
repo_date=rep_date,
full_path=file_path)) | {
"domain": "codereview.stackexchange",
"id": 38309,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, sql, functional-programming",
"url": null
} |
evolution, ecology, life-history, adaptation, climate-change
2) Be hardy, and 'try' to wait out changes. No real-world example to cite, but imagine a long-lived tree growing in an area that has become to warm for its seeds to effectively produce seedlings.
It seems intuitively like strategy 1 is better in the case of ongoing climate warming. However, we could easily imagine a 5-year hot spell followed by a return to the normal as part of natural weather variation. Perhaps in this situation strategy 2 is better.
Essentially, having a longevity/generation time/hardiness that matches the time-scale of the disturbance would be important – if the disturbance is long (or unidirectional) compared to your lifespan, evolving fast seems best; if the disturbance is short compared to your life, it seems best to wait it out.
So the question is, is there theory that deals with this? I suspect that I just need to hit the population genetics books again or something; or perhaps there's a massive tome by Gould I should be reading? | {
"domain": "biology.stackexchange",
"id": 1329,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, ecology, life-history, adaptation, climate-change",
"url": null
} |
Assuming $$s^2=\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar X)^2$$ is the sample variance, the only result one needs to use is that $$\frac{(n-1)s^2}{\sigma^2}\sim\chi^2_{n-1}$$
Keeping in mind that for a chi-squared random variable $$X$$ with $$n$$ degrees of freedom, mean and variance of $$X$$ is $$n$$ and $$2n$$ respectively, we have
\begin{align} \operatorname{Var}\left(\frac{(n-1)s^2}{\sigma^2}\right)&=2(n-1) \\\text{ or },\quad \operatorname{Var}(s^2)&=\frac{2\sigma^4}{n-1} \end{align}
We also find that $$E(s^2)=\sigma^2$$
What you are looking for is the MSE of an estimator of the form $$cs^2$$, $$(c\ne 1)$$.
Now,
\begin{align} \text{MSE}_{\sigma}(cs^2)&=\operatorname{Var}_{\sigma}(cs^2)+\left\{\text{bias}(cs^2)\right\}^2 \\&=c^2\frac{2\sigma^4}{n-1}+\left(c\sigma^2-\sigma^2\right)^2 \\&=\sigma^4\left[\frac{2c^2}{n-1}+(c-1)^2\right] \\&=\sigma^4\,\psi(c),\text{ say} \end{align}
Minimising $$\psi(c)$$ by usual calculus, we find that $$c=\frac{n-1}{n+1}$$ is the point of minima. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668668053619,
"lm_q1q2_score": 0.8133272974804533,
"lm_q2_score": 0.8289388125473629,
"openwebmath_perplexity": 166.99835090202708,
"openwebmath_score": 0.9758137464523315,
"tags": null,
"url": "https://math.stackexchange.com/questions/2860289/minimum-mean-squared-error-of-an-estimator-of-the-variance-of-the-normal-distrib"
} |
javascript, php, html, form
test_input isn't a great function. I wrote about it already a couple of times, so I'll just summarize here: It just applies some semi-random functions which mangle your data. It doesn't apply proper input filtering and is not a recommended approach to security. Right now, it does protect you from XSS, but the recommended approach is to encode variables when echoing them, not when retrieving them (it keeps your data clean, and it is secure no matter where the data comes from). If you want additional input filtering, consider a different approach.
don't shorten variable names, it makes code hard to read. What's aName for example? I have no idea. If you write authorName, it's immediately clear what is meant. Same for qad, xErr, etc
either use snake_case or camelCase. Mixing both makes code harder to read.
fail doesn't do anything except set success to false. It would be clearer to just do that directly. | {
"domain": "codereview.stackexchange",
"id": 18494,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, php, html, form",
"url": null
} |
c#, game, console, simulation
can be simplified by using var instead of the concrete type and by using the static Stopwatch Stopwatch.StartNew() method.
Position
public override bool Equals(object obj)
{
if(obj.GetType() == typeof(Position))
{
Position cast = obj as Position;
return
this.X == cast.X &&
this.Y == cast.Y;
}
return false;
}
can be simplified like so
public override bool Equals(object obj)
{
if(obj is Position cast)
{
return
this.X == cast.X &&
this.Y == cast.Y;
}
return false;
}
You don't check wether x or y is in a valid range. I don't know if your code get problems if either of this will be negative. If yes you should check these parameters in your constructor and add validation for the property-setter as well.
Chunk
public Chunk(int x, int y)
{
this.Position = new Position(x, y);
this.Data = new RenderingPixel[CHUNK_WIDTH, CHUNK_HEIGHT];
} | {
"domain": "codereview.stackexchange",
"id": 36755,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, game, console, simulation",
"url": null
} |
special-relativity, group-theory, inertial-frames, lorentz-symmetry, geometry
A similar path can be taken for the three-dimensional rotation group through the element of its Lie algebra $\varphi\cdot J$ defined by $\varphi\cdot Jv=\varphi\times v:=\star(\varphi\wedge v)$ for all vectors v. The idea is similarly that $(\varphi, \varphi\times v, \varphi\times(\varphi\times v))$ is an oriented basis. This leads to Rodrigues' formula.
I would like to know if anybody knows of such a simple characterization for the (proper orthochronous) Lorentz group? Since every element of the Lorentz group can be written using the product of a rotation and a boost, I am particularly interested in the boosts. I would like in particular a geometrical and basis-free description. I seem to be able to retain such descriptions much better. I imagine that the problem statement would be something like | {
"domain": "physics.stackexchange",
"id": 56169,
"lm_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, group-theory, inertial-frames, lorentz-symmetry, geometry",
"url": null
} |
and
$$\frac{x}{1+x}\le\log(1+x)\le x \tag 3$$
From $(1)$ we can easily show that
$$\frac{x}{1-x^2}\le \sinh(x)\le x \tag 4$$
for $0\le x <1$.
Applying $(3)$ and $(4)$ to $(1)$ reveals
$$\frac{\frac12 \log^2(z)}{\left(1-\left(\frac{\log(z)}{2\sqrt n}\right)^2\right)^2} \left(\frac{1}{\cosh\left(\frac{\log(z)}{\sqrt n}\right)}\right)\le n\log\left(1+2\sinh^2\left(\frac{\log(z)}{2\sqrt n}\right)\right)\le \frac12 \log^2(z)$$
whereupon applying the squeeze theorem reveals
$$\lim_{n\to \infty}n\log\left(1+2\sinh^2\left(\frac{\log(z)}{2\sqrt n}\right)\right)=\frac12 \log^2(z)$$
Finally, exploiting the continuity of the exponential function yields the coveted limit
$$\bbox[5px,border:2px solid #C0A000]{\lim_{n\to \infty}\frac{z^{1/\sqrt n}+z^{-1/\sqrt n}}{2}=e^{\frac12 \log^2(z)}}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682437975526,
"lm_q1q2_score": 0.8106025110454336,
"lm_q2_score": 0.8198933425148213,
"openwebmath_perplexity": 615.6084700136543,
"openwebmath_score": 0.999962568283081,
"tags": null,
"url": "https://math.stackexchange.com/questions/1674455/limit-lim-limits-n-to-infty-left-fracz1-sqrt-n-z-1-sqrt-n"
} |
structural-engineering, structural-analysis, stiffness
Title: Transforming the Area of a Hollow Square Section filled with concrete into the equivalent area of just steel I need to complete the 3D stiffness matrix of steel concrete composite columns under all kinds of stresses (axial and rotational as shown in the image below). So because the section is a Square Hollow Section 150 x 150 x 16mm, filled with concrete, I need to transform the concrete into equivalent steel. How can I go about this to obtain the equivalent, Young's Modulus E, Shear Modulus G, Area to use and Section Moment of area I and Polar Moment of area J. Any advice on the procedure to solve this? Images of the section and the matrix are below. You can simply calculate "equivalent" cross-sectional stiffness values.
Note that all non-zero terms of the stiffness matrix depend on one of these values: $EA$ or $EI$. These are the cross-sectional axial and rotational stiffnesses, respectively. | {
"domain": "engineering.stackexchange",
"id": 4720,
"lm_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, structural-analysis, stiffness",
"url": null
} |
ros, python, catkin-make, yaml, ros-kinetic
Title: catkin_make install fails due to: "Import Error: no module named `yaml`"
When following along with the Beginner Tutorial, I arrive at creating Messages and Services. However when I call catkin_make install inside the correct directory, I get the following error:
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py", line 44, in <module>
import genpy.generator
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
import yaml
ImportError: No module named 'yaml'
beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_py.dir/build.make:64: recipe for target '/home/ros/catkin_ws/devel/lib/python3/dist-packages/beginner_tutorials/msg/_Num.py' failed | {
"domain": "robotics.stackexchange",
"id": 29819,
"lm_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, python, catkin-make, yaml, ros-kinetic",
"url": null
} |
c#, image, library, bitwise, steganography
//Math.Abs because Stride can be negative if the image is saved upside down
//i.e. The first pixel in memory is the bottom right one.
int imageSize = Math.Abs(bmpData.Stride) * bmpData.Height;
//Get all the bytes from the file we want to embed, and save it in a byte array
byte[] fileBytes = File.ReadAllBytes(inputFilePath);
//If the file we want to embed is larger than 8 times the size of the image, we can't store it.
//This is because We need one byte in the image to store each bit of the file
if (fileBytes.Length * 8 > imageSize)
throw new FileTooLargeException("The file you are trying to embed needs an image of at least" + fileBytes.Length * 8 + "bytes large");
bool fileWritten = false;
int lastByte = 0;
unsafe
{
byte* ptr = (byte*)bmpData.Scan0; | {
"domain": "codereview.stackexchange",
"id": 9707,
"lm_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#, image, library, bitwise, steganography",
"url": null
} |
Induction has a few steps. Let's see if this clarifies them a bit,
1) Base Case: Show that your summation formula works for k = 1 case (which is probably easiest here lol)
2) Induction Case: Create an induction hypothesis. For this case, you assume that the kth case holds. In other words,
$\sum_{k=1}^{n}k^3=\left (\frac{n(n+1)}{2} \right )^2$
is true. Now, show that the kth case implies the (k+1)th case. How do you think you can do this?
Last edited: | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138144607744,
"lm_q1q2_score": 0.8189526094190841,
"lm_q2_score": 0.8376199633332891,
"openwebmath_perplexity": 968.674648399005,
"openwebmath_score": 0.9268742799758911,
"tags": null,
"url": "https://www.physicsforums.com/threads/prove-that-for-each-n-in-n-1-3-2-3-n-3-n-n-1-2-2.525401/"
} |
python, game, dice, role-playing-game
random_gender = randint(1, 2)
if random_gender == 1:
gender = "Male"
else:
gender = "Female"
character_sheet.append("Name: %s:" % name)
character_sheet.append("Gender: %s" % gender)
character_sheet.append("Character Class: %s" % character_class)
character_sheet.append("Strength: %s" % str)
character_sheet.append("Dexterity: %s" % dex)
character_sheet.append("Constitution: %s" % con)
character_sheet.append("Damage %s" % damage_print)
character_sheet.append("Crit Chance {}%".format(crit))
character_sheet.append("Hit Points: %s/%s" % (hit_points, current_hp))
character_sheet.append("You have %s gold pieces." % gold)
pp = pprint.PrettyPrinter(indent=30)
pp.pprint(character_sheet)
raw_input("Please Press Enter To Buy A Weapon")
buy_weapon(level_zero_weapons) | {
"domain": "codereview.stackexchange",
"id": 2631,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, game, dice, role-playing-game",
"url": null
} |
Finding a Similar Matrix
Note that the $$n-1$$ dimensional subspace orthogonal to $$\begin{bmatrix}1&1&1&\cdots&1\end{bmatrix}^\text{T}$$ is multiplied by $$-\lambda$$. (If the subspace is orthogonal to a given vector, we can subtract that vector from each row of the matrix when operating on that subspace.)
$$\begin{bmatrix}1&1&1&\cdots&1\end{bmatrix}^\text{T}$$ is multiplied by $$n-\lambda$$. (Just compute it.)
Thus, $$M$$ is similar to $$\begin{bmatrix} -\lambda&0&0&\cdots&0\\ 0&-\lambda&0&\cdots&0\\ 0&0&-\lambda&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 0&0&0&\cdots&n-\lambda\\ \end{bmatrix}\tag2$$ Therefore, $$\det(M)=(-\lambda)^{n-1}(n-\lambda)\tag3$$
$$\boldsymbol{\det(\lambda I_n-AB)=\lambda^{n-m}\det(\lambda I_m-BA)}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9898303422461274,
"lm_q1q2_score": 0.8353129781813937,
"lm_q2_score": 0.8438951025545426,
"openwebmath_perplexity": 216.01364640076008,
"openwebmath_score": 0.9887266159057617,
"tags": null,
"url": "https://math.stackexchange.com/questions/153457/characteristic-polynomial-of-a-matrix-of-1s?noredirect=1"
} |
fluid-dynamics, mathematical-physics
Now that I have found $\mu$ I should show that it is the same as the expression you give in the question. We agree on the first term of $\mu$, but the second term is different. It seems I have to show that $1-\hat{n}\otimes \hat{n} = \hat{y} \otimes \hat{y}$, but this is true because, since $\hat{n}$ and $\hat{y}$ form an orthonormal basis, then by the resolution of identity formula we have $1=\hat{n}\otimes \hat{n}+\hat{y} \otimes \hat{y}$, so our answers do agree. | {
"domain": "physics.stackexchange",
"id": 12881,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, mathematical-physics",
"url": null
} |
thermodynamics, black-holes, astrophysics, dark-matter, hawking-radiation
However, in the far-field region, most of the energy released by Hawking evaporation is electromagnetic, and the peak photon energy goes like $E = {hc}/{\lambda_\text{peak}} \propto M^{-1}$.
A “typical” Hawking photon has energy $E>1\,\mathrm{GeV}$ for the hole’s final $10^8\rm\,years$; during the final moments, typical photon energies are unreasonably large. High-energy photons can interact with the interstellar medium by making particle-antiparticle pairs; the antiparticles can then annihilate on matter in the interstellar medium, eventually making lower-energy photons whose momentum is still directed mostly away from the source. (For that matter, the near-field Hawking radiation from a sufficiently-warm black hole will also include particle-antiparticle pairs directly; only the neutral components of this radiation will get very far.) | {
"domain": "physics.stackexchange",
"id": 84694,
"lm_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, black-holes, astrophysics, dark-matter, hawking-radiation",
"url": null
} |
test is to use the vertical line does n't an! Math games and fun math activities this symmetry breaks down as one moves to the vertical line.! Segments, curves, or responding to other answers this URL into your RSS reader Stack Exchange is one-to-one... Has a horizontal line drawn through the function f is bijective if and only if graph! Subscribe to this RSS feed, copy and paste this URL into RSS! Thanks for contributing an answer to mathematics Stack Exchange Inc ; user contributions licensed cc... Relation to inverse functions note: the function in more than one point a unique y value function iff vertical! Examples showing how to determine whether a function, 2 to tell you about the is. Function at all on the relation is one-to-one them up with references or personal experience it! S also a way to determine if a horizontal line test the noun breaks down as one to! And fun math activities while trying to ride at a challenging pace line passes the. Once, then that graph is a function | {
"domain": "com.br",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812327313545,
"lm_q1q2_score": 0.8111354585410767,
"lm_q2_score": 0.8376199694135332,
"openwebmath_perplexity": 511.1752047267459,
"openwebmath_score": 0.2904495894908905,
"tags": null,
"url": "http://www.multiplagp.com.br/gyp1aj/horizontal-line-test-vs-vertical-line-test-7fa0c0"
} |
nuclear-physics, standard-model, group-theory, group-representations, isospin-symmetry
As an explicit example of the use of the symmetry consider the reactions:
\begin{align}
& 1) \quad p p \rightarrow d \pi ^+ \\
& 2) \quad p n \rightarrow d \pi ^0
\end{align}
where $ d $ is deuterium, an isospin singlet, and the pions form an isospin triplet. For the first interaction, the initial isospin state is $ \left| 1/2, 1/2 \right\rangle \otimes \left| 1/2, 1/2 \right\rangle = \left| 1, 1 \right\rangle $. The products have isospin $ \left| 0,0 \right\rangle \otimes \left| 1,1 \right\rangle = \left| 1,1 \right\rangle $. The second interaction has an initial isospin state, $ \frac{1}{\sqrt{2}} \left( \left| 0,0 \right\rangle + \left| 1,0 \right\rangle \right) $, and final isospin, $ \left| 0,0 \right\rangle $. | {
"domain": "physics.stackexchange",
"id": 11642,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, standard-model, group-theory, group-representations, isospin-symmetry",
"url": null
} |
newtonian-mechanics, forces, energy-conservation, potential-energy, spring
Title: Strange factor of 2 in Hooke's Law I was working on a PGRE practice problem:
A brick of mass $m$ falls onto a masses spring with spring constant $k$ from a height $h$ above it. What is the maximum distance the spring will be compressed from its equilibrium length? | {
"domain": "physics.stackexchange",
"id": 61554,
"lm_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, forces, energy-conservation, potential-energy, spring",
"url": null
} |
javascript, typescript, user-interface, vue.js
function handleScrollStart() {
scrolling.value = true;
emit('scrolling', true);
}
function handleScrollStop() {
if (scrollStopTimeout.value) {
clearTimeout(scrollStopTimeout.value);
}
scrollStopTimeout.value = setTimeout(() => {
scrolling.value = false;
emit('scrolling', false);
}, 100);
}
function setScrollStatus(element: HTMLElement | null) {
scrollPreviousOffsetY.value = scrollOffsetY.value;
scrollOffsetY.value = element?.scrollTop || 0;
scrollDelta.value = scrollOffsetY.value - scrollPreviousOffsetY.value;
scrollDirection.value = scrollDelta.value > 0 ? 'down' : 'up';
if (props.calcExtraInfo) {
recordScrollSpeedHistory(scrollDelta.value);
const speedSum = Math.abs(
scrollSpeedHistory.value.reduce(
(accumulator, current) => accumulator + current,
0
)
);
scrollSpeed.value = speedSum / scrollSpeedHistory.value.length;
}
} | {
"domain": "codereview.stackexchange",
"id": 45323,
"lm_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, typescript, user-interface, vue.js",
"url": null
} |
electromagnetism, poynting-vector
\frac{\mu_0}{4\pi}
\iiint_{V_s}
\frac{\vec{J}\left(\vec{r}_s\right)}{\left|\vec{r}-\vec{r}_s\right|^3}
\times \left(\vec{r}-\vec{r}_s\right)
\space dV\left(\vec{r}_s\right)
$$
Now my question is, is it possible to mathematically prove that the following surface integral will always evaluate to zero? If so, what is the proof? (To clarify, $\partial V_s$ is the bounding surface of the volume $V_s$ mentioned earlier)
$$
\frac{1}{\mu_0} \oint_{\partial V_s} \left(\vec{E}\left(\vec{r}\right) \times \vec{B}\left(\vec{r}\right)\right)\cdot d\vec{S}\left(\vec{r}\right)
$$
Motivation: I'm looking for proof that time invariant sources (static charges and constant currents confined to a volume) cannot radiate any energy, and I'm trying to do that without invoking the Hertzian dipole and Fourier analysis.
Thanks...
Update | {
"domain": "physics.stackexchange",
"id": 6450,
"lm_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, poynting-vector",
"url": null
} |
The domain matters. The word "locally" is normally used when talking about a function defined on some open set. As a function on $(0, \infty)$, $\sqrt{x}$ is indeed locally Lipschitz.
This is true for functions on open subsets of $\mathbb{R}^n$ as well; see Every convex function is locally Lipschitz ($\mathbb{R^n}$)
False in infinite-dimensional spaces. Indeed, every linear functional $f:X\to\mathbb{R}$ is a convex function, but $f$ need not be continuous when $X$ is infinite-dimensional. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211553734217,
"lm_q1q2_score": 0.8246425803303351,
"lm_q2_score": 0.8459424334245617,
"openwebmath_perplexity": 140.80065215254342,
"openwebmath_score": 0.9465901255607605,
"tags": null,
"url": "https://math.stackexchange.com/questions/2761230/concavity-implies-locally-lipschitz-continuity"
} |
electromagnetism, electrostatics, electromagnetic-radiation
Why? The electromagnetic field is linear and the radiation introduced by charges in the sphere will have a different phase. Interference of these waves will cause that most of the effects of these waves cancel or randomize and the result can be averaged out into the macroscopic picture, with some of the energy of the rotation transferred into radiated electromagnetic noise.
To conclude, the fact is that the electric field is only influenced by the immediate charge distribution and changes in the magnetic field. The magnetic field on the other hand is influenced only by immediate currents and changes in the electric field. If the immediate distributions of charge and current are static, we will get only static fields. | {
"domain": "physics.stackexchange",
"id": 15787,
"lm_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, electrostatics, electromagnetic-radiation",
"url": null
} |
____________________________________________________________________
P-Space in the Sense of Morita
Morita defined the notion of P-spaces [1] and [2]. Let $\kappa$ be a cardinal number such that $\kappa \ge 1$. Let $\Gamma$ be the set of all finite ordered sequences $(\alpha_1,\alpha_2,\cdots,\alpha_n)$ where $n=1,2,\cdots$ and all $\alpha_i < \kappa$. Let $X$ be a space. The collection $\left\{F_\sigma \subset X: \sigma \in \Gamma \right\}$ is said to be decreasing if this condition holds: $\sigma =(\alpha_1,\alpha_2,\cdots,\alpha_n)$ and $\delta =(\alpha_1,\alpha_2,\cdots,\alpha_n, \cdots, \alpha_m)$ with $n imply that $F_{\delta} \subset F_{\sigma}$. The space $X$ is a P-space if for any cardinal $\kappa \ge 1$ and for any decreasing collection $\left\{F_\sigma \subset X: \sigma \in \Gamma \right\}$ of closed subsets of $X$, there exists open set $U_\sigma$ for each $\sigma \in \Gamma$ such that the following conditions hold: | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517469248845,
"lm_q1q2_score": 0.8293563511751529,
"lm_q2_score": 0.8479677622198946,
"openwebmath_perplexity": 99.66562212800767,
"openwebmath_score": 0.9851532578468323,
"tags": null,
"url": "https://dantopology.wordpress.com/tag/metrizable-spaces/"
} |
Now lets take y = 0
0 = 3x - 6/2
3x = -6 => 6 = 3x so x =2
X*Y = 2*0 = 0
Would this approach be right? Expert comment would be welcome!
Yes Indeed....This approach is correct
Manager
Joined: 23 Oct 2017
Posts: 64
Re: If x and y are integers such that |y + 3| ≤ 3 and 2y – 3x + 6 = 0, [#permalink]
### Show Tags
09 Dec 2017, 08:33
If you visualize |y+3|<=3 on the number line you will get to know that y can take values in the range [-6,0]
Next express the give relation in terms of x i.e. y= (2/3)*(y-3).
and since y is in the range of [-6,0] and not in (0,3) .. x will follow y's sign.
Thus, the product xy has to be >=0.
Minumum being 0 .. check whether one can be 0 .. y=0 falls in the range. min. value of the product =0
Non-Human User
Joined: 09 Sep 2013
Posts: 9889
Re: If x and y are integers such that |y + 3| ≤ 3 and 2y – 3x + 6 = 0, [#permalink]
### Show Tags
20 Jan 2019, 04:37
Hello from the GMAT Club BumpBot! | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8705972684083609,
"lm_q2_score": 0.8705972684083609,
"openwebmath_perplexity": 1847.3903594093272,
"openwebmath_score": 0.7057603597640991,
"tags": null,
"url": "https://gmatclub.com/forum/if-x-and-y-are-integers-such-that-y-3-3-and-2y-3x-198567.html"
} |
experimental-physics, electrons, nuclear-physics, experimental-technique, gamma-rays
Related side question: How difficult was it to get "enriched" $^{57}\text{Fe}$? And, just how well-enriched were the samples?
Facetious side-question: How loud could one hear the rumbling bass notes across the Harvard Campus while Dr. Pound and his student were running the experiment? :) The photons in question were not atomic photons derived from relaxing an excitation of the electronic states of the atom. They were nuclear photons derived relaxing an excited nuclear states. The excited state of Fe-57 is generated by the electron-capture decay of Cobalt-57 | {
"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
} |
python, python-3.x, fractals, turtle-graphics
Aside from that, I just have a few minor remarks:
The parameters are l_system(V, w, P, n) but run_turtle(var, start, rules, iters, …) — why not use consistent notation?
As you said, the l_system() function doesn't really need V. I would prefer to just leave it out altogether.
In various places, you refer to the turtle's heading as terry.heading(), startdir, and angles. I suggest using consistent terminology based on "heading".
update_bounds(bounds) takes a bounds array as an explicit parameter, but takes terry through its scope chain. I'd prefer to see either both variables as explicit parameters, or both via the closure.
Rather than having two separate stacks for positions and angles, I would prefer to see one turtle_state stack that stores (position, heading) tuples.
The epilogue could use a comment, like # Extend the shorter dimension of the window to make it square | {
"domain": "codereview.stackexchange",
"id": 17393,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, fractals, turtle-graphics",
"url": null
} |
to reduce the overfitting of a deep learning neural network model on the training data and improve the performance of the model on new data, such as the holdout test set. Regularization We have now got a fair understanding of what overfitting means when it comes to machine learning modeling. The most common activation regularization is the L1 norm as it encourages sparsity. 5 Training Data Augmentation; 8. Posted on Dec 18, 2013 • lo [2014/11/30: Updated the L1-norm vs L2-norm loss function via a programmatic validated diagram. sum ( param. ''' if l1_ratio ==. Neural Network L2 Regularization Using Python Our data science expert continues his exploration of neural network programming, explaining how regularization addresses the problem of model overfitting, caused by network overtraining. Bottom up feature selection One way to select features is to first find the single feature that gives the highest score and then iteratively add the other features one by one, each time checking how | {
"domain": "danieledivittorio.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407137099623,
"lm_q1q2_score": 0.8172632938308176,
"lm_q2_score": 0.8397339756938818,
"openwebmath_perplexity": 1414.7315024686475,
"openwebmath_score": 0.5768205523490906,
"tags": null,
"url": "http://mibx.danieledivittorio.it/l1-regularization-python-code.html"
} |
quantum-mechanics, mathematical-physics, path-integral, klein-gordon-equation
Title: Diagonalizing/eigenvalues of the infinite dimensional matrix of N harmonic oscillators on a ring I have trying to show that the continuum limit of N quantum harmonic oscillators gives rise the the klein-gordon field. However, instead of a usual finite string, I want to do it on a ring. Hence, my Lagrangian is
$$L=\frac{m}{2}(\dot{q_1}^2+\dot{q_2}^2+.... \dot{q_n}^2)-\frac{m \omega^2}{2}[(q_1-q_2)^2+(q_2^2-q_3^2)+....(q_n-q_1)^2]$$
So that the matrix for V is
$V=\begin{pmatrix} 2 & -1 &0 &. &. &. &-1\\-1&2&-1\\0 &-1 &2 &-1 \\.\\.\\.\\-1 &&.&.&.&-1 & 2
\end{pmatrix}$
So that $L=\frac{m}{2}[\dot{x}^2-\omega^2 x^{T}V{x}]$. All the quantities here are matrices.
How do I find the eigenvalues of this matrix?
I tried to find a recursion relation between the characteristic polynomial of $N$ and $N-1$ dimensional matrix, but I failed. Is this the correct method? What other method is there? | {
"domain": "physics.stackexchange",
"id": 7902,
"lm_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, mathematical-physics, path-integral, klein-gordon-equation",
"url": null
} |
You could use properties of determinants to avoid having to factor a cubic afterwards; for example:
• subtract the last column from the first two;
• add the first two rows to the third:
$$\begin{vmatrix} -1-\lambda & 1 & 1 \\ 1 & -1-\lambda & 1 \\ 1 & 1 & -1-\lambda \\ \end{vmatrix}=\begin{vmatrix} -2-\lambda & 0 & 1 \\ 0 & -2-\lambda & 1 \\ 2+\lambda & 2+\lambda & -1-\lambda \\ \end{vmatrix}=\begin{vmatrix} -2-\lambda & 0 & 1 \\ 0 & -2-\lambda & 1 \\ 0 & 0 & 1-\lambda \\ \end{vmatrix}$$ This is the determinant of a diagonal matrix, so it is the product of the diagonal elements: $$\left( -2-\lambda \right)^2\left( 1-\lambda \right) \color{blue}{ = 0 \iff \lambda = -2 \;\vee\; \;\lambda = 1}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429595026213,
"lm_q1q2_score": 0.8107288243184476,
"lm_q2_score": 0.8244619199068831,
"openwebmath_perplexity": 161.53638040366428,
"openwebmath_score": 0.9893843531608582,
"tags": null,
"url": "https://math.stackexchange.com/questions/2229789/find-the-characteristic-polynomial-p-a-lambda-of-this-matrix"
} |
time-complexity, big-o-notation
It doesn't. Bachmann-Landau notation is simply a handy way to compare the growth-rate of functions. It doesn't say anything about what those functions mean, and we can be pretty sure that Bachmann wasn't thinking about computers when he came up with it in 1894.
What meaning you assign to those functions is up to you. For example, when analyzing comparison-based sorting algorithms, we typically take $n$ to be the number of elements in the collection and $f(n)$ to be the number of comparisons, or the number of swaps, or the number of comparisons and swaps.
Note also that all of this is always relative to a machine model or a cost model. | {
"domain": "cs.stackexchange",
"id": 16769,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "time-complexity, big-o-notation",
"url": null
} |
# Rational Numbers
1. Jul 29, 2008
### powerless
It can easily be shown that the recurring decimal x = 1.123123... is rational, as follows:
$$10^{3}x-x = 1123.123...-1.123123...=1122$$ => $$x = \frac{1122}{999} \in Q$$
Show that the recurring decimals 0.3712437127... and 0.9999999...are rational numbers.
3. The attempt at a solution
I'm not quite sure what the question is asking as I had never seen a question like this before!
Does the question mean what devided by what equals 0.3712437127... and 0.9999999...?
I don't know the method for this & I appreciate some guidance if anyone here knows how to do it.
2. Jul 29, 2008
### Staff: Mentor
Yes, you have to find out fraction that will give given recurring decimal. You are already given a hint - try to understand example you were given. Use exactly the same approach.
Note: I am assuming it is just a typo, but your first number (0.37....) is not a recurring decimal.
Expect surprises with 0.99999...
3. Jul 29, 2008 | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639653084244,
"lm_q1q2_score": 0.80962814418871,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 1891.0938460845716,
"openwebmath_score": 0.7630219459533691,
"tags": null,
"url": "https://www.physicsforums.com/threads/rational-numbers.247396/"
} |
python, python-3.x
A Cluster object contains multiple ClusterNode objects, which in turn
contains multiple NodeCPU objects.
The window layout is: [[<node1 frame>, ..., <nodeN frame>]]
which may be broken up into sublists for multiple rows (NODES_PER_ROW).
A node frame layout is: [[<cpu1 graph>, ..., <cpuN graph>]]
where each CPU graph object is a PySimpleGUI Graph (canvas).
To simulate a real cluster, the load numbers are generated randomly
and vary gradually from interval to interval.
"""
from random import randint
import PySimpleGUI as psg
NODES_PER_CLUSTER = 12
CPUS_PER_NODE = 4
NODES_PER_ROW = 4
graphsize = (30, 100)
colors = ("red", "green", "yellow", "blue")
class NodeCPU:
"""Create an CPU object and define the Graph layout"""
def __init__(self, num):
self.color = colors[num]
self.graph = psg.Graph(graphsize, (0, 0), graphsize)
self._load = 0 | {
"domain": "codereview.stackexchange",
"id": 41195,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x",
"url": null
} |
quantum-mechanics, quantum-entanglement, double-slit-experiment, probability, determinism
My hypothesis is because where the photon lands is up to probability you could only state the probability of the outcomes....I realize that this may be unnecessarily complicated.
The unpredictability of where the photon would land is by itself enough to dispute determinism. You did complicate it.
Your hypothesis is correct but your friend's point is finer: was complete information about the system known?
You should extend you argument by stating: Yes it was: we knew all the properties of the source, the photon the slits and the screen. We also knew where and when the photon is initially. Yet we couldn't predict its trajectory.
In a line, its unpredictability inspite of omniscience.
My attempt here is to show that although trajectories, rates of decay, and other things can be calculated and predicted with a high degree of accuracy,... | {
"domain": "physics.stackexchange",
"id": 66843,
"lm_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-entanglement, double-slit-experiment, probability, determinism",
"url": null
} |
installation, gazebo-7
Title: Issues installing gazebo7
I am running ROS Kinetic on Ubuntu 16.04. As per http://gazebosim.org/tutorials?tut=ros_wrapper_versions I need Gazebo7. I want to install the latest LTS version (which I believe is 7.16.0-1).
The link to the instructions for installing Gazebo on Ubuntu does not work. Try it: http://gazebosim.org/tutorials?cat=install
The installer download link also doesn't work. Go to http://gazebosim.org/tutorials?cat=guided_b&tut=guided_b1 scroll to "installation for Ubuntu" and click on "link to the installer". didn't work for me.
No worries. I'll just download the software and off I go, right? I wish. On this page (http://gazebosim.org/distributions/gazebo/releases/) there are 7 files that are "Gazebo7 ... 7.16.0-1 (docs, dbg, plugin-base, libgazebo7, common, and gazebo7), and every one depends on the other. I tried installing each one over and over in different orders, but I keep getting unmet dependencies. | {
"domain": "robotics.stackexchange",
"id": 4469,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "installation, gazebo-7",
"url": null
} |
field-theory, resource-recommendations, solitons, skyrmion
Title: A primer on topological solitons in scalar field theories As the title suggests I want to learn more about topological solitons in scalar field theories. I am searching for a resource which is self-contained, in the sense that it also explains the mathematics needed, at least to some extent. It should be a text for physicists.
My main goal is to learn about skyrmions, so it would be nice if skyrmions are covered. But this is optional, so if there is a good primer on topological solitons not covering skyrmions this would be fine too.
To be more precise about the "self-containedness" of the source I should maybe give some information about my maths background. I do know linear algebra, calculus and some "group and representation theory" (in the way it is used by physicists, so no in-depth knowledge here). I have very little prior knowledge of topology and almost no formal knowledge about differential geometry (Here also superficial knowledge from physics lectures.). | {
"domain": "physics.stackexchange",
"id": 82314,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "field-theory, resource-recommendations, solitons, skyrmion",
"url": null
} |
python, python-3.x, time-limit-exceeded, numpy, simulation
First of all, that sets our baseline to around \$43 s\$ (to be precise: I actually measured several times and all the results where around that time). Also looking at the results IMHO reveals the following "hot spots":
update_probabilies takes about a quarter of the time (almost \$12 s\$) where \$8 s\$ are spent in the method itself, which leave about \$4 s\$ to be spent in calculate_sum and calculate_probability. That matches the cumtime values for those two methods as measured by the compiler.
pick_strat accounts for another \$14 s\$ of the total time. More than a third of this is spent on numpy.random.multinomial. This is quite a lot of time for picking a (few) random value(s) in such a small range. | {
"domain": "codereview.stackexchange",
"id": 35045,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, time-limit-exceeded, numpy, simulation",
"url": null
} |
ros, ros2, rclcpp, ardent, time
Comment by tfoote on 2020-02-28:
You're correct that only Nodes know about topics. The Clock object is just an object with no communication. It cannot "search for the /clock topic".
The default clock is just a clock object that does not know about any time source. If you attach a TimeSource such as our default one which listens to /clock and reads the use_sim_time parameter it will get updated based on that TimeSource if it's set to use RCL_ROS_TIME If it's a different type the TimeSource won't affect it.
Comment by doisyg on 2021-02-03:
Jumping in. As I understand with this answer that the default clock of a node listens to the /clock topic when use_sim_time is true, when is this clock updated? It seems that it would be frozen when any callback on the node is being served ? Which is a different behavior than when use_sim_time is false (the node clock being system time, it would node be frozen inside a callback) | {
"domain": "robotics.stackexchange",
"id": 30579,
"lm_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, rclcpp, ardent, time",
"url": null
} |
php, html5, classes, php7
<h4>CSS3 example for styling the table</h4>
<pre>
<code>
.table {
width:100%;
display:table;
}
.table-title {
display: table-caption;
text-align: center;
font-size: 20px;
font-weight: bold;
}
.table-header {
display: table-header-group;
background-color: gray;
font-weight: bold;
font-size: 15px;
background-color: #D1D1D1;
}
.table-header-cell {
display: table-cell;
padding:10px;
border-bottom:1px solid black;
font-weight:bold;
text-align:justify;
}
.table-body { display:table-row-group; }
.table-row { display:table-row; }
.table-row-cell {
display:table-cell; | {
"domain": "codereview.stackexchange",
"id": 44654,
"lm_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, html5, classes, php7",
"url": null
} |
javascript, html, css
function hideRows(){
var elements = document.getElementsByClassName('hide');
Array.prototype.forEach.call(elements, function(element){
element.style.display = "none";
});
return true;
}
<!DOCTYPE html>
<html>
<head>
<title>Hide odd rows</title>
<meta charset="UTF-8">
</head>
<body>
<div style="background-color:#8F9779;width:200px;height:30px;">
</div>
<hr style="width:200px" align="left">
<table border="1" >
<tr class="hide" >
<td width="40" height="20">row 1</td>
</tr>
<tr>
<td width="40" height="20">row 2</td>
</tr>
<tr class="hide">
<td width="40" height="20">row 3</td>
</tr>
<tr>
<td width="40" height="20">row 4</td>
</tr>
<tr class="hide">
<td width="40" height="20">row 5</td>
</tr> | {
"domain": "codereview.stackexchange",
"id": 17391,
"lm_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, html, css",
"url": null
} |
optics, speed-of-light, material-science
Title: Can we measure speed of light in a non-transparent material As I think even photons are absorbed by a non-transparent material, they aren't absorbed exactly at the same time. Light does propagate though a (sufficiently thin) opaque material. So can we measure the speed of light in such a material? The speed of light in a medium depends on the frequency of the electromagnetic radiation $$v(\nu) = \frac{c}{n(\nu)}$$ where $n(\nu)$ is the refractive index. In a general case, $n(\nu)$ is a complex number, and its imaginary part accounts for the absorption of the medium (i.e. if a material is not transparent at frequency $\nu$, then $\textrm{Im } n(\nu) \neq 0$).
That being said, I can think of (at least) two ways to experimentally measure the speed of light in a medium at a given frequency. | {
"domain": "physics.stackexchange",
"id": 24145,
"lm_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, speed-of-light, material-science",
"url": null
} |
$\zeta(s)=\prod_p\frac{1}{(1-p^{-s})},$
where again the $p$ runs over the primes. In particular,
$\zeta (2)=\sum_{n=1}^{\infty} n^{-2}=\prod_p\frac{1}{(1-p^{-2})}$
If you write the last quantity as
$\prod_p(1+p^{-2}+p^{-4}+\cdots),$
and expand the product, you will see that it’s greater than
$1+\sum_p p^{-2}.$
Thus, the sum you’re interested in has shown up. Hence,
$\sum_p p^{-2} < \zeta(2) -1.$
Actually, it’s possible to evaluate $\zeta(2)$ precisely, and get $\pi^2/6$. However, for your inequality, it’s not necessary. All you need to know is $\zeta(2) \leq 2.$ Try to show this by bounding the sum for $\zeta(2)$ by an integral. (Recall the idea in the integral test for convergence of a positive series.)
### Student reports, end of August
Because of a rather hectic travel schedule, I was slow in putting up the reports that were submitted assiduously by Zhe and Alex. I apologize.
Zhe’s reports on the book Riemann’s Zeta Function’ by Edwards:
Zhe’s report 4
Zhe’s report 5 | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226294209298,
"lm_q1q2_score": 0.8032973925690862,
"lm_q2_score": 0.8221891370573386,
"openwebmath_perplexity": 711.6062931060246,
"openwebmath_score": 0.6240721940994263,
"tags": null,
"url": "https://minhyongkim.wordpress.com/category/analysis/"
} |
homework-and-exercises, black-holes, astrophysics, event-horizon
The answer to your next point can be found at Density of stars near the center of the Milky Way
The density of stars near the Galactic centre is thousands, heading up to hundreds of thousands per cubic parsec, compared with of order 0.1 per cubic parsec near the Sun. You just take the inverse cube root of this number to work out how close the nearest star will be on average. For the Sun this is $\sim$2 pc, at the Galactic centre it is $\leq 0.02$ pc. We can see about 5000 naked eye stars from Earth. Near the Galactic centre this could be increased by 4-5 orders of magnitude.
The gravitational field will be roughly given by $GM/r^2$ - though this is a Newtonian approximation. At say 10 times the Schwarzschild radius this would work out as about $3\times 10^6$ m/s$^2$. Closer to the black hole then your question would need refinement - you need to think about General Relativity and either the Schwarzschild or Kerr metrics. | {
"domain": "physics.stackexchange",
"id": 28567,
"lm_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, black-holes, astrophysics, event-horizon",
"url": null
} |
regex, bash, http, linux, shell
If the state is equal to INIT then I will exit successfully out of the shell script, otherwise I will keep on trying until the state becomes INIT.
Also, if the state: string is missing in the $DATA variable by any chance, then I want to assign 0 to the state variable. So if state is equal to 0, then I will also exit out of the shell script successfully.
I am hitting the above URL and checking whether I got a successful response or not. If I got a successful response, then I am breaking out (which means server is running fine), but if I didn't got successful response, then I am checking whether my server is running or not on port 8080. If it is not running, then I will start the server. And I am retrying this for a period of 15 times, and after 15 tries if the server hasn't come back up, then exit out of the shell script with a non-zero status code.
Is the below shell script correct?
#!/bin/bash
HOSTNAME=$hostname
DATA=""
RETRY=15
echo $HOSTNAME
sleep 1m
while true; do | {
"domain": "codereview.stackexchange",
"id": 31213,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regex, bash, http, linux, shell",
"url": null
} |
general-relativity, cosmology, space-expansion
In favor of the opposite argument, we could say the ship is rigid therefore its ends are not moving away but the observation is quite clear on this one. So, we have two opinions from one frame and they are contradictive. Which brings the question of which narrative is true? Yet principle of relativity tells us that we don’t have a preferred truth. Now if we say the ship’s ends are not moving away, we can observe them as they do. If we say ship’s ends are moving away, we know it’s not, because locally, cosmological expansion is not strong enough to affect the bonds between atoms so we know it’s not moving away. | {
"domain": "physics.stackexchange",
"id": 77863,
"lm_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, cosmology, space-expansion",
"url": null
} |
quantum-mechanics, bells-inequality
Title: Has Bell really demonstrated that no local hidden variable theory can exist in his original paper of 1964? Why then verify the CHSH violation? The more I read about it and the more I'm convinced I haven't understood what I thought I had.
In the original paper J. S. Bell, On the Einstein Podolsky Rosen paradox, Physics 1, 195, 1964. (link), there is a section (the section IV) where
The Bell inequality $1 + P(\vec{b},\vec{c}) \geq \left |P(\vec{a},\vec{b}) - P(\vec{a},\vec{c}) \right |$ takes form
The fact that $\epsilon$ cannot be made arbitrarily small for all $\vec{a}$ and $\vec{b}$ in the expression $\left |\overline{P}(\vec{a},\vec{b}) + \vec{a}.\vec{b} \right |\leq \epsilon$, which implies that no local hidden variable theory can exist to arbitrarily closely approach the quantum mechanical predictions. | {
"domain": "physics.stackexchange",
"id": 9385,
"lm_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, bells-inequality",
"url": null
} |
organic-chemistry, nomenclature, aromatic-compounds
The corresponding actual wording of the nomenclature rules (taken from Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book)) reads as follows:
P-14.4 NUMBERING
When several structural features appear in cyclic and acyclic compounds, low locants are assigned to them in the following decreasing order of seniority:
(…)
(c) principal characteristic groups and free valences (suffixes);
(…)
(f) detachable alphabetized prefixes, all considered together in a series of increasing numerical order;
(g) lowest locants for the substituent cited first as a prefix in the name;
(…) | {
"domain": "chemistry.stackexchange",
"id": 5795,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, nomenclature, aromatic-compounds",
"url": null
} |
mathematical-physics, waves, differential-geometry, geometry
With that said, from the point of view of studying the wave equation in a medium, the notion of ambient space isotropy is not all that important. So while the interpretation is perfectly valid, it is not something that you necessarily need to keep in mind. When one studies wave propagation in a non-linear medium (keywords: crystal optics, elastic waves), the notion of anisotropy more often refers to the fact that the longitudinal components of a wave and the various polarisations of the traverse components of a wave can have anisotropic propagation behaviour relative to each other. Like Whoplisp wrote in his comments, the general case is governed by a system of equations that cannot be reduced to just the simple scalar wave equation. | {
"domain": "physics.stackexchange",
"id": 1360,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematical-physics, waves, differential-geometry, geometry",
"url": null
} |
special-relativity, speed-of-light, time, time-dilation
Let a light pulse be emitted (event A) from point P, traverse the rod, be reflected off the other mirror and return to its starting point (event B). In the S frame the time between these events is $\Delta t=\frac{2l}c$. In the S' frame events A and B are spatially separated by distance $v\Delta t$, so the sum of the two 'slant distances' travelled by the light is $2\sqrt{l^2+(v\Delta t')^2}$ and the time between the events is $\Delta t'=\frac{2\sqrt{l^2+(v\Delta t')^2}}c$
Eliminating $l$ we get the familiar
$$\Delta t'=\frac{\Delta t}{\sqrt{1-v^2/c^2}}$$
So if 'ticks' are emitted each time the light pulse passes P, the time between ticks is greater in S (in which frame point P is at a succession of different places) than in the S frame, in which P is always in the same place. In both frames the time interval is between the same two events: light leaving P and arriving back at P. | {
"domain": "physics.stackexchange",
"id": 96047,
"lm_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, time-dilation",
"url": null
} |
newtonian-gravity, celestial-mechanics
2) Regarding existence.
for fixed $t$, the potential $\Omega(r)$ issued from gravity + centrifugal force reads
$$\Omega(r) = -\sum_{i=1}^{n} \frac{Gm_i}{|r-r_i|}-\frac{1}{2}|r|^2 \omega^2$$
in a suitable frame rotating with the $n$ bodies with a non zero angular velocity $\omega$.
To prove existence, it is enough to prove that $\Omega$ has a maximum somewhere. Take an arbitrary point $r_a$ different from the $r_i$'s, and let $\Omega_a=\Omega(r_a)$. Let
$$K = \{r; \ \Omega(r) \geq \Omega_a-1 \}.$$ | {
"domain": "physics.stackexchange",
"id": 34990,
"lm_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-gravity, celestial-mechanics",
"url": null
} |
experimental-chemistry
Title: Reaction between copper (II)chloride and aluminium foil When I reacted copper chloride and aluminum foil instead of getting the brown color I got green color. Can anyone share their procedure where the experiment actually succeeded? This is an easy experiment to do at home, so I did it about an hour ago. The first figure shows the starting chemicals and "equipment":
I did not have any copper chloride, so I used copper sulfate pentahydrate, $\ce{ CuSO4.5H2O}$, and $\ce{NaCl}$. (The sodium and sulfate ions are just spectator ions here.)
I added the two chemicals to the $\pu{25 mL}$ of water in the little beaker, stirred until they were fully dissolved, then poured the solution onto the aluminum foil. The second figure shows what happens about every 2 minutes:
The third figure shows what happens around the 10 minute mark: the solution has eaten through the aluminum and the brown copper is evident:
Finally, Fig. 4 shows the result after the solution has leaked away: | {
"domain": "chemistry.stackexchange",
"id": 13289,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-chemistry",
"url": null
} |
Your analysis is correct. There is possibly a typo: $$i$$ should be $$k$$. Moreover, I think it is equality. More precisely, $$\{v_i\}_{i=1}^{k+1} \text{is LI} \, | \, \{v_i\}_{i=1}^{k} \text{is LI}$$ if and only if $$v_{k+1}$$ is not a linear combination of $$v_1,\ldots,v_k$$. The only thing that you need to make sure is that two different linear combinations of $$\{v_i\}_{i=1}^{k}$$ give rise to two different vectors, which would be true since $$\{v_i\}_{i=1}^{k}$$ is LI. Thus $$\Pr[\{v_i\}_{i=1}^{k+1} \text{is LI} \, | \, \{v_i\}_{i=1}^{k} \text{is LI}] = \frac{q^n-q^k}{q^n}$$.
If it is not a field (that is $$q$$ is composite) then the equality may not hold as two different linear combinations can give you the same vector. To see this take $$q=6$$, then $$v_1=(1,0,0,0,0,0)', v_2=(5,2,0,0,0,0)$$, note that here $$v_1+v_2 = 4v_1+4v_2=(0,2,0,0,0,0)$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127426927789,
"lm_q1q2_score": 0.8360556961344322,
"lm_q2_score": 0.8459424431344437,
"openwebmath_perplexity": 86.07359822243491,
"openwebmath_score": 0.9280997514724731,
"tags": null,
"url": "https://math.stackexchange.com/questions/4051479/probability-of-sampling-linearly-independent-vectors"
} |
general-relativity, mass, vacuum
$$
Q[{\xi _i}] = \int {{d^3}\vec y\sqrt h {{\hat n}_\mu }\xi _\nu ^{(i)}\left( {2{T^{\mu \nu }} - {g^{\mu \nu }}T} \right)},
$$
which is the volume-integral formulation that you mentioned. But, there is a singularity at $r=0$ which renders the both integrals difficult to evaluate. Clearly, this is ill-defined for the Schwarzschild metric at $r=0$, so one cannot calculate the volume integral. In addition, outside of the singularity we have $R=T=0$. This is a common question and, despite of several proposals in order to resolve this problem (see Carroll, pages 248-254), we don't know quite how to deal with it in a complete, satisfactory way. But, we can still convert the volume integral to a surface integral without singularity using the Stokes' theorem, yielding
$$
Q[{\xi _i}] = \frac{1}{{4\pi G}}\int {{d^2}\vec y\sqrt h {{\hat n}_\mu }{{\hat u}_\nu }{\nabla ^\mu }\xi _{(i)}^\nu }.
$$ | {
"domain": "physics.stackexchange",
"id": 78394,
"lm_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, mass, vacuum",
"url": null
} |
Processes References. bbox_utils). Helper functions for working with bounding boxes (augmentations. We denote the Gaussian function with standard deviation σ by the symbol Gσ so we would say that Pxn(x) = Gσ(x). 3 Periodicity 237 4. Prolog Experiments in Discrete Mathematics, Logic, and Computability — James L. Discrete time and frequency representations are related by the discrete Fourier transform (DFT) pair. The Discrete-Time Fourier Transform. There are two aspects to this. The transform of a Gaussian function of sigma=d in an image size NxN is a Gaussian function. A Gaussian low pass filter introduces no ringing when applied either in the spatial or frequency domains. The interval at which the DTFT is sampled is the reciprocal of the duration of the input sequence. w(x) = h(x)g(x) w is a windowed harmonic, where h is a harmonic function (sin or cos of some frequency) and g is a Gaussian. (2020) Fast discrete convolution in ℝ2$\mathbb {R}^{2}$ with radial kernels using non-uniform | {
"domain": "programex.pl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9902915232319999,
"lm_q1q2_score": 0.8252342807886346,
"lm_q2_score": 0.8333245932423309,
"openwebmath_perplexity": 676.1897974223843,
"openwebmath_score": 0.7972910404205322,
"tags": null,
"url": "http://jrat.programex.pl/discrete-fourier-transform-of-gaussian.html"
} |
So lim_{x->1}f(x) does *not* exist.
If you take a function like
f(x)= x for x< 0, f(x)=1/x for x> 0,
then lim_{x->0-}f(x) exists, but {x->0+}f(x) does not. A fortiori, {x->0}f(x) does not exist.
If you define f(x)=1/x for all non-zero x, then neither the left nor right limit exists at 0. (They both exist and are equal at all other points, however.)
Note that in the preceding paragraphs, I’m being quite informal in describing the definitions using the phrase close to.’ It’s important to acquire the ability to move freely between such casual descriptions that make meanings transparent, and the precise notions using epsilons and deltas.
MK
### A comment on the previous post | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226294209298,
"lm_q1q2_score": 0.8032973925690862,
"lm_q2_score": 0.8221891370573386,
"openwebmath_perplexity": 711.6062931060246,
"openwebmath_score": 0.6240721940994263,
"tags": null,
"url": "https://minhyongkim.wordpress.com/category/analysis/"
} |
javascript, jquery, plugin
Now you don't have to deal with any pesky DOM tree traversal, which carries a risk of finding the wrong element.
A couple other notes:
When you're specifying css attrs with jquery, height:
someNumberVariable works just fine. You don't need to wrap it with
'' + someNumberVar + 'px'
Why not set the duration as an optional param?
It would be nice to have a $('#myEl').jsFlip('flip') method. Adding methods like this will add some complexity to your code, but the good news is there are some good plugin patterns out there that you can work off of. IMO, this is the prettiest one I've seen.
Once you've figured out how to add methods to your plugin, it's fairly simple (and best practice) to add a 'destroy' method, that would unbind all of your event handlers. To do this, you need to namespace your events. | {
"domain": "codereview.stackexchange",
"id": 1770,
"lm_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, jquery, plugin",
"url": null
} |
with Turing machines. Thus, as per Rice’s theorem the language describing any nontrivial property of Turing machine is not recursive. At any given step, the write head is over some square on the tape. Turing Machine Building Blocks • Building Block - Build a Turing machine with a specific purpose - Name it and save it - Use it as a BlackBox in another Turing machine • Special Symbols ~ ignore read or write !x matches all symbols except for x. Turing Machine Building Blocks • Building Block – Build a Turing machine with a specific purpose – Name it and save it – Use it as a BlackBox in another Turing machine • Special Symbols ~ ignore read or write !x matches all symbols except for x. Turing Machine of equal a’s and b’s: Suppose we want to design a Turing Machine for the language of a n b n where a=b. Yes, because if P=NP, "yes". Let N = (Q,Σ,Γ,∆,q0,qa,qr) and let d be the smallest integer such that for each (q,σ) there is at most d choices for N. Turing (1912--1954) in 1936 whose | {
"domain": "lotoblu.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214552744682,
"lm_q1q2_score": 0.8014890674019536,
"lm_q2_score": 0.8311430415844385,
"openwebmath_perplexity": 786.5102890888312,
"openwebmath_score": 0.5172455310821533,
"tags": null,
"url": "http://lotoblu.it/ndgz/turing-machine-example.html"
} |
fft, frequency-spectrum
So, in case the previous sentence is right, I shouldn't take all the 512 spectrum values, but only the first ones. So if my samples are at 44100Hz, and I have a spectrum with 512 values, each one should cover a range of (approximately) 86Hz. Is that correct? In that case, I should only analyse the first 47 array values and safely ignore the rest, I guess.
As explained, the previous sentence is not right.
In addition, a sample rate of 44100Hz can contain frequencies up to 22050Hz (aka the Nyquist frequency = half the sample rate). I'm not sure what KissFFT gives you back, most FFTs will give you a mirrored result, of which you take the first half, and you work out what x-value corresponds to what frequency by calculating the frequency gap. I hope that you get how this is done from this code (alternatively look at the code here):
[ iSamples, iSamplingRate, iBitDepth ] = wavread( '100Hz16b.wav' ); | {
"domain": "dsp.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": "fft, frequency-spectrum",
"url": null
} |
counting-complexity, sample-complexity
Title: Almost uniform sampling implies approximate counting I began studying papers about approximate counting and I keep seeing the above being quoted, without further explanation. I suppose the procedure that yields the result is very well known and that is why. Can anyone give me roughly the idea if possible and secondly some references about it? Given a set $A \subseteq B$, if you can sample uniformly from $B$, then you can estimate by repeated sampling the probability of the event that the sample is in $A$. That is, you can approximate the probability $|A| / |B|$, which is indeed close to enumerating the elements of $A$, and thus computing its size. | {
"domain": "cstheory.stackexchange",
"id": 3126,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "counting-complexity, sample-complexity",
"url": null
} |
electric-current, wave-particle-duality, photoelectric-effect
In a lecture I saw on the MIT open courseware site, the professor said current is directly proportional to intensity, but did not mention anything about frequency. In other papers/lectures of different universities, I saw only the current dependency with intensity and not frequency anywhere (an MIT "photoelectric effect notes" pdf said the number of photoelectrons ejected is strictly dependent only on intensity). | {
"domain": "physics.stackexchange",
"id": 97880,
"lm_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-current, wave-particle-duality, photoelectric-effect",
"url": null
} |
python, performance
look like an embedded "... and the ...".
Use
str.translate()
to rapidly turn punctuation into SPACE characters.
Given that the example corpus always separates sentences
with . period + SPACE, it might possibly make more sense to delete periods,
mapping e.g. "U.K" --> "uk"
The words are now space-delimited, so it's straightforward
to updeliver them, filtering out undesired words like
chapter:verse annotations.
The only other value-add spacy was offering at this point
was normalizing possessives, e.g. "brother's" --> "brother".
The English language certainly has its irregularities,
but fortunately the rule for stripping possessives is trivially implemented.
And then we're done!
proper nouns
If identifying person and place names is important to your use case,
you might scan the text for capitalized names that don't start a sentence:
"word Name".
Then re-scan, and carefully preserve such capitalized words,
even when they begin a sentence. | {
"domain": "codereview.stackexchange",
"id": 45359,
"lm_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",
"url": null
} |
radiation, voltage, electronics, photoelectric-effect, nuclear-engineering
Title: What happens if a PMT (photmultiplier tube) is run below its operating voltage? I have this Hamamatsu PMT that says its operating voltage is 1500 V. However, it has serious electronic/background noise at LLD=0 at that operating voltage. If I lower it down to about 1.02 KV, noise is supressed by much. My question is, is it always necessary to run a PMT at its operating voltage? What happens when one runs it at a significantly lower bias, like 1000 V or 700 V? I feel like I swamp my detector a lot less using a lower voltage, but I'm not sure that it's correct to run a PMT at any voltage but its operating one. If you can still see your signal, by all means use the lowest V that gives enough gain - but the gain is very sensitive to supply V
The photocurrent multiplication factor is a high power of the Volts applied to the tube
This also makes power supply noise an important consideration
https://www.hamamatsu.com/resources/pdf/etd/PMT_handbook_v3aE.pdf
tldr: | {
"domain": "physics.stackexchange",
"id": 41801,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "radiation, voltage, electronics, photoelectric-effect, nuclear-engineering",
"url": null
} |
botany, ecology, statistics
Firstly, I believe that a mixed model should be used, with individual plant as a random effect, to account for the fact that I am repeatedly measuring the same plant over time.
On top of that, am I not also in danger of pseudo-replication from the fact that my rainfall has only been measured once for all 10 abscisic acid measurements (i.e. the abscisic acid vs rainfall measurements are not really independent on each day either)? Observations are assumed to be independent, not predictors. For example, if you were doing some chemical fertilizer treatment, you'd probably not apply a random chemical or random dose of chemical to each plant, you'd most often choose a small number of doses, and have far fewer values of the predictor than you have observations. | {
"domain": "biology.stackexchange",
"id": 12368,
"lm_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, ecology, statistics",
"url": null
} |
cc.complexity-theory, computability, computable-analysis
The explanation is usually along the lines that we take a weakest workable representation. Let me first explain what weakest means here: weakest means that any other workable representation can be computably converted to this representation. It seems a reasonable condition. However "workable" is bit vague and complicated here, for Turing machines one normally means something like the representation satisfies SMN and UTM theorems, however articulating why is not easy (at least it is not for me).
For computability on finite objects the problem is not big (and therefor the issue is completely avoided usually in introduction to computability and complexity): someone who is not familiar with these issues will normally use a representation which satisfies these conditions and is equivalent to other reasonable representations of the objects. | {
"domain": "cstheory.stackexchange",
"id": 1914,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, computability, computable-analysis",
"url": null
} |
homework-and-exercises, newtonian-mechanics, orbital-motion
Some help? You're trying all of the right things, but the problem is actually much simpler---you just need to use better relations for this problem. In particular, think about kepler's law of orbital periods; and some of the general ellipse equations, like:
$r(\theta) = \frac{ a \, (1 \, - \,e^2) }{1 \, - \, e \cos \theta}$
(which is the equation you have, just expressed a little differently), and
$e = \frac{ r_{max} \, - \, r_{min} }{r_{max} \, + \, r_{min}} = \frac{r_{max} \, - \, r_{min} }{2a}$
Here, $a$ is the 'semi-major axis', $e$ the eccentricity, $\theta$ the angle of the orbit, and $r_{max}$ and $r_{min}$ are the maximum and minimum separations respectively (also referred to as 'apocenter' and 'pericenter').
Does that help? | {
"domain": "physics.stackexchange",
"id": 6202,
"lm_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, orbital-motion",
"url": null
} |
optics, energy, energy-conservation, geometric-optics
So, even if the surfaces of the medium are given perfect antireflection coatings, energy is still conserved. | {
"domain": "physics.stackexchange",
"id": 47431,
"lm_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, energy, energy-conservation, geometric-optics",
"url": null
} |
statics, structural-beam
Title: Using preload to resist bending moment on an unfixed cantilever beam I have a cantilever beam that is resting against a wall (not fixed) and will not slide (strictly looking at bending moments). The beam of length = $0.3 \;\text{m}$ is under a distributed load of $4000 \;\text{N}$ and a preload is applied to the free end of the beam to hold the beam. The cross-section is an annulus with outer diameter $60 \;\text{mm}$ and inner diameter $30 \;\text{mm}$. | {
"domain": "physics.stackexchange",
"id": 70630,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statics, structural-beam",
"url": null
} |
homework-and-exercises, magnetic-fields, maxwell-equations, plasma-physics, magnetic-moment
Any help here would be appreciated. I am just having a hard time contextualizing these principles for a magnetic bottle. I suspect you know that the total energy doesn't change; the kinetic energy due to the velocity perpendicular to the axis of the magnetic bottle, $1/2 m v_\perp^2$ increases at the expense of the remaining kinetic energy term $1/2 m v_{||}^2$. As the particle moves into a region of higher magnetic field, the latter term ideally drops to zero, at which point the particle stops moving along the bottle axis, and starts changing direction. So energy is conserved over all.
That all sounds good from an energy-conservation perspective, but you ask the excellent question about how to make sense of this via Faraday's Law. Indeed, the energy doesn't just swap from $1/2 m v_{||}^2$ to $1/2 m v_\perp^2$ for no reason; there's a physical mechanism. And the reason that $v_\perp^2$ increases in the first place is consistent with an induced emf from Faraday's Law. | {
"domain": "physics.stackexchange",
"id": 97102,
"lm_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, magnetic-fields, maxwell-equations, plasma-physics, magnetic-moment",
"url": null
} |
# If $\sum u_n$ be a divergent series of positive reals, then $\sum \frac{u_n}{1+u_n}$ diverges also
Although this question has been posted here many times, I am posting it again in order to get my proof verified.
Firstly, we break up the index set of $$(u_n)_n$$ into a partition of two sets $$A$$ and $$B$$ such that:
$$A= \{n\in \mathbb{N}:u_n<1\}$$ and $$B=\{n\in \mathbb{N}: u_n \ge 1 \}$$.
Now, $$u_n<1 \implies u_n +1<2 \implies \displaystyle\frac{u_n}{2}<\frac{u_n}{1+u_n}$$. Taking summation over $$A \ \$$,
$$\frac{1}{2}\displaystyle\sum_{n \in A}u_n < \sum_{n \in A} \frac{u_n}{1+u_n} ...(1)$$
Again, $$u_n \geq 1 \implies 2u_n\geq1+ u_n \implies \displaystyle\frac{u_n}{1+u_n} \ge \frac{1}{2}$$
The sum over $$B$$ becomes $$\frac{1}{2}\displaystyle |B| \le \sum_{n \in B} \frac{u_n}{1+u_n} ...(2)$$ [$$|B|$$ denotes the number of elements in $$B$$].
Since $$A$$ and $$B$$ form a partition of $$\mathbb{N}$$, then either of them (or both) must be an infinite set. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8134502103114976,
"lm_q2_score": 0.8311430478583169,
"openwebmath_perplexity": 327.6032859206001,
"openwebmath_score": 0.9609841108322144,
"tags": null,
"url": "https://math.stackexchange.com/questions/3213049/if-sum-u-n-be-a-divergent-series-of-positive-reals-then-sum-fracu-n1u"
} |
I agree with SmileyCraft. In finite dimensional vector spaces, bilinear transformations, as linear transformations, can be written in terms of the values that they adopt in a given base:$$\left \langle x,y \right \rangle=\sum_{i,j=1}^{n}x_iy_j\left \langle e_i,e_j \right \rangle.$$ I believe you can arrive in this representation without difficult, proving then you suspicion.
It is well known (and easy to prove) that any two finite dimensional inner product spaces are isometrically isomorphic. Hence $$\langle x, y \rangle'$$ is an inner product on $$\mathbb R^{n}$$ iff there is a vector space isomorphism $$T: \mathbb R^{n} \to \mathbb R^{n}$$ such that $$\langle x, y \rangle' =\langle Tx, Ty \rangle$$ for all $$x,y$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806472775277,
"lm_q1q2_score": 0.8466250934216157,
"lm_q2_score": 0.863391599428538,
"openwebmath_perplexity": 127.58739888435736,
"openwebmath_score": 0.9553616046905518,
"tags": null,
"url": "https://math.stackexchange.com/questions/3141609/other-inner-products-for-mathbbrn"
} |
c++, c++14, logging, template-meta-programming
void cnd::LogStream_Generic::Output(const std::string &msg)
{
if (!stream_)
return;
fprintf(stream_, "%s", msg.c_str());
fflush(stream_);
}
template <cnd::LogLevel L>
void cnd::WriteLog_Generic(const std::string& msg)
{
constexpr unsigned int current_level
= LogEntry<LogStream_Generic>::LogLevelToEnumIndex<L>();
constexpr unsigned int max_level
= LogEntry<LogStream_Generic>::LogLevelToEnumIndex<LogEntry<LogStream_Generic>::GetReportingLevel()>();
constexpr bool condition = current_level <= max_level;
staticIf<condition>([&](auto f){ // compile time
LogEntry<LogStream_Generic>().GetMessageStream<L>() << msg;
});
}
template <cnd::LogLevel level>
void cnd::WriteLog(const std::string& msg) { WriteLog_Generic<level>(msg); }
main.cpp (example)
#define CIANADE_MAX_LOGLEVEL cnd::LogLevel::DEBUG
#include <Cianade/System/Log.h> | {
"domain": "codereview.stackexchange",
"id": 23573,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++14, logging, template-meta-programming",
"url": null
} |
For any prime $$p$$ and integer $$k\geq 1$$, there is, up to isomorphism, exactly one field of order $$p^k$$.
In the case of $$2^2$$ elements, one usually denotes the elements as $$0,1,x,x+1$$ (or something similar), with addition done modulo $$2$$. The multiplication table looks like this: $$\begin{array}{|c|cccc|}\hline &0&1&x&x+1\\\hline 0&0&0&0\\1&0&1&x&x+1\\ x&0&x&x+1&1\\ x+1&0&x+1&1&x\\\hline\end{array}$$ In general, you can find a multiplication table the following way: Start with $$\Bbb Z_p$$, the integers modulo $$p$$ (also known as the field with $$p$$ elements), and an irreducible polynomial $$f$$ of degree $$k$$ with coefficients in $$\Bbb Z_p$$. Then take the polynomial ring $$\Bbb Z_p[x]$$, and divide out by the ideal generated by $$f$$. Any element of our $$p^k$$-element field will correspond to a polynomial of degree less than $$k$$, with addition as normal. Multiplication is defined by reducing modulo $$f$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9873750514614409,
"lm_q1q2_score": 0.8450460648346914,
"lm_q2_score": 0.8558511414521923,
"openwebmath_perplexity": 100.66577024386768,
"openwebmath_score": 0.9640396237373352,
"tags": null,
"url": "https://math.stackexchange.com/questions/3395244/can-a-finite-set-with-a-non-prime-number-of-elements-be-a-field/3395256#3395256"
} |
quantum-mechanics, atomic-physics, pauli-exclusion-principle
An attempt at the final formulation of my question: If the set of possible states of electrons in a given shell of an atom is indeed infinite, how does one use the Pauli Exclusion Principle (and: what is its precise statement for more than two particles) to derive that only a limited number of electrons can be in this shell at a time? "Really, the set of solutions to the angular equation should be closed under rotation, since the equation itself is also rotationally symmetric." this not correct. Solutions should transform as a representation of the rotation group. They need to be covariant not necessarily invariant. Only a full shell is invariant.
" there ought to be infinitely many possible states for an electron in a given shell, due to the continuous rotational symmetry" there are indeed infinitely many, but only $2(2{\cal l} +1)$ are linearly independent. You are free to choose which ones by choosing the so called quantization axis. | {
"domain": "physics.stackexchange",
"id": 55115,
"lm_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, atomic-physics, pauli-exclusion-principle",
"url": null
} |
c++, bitwise
Will it faster, I doubt.
By the way, your code for x = 0 will yield -1, which is not same as your description. if you do not need x = 0 input, then you can remove the if statement as
std::uint64_t get_index(std::uint64_t x)
{
return (x-1u)>> 6; // for this, x must be not 0u.
} | {
"domain": "codereview.stackexchange",
"id": 28602,
"lm_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++, bitwise",
"url": null
} |
c++, linked-list, template, collections, classes
constexpr __T first(){
assert(head != NULL && "Calling .front() on an empty list");
return head->data;
}
constexpr __T last(){
assert(tail != NULL && "Calling. last() on an empty list");
return tail->data;
}
constexpr c_size size(){return m_S;}
void remove_all(){
current = head;
while(current->next != NULL){
current = current->next;
delete current;
}
head = NULL;
tail = NULL;
current = NULL;
}
}; | {
"domain": "codereview.stackexchange",
"id": 39505,
"lm_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++, linked-list, template, collections, classes",
"url": null
} |
gravity, particle-detectors
There is no proposal pending for studying gravitational differences between hydrogen and antihydrogen. From their web page:
Eventually, we will use this technique to compare the structure of antihydrogen and hydrogen atoms, to search for difference between matter and antimatter, but In this first experiment, we do not yet have enough precision to test these fundamental symmetries. This is important, as the Universe has shown a preference for matter over antimatter as it has evolved, but so far, no measurements can explain why this came about. If matter and antimatter were truely identical, the Universe as we know it could not have come about. The next step at ALPHA is to construct an apparatus that will allow us to make these more precise measurements, using both microwave radiation, and laser light. | {
"domain": "physics.stackexchange",
"id": 5736,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, particle-detectors",
"url": null
} |
temperature, sun, light, equator, insolation
Notice the object above gets 2 units of light to illuminate its entire surface, whereas the object below gets 5 units of light for its surface.
Looked at another way, the object above has to spread 2 units of light across its entire surface, where the object below gets that same amount of light concentrated on only a smaller part of it.
Now back to Earth
We see the same thing happen. Notice in the below picture that I have labeled the diameter of the area covered by my arbitrary unit of light. The distance is literally measured in image pixels. Near the equator, 1 unit of light illuminates 27 pixels, but closer to the pole the same amount of light needs to be spread out over 61 pixels of Earth's surface, so it's illuminated less. | {
"domain": "earthscience.stackexchange",
"id": 1214,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "temperature, sun, light, equator, insolation",
"url": null
} |
nomenclature, aromatic-compounds, isomers
and
The letters o, m, and p have been used in place of ortho, meta, and para, respectively, to designate the 1,2-, 1,3-, and 1,4- isomers of disubstituted benzene. This usage is strongly discouraged and is not used in preferred IUPAC names.
The preferred IUPAC name for the compound that is given in the question is 1-chloro-2-methylbenzene.
The name 2-chlorotoluene may be used in general nomenclature. | {
"domain": "chemistry.stackexchange",
"id": 10266,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nomenclature, aromatic-compounds, isomers",
"url": null
} |
c++, c++14, template-meta-programming, variadic
Your definition for sequence is pretty confusing. Your code could benefit from some unit tests. Compile-time unit tests are easy:
static_assert(std::is_same<create_int_seq<0>, int_seq<1>>::value, "");
static_assert(std::is_same<create_int_seq<1>, int_seq<1,2>>::value, "");
static_assert(std::is_same<create_int_seq<2>, int_seq<1,2,4>>::value, "");
static_assert(std::is_same<create_int_seq<3>, int_seq<1,2,4,8>>::value, "");
static_assert(std::is_same<create_int_seq<4>, int_seq<1,2,4,8,16>>::value, "");
As a bonus, these five lines serve as excellent documentation about what this code does... to the extent that I no longer mind the lack of code comments explaining how it might work.
FWIW, if I wanted to make these test cases pass, I'd implement create_int_seq like this:
template<class> struct powers_of_two;
template<size_t... Is>
struct powers_of_two<std::index_sequence<Is...>> {
using type = int_seq<(size_t(1) << Is)...>;
}; | {
"domain": "codereview.stackexchange",
"id": 39004,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++14, template-meta-programming, variadic",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.