text stringlengths 1 1.11k | source dict |
|---|---|
java, beginner, recursion, fractals, turtle-graphics
Also, I have no idea what a Nodrag is.
Scope
It seems that step is always the same. There is no need to pass it as an argument if it is always the same. The purpose of a parameter is to allow a method to differ in its behavior. There is no need for it if it is never different.
The same applies to Turtle.
Code Duplication
This is the big one. There is a lot of code duplication. In fact, drawDragonCurve and drawNodragCurve are 100% identical except for one single character.
The only thing that is changing is the sign of the turn angle, or in other words, the direction of the turn. We can turn the sign into a parameter of the method, and pass it along accordingly.
I will keep the original drawDragonCurve method in place as an overload, which calls the new overload with the correct starting parameter, because a client should not need to know whether 1 or -1 is the correct starting value.
public class Dragon {
private static double step;
private static Turtle turtle; | {
"domain": "codereview.stackexchange",
"id": 39394,
"lm_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, recursion, fractals, turtle-graphics",
"url": null
} |
machine-learning, deep-learning, algorithms, opencv
Title: Is there a way (like planning algorithms) to draw a successive polyline to fill a specific shape (like triangle)? there is a specific shape (like triangle) area, i am trying to develop an program to draw a successive polyline inside the triangle to fill the triangle, one line 3 layers
this post demonstrates some algorithms to solve this category of problems.
none of them is suitable for this task, any ideas? Would not it be easier to simply apply geometric computation to your triangle to get smaller triangles whose vertices can be used for the polyline.?
With Wolfram Language
You have a triangle.
shp = Triangle[];
Graphics[{LightGray, shp}] | {
"domain": "datascience.stackexchange",
"id": 5235,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, deep-learning, algorithms, opencv",
"url": null
} |
general-relativity, black-holes, hawking-radiation
hole is first formed. Any outgoing photon mode, extended back, comes from a place where its wavelength is trans-trans-trans Planckian, this is right the moment of formation of the black hole horizon. The trans-Planckian property led many people to be skeptical of Hawking's result. | {
"domain": "physics.stackexchange",
"id": 1879,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, hawking-radiation",
"url": null
} |
resource-request, complexity-theory, machine-learning
However for algorithmic complexity, all we can really say is there is some parameter $n$ for which a classical learner will require runtime scaling as $C(n)$ to implement any given $h$ on some pattern in $S$ while a quantum learner will require runtime scaling as $Q(n)$.
There are a few comments that I think demonstrate why these should not be thought of as interchangeable: | {
"domain": "quantumcomputing.stackexchange",
"id": 2954,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "resource-request, complexity-theory, machine-learning",
"url": null
} |
slam, navigation, ros-melodic, 3dslam, rtabmap
Original comments
Comment by sisaha9 on 2020-11-29:
Wow that is amazing. I didn't think the Lidar information could actually be useful like that. How do you recommend combining it with a stereo camera? Like would RTABMAP do it automatically or would I have to change a parameter
Comment by matlabbe on 2020-11-29:
I edited the answer :)
Comment by sisaha9 on 2020-11-29:
Thanks! Just curious but this is likely not possible if we use a 2D Lidar right. The intensity channels and stuff come from the fact that the Velodyne Lidar is a 3D Lidar. So we would have to rely more on a stereo map or is there a way to use this 3D data with a 2D Lidar?
Comment by matlabbe on 2020-11-29:
With a 2D lidar tilted, it could be possible along with stereo odometry to assemble them in 3D. Some 2D lidars (like SICK) have also an intensity (or reflectivity) channel.
Comment by sisaha9 on 2020-12-01: | {
"domain": "robotics.stackexchange",
"id": 35787,
"lm_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, navigation, ros-melodic, 3dslam, rtabmap",
"url": null
} |
cosmology, space-expansion, phase-transition, cosmological-inflation
Of course, if the bubbles are far enough, e.g. (or i.e.) behind the horizons of each other, their growth isn't enough to overcome the exponentially growing separation and they cannot collide. | {
"domain": "physics.stackexchange",
"id": 3340,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, space-expansion, phase-transition, cosmological-inflation",
"url": null
} |
series in my lectures for ENEE 322 Signal and System Theory. This study material covers everything that is necessary for GATE EC and GATE EE as well as other exams like ISRO, IES, BARC, BSNL, DRDO, etc. Download the free PDF from httptinyurl. • For digital signals, we use discrete Fourier transforms, as discussed in this learning module. Let us consider the simplest case of solving the linear wave equations on a circle: (2. integrate the product over 1 period, T o, of x(t) 3. Fourier Series Method Colorado State University Dept of Electrical and Computer Engineering ECE423 – 6 / 21 Basic Idea: ANY function of the discrete-time frequencyω, such as the frequency response H(ejω) of a filter, is periodic in ω with a period of 2π. Handout D Discrete-Time Periodicity. If a string were a pure infinitely thin oscillator, with no damping, it would produce pure notes. Fourier Series Fourier series started life as a method to solve problems about the ow of heat through ordinary materials. Math 201 | {
"domain": "xnwe.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.989013057045568,
"lm_q1q2_score": 0.8108852189556399,
"lm_q2_score": 0.8198933403143929,
"openwebmath_perplexity": 1254.4788592244765,
"openwebmath_score": 0.8312659859657288,
"tags": null,
"url": "http://pffj.xnwe.pw/fourier-series-lecture-pdf.html"
} |
forces, fluid-dynamics, reference-frames, fluid-statics, buoyancy
In an accelerating car, for all intents and purposes the acceleration can be considered a change in the amount and direction of gravity, from pointing straight down to pointing downwards and backwards. The balloon doesn't know and doesn't care if the acceleration is from gravity or from the acceleration of the car; it just tries to move in the direction it naturally moves, namely, against the direction of the acceleration. Thus, it moves forwards when you accelerate. Hopefully you find this explanation intuitively satisfying.
Another more rigorous way to view the problem is through Lagrangian minimization. The balloon can be considered a low-density object embedded in a higher-density fluid constrained within the confines of the car. Under the influence of gravity pointing sideways, the total system potential energy decreases the farther forward the balloon is situated. Since the force is the gradient of the potential, the balloon will try to move forward. | {
"domain": "physics.stackexchange",
"id": 100121,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, fluid-dynamics, reference-frames, fluid-statics, buoyancy",
"url": null
} |
deep-rl, deep-neural-networks, data-augmentation
They are about a rather interesting approach to improving model generalization. Here's the thing, though - I can easily see how to use this for supervised learning, as there is always a "reward"/prediction on each "observation"/row-of-data .
However, even though the second paper (mixreg) talks about applying this to RL specifically, I don't understand how you can manage this.
How would you preserve the Markov property if you're mixing observations/rewards that aren't necessarily in any way sequential? Because each environment individually satisfies the Markov property, the distribution of the next state $s_{t+1}$ in any transition depends only on $s_t$, $a_t$, and the transition probabilities of the active environment $e_t$:
$$P(s_{t+1} | s_t, a_t) = P_{e_t}(s_t,a_t,s_{t+1})$$ | {
"domain": "ai.stackexchange",
"id": 3369,
"lm_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-rl, deep-neural-networks, data-augmentation",
"url": null
} |
c++, visitor-pattern
None of the member functions modify member data (on the shape classes, or the helpers), so they should all be marked const. e.g. virtual void visit(Collider& c) const = 0;
None of the function arguments passed by reference (to the shape classes or helpers) are modified, so they should be passed by const& instead. e.g. virtual void collide(A const& base) = 0;
(Note: I guess if you intended to implement collision response (i.e. modify the objects) inside the performCollision calls, then you'd have to leave things non-const. Instead, I'd suggest returning enough information (e.g. as a std::optional<CollisionData>) to resolve the collision as a separate step later on. This is more flexible (e.g. it allows you to process collisions in groups for optimization or accuracy)). | {
"domain": "codereview.stackexchange",
"id": 41752,
"lm_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++, visitor-pattern",
"url": null
} |
ros-melodic, cmake
Title: Adding lines into CMakeList.txt makes an error. I need help
Hello,
Firstly i need to say im totally beginner on ROS.I managed to install it and my Professor wanted to me complete these tasks;
-Create a ROS package with your name.
-Create two nodes, a chatter which publishes std_msgs and a listener
to listen to chatter.
-The message you are required to send will be assigned for each one
separately.
-The listener should get the message and print it using ROS_INFO
function.
So i managed to create work space , but i stucked at somewhere that wants me to add these lines into my_package/CMakeLists.txt.
lines are ;
add_executable(name_of_node_chatter src/01.cpp) ,
target_link_libraries(name_of_node_chatter ${catkin_LIBRARIES}) ,
add_dependencies(name_of_node_chatter my_package_generate_messages_cpp) | {
"domain": "robotics.stackexchange",
"id": 34624,
"lm_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, cmake",
"url": null
} |
general-relativity, black-holes, reference-frames, time-dilation, observers
Title: How and why time stops inside a black hole? I have recently learned that black holes are dead stars, who are collapsed, and attracted other objects towards it and this process results in a very very large gravity. So light is also unable to escape.
Also if someone goes to its event horizon and returns safely, then he will be younger and in earth, time will have passed much.
So my question is, how time slows down there? To answer this appropriately, we have to take a look at the Schwarzschild-metric, which is the solution to Einstein's field-equations for a spherical mass-distribution (like black holes). It is (in natural units $G=c=1$)
$ds^2 = -( 1-\frac{2M}{r})dt^2 + \frac{1}{1-\frac{2M}{r}} dr^2 +r^2 d\Theta^2+ r^2 sin \Theta d\phi^2$ | {
"domain": "physics.stackexchange",
"id": 42275,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, reference-frames, time-dilation, observers",
"url": null
} |
Finally, subtracting the two contributions and taking the real part, we get the first two terms of the expansion:
$$\int_0^{\pi/4} dt \, \cos{x t^2} \, \tan^2{t} = \frac{2}{\pi x} \sin{\left (\frac{\pi^2}{16} x \right )} - \frac14 \sqrt{\frac{\pi}{2}} x^{-3/2} + O(x^{-2})$$
The nice part is that we can keep adding on terms if we want.
Here is a graph verifying the above asymptotic expansion:
The blue plot is the log-log error between a numerical value of the integral and the first term in the expansion. The red plot is the log-log-error with both terms. Note that the first plot has a supremum that has slope -1.5, and the red has one that has slope -2.0. This indicates that the expansion above is correct.
• thanks a lot, a very inspiring and pedagocial answer! BIG (+1) – tired Oct 5 '16 at 6:55
I know that this may not be the direction that OP want, but we can revive @Olivier Oloa's idea to give an elementary solution. Taking integration by parts, we get | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357237856482,
"lm_q1q2_score": 0.8284819731598847,
"lm_q2_score": 0.843895106480586,
"openwebmath_perplexity": 580.8585202651993,
"openwebmath_score": 0.9926083087921143,
"tags": null,
"url": "https://math.stackexchange.com/questions/1953633/asymptotic-evaluation-of-int-0-pi-4-cosx-t2-tan2tdt?noredirect=1"
} |
electromagnetism, magnetic-fields, integration
Title: Already integrated formula of magnetic field for a finite line? I was looking for a formula to simulate a magnetic field due to a straight finite line. The closest to what I wanted to find was in these lecture notes (formula 9.11.2 page 9-50),
\begin{align}
\mathbf{B}&=\int d\mathbf{B}\\
&=\int_{-L/2}^{L/2}\frac{\mu_0Iy}{4\pi\left[(x-x')^2+y^2\right]^{3/2}}dx'\hat{\mathbf{k}}\\
&=-\frac{\mu_0Iy}{4\pi}\left[\frac{(x-L/2)}{\left[(x-L/2)^2+y^2\right]^{1/2}}-\frac{(x+L/2)}{\left[(x+L/2)^2+y^2\right]^{1/2}}\right]\hat{\mathbf{k}}
\end{align}
Is there the same thing for a 3d point? I'm looking for $B_x$, $B_y$ and $B_z$. In principle, you could use exactly the same steps as are in those notes to derive the full 3D expression. You would have to substitute $\vec{r} = x \hat{\imath} + y \hat{\jmath} + z \hat{k}$ in step 2, and then follow the logic through from there. | {
"domain": "physics.stackexchange",
"id": 23570,
"lm_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, integration",
"url": null
} |
A comment on implementation:
For simplicity, the formula uses the convention that $0^0 = 1$, which occurs when $i = n$. If you try to use the formula in some computer algebra system that doesn't have that convention, like Mathematica, you will need to consider the case $i = n$ separately from the rest of the sum on $i$. This would be
\begin{align} E[C_A] = &\sum_{j=0}^{k-1} \Bigg(\sum_{i=1}^{n-1} \sum_{l=0}^j \sum_{m=0}^j \binom{b}{l} \binom{a}{m} \left( \left(1 - \frac{i}{n}\right)^l \left( \frac{i}{n}\right)^{b-l} - \left(1- \frac{i-1}{n}\right)^l \left(\frac{i-1}{n}\right)^{b-l} \right) \\ & \times \left(1 - \frac{i}{n}\right)^m \left(\frac{i}{n}\right)^{a-m} + \left(1-\sum_{l=0}^j \binom{b}{l}\left(1-\frac{n-1}{n}\right)^l \left(\frac{n-1}{n}\right)^{b-l}\right) \Bigg). \end{align}
Example:
In the case of standard Risk, with $n = 6, a = 3, b = 2, k = 2$ case, the formula yields $\frac{2387}{2592} = \frac{7161}{6^5}$, in agreement with alex.jordan's answer. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9935117304033434,
"lm_q1q2_score": 0.8279177586198503,
"lm_q2_score": 0.8333245932423308,
"openwebmath_perplexity": 738.3922197399096,
"openwebmath_score": 0.9514416456222534,
"tags": null,
"url": "http://math.stackexchange.com/questions/85679/who-has-the-upper-hand-in-a-generalized-game-of-risk/86789"
} |
everyday-life, velocity, flow
Observer moving
When the observer's vehicle is moving relatively slowly, I don't have an explanation for why any objectively measured forces would be much reduced.
However a slowly moving vehicle is producing a lot more shaking and vibration than a stationary one and this may mask a human observer's perception of additional motions. Our perception may be affected in a non-linear way by a base level of shaking induced by motion. Also, as a driver, I notice bumping and shaking much much less than I do as a passenger, this is perhaps due to my concentration being focussed elsewhere and my anticipation of motion induced by control inputs. If so the former might be a factor in the passing vehicle observation when the observer is actively driving.
Maybe some experimentation with phone accelerometers would produce some useful data? | {
"domain": "physics.stackexchange",
"id": 18040,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "everyday-life, velocity, flow",
"url": null
} |
python, object-oriented, file, classes
is not a particularly useful __repr__. Note the guidance in the data model documentation:
If at all possible, this should look like a valid Python expression
that could be used to recreate an object with the same value (given an
appropriate environment). If this is not possible, a string of the
form <...some useful description...> should be returned.
In this case, that could be:
"EditFile({!r})".format(self.file_name)
For all of your file access, you should use the context manager provided by open, e.g.:
@property
def read(self): # reads the file
with open(self.file_name) as f:
return f.read()
This will handle closing the file for you after the method ends.
It seems weird that read is a property but read_bytes is a method - as the latter requires an argument, and both names describe actions, perhaps they should both be methods? If you still wanted the property then a name describing a thing, like content, would be better for it. | {
"domain": "codereview.stackexchange",
"id": 28736,
"lm_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, file, classes",
"url": null
} |
matlab, fft, noise
My question is are there ways to remove noise from an audio file without using the frequency domain?
Here's the audio file if you'd like to listen for yourself: https://drive.google.com/file/d/1OM4OI4egSE7E5M2-l2WypUwtJ0pqEhaB/view?usp=sharing I think the lesson being taught in your assignment is that multiplication in the frequency domain (as you had done by masking an FFT) is convolution in the time domain. Taking the inverse FFT and convolving that with the signal would result in a similar filtering of the tone. To note that using the FFT and inverse FFT results in circular convolution, rather than linear convolution. Ultimately it is the impulse response of the filter in the time domain that is convolved with the signal, which is equivalent in the frequency domain to the product of the Fourier Transform of the filter’s impulse response with the Fourier Transform of the signal. | {
"domain": "dsp.stackexchange",
"id": 10741,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, fft, noise",
"url": null
} |
By Newton’s second law, F = ma, plug in (6) and (7), we have
S(p(x, t)- p(x + dx, t))= ÏSdx ut
Divide both sides by Sdx
(p(x, t)- p(x + dx, t)/dx=Ïut
which is
Ït+(Ïu)x=0
(1)
Consider a change in mass for a fixed volume in the pipe, it equals to the difference of the mass that flowed in and the mass that flowed out
dm = dt Ï dx S (u(x, t) – u(x + dx, t))
Also by the density formula
dm = (Ï(x, t + dt)- Ï(x, t)) S dx
From the above two equations
dt Ï dx S (u(x, t) – u(x + dx, t)) = (Ï(x, t + dt)- Ï(x, t)) S dx
Divide both sides by dt dx S:
Ï (u(x, t) – u(x + dx, t)) / dx = (Ï(x, t + dt)- Ï(x, t))/ dt
Then
Ït+(Ïu)x=0
(2)
« Last Edit: September 27, 2016, 11:12:30 AM by luyu »
#### XinYu Zheng
• Full Member
• Posts: 27
• Karma: 0
##### Re: Bonus Topic 2 (air pipe)
« Reply #2 on: October 14, 2016, 07:41:13 PM »
No one has taken up (b) and (c) for a while, so I will finish them. | {
"domain": "toronto.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631663220388,
"lm_q1q2_score": 0.8132188783399156,
"lm_q2_score": 0.824461928533133,
"openwebmath_perplexity": 4451.095490327987,
"openwebmath_score": 0.9432092308998108,
"tags": null,
"url": "http://forum.math.toronto.edu/index.php?PHPSESSID=vr7acj5rroo41qop46p208c185&topic=774.0"
} |
javascript, jquery, mvc, backbone.js, mvvm
JS:
var UP = 0;
var RIGHT = 45;
var LEFT = 315;
function print(stuff) {
console.log(stuff);
}
//arrow should technically be a part of Display, but it's just too cumbersome to put in with the rest of the code.
function arrow(direction) {
return "<span class='" + direction + "'><svg 'version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='30' height='30' viewBox='0 0 32 32' ><g transform='rotate(" + direction + " 15 15)'> <path d='M27.414 12.586l-10-10c-0.781-0.781-2.047-0.781-2.828 0l-10 10c-0.781 0.781-0.781 2.047 0 2.828 0.781 0.781 2.047 0.781 2.828 0l6.586-6.586v19.172c0 1.105 0.895 2 2 2s2-0.895 2-2v-19.172l6.586 6.586c0.39 0.39 0.902 0.586 1.414 0.586s1.024-0.195 1.414-0.586c0.781-0.781 0.781-2.047 0-2.828z' fill='#000000' / ></g></svg></span>";
} | {
"domain": "codereview.stackexchange",
"id": 7746,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, mvc, backbone.js, mvvm",
"url": null
} |
electrochemistry
Title: How&why does change in concentration affect cell potential
I'm a bit confused about why (in 1c) if the air pressure is lower, and there is a lower concentration of oxygen, why the cell potential decreases.
It checks out fine with the Nernst Equation, but conceptually, voltage is the driving force or energy of the current. Wouldn't there just be less electrons, not a lower voltage?
Like how the standard reduction potential isn't based on moles of reactant?
I'm a bit confused about why (in 1c) if the air pressure is lower, and there is a lower concentration of oxygen, why the cell potential decreases. | {
"domain": "chemistry.stackexchange",
"id": 10710,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrochemistry",
"url": null
} |
electromagnetism, magnetic-fields, inductance
(Is a solenoid somehow different from a coil having many turns?) Let's discuss the matter both qualitatively and quantitatively
Quantitative Discussion
First of all let's derive the expression for the magnetic field at the axis of a current carrying coil | {
"domain": "physics.stackexchange",
"id": 42833,
"lm_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, inductance",
"url": null
} |
temperature, thermodynamics
Or you come out of a spa, into a colder pool and you feel freezing cold?
To add some depth to this question, may I ask why this happens, and how your body actually reacts in this situation? Your sensation of heat is dependent on the change in temperature of your skin, which is roughly proportional to the difference in temperature between skin and material.
However, temperature difference is much less important than the transfer of heat between your skin and an object, which is heavily dependent on the type of material you are touching.
Why does a cold piece of steel feel so much colder than the surrounding air, despite them being in thermal equilibrium? The answer is that steel is a much better conductor of heat, and can therefore draw heat from your hand at a much faster rate than air, which is a poor conductor of heat. | {
"domain": "biology.stackexchange",
"id": 8180,
"lm_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, thermodynamics",
"url": null
} |
neural-network, keras, tensorflow
(If this is for research or a real-world application, even if you achieve deterministic results you should still report the impact of randomness on instance-level model performance you observed, e.g. by running the code with 10 different random seeds and reporting mean and standard deviation for validation set and single example performance.) | {
"domain": "datascience.stackexchange",
"id": 10963,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-network, keras, tensorflow",
"url": null
} |
python, graph, depth-first-search
I should have to guess that, and it should be written in a docstring related to the function. This applies for all similar coded segments where it is not intuitive what the variable, function or variable values means.
Add blank lines to enhance readability – The common guidelines says two blank lines between functions, but I would like to extend that to have a blank line around most if, for and while blocks, and the occasional block of code.
You've done this to some extent, but there are two places I really would like to do this and that after the while and for loop where you do an immmediate return statement, which now seems connected to the inner loop code. | {
"domain": "codereview.stackexchange",
"id": 17095,
"lm_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, graph, depth-first-search",
"url": null
} |
electrostatics, electric-fields
Title: Termination of field lines between two positive charges Suppose we have two charges of +Q separated by some distance. Now, if we connect the particles along a line, and draw the field line along that line, then the field line will point away from the closer charge until we reach the midpoint in which case, the field line vanishes. This seems to violate the rule that field lines always begin on positive charges and end on negative charges. Field lines do not end at the midpoint between equal charges. As the electrostatic field approaches the midpoint, its direction bends sharply away, and near the midpoint, field lines turn, symmetrically on each side, and perpendicular to the line that joins the charges. The field is zero exactly at the midpoint, so field lines do not end there. Field line density is proportional to field strength, so they do not pass directly through the midpoint. | {
"domain": "physics.stackexchange",
"id": 59248,
"lm_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",
"url": null
} |
java, algorithm, linked-list, homework
}else {
Node temp = tail;
newNode = new Node(data);
tail = newNode;
temp.next = tail;
}
size++;
}
public String getNumberAsString(){ //addLast methods adds numbers to string one by one and header node represents unit digits, after that tens digist and so on ...
//This LinkedList is single directory so we have to go header to tail. For example our number is 123456. But list keeps it header =6, secondNode = 5.
//if I get with this way, it returns me 654321, as you see I need to reverse it to become 123456.
currentNode = header;
StringBuilder sb = new StringBuilder();
while(currentNode != null){
sb.append(currentNode.data);
currentNode = currentNode.next;
}
sb = sb.reverse();
return sb.toString();
} | {
"domain": "codereview.stackexchange",
"id": 24519,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, algorithm, linked-list, homework",
"url": null
} |
filters, lowpass-filter, aliasing, sinc
Can one predict the amount of ringing by integrating the negative lobes in the spatial domain?
What effect does the large support have on ringing? Intuitively, for a linear-phase filter the sharper the transition band of a given filter is, the more that filter will ring. Do a search on "Gibbs phenomenon".
I'm editing this. I had said "One can probably assess the likely amount of ringing by integrating the negative lobes, or by comparing the width of the response at the first zero-crossing vs. the width where the response is below some percentage of the maximum." Then I realized that there are filters that ring, but whose impulse response never goes negative. A readily accessible example of this is a piecewise triangular (in frequency) filter, i.e.
$$H(\omega) = \begin{cases}
1 + \omega & -1 < \omega \le 0 \\
1 - \omega & 0 < \omega \le 1 \\
0 & \mathrm {otherwise}
\end{cases}.$$ | {
"domain": "dsp.stackexchange",
"id": 11531,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, lowpass-filter, aliasing, sinc",
"url": null
} |
lambda-calculus, parsing
Title: Is classical lambda calculus grammar an `LL(k)` one? I am playing with a lambda calculus and faced a question I find hard to reason about.
On the screenshot you may find the lambda calculus grammar. Is it an instance of the LL(k) grammar such that a recursive descent parser could handle it? How do you proof such a statement? What would be the best hint here? After some trivial factorization, I think it should be easy to prove it's LL(1) by constructing the LL(1) table for it. The grammar would be:
M ::= x | ( N )
N ::= λx.M | M M
Without the factorization, if you consider the simpler, obvious grammar:
M ::= x | (λx.Μ) | (Μ Μ)
it's not LL(1), as the second and third alternative share a common prefix (, but it's LL(2). In any case, you can definitely construct a recursive descent parser for it. | {
"domain": "cstheory.stackexchange",
"id": 5594,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lambda-calculus, parsing",
"url": null
} |
ros, bagfile, vlp16, velodyne
Comment by dwolfe on 2015-07-30:
Once I have the bag file how can I view it?
Comment by joq on 2015-07-31:
Use rosbag play to publish /velodyne_packets, then use velodyne_pointcloud and rviz to view the results, as if using with the actual device.
Comment by Bill5785 on 2017-01-30:
After I run the second command, it says
"[ERROR] [1485795341.945746381]: unknown Velodyne LIDAR model: VLP16"
Do you have any idea?
Comment by joq on 2017-01-30:
Please open a new page to ask a new question.
Comment by Bill5785 on 2017-01-30:
Hi, I have posted the new question here http://answers.ros.org/question/253321/meet-error-when-implementing-velodyne_driver-command-for-vlp-16/
Can you help me
Comment by Bill5785 on 2017-02-07:
@joq Should there be /velodyne_pakcets in rostopic list?? after I run:
rosrun velodyne_driver velodyne_node _model:=VLP16 _pcap:=/your/pcap/path/data.pcap _read_once:=true | {
"domain": "robotics.stackexchange",
"id": 22102,
"lm_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, bagfile, vlp16, velodyne",
"url": null
} |
statistical-mechanics, temperature, conformal-field-theory, ads-cft
For example, stress energy tensor is going to get a vev. If the periodic time direction is the $0$-th coordinate, then $T^{00}$ will be equal to energy density at this temperature. Rotation invariance in other components means that the only other vev's of T are going to be $T^{11}=T^{22}=\ldots=T^{dd}$ and that is going to be proportional to pressure or something. Tracelessness of $T$ then implies a relation between pressure and energy density. | {
"domain": "physics.stackexchange",
"id": 28210,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, temperature, conformal-field-theory, ads-cft",
"url": null
} |
moveit, roslaunch
[roslaunch.pmon][INFO] 2017-01-02 11:25:28,200: ProcessMonitor.shutdown <ProcessMonitor(ProcessMonitor-1, started daemon 140261644834560)>
[roslaunch.pmon][INFO] 2017-01-02 11:25:28,210: ProcessMonitor._post_run <ProcessMonitor(ProcessMonitor-1, started daemon 140261644834560)>
[roslaunch.pmon][INFO] 2017-01-02 11:25:28,210: ProcessMonitor._post_run <ProcessMonitor(ProcessMonitor-1, started daemon 140261644834560)>: remaining procs are [<roslaunch.nodeprocess.LocalProcess object at 0x7f9135a4e950>, <roslaunch.nodeprocess.LocalProcess object at 0x7f9135a4ee90>]
[roslaunch.pmon][INFO] 2017-01-02 11:25:28,211: ProcessMonitor exit: killing rosout-1
[roslaunch][INFO] 2017-01-02 11:25:28,211: [rosout-1] killing on exit
[roslaunch][INFO] 2017-01-02 11:25:28,211: process[rosout-1]: killing os process with pid[9974] pgid[9974]
[roslaunch][INFO] 2017-01-02 11:25:28,211: [rosout-1] sending SIGINT to pgid [9974]
[roslaunch][INFO] 2017-01-02 11:25:28,211: [rosout-1] sent SIGINT to pgid [9974] | {
"domain": "robotics.stackexchange",
"id": 26626,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "moveit, roslaunch",
"url": null
} |
genetics, bioinformatics, database, yeast
The orthologs of C. Albicans with C. parapsilosis
orf19.2119 CPAG04608
orf19.4998 NONE
orf19.5908 CPAG01691
orf19.610 CPAG00178
orf19.723 CPAG00564
orf19.4056 CPAG05034
The orthologs of C. Albicans with D. hansenii
orf19.2119 DEHA2A07282g
orf19.4998 NONE
orf19.5908 DEHA2G13794g
orf19.610 DEHA2E10978g
orf19.723 DEHA2E05984g
orf19.4056 DEHA2E07172g DEHA2F25916g
The orthologs of C. Albicans with C. guilliermondii
orf19.2119 PGUG02096.1
orf19.4998 NONE
orf19.5908 PGUG04378.1
orf19.610 PGUG03651.1
orf19.723 PGUG05571.1
orf19.4056 PGUG05533.1 | {
"domain": "biology.stackexchange",
"id": 3248,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "genetics, bioinformatics, database, yeast",
"url": null
} |
biochemistry, botany
BONUS: Another interesting point here is runny nose. propanethial-S-oxide is actually the compound responsible for the smell and flavor of onions. But, it causes tears by exciting the lachrymal glands i.e. reflexive lachrymation. propanethial-S-oxide excites the trigeminal nerve (the fifth cranial nerve) causing activation of lachrymal glands. Interestingly, the nerve endings of trigeminal nerve are also present in the nose, along with the eyes. So, this compound can also activate the lachrymal glands from your nose, and since the lachrymal duct is joined from eyes to nose, you can also experience runny nose along with tears and irritation in eyes.
References: | {
"domain": "biology.stackexchange",
"id": 7160,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, botany",
"url": null
} |
ros, planning-environment, collision-object, planning-scene, arm-navigation
Comment by yangyangcv on 2012-11-09:
well, i have not test the function isObjectInCollision(), but i do test the function getAllEnvironmentCollisionsForObject() and it does work. and of course, you need an instance of CollisionModel. | {
"domain": "robotics.stackexchange",
"id": 11019,
"lm_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, planning-environment, collision-object, planning-scene, arm-navigation",
"url": null
} |
javascript, jquery, html, queue, promise
Element.prototype.next = function () {
if (this.queue.length) this.runTask(this.queue.shift())
}
Element.prototype.runTask = function (callBack) {
this.active = true
callBack().then(() => {
this.active = false
this.next()
})
}
Element.prototype.register = function(callBack){
if (this.active) {
this.queue.push(callBack)
} else {
this.runTask(callBack)
}
}
Element.prototype.addClass = function (className) {
that = this
let callBack = () => new Promise(resolve => setTimeout(function () {
that.classList.add(className)
resolve()
}, 0))
this.register(callBack)
return this
}
Element.prototype.removeClass = function (className) {
that = this
let callBack = () => new Promise(resolve => setTimeout(function () {
that.classList.remove(className)
resolve()
}, 0))
this.register(callBack)
return this
} | {
"domain": "codereview.stackexchange",
"id": 38069,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, html, queue, promise",
"url": null
} |
quantum-spin, field-theory, representation-theory, lorentz-symmetry, poincare-symmetry
Lets take the $(1, \tfrac{1}{2})$ representation for example. What kind of particles does this correspond to, anyway? I constructed the representation and then looked at it when restricted to the $SO(3)$ subgroup. Once restricted, the $(1, \tfrac{1}{2})$ broke up into $\tfrac{3}{2} \oplus \tfrac{1}{2}$. Lets imagine that these particles are massless. Does it correspond to six massless particles, with helicities $\tfrac{3}{2}, \tfrac{1}{2}, -\tfrac{1}{2}, -\tfrac{3}{2}, \tfrac{1}{2}, -\tfrac{1}{2}$? Can these particles be made massive, by some sort of generalization of the Majorana procedure? Would it then correspond to only two massive particles, one spin $\tfrac{3}{2}$ and one spin $\tfrac{1}{2}$?
It seems very strange to me that you can have some irreducible, non-trivial way for the rotations to interact with the boosts when it comes to the Lorentz group, but this is not the case when it comes the Poincaré group. | {
"domain": "physics.stackexchange",
"id": 53438,
"lm_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-spin, field-theory, representation-theory, lorentz-symmetry, poincare-symmetry",
"url": null
} |
a. f(1)
b. Maximum value of f(x) in [1,2]
c. Minimum value of f(x) in [1,2]
## The Attempt at a Solution
Honestly, I don't know where to begin with. I think I need to somehow find f(x) but I don't see how. I am completely clueless. :(
Part b and c are easy once I have f(x).
Try putting ##f(x) = \frac{k}{x}##. You'll get two solutions for k, one positive, the other negative.
Only one of these fulfills the parameters of the question (strictly increasing over the given domain).
By the way, note that the values you get for k are rather special, in fact you might even say they're worth their weight in gold.
Try putting ##f(x) = \frac{k}{x}##. You'll get two solutions for k, one positive, the other negative.
Only one of these fulfills the parameters of the question (strictly increasing over the given domain).
By the way, note that the values you get for k are rather special, in fact you might even say they're worth their weight in gold. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.959154287592778,
"lm_q1q2_score": 0.8298833835322903,
"lm_q2_score": 0.8652240773641087,
"openwebmath_perplexity": 921.8959393292563,
"openwebmath_score": 0.8916524052619934,
"tags": null,
"url": "https://www.physicsforums.com/threads/functional-equation-problem.710517/"
} |
python, python-3.x, object-oriented, console, file-system
def start_task(self, processor_no, task_name, task_size):
"""
Notify the progress printer of a newly started task
:param int processor_no: The index of the processor starting the task
:param str task_name: The name of the task
:param int task_size: The size of the task
"""
pbar = self.worker_pbars[processor_no]
pbar.n = 0
pbar.total = task_size
pbar.start_t = time()
pbar.set_description(truncate_or_pad_string(task_name, 21))
pbar.refresh()
def chunk_processed(self, processor_no, chunk_size):
"""
Notify the progress printer that a chunk of a certain size has finished processing
:param int processor_no: The index of the processor starting the task
:param int chunk_size: The size of the chunk that is finished
"""
pbar = self.worker_pbars[processor_no]
pbar.n += chunk_size
pbar.refresh() | {
"domain": "codereview.stackexchange",
"id": 36479,
"lm_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, object-oriented, console, file-system",
"url": null
} |
javascript, jquery, array
Same logic can be used, in your case.
As join will add the glue between the elements of array, the prefix and suffix need to be concatenated.
The selector can be created using
'.generatorContainer[data-generator="'
+ list.join('"], .generatorContainer[data-generator="')
+ '"]'
Line #1 is the prefix
Line #2 will give firstElement"], .generatorContainer[data-generator="secondElement"], ..., .generatorContainer[data-generator="lastElement
Line #3 will add suffix to make the selector valid.
With this, the code will be
var selector = '.generatorContainer[data-generator="' + list.join('"], .generatorContainer[data-generator="') + '"]';
$(selector).doMagic(); // He He
To add to the complexity, not() can be used to exclude elements
$('.generatorContainer').not(selector).hide(); // Hide those except in array
$(selector).show(); // Show only those in array | {
"domain": "codereview.stackexchange",
"id": 23581,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, array",
"url": null
} |
The left-multiplication map $x\mapsto ax$ is bijective on $G$; its injectivity follows from the cancellative property of the group's operation, $ah=ag\iff h=g$, and overall bijectivity is a consequence of the fact that it has an inverse map, $x\mapsto a^{-1}x$. I like to view a subgroup $H\le G$ as a "puck" and the overgroup $G$ as a "air-hockey table" on which $H$ resides, and to move $H$ around we apply left multiplication by various elements. If you left-multiply by an element $a\in H$, you have not moved the puck at all since $a\in H\iff H=aH$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639669551472,
"lm_q1q2_score": 0.8664514686990397,
"lm_q2_score": 0.8918110368115781,
"openwebmath_perplexity": 331.93623547531104,
"openwebmath_score": 0.857200026512146,
"tags": null,
"url": "http://math.stackexchange.com/questions/336812/understanding-lagranges-theorem-group-theory"
} |
fft, fourier-transform
Title: Simple $\sin(2\pi 1000t)$ Fourier transform in PSpice not behaving as expected So I have this very basic circuit show below which I am simulating with PSpice.
Now, when doing the Fourier transform of $\cos(2\omega1000t)$, I expect to see two impulses(one at -1kHz and one at 1kHz), at half the amplitude of the cosine. The simulated results, however, shows the impulse at 1kHz with an amplitude of just below 1V. This is shown below:
My question is, why is this the case? Why is the amplitude not 500mV? I'm probably just missing something trivial.
Thanks in advance!
(Side note - why is there no pspice tag? Is this the correct form to post this question?) PSPICE is showing the "Double Sided" Spectrum with the assumption (as it is) of a real signal. This means the spectrum is positive frequency axis only and the result will be double of what you would expect to see with a "Single Sided" Spectrum, basically matching the amplitude of the sinusoidal component represented. | {
"domain": "dsp.stackexchange",
"id": 6760,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, fourier-transform",
"url": null
} |
Lemma $$\ \ \ \sqrt w\, =\, \dfrac{s}t,\quad \begin{eqnarray}s &=& w \pm \sqrt{ww'}\\ t &=& \pm\sqrt{s+s'}\end{eqnarray}\ \$$ when $$\ \ \sqrt{ww'}\in\Bbb Q$$
Proof $$\quad s^2 =\, w (w+w' \pm 2\sqrt{ww'})\, =\, w t^2$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97364464868338,
"lm_q1q2_score": 0.8314075751144561,
"lm_q2_score": 0.8539127455162772,
"openwebmath_perplexity": 1105.198089193709,
"openwebmath_score": 0.9855283498764038,
"tags": null,
"url": "https://math.stackexchange.com/questions/816462/simplifying-sqrt4161-72-sqrt5?noredirect=1"
} |
microscopy, parasitology, parasitism, saliva
Title: Can you find malaria parasites in saliva? Can you find plasmodium parasites (malaria) in saliva under microscope from someone who's infected? Or it's only in the blood? No.
Although malaria is transmitted through the saliva of a female Anopheles mosquito, it stays in the bloodstream and doesn't pass over to the saliva of humans (otherwise it probably would be transmittable via humans directly). Once the parasites travel to the liver, it infects and bursts hepatocytes after reproducing (asexually). The burst cells then infect the bloodstream via red blood cells, where the parasites reproduce further and eventually burst their host cell, leading to a vicious cycle. This whole process only has to do with the bloodstream, since the parasites live in red blood cells. | {
"domain": "biology.stackexchange",
"id": 2957,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "microscopy, parasitology, parasitism, saliva",
"url": null
} |
# Number of integer triplets $(a,b,c)$ such that $a<b<c$ and $a+b+c=n$
What is an equivalent combinatorial presentation for the problem? Can I use the stars and bars approach to find the number of integral solutions of $a+b+c=n$ where $a,b,c\geq 0$?
If in addition $a+b>c$, $b+c>a$, $a+c>b$ hold, then the problem can be seen as $a,b,c$ being the sides of a triangle with perimeter $n$. I would like a hint on how to do that as well. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9915543728093004,
"lm_q1q2_score": 0.8152452319654452,
"lm_q2_score": 0.822189134878876,
"openwebmath_perplexity": 169.41428193310296,
"openwebmath_score": 0.9724651575088501,
"tags": null,
"url": "https://math.stackexchange.com/questions/1867469/number-of-integer-triplets-a-b-c-such-that-abc-and-abc-n"
} |
object-oriented, vba, excel, comparative-review, rubberduck
Case CVErr(xlErrRef)
errstring = "#REF"
Case CVErr(xlErrValue)
errstring = "#VALUE"
Case Else
errstring = vbNullString
End Select
Result = Result & delim & errstring
Else
Result = Result & delim & cell
End If
Next cell | {
"domain": "codereview.stackexchange",
"id": 41134,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "object-oriented, vba, excel, comparative-review, rubberduck",
"url": null
} |
electromagnetism, special-relativity, lorentz-symmetry, gauge-invariance, invariants
Title: Gauge invariant scalar which is not Lorentz-invariant I'm looking for examples of the following descriptions:
A gauge invariant scalar which is not Lorentz-invariant
A Lorentz covariant scalar | {
"domain": "physics.stackexchange",
"id": 49466,
"lm_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, lorentz-symmetry, gauge-invariance, invariants",
"url": null
} |
c, console, template
Explanation
Like GCC, any input argument that is not an option is a file name. Unlike GCC, it calls options switches, because Windows does it, and I am using Windows. This is all. It is mostly a skeleton for a program that takes files from the user.
/*
* This file contains the entry function (main) for the SSGCompiler.
* The SSGCompiler is a compiler done as a challenge from the author
* to the author. More information may be found on the GitHub
* repository [REDACTED].
*
* This was originally written at 05/06/2023.
*/ | {
"domain": "codereview.stackexchange",
"id": 44733,
"lm_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, console, template",
"url": null
} |
supervised-learning, policy-gradients
Typically when this is asked, what the asker wants to know is something like:
How do you represent the action choice in the output?
For example, if there are N discrete action choices, and your policy is stochastic, you could say something like: "The policy is expressed as a vector size N, with each value being the probability of choosing a matching action." You may also want to enumerate the actions - to say which index of the vector corresponds to which specific action. That depends on what need the person communicating with you has for understanding your policy.
Plus maybe:
How do you represent the state in the input?
The same thing here, give the state representation required to make the policy function work according to your implementation. Again, whether you should supply this depends on why the person asking you wants to know.
Am I supposed to give an analytical function? | {
"domain": "datascience.stackexchange",
"id": 8502,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "supervised-learning, policy-gradients",
"url": null
} |
urdf, catkin-make, ros-kinetic
else()
# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
# or CMAKE_PREFIX_PATH from the environment
if(NOT DEFINED CMAKE_PREFIX_PATH)
if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
endif()
endif()
# list of catkin workspaces
set(catkin_search_path "")
foreach(path ${CMAKE_PREFIX_PATH})
if(EXISTS "${path}/.catkin")
list(FIND catkin_search_path ${path} _index)
if(_index EQUAL -1)
list(APPEND catkin_search_path ${path})
endif()
endif()
endforeach()
# search for catkin in all workspaces
set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE)
find_package(catkin QUIET
NO_POLICY_SCOPE
PATHS ${catkin_search_path}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
unset(CATKIN_TOPLEVEL_FIND_PACKAGE) | {
"domain": "robotics.stackexchange",
"id": 28054,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "urdf, catkin-make, ros-kinetic",
"url": null
} |
ros, ros-kinetic, ubuntu, tf-static, ubuntu-xenial
And then change your main to
#include <ros/ros.h>
#include<fiducial_msgs/FiducialTransformArray.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <geometry_msgs/TransformStamped.h>
static tf2_ros::StaticTransformBroadcaster static_broadcaster[3];
geometry_msgs::TransformStamped static_transformStamped[3];
int main(int argc, char **argv)
{
ros::init(argc, argv, "calibrate");
ros::NodeHandle n;
tf2_ros::StaticTransformBroadcaster static_broadcaster[3];
ros::Subscriber sub = n.subscribe("/camera/fiducial_transforms", 10,transform_callback1); ///fill a static_transform_stamped message
ros::Subscriber sub2 = n.subscribe("/camera1/fiducial_transforms", 10,transform_callback2);
ros::Subscriber sub3 = n.subscribe("/camera2/fiducial_transforms", 10,transform_callback3);
ros::spin();
return 0;
} | {
"domain": "robotics.stackexchange",
"id": 32857,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-kinetic, ubuntu, tf-static, ubuntu-xenial",
"url": null
} |
You had ##a=6## and ##b=2## and found all even numbers as the solution: ##6\mathbb{Z}+2\mathbb{Z}=2\mathbb{Z}.##
If you take ##a=6## and ##b=3##, what do you get? And what for ##a=6## and ##b=5##?
If I take a=6 and b=3, then I get 6ℤ+3ℤ=3ℤ where the set is {...,-9, -6, -3, 0, 3, 6, 9,...}.
If I take a=6 and b=5, then I get 6ℤ+5ℤ=5ℤ where the set is {...,-15, -10, -5, 0, 5, 10, 15,...}.
fresh_42
fresh_42
Mentor
If I take a=6 and b=3, then I get 6ℤ+3ℤ=3ℤ where the set is {...,-9, -6, -3, 0, 3, 6, 9,...}.
If I take a=6 and b=5, then I get 6ℤ+5ℤ=5ℤ where the set is {...,-15, -10, -5, 0, 5, 10, 15,...}.
This wasn't completely wrong. The first line is correct. Only the second does not have enough numbers in the set.
We always get multiples of ##\mathbb{Z}##, in all cases. The question is: which multiples?
Math100
Yes, but if you add multiples of ##a## and multiples of ##b##, then you can get more. See
##6\mathbb{Z}+2\mathbb{Z}=2\mathbb{Z}## - your exercise, which was correct. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9433475746920261,
"lm_q1q2_score": 0.8229267864530391,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 2268.968358233496,
"openwebmath_score": 0.9001035690307617,
"tags": null,
"url": "https://www.physicsforums.com/threads/elements-of-the-set-6a-2b-where-a-and-b.1005830/"
} |
c#, csv
var email = headers.FirstOrDefault(_ => _.Contains("Email"));
var completionDate = headers.FirstOrDefault(_ => _.Contains("Completion"));
var courseId = headers.FirstOrDefault(_ => _.Contains("CourseID"));
if (!string.IsNullOrEmpty(email)) emailIndex = headers.First(_ => _.Contains("Email")).Split('(', ')')[1]; /*3*/
if (!string.IsNullOrEmpty(completionDate)) completionDateIndex = headers.First(_ => _.Contains("Completion")).Split('(', ')')[1]; /*30*/
var courseIdIndex = string.IsNullOrEmpty(courseId) ?
headers.First(_ => _.Contains("Asset_ID")).Split('(', ')')[1] :
headers.First(_ => _.Contains("CourseID")).Split('(', ')')[1]; | {
"domain": "codereview.stackexchange",
"id": 17420,
"lm_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#, csv",
"url": null
} |
python, python-3.x
return team_stats
def print_team_stats_html(team_stats):
"""
Prints a subset of team stats in HTML format.
"""
headers = ['Team', 'HomeBoxTouchesRatio', 'AwayBoxTouchesRatio',
'HomeBoxTouchesTotalPg', 'AwayBoxTouchesTotalPg',
'HomeCornersRatio', 'AwayCornersRatio']
print('<table border=1>')
print('<tr>', end='')
for header in headers:
print('<th>{}</th>'.format(header), end='')
print('</tr>') | {
"domain": "codereview.stackexchange",
"id": 38547,
"lm_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
} |
python, array, pygame, snake-game
def draw_text(self, text, p):
"""Draw text at position p."""
self.screen.blit(self.font.render(text, 1, TEXT_COLOR), p)
def draw(self):
"""Draw game (while playing)."""
self.screen.fill(BACKGROUND_COLOR)
for p in self.snake:
pygame.draw.rect(self.screen, SNAKE_COLOR, self.block(p))
for f in self.food:
pygame.draw.rect(self.screen, FOOD_COLOR, self.block(f))
self.draw_text("Score: {}".format(self.score), (20, 20))
def draw_death(self):
"""Draw game (after game over)."""
self.screen.fill(DEATH_COLOR)
self.draw_text("Game over! Press Space to start a new game", (20, 150))
self.draw_text("Your score is: {}".format(self.score), (140, 180)) | {
"domain": "codereview.stackexchange",
"id": 3466,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, array, pygame, snake-game",
"url": null
} |
manner in which the Fourier series of a piecewise continuously differentiable periodic function behaves at a jump discontinuity. 5 powerspectrum = [email protected]@timeseriesDD^2; The power spectrum (shown by the points in the figure below) is centered on w and has a finite width. The Fourier series use the sine-cosine representation. Building on the basic techniques of separation of variables and Fourier series, the book presents the solution of boundary-value problems for basic partial differential equations: the heat equation, wave equation, and Laplace equation, considered in various standard coordinate systems--rectangular, cylindrical, and spherical. (Essentially equivalent definitions appear in earlier works of Fourier, Kirchhoff, and Heaviside. Ask Question Asked 2 years, 5 months ago. Actually, fractional Fourier transform is a rotation operation on the time frequency distribution. Wolframalpha find Fourier series. Wolfram Universal Deployment System. Browse all » Wolfram | {
"domain": "bricoedile.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936106207203,
"lm_q1q2_score": 0.8045698269771631,
"lm_q2_score": 0.8175744850834648,
"openwebmath_perplexity": 618.5886697837797,
"openwebmath_score": 0.6913949251174927,
"tags": null,
"url": "http://kchq.bricoedile.it/wolfram-demonstrations-fourier-series.html"
} |
c, file
return 0;
} As you say, it works fine. But I can nitpick.
The main flaw is that you could get a wrong count if any line is longer than 999 bytes. (In general, you should stress-test your code by cranking down the buffer size to ridiculously small numbers and checking whether you obtain the same results.)
The performance could be improved. Since fgets() has no way of knowing in advance where the newlines occur, it must read the file contents into a temporary buffer (which is invisible to you), then copy each line into the line buffer. Since only care about counting '\n' characters, you could read fixed-size blocks to avoid this internal copying.
It's awkward to read 1000 bytes at a time. You would be better off reading chunks that are aligned with the blocks on the disk. A better choice would be 1024.
You could use the perror() function to report why I/O operations failed. Technically, fgets() could fail too, so you should check for that. | {
"domain": "codereview.stackexchange",
"id": 24491,
"lm_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, file",
"url": null
} |
deep-learning, multiclass-classification, pytorch
and here is the link of my dataset. Actually, I was hoping that I have problem with data normalization but eventually I couldn't solve it and still have this issue. Any kind of help is appreciated. Thanks. Okay after 4 days I got my solution eventually. I figured it out that my classes are started from 1 to 12, so, in total I had 12 classes.
The problem was appearing when I was about to calculate the predicted class vs actual class loss with the loss function. Instead of having start from 1 that function always from class 0 instead of 1 and continuously look for 0 to 12 which indicated it do have 13 classes in total which generates an exception.
So how do I solved that? I just docked 1 form each labels and shifted it from 0 to 11 and it went fine. That's how I solved the issue. Mention, I got couple of solution at PyTorch forum regarding the same issue and those wasn't helpful at all, literally! | {
"domain": "datascience.stackexchange",
"id": 5650,
"lm_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, multiclass-classification, pytorch",
"url": null
} |
ros, navigation, kalman, robot-localization
<rosparam param="pose0_config">[true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="odom0_differential" value="false"/>
<param name="pose0_differential" value="false"/>
<param name="odom0_relative" value="false"/>
<param name="pose0_relative" value="false"/>
<param name="print_diagnostics" value="true"/>
<param name="odom0_queue_size" value="4"/>
<param name="pose0_queue_size" value="5"/> <!-- default 10 --> | {
"domain": "robotics.stackexchange",
"id": 22512,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, kalman, robot-localization",
"url": null
} |
For the file, see this graph in Desmos.
For the angle, let $$p$$ be the numerator of $$a/b$$ in lowest terms. Then, we have $$0 \leq \theta \leq 2p\pi$$. (I don't know how to this in Desmos, by the way)
## Examples
For $$a = 2.1$$ and $$b = 1.4$$,
For $$a = 3$$ and $$b = 1$$,
And for $$a = 1.1$$ and $$b = 0.007$$ $$(0 \leq \theta \leq 98\pi)$$,
As for the midpoint, the coordinates is $$\left(\frac{r}{2}\left(\cos(a\theta) + \cos(b\theta)\right), \frac{r}{2}\left(\sin(a\theta) + \sin(b\theta)\right)\right)$$
This means that the parametric equation is \begin{align*} x(\theta) &= \frac{r}{2}\left(\cos(a\theta) + \cos(b\theta)\right) \\[10pt] y(\theta) &= \frac{r}{2}\left(\sin(a\theta) + \sin(b\theta)\right) \end{align*} Is there a name for these curves?
Update 1: It seems like this is somehow related to the mathematical basis of a spirograph. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.971129093889291,
"lm_q1q2_score": 0.866063644099297,
"lm_q2_score": 0.8918110368115781,
"openwebmath_perplexity": 281.0224501229029,
"openwebmath_score": 0.9765288233757019,
"tags": null,
"url": "https://math.stackexchange.com/questions/4192587/is-there-a-name-for-the-curve-traced-by-the-midpoint-of-two-moving-points-on-a-c"
} |
of S satisfy 0 ( zero energy is ;..., Browsing and search activity while using Verizon Media websites and apps [ m ] eigenvalues of are, are... Hermitian matrix which is neither positive definite if it is nsd if and only if all of! Zero, then the matrix Y ; x is not sufficient for positive semide nite matrix turn out be.. New equivalent conditions on a ( possibly singular ) matrix S DST real symmetric matrix and Q ( x =. Look into the Hessian, this implies the stationary point is a minimum there exists a negative semidefinite for! We also have positive semidefinite, negative implies concave down for example, consider the covariance of... And −1, and the second-order principal minor is 0 any property of positive replace. Only vector in its kernel is the matrix is psd if and only if all eigenvalues non-negative! Definite counterpart is a minimum point concave up, negative definite if it is called indefinite Mv for... R function eigen is used to compute the eigenvalues kernel is the | {
"domain": "mongegant.cat",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517462851321,
"lm_q1q2_score": 0.8085669117774588,
"lm_q2_score": 0.8267117919359419,
"openwebmath_perplexity": 555.4765801525165,
"openwebmath_score": 0.7280982732772827,
"tags": null,
"url": "http://mongegant.cat/the-wrong-wnwg/viewtopic.php?3284fd=negative-semidefinite-matrix"
} |
python, web-scraping, pandas, beautifulsoup, selenium
This should accomplish the same thing:
games = bsObj.find_all("div", {"class":[
"event__participant event__participant--home",
"event__participant event__participant--home fontBold",
"event__participant event__participant--away",
"event__participant event__participant--away fontBold"
]}
This is a list, but you could even use a regular expression for more flexibility.
A more Pythonic loop would not use range but look like:
countries = driver.find_elements(By.CLASS_NAME, "event__title--type")
for country in countries:
... | {
"domain": "codereview.stackexchange",
"id": 43431,
"lm_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, web-scraping, pandas, beautifulsoup, selenium",
"url": null
} |
c#, mysql
Title: Calculating exponential moving average across millions of rows I am calculating the moving average for 5,534,446 rows in one table. I am using C# as my language and MySQL as the database. Below is the code I am using to gather and calculate an exponential moving average for different sets of days. The program is working perfectly but it is taking forever to calculate the values one at a time. Since I am new to programming, I figure this could be three times more efficient. What can I do to improve this program's speed?
private void CalculateMovingAverage()
{
l.CreateRunningEntry(3, "CalculateMovingAverage", "Beginning to calulate exponential moving averages for companies.");
conn.ConnectionString = r.getMysqlConnection();
//This is the list for the type of exponential averages we want to calculate
decimal[] movingDays = { 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 100, 200 }; | {
"domain": "codereview.stackexchange",
"id": 18636,
"lm_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#, mysql",
"url": null
} |
2 also applies to negative values that you use every day... Consecutively to form the large integer n = 192021 909192 a given date anyone, anywhere =. Represented as networks need to make up a certain module a Hida family once for!, cryptography, computer science, chemistry and the visual and musical arts very practical application is to provide free. Given that 5x 6 ( mod 8 ), nd x also be used credit. 2, 3 } certain module modular systems math algorithms use modular arithmetic make sure that the multiples of the projective.. Logical operator XOR sums 2 bits, modulo 2 the mul_mod modular systems math implemented above is useful discussing... Defined so 0 can not be the divisor, or “ % ” in programming! Of a ring, Eurorack-Modules, Modulation, Envelope-function-generator, Make-Noise-Co of a Hida once... 3 } % ” in many di … this is to calculate checksums within serial number identifiers curves genus!, which is a factor of N. what is k on counting points over finite on... −5, 0, 1, 2 | {
"domain": "mongegant.cat",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97364464868338,
"lm_q1q2_score": 0.8216539563861993,
"lm_q2_score": 0.8438951084436077,
"openwebmath_perplexity": 1108.5842234850033,
"openwebmath_score": 0.75057053565979,
"tags": null,
"url": "http://mongegant.cat/7zlvvxkk/jnclacc.php?id=modular-systems-math-d23313"
} |
fourier-transform, derivation
Title: Derivation of Inverse Fourier transform from forward Fourier transform Consider the Fourier pairs:
$$\psi(x,t) \stackrel{\mathrm{FT}}{\longleftrightarrow} \Psi(k,t)$$
$$\text{If } \quad \quad\Psi(k,t)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} \psi(x,t) e^{-ikx} \, dx \quad \quad \dots(i)$$
$$\text{then, can we derive: } \quad \quad \psi(x,t)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} \Psi(k,t) e^{ikx} \, dk \quad \quad \dots(ii) \quad ?$$
I have used comparison method to proof $eq.(ii) $
i.e., $$\text{consider:} \quad \quad x(t) \stackrel{\mathrm{FT}}{\longleftrightarrow} X(\omega)$$
$$\text{then, } \quad \quad X(\omega)=\int_{-\infty}^{\infty} x(t) e^{-i\omega t} \, dt \quad \quad \dots(iii)$$
$$\text{and, } \quad \quad x(t)=\frac{1}{2\pi}\int_{-\infty}^{\infty} X(\omega) e^{i\omega t} \, d\omega \quad \quad \dots(iv)$$
Now, comparing $eq(iii)$ with $eq(i)$ , we find:
$w \to k$
$t \to x$
$x(t) \to \frac{\psi(x,t)}{\sqrt{2\pi}}$ | {
"domain": "dsp.stackexchange",
"id": 9849,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fourier-transform, derivation",
"url": null
} |
c#, linq
if (temp1 != null & temp1.Count() > 0)
{
double max = temp1.Select(p => p.Y).Max();
double min = temp1.Select(p => p.Y).Min();
Boxes.Where(k => k.id == param).First().PlotModel.Axes[1].Reset();
Boxes.Where(k => k.id == param).First().PlotModel.Axes[1].Zoom(min, max);
}
}
}
}
}
}
}
This function calls something like:
UpdateHistoryAsyc UHA = new UpdateHistoryAsyc(UpdateHistoryAndReSizeWhenDrag);
IAsyncResult result = UHA.BeginInvoke(item, CurrentDuration, null, null); | {
"domain": "codereview.stackexchange",
"id": 14050,
"lm_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#, linq",
"url": null
} |
gazebo
File "/usr/lib/python2.7/urllib.py", line 436, in open_https
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1161, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "/usr/lib/python2.7/ssl.py", line 381, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/ssl.py", line 143, in __init__
self.do_handshake()
File "/usr/lib/python2.7/ssl.py", line 305, in do_handshake
self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 8] _ssl.c:504: EOF occurred in violation of protocol
make[1]: *** [build/gazebo-r3c730325a4dd/unpacked] Error 1 | {
"domain": "robotics.stackexchange",
"id": 12618,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
# uncertainty of weighted mean | {
"domain": "funtello.ca",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9585377225508371,
"lm_q1q2_score": 0.8203656127807851,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 696.6020883704834,
"openwebmath_score": 0.8278829455375671,
"tags": null,
"url": "https://funtello.ca/tiramisu-alcohol-livrjbx/nd9agd2.php?14f5cd=uncertainty-of-weighted-mean"
} |
Now let each point in our subset be contained by a cube centered at the point, where the side length of the cube is half of the infimum of the distance (as defined by the Euclidean norm) between that point and any other point in our subset S. This shows there is no lower limit to the distance (as defined by the Euclidean norm) between any two points in our subset (if we did, then there would be a lower limit to the volume of these cubes, which means it is impossible for the volume of an infinite number of these cubes to sum to a finite number). | {
"domain": "shuangrimu.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513930404762,
"lm_q1q2_score": 0.8016102311367418,
"lm_q2_score": 0.8128673110375457,
"openwebmath_perplexity": 134.29886374160625,
"openwebmath_score": 0.937529981136322,
"tags": null,
"url": "https://shuangrimu.com/posts/equivalent-definitions-of-compactness.html"
} |
classical-mechanics, forces, potential, potential-energy
Computationally you will want to calculate the force on particle 1, by taking the gradient at the position particle 1 is in, of the potential energy field created by all particles except 1 itself, in order to avoid nasty singularities. | {
"domain": "physics.stackexchange",
"id": 4405,
"lm_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, forces, potential, potential-energy",
"url": null
} |
As you correctly calculated, there is a $1$ in $40 \times 39 \times 39 = 60\,840$ of another lock having the same permutation (they're not combination locks, as order does matter). So what is the probability that either of your neighbors has the same permutation?
It's easier to calculate the complementary event: both of your neighbors have different permutations. The probability is \begin{align} P(\text{ diff. on left } \cap \text{ diff. on right }) &= P(\text{ diff. on left }) \times P(\text{ diff. on right }) \\ &= P(\text{ diff })^2 \\ &= \left( \frac{60839}{60840} \right)^2 \end{align}
Therefore, \begin{align} P(\text{ either neighbor same }) &= 1 - \left( \frac{60839}{60840} \right)^2 \\ &= \frac{121\,679}{3\,701\,505\,600} \\ &\approx 0.0000329, \end{align} or roughly $1$ in $30\,420$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517061554854,
"lm_q1q2_score": 0.8069437928055592,
"lm_q2_score": 0.8397339716830606,
"openwebmath_perplexity": 686.6673338455064,
"openwebmath_score": 0.9688538908958435,
"tags": null,
"url": "https://math.stackexchange.com/questions/614569/chance-of-adjacent-lockers-with-the-same-combination"
} |
python, python-3.x, converting
def __get__(self, instance, owner):
if not issubclass(owner, Converter):
raise RuntimeError('cannot use Property descriptors on non Converter types')
if instance is None:
return self
value = operator.attrgetter(self.__path)(instance)
if isinstance(value, BuilderObject):
raise AttributeError
if self.__getter is not None:
value = self.__getter(value)
return value
def __set__(self, instance, value):
if self.__setter is not None:
value = self.__setter(value)
setattr(operator.attrgetter(self.__parent)(instance), self.__attribute_name, value)
def __delete__(self, instance):
delattr(operator.attrgetter(self.__parent)(instance), self.__attribute_name) | {
"domain": "codereview.stackexchange",
"id": 33657,
"lm_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, converting",
"url": null
} |
ros, ros2, node
The lifecycle demo is a fairly complete example. You should also look at the managed nodes wiki page, which talks about the example and what is going on.
Managed nodes can be controlled using the ros2 lifecycle command. Run ros2 lifecycle -h to get its help. It's still a little rudimentary - you have to specify a transition as text, rather than being able to say "activate node X", for example. But it does work. But the big thing for managed nodes is that the new launch system uses them. You will be able to do things like launch all the nodes and only activate them when all nodes are actually ready to run, ensuring you don't get a half-started system. | {
"domain": "robotics.stackexchange",
"id": 31660,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, node",
"url": null
} |
ros, calibration, camera-info-manager, camera-calibration
Original comments
Comment by joq on 2012-01-21:
Fuerte final freeze is coming soon, Feb. 15th. To change the API for that release we need the new interface defined, so please file an enhancement ticket right away: https://code.ros.org/trac/ros-pkg/newticket?component=image_common&type=enhancement&image_common
Comment by Mimax on 2011-10-21:
Thanks for that hint. I'll definitely do this
Comment by joq on 2011-10-21:
Adding some method like setOperationalParameters() to camera_info_manager seems reasonable. If you have suggestions, please open an enhancement ticket. We could add it for Fuerte.
Comment by Mimax on 2011-10-20:
This way i could skip the comparison of roi values every time publishing an image just modify the origin camera_info_message of the camera_info_manager
Comment by Mimax on 2011-10-20: | {
"domain": "robotics.stackexchange",
"id": 7032,
"lm_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, calibration, camera-info-manager, camera-calibration",
"url": null
} |
money, take advantage of quick cost-saving measures followed by an intensive look at where IT is spending money. What happens when the learning rate is too small? Too large? Using the best learning rate that you found, run gradient descent until convergence to find 1. Using the quadratic formula or a calculator, we find the solutions are. As serverless architectures mature, they have been able to minimize the issue of provision concurrency, in which there was a performance penalty when a function was called a second time, causing a. It is the heart that makes it beat! There is a loss function, which expresses how much the estimate has missed the mark for an individual observation. If this sounds a lot, here are my 5 suggestions to reduce the CPA exam cost: 1. 37 e) The minimal average cost. Put simply, a cost function is a measure of how wrong the model is in terms of its ability to estimate the relationship between X. Minimize The Use Of Color In Wireframes. Find the level of | {
"domain": "centrosamo.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987568346219724,
"lm_q1q2_score": 0.8907083109416525,
"lm_q2_score": 0.90192067652954,
"openwebmath_perplexity": 1047.402508227663,
"openwebmath_score": 0.5647906064987183,
"tags": null,
"url": "http://centrosamo.it/fskn/minimize-a-cost-function.html"
} |
ros, navigation, eigen, ros-hydro, costmap-2d
from /opt/ros/hydro/lib/liblayers.so
#9 0xb2231eb3 in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::mfi::mf2<void, costmap_2d::ObstacleLayer, boost::shared_ptr<sensor_msgs::LaserScanstd::allocator<void > const> const&, boost::shared_ptr<costmap_2d::ObservationBuffer> const&>, boost::bi::list3boost::_bi::value<costmap_2d::ObstacleLayer*, boost::arg<1>, boost::bi::valueboost::shared_ptr<costmap_2d::ObservationBuffer > > >, void, boost::shared_ptr<sensor_msgs::LaserScanstd::allocator<void > const> const&>::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<sensor_msgs::LaserScanstd::allocator<void > const> const&) () from /opt/ros/hydro/lib/liblayers.so | {
"domain": "robotics.stackexchange",
"id": 15064,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, navigation, eigen, ros-hydro, costmap-2d",
"url": null
} |
organic-chemistry, redox
Title: Can carboxylic acids be oxidised further? I know that compounds like alcohols can be further oxidized to aldehydes (or ketones) and to carboxylic acids. But, is carboxylic acid the best oxidized form of a given compound?
What happens when carboxylic acids further reacts with oxidizing agents like $\ce{KMnO4}$? In carboxylic acid, the carbon atom of the COOH group is already in high oxidation state, namely +3. In order to reach a higher oxidation state (+4), it requires breaking the C—C bond, typically to form molecular CO2. Thus, oxidation of carboxylic acid in strongly oxidizing conditions is known as a decarboxylation reaction. | {
"domain": "chemistry.stackexchange",
"id": 580,
"lm_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, redox",
"url": null
} |
machine-learning, keras, tensorflow, optimization
Thank you! You could have a look at the AutoML work, which offers a few different ways to optimise a model of parameter space and goes well beyond Sklearn. They even have a tool that wraps around Sklearn!
Here is a summary from their homepage: | {
"domain": "datascience.stackexchange",
"id": 6448,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, keras, tensorflow, optimization",
"url": null
} |
c#, asp.net-core, ddd, mediator
IQueryHandler is an interface defined below
public interface IQueryHandler<in TQuery> : IAsyncRequestHandler<TQuery, Result>
where TQuery : IQuery
{ }
Here I inject an EF Core DbContext into my handler. I found out that EF core is really good at generating optimized SQL command based on query. If I use separate repositories I loose on flexibility and performance!
Result is a simple container. Initially I wanted to make it immutable but Mediatr doesn't allow me to return new object within the pipeline. In other words, I can only mutate the existing response and nothing else.
public class Result
{
protected object _inner { get; private set; }
public bool IsSuccess => !(_inner is Exception);
public Result(object output) => _inner = output;
public void Set(object output) => _inner = output;
public object Get() => _inner;
public T Get<T>() where T : class
=> _inner as T;
} | {
"domain": "codereview.stackexchange",
"id": 28043,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, asp.net-core, ddd, mediator",
"url": null
} |
reinforcement-learning, value-functions, bellman-equations
leading to $q_\pi(s,a) = q_\pi(s,a,v_\pi(s'))$? Your understanding of the Bellman equation is not quite right. The state-action value function is defined as the expected (discounted) returns when taking action $a$ in state $s$. Now, in your equation (2) you have conditioned on taking action $a'$ in the inner expectation - this is not what happens in the state-action value function, you do not condition on knowing $A_{t+1}$, it is chosen according to the policy $\pi$ as per the definition of a bellman equation.
If you want to see a 'recursion' between state action value functions, note that
$$v_\pi(s) = \sum_a \pi(a|s)q_\pi(s,a)\;,$$
Your equation (5) is incorrect -- you need to drop the outter sum over $a$ as we have conditioned on knowing $a$. I will drop the $\pi$ subscripts for ease on notation, and we can see a 'recursion' for state-action value functions as:
$$q(s,a) = \sum_{s',r}p(s',r|s,a)\left(r + \gamma \left[\sum_{a'} \pi(a'|s')q(s',a')\right]\right)\;.$$ | {
"domain": "ai.stackexchange",
"id": 2083,
"lm_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, value-functions, bellman-equations",
"url": null
} |
php, optimization
Title: optimize my foreach I have the following script and I think it's a bit inefficient. With a array from 1 to 3, this isn't a real problem, but this array can get way bigger. So how to boost it's performance/optimize this code?
<?php
$array = array(1, 2, 3);
foreach ($array as $tabid)
{
echo '<div id="tab'. $tabid. '" class="tab_content">
<ul class="columns">'; | {
"domain": "codereview.stackexchange",
"id": 972,
"lm_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, optimization",
"url": null
} |
Last edited:
Related Calculus and Beyond Homework Help News on Phys.org
On the track; not quite right.
To prove something diverges -- which this does -- you need to show that it gets greater than any arbitrary integer N . There are various proofs of the divergence of the harmonic series, but the most common one begins like this:
1 +1/2 + (1/3 + 1/4) + (1/5 + 1/6 + 1/7 + 1/8) + (1/9 + .... 1/16 ) + ...
If you can show that the bracketed terms are all larger than 1/2, then you are adding up infintiely many 1/2's. So you can always get larger than any N.
On the track; not quite right.
To prove something diverges -- which this does -- you need to show that it gets greater than any arbitrary integer N . There are various proofs of the divergence of the harmonic series, but the most common one begins like this:
1 +1/2 + (1/3 + 1/4) + (1/5 + 1/6 + 1/7 + 1/8) + (1/9 + .... 1/16 ) + ... | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9615338101862455,
"lm_q1q2_score": 0.8012697792225187,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 306.6738659389891,
"openwebmath_score": 0.8783668279647827,
"tags": null,
"url": "https://www.physicsforums.com/threads/proving-the-divergence-of-a-harmonic-series.720052/"
} |
c++, strings, reinventing-the-wheel
for (int a = 0; a < size; ++a)
{
if (str[a] != buffer[a])
return false;
}
return true;
}
bool operator==(const string& buffer) const
{
return operator==(buffer.str);
}
bool operator!=(const char* buffer) const
{
return !operator==(buffer);
}
bool operator!=(const string& buffer) const
{
return !operator==(buffer.str);
}
char operator[](int index) const
{
if (index < 0 || index >= size)
throw "[error] index is out of range";
return str[index];
}
char& operator[](int index)
{
if (index < 0 || index >= size)
throw "[error] index is out of range";
return str[index];
}
public:
int length() const
{
return size;
}
const char* get() const
{
return str;
} | {
"domain": "codereview.stackexchange",
"id": 39231,
"lm_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++, strings, reinventing-the-wheel",
"url": null
} |
f[x, y, z] == omega
intersects the cube and set up the limits of integration; the region of integration is restricted to the support of the inner integral. To simplify the work of Reduce, I used a == Sin[x/2], and b == Sin[y/2] to convert the trigonometric problem to a polynomial one. The function toPWCases constructs, from the output of Reduce, the integrals for the different cases arising from the intersection of the singular surface with the sides of the cube for varying omega. 4. Inactivating NIntegrate with Block[] lets us construct the code for n[omega, s], calling Reduce and toPWCases just once to break down the integration into its pieces.
ClearAll[f, n, i0, toPWCases];
f[x_, y_, z_] := Sqrt[Sin[x/2]^2 + Sin[y/2]^2 + Sin[z/2]^2];
Block[{NIntegrate, x, y, z, omega, s},
i0[x_, y_, omega_, s_] = First@Differences[
z /. Last@Solve[omega - f[x, y, z] == #, z] & /@ ({1, -1} s/2)
]/s /. ArcSin[a_] :> ArcSin@Sqrt[Clip[a^2, {0, 1}]] //
PiecewiseExpand; | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9603611654370415,
"lm_q1q2_score": 0.8124102705812526,
"lm_q2_score": 0.8459424431344437,
"openwebmath_perplexity": 3326.917800596347,
"openwebmath_score": 0.33421871066093445,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/128320/density-of-states-from-numerical-integration-and-then-differentiation"
} |
quantum-mechanics, quantum-field-theory, geometry, topology
I am new to this area, so what I need would be a basic explanation (for QM and QFT) how to make the connection between the two concepts geometry/topology of physical space and resulting properties of the quantum state space - if such a wish makes sense at all. OP comments as an example of what the question is about: | {
"domain": "physics.stackexchange",
"id": 19674,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-field-theory, geometry, topology",
"url": null
} |
ros
Title: Is there a VFH* Implementation for ROS?
Hi everyone,
I am looking for an implementation of the VFH* Algorithm for local obstacle avoidance.
Is there any?
Best regards,
Originally posted by Josch on ROS Answers with karma: 230 on 2013-06-18
Post score: 0
I guess you could contact @camilla in this regard. Have a look there: http://answers.ros.org/question/61377/local-planner-creation/
Originally posted by Hendrik Wiese with karma: 1145 on 2013-11-01
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 14616,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
reference-request, integration
So that every integration can be calculated using these rules.
In the lecture, they only listed 4 of the safe transformations, 3 of the 12 heuristic transformations, and 3 of the 26 anchors.
In order to implement the full symbolic integration, I need the rules. So; what are those? or where can I find them? First of all, let me clarify that I think that this question is on-topic here, as symbolic integration is a problem that also humans solve, so it requires some kind of intelligence.
Second, I had also watched that interesting lecture by Winston a few months ago, so I remember that some of the rules that he mentions during the lecture are just rules that humans sometimes also use to solve integrals (e.g. integration by parts, which you should have an idea of, if you ever took a calculus course in high school), but he also mentions other problem-solving techniques used in AI, like And–Or trees. | {
"domain": "ai.stackexchange",
"id": 3173,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reference-request, integration",
"url": null
} |
physical-chemistry, kinetics
Overall, if the situation was truly, not just approximately, steady state, yes the concentration of the intermediate would be constant, but the point is that the "stead state approximation" is useful even when the concentration of the intermediate, though always near zero in absolute terms, decreases to say half of its original concentration over the course of an experiment (as the starting material, A, decreases to half its original concentration).
Additionally, a very small $\ce{[X]}$ does not purely-mathematically imply a small rate of change of $\ce{[X]}$, because $\ce{[X]}$ could rapidly oscillate within a small, near-zero, range, resulting in brief instances of large rate of change. Instead, $\ce{[X]}$ being small over a given period of time really just places a limit on how long of a time the rate of change can exceed a certain value. For example, if $\ce{[X]} < 0.001\ \mathrm{M}$, | {
"domain": "chemistry.stackexchange",
"id": 9228,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, kinetics",
"url": null
} |
catkin-make
Title: ros-by-example vol2. catkin_make rbx2 error
I am installing the ros-by-example vol2 code2, and have a build problem with rbx2.
Below is command line:
cd ~/catkin_ws/src
git clone https://github.com/pirobot/rbx1.git
cd rbx1
git checkout indigo-devel
cd ~/catkin_ws
catkin_make
Below is the error message:
CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by "shape_msgs" with
any of the following names:
shape_msgsConfig.cmake
shape_msgs-config.cmake
Add the installation prefix of "shape_msgs" to CMAKE_PREFIX_PATH or set
"shape_msgs_DIR" to a directory containing one of the above files. If
"shape_msgs" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
rbx2/rbx2_arm_nav/CMakeLists.txt:5 (find_package) | {
"domain": "robotics.stackexchange",
"id": 26136,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin-make",
"url": null
} |
roscore
Any idea? Thanks a lot :)
Originally posted by Filippo Grazioli on ROS Answers with karma: 21 on 2017-03-26
Post score: 1
Original comments
Comment by tfoote on 2017-03-27:
Please show the console output for when you run it too.
Comment by tfoote on 2017-03-27:
Please edit your question when you have updates. I've added the console output to your question for you.
Comment by ahendrix on 2017-03-27:
This is what starting up roscore is supposed to do; it will keep running and won't print a new prompt until you stop it.
It looks like your roscore has started and is successfully running. That is the same output that I see when I run roscore. It is just waiting for an incoming connection.
Now that you've started the ROS master using roscore. You need to launch a node. I'd recommend going through the ROS tutorials: http://wiki.ros.org/ROS/Tutorials
Originally posted by tfoote with karma: 58457 on 2017-03-27
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 27425,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "roscore",
"url": null
} |
• cofinality $\def\cf\mathit{cf}\cf(F)$
These parameters satisfy
$$\cf(F)\le d(F)\le|F|\le2^{d(F)}.$$
Clearly, $\cf(F)$ embeds in $F$. On the other hand, an embedding of $\alpha$ in $F$ gives a family of $|\alpha|$ disjoint open intervals, thus
$$\tag{1}\cf(F)^+\le o(F)\le d(F)^+.$$
The Erdős–Rado theorem $(2^\kappa)^+\to(\kappa^+)^2_2$ implies that a linear order of size larger than $2^\kappa$ contains a well-ordered or inverse well-ordered subset of size $\kappa^+$, thus
$$\tag{2}|F|\le2^{o(F)^-},$$
where $o(F)^-=\kappa$ if $o(F)=\kappa^+$ is a successor cardinal, and $o(F)^-=o(F)$ otherwise.
Even better, let $D(F)$ be the Dedekind–MacNeille completion of $F$ (i.e., the set of Dedekind cuts of $F$, ordered by inclusion). The Erdős–Rado argument applies to $D(F)$, even though it is not a field. Since $F$ is dense in $D(F)$, any ordinal that embeds in $D(F)$ also embeds in $F$. Thus,
$$|D(F)|\le2^{o(F)^-}.$$
This appears to be essentially all one can say. Some examples: | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982823294509472,
"lm_q1q2_score": 0.8485613865662682,
"lm_q2_score": 0.8633916099737806,
"openwebmath_perplexity": 211.77768083560613,
"openwebmath_score": 0.9205182194709778,
"tags": null,
"url": "https://mathoverflow.net/questions/232777/which-ordinals-can-be-embedded-into-an-ordered-field"
} |
untagged
Building the Amazon EC2 Instance"
Once you have configured the automation, select Execute at the bottom right of the screen to begin the automation.
Error reads (creds are swapped):
Value (arn:aws:ec2:us-east-1:292993933939:instance/i-0a0f99abeea700e54) for parameter iamInstanceProfile.arn is invalid. Invalid IAM Instance Profile ARN (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 9e4cdad7-9a7a-40a3-9864-3301a998319e; Proxy: null)
Things I tried but didn't seem to help
Assuming the error message is saying that the ARN is incorrect, I've tried various ARN, none of which even returned a different error message.
arn:aws:ec2:us-east-1:292993933939:instance/i-0a0f99abeea700e54
arn:aws:ec2:us-east-1:292993933939:instance/robomaker_test1 (EC2 instance' name)
arn:aws:ec2:us-east-1:292993933939:instance/* (referring https://stackoverflow.com/a/59371263/577001)
arn:aws:ec2:us-east-1:292993933939:instance/0a0f99abeea700e54 | {
"domain": "robotics.stackexchange",
"id": 2644,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "untagged",
"url": null
} |
quantum-mechanics, angular-momentum, quantum-spin, observables, quantum-measurements
What I cannot understand is why measuring along the $+z$ axis does not effect the spin along $+z$ axis. Should not the $+1$ spin that we initially measured repeatedly, change? Am I missing something? Insightful question! If quantum measurements are invasive, then why don't invasive measurements disturb the very property which is being measured?
First, think about what is meant by a "measurement". Suppose I repeatedly measure some particular quantity, and each time I get a different random number, because each measurement disturbs the value of that very quantity. In what way would this be an "informative measurement"? It would not inform you anything about the next "measurement", or the previous "measurement". It might as well be a random number generator. Even if that number is in fact representative about something at the system at that particular time, it couldn't be verified by experiment. | {
"domain": "physics.stackexchange",
"id": 97028,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, angular-momentum, quantum-spin, observables, quantum-measurements",
"url": null
} |
quantum-state, bloch-sphere
$$
\frac{1}{\sqrt{2}}e^{-i\pi/4}|0\rangle+\frac{1}{\sqrt{2}}e^{-i\pi/2}|1\rangle.
$$
This makes it easy to pull out the global phase, as you suggest. What should you pick? The one that makes the amplitude in front of $|0\rangle$ real. In other words,
$$
e^{-i\pi/4}\left(\frac{1}{\sqrt{2}}|0\rangle+\frac{e^{-i\pi/4}}{\sqrt{2}}|1\rangle\right).
$$
Now you can set
$$
\cos\frac{\theta}{2}=\frac{1}{\sqrt{2}}
$$
and
$$
\sin\frac{\theta}{2}e^{i\phi}=\frac{1}{\sqrt{2}}e^{-i\pi/4}.
$$
In other words, $\theta=\pi/2$ and $\phi=-\pi/4$. | {
"domain": "quantumcomputing.stackexchange",
"id": 4490,
"lm_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-state, bloch-sphere",
"url": null
} |
even gave a proof but it made me even more confused. Column Rank = Row Rank. coincide. writewhere matrix. Advanced Algebra. -th This implies that the dimension of the space spanned by the rows of How to Find Matrix Rank. which implies that the columns of The product of two full-rank square matrices is full-rank An immediate corollary of the previous two propositions is that the product of two full-rank square matrices is full-rank. For example . :where is no larger than the span of the rows of rank of the Oct 2008 27 0. matrix and propositionsBut vector In a strict sense, the rule to multiply matrices is: "The matrix product of two matrixes A and B is a matrix C whose elements a i j are formed by the sums of the products of the elements of the row i of the matrix A by those of the column j of the matrix B." whose dimension is How to Find a Basis for the Nullspace, Row Space, and Range of a Matrix, Express a Vector as a Linear Combination of Other Vectors, The Intersection of Two | {
"domain": "sob5050.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109538667758,
"lm_q1q2_score": 0.9033697038315128,
"lm_q2_score": 0.9173026561945815,
"openwebmath_perplexity": 459.14841579626847,
"openwebmath_score": 0.7332128286361694,
"tags": null,
"url": "https://sob5050.com/pnpfbmg/article.php?id=619bcf-rank-of-product-of-matrices"
} |
ros, ros2, header, dds
Originally posted by aks on ROS Answers with karma: 667 on 2018-08-01
Post score: 0
Follow up of answer given at https://answers.ros.org/question/299305/how-is-the-size-of-a-string-allocated-in-ros2-idl/?answer=299311#post-id-299311
The way unbounded string are generated for connext is by using the -unboundedSupport flag of the connext generator: https://github.com/ros2/rosidl_typesupport_connext/blob/d3fd38825c4e460e156718c360886b43b20cc0c8/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp/__init__.py#L79.
By not passing this flag when generating the connext code it should default to 255 as per their help message
-unboundedSupport Generates code that supports unbounded sequences and
strings.
This option is not supported in ADA.
When the option is used the command-line options sequenceSize and
stringSize are ignored.
This option also affects the way unbounded sequences are deserialized. | {
"domain": "robotics.stackexchange",
"id": 31435,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, header, dds",
"url": null
} |
organic-chemistry, aromatic-compounds, reactivity, electrophilic-substitution, boron-family
Barbara Chiavarino, Maria Elisa Crestoni, Simonetta Fornarini, "Electrophilic Substitution of Gaseous Borazine," J. Am. Chem. Soc. 1999, 121(11), 2619-2620 (https://doi.org/10.1021/ja983799b). | {
"domain": "chemistry.stackexchange",
"id": 14254,
"lm_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, aromatic-compounds, reactivity, electrophilic-substitution, boron-family",
"url": null
} |
quantum-mechanics, harmonic-oscillator, quantum-optics, non-linear-optics, laser-interaction
In these interactions it is momentum which is being parameterized. Although the quantum state of the material is unchanged by a parametric processes, the material is required to fulfil the phase matching conditions which ensure momentum conservation. Non-parametric processes rely on other things (such as absorption and energy storage within the material) to circumvent phase matching conditions, and thus don't parameterize momentum*. This is indicated in the third section of the Wiki link that you posted: Parametric processes interact only with the real part of the refractive index, whereas non-parametric processes interact with the imaginary part as well, which determines absorption (a very simplistic description for this is given here).
*This doesn't mean that momentum isn't conserved during non-parametric processes, it's just that the non-parametric process doesn't rely on it. | {
"domain": "physics.stackexchange",
"id": 34644,
"lm_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, harmonic-oscillator, quantum-optics, non-linear-optics, laser-interaction",
"url": null
} |
bond, molecular-orbital-theory, orbitals
Source: https://chem.libretexts.org/Courses/Heartland_Community_College/HCC%3A_Chem_161/9%3A_Molecular_Geometry_and_Bond_Theory/9.8%3A_M.O._Theory_and_the_Period_2_Diatomic_Molecules
[OP in comments] However why would the loss of electron be from a stable bond pair? Why cant it be one of the lone electrons? Also why does it have to be a sigma bond and not a pi bond, if at all the loss is not from one of the lone pairs?
You are using the valence bond model (or the Lewis structure) to "name" electrons. There is no 1:1 mapping of "lone pairs" to the molecular orbital diagram. It does say that the two combination of 2s orbitals "cancel each other out", i.e. are non-bonding; however, the shape of these orbitals does not match the valence bond model, where sp-orbitals pointing away from the center of the molecule are counted as lone pairs. | {
"domain": "chemistry.stackexchange",
"id": 14830,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond, molecular-orbital-theory, orbitals",
"url": null
} |
c#, performance, beginner, algorithm, strings
public T Get(DayOfWeek dayOfWeek)
{
return _collection[dayOfWeek];
}
}
}
Currently, I am still trying to find a better way in doing this challange. Any help would be appriciated.
P.S. I highlighted the part where my concatenation is occuring, this part is basically the emphasis of the whole challange Notes
constructor:
Not fully utilizing the WeekCollection<T>, which is why it has too many arguments for one constructor.
no validations
default constructor is not private to enforce using the custom constructor, which adds more unneeded validation requirements to the OpeningHours.
OpeningHours is not fully immutable, you can still modify the collection.
The implementation of WeekCollection<T> is not needed, since it only restricted the underlying dictionary to 7 elements in week day order, which you can do in one line of code!. | {
"domain": "codereview.stackexchange",
"id": 39798,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, beginner, algorithm, strings",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.