text
stringlengths
1
1.11k
source
dict
I am not a statistician, but I am quite sure that the quantile function for the log-normal distribution is well-defined because it is the inverse of the cumulative distribution function, which is strictly increasing. For all continuous distributions, the ICDF exists and is unique if 0 < p < 1. (source) There is a software library (distributions-lognormal-quantile) I have used in some applications to evaluate that function, and I believe it uses this equation: This function is also available in Microsoft Excel as LOGNORM.INV. • I implemented that formula and it compares well with the results from R. Strange that the formula doesn't appear on the Wikipedia page for the Log-normal distribution. – Matthew Walker Nov 27 '18 at 6:52 Here is the proof. Take $$\log X \sim \mathcal{N}(\mu, \sigma)$$. Then $$X$$ is log-normally distributed with CDF: $$F(x) = \frac{1}{2}\left(1 + erf \left(\frac{\log x - \mu}{\sigma \sqrt{2}} \right) \right)$$ we can now solve:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992914310605, "lm_q1q2_score": 0.8001737535000902, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 730.6245551982003, "openwebmath_score": 0.9917787313461304, "tags": null, "url": "https://stats.stackexchange.com/questions/159460/can-quantiles-be-calculated-for-lognormal-distributions" }
ros-melodic Title: About the Point Cloud Coordinate System Issued by the RGB-D Camera I found a strange problem when I used the turbobot3 simulation.Why The point cloud direction published by camera_rgb_optical_frame is upward. Originally posted by wugeshenhuaking on ROS Answers with karma: 35 on 2022-10-16 Post score: 0 There are established conventions for the frame's x, y and z-axis for a camera image. Please read this page: https://www.ros.org/reps/rep-0103.html If you are in a hurry, search for _optical. Originally posted by Mike Scheutzow with karma: 4903 on 2022-10-16 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 38049, "lm_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-melodic", "url": null }
double-slit-experiment, diffraction Title: Why is the Fraunhoffer Pattern the Fourier transform of the slit? Why is it that the fourier tranform of the slit (with value 1 where it's open?) gives the fraunhoffer diffraction pattern? Why are these two paired? The most basic way of showing this is through studying unidirectionally propagating solutions of the Helmholtz equation (we assume our light is monochromatic). In this case the six Cartesian electromagnetic field components as well as all components of the potential four vector (Lorenz gauge is implicitly assumed) all fulfill Helmholtz's equation. In a homogeneous medium i.e. between the diffracting screen and the image screen, the eigenmodes of the Helmholtz equation are plane waves of the form $\psi = \exp(i(k_x,\,x+k_y,\,y+k_z,\,z))$ with $k_x^2 + k_y^2 + k_z^2 = k^2 = \omega^2/c^2$. These solutions propagate from one transverse $(x,\,y)$ plane to another by being scaled by the phase factor $e^{i\,k_z\,z}$. This is what I mean by "eigenfunction".
{ "domain": "physics.stackexchange", "id": 11449, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "double-slit-experiment, diffraction", "url": null }
f(x) = (1-2x)^2 / {(1-x)^2 + x^2} Thanks, Mike. You are right, I did't think to the Jensen's inequality, thus my solution is unnecessarily complicayted; but it was a first attempt... Can I suggest you of writing down the simpler solution? Claudio 9 months ago With the assumption a+b+c = 1 we have to prove that f(a) +f(b)+f(c) larger or equal to 3/5 with f(x) defined as above. f(x) is convex on the segment [ (3-sqt(3))/6 , (3+sqrt(3))/6] because its second derivative is non negative. So if a,b and c are in this segment we can use Jensen's theorem which gives: f(a)+f(b)+f(c) larger or equal than 3f( (a+b+c)/3)=3f(1/3)=3/5. Now suppose WLOG that a is larger than (3+sdrt(3))/6 then b+c is smaller than 1- (3+sqrt(3))/6 which is precisely the other bound (3- sqrt(3))/6; We therfore conclude that if a is outside the convex region, then b and c are also outside the convex region.But f(x) is larger than 1/2 outside this segment ,hence f(a) +f(b)+f(c) is larger than 3/2 in that case
{ "domain": "purdue.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765628041176, "lm_q1q2_score": 0.8368144827505768, "lm_q2_score": 0.8539127510928476, "openwebmath_perplexity": 466.4385592139156, "openwebmath_score": 0.8941670060157776, "tags": null, "url": "https://www.math.purdue.edu/pow/discussion/2018/spring/59" }
java Charset.forName("UTF-8") This is most conveniently replaced with: StandardCharsets.UTF_8 which avoids some lookup overhead. But you can directly use Files.newBufferedReader(configFile.toPath()) in your durationFromConfigInner function findFirst vs. findLast You look for the config value the first time it is specified, but, standard java properties files, and other config systems, typically rely on the last occasion a value is set. Make sure your code is consistent with expectations This will likely not matter for you, but it may. listFiles() You have: Arrays.stream(directory.listFiles()).forEach(fileConsumer);
{ "domain": "codereview.stackexchange", "id": 6562, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java", "url": null }
ros-kinetic, transform It would be good to see a more complete block of code so we could see how transformToGlobal is being called. Hope this helps. Thanks for the update: I'm afraid that this is not how the TF system is meant to be used. You're broadcasting two static transforms and looking up a TF every time the transformToGlobal method is being called. This will be very slow at best and not work at all at worst. I would recommend using two static transform publisher nodes to setup the two transformations you're creating in the transformToGlobal method. These transforms should define the location of your depth sensor of the drone. This way you'll only need to lookup a single transform inside this node. Also you're transformToGlobal method should return the transform itself, so that the same transform can be used to transform all the points. This means you only need to do the lookup once, not again for each new point. Hope this makes sense. Update:
{ "domain": "robotics.stackexchange", "id": 33039, "lm_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-kinetic, transform", "url": null }
math... Variables are related in a matrix that I specify DxD ) covariance matrices will have D * ( )... Have variance one and are independently distributed high scores on the MATLAB ® cov function N-dimensional! Cov function ( 1 ) ) for a longitudinal mixed-model simulation square root '' the. Display the scores on math go up, scores on math, English, and draw MVN samples them. To turn raw data into a Gaussian random vectors series, cov ( x ) returns the variance each... The multivariate normal distribution, we need to generate covariance matrix the data set and in result the covariance between and. Noises that are statistically dependent much two random variables gets change together models. A significance only with a set of vectors whose generate random covariance (. Of uniform random numbers have variance one and are independently distributed Gaussian random vectors data represented in matrix.! Graduate student ) scores are more variable than English test scores are more variable
{ "domain": "kpi.ua", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9465966702001758, "lm_q1q2_score": 0.8007662961755292, "lm_q2_score": 0.845942439250491, "openwebmath_perplexity": 630.5306069118313, "openwebmath_score": 0.5929288864135742, "tags": null, "url": "http://cad.kpi.ua/bhu9qiz3/2c6df3-generate-covariance-matrix" }
slam, imu Always. You should never have a sensing platform/robot without an IMU. More generally, how do you handle the horrible accumulation of error making the item essentially useless for localization? You always have to pair it with a sensor that is more accurate in the long term. LIDAR,GPS, Cameras, are all viable options. The IMU is there to estimate the pose in the short time between these other measurements. Also if your motion model is good for something like a car then you can also get some really good estimates. Take a look at https://github.com/mbrossar/ai-imu-dr. The results with purely an IMU is on par with several state of the art SLAM methods.
{ "domain": "robotics.stackexchange", "id": 2513, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, imu", "url": null }
Time: 2 minutes. Complex functions tutorial. Modulus of a Complex Number The distance between a complex number and the origin on the complex plane. modulus, Kasus Ablativ, also: ‚(gemessen) mit dem (kleinen) Maß (des …)‘; siehe auch wikt:modulo) und kürzt sie meistens mit mod ab. 15.2.2 Modulus of Elasticity in Flexural Stress The test piece is supported at either end and load (in a form of weights) is applied in the middle between the supports . Incrementing. For instance, 9 divided by 4 equals 2 but it remains 1. This gives us a general formula for the modulus of a complex number, a + bi. Compute 23 modulo 5. b = mod(23,5) b = 3 Remainder After Division of Vector . Example. The modulus of z is the length of the line OQ which we can find using Pythagoras’ theorem. % is called the modulo operation. 3 2-1 2-1 mod 5 2 4 1 (mod 5) Bei Berechnungen modulo n bedeutet die Schreibweise a - x also nicht , dass - x das modulo n additiv inverse Element von x ist, also n - x , sondern - x ist das
{ "domain": "hypecinc.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226280828406, "lm_q1q2_score": 0.8098919771548937, "lm_q2_score": 0.8289388125473629, "openwebmath_perplexity": 3574.862107216687, "openwebmath_score": 0.7433726787567139, "tags": null, "url": "http://www.hypecinc.com/alison-jaggar-dktb/modulus-of-2i-a06a9f" }
auroras Title: Can an aurora australis be bright enough to illuminate someone's face? If two people are standing next to each other during a polar night, and the brightest possible aurora is occurring overhead, could one person see the other person's face clearly? If your eyes are fully adapted to the darkness you will be able to see a persons face in the light from the auroras. By fully adapted to darkness means sitting in a totally dark room for 20+ minutes before you start looking at the night sky. The time you will need to adapt depends on your age. Any bright light will destroy your night vision. As we get older our night vision will get poorer so young people will see better at night than older people do.
{ "domain": "earthscience.stackexchange", "id": 1954, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "auroras", "url": null }
newtonian-mechanics, rotational-dynamics, rotational-kinematics $$\tau=\dot L=\frac{\text d}{\text dt}(I\omega)=\dot I\omega+I\dot\omega=\dot I\omega+I\alpha=0$$ So we have for all points in time $$\alpha=-\frac{\dot I}{I}\omega$$ Since the moment of inertia is decreasing, we have that the angular acceleration will increase in the direction of the angular velocity. Which makes sense with what you said, as the angular velocity will be increasing in magnitude at an increasing rate. How to tackle this system more numerically can be found in this answer, but for a first pass, $I(t)=mr(t)^2$, so $\dot I=2mr\dot r$ which leaves us with $$\alpha=-\frac{2\dot r}{r}\omega$$ To go further you will need to solve the differential equation with a specified $r(t)$, but your confusion has at least been addressed.
{ "domain": "physics.stackexchange", "id": 65878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, rotational-dynamics, rotational-kinematics", "url": null }
python, estimation, kalman-filters, covariance, dynamic-system state_means, state_cov = kf.filter(rand_walk_1) plt.plot(rand_walk_2) plt.show() plt.plot(state_cov.flatten())
{ "domain": "dsp.stackexchange", "id": 10738, "lm_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, estimation, kalman-filters, covariance, dynamic-system", "url": null }
ros, raspberrypi, beaglebone Originally posted by ahendrix with karma: 47576 on 2014-07-09 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by d on 2014-07-09: thanks @ahendrix. most of our computation is done on the cloud, so locally we only need a cpu+board to handle some light-weight tasks and act as a communication device with the cloud. the heaviest local task is kinect+kobuki for navigation. do you think a mini-itx with atom e3800 + 4g ram works? Comment by ahendrix on 2014-07-09: I would err towards the more expensive computer for an initial prototype, so that you can get something running, and then work on optimizing the software to decrease the computing power required. If you have a very limited budget you could try to borrow a laptop with a similar CPU to test with. Comment by ahendrix on 2014-07-09: This of this this way: if you buy the cheaper computer and it isn't powerful enough, you've wasted time, money, and you still have to go buy something more expensive.
{ "domain": "robotics.stackexchange", "id": 18567, "lm_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, raspberrypi, beaglebone", "url": null }
stim Title: Implementing biased erasure error in stim We are trying to simulate the erasure channel in stim, but it is a biased erasure - meaning that the replaced qubit doesn't have a depolarizing channel but a biased channel. We saw that there is a function in stim "HERALDED_ERASE" channel, but here the replaced qubit has a depolarizing channel. Can we use it to have another error channel on the replaced qubit? Also, when we use MWPM to decode, is the weight of the edge (in the matching graph) associated with the erased qubit updated appropriately? Thank you! Since v1.12, you can use the HERALDED_PAULI_CHANNEL_1 instruction to get biased heralded errors. Note that you will still need to find a decoder that understands the erasures. For example, as of this writing, pymatching will just ignore the heralds and do normal decoding instead of erasure-informed decoding.
{ "domain": "quantumcomputing.stackexchange", "id": 5216, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "stim", "url": null }
qiskit, grovers-algorithm So, in this special case, only exactly one iteration is required to perfectly obtain $\omega$. However, this is not the case for all values $M/N$. For example, when $M/N << 1$ we have $\theta \approx \sin{\theta} \approx \sqrt{M/N}$, and thus the angular error of the final state can be as high as (but no greater than) $\theta \approx \sqrt{M/N}$, giving a probability of error as high as (but no greater than) $M/N$. Depending on the value $M/N$ and whether $M$ is known in advance, alternate approaches to and various adaptations of Grover's algorithm are also used. When $M/N \geq 1/2$, we see that the angle $\theta$ gets smaller as $M$ varies from $N/2$ to $N$. As a result, the number of iterations needed by the search algorithm increases with $M$. When $M/N$ is this large, error probability can be as high as (by no greater than) one-half. Here, quantum search offers little significant advantage over a classical one. When $M$ is not known in advance, there are a number of different
{ "domain": "quantumcomputing.stackexchange", "id": 2681, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, grovers-algorithm", "url": null }
homework-and-exercises, angular-momentum, earth, rotational-kinematics, moment-of-inertia Title: How much energy is necessary to set a year to exactly 360 days How much energy would be necessary to slow down Earth rotation such that a year was 360 days long? In the same spirit: how much energy would be necessary to make the Earth rotate faster around the Sun such that a year was 360 days long? (Just for fun: how would you do it practically?) The Earth is currently rotating at one revolution per sidereal day. Converting to radians, this is an angular velocity of $\omega_0 = \frac {2\pi}{\text{sidereal day}}$. You want to have 360 solar days per year, or 361 sidereal days per year. That means a rotation rate of one revolution per 1/361 tropical year, or an angular velocity of $\omega_1 = \frac {722\pi}{\text{tropical year}}$.
{ "domain": "physics.stackexchange", "id": 16038, "lm_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, angular-momentum, earth, rotational-kinematics, moment-of-inertia", "url": null }
Note: $$\{0,1\}^{\mathbb N}$$ denotes the set of all binary sequences. • Can an open cover be an uncountable collection of sets? Oct 6 '18 at 0:21 • @pokerlegend23 I'm not the OP but yes: an open cover can be indexed by an arbitrary set. However, if your space is a metric space, it will be compact if and only if countable covers have finite subcovers. That is, you can restrict to the countable ones to prove compactness. To prove that a space is not compact, though, it may be of use to have an arbitrarily large cover. Oct 6 '18 at 0:24 • Yes it can. Thanks for the informative response Guido A :) Oct 6 '18 at 0:30 • Note that the binary sequences form a closed and discrete subset of the whole space. So very non-compact: the only discrete compact space is a finite one. Oct 6 '18 at 4:52 • @HennoBrandsma you read my mind. If we remove just one of the open balls from $\mathcal B$, then the resulting collection of sets no longer forms a cover of $\{0,1\}^{\mathbb N}$. Oct 6 '18 at 5:26
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357591818725, "lm_q1q2_score": 0.8452912534591598, "lm_q2_score": 0.8633916029436189, "openwebmath_perplexity": 147.53009942609145, "openwebmath_score": 0.8891528248786926, "tags": null, "url": "https://math.stackexchange.com/questions/2943904/is-the-set-of-all-binary-sequences-compact-in-l-infty" }
programming, cirq, tfq Which applies an X rotation on each qubit proportional to that features value (if row[5] == 321 then qubit 5 would be given cirq.X ** 0.321 and if row[6] == 1000 then qubit 6 in the circuit would be given a full cirq.X ** 1.0 rotation). Here the rotations are normalized to the range $[0, 1]$. If I wanted to get them between $[-\pi, \pi]$ we could do something like: def convert_to_circuit(row): """Encode a vector with features in [1, 1000] using angle-encoding""" values = (np.ndarray.flatten(row).astype(np.float32) - 1) / 999 values = values * (2 * np.pi) - np.pi qubits = cirq.GridQubit.rect(1, len(values)) circuit = cirq.Circuit(cirq.rx(v)(q) for v,q in zip(values, qubits)) return circuit
{ "domain": "quantumcomputing.stackexchange", "id": 2998, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming, cirq, tfq", "url": null }
classical-mechanics When I weigh myself on a scale am I also weighing all of the air directly above me up to the edge of the atmosphere? If I weighed a car am I also weighing the air inside the car? Because air pressure falls as altitude increases would a car weigh less at higher altitude because the air would weigh less? If I could weigh a Zeppelin at 20,000 feet would I also be weighing all of the air inside the Zeppelin? Or does air not show up on the scale because it is freely floating in and out of the craft?
{ "domain": "physics.stackexchange", "id": 71797, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics", "url": null }
homework-and-exercises, newtonian-mechanics, harmonic-oscillator, frequency, resonance My calculations $$ \dot{x}_s=\omega A\cos(\omega t)-\omega B \sin(\omega t) ~~,~~~~ \ddot{x}_s=-\omega^2 A\sin(\omega t)-\omega^2 B \cos(\omega t) $$ $$ \ddot{x}+\gamma\dot{x}+\omega_0^2x=\frac{F(t)}{m}\\ \!\!\!\! =-\omega^2 A\sin(\omega t)-\omega^2 B \cos(\omega t) +\gamma\omega A\cos(\omega t)-\gamma \omega B \sin(\omega t) +\omega_0^2A\sin(\omega t)+\omega_0^2B\cos(\omega t), $$ and I solve for A and B at $t=0$ and $t=\frac{\pi}{2\omega}$. Absorb the superfluous parameter m into your r.h.s. driving term, an obvious square wave with an infinity of harmonics, $$ \ddot{x}+\gamma\dot{x}+\omega_0^2x= \sum_{n=1,3,5...}^{\infty}\frac{4F_0}{n\pi}\sin\left( n\omega t\right),$$ where I've defined $\omega\equiv 2\pi/T$, not your Ansatz parameter.
{ "domain": "physics.stackexchange", "id": 78990, "lm_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, harmonic-oscillator, frequency, resonance", "url": null }
c#, number-guessing-game while (!Int32.TryParse(Console.ReadLine(), out attempt)) { Console.WriteLine("Invalid num please input whole num"); } return attempt; } } 1) Avoid using var if you want your code to be more readable. 2) Both CompareNum() and PlayGame() methods should be defined within the Game class as they rely on a game (which means they don't need to have a game as argument anymore) 3) In the CompareNum() method Console.WriteLine("User num is too Low try again"); Console.WriteLine(); can become Console.WriteLine("User num is too Low try again\n"); 4) In the GenerateComNum() method you can shorten var comNum = rnd.Next(1, 101); return comNum; to return rnd.Next(1, 101);
{ "domain": "codereview.stackexchange", "id": 32198, "lm_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#, number-guessing-game", "url": null }
asymptotics This certainly holds for $n = 0$. If $n$ is even, then $T(n) = T(n/2) + 1$, and indeed the binary representation of $n/2$ differs from that of $n$ by having one less 0. If $n$ is odd, then $T(n) = T(n-1) + 1$, and indeed the binary representation of $n-1$ differs from that of $n$ by having one 1 replaced by 0. This shows that $T(n) = O(\log n)$. It is not clear what you mean by average case, but the formula above should let you work that out. For example, let us consider the $2^{m-1}$ numbers of length exactly $m$. Each of them has a leading 1, and the other $n-1$ bits are half 0, half 1 (considering all numbers in the range). Hence the average value of $T$ for $2^{m-1} \leq n < 2^m$ is $m + 1 + \frac{m-1}{2} = \frac{3m+1}{2}$. Using this, we can compute the average value of $T$ for $0 \leq n < 2^m$ to be $$ \frac{T(0)}{2^m} + \sum_{\ell=1}^m 2^{\ell-1-m}\frac{T(2^{\ell-1}) + \cdots + T(2^\ell-1)}{2^{\ell-1}} =
{ "domain": "cs.stackexchange", "id": 13532, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "asymptotics", "url": null }
meteorology Title: How to calculate sea level pressure from geopotential height? For this, I am using python to plot and manipulate the data. I am using reanalysis data in a netcdf format for this problem. The data includes geopotential, for which I estimated the geopotential height through the following. The netcdf variable for geopotential is as follows: <class 'netCDF4._netCDF4.Variable'> int16 z(time, level, latitude, longitude) scale_factor: 0.9163788350787961 add_offset: 28797.397523473086 _FillValue: -32767 missing_value: -32767 units: m**2 s**-2 long_name: Geopotential standard_name: geopotential unlimited dimensions: current shape = (1, 2, 51, 101) filling on I then proceeded to extract this variable as follows, and calculate the geopotential height by dividing the variable geop by $g_{o} = 9.81$. I then assigned this to a variable $Z$ geop = file.variables['z'][:] g = 9.81 Z = geop/g # Geopotential Height
{ "domain": "earthscience.stackexchange", "id": 2348, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "meteorology", "url": null }
python, game, homework That also helps you to avoid the issue that Python always starts a new bingo game whenever you try to import a function from your file ;-)
{ "domain": "codereview.stackexchange", "id": 41405, "lm_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, homework", "url": null }
ros, kinect, openni, ros-kinetic, freenect Title: Cannot get Kinect V1 and ROS Kinetic / Ubuntu 16.04 to output topics Hi Edit: See self- reply for semi-successful update, though I still cannot get a pointcloud topic publishing (just depthcloud) I have been trying for 8.5 hours today to try and get my kinect v1 to output a depth pointcloud to RVIZ as per the ROS tutorial. I found the ROS kinect setup instructions tough to follow, so initially I made the install by following this reddit guide.
{ "domain": "robotics.stackexchange", "id": 29702, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, kinect, openni, ros-kinetic, freenect", "url": null }
radioactivity, isotopes The wikipedia page on Radiocarbon dating goes into many of these. If any particular source of isotopic shift has you particularly interested, I encourage asking a second question focused on that!
{ "domain": "physics.stackexchange", "id": 71995, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "radioactivity, isotopes", "url": null }
javascript, performance, game //Returns the Y value for a pair of X/Zs function getmapheight(x,z){ //Drop the coordinate to the map scale x = x/tilescale; z = z/tilescale; //Clamp the coordinate to the map dims x = Math.min(mapscalex-1,Math.max(0,Math.floor(x))); z = Math.min(mapscalez-1,Math.max(0,Math.floor(z))); //Project the 2D coord into a 1D coord for map sampling,-- //and then return the map value scaled into world coordinates return(mapcol[(x+z*mapscalex)]*tilescaley); } From a short review; the tilescale is 16 which is a great value to multiply or divide with, so x = x/tilescale; z = z/tilescale; can become x = x >> 4; //Divide by 16 (tilescale) z = z >> 4; //Divide by 16 (tilescale) this does mean that changing the tilescale can become a performance drag (like in real games) So are 256 and 4, so return(mapcol[(x+z*mapscalex)]*tilescaley); could be return(mapcol[(x+z<<8)]<<2); //Nice comment here
{ "domain": "codereview.stackexchange", "id": 38789, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance, game", "url": null }
c++, c++11, numerical-methods, neural-network, eigen bool save_mat(MatrixXd pdata, const string& file_path) { ofstream os(file_path.c_str()); if (!os.is_open()) { cout << "Failure!" << endl; return false; } os.precision(11); int n_rows = pdata.rows(); int n_cols = pdata.cols(); for (int i = 0; i < n_rows; i++) { for (int j = 0; j < n_cols; j++) { os << pdata(i, j); if (j + 1 == n_cols) { os << endl; } else { os << ","; } } } os.close(); return true; } template<typename T> vector<T> arange(T start, T stop, T step = 1) { vector<T> values; for (T value = start; value < stop; value += step) values.push_back(value); return values; } double f(double t, double tau_1, double tau_2); ArrayXd set_initial_V(double tau, double g_L, double I_0, double theta, double V_L, int N, double c); int main() {
{ "domain": "codereview.stackexchange", "id": 16205, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, numerical-methods, neural-network, eigen", "url": null }
quantum-mechanics, group-theory, representation-theory Let $\mathcal H_1=\{\psi\in \mathcal H \ | \ \Vert\psi\Vert=1\}$ be the set of of unit vectors in $\mathcal H$. Define the equivalence relation $\sim$ such that $\psi\sim \phi \iff \exists\alpha\in\mathbb R : \psi= e^{i\alpha} \phi$. The set of (pure) physical states, which I'll denote by $\mathcal P$, is the set of equivalence classes of $\mathcal H_1$ under $\sim$. Define the ray product $\Phi \cdot \Psi$ between elements of $\mathcal P$ by choosing any two representatives $\phi,\psi\in \mathcal H_1$ of $ \Phi$ and $ \Psi$; then $\Phi \cdot \Psi := |\langle\phi,\psi\rangle|$. The probabilities of various measurement outcomes can ultimately be expressed in terms of ray products between physical states. With this in mind, a symmetry transformation is an automorphism $T:\mathcal P \rightarrow \mathcal P$ such that for all $\Phi,\Psi\in \mathcal P$, $T(\Phi)\cdot T(\Psi) = \Phi \cdot \Psi$.
{ "domain": "physics.stackexchange", "id": 78302, "lm_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, group-theory, representation-theory", "url": null }
experimental-chemistry, notation (Note that the numerical values of the estimate $y$ and its uncertainty $u(y)$ should not be given with an excessive number of digits, although in some cases it may be necessary to retain additional digits to avoid round-off errors in subsequent calculations.)
{ "domain": "chemistry.stackexchange", "id": 4376, "lm_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, notation", "url": null }
algorithms, computational-geometry Title: A O(n) algorithm for a point set triangulation I'm currently stuck at the following task: Consider a point set $S = \{ p_1, p_2, ..., p_n \}$ in the plane in general position (i.e., no three points of $S$ are collinear). The points of $S$ have pairwise different $y$-coordinates and are sorted in increasing order of them, i.e., $y(p_i) < y(p_j) $ if and only if $i < j$. Develop an algorithm that computes a triangulation of $S$ and needs $O(n)$ runtime and memory. I found out how to triangulate monotone polygons, which is pretty close to the task, but I don't know how to transfer this into a triangulation of point sets in case the monoton polygonial has a "notch". I'd be thankful for any kind of help. You can find one triangulation similar to finding the convex hull. On your conditions finding the convex hull can be solved in linear time.
{ "domain": "cs.stackexchange", "id": 10297, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, computational-geometry", "url": null }
special-relativity, time-dilation Technically, the proper time is only defined along the worldline of an observer, so for the time between two events to be Alice's proper time it is necessary not only that they be at the same place, but also that place must be Alice's position. (This is a nit-picking requirement that is not important in SR but becomes important in GR). So I will assume that the two events are indeed on Alice's worldline so that it is indeed her proper time. Is this the proper time elapsed between the two events as measured by another observer Bob who is measuring time with his own clock at the same place? I mean, what we compute by using LTs, is Bob’s proper time or is it something different?
{ "domain": "physics.stackexchange", "id": 90531, "lm_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, time-dilation", "url": null }
c++, algorithm, c++11 for(auto const & l : result) { std::cout << '|'; for (auto const & ch : l) { std::cout << ch; } std::cout << "|\n"; } return 0; }
{ "domain": "codereview.stackexchange", "id": 28058, "lm_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, c++11", "url": null }
c#, .net, event-handling In .NET's Observable<T>, the Observable<T> produces values once it is subscribed to (unless it is a hot observable - that's out of scope of this answer). It will then send an OnComplete 'message' to the subscribed Observer<T> when it has finished. It also has the ability to send an OnError(Exception) notification to the Observer, but only if the exception occurs during the subscription. Exceptions during observation are not implicitly caught. Before we get onto that, it's worth nothing that you also have Task<T>. It's really worth realizing what you are trying to do here. I feel that putting a Completed event on your class is a code smell as it's breaking encapsulation, and you should really bind the completion to the lifecycle of the method invocation (i.e, make it a return). Semantically speaking, if your method will only produce one result (i.e, "I've finished"), then you should return a Task (or Task<T>). This lets users use async/await.
{ "domain": "codereview.stackexchange", "id": 9446, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, event-handling", "url": null }
general-relativity, equivalence-principle That's right, to first order. To see what's going on more precisely, it may help to explicitly build coordinates out of this. Say you have a local frame of one timelike direction and three spacelike directions $\{\hat{e}_\alpha\}$, orthonormal (that's actually not necessary, but it's more intuitive if you start with a Cartesian-like situation), i.e., four vectors spanning the tangent space at your location in spacetime. Pick any direction in spacetime... any vector can be written in terms of components of your frame vectors. Consider the geodesic in that direction; it will have some affine parameter along it (say, proper time/length along it if it wasn't a lightlike direction). You can therefore label each point on that geodesic with coordinates consisting of that affine parameter and the vector components of the direction you picked.
{ "domain": "physics.stackexchange", "id": 1420, "lm_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, equivalence-principle", "url": null }
dna, purification Title: qPCR precipitation I have performed DNA precipitation using two methods on an amplified 194 bp PCR product: using a PEG method with just cold 80% ethanol
{ "domain": "biology.stackexchange", "id": 12393, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dna, purification", "url": null }
turing-machines, turing-completeness, digital-circuits A program (or algorithm, or machine) is a mechanism for computing a function. For definiteness, let us assume that the input is a binary string $x$, and the output is a Boolean output $b$. The size of the input is potentially unbounded. One example is a program that determines whether the input is the binary encoding of a prime number. A (Boolean) circuit is a collection of instructions for computing some finite function. We can picture the circuit as an electrical circuit, or think of it as a sequence of instructions (this view is called confusingly a straight-line program). Concretely, we can assume that the input is a binary string $x$ of length $n$, and the output is Boolean. One example is a circuit that determines whether the input encodes a prime number (just as before, only now the input has to be of length $n$).
{ "domain": "cs.stackexchange", "id": 21443, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, turing-completeness, digital-circuits", "url": null }
electromagnetism, special-relativity, relative-motion, maxwell-equations The constraint force is perpendicular to the surface of the wire pushing on the charge carriers in the direction of motion (because the whole thing is moving). This force is doing the work on the charge carriers in this frame (although it is somewhat strange to think of a constraint force doing work). The push of the current carriers against the wire's constraint force gives the breaking force on the wire, which slows it down so as to conserve energy, as the resistance gives off heat.
{ "domain": "physics.stackexchange", "id": 2207, "lm_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, special-relativity, relative-motion, maxwell-equations", "url": null }
beginner, perl, file Perl sub that reads the file: sub readConfigFile { print $lfh "Reading Config.txt file\n"; #path to the config file my $configF = "config.txt"; if($DEBUG == 1){print "opening config File\n";} open(my $configFhandle, '<', $configF) or die "Unable to open file, $!"; my @arrFileData=<$configFhandle>; #Slurp! #go through each of the lines in the file for (my $i = 0; $i <= $#arrFileData; ++$i) { local $_ = $arrFileData[$i]; if($DEBUG == 1){print "Reading line:$_";} #check to see if the line is a comment... if it is skip it if($_ =~ /^#/) { if($DEBUG == 1){print "Line is comment. Skiping:$_";} next; } #split the line into the key and value my @dataKV = split /=/, $_; #check to see that Key and Value exist ... if not skip it my $arrSize = @dataKV; if($arrSize <= 1) { if($DEBUG == 1){print "Read Config: Error: No Key AND Value found:$_";} next; } #remove all leading and end white spaces around elements s{^\s+|\s+$}{}g foreach @dataKV;
{ "domain": "codereview.stackexchange", "id": 6551, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, perl, file", "url": null }
javascript, event-handling The first two (with addEventListener or attachEvent) run as the original ones, didn't notice any differences. But for the "traditional way": My original test was 150k repetitions of adding an empty function to the element's event and then run the event. But as you wrap the handlers onto each other; javascript sends the next error: "Maximum call stack size exceeded" which is only natural. Then I tested for the maximum stack size allowed which was 7816 ( I made that my test size), the results of adding 7816 empty functions to the same type of event of the same element and then executing the event was: Your code: minimum = 19ms, maximum = 33ms, average = 30ms. My code: minimum = 20ms, maximum = 37ms, average = 27ms.
{ "domain": "codereview.stackexchange", "id": 5714, "lm_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, event-handling", "url": null }
thermodynamics Reflectivity: assume you wear white clothes (looks better in the movie) you might reflect 80% of the incident radiation Air flow: if there is a bit of wind blowing to cool you down, that will help. Luckily, if you are on the edge of a lava field, the effect of the heat will be to draw cold air in and then lift it up - so you should have a cool breeze (I have never been near a lava field but I think that's a reasonable speculation) Toxic fumes: if the above is true, the effect of toxic fumes will be mitigated by the built in "extractor fan" formed by the heat. Calculating: assume a height $h$ at distance $d$ from a semi infinite plane at temperature $T$:
{ "domain": "physics.stackexchange", "id": 16411, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics", "url": null }
b) two mods.. |x+2|=|x-3|+1.. critical values -2 and 3... so regions are <-2, -2<=x<3, x>=3.. i) x<-2... x+2 will be -ive and x-3 will be negative .. eq becomes -(x+2)=-(x-3)+1.. both negative -x-2=-x+3+1..... no values.. ii) $$-2<=x<3$$.. x+2 will be positive and x-3 will be negative .. eq becomes (x+2)=-(x-3)+1.. x+2=-x+3+1.. x=1.. valid value iii)x>=3.. x+2 will be positive and x-3 will be positive .. eq becomes (x+2)=(x-3)+1.. x+2=x-3+1.. no valid value.. so the solution is x=1 c) three mods.. very rare |x+3|-|4-x|=|8+x| .. its time consuming and can be solved similarly.. Graphical method
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9615338123908151, "lm_q1q2_score": 0.8053999108321518, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 2166.4847849862426, "openwebmath_score": 0.6738603711128235, "tags": null, "url": "https://gmatclub.com/forum/absolute-modulus-a-better-understanding-210849-40.html?sort_by_oldest=true" }
import sys import fractions def moreTicks(curTick): for k in range(1, curTick): if fractions.gcd(curTick, k) == 1: moreTicksList.append(fractions.Fraction(k, curTick)) return curTick + 1 #--------*---------*---------*---------*---------*---------*---------*---------# while True:# M A I N L I N E # #--------*---------*---------*---------*---------*---------*---------*---------# # # initialize state of function machine step = 0 negSide = 0 posSide = 0 curTick = 2 phiList = [] print(0, ', ', end='')
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180677531123, "lm_q1q2_score": 0.8104466810657084, "lm_q2_score": 0.8221891305219504, "openwebmath_perplexity": 407.0069821821204, "openwebmath_score": 0.9833250045776367, "tags": null, "url": "https://math.stackexchange.com/questions/7643/produce-an-explicit-bijection-between-rationals-and-naturals/1067928" }
python, object-oriented, python-3.x, factory-method Title: Object-oriented calorie counter Object-oriented program for a calorie counter sporting polymorphic methods for both genders. Principles to adhere to: Uniform Access Principle Polymorphism Dependency inversion principle through the Factory Method pattern Single responsibility principle Concerns for future extension: BPM curve for exercise acts of longer duration, can this be transparently added? Other concerns: Unit prefixes for names, e.g. weight_kg, exercise_duration_min. Are these bad? Overengineered? Yes, I'm not going to argue against that; we don't have more than one method in our classes which eliminates the need to have them at all. Assuming we had more than one method, however, is it still overdone? Are any of the principles I claimed to follow not followed or properly followed? Especially thinking of the Factory Method pattern.
{ "domain": "codereview.stackexchange", "id": 28277, "lm_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, object-oriented, python-3.x, factory-method", "url": null }
• Oh I see! So taking the dot product of $V$ and $r$ will give me the function to multiply by $4π$? – George Bencosme Apr 20 '16 at 14:45
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9861513869353993, "lm_q1q2_score": 0.8322083180688067, "lm_q2_score": 0.8438950947024556, "openwebmath_perplexity": 127.6622237129843, "openwebmath_score": 0.9614601135253906, "tags": null, "url": "https://math.stackexchange.com/questions/1751175/outward-flux-of-a-vector-field-through-a-rectangular-box" }
javascript, html, rock-paper-scissors becomes var USER_WINS = "You win!", COMP_WINS = "Computer wins", DRAW = "Draw"; Notice that by using the comma (,) to separate the variable names lessens the use of how many 'var' keywords are declared. Whenever possible try to group declarations of variables to use one 'var' keyword. When using click listeners or any other type of listener such as keyup, keydown etc try to use the 'addEventListener' method. i.e var bestOf3 = getById('bestOf3'); bestOf3.onclick = function() { enableGame(); gameType = 3; } becomes var bestOf3 = getById('bestOf3'); // first param: The type of event. In this case equivalent to 'onclick' // second param: What to do when the event is triggered // third param: Whether or not to use capture. Most cases leave false bestOf3.addEventListener('click', function() { enableGame(); gameType = 3; }, false)
{ "domain": "codereview.stackexchange", "id": 23066, "lm_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, rock-paper-scissors", "url": null }
You must realize that the infinite series (which is rigorously denoted by a summation expression) is defined as the limit of the partial sums if it exists, and the partial sums are in turn defined in a certain precise way. One is not permitted to do any rearrangement, especially by 'intuition', unless one proves that doing so does not change the limit of the partial sums. This is why $\sum_{k=0}^\infty (-1)^k$ diverges while $\sum_{k=0}^\infty ((-1)^{2k}+(-1)^{2k+1})$ converges. You are assuming we don't know how the series is structured. But we do - instead of having $$1-1+1-1+\cdots$$ we instead have $$(1-1)+(1-1)+\cdots$$ so every term cancels and the series clearly converges! This is more evident from the sigma notation, since $a_n = a_{n+1} = 1$ so $\sum (a_n - a_{n+1}) = \sum 0 = 0$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846634557752, "lm_q1q2_score": 0.8174242812756912, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 271.8326697110257, "openwebmath_score": 0.9869915843009949, "tags": null, "url": "https://math.stackexchange.com/questions/2882027/can-a-telescopic-series-with-a-n-not-tending-to-zero-converge" }
c++, beginner, strings, qt } else if (actionText == tr("Timers")) { action->setShortcut((active) ? tr("Ctrl+4") : QString()); } else if (actionText == tr("Keys")) { action->setShortcut((active) ? tr("Ctrl+5") : QString()); } else if (actionText == tr("Variables")) { action->setShortcut((active) ? tr("Ctrl+6") : QString()); } else if (actionText == tr("Buttons")) { action->setShortcut((active) ? tr("Ctrl+7") : QString()); } else if (actionText == tr("Errors")) { action->setShortcut((active) ? tr("Ctrl+8") : QString()); } else if (actionText == tr("Statistics")) { action->setShortcut((active) ? tr("Ctrl+9") : QString()); } else if (actionText == tr("Debug")) { action->setShortcut((active) ? tr("Ctrl+0") : QString()); } } }
{ "domain": "codereview.stackexchange", "id": 44319, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, strings, qt", "url": null }
temperature, thermal-conductivity Say each 1mm of thickness dissipates 1W/°C, the temperature across each 1mm of thickness would be, from inner to outer, 10°C, 20°C, 30°C, 40°C, and 50°C. So the inner temperature would be the sum of those greater than the outer temperature. (150°C hotter). It seems that the drop in temperature at x relative to x=0 is proportional to the square of x. Not sure how I got to that. So now I need to turn this into real maths and extend it to the case of the cylinder. Your question is: assuming a rod of radius $R=1$ cm with a fixed heat production per unit volume, totaling $Q=100$ W/m, surface temperature $T_0$ and thermal conductivity $\lambda$, what is the temperature $T(r)$ as a function of $r$? First, observe that within a cylindrical shell of radius $r$, the total heat production is $q=Q(r/R)^2$. The temperature gradient at this $r$ value must satisfy $$ \frac{dT}{dr} = -\frac{q}{2\pi\lambda r}=-\frac{Qr}{2\pi\lambda R^2}.$$
{ "domain": "physics.stackexchange", "id": 30950, "lm_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, thermal-conductivity", "url": null }
ruby url = "jdbc:oracle:thin:#{userid}/#{password}@#{host_name}:1521:#{db_name}" $db = Sequel.connect(url) end Another approach is Hash.merge: DEFAULT = { host_name: 'a_default_host_name', db_name: 'a_default_db_name', userid: 'a_default_userid', password: 'a_default_password', } def connect_to_oracle( opts = {} ) opts = DEFAULT.merge(opts) host_name = opts[:host_name] db_name = opts[:db_name] userid = opts[:userid] password = opts[:password] url = "jdbc:oracle:thin:#{userid}/#{password}@#{host_name}:1521:#{db_name}" $db = Sequel.connect(url) end or: DEFAULT = { host_name: 'a_default_host_name', db_name: 'a_default_db_name', userid: 'a_default_userid', password: 'a_default_password', } def connect_to_oracle( interface_opts = {} ) opts = DEFAULT.merge(interface_opts )
{ "domain": "codereview.stackexchange", "id": 11066, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby", "url": null }
Kullback– Leibler (KL) divergence and formulate an objective that maximizes this measure between the two classes. Similarly as for discrete distributions, once Gaussians are far apart, the KL grows unbounded, whereas the geodesic distance levels off. Also known as Relative Entropy. A calculus of variations viewpoint is adopted, and the particular case where $u$ is chosen from the set of Gaussian measures is studied in detail. Informally. w9a - Variational objectives and KL Divergence, html, pdf. Kullback-Leibler divergence between two Gaussian distributions. A GAN is a neural network Gγ that maps representation vectors z ∈RK, typically drawn from a standard normal distribution, to data items x ∈RD. Before introducing , let’s take a quick look at the so-called crowding problem. be analytically computed by assuming mutual independence between the network parameters and factoring the term into individual Gaussians. python KL divergence import numpy as np def KL ( P , Q ): """ Epsilon is
{ "domain": "fastandstore.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.987946221548465, "lm_q1q2_score": 0.8077196058073102, "lm_q2_score": 0.8175744673038222, "openwebmath_perplexity": 933.642810380257, "openwebmath_score": 0.8982875347137451, "tags": null, "url": "http://fastandstore.it/wwch/kl-divergence-between-two-gaussians.html" }
experimental-chemistry A slow step in a multi-step chain reaction: In radical reactions, the initial formation of a radical has the highest activation energy, whereas reaction of a radical with other reactants to form another radical (chain propagation) has a lower activation energy. In this case, the first step would require higher temperature (like a spark) or a catalyst (radical starter) and then the chain reaction can proceed at low temperature.
{ "domain": "chemistry.stackexchange", "id": 11602, "lm_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 }
beginner, objective-c, console, tic-tac-toe @end @implementation Game -(id)init{ self = [super init]; isPlayersTurn = YES; // choosing players token while(!(playerToken=='x' || playerToken=='o')){ NSLog(@"Choose your token (must be either x or o)"); scanf("%c",&playerToken); } // computer token is opposite of player token computerToken = playerToken=='x'?'o':'x'; // set tiles of board to empty for(int i=0; i<3; i++){ for(int j=0; j<3; j++){ board[i][j] = ' '; } } return self; }
{ "domain": "codereview.stackexchange", "id": 18766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, objective-c, console, tic-tac-toe", "url": null }
Now finally we get to the question of the $$\limsup$$ and the $$\liminf$$. By the definition that you provided, $$\limsup_{n\to\infty} a_n = \lim_{N \to \infty} \sup \{a_k\:|\: k \geq N\}.$$ Let's consider the sequence $${s_N}$$ where $$s_N=\{a_k\:|\: k \geq N\}$$. \begin{align*} s_0&=\sup\{ a_0, a_1, a_2, a_3, \ldots \}, \\ s_1&=\sup\{\phantom{ a_0, }\, a_1, a_2, a_3, \ldots \}, \\ s_2&=\sup\{\phantom{ a_0, a_1 }\,\,\, a_2, a_3, \ldots \}, \\ s_2&=\sup\{\phantom{ a_0, a_1, a_2 }\,\,\, a_3, \ldots \}, \\ \,\,\,&\,\,\,\vdots \end{align*} Suppose, for the sake of simplicity, that for each of these sets $$A_N=\{a_k\:|\: k \geq N\}$$, their supremum is contained in the set. This is not true, far from it, but let's just assume it is. Then the supremum $$s_N$$ is the largest element of $$A_N$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975946446405965, "lm_q1q2_score": 0.8132801855770941, "lm_q2_score": 0.8333246035907933, "openwebmath_perplexity": 179.16997474571744, "openwebmath_score": 0.9471896886825562, "tags": null, "url": "https://math.stackexchange.com/questions/493526/can-someone-clearly-explain-about-the-lim-sup-and-lim-inf/493650" }
electromagnetism, magnetic-fields, electric-current, torque, magnetic-moment (source: uni-wuppertal.de) I understand that a straight infinite conductor will not experience a torque in a uniform magnetic field. It will only experience a net force based on its orientation. And so it doesn't have a net magnetic moment. But I'm unable to visualize how a toroid will behave in a uniform external magnetic field. Since the answer to the above question says that a toroid doesn't have a magnetic dipole moment, I can conclude that it doesn't experience a torque. But does it experience a net force? Please explain how a toroid behaves in an external magnetic field at the basic level of each loop of wire. A torus can be a magnetizable object; what you describe, is a solenoid-like winding bent into a toroidal shape. So, the current is circulating through the hole in the torus, on a minor-diameter route. Such current is called 'poloidal'.toroidal and poloidal That current is a self-shielding magnetic geometry (and toroids with windings to
{ "domain": "physics.stackexchange", "id": 36142, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, magnetic-fields, electric-current, torque, magnetic-moment", "url": null }
electrostatics, electric-fields, lenses No. Whether or not the charges are fixed, there is an $E$-field, and thus the voltage between two arbitrarily chosen points $x_1$ and $x_2$ inside the field is given by: $$\Delta V_{12}=V_{x_2}-V_{x_1}=-\int_{x_1}^{x_2} \hat{E}d\hat{l}\space.$$ The voltage increase from point $1$ to point $2$ is equal to the work done per unit charge, against the electric field, to move the charge from $1$ to $2$ uniformly. For instance, whether or not a parallel plate capacitor is made of nonconductive or conductive plates, the voltage between the charged plates is $V=Ed$, where $d$ is the distance between the plates. Remember that a zero electric current does not necessarily imply a zero voltage but the vice versa is always true, i.e., a zero voltage implies a zero current between the points that the voltage is attributed.
{ "domain": "physics.stackexchange", "id": 71915, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, electric-fields, lenses", "url": null }
1. Thing. Im­pli­ca­tions im­pli­ca­tions im­pli­ca­tions. (Proof.) 2. Thing. Im­pli­ca­tions im­pli­ca­tions. (Proof.) I’d then even­tu­ally add an in­tro lens.” Hav­ing proofs on child pages makes sense to me too.
{ "domain": "greaterwrong.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9937100992601671, "lm_q1q2_score": 0.8323514128782201, "lm_q2_score": 0.8376199592797929, "openwebmath_perplexity": 3527.701384814641, "openwebmath_score": 0.8240607380867004, "tags": null, "url": "https://arbital.greaterwrong.com/p/group_homomorphism?l=47t" }
java, performance, primes, io The only difference is the file-name is now a parameter. Then I wrote a little test system to time how long your code took for me: public static void time(Supplier<int[]> task, String name) { long nanos = System.nanoTime(); int[] primes = task.get(); System.out.printf("Task %s took %.3fms\n", name, (System.nanoTime() - nanos) / 1000000.0); System.out.printf("Count %d\nFirst %d\nLast %d\n", primes.length, primes[0], primes[primes.length - 1]); System.out.println("----"); } public static void main(String[] args) { int count = 50000000; time(() -> loadByQuantity(count, "primes.dat"), "OP"); }
{ "domain": "codereview.stackexchange", "id": 24068, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, primes, io", "url": null }
Una matriz triangular es un tipo de matriz cuadrada cuyos elementos por encima o por debajo de su diagonal principal son cero. En este video se explica este tipo especial de matrices En este video hablaremos sobre algunos tipos especiales de matrices. Recordemos que en videos anteriores habíamos definido la matriz identidad ( I_n) como la matriz en la cual la diagonal principal de la matriz estaba compuesta por valores de 1 y el resto de la matriz, es decir los elementos que no formaban parte de la diagonal principal adquirían valores de 0. Para dar una definición más formal del concepto de diagonal principal de una matriz, decimos que si tenemos una matriz A con varias entradas, la diagonal principal está conformada por el siguiente conjunto de valores: diagA={a11,a22,a33,….ann}, a partir de la definición de diagonal principal de una matriz surgen algunas otras definiciones, se dice que todo lo que está arriba de la diagonal principal de la matriz es conocido como parte triangular
{ "domain": "cyclopaedia.info", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126444811033, "lm_q1q2_score": 0.8357352158746478, "lm_q2_score": 0.8539127603871312, "openwebmath_perplexity": 5689.58136206374, "openwebmath_score": 0.8132575154304504, "tags": null, "url": "http://www.cyclopaedia.info/wiki/Principal-diagonal" }
javascript, algorithm, functional-programming, k-sum Personally I would further reduce to function contiguousArrSumming2(arr, val, res = []) { var sum = 0; const scan = num => (sum += num, res.push(num), sum === bal); return !arr.length || arr.some(scan) ? res : contiguousArrSumming2((arr.shift(), arr), val); } A competent coder will have no trouble reading the above code and should instantly spot the very important difference from your original. Be professional. Remember those that read your code are professionals. When you present your code and it looks like its a tutorial piece all you do is put distrust in your code as poor/simple language use and pointless comments make you look like a beginner, the result is they will rather rewrite than update or fix, making your efforts pointless.
{ "domain": "codereview.stackexchange", "id": 33481, "lm_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, functional-programming, k-sum", "url": null }
astronomy Title: How many observations are needed to determine a comet's orbit? Based on the following facts: We have Kepler's laws of planetary motion. We have a good knowledge of the positions and orbits of the gravitationally significant objects in the Solar System. We can numerically calculate orbital variables quickly and accurately using computers.
{ "domain": "physics.stackexchange", "id": 22249, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astronomy", "url": null }
typescript, angular-2+ Title: Angular4 MultiSelect Component I wrote an Angular 4 app and a part of it was a multiselect component. The multiselect component acts like a basic HTML select but gives you the ability to select more than one option, typeahead, and a more usable interface for the user. You can see the working demo here on plunker. The component works but it is slow, 'glitchy', and difficult to use. The entire app was a solo sprint I coded alone so its far from perfect but I'm going back now to make improvements. What the MultiSelect Component Does It works by taking an observable of options as input from a parent component, building the HTML multiselect interface with those options, and then tracking changes the user makes and emitting an event when a change is made. Using it allows a form component to easily include it, pass it options and then subscribe to changes. The files to review on plunker are: src/multiselect.model.ts src/multiselect.component.ts src/multiselect.template.html
{ "domain": "codereview.stackexchange", "id": 25065, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "typescript, angular-2+", "url": null }
virology, rna-interference What does this mean? Do transposons make siRNA? I thought transposons were non-coding except when they travel via the retrotransposon mechanism. Do viruses that infect eukaryotic cells donate their own RNA genetic material for the cell to use in RNAi? But I thought RNAi was a cellular defence against viruses, how can viruses help give the dsRNA that’s supposed to fight the viruses? A number of sites online simply state that siRNA is exogenous is origin; do they mean that it comes from viruses? I would greatly appreciate it if someone could take the time to answer each of my questions one by one or even recommend a site that answers them all. Transposons and viruses don't "make siRNA". However, an endonuclease called Dicer can process dsRNA from these sources to produce siRNA which is then loaded to the RNA-induced silencing complex (RISC) to suppress propagation of viruses and transposons. The following papers provide a good overview:
{ "domain": "biology.stackexchange", "id": 7825, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "virology, rna-interference", "url": null }
mechanical-engineering, fluid-mechanics, chemical-engineering, process-engineering $$\Gamma = \frac{\pi}{2} \tau_{y}H_{C}D_{C}^2+\frac{\pi}{6}\tau_{y}D_{C}^3$$ I just can't get the second term. The first term I can get by doing: $$\Gamma_{1}=\tau_y \cdot Area_{Curved} \cdot \frac{D}{2} = \pi \cdot \frac{D^2}{2} \cdot H_{c} \cdot \tau_{y}$$ This gets me the first term...but the second term I just can't get, this is what I'm doing: $$\Gamma_{2}=\tau_{y} \cdot Area_{Faces} \cdot \frac{D}{2} =\tau_{y} \cdot 2 \pi \cdot \frac{D^2}{4} \cdot \frac{D}{2} = \tau_{y} \cdot \pi \cdot \frac{D^3}{4} $$ Argh, so I'm getting D3/4 instead of D3/6 for the second term and I just can't work it out, if anyone can help I'd appreciate it. For your curved surfaces, the lever arm for the calculation of torque is a constant $D/2$. That is not true in the case of the cavern's faces. In that case the lever arm is a variable ($r$). To calculate the torque you would need to integrate the stress over the area times the lever arm. It should look something like this: $$ \int\int\tau_y\cdot r\, dA
{ "domain": "engineering.stackexchange", "id": 886, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, fluid-mechanics, chemical-engineering, process-engineering", "url": null }
robotic-arm, ros, gazebo <!-- joint 5 (A5) --> <joint name="joint_a5" type="revolute"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="link_4"/> <child link="link_5"/> <axis xyz="0 1 0"/> <limit effort="0" lower="-2.26892802759" upper="2.26892802759" velocity="5.75958653158"/> </joint> <transmission name="trans_joint_a5"> <type>transmission_interface/SimpleTransmission</type> <joint name="joint_a5"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_joint_a5"> <mechanicalReduction>1</mechanicalReduction> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </actuator> </transmission>
{ "domain": "robotics.stackexchange", "id": 2166, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "robotic-arm, ros, gazebo", "url": null }
terminology, group-theory, lie-algebra, representation-theory, supersymmetry \begin{equation} ad_g:\mathfrak g_o\rightarrow\mathfrak g_o, \qquad q\rightarrow ad_g(q)=[g,q], \end{equation} where $g\in\mathfrak g_e$ and $[.,.]$ is the commutator of the Lie superalgebra. Now, $\mathfrak g_o$ is a vector space and thus form a representation space of the even part $\mathfrak g_e$ (under the adjoint action). You can now decompose $\mathfrak g_o$ into irreducible representations of $\mathfrak g_e$. Thus you can construct a basis of $\mathfrak g_o$ that transforms under a representation of $\mathfrak g_e$ under the adjoint action, or in other words their commutators just correspond to some representation of $\mathfrak g_e$. In the case you are talking about, $\mathfrak g_e$ is just the Poincare algebra and $\mathfrak g_o$ transforms under certain spinor-representation of it (under the adjoint action/commutator).
{ "domain": "physics.stackexchange", "id": 9306, "lm_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, group-theory, lie-algebra, representation-theory, supersymmetry", "url": null }
# How to find $\int_0^1 \frac {\mathrm dx}{\left \lfloor{1-\log_2(1-x)}\right \rfloor}$ We want to evaluate; $$\int_0^1 \frac {\mathrm dx}{\left \lfloor{1-\log_2(1-x)}\right \rfloor}$$ The $\left \lfloor{x}\right \rfloor$ is the floor function. I have made no progress so far.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771755256741, "lm_q1q2_score": 0.8090520280737492, "lm_q2_score": 0.8198933337131076, "openwebmath_perplexity": 1077.8722817560822, "openwebmath_score": 0.436100572347641, "tags": null, "url": "https://math.stackexchange.com/questions/905517/how-to-find-int-01-frac-mathrm-dx-left-lfloor1-log-21-x-right-rfl" }
electrostatics, electric-fields, potential, potential-energy Think of a ball on the floor. The gravitational potential energy is zero. But only because the floor is our reference. If there is a hole in the floor, then the ball will roll down there, because that position has lower gravitational potential. The gravitational potential energy in the hole is negative. That does not make much sense in itself. It tells us nothing. Only the difference compared to some other point matters. The ball would not roll to some other point at the same floor because the potentials are the same. And a ball on a shelf would also not roll to another point on that shelf, even though both of those points have gravitational potential energy, because the difference is zero.
{ "domain": "physics.stackexchange", "id": 46128, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, electric-fields, potential, potential-energy", "url": null }
light, cosmology, general-relativity, expansion, redshift Title: Does the redshifting of photons from the Universe's expansion violate conservation of momentum? The energy-momentum relation, $$E^2 = m^2c^4 +p^2c^2,$$ lets us derive the momentum of a massless particle: $$p = \frac{E}{c} = \frac{h\nu}{c}$$ However, the expansion of the Universe redshifts light. This should decrease the momentum of photons. Where would the momentum go, in order for conservation of momentum to hold? In relativity you can think of a single conservation law that unites conservation of energy and momentum -- conservation of four-momentum. Energy and momentum are the zeroth and the first to third components of the four-momentum respectively. Such conservation laws arise from invariance of the Lagrangian with respect to a translation in space-time coordinates.
{ "domain": "astronomy.stackexchange", "id": 1969, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "light, cosmology, general-relativity, expansion, redshift", "url": null }
python, python-3.x self.values = values self.values = list(oldValues) if values[0] != 0: # if there's a common number in the list that isn't 0 (eg [1,1,1,1,1]) # print(f"{values[0]} found in the equation!") <- for testing self.calc.append([values[0], 0]) # takes that value away from the list and adds it to the nth term else: # sequence not entered, the nth term was entered instead # the nth term should've been entered in the same way as self.calc stores it: # as a 2D list: [[3, 2], [1, 1], [2, 0]] for example would be 3n^2 + n + 2 for value in values: # all of the lists in 'values' should have a length of 2, since they only contain the # coefficient of n and the power of n
{ "domain": "codereview.stackexchange", "id": 43524, "lm_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 }
php, html, security, e-commerce Moving on, you initialise $cart_id as $i, but then never use it, and if you were, it'd be best to replace it with $i seeing as they're the same. So, that line can be removed. These lines are clutter: $cart_price = $_SESSION['cart']['price'][$key]; $cart_pricedot = str_replace(',' , '.' , $cart_price); $cart_pricedot_trim = trim($cart_pricedot); You can just use: $cart_price = trim(str_replace(',' , '.' ,$_SESSION['cart']['price'][$key])); or $cart_price = $_SESSION['cart']['price'][$key]; $cart_price_formatted = trim(str_replace(',', '.', $cart_price)); Only the last is used later anyway, so, if you like, you can replace them. Finally (on variables): $combined = $payment_data. '' .$customer. '' .$items_data; $combinedsub = substr($combined, 0, -1); $code = strtoupper(md5($combinedsub)); $trimmeddata = trim($code);
{ "domain": "codereview.stackexchange", "id": 13763, "lm_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, html, security, e-commerce", "url": null }
type-theory, parametricity However there are no such obstacles to building hyperdoctrine-ish models, where terms of System F are objects of the logic. Research along these lines was probably initiated by Abadi and Plotkin in their seminal paper A Logic for Parametric Polymorphism. Lars Birkedal and his collaborators have worked heavily on formulating categorical models for this and similar logics --- see in particular Birkedal, Møgelberg, and Petersen's Category-Theoretic Models of Linear Abadi and Plotkin Logic, which gives a logic for reasoning about linear System F, plus a proof that it is sound and complete with respect to a certain class of categorical models.
{ "domain": "cstheory.stackexchange", "id": 2897, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "type-theory, parametricity", "url": null }
The sentences can be written as such $$Y=12\\X=2(12-(X-12))\\X=2(24-X)\\3X=48$$ Reasoning: $$\begin{array}{|c|c|} \hline \text{Text}& \text{Equation} \\ \hline \text{Xavier is} & X= \\ \hline \text{twice as old} & 2 \\ \hline \text{as Yvonne was} & (12 \\ \hline \text{when Xavier was as old as Yvonne is now} & - (X-12)) \\ \hline \end{array}$$ • Ha. Downvote? Is my method incorrect? (seriously) Jan 4, 2015 at 8:09 • Your method is correct, but the question asks for your reasoning to arrive at the algebraic equations and how it is converted into algebra. If I have misinterpreted when I should down vote an answer then I can reverse it if you like? Jan 4, 2015 at 8:32 • I like the table - shows exactly what to write while reading the sentence. +1 Jan 4, 2015 at 17:07
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877692486436, "lm_q1q2_score": 0.8231119299098199, "lm_q2_score": 0.8479677564567912, "openwebmath_perplexity": 920.3321593749239, "openwebmath_score": 0.6761083006858826, "tags": null, "url": "https://math.stackexchange.com/questions/1090505/how-is-this-word-problem-converted-into-algebra/1090831" }
ros, base-odometry, navsat-transform-node Originally posted by Cferreira on ROS Answers with karma: 11 on 2023-03-24 Post score: 1 I think your description of the problems are accurate to what it is you're trying to accomplish. There's more than one potential answer but you're asking the right questions. Disabling TF publication in SLAM Toolbox or redirecting it to other frames to use for fusion with GPS is certainly possible. You're right to think you shouldn't publish from both R_L and SLAM Toolbox over the same frames or else it will cause erratic behavior. This is totally feasible to fuse the output pose of SLAM Toolbox into a filter with GPS to combine them. Originally posted by stevemacenski with karma: 8272 on 2023-03-24 This answer was ACCEPTED on the original site Post score: 4
{ "domain": "robotics.stackexchange", "id": 38325, "lm_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, base-odometry, navsat-transform-node", "url": null }
java, beginner, layout timerLabel = new JTextArea(); timerLabel.setFont(new Font("Monospaced", Font.PLAIN, 20)); timerLabel.setEditable(false); // Create 'Draw graph' button. JButton btnDraw = new JButton("Draw graph"); btnDraw.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { // Store the true and apprx solution data sets in an ArrayList array called i. ArrayList[] i = new ArrayList[2]; i[0] = true_A; i[1] = apprx_A; // Instantiate a Graph object and call its createAndShowGUI method to produce the GUI // containing the desired graph. Graph graph = new Graph(); graph.createAndShowGUI(i); } }); btnDraw.setFont(new Font("Tahoma", Font.PLAIN, 20)); // End of code relating to 'Draw Graph' button.
{ "domain": "codereview.stackexchange", "id": 4723, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, layout", "url": null }
\begin{split}\begin{align} A &= \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} \end{align}\end{split} $$A$$ will squash everything into null and there will be only one eigenvector $$\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}$$ ### Eigenvector in 3D rotations¶ An eigenvectors in a 3D rotation means the axis of a rotation. And because a rotation doesn’t change the scale, the eigenvalue should be 1. ### Eigenvector in 2D rotations¶ There is no eigenvector in 2D rotations. No eigenvector implies no real-valued eigenvalue but imaginary-valued. ### Single eigenvalue with multiple eigenvectors¶ There could be multiple eigenvectors but only one single eigenvalue. Consider a transformation $$A$$: \begin{split}\begin{align} A &= \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \end{align}\end{split} $$A$$ scales every eigenvector by 2 and only 2. ### Calculation¶
{ "domain": "readthedocs.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9936116804144723, "lm_q1q2_score": 0.8322689712610958, "lm_q2_score": 0.8376199552262967, "openwebmath_perplexity": 335.789996305673, "openwebmath_score": 0.9996474981307983, "tags": null, "url": "https://cs-cheatsheet.readthedocs.io/en/latest/subjects/linear_algebra/fundamentals.html" }
molecular-orbital-theory You should end up with an energy diagram of the following type: C(2s) - 3 C(2p) -- 1st Li -- 3 2nd Li - 2 3rd Li. It's not clear (nor can it be deducted a priori) whether the 2p orbitals will end up lower than the 2s (or the 2nd Lithium group higher than the third), but it is to be assumed that they shouldn't change their places too much. Finally, fill in the electrons in the way you're used to. Two go into C(2s), six into the three C(2p), and two into the first Li orbital (the one shown in figure 1). To answer your questions:
{ "domain": "chemistry.stackexchange", "id": 1672, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "molecular-orbital-theory", "url": null }
| '4 out of Top 5' Instructors on gmatclub | 70 point improvement guarantee | www.e-gmat.com Manager Joined: 17 Jul 2017 Posts: 94 Re: Paula and Anna decided to order a pizza with 6 slices all w  [#permalink] ### Show Tags 12 Dec 2018, 09:33 EgmatQuantExpert wrote: EgmatQuantExpert wrote: Q. Paula and Anna decided to order a pizza with 6 slices all with different toppings and 2 pastries – 1 Chocolate and 1 Caramel. In how many different ways can Paula and Anna choose their food if they each eat three pizza slices and 1 pastry? A. 24 B. 36 C. 40 D. 80 E. 120 Solution Given: • There are $$6$$ slices of pizza. o Paula and Anna will have $$3$$ each. • There are $$2$$ pastries. o Paula and Anna will have $$1$$ each. Approach:
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924729035184, "lm_q1q2_score": 0.8280917071285945, "lm_q2_score": 0.8519527982093666, "openwebmath_perplexity": 4499.8672866358775, "openwebmath_score": 0.5511302947998047, "tags": null, "url": "https://gmatclub.com/forum/if-p-177-x-2487-y-where-x-and-y-are-positive-237145.html" }
algorithms, time-complexity, dynamic-programming However, you can provide near-optimal general contraction orders for trees. The key idea is to regard the linear order of the optimal algorithm as a chain and run the textbook cubic-time dynamic programming to build the optimal contraction tree given that order. This idea was first explored in Neumann et al. (linearized dynamic programming) and has been shown to provide near-optimal solutions. Beyond the optimality result, I empirically validated that this holds for tensor networks as well. Recently, Ibrahim et al. proposed the same approach, but their linearization, i.e., the permutation of the leaves, is chosen greedily. The advantage of having an optimal algorithm for the linearization is that you are at least optimal in the regime of linear orders, so you can provide robustness that a greedy algorithm cannot.
{ "domain": "cs.stackexchange", "id": 21196, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, time-complexity, dynamic-programming", "url": null }
beginner, c, strings, reinventing-the-wheel, pointers Title: malloc and free of a char-array I wrote a function to reverse a char-array (string). Since I'm beginner and didn't work with malloc and stuff before, maybe someone could take a look, if this is fine, what I'm doing here? char* reverse_string(char* string) { // getting actual length of the string size_t length = strlen(string); // allocate some space for the new string char* new_string = malloc(sizeof(char)*(length+1)); // index for looping over the string int actual_index = 0; // iterating over the string until '\0' while(string[actual_index] != '\0') new_string[length-actual_index-1] = string[actual_index++]; // setting the last element of string-array to '\0' new_string[length] = '\0'; // free up the allocated memory free(new_string);
{ "domain": "codereview.stackexchange", "id": 24218, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, strings, reinventing-the-wheel, pointers", "url": null }
reinforcement-learning, exploration-exploitation-tradeoff, bayesian-optimization, optimal-policy an observation $y_k \in \mathcal{Y}$ from the underlying system, and earning a utility $g(x_k, d_k, y_k) \in \mathbb{R}$ based on the current belief state $x_k$, design choice $d_k$, and observation $y_k$. The goal is to choose a sequence of designs $(d_0, d_1, d_2, \ldots, d_{N-1})$ that maximizes the expected sum of utility across all experiments. Learning more information about the underlying system (e.g. the unknown parameters) is directly helpful in achieving that goal by producing more informative belief states $x_{k+1}$ after the conclusion of each experiment.
{ "domain": "ai.stackexchange", "id": 3890, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, exploration-exploitation-tradeoff, bayesian-optimization, optimal-policy", "url": null }
homework-and-exercises, kinematics, energy-conservation, velocity, brachistochrone-problem Title: What is the direction of the velocity $v=\sqrt{2gy}$ vector? Is it tangential? If so, why? I was trying to obtain the brachistochrone as a function of time, and I failed several times because I wrongly assumed that the $v=\sqrt{2gy}$ vector points downwards (vertical vector). However, in order to get the solution, the correct assumption was that this vector was the tangential velocity vector, the one pointing in the direction of movement through the curve (as I assumed it was instead vertical, I wrongly stated that $v_T = v \sin{(\arctan{\frac{dy}{dx}})}$). So I don't understand why it is actually $v_T=v$. I guess I had my reasons to believe $v$ was the vertical vector because $$\frac{dv}{dt}= \frac{dv}{dy} \frac{dy}{dt} = \frac{dv}{dy} v_y = g \Rightarrow \\ v_y dv = g \cdot dy, v_{y_0} = 0, y_0=0 \Rightarrow \frac{1}{2} v_y^2 = gy \Rightarrow v_y=\sqrt{2gy}$$
{ "domain": "physics.stackexchange", "id": 68658, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, kinematics, energy-conservation, velocity, brachistochrone-problem", "url": null }
deep-learning, image-recognition, research, noise $\theta_0$ and $\theta_1$ are the probability of false positives and false negatives in the labels. \begin{equation} \label{thetas} \begin{split} \theta_0 &= p(\tilde{m}_i = 1 | m_i = 0) \\ \theta_1 &= p(\tilde{m}_i = 0 | m_i = 1) \end{split} \end{equation} We don't try to minimize the difference between label and prediction anymore ($\epsilon = \tilde{m}_i - \hat{m}_i$) but the difference between the probability that the true unobserved label is 1 and the prediction (for an input $s$: $\epsilon = p(m_i = 1 | \tilde{m_i}, s) - \hat{m}_i$). Bayes law gives us: \begin{equation} p(m_i = 1 | \tilde{m}_i) - \hat{m}_i = \frac{p(\tilde{m}_i | m_i = 1) * p(m_i=1)}{p(\tilde{m}_i)} -\hat{m}_i \end{equation} and since $m_i$ can only be $0$ or $1$, \begin{equation} p(\tilde{m}_i) = p(\tilde{m}_i | m_i=1) * p(m_i=1) + p(\tilde{m}_i | m_i=0) * p(m_i=0) \end{equation} The definitions of $\theta_0$ and $\theta_1$ give us using the Bernoulli law those two distributions: \begin{equation}
{ "domain": "datascience.stackexchange", "id": 3496, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-learning, image-recognition, research, noise", "url": null }
333333331 is not prime; it is divisible by 17. This does not require a computer. Euler did calculations like this all the time. What's more, in your sequence 31, 331, 3331, 33331, …, every 15th number is divisible by 31. Proof: An noted in lab bhattacharjee's answer, the sequence has the form $$a_n = \frac{10^{n+1}-7}{3}$$ Now, 15 is the multiplicative order of $10 \pmod{31}$, so $$a_{15k+1} = \frac{10^{15k+2}-7}{3} \equiv \frac{10^2-7}{3} \equiv 0 \pmod{31}.$$ It has been proven that for all sequences that look like $ab$, $abb$, $abbb$, $abbbb$, … or $ab$, $aab$, $aaab$, $aaaab$, … where the $a$ and $b$ are digits, that periodically the numbers in the sequence are divisible by the first number $ab$. As an easy exercise, show that in the sequence 11, 111, 1111, 11111, …, that every second term is divisible by 11. HINT: $$\underbrace{33\cdots33}_{n \text{ digits}}1=10\frac{10^n-1}3+1=\frac{10^{n+1}-7}3$$ We need to find a prime divisor$(p)$ of $\frac{10^{n+1}-7}3$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226267447514, "lm_q1q2_score": 0.8342920772674258, "lm_q2_score": 0.8539127492339907, "openwebmath_perplexity": 397.88457424523915, "openwebmath_score": 0.7791048288345337, "tags": null, "url": "https://math.stackexchange.com/questions/542634/31-331-3331-33331-333331-3333331-33333331-are-prime" }
Claes Johnson, Numerical solution of partial differential equations by the finite element method. KANCHAN PATIL on 2 Dec 2016 Discover what MATLAB. Finally, we demonstrate applica- tion of the GWRM to stability problems formulated within the linearised ideal and resistive magnetohydro- dynamic (MHD) models. We covered numerical methods for hyperbolic problems (Lax-Friedrichs, Euler, Lax-Wendroff, upwind and Leapfrog). SWE were approximated by using finite difference method. % Reflective boundary conditions. t n= nΔt Current position in time. Without loss of generality, we take the 2D scalar conservation law u t + f x + g y = 0 as an example to illustrate how to implement Lax-Wendroff type time integration for the third-order central scheme on an overlapping grid. Time: Mon Wed , 10:30-11:50 PM, IGPP 303 - Munk Room. The results produced by this mode- l compare favorably. (b) In Figure 1, u(x;t = 0:5)) is plotted as solved by the Upwind, Lax-riedricFhs, Lax-Wendro and Beam-Warming
{ "domain": "eccellent.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241991754918, "lm_q1q2_score": 0.819992479357449, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 2782.480324868599, "openwebmath_score": 0.496159166097641, "tags": null, "url": "http://goud.eccellent.it/lax-wendroff-matlab.html" }
to 3 other curves (circles, lines, whatever). Thus E D is perpendicular to F D and A C to F B. Find the length of the radius of each circle. This option is useful when inscribing the Circle within a regular polygon. if the area of the curvilinear formed by the point of tangency of the three circles is 142 cm2, compute the radius of each circle. AC is transverse common tangent to two circles with centres P and Q and radii 6cm and 3 cm at the point A and C, respectively. Who knew? Related Tip: Construct Tangent Circles In XM. Identify the parts of each circle. Given three circles with radii of r, s and t. Come up with a formula that will use the information that matters and then return a number to tell us who did the best and worst job drawing a circle. The area of the 4 wedges should be the area of the circle (since that's. Find the length of the tangent drawn to a circle of radius 3 cm, from a point distant 5 cm from the centre. Externally Tangent Circles: Circles that intersect at
{ "domain": "fnaarccuneo.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464485047915, "lm_q1q2_score": 0.8153871968170521, "lm_q2_score": 0.8354835432479663, "openwebmath_perplexity": 369.11882035919484, "openwebmath_score": 0.6239675283432007, "tags": null, "url": "http://ahoy.fnaarccuneo.it/circle-tangent-to-three-circles.html" }
organic-chemistry, analytical-chemistry (there are many more followup papers on DP4 so please do a literature search if you're interested) Now, the issue with this is that most of the compounds shown there (and virtually all of the compounds assigned with these methods) is that they are polycyclic or otherwise structurally rigid. The reason for this is fairly obvious: you don't need to worry about (too much) conformational flexibility & hence averaging. So, I'd be wary of naively applying CP3/DP4 to your molecule.
{ "domain": "chemistry.stackexchange", "id": 16491, "lm_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, analytical-chemistry", "url": null }
optics, electromagnetic-radiation, lenses, telescopes Title: How does a telescope make an image larger by shrinking it? I saw these images of how a telescope works and it seems like it is shrinking the image down to the size of the eye. I don’t understand how that makes the image bigger. My thinking is that shrinking an image makes the image obviously smaller and you lose details. What am I not getting here? While a telescope can make an image larger, the diagram shown above doesn't really show that happening. Your eye perceives the size of an image based upon the angular extent it takes up in the visual field. A ball that takes up one degree of your field would look larger to you if it took up five degrees of your visual field instead. This could happen by moving it closer to you, or by using an optical magnifier.
{ "domain": "physics.stackexchange", "id": 65847, "lm_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, electromagnetic-radiation, lenses, telescopes", "url": null }
# Axis/Angle from rotation matrix With r=RotationMatrix[a,{x,y,z}] I can compute a 3D rotation matrix from axis/angle representation. Given a 3D rotation matrix r how can I compute a, x, y, z? Example: r = {{0.966496, -0.214612, 0.14081}, {0.241415, 0.946393, -0.214612}, {-0.0872034, 0.241415, 0.966496}} The result should be a=20. Degree and {x,y,z}={2, 1, 2}/3 (or equivalent). Edit: I am fine with any answer that gives the same r when applied to RotationMatrix. PS: Sorry if the tag is wrong, I did not found a matching tag...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357616286123, "lm_q1q2_score": 0.8686050251302311, "lm_q2_score": 0.8872045937171067, "openwebmath_perplexity": 1667.338213550114, "openwebmath_score": 0.4953833222389221, "tags": null, "url": "http://mathematica.stackexchange.com/questions/29924/axis-angle-from-rotation-matrix/29966" }
java, chess /** * The colour of the piece. */ private final boolean isWhite; /** * The image representing the piece. */ private final Icon image; /** * Constructs a new Pawn object. * * @param isWhite * The colour of the piece. */ public Pawn(boolean isWhite) { this.isWhite = isWhite; this.image = new ImageIcon((isWhite ? "White " : "Black ") + NAME + ".JPG"); }
{ "domain": "codereview.stackexchange", "id": 12548, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, chess", "url": null }
go, concurrency for id, seqNum := range checkpoints { go func(ctx context.Context, shardID, startSeqNum string) { defer wg.Done() if err := c.scanShard(ctx, shardID, startSeqNum); err != nil { errc <- fmt.Errorf("error in shard %q: %v", shardID, err) } }(rctx, id, seqNum) } OK, that's where we are now. Because the rctx is not in the for scope, and is shared by all routines, you can simply write the routine like so: go func(id, seqNum string) { defer wg.Done() // note: rctx, not ctx! if err := c.scanShard(rctx, id, seqNum); err != nil { errCh <- err } }(id, seqNum)
{ "domain": "codereview.stackexchange", "id": 33114, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "go, concurrency", "url": null }
evolution, mutations, antibiotic-resistance For instance this seems to be a counter-example. If that is the case then why bother about liberal use of broad-spectrum antibiotics? I mean as far as emergence of bacterial resistance is concerned! I mean its not the case that I'm going to eradicate the "useful bacterial" that could rival the pathogenic resistant bacteria, by that liberal use of broad-spectrum antibiotics. If that happens temporarily we can in principle replace them back, like with the use of probiotics. During my surfing of the web I found that page addressing the same point, but the responses are not that explicit, and far from being convincing? You're correct, this is extremely relevant, and it's unfortunate that your medical education didn't include good instruction about evolution. You point to some very useful and interesting studies. I'm particularly fond of the studies that demonstrate the early existence of antibacterial resistance genes, e.g., in ancient permafrost. Now to your question
{ "domain": "biology.stackexchange", "id": 9589, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "evolution, mutations, antibiotic-resistance", "url": null }
beginner, c, linked-list Also clean and simple. You probably noticed that the standard C library provides many types named something_t, therefore you followed this pattern. In general, following existing practice is a good idea. For your own type names, you should choose a different pattern though. I don't think that any future C standard will define and reserve the name node_t, but still the type names ending in _t are an indicator that the type name comes from the Standard C Library or from POSIX. You can even choose node as the type name. Then you have both struct node and plain node. This is no problem at all since these two names live in completely separate namespaces and won't influence each other. (Well, unless you use JetBrain's CLion, but that's a bug in CLion.) //printList void printList(node_t* head) {
{ "domain": "codereview.stackexchange", "id": 40562, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, linked-list", "url": null }
electric-circuits, electrons, electric-current, electrical-resistance, voltage We just described how electrons move. But why they move is another question. Something must "pull" in the electrons, otherwise they wouldn't want to move at all. Since we know that negative charge is attracted by positive, we can create such "pull" by placing a positive charge. That's the battery's positive end. Electrons are drawn towards it, and that makes the drift. That causes the current. As electrons keep arriving at the positive end, they would pile up. They would accumulate a bigger and bigger negative electric field, which would repel and soon prevent any further electrons from arriving. The current would stop again. So the battery has to carry them away. Inside the battery some complex chemistry takes the incoming charges and carries them to the negative end. They don't want to be here, because they are repelled from something negative. So they drift away into the ground, making space for others. A battery is like a pump in a water pipe that keeps the flow going.
{ "domain": "physics.stackexchange", "id": 37414, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electric-circuits, electrons, electric-current, electrical-resistance, voltage", "url": null }
ros2 Title: name rules for name of *.msg file Recently we found a strange thing when building msg file: in case one, we build one msg file whose name is "MyTest.msg", whatever content in it , which just build well, in case two , we want to build another msg file whose name is "MYTEST.msg", whatever content in it , which still build well. but as Naming of messages and services said names must use an upper camel case why case 2 work? test rep: https://github.com/lxbeyond/ros2msgtest
{ "domain": "robotics.stackexchange", "id": 31186, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
optics, laser, photonics A non-exhaustive list of complications I thought off the top of my head that you could keep in mind:
{ "domain": "physics.stackexchange", "id": 73584, "lm_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, laser, photonics", "url": null }
c# foreach (var principal in groupPrincipals) { foreach (var grp in new PrincipalSearcher(principal).FindAll()) { if (!(grp is GroupPrincipal group) || recipients.Any(m => m.Name == (group.DisplayName ?? group.Name) && m.Type == RecipientType.Group)) continue; recipients.Add(new Recipient() { Name = group.SamAccountName, DisplayName = group.DisplayName ?? group.Name, Type = RecipientType.Group }); } } } return recipients; } } Recipient.cs public class Recipient { public Guid? Id { get; set; } public string Name { get; set; } public string DisplayName { get; set; } public RecipientType Type { get; set; }
{ "domain": "codereview.stackexchange", "id": 33858, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#", "url": null }
magnetic-fields, fourier-transform, resonance, nuclear-magnetic-resonance Technically you do not need to have the same acquired and final matrix size, and very often in MRI these matrices are not the same. However, for computational efficiency the size of the matrix that is used as input to the FFT is the same as the size of the matrix for output to the FFT. So when the size of the acquired data and the final data differ there is always some zero padding or truncation done outside of the FFT itself. For example, in the case where you are doing interpolation the acquired matrix size is smaller than the final matrix. In this case the acquired data is “padded” with zeros to make a matrix equal to the final size, that matrix is passed to the FFT, and the result is the final matrix.
{ "domain": "physics.stackexchange", "id": 53642, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetic-fields, fourier-transform, resonance, nuclear-magnetic-resonance", "url": null }
electromagnetism, waves Title: Propagation mode for anisotropic medium Lets assume that we have sourceless anisotropic medium with $\epsilon_1 , \epsilon_2,\epsilon_3 $ as the diagonal values. Also assume $\vec{k}=k_z\hat{z}$ and $e^{i \omega t} e^{-i \vec{k} \cdot \vec{r}}$ form. We have $\vec{k} \cdot \vec{D} = 0 \implies \vec{k} \cdot \underline{\underline{\epsilon}} \vec{E} = 0 \implies k_z \epsilon_3 E_z = 0 $. From the curl equations and the fact that from above $E_z = 0$ and $\vec{k} \cdot \vec{E} = 0$,then we have $\vec{E} k_z^2 = \omega \mu^2_0 \underline{\underline{\epsilon}} \vec{E}$ which implies $E_x k_z^2 = \omega^2 \mu_0 \epsilon_1 E_x$ and $E_y k_z^2 = \omega^2 \mu_0 \epsilon_2 E_y$
{ "domain": "physics.stackexchange", "id": 69223, "lm_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, waves", "url": null }
thermodynamics, pressure, temperature, everyday-life, food And this is where the pressure cooker comes in. If you cook meat in water at atmospheric pressure then the temperature is the boiling point of water, which is $100$ºC. But the boiling point of water increases with pressure. A pressure cooker increases the pressure of its contents by about $1$ atmosphere, and this inceases the boiling point of the water to around $120$ºC. So you are now hydrolysing the collagen at $120$ºC instead of $100$ºC and as a result the reaction goes much faster, so your meat becomes tender faster. And that's why pressure cookers cook food faster.
{ "domain": "physics.stackexchange", "id": 35014, "lm_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, pressure, temperature, everyday-life, food", "url": null }