text stringlengths 1 1.11k | source dict |
|---|---|
gazebo-11
Originally posted by differentiatingDuck on Gazebo Answers with karma: 1 on 2021-11-29
Post score: 0
Original comments
Comment by azeey on 2021-11-29:
Are the collision shapes for the wheels (sphere and cylinder) meshes or simple shapes in the SDFormat file? If you're using meshes, I highly recommend using simple shapes instead.
Comment by differentiatingDuck on 2021-11-30:
The sdf type is cylinder/sphere, so i'm afraid they are as simple as can be already :/
Compiling gazebo 11 from source and looking at the force values returned by the LCP solver made obvious, that the issue was within the 2nd friction direction.
The differences between the more or less similar ground contacts showed, that the second friction direction was most certainly over-constrained. | {
"domain": "robotics.stackexchange",
"id": 4628,
"lm_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-11",
"url": null
} |
ros, linux
snd_pcm 106496 10 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_rawmidi 36864 1 snd_seq_midi
snd_seq 69632 2 snd_seq_midi,snd_seq_midi_event
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_seq_midi 20480 0
snd_seq_midi_event 16384 1 snd_seq_midi
snd_soc_acpi 16384 2 snd_sof_pci,snd_soc_acpi_intel_match
snd_soc_acpi_intel_match 32768 2 snd_sof_pci,snd_sof_intel_hda_common
snd_soc_core 249856 6 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_dmic,snd_soc_skl_hda_dsp
snd_soc_dmic 16384 1
snd_soc_hdac_hda 24576 1 snd_sof_intel_hda_common
snd_soc_hdac_hdmi 36864 1 snd_soc_skl_hda_dsp
snd_soc_skl_hda_dsp 24576 6 | {
"domain": "robotics.stackexchange",
"id": 37465,
"lm_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, linux",
"url": null
} |
rosmake
[rosmake-0] Finished <<< pcl_ros ROS_NOBUILD in package pcl_ros
[rosmake-0] Starting >>> opencv2 [ make ]
[rosmake-0] Finished <<< opencv2 ROS_NOBUILD in package opencv2
[rosmake-0] Starting >>> image_geometry [ make ]
[rosmake-0] Finished <<< image_geometry ROS_NOBUILD in package image_geometry
[rosmake-0] Starting >>> cv_bridge [ make ]
[rosmake-0] Finished <<< cv_bridge ROS_NOBUILD in package cv_bridge | {
"domain": "robotics.stackexchange",
"id": 10867,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosmake",
"url": null
} |
potential-energy, continuum-mechanics
&= \iiint_\Omega \left(\textbf{b} + \nabla : \sigma \right) \cdot \delta \textbf{u} +\iiint_\Omega \sigma : \delta \left(\nabla \cdot \textbf{u} \right) d\Omega.\\ \nonumber
\end{align}
Note immediately that the first term $\textbf{b} + \nabla : \sigma$ is zero since that is identically the condition of static mechanical equilibrium. This is also called Cauchy's first law of momentum or the stress divergence equation. So, therefore
$$W = \iiint_\Omega \sigma : \delta \left(\nabla \cdot \textbf{u} \right)d\Omega.$$
which is exactly what you have above. Relating this back to $W = \int_\Omega \delta W d\Omega$ shows that $\delta W = \sigma_{ij} \delta \varepsilon_{ij}$
The constraint $\sigma_{kl}|_S = 0 $ is sometimes called a stress-free boundary condition. In continuum mechanics, this is a natural surface condition which indicates you do not have any shearing forces because they would violate mechanical equilibrium. Note that | {
"domain": "physics.stackexchange",
"id": 49416,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "potential-energy, continuum-mechanics",
"url": null
} |
c++
Title: Creating a bookingsystem in in c++ I have these six files:
Reservation.hpp;
#ifndef RESERVATION_HPP
#define RESERVATION_HPP
#include <string>
#include "Date.hpp"
class Reservation
{
std::string referenceID;
Date startDate;
Date endDate;
public:
Reservation(const std::string& referenceID, const Date& start, const Date& end);
Reservation(const Reservation& other);
Reservation& operator=(const Reservation& other);
bool operator==(const Reservation& other) const;
bool operator!=(const Reservation& other) const;
bool Overlaps(const Reservation& other) const;
const std::string& GetReferenceID() const;
const Date& GetStartDate() const;
const Date& GetEndDate() const;
};
#endif // RESERVATION_HPP
Reservation.cpp;
#include "Reservation.hpp"
#include <stdexcept> | {
"domain": "codereview.stackexchange",
"id": 44114,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
quantum-field-theory, particle-physics, feynman-diagrams, leptons
Title: How to find theoretically the decay width of a particle-decay process? The problem is devided into two parts:
First part: There is an interaction Lagrangian for real scalar fields given by
L=$\lambda_1 \phi_1 \phi_2\phi_3+\lambda_2\phi_1^2\phi_3$.
I need to know how to calculate the decay width of the process $\phi_2 \to \phi_1\phi_1\phi_1$.
I know that there are 2 vertices with corresponding couplings $\lambda_2,\lambda_1 $ and that $\phi_3$ is an internal line. However, I never seen any calculation of amplitude including the decay of one particle to three.. (only similar case of coupled quantum harmonic osciilators but this not quiet the problem).
Second part: Kind of the same problem but now this is decay of the lepton tau particle as:
$\tau \to \nu_{\tau}+ \hat\nu_{e}+e$.
Now the propogator is $W^{-}$ gauge boson, and we have two vertices with corresponding coupling for each - $\frac{g}{\sqrt2}$.
The problem is similar: how to calculate the amplitude? | {
"domain": "physics.stackexchange",
"id": 60257,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, particle-physics, feynman-diagrams, leptons",
"url": null
} |
turtlebot
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1575, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1292, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1439, in send_content
connection.endheaders(request_body)
File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 773, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 754, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 111] Connection refused | {
"domain": "robotics.stackexchange",
"id": 11652,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turtlebot",
"url": null
} |
astrophysics, stars, fusion, stellar-evolution, nucleosynthesis
Title: Why do main sequence stars get bigger and more luminous as they age? As stars age, the concentration of hydrogen in the core decreases, which lowers the power output, causing an imbalance between outward radiation pressure and inward gravitational pressure. This causes the core to collapse so that it becomes denser and hotter, which increases fusion rate until it generates enough pressure to counteract the enlarged gravitational pressure due to the core's smaller size and hence smaller surface area.
What I don't understand is why would this increased power output be larger than before, making the star brighter and causing the outer layers to expand. Shouldn't the total force produced by the core add up to balance the gravity so that the star remains at the original size?
Edit: I am specifically asking about the hydrogen burning phase of main sequence stars, where this effect is still observed. Why does the luminosity increase? | {
"domain": "physics.stackexchange",
"id": 65001,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrophysics, stars, fusion, stellar-evolution, nucleosynthesis",
"url": null
} |
reinforcement-learning, environment, function-approximation, sutton-barto
The problem is difficult because all the states appear identical under the function approximation
But this doesn't make much sense as we can always choose states as 0,1,2 and corresponding feature vectors as
x(S = 0,right) = [1 0 0 0 0 0]
x(S = 0 , left) = [0 1 0 0 0 0]
x(S = 1,right) = [0 0 1 0 0 0]
x(S = 1 , left) = [0 0 0 1 0 0]
x(S = 2,right) = [0 0 0 0 1 0]
x(S = 2 , left) = [0 0 0 0 0 1]\
So why is it written that all the states appear identical under the function approximation? You can choose those states, but is the agent aware of the state it is in? From the text, it seems that the agent cannot distinguish between the three states. Its observation function is completely uninformative.
This is why a stochastic policy is what is needed. This is common for POMDPs, whereas for regular MDPs we can always find a deterministic policy that is guaranteed to be optimal. | {
"domain": "ai.stackexchange",
"id": 2347,
"lm_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, environment, function-approximation, sutton-barto",
"url": null
} |
# How to generalize this version of Tarski’s Fixed Point Theorem?
I could prove the following result from my Real Analysis course:
Let $$f:[0,1] \rightarrow [0,1]$$ be an increasing mapping. Then it has a fixed point.
I understand that this is a very baby version of Tarski’s Fixed Point Theorem. Now, I wish to generalize this a little bit and get the following:
Let $$f:[0,1]^n \rightarrow [0,1]^n$$ in which $$f$$ is increasing in the sense that if $$y \geq x$$ coordinate wise then $$f(y) \geq f(x)$$ coordinate wise. Then, f has a fixed point.
From my point of view, we could just pick a point $$x_0 \in [0,1]^n$$, fix all coordinates but one and apply the above lemma to that coordinate. Then, when the first coordinate of the fixed point is found, we do the same for the second and so on.
However, I am not sure this route would be successful and even if it is, I can’t write the extension formally. Any ideas? Thanks a lot in advance! | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692291542526,
"lm_q1q2_score": 0.8396071272750826,
"lm_q2_score": 0.8596637451167997,
"openwebmath_perplexity": 186.73435467930994,
"openwebmath_score": 0.8786993622779846,
"tags": null,
"url": "https://math.stackexchange.com/questions/3336592/how-to-generalize-this-version-of-tarski-s-fixed-point-theorem/3336831"
} |
phylogenetics, phylogeny, sequence-annotation, genbank, barcode
Results in 266 hits which all contain COX1 COI
Using Daphnia magna ...
(Daphnia magna[Organism] AND cox1[Gene Name]) OR (Daphnia magna[Organism] AND coi[Gene Name])
This results in 775 hits.
Daphina magna comprises 61 mtDNA genomes, you perform the above search and sort by sequence length and set the sequences per page to 200(easy).
Hope that resolves the issue. | {
"domain": "bioinformatics.stackexchange",
"id": 2616,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "phylogenetics, phylogeny, sequence-annotation, genbank, barcode",
"url": null
} |
# Modular arithmetic
Hello,
What is the remainder when the following sum is divided by 4? $1^5 + 2^5 + 3^5 +...+ 99^5 + 100^5$
I feel like it has to do with modular arithmetic... I am trying to decompose every number but it seems to long and unnecessary. Any ideas?
P.S. thank you for your ideas. I got it. Please don't post solutions
• It's $0$, I believe. – Akiva Weinberger Sep 24 '14 at 17:04
• There's no need to compute all the numbers. Modular Arithmetic is the way, but you have also to get some regularity. Usually, the first thing to do is to try smaller numbers, to see if there are patterns – Exodd Sep 24 '14 at 17:07
• Hint: Any even number squared is divisible by 4 and any odd number power will give remainder 1. So count how many odds there are. – Ali Caglayan Sep 24 '14 at 17:08
HINT : Note that in mod $4$, $$1^5\equiv1,\ \ 2^5\equiv 0,\ \ 3^5\equiv (-1)^5=-1\equiv 3,\ \ 4^5\equiv 0$$ and that $$1+0+3+0\equiv 0,\ \ 100=4\times 25.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769071055402,
"lm_q1q2_score": 0.8640016214251292,
"lm_q2_score": 0.8856314813647587,
"openwebmath_perplexity": 262.99803592972114,
"openwebmath_score": 0.7862219214439392,
"tags": null,
"url": "https://math.stackexchange.com/questions/944568/modular-arithmetic"
} |
imu, navigation, ekf, gps, robot-localization
Outputs
Transformed GPS data as odometry message (topic: /odometry/gps)
The image of my hardware setting is quite simple:
https://drive.google.com/file/d/0BwCt69n0gpFbc0c0ek03TGd0aEk/view?usp=sharing
My current launch file is:
<launch>
<include file="$(find gps_ublox)/launch/gps.launch"/>
<include file="$(find imu_ftdi)/launch/imu.launch"/>
<!--node name="location_prediction_node" pkg="location_prediction" type="location_prediction_node" output="screen"/--> | {
"domain": "robotics.stackexchange",
"id": 25462,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "imu, navigation, ekf, gps, robot-localization",
"url": null
} |
motor, servomotor, steering
For drive electronics you will need a way of controlling your steering actuator and a way of knowing what position it is in. You also need to know the speed of each motor so you can control the exact speed of each one (depending on how beefy the mechanics are this might not be necessary). For the robot I am working on if you drive the motors at the wrong speeds then it will probably rip the wishbones right off the robot!
Summary
Skid steering: | {
"domain": "robotics.stackexchange",
"id": 1125,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "motor, servomotor, steering",
"url": null
} |
c#, thread-safety
public class Provider<TItem> where TItem : IItem
{
private readonly Queue<TItem> queue = new Queue<TItem>();
private readonly HashSet<TItem> inputBuffer = new HashSet<TItem>();
// other methods and fields ...
private bool CanAdd(TItem feedingItem)
{
return !inputBuffer.Contains(feedingItem.Id) // IItem.Id is still accessible
&& !queue.Count >= maxQueueCount;
}
public TItem Dequeue()
{
// thread safety code ...
return queue.Dequeue();
}
}
And would be used something like this:
var queueProvider = new Provider<Document>();
var inputDoc = new Document();
queueProvider.TryEnqueue(inputDoc);
var outputDoc = queueProvider.Dequeue(); // Type of outputDoc is Document
var outputId = outputDoc.MessageId; // MessageId is accessible without cast
Beyond that, my only advice would be to consider the names carefully: | {
"domain": "codereview.stackexchange",
"id": 31940,
"lm_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#, thread-safety",
"url": null
} |
quantum-mechanics, hilbert-space, quantum-information, quantum-entanglement, quantum-states
As above, no, entanglement/separability and purity/mixedness measure different types of properties. An entangled state can be both pure and mixed. For example, a two-qubit Bell state is entangled and pure. A Werner state is (for $p<1/3$, or some other range depending on the way it is defined) entangled, but not pure.
More explicitly, you can use as an example
$$(1-\epsilon)|\Psi^+\rangle\!\langle\Psi^+|+\epsilon \frac{I\otimes I}{4},$$
where $|\Psi^+\rangle$ is a(ny) Bell state, and $\epsilon>0$ is small enough. The idea is that you are mixing a maximally entangled state with a maximally mixed one. If the mixed component is small enough, the state remains entangled.
One thing that can be said though is that entanglement in pure states is relatively easy to detect and classify, whereas things get way more tricky for general entangled states. | {
"domain": "physics.stackexchange",
"id": 79654,
"lm_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, hilbert-space, quantum-information, quantum-entanglement, quantum-states",
"url": null
} |
inorganic-chemistry
Using Pauling's formula with the 1.14 A triple bond in N2 as a reference:
D(n) = D(m) - 0.6log(n/m)
With D(n, m) is the length of the bond with order n, m respectively.
The N-N bond order in N2O4, N2O3 and N2H4 can be estimated to be 0.44, 0.19 and 0.85 respectively. | {
"domain": "chemistry.stackexchange",
"id": 15568,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry",
"url": null
} |
quantum-mechanics, operators, vectors
\end{bmatrix}
\begin{bmatrix}
\hat{B}_1\\\hat{B}_2\\\hat{B}_3
\end{bmatrix}\\
&= \hat{A}_1\hat{B}_1 + \hat{A}_2\hat{B}_2 + \hat{A}_3\hat{B}_3
\end{align}
Here $\hat{\textbf{A}}^T$ indicates the vector/matrix transpose of the vector $\hat{\textbf{A}}$.
These are the main points I would like to make but I will edit to add a few more helpful tips later.
edit: The OP seems to be concerned about if any adjointing is involved so I will address that here. I would always interpret the dot $\cdot$ the following way:
\begin{align}
\hat{\textbf{A}}\cdot \hat{\textbf{B}} = \hat{\textbf{A}}^T\hat{\textbf{B}}
\end{align}
In cases where the vectors are composed of Hermitian operators (such as $\hat{\textbf{J}}$ for example) there is nothing to clarify. Let me introduce a case where the operators in the vector are not Hermitian. Suppose we have a system of two couple harmonic oscillator. We can define a vector
\begin{align} | {
"domain": "physics.stackexchange",
"id": 52575,
"lm_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, operators, vectors",
"url": null
} |
(17 is a freak number and there aren't many "easy" ways of dealing with multiples of 17. Don't let 17 get you down. That guy is a douche. )
There are even MORE (vastly more) efficient tricks than this but this will get you started in thinking this way. As you get used to working around outdated and BAD solutions you were taught in school, you'll find more efficient ways. Some of them are harder to explain and sound ridiculously complex. But it's really about retraining your brain. I STILL DON'T UNDERSTAND how people use carries and borrows and if i do it this way, i often make stupid mistakes. You can't do these well if your handwriting is illegible. Mine is. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9572778073288128,
"lm_q1q2_score": 0.8018349960540487,
"lm_q2_score": 0.8376199572530448,
"openwebmath_perplexity": 513.5851958890939,
"openwebmath_score": 0.6354476809501648,
"tags": null,
"url": "http://math.stackexchange.com/questions/104270/doing-simple-math-in-your-head/104272"
} |
acoustics, everyday-life, wavelength, resonance
Short and to-the-point answers are welcome.
I acknowledge the fact that questions regarding human perception are difficult to answer. But I think even if you leave the human component
out of this question, it's something worth thinking about. Like, people who play wind instruments will be aware of this very same effect. What exactly is happening when you move from "whistling" to "windy sound"? You can find everything beautifully explained in this website on brass instruments: https://newt.phys.unsw.edu.au/jw/brassacoustics.html | {
"domain": "physics.stackexchange",
"id": 99483,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acoustics, everyday-life, wavelength, resonance",
"url": null
} |
java, performance, comparative-review, rest, web-services
The root cause of your conundrum is that you're not using the power of widely used java sql abstractions. Instead of manually writing SQL statements and performing updates, you should really make use of JPA and Entities.
If you had these, all of this would boil down to the following simplified code:
private void updateLocation(String username, MapLocation update) {
MapLocation stored = em.find(MapLocation.class, update.getLocationId());
if (stored == null) {
throw new LocationDoesNotExistException();
}
if (!stored.getUsername().equals(username)) {
throw new IllegalLocationUpdateException();
}
em.persist(update);
} | {
"domain": "codereview.stackexchange",
"id": 34899,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, comparative-review, rest, web-services",
"url": null
} |
ros, moveit, catkin, build, source
Title: Moveit-catkin build
Why does source installation of moveit package needs to be built with catkin build command instead of catkin_make? What is the advantage of doing so.
Originally posted by Gokul on ROS Answers with karma: 243 on 2016-12-12
Post score: 2
It does not need to.
catkin_make works perfectly fine.
Dave Coleman wrote the current build instructions and he's a proponent of the catkin tools over catkin_make.
It handles some things more "user-friendly" than catkin_make, among other things it automatically deals with pure-cmake projects inside the workspace (catkin_make_isolated is required for that). I suppose this is especially important for Dave as he often builds OMPL within the same workspace as far as I know.
Personally, I believe building up more software on top of cmake just moves us back in the direction of rosbuild and that's not were I want to go.. But I do see the "user-friendliness argument". | {
"domain": "robotics.stackexchange",
"id": 26461,
"lm_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, moveit, catkin, build, source",
"url": null
} |
# Are vector expressions and vector operator expressions independent of coordinates
We encounter expressions for vectors and tensors in Euclidean space, such as
$$\vec{F}=\vec{A}+\nabla\phi,$$ or
$$\vec{H} = \nabla\vec{u}\cdot\vec{n}+\nabla\times(\nabla\times\vec{B}) + \frac{\partial \vec{B}}{\partial t},$$ or
$$\nabla\cdot\vec{E}=\vec{C}\cdot\hat\Phi\cdot[(A\cdot\nabla)\vec{B}]-\vec{A}\cdot\vec{B}.$$
and other similar expressions, which include in themselves vectors, tensors and differential operators. Then we are told that these expressions "are independent of coordinates". Does this mean these expressions are the same in ANY coordinate system in Euclidean space? What about non-orthogonal coordinates? Curvilinear coordinates?
Can someone explain why are they the same. If changing the basis, what does one need to know to arrive at the "same" expression in the new coordinates?
If one writes the expression in the new coordinates, and it is not the same, what went wrong? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471642306267,
"lm_q1q2_score": 0.8155490979665829,
"lm_q2_score": 0.8289388104343893,
"openwebmath_perplexity": 387.4838743429249,
"openwebmath_score": 0.8131534457206726,
"tags": null,
"url": "https://physics.stackexchange.com/questions/341018/are-vector-expressions-and-vector-operator-expressions-independent-of-coordinate"
} |
biochemistry, cell-biology, theoretical-biology
Title: Integration of several environmental signals I am looking for examples of different functions that are good fit to how signals are computed in order to respond to the environment. Let's make my question more copmrehensible with an example...
One example
I have been told (I haven't found an article yet) that in plants, in order to know if it is overshadowed by a big tree, the plant computes that ratio of two signals (UV intensity over Infrared intensity or something similar) so that it can decide whether or not it should grow bigger leaves or other attributes.
This plant radiation example would be an example of a species that computes the function $\frac{S_1}{S_2}$ (where $S_1$ and $S_2$ are two types of signals) in order to take decisions about their response to the environment.
Question | {
"domain": "biology.stackexchange",
"id": 2761,
"lm_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, cell-biology, theoretical-biology",
"url": null
} |
ros, roslaunch, remote-launch, ssh, ros-indigo
You can create a custom env file on the robot that sets things like ROS_HOSTNAME as well as sourcing the setup.bash. Or you can resolve the hostname resolution.
Originally posted by tfoote with karma: 58457 on 2017-06-13
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by jayess on 2017-06-13:
I've tried the hostname with a number of different names (red, yellow, etc.) along with different names for the address and user and have had the exact same results. I can also ping myself as well.
Comment by tfoote on 2017-06-13:
Can you explain what you mean by red and yellow? Can you provide a non-sanitized output? One of the machines cannot ping itself. And remember that when you ssh like this you don't get your ~/.bashrc.
ssh user@address ping \`hostname\`
ssh user@address ping robot | {
"domain": "robotics.stackexchange",
"id": 28114,
"lm_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, roslaunch, remote-launch, ssh, ros-indigo",
"url": null
} |
thermodynamics, classical-mechanics, forces, mathematical-physics, pressure
The pressure as a function of $y$ according to Pascal's Law is:
$$p(y)=p_0+\rho g y\sin \theta$$
Where $p_0$ is the atmospheric pressure and $\theta=45\:\mathrm{degrees}$. $y\sin \theta$ is the depth.
On an infinitesimal piece of door of length $dy$, at position $y$ and with width $W$, the pressure exerts a force $dF$:
$$dF=p(y)Wdy$$
Or:
$$dF=W(p_0+\rho g y\sin \theta)dy$$
To find the total force $F$ we integrate:
$$F=\int_{y_1}^{y_2}W(p_0+\rho g y\sin \theta)dy$$
$$F=Wp_0(y_2-y_1)+\frac12 W\rho g \sin \theta (y_2^2-y_1^2)$$
Where:
$\rho=1100\:\mathrm{kg/m^3}$
$W=1\:\mathrm{m}$
$y_1=2\:\mathrm{m}$
$y_2=3\:\mathrm{m}$
$\sin 45=\frac{\sqrt{2}}{2}$
$g=9.81\:\mathrm{m/s^2}$
$p_0=101325\:\mathrm{Pa}$
Note that the term $Wp_0(y_2-y_1)$ is often discarded because atmospheric pressure acts also on the dry side of the door. By discarding the atmospheric term we're calculating the net force on the door. | {
"domain": "physics.stackexchange",
"id": 30377,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, classical-mechanics, forces, mathematical-physics, pressure",
"url": null
} |
soft-question, career, advice-request
Title: How to get a job I'm new to the site. On mathoverflow this would be community wiki, but I don't see how to set that here. Not a research question, but hopefully of interest to professional theoretical computer scientists.
I am a 2nd year grad student in theory, and I was wondering what advice the community had for what I should be doing now to aim for a career in academia. I know I should "do great research" -- yes, I try. :-) I am looking for less obvious advice. How important are social aspects? Going to conferences, knowing great people? Am I at a big disadvantage if my advisor/school are not famous? Does a blog help/hurt my chances?
Thanks! Ok, let me bite with my own opinions:
How important are social aspects?
I would say that they are very important. Despite popular myth, scientific research is really a social activity -- Your research must interest other people in the area.
Going to conferences,
Very important -- for the previous reason
knowing great people? | {
"domain": "cstheory.stackexchange",
"id": 351,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "soft-question, career, advice-request",
"url": null
} |
python, python-3.x
if name == "main"
Usually, most programs will want a __name__ == "__main__" guard. This guard will only be True if the program is called like python poker.py but not if it is imported like from poker import main. Also, it might be helpful to pass the players names as sys args:
if __name__ == "__main__":
import sys
players = get_player_dict(sys.argv[1:])
if not players:
# since this is a cli-game anyways, might be helpful to display a
# use message if they called it with no players
usage()
sys.exit(0)
main(players)
Where usage might look like:
def usage():
print("Call this script by passing the names of players as")
print("sys-args like so:")
print(" python poker.py Alice James Steve Laura ")
Odds and Ends
Checking types of objects
It is more pythonic to use isinstance rather than type(obj) == <type>
d = {}
# do this
if isinstance(d, dict):
# not this
if type(d) == dict: | {
"domain": "codereview.stackexchange",
"id": 37213,
"lm_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
} |
audio, algorithms, software-implementation, fixed-point
the CPU/DSP has hardware floating point support for both single and double precision
The priority is quality audio, not high performance. For example, double precision would be considered if it offered better (perceptual) quality. IEEE float singles only provide about 24 bits of mantissa. But many DSP/filtering algorithms (IIR biquads with poles/zeros near the unit circle, etc.) require far more than 24 bits of mantissa for intermediate computational products (accumulators, etc.), just to get final results accurate to near 16 or 24 bits. For these types of algorithms, 32, 40 and 48-bit scaled integer accumulators were often used with DSPs that had no FPU.
But on many current processor implementations (for PCs, smartphones, etc.), the double precision FPU is far faster than trying to use 32 or 64 bit scaled integer when your algorithm needs to have more than 24 bits of intermediate product. | {
"domain": "dsp.stackexchange",
"id": 573,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "audio, algorithms, software-implementation, fixed-point",
"url": null
} |
javascript, object-oriented, ecmascript-6, polymorphism, 99-bottles-of-beer
it('sings the rest of the verses', function() {
var expected = '3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.';
expect(song.sing(3)).toEqual(expected);
});
// don't forget to add unit tests for the errors
// (I'm not even sure what unit testing library this is, so I'll leave that to you)
}); | {
"domain": "codereview.stackexchange",
"id": 24110,
"lm_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, object-oriented, ecmascript-6, polymorphism, 99-bottles-of-beer",
"url": null
} |
ph, titration
As an example, if you had 10 mmol of HA to start, then at the pKa point you would have 5 mmol of HA and 5 mmol of A-. Now, if you keep adding base, at some point you will essentially consume the remaining 5 mmol of HA. Then, there will be negligible amount left and it can't buffer anymore - i.e. your pH will change rapidly because you are adding strong base. Here you will have ~0 mmol of HA, and ~10 mmol of A-. Note that you have twice the amount of A- now. The pKa will have been at the point where you had half of this.
Experimentally, I know two simple ways. Using a pH meter and no indicator, you have to measure the sharp region more carefully (i.e., drop by drop), because you want to be able to find the exact point where the pH changes the fastest. By approximating the derivative, i.e.
$$ \frac{d}{d(V_{base})} pH(x_i) \approx \frac{pH(x_{i+1})-pH(x_{i-1})}{x_{i+1}-x_{i-1}}$$ | {
"domain": "chemistry.stackexchange",
"id": 10727,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ph, titration",
"url": null
} |
tensorflow, data-science-model, reshape
output shapes
(None, 240, 240, 3)
preprocess: (None, 240, 240, 3)
resnet: (None, 8, 8, 2048)
Flatten: (None, 131072)
dense: (None, 128)
reshape: (None, 50, 128) | {
"domain": "datascience.stackexchange",
"id": 11686,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tensorflow, data-science-model, reshape",
"url": null
} |
quantum-state, density-matrix, unitarity, pauli-gates, clifford-group
Then, the set of such cosets $ U \cdot C_{n-1} $ is $C_n/C_{n-1}$.
Hence it can be seen as equivalence classes of Cliffords (if your more familiar with that term).
The relevance of all this is that Lagrange's theorem tells you that the order of $C_n$ is now given as
$$
|C_n| = |C_n/C_{n-1}| |C_{n-1}|.
$$
(the notation is kind of suggestive that this indeed holds).
To compute the cardinality of $C_n$, we thus first have to determine the number of cosets $|C_n/C_{n-1}|$.
Two Cliffords $U,W\in C_n$ are in the same coset if and only if
$$
UX_nU^\dagger = WX_nW^\dagger, \quad UZ_nU^\dagger = WZ_nW^\dagger.
$$
Thus, the number of cosets is given by the possible images of $X_n$ and $Z_n$.
Up to a $\pm 1$ phase, the possible images coincide with ordered pairs of anti-commuting Pauli operators.
Let's count those.
Clearly, we can select the first Pauli operator freely, so there are $4^n-1$ non-trivial choices. | {
"domain": "quantumcomputing.stackexchange",
"id": 3155,
"lm_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, density-matrix, unitarity, pauli-gates, clifford-group",
"url": null
} |
cc.complexity-theory, ho.history-overview
Title: "Steve's class": origin of SC We "know" that $\mathsf{SC}$ is named for Steve Cook and $\mathsf{NC}$ is named for Nick Pippenger. If I'm not mistaken, Steve Cook named NC in honor of Nick Pippenger, and I was told that the reverse is true as well. However, I wasn't able to find any evidence of this latter fact in either Steve Cook's paper on DCFLs or Nisan's proof that $\mathsf{RL} \subseteq \mathsf{SC}$.
Is there any documented evidence of the latter claim, or is this merely "in the air" ?
p.s I'm asking because I was browsing examples of Stigler's Law of Eponymy, and was wondering about what I'll call "Stigler Reciprocity": where something invented by A is named after B and vice versa. An example of this is Cartan Matrices and Killing forms. The following is according to Nick Pippenger: | {
"domain": "cstheory.stackexchange",
"id": 1363,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, ho.history-overview",
"url": null
} |
java, algorithm, sorting, mergesort
private static void warmup(Random random) {
System.out.println("Warming up...");
Integer[] array = getBlockedArray(ARRAY_LENGTH, BLOCKS, random);
warmup(array);
array = getRandomArray(ARRAY_LENGTH, random);
warmup(array);
array = getFunnyArray(ARRAY_LENGTH, random);
warmup(array);
array = getRunnyArray(ARRAY_LENGTH, RUNS, random);
warmup(array);
array = getZigZagArray(ARRAY_LENGTH);
warmup(array);
System.out.println("Warming up done!");
}
private static void benchmark(Random random) {
Integer[] array = getBlockedArray(ARRAY_LENGTH, BLOCKS, random);
System.out.println("\n--- Blocked array ---");
benchmark(array);
array = getRandomArray(ARRAY_LENGTH, random);
System.out.println("\n--- Random array ----");
benchmark(array); | {
"domain": "codereview.stackexchange",
"id": 27897,
"lm_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, sorting, mergesort",
"url": null
} |
machine-learning, training
You can see the mapping of the VP onto the PP as a pile of slices of size the number of PP.
Say you've got 16 PP.
You can map 16 VP on them : 1 VP is mapped onto 1 PP.
You can map 32 VP on them : 2 slices of 16 VP, 1 PP will be responsible for 2 VP.
Etc.
During execution, each PP will execute the job of the 1st VP he is responsible for, then the job of the 2nd VP etc.
If you use 17 VP, each PP will execute the job of their 1st PP, then 1 PP will execute the job of the 17th AND the other ones will do nothing (precised below).
This is due to the SIMD paradigm (called vector in the 70s) used by GPUs. This is often called Data Parallelism : all the PP do the same thing at the same time but on different data. See here.
More precisely, in the example with 17 VP, once the job of the 1st slice done (by all the PPs doing the job of their 1st VP), all the PP will do the same job (2nd VP), but only one has some data to work on.
Nothing to do with learning. This is only programming stuff. | {
"domain": "datascience.stackexchange",
"id": 9232,
"lm_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, training",
"url": null
} |
an input feature as its output point location. P-718. Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin. For [MULTI]POINTs, the centroid is the arithmetic mean of the input coordinates.For [MULTI]LINESTRINGs, the centroid is computed using the weighted length of each line segment.For [MULTI]POLYGONs, the centroid is computed in terms of area.If an empty … The definition of a centroid of … See medians of a triangle for more information. $$\bar{X}$$ = L/2 = 50/2 = 25 cm. The centroid of an area is the point at which all the area could be concentrated without changing its first moment about any axis. Subscribe to Engineering Intro | Engineering Intro by Email, The Importance of Fall Protection Systems on Construction Sites, Pressure Vessels & Benefits of Rupture Disc, How Termites Can Destroy the Foundations of a House and What to Do About It, How to Identify, Classify & Manage Project Stakeholders, How to Repair & Prevent Cracks in | {
"domain": "vidyaxpert.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464520028357,
"lm_q1q2_score": 0.8314603088520551,
"lm_q2_score": 0.8519527963298946,
"openwebmath_perplexity": 668.2425749367483,
"openwebmath_score": 0.5760510563850403,
"tags": null,
"url": "https://www.vidyaxpert.com/institute-of-jkwhb/9efe32-centroid-of-lines"
} |
thermodynamics, special-relativity, energy, reference-frames, relative-motion
The random motion of the particles is equivalent the amount of heat energy. The velocity of collective motion does not result in heat energy. For example take the case of wind. The particles are collectively moving with some velocity (wind velocity) but there isn't any heat energy associated with that motion ( otherwise the faster the wind, the hotter it would be). To understand this is simple. The wind velocity constitutes the kinetic energy. And we can move onto a reference frame where the velocity of the collective motion of the particles is 0 but the velocity of the random motion still remains. That makes me state that the amount of heat energy given or taken in any process should be the same in any inertial reference frame, because the velocity of random motion will always exist in any inertial frame whereas the velocity of collective motion can be eliminated by choosing suitable reference frames. | {
"domain": "physics.stackexchange",
"id": 73267,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, special-relativity, energy, reference-frames, relative-motion",
"url": null
} |
Code: Select all
enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]
blademan9999
Posts: 44
Joined: Sun May 01, 2011 5:18 am UTC
### Re: A criminal hides in a room with 99 innocent people...
There will be 0.95 true positives and 0.05*99 = 4.95 false positives.
That gives us 0.95/(4.95+0.95) = 0.95/5.9= 0.161 = 16.1%
http://officeofstrategicinfluence.com/spam/
That link kills spam[/size][/b][/u]
silverhammermba
Posts: 178
Joined: Fri Oct 13, 2006 1:16 am UTC
### Re: A criminal hides in a room with 99 innocent people...
This is clearly a case of different interpretations resulting in different answers. I agree with skeptical scientist's answer, but apparently the question was removed from the OP and replaced with a different one?
Return to “Mathematics”
### Who is online
Users browsing this forum: No registered users and 10 guests | {
"domain": "xkcd.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9773707999669627,
"lm_q1q2_score": 0.8307370023297075,
"lm_q2_score": 0.8499711699569786,
"openwebmath_perplexity": 1235.9388402002965,
"openwebmath_score": 0.6295595765113831,
"tags": null,
"url": "http://forums.xkcd.com/viewtopic.php?f=17&t=71488&p=2638353"
} |
v = TimeFunction(name='v', grid=grid)
init_hat(field=v.data[0], dx=dx, dy=dy, value=2.)
plot_field(u.data[0])
Using the two TimeFunction objects we can again derive our dicretized equation, rearrange for the forward stencil point in time and define our variable update expression - only we have to do everything twice now! We again use foward differences for time via u.dt and backward differences in space via u.dxl and u.dyl to match the original tutorial.
In [5]:
from devito import Eq, solve
eq_u = Eq(u.dt + u*u.dxl + v*u.dyl)
eq_v = Eq(v.dt + u*v.dxl + v*v.dyl)
# We can use the same SymPy trick to generate two
# stencil expressions, one for each field update.
stencil_u = solve(eq_u, u.forward)
stencil_v = solve(eq_v, v.forward)
update_u = Eq(u.forward, stencil_u, subdomain=grid.interior)
update_v = Eq(v.forward, stencil_v, subdomain=grid.interior)
print("U update:\n%s\n" % update_u)
print("V update:\n%s\n" % update_v) | {
"domain": "jupyter.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513910054508,
"lm_q1q2_score": 0.847758608680747,
"lm_q2_score": 0.8596637559030338,
"openwebmath_perplexity": 14783.365351883162,
"openwebmath_score": 0.962617814540863,
"tags": null,
"url": "http://nbviewer.jupyter.org/github/opesci/devito/blob/master/examples/cfd/02_convection_nonlinear.ipynb"
} |
ros-melodic, catkin-make
note the myproject_gazebo in the second line of the Call Stack.
It's likely you have a catkin_package(... CATKIN_DEPENDS gazebo ..) in the CMakeLists.txt of your myproject_gazebo package, but you don't have a find_package(gazebo) or added it to your find_package(Catkin .. COMPONENTS ..) call.
As-is, I don't believe this is a problem with ur_robot_driver, but with myproject_gazebo.
Originally posted by gvdhoorn with karma: 86574 on 2020-04-08
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Vuro H on 2020-04-19:
Thanks a lot for your help, you were right with this | {
"domain": "robotics.stackexchange",
"id": 34715,
"lm_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, catkin-make",
"url": null
} |
physical-chemistry, kinetics
The integration constant can now be determined by enforcing boundary conditions. In this particular case this means that at the start of your reaction ($t=0$) you require that $[\ce{B}]$ is equal to the initial concentration of your reactant $\ce{B}$, i.e. $[\ce{B}](t\! = \! 0) = [\ce{B}]_0$. So, plugging $t=0$ and $[\ce{B}](t\! = \! 0) = [\ce{B}]_0$ into the equation for $[\ce{B}]$ you get
\begin{align}
[\ce{B}]_0 &= \frac{k_1}{k_2 - k_1} [\ce{A}]_{0} \bigl( \mathrm{e}^{0} - \mathrm{e}^{0} \bigr) + \tilde{C} \mathrm{e}^{0} \\
[\ce{B}]_0 &= \tilde{C} \ .
\end{align}
In the case of your reaction $\ce{A -> B -> C}$ the initial concentration of $[\ce{B}]$ will usually be $0$ as $\ce{B}$ is only an intermediate product, so $\tilde{C} = [\ce{B}]_0 = 0$ and the final equation is
\begin{align}
[\ce{B}] &= \frac{k_1}{k_2 - k_1} [\ce{A}]_{0} \bigl( \mathrm{e}^{-k_1 t} - \mathrm{e}^{-k_2 t} \bigr) \ .
\end{align} | {
"domain": "chemistry.stackexchange",
"id": 8998,
"lm_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
} |
I found this solution from Bunuel.
Statement 2. $$x^2 + y^2 + 2xy > 200$$
Since $$(x-y)^2$$ is cannot be lesser than 0, (square of a number is always positive or 0), the minimum value that 2xy can take is equal to $$x^2 + y^2$$.
So statement 2 can be changed to be, $$x^2 + y^2 + x^2 + y^2 > 200$$.
So, $$x^2 + y^2 > 100$$.
That is a convincing method to show that B is infact the right answer.
Kudos Please... If my post helped.
_________________
Did you find this post helpful?... Please let me know through the Kudos button.
Thanks To The Almighty - My GMAT Debrief
GMAT Reading Comprehension: 7 Most Common Passage Types
Math Expert
Joined: 02 Sep 2009
Posts: 53738
Re: Is x^2+y^2>100?? (1) 2xy<100 (2) (x+y)^2 [#permalink]
### Show Tags
29 Oct 2012, 04:41
1
rajathpanta wrote:
Is x^2+y^2>100??
(1) 2xy<100
(2) (x+y)^2>200
To me its only B. because statement 2 boils down to x+y>$$\sqrt{200}$$
Can someone explain the OA | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8333245994514082,
"lm_q2_score": 0.8333245994514082,
"openwebmath_perplexity": 1794.2052198410765,
"openwebmath_score": 0.8158167600631714,
"tags": null,
"url": "https://gmatclub.com/forum/is-x-2-y-108343-20.html"
} |
graphs. It was conceived by computer scientist Edsger W. Finding the shortest path, with a little help from Dijkstra! If you spend enough time reading about programming or computer science, there’s a good chance that you’ll encounter the same ideas. This technique is applied to a minute level bid/ask quote dataset consisting of rates constructed from all G10 currency pairs. • In addition, the first time we encounter a vertex may, we may not have found the shortest path to it, so we need to delay committing to that path. 1 Shortest Path Queries Let G= (V;E;˚) be a road network (i. Start by setting the distance of all notes to infinity and the source's distance to 0. The previous state of the art for this problem was total update time O ̃(n 2 √m/ε) for directed, unweighted graphs [2], and Õ(mn=ε) for undirected, unweighted graphs [12]. A path in a graph is a sequence of adjacent vertices. shortest s-tpath in G n. Algorithms to find shortest paths in a graph are given later. These weights | {
"domain": "chicweek.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987758723627135,
"lm_q1q2_score": 0.8528226068102591,
"lm_q2_score": 0.8633916222765627,
"openwebmath_perplexity": 383.31142122654893,
"openwebmath_score": 0.5556688904762268,
"tags": null,
"url": "http://isxy.chicweek.it/number-of-shortest-paths-in-a-weighted-graph.html"
} |
javascript, array, interview-questions
Title: Given an array of integers, return all pairs that add up to 100 I was recently given this programming challenge on an interview, and I decided to use javascript to solve it. I did, but I'm not happy with my implementation. I can't help thinking there must be a better way of doing this.
The exercise goes like this:
Given an array of integers, write a function that returns an array of
each pair of integers that add up to 100. The input is
[0, 1, 100, 99, 0, 10, 90, 30, 55, 33, 55, 75, 50, 51, 49, 50, 51, 49, 51]
and the function should return something like this (the order is not
important).
[ [0,100], [1,99], [10,90], [50,50], [49,51] ]
My implementation looks like this, is there a different approach out there?
var sample_data = [0, 1, 100, 99, 0, 10, 90, 30, 55, 33, 55, 75, 50, 51, 49, 50, 51, 49, 51]
function process(data){
var result = []
var a;
var b;
for (var i=0; i < data.length; i++) {
a = data[i]; | {
"domain": "codereview.stackexchange",
"id": 11537,
"lm_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, array, interview-questions",
"url": null
} |
c++, collections, c++20, memory-optimization, set
About operator--()
With standard library iterators, it is never valid for the caller to decrement an iterator past begin(). So you don't need the check for i != 0, and can just write:
Minterms::ConstIterator& Minterms::ConstIterator::operator--()
{
while (!minterms.bitset[--i]) {}
return *this;
} | {
"domain": "codereview.stackexchange",
"id": 45368,
"lm_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++, collections, c++20, memory-optimization, set",
"url": null
} |
hyperbolic partial differential equations. It first does the 2nd order centered finite-difference approximation of one of the partials, and then inserts the approximation. Figure 1: Depiction of a piecewise approximation to a continuous function A one-dimensional continuous temperature distribution with an infinite number of unknowns is shown in (a). The journal Les Publications mat. 12 CHAPTER 2. 1) is called a forward differencing or one-sided differencing. Central difference approximation to the first derivative as an average of first order for-ward and backward difference approximations • We note that first order central difference approximations can also be derived as arith-metic averages of first order forward and backward difference approximations. However, if a foundation is present polynomial approximations will no longer be exact at the nodes. | {
"domain": "frenca.pw",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676496254957,
"lm_q1q2_score": 0.8009512611318874,
"lm_q2_score": 0.817574471748733,
"openwebmath_perplexity": 424.02528520458384,
"openwebmath_score": 0.7635736465454102,
"tags": null,
"url": "http://xoab.frenca.pw/third-derivative-finite-difference-approximation.html"
} |
ros-melodic, hector-slam
I have tried to launch the file multiple times and sometimes I get the error:
RLException: Invalid <arg> tag: hector_geotiff
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share
Argxml is <arg default="$(find hector_geotiff)/maps" name="geotiff_map_file_path"/>
The traceback for the exception was written to the log file
I have set roscd as ~a_ws/devel and the HectorSLAM package has the hector_geotiff package in it
any help fixing this error would be greatly appreciated.
Originally posted by Nosnik on ROS Answers with karma: 3 on 2020-03-11
Post score: 0
Have you installed hector_geotiff with sudo apt-get install ros-melodic-hector-geotiff?
Do you have this folder: /opt/ros/melodic/share/hector_geotiff if you have already installed?
Have you tried to launch without changing roscd from ~ just typing roslaunch hector_slam_launch tutorial.launch?
Originally posted by tp_ink with karma: 26 on 2020-04-16
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 34579,
"lm_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, hector-slam",
"url": null
} |
complexity-theory, np-complete, p-vs-np, check-my-answer
A similar argument shows that $\emptyset$ is not $\mathsf{NP}$-complete.
However, if $\mathsf{P}=\mathsf{NP}$, then it is true that all languages in $\mathsf{NP} \setminus \{\emptyset, \Sigma^*\}$ are $\mathsf{NP}$-complete. To see this, let $A \in \mathsf{NP} \setminus \{\emptyset, \Sigma^*\}$ and pick any $L \in \mathsf{NP}$. Since there are $y,z$ such that $y \in A$ and $z \not\in A$, a valid Karp reduction from $L$ to $A$ is the following:
$$f(x) =
\begin{cases}
y & \text{if } x \in L \\
z & \text{if } x \not\in L
\end{cases}.
$$
Notice that $f$ can be computed in polynomial time since $L \in \mathsf{NP} = \mathsf{P}$ by hypothesis (and hence it is possible to check whether $x \in L$ in polynomial time). | {
"domain": "cs.stackexchange",
"id": 21215,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, np-complete, p-vs-np, check-my-answer",
"url": null
} |
ruby
def highest_ranking(entries)
# Takes a hashmap of the form {"foo" => 100, "bar" => 45} and returns an array
# containing the entries (array-ified) with the highest number as a value.
entries.group_by{|word, occs| occs}.sort.last.last
end
I simplified max_by{|key, value| key}.last to just sort.last.last -- it turns out that Enumerable#sort knows how to properly handle sorting by keys, so getting the highest one is just a matter of sorting the hash and grabbing the last item in the resulting array. (The extra last is there for the same reason the last is there in your function -- to drop the number of occurrences and just return the key/value entries in the result array)
Now that you have this useful helper function, finding the highest occurring words and longest words is simple:
public
def highest_occurring_words
highest_ranking @occurrences
end
def longest_words
highest_ranking @lengths
end | {
"domain": "codereview.stackexchange",
"id": 7128,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby",
"url": null
} |
ros, navigation, acceleration, dwa-local-planner, move-base
Originally posted by David Lu with karma: 10932 on 2014-08-14
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Chrissi on 2014-08-15:
Thank you very much for the tip! I'll try that and report back.
Comment by Chrissi on 2014-08-18:
Today I finally had time to test it. Sadly, setting the resolution to .01 does not have any effect. As soon as I set the acc_lim_x below 1.0 (e.g. .9) move_base is not able to find a path any more.
Comment by surfertas on 2017-05-08:
@Chrissi Are you still having issues with this? | {
"domain": "robotics.stackexchange",
"id": 19055,
"lm_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, acceleration, dwa-local-planner, move-base",
"url": null
} |
risk-return optimization. Those customers like to use Cvxpy or Mosek Fusion to interface the optimizer. MPT is based on the idea that a diversified portfolio--a portfolio that holds several assets, or asset classes, that have some inverse correlation--may be constructed which provides less. Investment Portfolio Optimization. No shorting. The problem is to find what fraction to invest in each asset in order to minimize risk, subject to a specified minimum expected rate of return. Developing optimization models is a fundamental skill that is at the core of many scientific fields and professions. (See Section3). Philipp Baumann, Spring 2020 Portfolio Optimization Slide O18. In this blog post you will learn about the basic idea behind Markowitz portfolio optimization as well as how to do it in Python. Problems in linear programming, quadratic programming, integer programming, nonlinear optimization, systems of dynamic nonlinear equations, and multiobjective optimization can be solved. The | {
"domain": "freccezena.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305381464927,
"lm_q1q2_score": 0.8047632511380802,
"lm_q2_score": 0.8354835309589074,
"openwebmath_perplexity": 1894.8592761976015,
"openwebmath_score": 0.26045969128608704,
"tags": null,
"url": "http://nrvt.freccezena.it/python-portfolio-optimization-cvxopt.html"
} |
algorithms, strings, rolling-hash
Let the haystack be a string of $m$ $1$'s, i.e. $1111111\ldots$ and the needle a string consisting of $n$ $1$'s, one $0$, and then $32$ $1$'s. Because the string ends with $32$ $1$'s every position will result in a spurious hit, and the algorithm will need to loop over $n$ $1$'s before encountering a zero, meaning you will get a $\Omega(nm)$ running time.
I tested your algorithm on an input where $n=3000,m=n^2=9\cdot 10^6$. It took $18$ seconds to run on an input that ended in $32$ 1's, but only $200ms$ for a string ending in $31$ $1$'s.
The problem is that $10$ is not relatively prime to the modulus. For instance, taking $9$ as the base makes your program perform much better, taking only $200ms$ for the case with $32$ $1$'s. Of course, taking a prime modulus will partially solve this problem since the base will automatically be relatively prime to it. However, this is not the only reason for preferring a prime modulus. | {
"domain": "cs.stackexchange",
"id": 4927,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, strings, rolling-hash",
"url": null
} |
So we have equation $x^2 + y^2 = r^2$, who’s geometrical representation would be a circle with the radius $r$. Now we also have an equation of a line represented by: $y = mx + c$ that touches the circle at point $P$. To find this point we will use the method of solving simultaneous equation where one is a quadratic and the other is linear so we will take the value of y and replace it in the first equation as follows:
$$x^2 + (3x + 2)^2 = h$$ $$x^2 + 9x^2 + 2*3x*2 + 4 = h$$ $$10x^2 + 12x + 4 = h$$ $$10x^2 + 12x + 4 - h = 0$$
so now we will have something like:
$$x^2 + (mx + c)^2 = r^2$$ $$x^2 + m^2x^2 + 2mcx + c^2 = r^2$$ $$(1 + m^2)x^2 + 2mcx + c^2 - r^2 = 0$$
since this equation is a quadratic equation in x, something like $(ax^2 + bx + c = 0)$ where we have:
$a = 10$; $b = 12$; $c = 4 - h$;
using the values in discriminant $(b^2 - 4ac)$: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575193498701,
"lm_q1q2_score": 0.8331770933853327,
"lm_q2_score": 0.8479677545357568,
"openwebmath_perplexity": 185.54816906147602,
"openwebmath_score": 0.9987107515335083,
"tags": null,
"url": "https://math.stackexchange.com/questions/1837931/find-the-value-of-h-if-x2-y2-h/1837938"
} |
Therefore $A = (A\setminus C) \cup (A\cap C) = (B\setminus C) \cup (B\cap C) = B$.
......
or
If $x \in A$ then if $x \in C$ $x \in A\cap C = B\cap C$ so $x \in B$.
If $x \not \in C$ then $x \in A \setminus C = B\setminus C$ so $x \in B$.
So $x \in A\implies x \in B$ so $A \subset B$.
Do the same to show $B \subset A$. So $A \subset B$ and $B \subset A$. So $A = B$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765592953409,
"lm_q1q2_score": 0.8424503296607648,
"lm_q2_score": 0.8596637559030338,
"openwebmath_perplexity": 185.11164271191083,
"openwebmath_score": 0.9919745922088623,
"tags": null,
"url": "https://math.stackexchange.com/questions/2144738/prove-that-if-a-c-b-c-and-a-cap-c-b-cap-c-then-a-b/2144741"
} |
mass, definition, si-units, metrology
So this is it! I think this is probably the best way to think about what this new definition of the kilogram actually represents: It's the difference in mass of a bunch of cesium atoms in one energy state versus another. | {
"domain": "physics.stackexchange",
"id": 59296,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mass, definition, si-units, metrology",
"url": null
} |
$\displaystyle V(z) \left( 1 + O_\kappa \left( \sum_{r \geq s-\beta} (\frac{1}{e} + O(1/r))^r \right)\right)$
which sums to
$\displaystyle V(z) ( 1 + O_{\kappa,\beta}( e^{-s} ) ).$
We conclude
Lemma 17 (Fundamental lemma of sieve theory) Let ${\kappa > 0}$. If ${z = D^{1/s}}$ for some ${D,s \geq 1}$, then there exist combinatorial upper and lower sieve coefficients ${(\lambda^\pm_d)_{d \in {\mathcal D}}}$ supported in ${{\mathcal D} := \{ d | P(z): d \leq D \}}$ such that
$\displaystyle \sum_{d \in {\mathcal D}} \lambda^\pm_d g(d) = V(z) ( 1 + O_{\kappa}( e^{-s} ) ) \ \ \ \ \ (25)$
for any multiplicative function ${g}$ with ${0 \leq g(p) \leq 1}$ for all primes ${p}$, obeying the bounds (22).
Informally, the fundamental lemma shows that one can get exponentially close to the Legendre sieve limit of ${V(z)}$ as long as the sieve level ${D}$ is a large power of the sifting range ${z}$. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682444653242,
"lm_q1q2_score": 0.8012947666000314,
"lm_q2_score": 0.8104789155369048,
"openwebmath_perplexity": 248.19796379327,
"openwebmath_score": 0.9931489825248718,
"tags": null,
"url": "https://terrytao.wordpress.com/2015/01/21/254a-notes-4-some-sieve-theory/"
} |
java, python, raspberry-pi, video, opencv
As far as I can tell, you're missing out on a lot of performance by ineffectively handling how data is passed between network and image-view. It'd help to see what Java2DFrameConverter does exactly.
Code style review
There's a few things that struck me as odd in your code. The following is a review without taking the performance into account directly:
streamToImageView takes a lot of arguments. You can drastically reduce their number by partially applying them outside of the method. Additionally the converter can be a static field, though I can understand if you want to have an instance for every invocation of the method.
This might also be the place for the backbuffer idea, since you can reuse Image instances when rendering. I'm not sure, but you might be able to just set the Image to the imageView once and then reuse the already set instance.
The method then looks like this: | {
"domain": "codereview.stackexchange",
"id": 29066,
"lm_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, python, raspberry-pi, video, opencv",
"url": null
} |
ros, gazebo
Title: Get information of tf/tf2 by code
Hi you guys,
I'm quite new to ROS. I'm making a fake robot in Gazebo and I'm done with creating the model.
After execute "rostopic list", I saw /tf. And "rostopic echo -n 1 /tf" returns some information about position and orientation like in this image.
How can I get that information of a specific link by code, not all link at the same time?
How can I publish the new pose of a specific link by code and display it in Gazebo?
Thanks in advance.
Originally posted by Irobo on ROS Answers with karma: 13 on 2021-08-20
Post score: 0
Original comments
Comment by Irobo on 2021-08-20:
Thanks, I'll try
Please see whether the TF2 tutorials can help you get an understanding of what's going on.
Originally posted by gvdhoorn with karma: 86574 on 2021-08-20
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 36819,
"lm_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, gazebo",
"url": null
} |
ros, gazebo, care-o-bot
effectively launching gazebo with cob_gazebo_worlds/common/worlds/empty.world.
The released electric debs for cob_gazebo_worlds under cob_simulation stack contains references to the libgazebo_ros_factory.so plugins at the time of this post. So if you have done
sudo apt-get install ros-electric-cob-*
source /opt/ros/electric/setup.bash
To setup your ros environment, then this error applies. The deprecated plugins have indeed been removed from the world files in the development trunk, the fix will probably propagate out into the debs soon. I would check the cob wiki or ping the stack maintainer to double check the release schedule. Or in the meantime, you can run from an overlay of cob_simulation stack.
Also, I've changed gazebo's behavior such that it does not throw and exit if a controller plugin library is missing. This change is released with simulator_gazebo 1.4.5.
John | {
"domain": "robotics.stackexchange",
"id": 6692,
"lm_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, gazebo, care-o-bot",
"url": null
} |
bioinformatics, pdb, 3d-structure, visualization
ATOM 344 O PHE A 43 21.201 29.462 -9.450 1.00 10.08 O
ATOM 345 CB PHE A 43 20.138 28.301 -7.137 1.00 9.30 C
ATOM 346 CG PHE A 43 19.494 27.689 -5.877 1.00 9.53 C
ATOM 347 CD1 PHE A 43 19.572 28.376 -4.679 1.00 12.01 C
ATOM 348 CD2 PHE A 43 18.837 26.465 -5.923 1.00 10.54 C
ATOM 349 CE1 PHE A 43 18.993 27.861 -3.536 1.00 9.59 C
ATOM 350 CE2 PHE A 43 18.261 25.959 -4.775 1.00 8.62 C
ATOM 351 CZ PHE A 43 18.341 26.666 -3.597 1.00 7.89 C | {
"domain": "biology.stackexchange",
"id": 5689,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bioinformatics, pdb, 3d-structure, visualization",
"url": null
} |
c#, unity3d
void Awake()
{
Player = GameObject.FindWithTag("Player");
UIManager = GameObject.FindObjectOfType<UIManager>();
}
}
Then:
public class Some_of_Game_Scripts : MonoBehaviour
{
GameController gameController;
UIManager uiManager;
void Start()
{
gameController = GameObject.FindWithTag("GameController");
uiManager = gameController.UIManager;
}
void Update()
{
uiManager.SetStatusText_Or_Something("Some text");
if (something)
gameController.ResetGame();
}
} | {
"domain": "codereview.stackexchange",
"id": 18844,
"lm_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#, unity3d",
"url": null
} |
mapping
Originally posted by RafMil on ROS Answers with karma: 3 on 2017-09-16
Post score: 0
rviz would be the easy to go built-in tool to visualize .pcd and .bag files. You can do a bunch of stuff with the .pcd in rviz. Also you can use the pcd_viewer: rosrun perception_pcl pcd_viewer <filename> . Also, you can just try pcd_viewer filename if your path is all set right you should be able to visualize it. You can set the coloring using the number keys.
You can get the pcl_viewer as well by installing the pcl_tools package. Alternatively check PCL binaries.
Originally posted by arunavanag with karma: 277 on 2017-09-17
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by RafMil on 2018-08-23:
Hi,
I have tried this solution and encountered difficulties. Error appears: [pcl::PCDReader::readHeader] No points to read. Do you have any ideas what might be wrong and how to handle this? Maybe other way of visualization. | {
"domain": "robotics.stackexchange",
"id": 28867,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mapping",
"url": null
} |
ros
Originally posted by mialora on ROS Answers with karma: 11 on 2022-06-24
Post score: 1
This warning is the result of changes in apt on newer Debian-derived distributions.
It's important to note that these deprecated functions will continue to work for the full lifetime of current distributions like Ubuntu 22.04.
In order to better secure systems that make use of third party repositories, apt now recommends installing repository keys separate from any default trusted keyring and specifying in the repository configuration which key is used to sign that repository. This helps protect systems using third party repositories by reducing the blast radius of a compromised key or misconfigured repository by allowing a system to limit the scope of that key.
The Debian wiki article on Using third party repositories expands on the new options and methods for configuring repositories. | {
"domain": "robotics.stackexchange",
"id": 37801,
"lm_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
} |
group-theory, representation-theory
Title: Definition of reducible representation A reducible representation of a group $g \rightarrow D(g)$ is one which leaves a subspace $U$ invariant, i.e. $D(g)|u\rangle \in U, \space \forall |u\rangle \in U$.A completely reducible representation is one that can be broken down into a direct sum of irreducible representations.
In Howard Georgi's book "Lie Algebras in Particle Physics", he defines irreducible representations in terms of projection operators (page 5 Equation 1.11) in terms of projection operators P that project onto the invariant subspace:
$$ PD(g)P = D(g)P$$ where, presumably
$$ P = \sum_{\alpha} |\alpha \rangle \langle\alpha|$$.
Furthermore, Georgi defines completely reducible representations to be those in which both $P$ and $1-P$ project on to an invariant(under the action of $D(g)$) subspace.
I'm struggling to see how Georgi's definitions are equivalent to the first. | {
"domain": "physics.stackexchange",
"id": 64574,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "group-theory, representation-theory",
"url": null
} |
c++, qt
/*connect slot functions*/
connect(ui->treeWidget->header(), SIGNAL(sectionDoubleClicked(int)), this,
SLOT(tableHeader_clicked(int)));
// update it the first frame so there is not a small time where it is blank
updateProcessInfoTree();
// get total memory
statex.dwLength = sizeof(statex);
GlobalMemoryStatusEx(&statex);
total_ram = statex.ullTotalPhys;
// fill samples
double current_memValue =
(((double)total_ram - (double)statex.ullAvailPhys) / gb);
// set enum
current_device = Memory;
backround = std::thread();
// set up device sample vectors
device_samples.push_back(QVector<double>(mem_sampleRate, current_memValue));
device_samples.push_back(
QVector<double>(cpu_sampleRate, GetCPULoad() * 100.0));
process_samples.push_back(QVector<double>(mem_sampleRate, 0));
process_samples.push_back(
QVector<double>(cpu_sampleRate, GetCPULoad() * 100.0));
// set up vars
// set up timer
m_timer = new QTimer(this); | {
"domain": "codereview.stackexchange",
"id": 38036,
"lm_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++, qt",
"url": null
} |
angular-momentum, gyroscopes
Title: How? Calculate torque from twisting a gyroscope Please be patient, I'm not a physics guy.
I'm building a robot that flips itself over using a gyroscope.
The gyroscope spins horizontaly at first, then a servo changes the gyro's rotating axis, making the robot flip in the opposite direction.
How can I calculate the torque of the flip, given:
gyro's rotational speed (rpm or equivalent)
gyro's diameter
gyro's mass
speed at which rotating axis is changed | {
"domain": "physics.stackexchange",
"id": 65996,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "angular-momentum, gyroscopes",
"url": null
} |
Thanks.
-
I recently asked the same question on MathOverflow. For reasons I do not agree with mildly,it was closed as "not a real question", though "not a research-level question" would have been a better excuse. My question is on the motivation for the necessity of cofiniteness in direct sums. I just do not see what motivated the definition. – Unknown Jan 25 '11 at 18:54
I would have voted up every answer had I a rep point of at least 15! – Unknown Jan 25 '11 at 19:53
You should still be able to accept one (if you are satisfied with one of them); that will also give you some rep. – Arturo Magidin Jan 25 '11 at 20:32
@ Arturo thanks. Being a somewhat frequent reader of MO, I know most of the privileges. It has become a kind of culture ,however, that OP's wait a little longer even if they have received a complete answer. No wonder that I will accept yours! – Unknown Jan 25 '11 at 22:40 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9648551566309688,
"lm_q1q2_score": 0.8040375289403139,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 209.1893995405257,
"openwebmath_score": 0.944042444229126,
"tags": null,
"url": "http://math.stackexchange.com/questions/18932/why-is-cofiniteness-included-in-the-definition-of-direct-sum-of-submodules/18935"
} |
dna
So now you have your edited cells back inside you - how long will it take to become immune to HNV-1? Well, the honest answer is that, in the absence of ablative chemotherapy (see the bone marrow transplant link above for more info) prior to reinjection of the edited stem cells, you may never become completely immune. Here's why: Unless all of the bone marrow stem cells in your body are destroyed before reinjecting the edited ones, you will still have fairly high numbers of what are called "wild-type" or un-edited stem cells and mature T cells in your body, and those stem cells will continue making new wild-type T cells. Additionally, there are already wild-type T cells in circulation and in secondary lymphoid organs such as lymph nodes and the spleen, and some of these cells can be very long-lived (months to years). If for some reason you decide to undergo complete ablative chemotherapy to essentially destroy your immune system, the reinjected stem cells will eventually repopulate | {
"domain": "biology.stackexchange",
"id": 5738,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dna",
"url": null
} |
python, pygame, snake-game
Title: Python snake game with pygame I am a new programmer and I sill don't know how to write a clean code.
please suggest me ways to improve my skill and how to write a proper code.
import pygame
import time
import random
pygame.init()
# defines the width and height of the display
display_width = 800
display_height = 600
white = (255, 255, 255)
d_white = (250, 250, 250)
black = (0, 0, 0)
teal = (0, 128, 128)
blue_black = (50, 50, 50)
game_display = pygame.display.set_mode((display_width, display_height))
factor = 10
food_x = random.randrange(5, display_width - 5)
food_y = random.randrange(5, display_height - 5)
print(food_x, food_y)
score = 60
clock = pygame.time.Clock()
class snake_body:
x = 0
y = 0
def __init__(self, x_position, y_position):
self.x = x_position
self.y = y_position | {
"domain": "codereview.stackexchange",
"id": 25357,
"lm_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, pygame, snake-game",
"url": null
} |
• First, realize that cos² x is the same thing as (cos x)².
So, its derivative is:
2(cos x) ∙ d/dx (cos x)
We get this by applying the power rule and then the chain rule.
Now we apply d/dx (cos x) which is - sin x.
Thus, the derivative is:
2(cos x) (- sin x)
= - 2 (cos x)(sin x)
You can leave it that way or you use this identity:
sin (2x) = 2 sin(x) cos(x)
To simplify the derivative to: - sin(2x)
Thus d/dx (cos² x) = - sin(2x) = - 2(cos x)(sin x)
• I'm still confused, for example what would dy/dx of y= (x2+1)^3(3x-5)^6 | {
"domain": "khanacademy.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429151632047,
"lm_q1q2_score": 0.8030389878470503,
"lm_q2_score": 0.815232489352,
"openwebmath_perplexity": 1052.2491027281733,
"openwebmath_score": 0.8002798557281494,
"tags": null,
"url": "https://www.khanacademy.org/math/old-ap-calculus-ab/ab-derivative-rules/ab-product-rule/v/applying-the-product-rule-for-derivatives"
} |
weather, tsunami
Title: Why does every tsunami travel differently? Tsunamis are quite interesting, as they only happen after a large displacement of water.
Usually, the waves travel quite weirdly. Sometimes there are waves which bounce off of land and go back to sea. Sometimes they go straight to land and don't bother any other pieces of land around them.
So why does this happen?
Why do some tsunamis go straight to land while others are spread out?
And why others take various pathways toward land or the open sea? The answer to some parts of your question lie mainly in basic physics, there are a number of factors that will affect how a Tsunami will travel after the initial water displacement.
For example, is the initial displacement a point event (such as Tsunami caused by landslides), or an event occurring along a long line, such as the massive fault movement that caused the "Boxing Day" Tsunami of 2004. | {
"domain": "earthscience.stackexchange",
"id": 23,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "weather, tsunami",
"url": null
} |
gazebo-plugin
Comment by AndreiHaidu on 2015-12-04:
well it does sound like some bug, which gazebo version are you using?
Comment by mz on 2015-12-04:
Gazebo 2.2.6, because I'm using ROS Indigo. Do you mean bug in my code or in Gazebo? Hoping for bug in my code because I need this to work as soon as possible... Otherwise I can try a different Gazebo version that likes ROS Indigo... not sure what else is compatible. I see that it's possible to use 4 5 or 6 if installed from source.
Comment by AndreiHaidu on 2015-12-05:
I would say bug in gazebo, since you are calling a ros service to attach detach joints, there is nothing else you can do, and especially that it crashes only after some time. I would suggest trying out the new gazebo versions, last time I managed to get gazebo 5 running with ROS.
Comment by mz on 2015-12-06: | {
"domain": "robotics.stackexchange",
"id": 3835,
"lm_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-plugin",
"url": null
} |
A) f-140
B) 5f
C) 7f
D) f/5
E) f/7
The OE starts with "In this solution it is assumed that 1 billion = 109. However,
only minor modifications in the first three steps are needed (replace each appearance
of 10^9 with 10^12)".
What do they mean by that and why is that important for the question at all.
It confused me. Btw. I feel the "109" ought to be "10^9" but they misspelled it.
Millions has six zeros and billions has nine. And both numbers are given in "billions" so we
can ignore that completely anyway.
I will post OA separately but would be good to know why they wrote this. Supposedly,
everything has a reason.
(Small point: Source is not OG but Official GMATPrep Software)
Check other Conversion problems to practice in Special Questions Directory.
_________________
Director
Joined: 23 Jan 2013
Posts: 560
Schools: Cambridge'16
Re: If 175 billion french francs is equivalent to 35 billion [#permalink]
### Show Tags
25 Sep 2015, 21:47
Just logic: | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9489172572644807,
"lm_q1q2_score": 0.8326528558490729,
"lm_q2_score": 0.8774767762675405,
"openwebmath_perplexity": 7459.285583191669,
"openwebmath_score": 0.391166090965271,
"tags": null,
"url": "https://gmatclub.com/forum/if-175-billion-french-francs-is-equivalent-to-35-billion-166318.html"
} |
c++, performance, audio, signal-processing
// skip disabled envelopes (in the case of test, all are running)
if (!envelope.mIsEnabled) { continue; }
// envelope voice's local copy
double blockStep = envelopeVoiceData.mBlockStep;
double blockStartAmp = envelopeVoiceData.mBlockStartAmp;
double blockDeltaAmp = envelopeVoiceData.mBlockDeltaAmp;
double values[PLUG_MAX_PROCESS_BLOCK];
// envelope local copy
bool isBipolar = envelope.mIsBipolar;
double amount = envelope.mAmount;
double rate = envelope.mRate;
// precalc values
double bp0 = ((1 + isBipolar) * 0.5) * amount;
double bp1 = ((1 - isBipolar) * 0.5) * amount; | {
"domain": "codereview.stackexchange",
"id": 32269,
"lm_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, audio, signal-processing",
"url": null
} |
genetics, human-genetics, experimental-design, epidemiology, gwas
Consider the following scenario: Suppose I have 5000 phenotyped individuals with a budget to genome-wide genotype them all. The phenotyping requires state-of-the art methodology with immense costs, and the cohort was phenotyped through another grant. What would be the point of dividing my cohort to two as a discovery and replication groups, other than to save money in exchange for stat power. To this, add the subsequent functional studies on the associated loci, what would the point in genotyping a few SNPs in 500 more people be? If one can indeed find that additional cohort, wouldn't it be a better option to combine any available cohorts in a meta-analysis, rather than using them for replication? As an elaboration of my comment.
Summary: Replication is required in GWAS studies to account for non-random technical biases. | {
"domain": "biology.stackexchange",
"id": 3809,
"lm_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, human-genetics, experimental-design, epidemiology, gwas",
"url": null
} |
c#, beginner, form, event-handling
The code so far:
private void buttonDelete_Click(object sender, EventArgs e)
{
textBox1.Focus(); // set the textbox focused.
if (textBox1.SelectionStart >= 0) //check if there is text to delete
{
int TxTindex = textBox1.SelectionStart; // save the index position
if (textBox1.SelectedText.Length > 0) //// check if there is selected text
{
textBox1.SelectedText = "";
}
else if (TxTindex > 0) // check if there is text in texbox
{
textBox1.Text = textBox1.Text.Remove(TxTindex - 1, 1);
textBox1.SelectionStart = TxTindex - 1; // to set the cursor position after the deleted number between the text.
}
}
} | {
"domain": "codereview.stackexchange",
"id": 16878,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, form, event-handling",
"url": null
} |
vba, excel
Dim wb As Workbook: Set wb = ThisWorkbook ' workbook containing this code
Dim sws As Worksheet: Set sws = wb.Sheets(SRC_NAME)
' The `Find` or the `End` method would fail if the worksheet were filtered.
If sws.FilterMode Then sws.ShowAllData
Dim sfCell As Range: Set sfCell = sws.Range(SRC_FIRST_LOOKUP_CELL)
Dim slrg As Range: Set slrg = RefColumn(sfCell)
If slrg Is Nothing Then Exit Sub ' no data in column range
Dim slData(): slData = GetSingleColumnRange(slrg)
Dim srrg As Range: Set srrg = slrg.EntireRow.Columns(SRC_RETURN_COL)
Dim srData(): srData = GetSingleColumnRange(srrg)
Dim dict As Object: Set dict = DictTwoSingleColumns(slData, srData)
If dict Is Nothing Then Exit Sub ' only error values and blanks
Erase slData
Erase srData
Dim dws As Worksheet: Set dws = wb.Sheets(DST_NAME)
' The `Find` or the `End` method would fail if the worksheet were filtered. | {
"domain": "codereview.stackexchange",
"id": 44336,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel",
"url": null
} |
ros, ros-kinetic
nsecs: 971281007
frame_id: "/camera_link"
child_frame_id: "/camera_depth_frame"
transform:
translation:
x: 0.0
y: -0.02
z: 0.0
rotation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
......
.... | {
"domain": "robotics.stackexchange",
"id": 34222,
"lm_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",
"url": null
} |
c#, api, interface, com, rubberduck
/// <summary>
/// Gets a short message that describes how a code issue can be fixed.
/// </summary>
string QuickFixMessage { get; }
/// <summary>
/// Gets a value indicating the type of the code inspection.
/// </summary>
CodeInspectionType InspectionType { get; }
/// <summary>
/// Gets a value indicating the severity level of the code inspection.
/// </summary>
CodeInspectionSeverity Severity { get; }
/// <summary>
/// Gets/sets a valud indicating whether the inspection is enabled or not.
/// </summary>
bool IsEnabled { get; set; } | {
"domain": "codereview.stackexchange",
"id": 10844,
"lm_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#, api, interface, com, rubberduck",
"url": null
} |
javascript, performance, animation, raphael.js
tandwiel5.stop().animate( { "transform": "R" + direction*angle }, 1000, "<>" );
}, 150 );
}
Next I would swap out the unreliable setInterval for a recursive setTimeout. But that is not necessary for this experiment. I use setInterval plenty when whipping up little tests such as this, it's a bit easier to set up.
Additionally, have you tried using a Raphael set to perform your animation with only one animate directive? It might speed it up a bit.
UPDATE:
Upon reconsideration, I realize why it would work. Even though you are overwriting the paper variable, the object has already been added to the DOM. This is not undone when the variable is modified/removed within JavaScript. Ether way, you would want to encapsulate all of your elements on one paper if they are related/displayed-near-each-other
UPDATE:
A further consideration. What I like to do is first create the Raphael objects so that I can access them by themselves
var myObjects = { | {
"domain": "codereview.stackexchange",
"id": 7857,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, performance, animation, raphael.js",
"url": null
} |
cc.complexity-theory, computability, pl.programming-languages
My question: are there programming languages that capture subsets of computable functions (such as all efficiently computable function) in a non-trivial way? If there are not, is there a reason for this? One language attempting to express only polynomial time computations is the soft lambda calculus. It's type system is rooted in linear logic. A recent thesis addresses polynomial time calculi, and provides a good summary of recent developments based on this approach. Martin Hofmann has been working on the topic for quite some time. An older list of relevant papers can be found here; Many of his papers's continue in this direction.
Other work takes the approach of verifying that the program uses a certain amount of resources, using Dependent Types or Typed Assembly Language.
Yet other approaches are based on resource bounded formal calculi, such as variants of the ambient calculus. | {
"domain": "cstheory.stackexchange",
"id": 1808,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, computability, pl.programming-languages",
"url": null
} |
-
For computing $E[X^2]$, the probability is still taken over $X$ and not $X^2$. Otherwise, if you make $Y=X^2$ the random variable and then compute $E[Y]$, the only operation that you effectively did is to relabel the random variables (well, although only considering positive values): all the values taken by $|X|$ will also be taken by $Y$, so for positive values of $X$, computing $E[X^2]$ would be exactly like computing $E[X]$. But computing $E[X^2]$ gives you more information! | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109538667758,
"lm_q1q2_score": 0.8882213565726966,
"lm_q2_score": 0.9019206712569267,
"openwebmath_perplexity": 282.1667617092513,
"openwebmath_score": 0.9639572501182556,
"tags": null,
"url": "http://math.stackexchange.com/questions/306425/expected-value-function"
} |
We can substitute the values. The double angle formulae mc-TY-doubleangle-2009-1 This unit looks at trigonometric formulae known as the doubleangleformulae. which is exactly. 2 sum and difference and double angle Identities 2 Example 3:Determine the exact value of. org Math Tables: Hyperbolic Trigonometric Identities Hyperbolic Definitions sinh(x Inverse Hyperbolic Defintions. There’s also a beautiful way to get them from Euler’s formula. Would this constitute a proof? Or just a demonstration? There is a big difference. Sums as products. For instance, cos2 = cos( + ) cos cos sin sin = cos 2 sin Replacing cos2 by 1 sin2 (Pythagorean identity 1), we can see that cos2 = 1 2sin2. Starting with one form of the cosine double angle identity: $$\cos (2\alpha )=2\cos ^{2} (\alpha )-1$$ Isolate the cosine squared term. Derivation of the Half Angle Formulas Half angle formulas can be derived from the double angle formulas , particularly, the cosine of double angle. From the exercise above, we see | {
"domain": "kubalok-kieyne.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474913588877,
"lm_q1q2_score": 0.8111594215988918,
"lm_q2_score": 0.8198933425148214,
"openwebmath_perplexity": 656.2197191137849,
"openwebmath_score": 0.9018056988716125,
"tags": null,
"url": "http://ghoc.kubalok-kieyne.de/double-angle-identities-proof.html"
} |
In this problem, we need to decide between θ = -.466 and 2.67, which, as you can check with a calculator, have the same tangent. So is the choice arbitrary? It would be if we didn't have more information, but in this problem we do. θ = 2.67 is correct because we can plug it back into the original two equations involving sine and cosine and get a true statement. But plugging in θ = -.466 doesn't work, as you can check.
Sorry I didn't notice this before. It's actually a common problem when solving for angles; arcsine and arccosine do this too. In general, evaluating an inverse trig function will give you a couple of possibilities, and you need to pick the right one using additional information from the problem. Unfortunately, calculators will blithely give you a single number like nothing is wrong, so you need to be alert. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104962847373,
"lm_q1q2_score": 0.8214210693677025,
"lm_q2_score": 0.8499711794579723,
"openwebmath_perplexity": 699.8096756578516,
"openwebmath_score": 0.8192601203918457,
"tags": null,
"url": "https://www.physicsforums.com/threads/calculating-functions-for-wave-problems.567046/"
} |
special-relativity, conventions, speed, one-way-speed-of-light
Wouldn't they feel these forces and notice that things appear to be moving by them at changing speeds?
Yes, they feel the centripetal force, though it won't feel any different than centripetal force feels in any other coordinates. And yes, in those Anderson coordinates things move by at changing speeds, even though radar measurements will not detect it (radar measurements being "distorted" by the anisotropic speed of light).
In fact, in Anderson coordinates the four-acceleration from the centripetal force is: $$A^\mu = \left(\frac{\kappa r \omega ^2 \cos (\lambda \omega )}{\sqrt{1-r^2 \omega ^2}},-\frac{r \omega ^2 \cos
(\lambda \omega )}{\sqrt{1-r^2 \omega ^2}},-\frac{r \omega ^2 \sin (\lambda \omega )}{\sqrt{1-r^2
\omega ^2}},0\right) $$ where the non-zero time component of the centripetal force indicates precisely that the force causes the speed to change in these coordinates.
If so, how can we make sense of this physically in light of the issues I've raised? | {
"domain": "physics.stackexchange",
"id": 86298,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, conventions, speed, one-way-speed-of-light",
"url": null
} |
This strategy is well known, and very general.
If you search for "matrices with given row and column sums" or "transportation polytopes" you'll find lots of literature - probably more than you need.
• The grid is actually $4 \times 5$ so there are only $20$ unknowns, but the idea is correct. You could note that add one to the top left and bottom right and subtracting one from the top right and bottom left leaves all the row and column sums the same. There are many other patterns like this, which shows there is not a unique solution. – Ross Millikan Oct 15 '16 at 14:15
• @RossMillikan Edited thanks. – Ethan Bolker Oct 15 '16 at 14:26
The problem is that your problem has twelve degrees of freedom. That is to say, you can set the twelve numbers in the $3 \times 4$ array in the upper left corner equal to anything and then fill in the remaining eight positions with numbers that will give you a solution with the row and column sums indicated. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241991754918,
"lm_q1q2_score": 0.835109829746726,
"lm_q2_score": 0.8615382040983515,
"openwebmath_perplexity": 209.0588964123639,
"openwebmath_score": 0.7725829482078552,
"tags": null,
"url": "https://math.stackexchange.com/questions/1969542/find-a-matrix-with-given-row-and-column-sums"
} |
fluid-dynamics, turbulence
The meaning of the Reynolds number is that the equations of viscous fluid flow allow similarity: if the geometry is matched (up to a scaling factor) between two setups, and the Reynolds numbers are matched, then the equations describing fluid motion are the same in normalized variables, which means that the character of motion (laminar or turbulent) should be matched as well. This follows from an algebraic transformation of the equations, and there is nothing there that would predict that motion has to become turbulent for $Re$ above a particular value, e.g., $Re$ = 1. On the other hand, the physical interpretation of $Re$ as the ratio of inertia to dissipation implies that increasing $Re$ should eventually lead to a transition to turbulence. However the numerical value of critical $Re$ depends on the geometry. In some standard cases, e.g., flow in round pipes, it is known that transition to turbulence happens at $Re$~1000; but this does not say that in a different setup a value as | {
"domain": "physics.stackexchange",
"id": 37943,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, turbulence",
"url": null
} |
catkin
Title: Issues with catkin_ws/src
I don't know what is wrong, but everytime I follow a tutorial and have to use the catkin workspace src folder or similar then I get an issue.
I'm in doubt can this issue be solved? what can I do to fix it? Or do I have to reinstall ROS?
Just an example but this is everytime I try with anything:
kevin@kevin-Lenovo:~$ cd dev/catkin_ws/src/
bash: cd: dev/catkin_ws/src/: No such file or directory
is the issue the location?
/home/kevin/ros/catkin_ws
I use ROS Indigo and Ubuntu 14.04 trusty
I'll be so grateful if someone can help me solve this. I would love to learn ROS. Thanks have a great day to all.
btw I'm trying to run ROS with arduino through ros-serial:
$ sudo apt-get install ros-indigo-rosserial-arduino
$ sudo apt-get install ros-indigo-rosserial
$ cd dev/catkin_ws/src/
$ git clone https://github.com/ros-drivers/rosserial.git
$ cd dev/catkin_ws/
$ catkin_make
$ catkin_make install
$ source install/setup.bash | {
"domain": "robotics.stackexchange",
"id": 27368,
"lm_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",
"url": null
} |
height is zero, to the full area of the circle when the height is equal to the diameter. Since the formula for the area of a circle squares the radius, the area of the larger circle is always 4 (or 2 2) times the smaller circle.Think about it: You are doubling a number (which means ×2) and then squaring this (ie squaring 2) -- which leads to a new area that is four times the smaller one. Area = 3.1416 x r 2. Area of a parallelogram given sides and angle. Calculate A, C and d | Given r Given the radius of a circle calculate the area… Surface = 2 radius X height S = 2 rh + 2 r2 Pyramid Volume = 1/3 area of the base X height V = bh b is the area of the base Surface Area: Add the area of the base to the sum of the areas of all of the triangular faces. Whereas volume is the amount of space available in an object.. For a circle, sphere and cylinder calculator click here. Area of a cyclic quadrilateral. In geometry, there are different shapes and sizes such as sphere, cube, cuboid, cone, | {
"domain": "dobrewiadomosci.eu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9637799420543366,
"lm_q1q2_score": 0.819185175917234,
"lm_q2_score": 0.849971181358171,
"openwebmath_perplexity": 1030.059238010132,
"openwebmath_score": 0.9377850890159607,
"tags": null,
"url": "https://dobrewiadomosci.eu/moth-s-sfmnnpb/61cdab-surface-area-of-a-circle-formula"
} |
homework-and-exercises, astronomy, units, angular-velocity, parallax
It doesn't matter what three stars or points in space are at the vertices of the triangle. If you can draw a triangle with an angle 1arcsecond, you can use this rule to know the missing length. That's why some diagrams look different.
One such situation is when you are looking out from earth, know that the angle the star appeared to traverse in the sky is 1 arcsecond, and know the distance to the star. | {
"domain": "physics.stackexchange",
"id": 76971,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, astronomy, units, angular-velocity, parallax",
"url": null
} |
javascript, node.js, console, git, modules
/**
* @param {string} provider
* @param {string} user
* @param {string} repo
* @param {string} part
*/
module.exports.getRelease = async ({provider, user, repo, part = ""}) => {
if (normalize(provider) === normalize("github")) {
let json = (await (await fetch(`https://api.github.com/repos/${user}/${repo}/releases/latest`)).json())
if (json.message === "Not Found") throw "Invalid repository"
if (!("assets" in json)) throw "Rate limit exceeded"
let browser_download_urls = json.assets.map(asset => asset.browser_download_url)
return browser_download_urls.filter(url => url.includes(part))
} else if (normalize(provider) === normalize("bitbucket")) {
let json = (await (await fetch(`https://api.bitbucket.org/2.0/repositories/${user}/${repo}/downloads/`)).json())
if (json.type === "error") throw "Invalid repository"
let links = json.values.map(value => value.links.self.href) | {
"domain": "codereview.stackexchange",
"id": 38907,
"lm_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, node.js, console, git, modules",
"url": null
} |
complexity-theory, shors-algorithm, bqp
In fact, there is a quantum hierarchy which addresses the complexity of factoring, and which is (very) loosely analogous to the classical polynomial hierarchy. Namely, the Fourier hierarchy. Factoring is in the second level of the Fourier hierarchy using the Shor-Kitaev algorithm. As the Complexity Zoo says, it is an open problem to find an oracle that makes FH infinite. (As far as I know, it is still open.) Nonetheless, I would be very surprised if FH collapses. | {
"domain": "quantumcomputing.stackexchange",
"id": 5583,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, shors-algorithm, bqp",
"url": null
} |
python, python-3.x, iterator
Unfortunately, this approach is slower than before.
However, the loss in performance is justifiable in the face of the gained value.
You can now support any iterable anyone can throw at you, and shift the responsibility of handling the actual iteration to them.
Otherwise, you would have to add every conceivable iterable to iterables=(..).
You already noticed that this is not feasible.
from collections.abc import Iterable, Mapping | {
"domain": "codereview.stackexchange",
"id": 38317,
"lm_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, iterator",
"url": null
} |
machine-learning, randomness, generator, neural-networks, deep-neural-networks
This is going to be much harder than you assumed. Random number generators are always more complex than a single function, and require at least a little bit of architecture. The simplest architecture would be to add a state value to use as the next input to the generator, and which is somehow affected by the previous output. A simple feed-forward neural network does not have any architecture like this, you need to add it.
My first suggestion would be to learn how some simple software pseudo-random number generators (PRNGs) work. A good place to start might be linear congruential generators which are considered very poor quality PRNGs nowadays, but are the sort found in early computer systems. | {
"domain": "ai.stackexchange",
"id": 1962,
"lm_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, randomness, generator, neural-networks, deep-neural-networks",
"url": null
} |
[A simple way to derive the function in the accepted answer.] It looks like you’re defining “exactly in between” as being halfway between the two graphs along a a horizontal line. That is, the $$x$$-coordinate of the in-between point is the average of the values of $$x$$ that produce the same value of $$y$$ for the two functions. Inverting the two functions, we then have for this midpoint $$x = \frac12(y+\sqrt y).$$ Solving for $$x$$ and taking the positive branch gives $$y = \frac12(1+4x+\sqrt{1+8x}).$$
• Thank you, this makes perfect sense to me Jun 30 '19 at 3:21
The green dots in your plot have the coordinates
a = {{0, 0}, {1, 1}, {3, 4}, {6, 9}, {10, 16}, {15, 25}, {21, 36}, {28, 49}, {36, 64}, {45, 81}}
which can be calculated with the formula
f[x_] = (1 + 4 x - Sqrt[1 + 8 x])/2
Test:
f[10]
(* 16 *)
f[45]
(* 81 *)
How to find this formula: in Mathematica, | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812309063187,
"lm_q1q2_score": 0.8529473661262001,
"lm_q2_score": 0.880797085800514,
"openwebmath_perplexity": 377.268856564119,
"openwebmath_score": 0.44230639934539795,
"tags": null,
"url": "https://math.stackexchange.com/questions/3277811/how-do-i-find-the-function-that-is-perfectly-between-y-x2-and-y-x/3277813"
} |
python, programming-challenge
Any comments are welcome.
Naming: main is reserved so that's ok, but main2 makes no sense. The name should be a hint about what the function does, I'd go for guess_card.
Since there's no mention of a file input, I'd say go for standard input. You can always read a file and redirect the input if that's needed. The same goes for standard output.
You're using both input and raw_input, why is that? If you want to do input validation, you should do it properly, trying to parse it and eventually catching exceptions. But if you go down that road, then you should also not assume that the rest of the input is correct. I'd say that for this specific program, you can safely say that the syntax of the input will be fine.
Comments used like this are pretty much useless, they should tell why things are happening the way they are, not re-describe the code | {
"domain": "codereview.stackexchange",
"id": 24127,
"lm_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, programming-challenge",
"url": null
} |
# In constrained optimization problems, when is 'naive' substitution possible?
To motivate the question, consider the following constrained optimization problem: $$(P1)\quad \underset{(x,y)}{\min} f(x,y)=x^2 +y^2 \ s.t.\ (x-1)^3 = y^2$$
By replacing the constraint $y^2 = (x-1)^3$ in $f(x,y)=x^2 +y^2$, one gets the following unconstrained optimization problem: $$(P2)\quad \underset{x}{\min} g(x)=x^2 + (x-1)^3 \$$
These problems are not equivalent: although $(P2)$ is unbounded and doesn't have a minimum, $(P1)$ has a minimum in the point $(x,y)=(1,0)$.
Is there any necessary/sufficient conditions to assure that the unconstrained problem stemmed by replacing the constraint in the objective function is equivalent to the original constrained problem?
-
Consider the following third problem: $$\text{(P2a)} \quad \min_x ~~ g(x) = x^2 + (x-1)^3 ~~ \text{s.t.} ~~ (x-1)^3=y^2$$ I think you will agree that (P2a) is equivalent to (P1). | {
"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.8351613305450718,
"lm_q2_score": 0.8577681104440172,
"openwebmath_perplexity": 306.6155070590819,
"openwebmath_score": 0.8755339980125427,
"tags": null,
"url": "http://math.stackexchange.com/questions/836579/in-constrained-optimization-problems-when-is-naive-substitution-possible"
} |
physical-chemistry, thermodynamics, equilibrium, water
This is analogous to the situation where a change in the number of moles between reactants and products leads to a Le Chatelier response to a pressure change. Consider the following reaction:
$$
\ce{N2 + 3H2 <=> 2 NH3}
$$
Here, increasing the pressure will also drive the equilibrium to the right. In this case, the main 'option' the system has for responding to the increase in pressure is to react four moles of reactants to form two moles of products. As above, the Le Chatelier response is in the direction that works to mitigate the applied pressure increase. | {
"domain": "chemistry.stackexchange",
"id": 9901,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, thermodynamics, equilibrium, water",
"url": null
} |
optics, telescopes
Are there any earth-based observatories utlizing AO in the visible range? What are the technical issues to achieve acceptable AO Strehl ratios in the visible range? They are rare because the size of the patch of atmosphere that can be corrected by a given guide star is so much smaller at shorter wavelengths and changes faster - so you are either limited to where you can observe (near a bright guide star), or you need complex and expensive laser guide star systems.
If you are purely imaging (rather than trying to use AO to feed a spectrograph) there is a common alternative. You image the object continually but only use those images where the atmosphere happened to be still enough to briefly give a good image. You can do this either by reading out the CCD in short exposures or using a separate shutter.
You can combine this with a simpler AO system to make a "good" atmosphere into an "very good" one - eg the Magellan telescope has a visible AO system | {
"domain": "physics.stackexchange",
"id": 3609,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, telescopes",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.