text
stringlengths
1
1.11k
source
dict
vacuum, air Title: Can a vacuum cleaner be used to purify the air in a small room? A hepa vacuum cleaner will pick up fine dust from the floor, filter it and send the clean air out through the exhaust. However with movement in the room fine dust will also be goinng up in the air and so the vacuum will not take it in and this fine dust will settle hours later. As far as i can see, a vacuum cleaner is very similar to an air scrubber, takes air in, filters it and sends it out. 1) is it not possible to close windows and leave the vacuum on in the middle of the room and expect it to filter fine dust in the air/room? 2) what if i maneuvered around and tried to vacuum the air aswell as the floor for several hours, would this do the job? 3)is a air scrubber/filter necessary?
{ "domain": "physics.stackexchange", "id": 13624, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vacuum, air", "url": null }
rotational-dynamics, reference-frames, angular-velocity You might thing that perhaps a system of many particles will get around this, since we'll get more information about which of the many $\vec{\omega}$'s is the "right" one. But consider the following system of two particles: Particle $m_1$ is at $\vec{r}_1 = \hat{x}$ and is moving with $\vec{v}_1 = \hat{y}$. Particle $m_2$ is at $\vec{r}_2 = \hat{y}$ and is moving with $\vec{v}_2 = \hat{x}$. It's not too hard to see that the possible angular velocities for each one are $$ \vec{\omega}_1 = \hat{z} + \alpha \hat{x}, \qquad \vec{\omega}_2 = -\hat{z} + \beta \hat{y}. $$ There are no possible values of $\vec{\omega}$ that these two particles share in common, and therefore there is no straightforward way to define an angular velocity for this system.
{ "domain": "physics.stackexchange", "id": 39504, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rotational-dynamics, reference-frames, angular-velocity", "url": null }
The positions that can ocuppy the husbands are: $135, 136, 146, 246$ • Grammar suggestion: "The positions the husbands can occupy are..." It is the husbands who are doing the occupying, not the positions. Alternatively "The positions that can be occupied by the husbands are..." – JMoravitz Aug 17 '17 at 18:04 With some work, show that there are four possible arrangements: WHWHWH (and it's reflection) HWHWWH (and it's reflection). Can you finish the problem from here?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969689263265, "lm_q1q2_score": 0.8064446022117833, "lm_q2_score": 0.8198933381139645, "openwebmath_perplexity": 314.5142027856869, "openwebmath_score": 0.6798714995384216, "tags": null, "url": "https://math.stackexchange.com/questions/2397129/find-the-ways-in-which-no-husband-can-sit-next-to-another-husband" }
quantum-field-theory, terminology, vacuum, virtual-particles "driven" or "caused" by quantum fluctuation (and I think people do say that), then what exactly are they saying? Spontaneous emission by atoms manifests the coupling between the atom and the electromagnetic field in its vacuum state, and demonstrates that the field is not absent nor without physical effect. Since there is a stochastic nature to the clicks if the emitted photons are detected by ordinary detectors, one might loosely ascribe the randomness in the timing of the detection events to a randomness in the behaviour of the field in its vacuum state. Is this perhaps what "quantum fluctuation" means?
{ "domain": "physics.stackexchange", "id": 53373, "lm_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, terminology, vacuum, virtual-particles", "url": null }
electromagnetism, magnetic-fields, electric-fields, electromagnetic-induction Title: Can you demonstrate Faraday's Law using self induction I have learnt about an experiment to demonstrate Faraday's law using the setup below. In the experiment a solenoid is connected across a signal generator, whose frequency can be altered, and a search coil is placed at the centre of the solenoid (perpendicular to the B-field). As the AC flows through the solenoid, a changing magnetic field is created through the solenoid creating an ever changing flux-linkage through the search coil ∴ inducing an ever changing emf across the search coil. You can then show the relationship between emf and flux linkage by changing the frequency of the supply or adjusting the resistance of the variable resistor.
{ "domain": "physics.stackexchange", "id": 47804, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, magnetic-fields, electric-fields, electromagnetic-induction", "url": null }
slam, navigation, odometry, robot-pose-ekf, robot-localization Title: rtabmap odometry source I have been experimenting with rtabmap_ros lately, and really like the results I am getting. Awesome work Mathieu et al.! First, let me describe my current setup: Setup ROS Indigo/Ubuntu 14.01 rtabmap from apt-binary (ros-indigo-rtab 0.8.0-0) Custom robot with two tracks (i.e. non-holonomic) Custom base-controller node which provides odometry from wheel encoders (tf as /odom-->/base_frame as well as nav_msgs/Odometry messages) Kinect2 providing registered rgb+depth images XSens-IMU providing sensor_msgs/Imu messages (not used at the moment) Hokuyo laser scanner providing sensor_msgs/LaserScan messages
{ "domain": "robotics.stackexchange", "id": 20733, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, odometry, robot-pose-ekf, robot-localization", "url": null }
neural-networks, activation-functions, weights-initialization Title: If we had to choose between Uniform(0,1) and Uniform(-1,0), which one would you expect to work best and why? I'm working with a fully connected neural network with input 32x32x3. The architecture includes a dense layer 32 + ReLu activation, then another dense layer 64 + ReLu Activation, followed by a dense layer 32 + ReLu Activation, and finally, a dense layer of 10 neurons with softmax activation I have a homework question: If we had to choose between Uniform(0,1) and Uniform(-1,0), which one would you expect to work best and why?
{ "domain": "ai.stackexchange", "id": 4071, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, activation-functions, weights-initialization", "url": null }
javascript, object-oriented, interview-questions const generateId = () => Math.floor(Math.random() * 1e12) function createLinkedList() { let front, back return Object.freeze({ get front() { return front }, get back() { return back }, pushBack(value) { const node = { last: back, next: undefined, value } if (back) back.next = node back = node if (!front) front = node return node }, removeNode(node) { if (node.last) node.last.next = node.next if (node.next) node.next.last = node.last if (front === node) front = node.next if (back === node) back = node.last }, *values() { let node = front while (node) { yield node.value node = node.next } }, }) } const createTicket = ({ name, description = '', severity }) => Object.freeze({ id: generateId(), timestamp: Date.now(), name, description, severity, })
{ "domain": "codereview.stackexchange", "id": 40460, "lm_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, interview-questions", "url": null }
Now, recall the opening example of this section: we began with the function $$y=f(x)=4x-x^2$$ and used the limit definition of the derivative to show that $$f'(a)=4-2a$$, or equivalently that $$f'(x)=4-2x$$. We subsequently graphed the functions $$f$$ and $$f'$$ as shown in Figure 1.18. Following Activity 1.10, we now understand that we could have constructed a fairly accurate graph of $$f'(x)$$ without knowing a formula for either $$f$$ or $$f'$$. At the same time, it is ideal to know a formula for the derivative function whenever it is possible to find one. In the next activity, we further explore the more algebraic approach to finding $$f'(x)$$: given a formula for $$y=f(x)$$, the limit definition of the derivative will be used to develop a formula for $$f'(x)$$. Activity $$\PageIndex{2}$$
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9916842198021454, "lm_q1q2_score": 0.8327509245724046, "lm_q2_score": 0.8397339676722393, "openwebmath_perplexity": 149.8058501464266, "openwebmath_score": 0.9683369994163513, "tags": null, "url": "https://math.libretexts.org/Bookshelves/Calculus/Map%3A_Calculus_-_Early_Transcendentals_(Stewart)/2%3A_Limits_and_Derivatives/2.8%3A_The_Derivative_as_a_Function" }
homework-and-exercises, newtonian-mechanics, string Title: Pulley system, what is the ratio? I've got this pulley system and I am not sure what the ratio is, that is if I pull the rope at S for example 10 cm how much will the block move? My guess is 10cm pull = $\frac{10}{4}$ cm at the block, a friend says it is $\frac{10}{3}$ cm. What is correct and why? I think it is $\frac{10}{4}$ cm because there are two pulleys and twice the rope on each side, while my friend say it is 3 because the rope only turn back and forward 3 times Suppose you moved the block a distance $AB$ as shown in the diagram but the string, which was no longer flexible, did not move. The system would look something like this with the small pulley attached to the block having moved a distance $AB$. How far would you have to move $S$ to have the string, which is now flexible, to be tight around the pulleys again?
{ "domain": "physics.stackexchange", "id": 47608, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, string", "url": null }
Note that your conclusion that the discriminante D must be negative is not correct. Since we only know that $$n^2+an+b >0$$ for some non-negative $$n$$, the parabola that represents the function $$f(x)=x^2+ax+b$$ could have different negative roots. $$n^2+4n+3$$ would be a simple example. That means a positive $$a$$ (together with the positive $$b$$) is never a contradiction with regard to the function needing to provide positive values for (some) non-negative $$n$$. I assume you know that a quadratic function with positve factor before the square term takes it maximal value at either end of the interval of the independent variable. The lower end of the interval, $$n=0$$ produces $$f(0)=b$$. So what you need to be concerned about is how big can your $$n$$ get! Obviously, $$f(b)=b^2+ab+b$$ is divisible by $$b$$. If we assume $$f(b)=b$$, that leads to $$b^2+ab=b(a+b)=0$$ and because $$b > 0$$ we have $$a=-b$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639669551474, "lm_q1q2_score": 0.825801370911733, "lm_q2_score": 0.8499711794579723, "openwebmath_perplexity": 206.94436901758579, "openwebmath_score": 0.9691540002822876, "tags": null, "url": "https://math.stackexchange.com/questions/3683153/is-there-a-way-to-find-an-upper-bound-for-n2anb" }
quantum-mechanics, nuclear-physics, potential-energy I'm interested in explaining the intensity of each $\alpha$-decay branch. I have read from the book the following argument to justify the intensities related to the rotational bands: 'the centrifugal potential $\frac{l(l+1)\hbar^2}{2mr^2}$ raises the barrier and the excitation energy lowers it'. Then he says: 'we obtain the following estimates using the theory of decay rates, taking into account the increasing effective binding energy and decreasing excitation energy: \begin{align} 0^{+}&\to 76 \% \\ 2^{+} &\to 23\%\\ 4^{+} &\to 1.5\% \\ 6^{+} &\to 0.077\%\\ 8^{+} &\to 8.4 \times 10^{-5}\% \end{align} The issue is that I do not understand how can I get these estimates by the decay rate theory.
{ "domain": "physics.stackexchange", "id": 58457, "lm_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, nuclear-physics, potential-energy", "url": null }
special-relativity, notation, representation-theory, lorentz-symmetry, lie-algebra Title: How to interpret the extra indices of the generators of the Lorentz algebra in Peskin & Schroeder? In Peskin & Schroeder p.39 they introduce the 4x4-matrices $$\left(\mathcal{J}^{\mu\nu}\right)_{\alpha\beta} = i \left(\delta^{\mu}_{\;\alpha} \delta^{\nu}_{\;\beta} - \delta^{\mu}_{\;\beta}\delta^{\nu}_{\;\alpha}\right) \tag{3.18}$$ which they "pull out of a hat" and which represent the Lorentz algebra, that is they satisfy $$\left[ \mathcal{J}^{\mu\nu} , \mathcal{J}^{\rho\sigma} \right] = i \left( \eta^{\nu\rho} \mathcal{J}^{\mu\sigma} - \eta^{\mu\rho}\mathcal{J}^{\nu\sigma} - \eta^{\nu\sigma}\mathcal{J}^{\mu\rho} + \eta^{\mu\sigma}\mathcal{J}^{\nu\rho} \right)\tag{3.17}$$
{ "domain": "physics.stackexchange", "id": 51612, "lm_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, notation, representation-theory, lorentz-symmetry, lie-algebra", "url": null }
c++, performance, algorithm, pathfinding, c++20 return graph_data; } class Milliseconds { private: std::chrono::high_resolution_clock m_clock; public: auto milliseconds() { return std::chrono::duration_cast<std::chrono::milliseconds> (m_clock.now().time_since_epoch()).count(); } }; int main() { GraphData graph_data = createRandomGraphData(NUMBER_OF_NODES, NUMBER_OF_ARCS); try { Milliseconds ms; std::random_device rd; std::mt19937 mt(rd()); std::uniform_int_distribution<int> dist(0, NUMBER_OF_NODES - 1); int source_node = dist(mt); int target_node = dist(mt); std::cout << "Source node: " << source_node << "\n"; std::cout << "Target node: " << target_node << "\n"; std::cout << "--- Dijkstra's algorithm: ---\n"; auto start_time = ms.milliseconds();
{ "domain": "codereview.stackexchange", "id": 42941, "lm_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, algorithm, pathfinding, c++20", "url": null }
programming-languages Title: Bit operations; Treating a number like an array Are there features in programming languages that allow you to directly access the $k^{th}$ bit of a number. Treating it like an integer. I'm not talking of using bit shifting to retrieve a number. But directly access the bit at index $i$ of a number as if it were an array. I'm looking at this feature to replace shifting to write an algorithm I was working on. If it isn't faster than shifting, then such a feature would be pointless. I didn't ask this on stack overflow as this isn't about a specific programming language, but about whether programming languages in general have this feature.
{ "domain": "cs.stackexchange", "id": 8025, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-languages", "url": null }
graphs, algorithm-analysis, shortest-path, correctness-proof, weighted-graphs Title: Clarification in the proof for the Bellamn-Ford algorithm While proving the correctness of the Bellman-Ford algorithm, we prove the following lemma: After k (k >= 0) iterations of relaxations, for any node u that has at least one path from s (the start node) to u with at most k edges, the distance of from s to u is the smallest length of a path from s to u that contains at most k edges. We prove this lemma using mathematical induction as follows:
{ "domain": "cs.stackexchange", "id": 16362, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graphs, algorithm-analysis, shortest-path, correctness-proof, weighted-graphs", "url": null }
geology, volcanology Title: How vertically deep do lava conduits go? I'll preface this with the truth and hope it doesn't disqualify the question but rather give context: after reading Journey to the Center of the Earth by Jules Verne, I am amazed at the prospect of venturing into volcanic conduits to explore the interior of the Earth. How deep do lava conduits go, why don't they go deeper, and what kinds of formations or environments exist at their terminus? I am not new to Earth science but am pretty new to in-depth geology (pun intended) and volcanology. From what I can tell, the type of lava cave which goes the deepest is referred to as a lava tube. Apparently these tubes can be fairly long (e.g. a tube from Mauna Loa goes 50km before terminating[?] at the ocean!) but not very deep (Wikipedia on lava tubes lists a mere 15m!) Why do these tubes not go far deeper?
{ "domain": "earthscience.stackexchange", "id": 1398, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geology, volcanology", "url": null }
java, game, android, xml x = new int[NBRSTEPS]; y = new int[NBRSTEPS]; hero_positions = new int[NBRSTEPS]; int resourceIdFalling = 0; int resourceIdFalling2 = 0; int resourceIdHero = 0; if (heroName.equals("Jamie")) { resourceIdFalling = R.mipmap.falling_object2; resourceIdFalling2 = R.drawable.coconut_hdpi; resourceIdHero = R.drawable.left_side_hdpi; setBackground(getResources().getDrawable(R.mipmap.background)); } falling = BitmapFactory.decodeResource(getResources(), resourceIdFalling); //load a falling image falling2 = BitmapFactory.decodeResource(getResources(), resourceIdFalling2); //load a falling image hero = BitmapFactory.decodeResource(getResources(), resourceIdHero); //load a hero image jamieleft = BitmapFactory.decodeResource(getResources(), R.drawable.left_side_hdpi); //load a hero image
{ "domain": "codereview.stackexchange", "id": 28697, "lm_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, game, android, xml", "url": null }
AU - Serizawa, Shin Ichiro. A) Calculate the x-component of the electric field produced by the charge distribution Q at points on the positive x-axis where x>a in terms of some or all of the variables k, q, Q, a, and b, where k= 1/ (4*pi*Eo) B) Calculate the y-component of the electric field produced by the charge distribution Q at points on the positive x-axis where x>a. For a field line plot, we require the descriptions of charges like position and magnitude (putting the + or - sign will take care of the type of charge), which were taken from the user with the help of a GUI built using the Tkinter module in Python. A Electric Field of a charged cube A) Consider a a uniform 0 2. As Hongwan Liu and Terry Moore note, a simple symmetry argument leads to a spherically symmetric field around a uniform (symmetric) sphere. How To Find the Electric Field for a Continuous Distribution of Charges For a continuous distribution of charge, it’s really the same thing as for point charges, except
{ "domain": "charlyedance.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290930537122, "lm_q1q2_score": 0.8092657624845941, "lm_q2_score": 0.8333245994514084, "openwebmath_perplexity": 374.3046680397576, "openwebmath_score": 0.7888935208320618, "tags": null, "url": "http://byqx.charlyedance.it/electric-field-of-a-charge-distribution-python.html" }
If you let $\displaystyle y = \pm 2$, you have $\displaystyle x^2 + 92 = 41$ $\displaystyle x^2 = -51$ which also does not have any integer (or real) solutions. It should also be clear that any other integer will also give $\displaystyle x^2 = \textrm{something negative}$, which will not give any integer (or real) solution. 3. Originally Posted by demode I need some help with the following problem: (a) Prove that the equation $x^2 + 23y^2 = 41$ does not have solutions in integers. (b) If (1/3, 4/3) and (9/4, 5/4) are two rational solutions of this equation, find a solution to this equation in $\mathbb{Z}_{568}$ and another one in $\mathbb{Z}_{657}$. I have not encountered this type of problems before, so I'm unsure how to get started on either parts. Any help to get me started on them is greatly appreciated. For part (a), $y^2$ can only be 0 or 1. (Otherwise x will not be real.) So, we get two cases: 1) $x^2=41$ 2) $x^2+23=41 \implies x^2=18$
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787861106087, "lm_q1q2_score": 0.8093813124317346, "lm_q2_score": 0.8198933403143929, "openwebmath_perplexity": 242.8315764306002, "openwebmath_score": 0.8728418946266174, "tags": null, "url": "http://mathhelpforum.com/number-theory/175348-solutions-equation.html" }
linear-regression That correctly founds the parameter (g) close to 6. Here are 20 data points that I have generated for $C=10$, $\omega_0=10$, and $\gamma=6$: w v(w) 5.4881 0.1294 7.1519 0.1538 6.0276 0.1366 5.4488 0.1290 4.2365 0.1164 6.4589 0.1429 4.3759 0.1176 8.9177 0.1746 9.6366 0.1716 3.8344 0.1132 7.9173 0.1655 5.2889 0.1271 5.6804 0.1319 9.2560 0.1744 0.7104 0.1004 0.8713 0.1006 0.2022 0.1000 8.3262 0.1706 7.7816 0.1636 8.7001 0.1737
{ "domain": "datascience.stackexchange", "id": 4910, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "linear-regression", "url": null }
• I think you want $[0,1)$ rather than $[0,1]$. – Jonas Meyer Feb 2 '12 at 5:27 • I think the standard term is fractional part; after all, it's independent of decimal notation. (Of course, it's not always a fraction, either, but you can't win 'em all...) – Rahul Feb 2 '12 at 5:41 $(a+\mathbb Z)+(b+\mathbb Z)$ is found by adding $a$ and $b$, the result of which is $a+b$. If $a+b<1$, then $(a+\mathbb Z)+(b+\mathbb Z)=(a+b)+\mathbb Z$. If $a+b\geq 1$, then $(a+\mathbb Z)+(b+\mathbb Z)=(a+b-1)+\mathbb Z$. But this is only if you follow the stated convention of only listing representatives from $[0,1)$. The fact is, $(a+b)+\mathbb Z$ and $(a+b-1)+\mathbb Z$ are different names for the exact same set, so you don't really need to subtract $1$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97241471777321, "lm_q1q2_score": 0.8186036511158172, "lm_q2_score": 0.8418256492357358, "openwebmath_perplexity": 139.48389600205516, "openwebmath_score": 0.8842489719390869, "tags": null, "url": "https://math.stackexchange.com/questions/104846/the-differences-between-mathbbr-mathbbz-and-mathbbr" }
Simplify@With[{x1 = 1, y1 = -3, x2 = -33, y2 = -1}, (y - y1)/( x - x1) == (y2 - y1)/(x2 - x1)] // TraditionalForm gives • I think, we can write in the form Simplify@With[{x1 = 1, y1 = -3, x2 = -33, y2 = -1}, (y - y1)* (x2 - x1) - (x - x1)*(y2 - y1) == 0] // TraditionalForm – minhthien_2016 Nov 21 '18 at 6:29 • My way is almost write the equations in the form a x + b y + c = 0`. – minhthien_2016 Nov 21 '18 at 6:48
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9343951588871156, "lm_q1q2_score": 0.8151171668681901, "lm_q2_score": 0.8723473779969194, "openwebmath_perplexity": 2283.223994093817, "openwebmath_score": 0.3514730930328369, "tags": null, "url": "https://mathematica.stackexchange.com/questions/186285/another-way-to-write-equation-of-the-line-passing-through-two-points/186306" }
c++, object-oriented Method function product also does not yield expected results, you can only compute product of a matrix that satisfies the invariant that A.row == B.column where A and B are matrix objects. Doing otherwise produces unexpected results. So we could rewrite this to be Matrix<T> operator*(const Matrix& rhs) { if(row_ != rhs.column_ ) throw std::runtime_error("Unequal size in Matrix*"); Matrix res(rhs.row_, column_, 0.0); for(int i = 0; i != rhs.row_; ++i) { for(int j = 0; j != column_; ++j) { for(int k = 0; k != row_; ++k) { res(i, j) += rhs(i, k) * this->operator()(k, j); } } } return res; }
{ "domain": "codereview.stackexchange", "id": 40488, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented", "url": null }
audio, python, resampling samps = secs*16000 # Number of samples to downsample Y = scipy.signal.resample(y, samps) scipy.io.wavfile.write(file2, 16000, Y) #librosa.output.write_wav(file2, Y, 16000) With both the outputs from scipy/librosa-write_wav() I can't listen to the file. So I assume the file is corrupted and this would be a result of the scipy.resample step. Yet I cannot work out why. I have no error logs to go off. I've tried plotting y and Y on wavplots and they are both the same except for different length x-axis(samples). Any ideas? Scikit.resample: file = '../machine_learning/voice_snippets_stepvoices/t10_9steps.wav' new_file = '../testing/random_data/t10_9steps.wav' ratio = 16000/48000 sr, y = scipy.io.wavfile.read(file) y_new = resample(y, ratio, 'sinc_best', True) scipy.io.wavfile.write(new_file, 16000, y_new) In this one I do get an output but it changes somewhat noisy audio of someone speaking to what sounds like Skrillex... (Joking. but look at the graphs).
{ "domain": "dsp.stackexchange", "id": 6049, "lm_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, python, resampling", "url": null }
to functions > Linear functions > Polynomial functions > Exponential and logarithm functions > Trigonometric functions > Hyperbolic functions > Composition of functions > Inverse functions > Sigma notation > Arithmetic and geometric progressions > Limits of sequences > The sum of an infinite series > Limits of functions. Unit #5 – Exponential and Logarithmic Functions – Review – Solutions. The exponential function is one of the most important functions in mathematics (though it would have to admit that the linear function ranks even higher in importance). Write an exponential growth function to model the situation. Exponential Function Quizizz - Game Code: 158847. It is used to represent exponential growth, which has uses in virtually all science subjects and it is also prominent in Finance. Exponential Functions. LEARNING GOALS. 02) to the 𝘵 power, 𝘺 = (0. The name of this book is Al-Jabr wa'l muqabalah. While there are many ways to show division by 2, this machine is a bit lazy and
{ "domain": "umood.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.981735720045014, "lm_q1q2_score": 0.8511999843866641, "lm_q2_score": 0.8670357683915538, "openwebmath_perplexity": 944.1857117142524, "openwebmath_score": 0.4596410393714905, "tags": null, "url": "http://pziq.umood.it/exponential-functions-game.html" }
php, laravel Title: Array_Swap function in PHP In PHP/Laravel I have the following function. Can you please review my approach? private function array_swap_assoc($key1, $key2, $array) { $newArray = array(); foreach ($array as $key => $value) { if ($key == $key1) { $newArray[$key2] = $array[$key2]; } elseif ($key == $key2) { $newArray[$key1] = $array[$key1]; } else { $newArray[$key] = $value; } } return $newArray; } This will swap the values but is not very robust. If for instance one of the two keys is not defined this will generate notices and might cause sneaky errors further down in the code. private function array_swap_assoc($key1, $key2, $array)
{ "domain": "codereview.stackexchange", "id": 27696, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, laravel", "url": null }
python, beginner, python-3.x, json valid_statuses_for_calendar = ['pending', 'waiting'] invalid_statuses_for_calendar = ['completed', 'deleted'] def create_uniqueness(task): """ creates a definition of uniqueness from a task's attributes input: task: an object with a Taskwarrior set of attributes output: a string of the unique signature of this task """ if not task: return None if task.get('due') and task.get('description'): return task['due'] + task['description'] else: return task['uuid'] def is_unique_calendar_task(task): """ if this task exists in the list of tasks to make a calendar already input: task: an object with a Taskwarrior set of attributes output: boolean - true if the task is unique, false if it already existed in the list """ if not task: return None if task['status'] in invalid_statuses_for_calendar: return False
{ "domain": "codereview.stackexchange", "id": 26299, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, json", "url": null }
Based on what we've shown so far, we can say that the global index of the first node in the next tier is: $$i_{first}' = 2^{T+1-1} - 1 = 2^T - 1$$ Now, for each predecessor of the parent node $$n$$ in tier $$T$$ there will be 2 predecessors of left-child node $$n'$$ in $$T+1$$. Also, given index $$j$$ in $$T$$, we know there are $$j$$ predecessors of $$n$$ in $$T$$ - i.e. the index of a node is equal to the number of its predecessors. So we can conclude that: $$j' = 2j$$ Putting it all together, we can conclude that $$i' = i_f' + j'$$ $$i' = 2^T - 1 + 2j$$ Now let's rework the previous equation for the global index of parent node $$n$$, $$i = 2^{T-1}-1+j$$ to the following: $$i + 1 = 2^{T-1} + j$$ Finally, let's compare that to the equation of the global index of the left-child node:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846640860382, "lm_q1q2_score": 0.8276571054622156, "lm_q2_score": 0.8459424353665382, "openwebmath_perplexity": 423.32611352125036, "openwebmath_score": 0.9204259514808655, "tags": null, "url": "https://cs.stackexchange.com/questions/87154/why-does-the-formula-2n-1-find-the-child-node-in-a-binary-heap/87163" }
fft, frequency-spectrum, dft, frequency-domain mport matplotlib.pyplot as plt import numpy as np from decimal import Decimal #number of samples iNumSamples=10000 #period of samples (i.e. sampling at 10Khz) Ts=1/iNumSamples #time axis used to sample 10,000 times for a second t = np.linspace(0, 1, iNumSamples) #10Hz Signal signal1=np.sin(t*20*np.pi) #100Hz Signal signal2=np.sin(t*200*np.pi) #creates a new figure object freqFig=plt.figure(2) #change title freqFig.canvas.set_window_title('Frequency domain') #fast fourier transform of 10Hz signal absoluteValues1=abs(np.fft.rfft(signal1)) #fast fourier transform of 100Hz absoluteValues2=abs(np.fft.rfft(signal2)) #find the frequencies of the rtansform frequencies=np.fft.rfftfreq(iNumSamples, d=Ts) ##Normalises (rescales) the fft in a sensible way so that the corresponding freq component of a sine wave is 1 if the sine wave amplitude is 1 ##non zero freq amplitudes (even when using rfft) are halfed as there are negative and positive components, hence first multiple by 2
{ "domain": "dsp.stackexchange", "id": 4869, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, frequency-spectrum, dft, frequency-domain", "url": null }
c#, classes, email return smtpClient; } This had been pretty easy, hadn't it ? So, next we add a method composing the Subject by using the String.Format() method. private String ComposeSubject(LogResult logResult) { return String.Format("Logs from {0} searched {1} for {2}", logResult.ComputerName, logResult.SearchDate, logResult.SearchTerm); } But wait, what is LogResult ? That is a class we need to create, so let us do it. As we see it should have at least the properties ComputerName, SearchDate and SearchTerm. We add also a ReadOnlyCollection<String> FileNames property. public class LogResult { public String ComputerName { get; private set; } public DateTime SearchDate { get; private set; } public String SearchTerm { get; private set; } public ReadOnlyCollection<String> FileNames { get; private set; }
{ "domain": "codereview.stackexchange", "id": 10465, "lm_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#, classes, email", "url": null }
javascript, jquery, validation, event-handling $.validator.setDefaults({ highlight: function (element) { $(element).closest('.form-group').addClass('has-error'); }, unhighlight: function (element) { $(element).closest('.form-group').removeClass('has-error'); }, errorElement: 'span', errorClass: 'help-block', errorPlacement: function (error, element) { if (element.parent('.input-group').length) { error.insertAfter(element.parent()); } else { error.insertAfter(element); } } }); $('#form1').validate({ rules: { baseURL: { required: true, url: true }, demandChannel: { required: true }, userEmail: { required: true, email: true } } });
{ "domain": "codereview.stackexchange", "id": 13457, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, validation, event-handling", "url": null }
c#, .net, event-handling, networking, unity3d Using a stateful Singleton prevents the class and its caller's to be tested. Assume you have one test to check that a handler is added successfully and a test to remove a handler. The first one is easy, but for the second one you will to first add a handler and then remove it so you are basically testing 2 different/independent parts of your code but tests should only test 1 part of your code. So you could say, fine I will just remove the handler which you have added with the first test. This is also bad, because one test should not depend on another test. But you say, hey I can live with that problem here. Then I would need to answer, if you change the order of the calling tests the tests won't assert the same way. If at first the remove handler test is executed it will return false. So a much better way would be to use an Interface which is the injected to the constructor of the caller's and stored in a private field. Taking a look at this
{ "domain": "codereview.stackexchange", "id": 15793, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, event-handling, networking, unity3d", "url": null }
# Documentation - Example 2 ### DOCUMENTATION FOR MATHS::SPECIAL::BESSELL::I::BESSEL I This example shows more uses of Doxygen, including more equations and how to insert a graph: #### Brief Description Modified Bessel function of the first kind of integer order. ## Interface #include <codecogs/maths/special/bessel/i.h> double  Maths::Special::Bessel::besselI(double x, double v) Modified Bessel function of the first kind. double  Maths::Special::Bessel::besselI (double x, int v) Modified Bessel function of the first kind of integer order. #### Detailed Description These function return solutions to the Modified Bessel Function of the first kind. The differential equation $z^2 \frac{d^2y}{dz^2} + z \frac{dy}{dz} - (z^2 + v^2)y = 0$ where \e v is a real constant, is called the modified Bessel's equation, with the solution known as the modified Bessel function, with two fundamental solutions: $I_v(z)$ and $I_{-v}(z)$, where
{ "domain": "codecogs.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126500692716, "lm_q1q2_score": 0.8046869049233774, "lm_q2_score": 0.8221891327004132, "openwebmath_perplexity": 4559.207562879525, "openwebmath_score": 0.7407424449920654, "tags": null, "url": "http://www.codecogs.com/pages/standards/examples/example_2.htm" }
python, performance, pandas # Get actual depot for the file from "storedfiles" dataFrame (sfdf) dstdepot = get_depot(f,sfdf) # Send the file to the depot server. if store(f,dstdepot): dstidx = ssts.index[-1] sfdf.loc[dstidx]=[ f,version, dstdepot ] In general, iterating through the rows of a series or dataframe is slow, and is not the recommended process. Instead, you should do one of two things: use map or apply (map for series, generally apply for data frame; see answers to this question for more details) select/broadcast In this case, you have the opportunity to do both. You should use apply to get the version information for your filelist dataframe: def function_that_does_your_xml_stuff(row): """Get version information for a row in the filelist dataframe from XML.
{ "domain": "codereview.stackexchange", "id": 18514, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, pandas", "url": null }
ferromagnetism The only other explanation I can think of is that the corruption manifests itself in some other way that makes it obvious that there is in fact corruption of the magstrip. Thanks to anyone who can offer me helpful resources or explanations. Have you read the Wikipedia article about Magnetic Stripe cards? To (briefly) answer your question:
{ "domain": "physics.stackexchange", "id": 47355, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ferromagnetism", "url": null }
rviz, urdf, sw-urdf-exporter, xacro, robot Originally posted by renarded with karma: 161 on 2017-01-13 This answer was ACCEPTED on the original site Post score: 3 Original comments Comment by shawnysh on 2017-01-14: I wonder how to make mesh file to coincident with the urdf you write manually. I think the key to urdf file is the relation of link and joint, which mainly includes origin tag and axis tag. So, the mesh for links should be exported by blender one by one through modifying coordinates, right? Comment by renarded on 2017-01-16: @shawnysh Each joint origin depends on the parent link. The origin of a link (in visual) is the origin of the visual part depending on the specific link (it's kind of a local offset origin). You have to export each mesh with a local origin (zero) Comment by shawnysh on 2017-01-18: thanks, gotcha Comment by umar_anjum on 2022-04-23: through xacro could I make model of an apple?
{ "domain": "robotics.stackexchange", "id": 26705, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, urdf, sw-urdf-exporter, xacro, robot", "url": null }
optics, quantum-optics, estimation, lenses finite size where it intersects the film or chip. Since the lens is rectangular, this bundle is pyramidal, and the blur will be a rectangular blur rather than the usual circular one. For example, say you're photographing someone's face with a starry sky in the background. You focus on the face. The stars will appear as little fuzzy rectangles.
{ "domain": "physics.stackexchange", "id": 66640, "lm_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, quantum-optics, estimation, lenses", "url": null }
python, python-3.x Title: Optimizing large file reads with a custom line terminator in Python I asked for help accomplishing this on StackExchange. How to efficiently read a large file with a custom newline character using Python? And ended up providing my own answer which is duplicated here. class ChunkedFile(object): """ Yields file in 100 megabyte chunks (by default). If lineterminator is provided reads through file in chunks but yields lines. """ def __init__(self, file_to_process, lineterminator=None): self._file = file_to_process self._lineterminator = lineterminator def read(self, encoding="utf-8", chunk_size=None): one_hundred_megabytes = 100 * 1024 chunk_size = chunk_size or one_hundred_megabytes with self._file.open(encoding=encoding) as f: chunk = "" while True: data = f.read(chunk_size) if not data: # EOF break
{ "domain": "codereview.stackexchange", "id": 33706, "lm_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 }
c#, reinventing-the-wheel, ip-address Title: IPv4 struct: Round 2 Summary Original Question here. Updated GitHub link here I've taken an interest in lower level data structures and I implemented an 'Ip4Address` to get familiar with Explicit structure layout. It turned out to be an exercise in properly implementing a struct in general, but I digress. The idea here is that each Octet of the IPv4 address is represented by a byte in a single 32 bit unsigned integer. Things I've addressed since last review: Better argument validation all around. The struct is now immutable. Extracted a method for validating Ip addresses passed as strings. The code no longer needlessly initializes the struct only to overwrite it's values. Implemented IEquatable & IComparable. In addition, I implemented and overrode the other methods that are recommended when implementing those two interfaces. This includes Object.Equals(Object), GetHashCode(), and the equality operators.
{ "domain": "codereview.stackexchange", "id": 17024, "lm_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#, reinventing-the-wheel, ip-address", "url": null }
1. Crystal planes 2. Parallel planes 3. Perpendicular planes 4. Three crystallographic planes. Option 2 : Parallel planes Miller Indices MCQ Question 4 Detailed Solution CONCEPT: • Miller indices are the styles to designate the planes and directions in the unit cells and crystals. • Miller indices (hkl) are expressed as a reciprocal of intercepts p, q, and r made by the plane on the three rectangular axes x, y, and z respectively. • These are the unit distances from the origin along the three axes. Thus $$h=\frac{1}{p},~k=\frac{1}{q},~l=\frac{1}{r}$$ Where p = intercept of the plane on the x-axis, q = intercept of the plane on the y-axis, and r = intercept of the plane on the z-axis. EXPLANATION: • Consider the plane in pink, which is one of an infinite number of the parallel plane each a consistent distance (“a”) away from the origin (purple planes)
{ "domain": "testbook.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806540875628, "lm_q1q2_score": 0.8016977102726662, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 1668.18593158734, "openwebmath_score": 0.6332297325134277, "tags": null, "url": "https://testbook.com/objective-questions/mcq-on-miller-indices--5eea6a0939140f30f369d8ed" }
optics, electromagnetic-radiation, visible-light, maxwell-equations Is there any approximate formula for it? If the final result I want to get is just light intensity, can I simply replace the unpolarized light source with a polarized one? Well, to be honest, this question came to my mind when I read a paper that simulate light in a nanometric optic probe with Maxwell's equations and the incident light in that paper is polarized, I just want to know if unpolarized light is also available for Maxwell's equations. To simulate unpolarized light, you need to do two separate simulations using Maxwell's equations. In the first simulation, assume the incoming light has some polarization (any polarization will do). In the second simulation, assume that the light has the opposite polarization (y is opposite to x, right-circular-polarized is opposite to left-circular-polarized, etc.).
{ "domain": "physics.stackexchange", "id": 10275, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, electromagnetic-radiation, visible-light, maxwell-equations", "url": null }
python, animation, tkinter for i in xrange(len(numbers)): l.insert(0, "%d.%s" % (numbers[i], extensions[i])) def get_files(directory): """ directory: str, directory to search for files. Returns a sorted generator of all the files in directory that are a valid type (in VALID_TYPES). """ files = [] for f in os.listdir(directory): if len(f.split(".")) > 1 and f.split(".")[1].lower() in VALID_TYPES: files.append(f) sort_list(files) return (directory+"/"+f for f in files) def get_images(directory, screen): """ directory: str, path to look for files in. screen: tuple, (w, h), screen size to resize images to fit on. Sorted generator. Yields resized PIL.Image objects for each supported image file in directory. """ for filename in get_files(directory): with open(filename, "rb") as f: fh = io.BytesIO(f.read()) #Create a PIL image from the data img = Image.open(fh, mode="r")
{ "domain": "codereview.stackexchange", "id": 21444, "lm_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, animation, tkinter", "url": null }
stars, fusion, jupiter, cold-fusion, brown-dwarfs Details and background: It isn't accretion that makes the interior hot. A non-accreting ball of gas will gradually contract as radiative losses extract energy from the star. As the star contracts, the viral theorem ensures that half the released gravitational potential is radiated away and half is used to increase the kinetic energy (i.e. temperature of the gas). It is easy to show that for gas governed by perfect, ideal gas pressure, that the temperature goes up as $M/R$. Nuclear fusion will begin once the core temperature exceeds some threshold. The only way this can then be avoided is if the electrons in the gas become degenerate before the gas temperature reaches this threshold. The electron-degenerate gas pressure would become almost independent of temperature and the ball of gas could cool without significantly contracting any further.
{ "domain": "physics.stackexchange", "id": 88273, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "stars, fusion, jupiter, cold-fusion, brown-dwarfs", "url": null }
ros -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring incomplete, errors occurred! See also "/home/srikar/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/srikar/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed Originally posted by srikar on ROS Answers with karma: 1 on 2017-08-15 Post score: 0 This is really not a question, but a dump of the text on the console after running catkin_make. We're all happy to help here, but please spend some more time on properly formulating a question next time. Please see the wiki/Support - Guidelines for asking a question.
{ "domain": "robotics.stackexchange", "id": 28612, "lm_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 }
Consider all the lattice points (those with integer coordinates) . . from (1,1,1) to (100,100,100). These represent the 1,000,000 possible outcomes. The points whose coordinates have a sum exceeding 222 . . are "outside" the triangle with coordinates: . . (22, 100, 100), (100, 22, 100), (100, 100, 22). How many lattice points are contained in this tetrahedron? The tetrahedron has 21 "levels". Each level contains a triangular number of points. We want the sum of the first 21 triangular numbers. Fortunately, there is a formula for this: . $N \:=\:\frac{n(n+1)(n+2)}{6}$ For $n = 21\!:\;\;N \:=\:\frac{(21)(22)(23)}{6} \:=\:1771$ Therefore: . $P(\text{sum}> 222) \:=\:\frac{1,\!771}{1,\!000,\!000}$ 3. ## Re: Dice probability problem Originally Posted by Soroban Hello, ChaosticMoon! I assume each die has sides numbered from 1 to 100. There are $100^3\,=\,1,\!000,\!000$ possible outcomes.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964232904171, "lm_q1q2_score": 0.8125042859590913, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 1670.569355415077, "openwebmath_score": 0.683907687664032, "tags": null, "url": "http://mathhelpforum.com/advanced-statistics/188546-dice-probability-problem.html" }
recursion Title: Am I drawing the recursion trees correctly? I guess I've already figured out what is a recursion tree and how to construct one. Inspired by Figure 2.5 of "Introduction to Algorithms, 3rd Edition by CLRS", I drew some recursion trees for the recurrence $T(n) = 2T(n/2) + cn$. the recursion tree for the recurrence when n=16 the recursion tree for the recurrence when n=13 the recursion tree for the recurrence when n=7
{ "domain": "cs.stackexchange", "id": 19887, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "recursion", "url": null }
astrophysics, cosmology, universe, distances, expansion Both the angular size distance and the time after the big bang related by being functions of "z", so a time of "800 million years after the big bang" corresponds to z=6.8 and an angular size distance of 3.657. You can't have an object at 800 million years after big bang and any other value for angular size distance. (with the default cosmological parameters)
{ "domain": "astronomy.stackexchange", "id": 6525, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, cosmology, universe, distances, expansion", "url": null }
ros2, rqt Originally posted by lmiller with karma: 219 on 2020-08-13 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 35401, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2, rqt", "url": null }
# I have a problem with socks Let’s learn how to answer the famous probability interview question involving pairs of socks. There’s a famous interview question I’ve seen on the internet. It goes something like this: I have 'x' blue socks and 'y' red socks in a drawer. I take 2 socks from the drawer without looking. What is the probability that I have drawn a pair of matching coloured socks? This sort of question might seem mind-bending for those who haven’t spent much time thinking about probabilities. If you are one of those people, I hope to show you an intuitive way to think through such problems. ## Let’s simplify the problem Instead of starting with 10 blue socks and 10 red socks, let’s start with 2 of each. We will depict the contents of our sock drawer in a matrix. Remember that we will be drawing pairs of socks. The rows in the matrix will represent the first sock chosen in our pair. The columns will represent the second sock chosen in our pair.
{ "domain": "embracingtherandom.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984093612020241, "lm_q1q2_score": 0.8045698215600634, "lm_q2_score": 0.817574478416099, "openwebmath_perplexity": 884.2440197375394, "openwebmath_score": 0.1956196278333664, "tags": null, "url": "https://embracingtherandom.com/probability/python/i-have-a-problem-with-socks/" }
python, hash-map data.append(data_coverPage) # print data
{ "domain": "codereview.stackexchange", "id": 13326, "lm_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, hash-map", "url": null }
schroedinger-equation, perturbation-theory, hydrogen, hyperfine-structure An additional reason is that the temperatures needed to populate the excited states are enormous, so the Doppler broadening would also wash out the hyperfine splitting for higher $n$ states even if the intrinsic linewidth did not. I suppose you could use the excited state hyperfine RF radiation to do thermometry, but the required temperature to populate those levels is so high that I would suspect you would have hydrogen in the plasma phase rather than as hot atoms. In particular, you can reference the phase diagram below for hydrogen (vertical axis in Kelvin). The energy difference between $1s$ and $2p$ is about 10 eV (about $10^5$ Kelvin) for reference.
{ "domain": "physics.stackexchange", "id": 94930, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "schroedinger-equation, perturbation-theory, hydrogen, hyperfine-structure", "url": null }
python, csv, api, multiprocessing inventory[iterator].WarehouseNumber, inventory[iterator].WarehouseName, inventory[iterator].QuantityAvailable ]) totalInventory += inventory[iterator].QuantityAvailable
{ "domain": "codereview.stackexchange", "id": 22398, "lm_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, csv, api, multiprocessing", "url": null }
# Martingale Roulette Strategy: Full Outcome Analysis with Charts Does the Martingale Strategy work for Roulette? Well, that depends on what you mean by work. Will you win? How much? When? Will you lose? How much? When? I have asked myself all of those questions and ended up writing a bit of Python code to find the answers, with the help of Monte Carlo Simulation. The Martingale system has a high winning probability in the short term, but the probability for a total loss rises strongly in the long term. The table maximum plays an important role in reducing the probabilities of a total loss, but also of winning overall. Now, how was I able to figure all this out? How can one find such statements in the first place? I’ll explain all of this below, but even better: I’ll show you a couple of cool charts and detailed overview tables that will help you understand what’s going on, when the Martingale System is used in Roulette.
{ "domain": "computingskillset.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969684454966, "lm_q1q2_score": 0.8018602117280685, "lm_q2_score": 0.8152324960856175, "openwebmath_perplexity": 556.5057910268125, "openwebmath_score": 0.7240111827850342, "tags": null, "url": "https://computingskillset.com/monte-carlo-methods/gambling-analysis/martingale-roulette-strategy-full-outcome-analysis-with-charts/" }
• @JackD'Aurizio No I think its the other way around, like l'hospitals rule, after all, its really the discrete version. You need also that $y_n\to\infty$. Jan 25 '17 at 22:21 • All right, my bad. The (+1) stays :) Jan 25 '17 at 22:24 • @JackD'Aurizio Phew, that was a close one.... I just looked it up in my notes $y_n$ also has to be increasing. Jan 25 '17 at 22:47 How about Stolz-Cesaro? If $x_n \to \infty$, $y_n \to \infty$ and $$\lim_{n\to\infty} \frac{x_{n+1}-x_n}{y_{n+1}-y_n}$$ exists, then : $$\lim_{n\to\infty} \frac{x_n}{y_n} = \lim_{n\to\infty} \frac{x_{n+1}-x_n}{y_{n+1}-y_n}$$ • Okay, that's interesting... But what will be $x_n$? I think $\sqrt{n}$? And what about $y_n$? Jan 25 '17 at 21:59 • $x_n$ will be whole numerator of your fraction Jan 25 '17 at 22:00 Fill in details: $$\frac1{n\sqrt n}\sum_{k=1}^n\sqrt k=\frac1{n}\sum_{k=1}^n\sqrt\frac kn\xrightarrow[n\to\infty]{}\int_0^1\sqrt x\,dx$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9883127413158322, "lm_q1q2_score": 0.8319870209890842, "lm_q2_score": 0.8418256551882382, "openwebmath_perplexity": 401.9149872458896, "openwebmath_score": 0.6338028311729431, "tags": null, "url": "https://math.stackexchange.com/questions/2114065/limit-lim-n-to-infty-n-3-21-sqrt2-ldots-sqrtn-lim-n-to-infty" }
The corresponding problems are known as the bounded and unbounded knapsack problem, respectively.. Knapsack Problem Variants- Knapsack problem has the following two variants-Fractional Knapsack Problem; 0/1 Knapsack Problem . Also, the way followed in Section 2.1 to transform minimization into maximization forms can be immediately extended to BKP. Other Methods to solve Knapsack problem: Greedy Approach: It gives optimal solution if we are talking about fraction Knapsack… This text (page 3) introduces an algorithm that converts a bounded knapsack to 0/1 knapsack by adding $\sum_{j=1}^n \lceil log_2(b_j + 1) \rceil$ terms for each item. If assumption C.5) is violated then we have the trivial solution Xj = bj for all j ^ N, while for each j violating C.6) we can replace bj with [c/wj\\. Hence, both can be terminated making the subset {1, 3} of node 8 the optimal solution to the problem. Here, we assume that the knapsack can hold a … Let us consider below 0/1 Knapsack problem to
{ "domain": "gridserver.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97482115683641, "lm_q1q2_score": 0.8165296576943946, "lm_q2_score": 0.837619959279793, "openwebmath_perplexity": 839.6824261769932, "openwebmath_score": 0.759605348110199, "tags": null, "url": "https://s18612.gridserver.com/melilotus-officinalis-bzq/5c1ccf-bounded-knapsack-problem" }
ros, navigation, turtlebot, ros-electric, 2d-pose-estimate Subscribers: * /rviz_1342988348757430620 (http://192.168.0.107:56845/) * /rviz_1343351131052484131 (http://192.168.0.107:52481/) Anybody knows how to solve the problem? Originally posted by Abtin on ROS Answers with karma: 1 on 2012-07-26 Post score: 0 The reason you don't see particles stems from the fact that the particlecloud topic does not appear to be publishing... Some things to try: roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml If you followed the tutorials, you've already done that. Other things: rostopic list Edit your question and put the output of the above at the bottom. Also, check for errors in configuration. I'll be more useful after more output... Originally posted by allenh1 with karma: 3055 on 2012-07-26 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 10376, "lm_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, turtlebot, ros-electric, 2d-pose-estimate", "url": null }
topology, cold-atoms, optical-lattices, synthetic-gauge-fields I also know of one experimental realization, Observation of chiral edge states with neutral fermions in synthetic Hall ribbons. M. Mancini et al. arXiv:1502.02495. This is limited, of course, by the number of available internal states, which means that the lattice looks more like a thin strip than anything else. Is it possible to alter the strip's topology? In particular, can one couple the maximal $m=M$ and $m=-M$ hyperfine states in a way that will 'knit' the two strip edges together to make the synthetic lattice doubly connected? This would obviously have really nice implications in terms of quantum simulation of "curled up" extra dimensions. Has anything like this been proposed? The simple answer to this is "yes, go read the paper". Indeed, the OP is somewhat negligent in their post, since the Celi et al. paper plainly states in the introduction that We also show that by using additional Raman and radio-frequency transitions one can connect the edges in the extra dimension.
{ "domain": "physics.stackexchange", "id": 21694, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "topology, cold-atoms, optical-lattices, synthetic-gauge-fields", "url": null }
## 11. The Correct Answer is (B) — Expand and simplify the expression using the FOIL technique: \begin{align*} &=(x-5)(x+2) \\ &=x^2-5x+2x-10 \\ &=x^2-3x-10 \end{align*} ## 12. The Correct Answer is (H) — Translating the question from words into equations, $a= \frac{1}{2}b$, and $3a=c$, . Rewrite the latter as $a= \frac{1}{3}c$ and substitute this into the first expression: $\frac{1}{3}c= \frac{1}{2}b$ and $c= \frac{3}{2}b$ b is greater than c by a factor of $\frac{3}{2}$. ## 13. The Correct Answer is (B) — Working through |x – 5| = 3, gives you: x – 5 = 3, which simplifies to x = 8, and –(x – 5) = 3, which simplifies to x = 2. Possible values of x are therefore 8 and 2. Substituting x = 8 into the second equation yields 33, which is not an answer choice. Substituting x = 2 into the second expression yields 9. ## 14.
{ "domain": "ivyglobal.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713874477227, "lm_q1q2_score": 0.8354783717005958, "lm_q2_score": 0.8479677602988601, "openwebmath_perplexity": 403.05508143085336, "openwebmath_score": 0.9814124703407288, "tags": null, "url": "https://ivyglobal.com/study/explanations/438" }
When discuss a countable infinite union, it is infinite number of unions, this infinite number no more belong to $\mathbb{Z}_+$, thus can not be guaranteed by induction principle. ## marked as duplicate by Asaf Karagila♦ elementary-set-theory StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Aug 27 '18 at 17:53
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347860767304, "lm_q1q2_score": 0.8243157436089383, "lm_q2_score": 0.8459424431344437, "openwebmath_perplexity": 329.607639541608, "openwebmath_score": 0.8682010769844055, "tags": null, "url": "https://math.stackexchange.com/questions/2896439/does-a-countable-infinite-cartesian-product-of-countable-sets-is-not-necessaril" }
quantum-information, quantum-optics Title: Quantum Crypto infrastructure & hardware To implement real quantum cryptography in the real world, does the physical link layer from Point A to Point B be an optical link for all parts? Is there any links or whitepaper containing prototypes of technical implementations over varying lengths and distances and types of networks? Can QC be implemented over a WAN such as the global Internet, without modifications to existing physical infrastructure? In order to implement quantum cryptography, you need a link which allows to send quantum states, i.e., some kind of object/particle which carries a quantum degree of freedom. These particles should travel as freely as possible along their way. This is most easily accomplished using a single photon, thus the optical link, but in principle, sending e.g. individual electrons would also work, if you find a way to shield them from interactions. ON the other hand, the internet would not work, as it only allows to send classical information.
{ "domain": "physics.stackexchange", "id": 25878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-information, quantum-optics", "url": null }
reinventing-the-wheel, clojure, numerical-methods Title: Integer square root This essentially performs the same function as exact-integer-sqrt in math.numeric-tower. (defn isqrt "Returns the greatest integer less than or equal to the principal square root of n." [n] {:pre [(not (neg? n))]} (let [n (bigint n)] (if (zero? n) n (loop [x (.shiftLeft BigInteger/ONE (quot (inc (.bitLength n)) 2))] (let [y (quot (+ x (quot n x)) 2)] (if (<= x y) x (recur y))))))) I'm interested in any improvements to this code. Some specific questions: Should the precondition be thrown explicitly as an IllegalArgumentException? Is it a bad idea to shadow the parameter with a let binding? Should the initial guess be more explicit about the calculation it is performing by using Math.ceil and BigInteger.pow instead of inc/quot and BigInteger.shiftLeft? Regarding your questions:
{ "domain": "codereview.stackexchange", "id": 18577, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinventing-the-wheel, clojure, numerical-methods", "url": null }
compilation, laserscan, topic, subscribe, roscpp BrController bControl(nh); bControl.driveBraitenberg(); return 0; } And here is the error : [100%] Building CXX object CMakeFiles/pr2_braitenberg_controller.dir/src/braitenberg_controller.o /home/renaudo/ros_workspace/pr2_braitenberg_controller/src/braitenberg_controller.cpp: In constructor ‘braitcontrol::BrController::BrController(ros::NodeHandle&)’: /home/renaudo/ros_workspace/pr2_braitenberg_controller/src/braitenberg_controller.cpp:13: error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [5], int, <unresolved overloaded function type>)’ /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:785: note: candidates are: ros::Subscriber ros::NodeHandle::subscribe(ros::SubscribeOptions&) Originally posted by Erwan R. on ROS Answers with karma: 697 on 2012-06-10 Post score: 2 Hi, Change the following scan_filter_sub_ = nh_.subscribe("scan", 50, msgCallback);
{ "domain": "robotics.stackexchange", "id": 9740, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "compilation, laserscan, topic, subscribe, roscpp", "url": null }
special-relativity, symmetry, field-theory, representation-theory, lie-algebra $$\psi^\prime(\Lambda^{-1}x)=\mathsf{exp}\left\{-\frac{\mathrm{i}}{2}\omega_{\mu\nu}L^{\mu\nu}\right\}\psi(x)$$ Notice that this formula differs from yours by the prime from the first field (I also checked with the same result from Chapter 3.7.11 in Physics From Symmetry by J. Schwichtenberg and there it's also written with a prime, but $\Lambda$ instead of $\Lambda^{-1}$ since it uses a different convention) If interested, you may further study Chapter 2.6 from M. Maggiore's Quantum Field Theory or briefly read an Appendix from G. Eichmann's notes, available at http://cftp.ist.utl.pt/~gernot.eichmann/2014-hadron-physics/hadron-app-2.pdf .
{ "domain": "physics.stackexchange", "id": 75895, "lm_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, symmetry, field-theory, representation-theory, lie-algebra", "url": null }
java, object-oriented, game, rock-paper-scissors Revised code: public static Winner getWinner(PlayedMove playerMove, PlayedMove computerMove) { if (playerMove == computerMove) { return Winner.DRAW; } return isPlayerWinner(playerMove, computerMove) ? Winner.PLAYER : Winner.COMPUTER; } private static boolean isPlayerWinner(PlayedMove playerMove, PlayedMove computerMove) { return (playerMove.isRock() && computerMove.isScissors()) || (playerMove.isScissors() && computerMove.isPaper()) || (playerMove.isPaper() && computerMove.isRock()); } PlayedMove: enum PlayedMove { PAPER(0), ROCK(1), SCISSORS(2); private final int value; PlayedMove(int value) { this.value = value; } public boolean isPaper() { return this.value == PAPER.value; } // isRock and isScissors methods.. }
{ "domain": "codereview.stackexchange", "id": 40010, "lm_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, object-oriented, game, rock-paper-scissors", "url": null }
genetics, bioinformatics, population-genetics, computational-model In other words, infinite sites is an assumption that helps us study the behavior of recombination (which is, of course, finite). We could alternately consider models in which we make zero or infinite assumptions about recombination, to study the behavior of finite mutating sites. Elsewhere in the documentation for ms, Hudson writes: In this model, the number of sites between which recombination can occur is finite and specified by the user (with the parameter nsites). Despite the finite number of sites between which recombination can occur, the mutation process is still assumed to occur according to the ”infinite-sites” model, in that no recurrent mutation occurs, and the positions of the mutations are specified on a continuous scale from zero to one, as in the no-recombination case.
{ "domain": "biology.stackexchange", "id": 11852, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, bioinformatics, population-genetics, computational-model", "url": null }
# Nested Interval Property and the intersection of infinite sequences Given sequences such that $A_n = \{n,n+1,\cdots \}$, then it can be shown that $\bigcap\limits_{n=1}^\infty A_n = \emptyset$ Now, according to nested interval property if $\mathbf{I}_n = [a_b,b_n] = \{x \in \Re: a_n\leq x\leq b_n\}$, then $\bigcap\limits_{n=1}^\infty \mathbf{I}_n \neq \emptyset$ The above two statements looks very similar, but the results are just opposite. From what I can see is, $A_n$ is a countable infinite set whereas $\mathbf{I}_n$ is an uncountable infinite set. Is that the only difference, if it is true ?. Or is there anything more than that which relates two statements above ? First note that there are countably many $A_{n}$ and $I_{n}$ so the problem is not the countability or non-countability of the intersection. In other words the set containing all the $A_{n}$ and the set containing all the $I_{n}$ are both countable being indexed by the countable set $\mathbb{N}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140197044659, "lm_q1q2_score": 0.8293880046124416, "lm_q2_score": 0.8577681031721324, "openwebmath_perplexity": 212.507785164772, "openwebmath_score": 0.8127224445343018, "tags": null, "url": "https://math.stackexchange.com/questions/2868451/nested-interval-property-and-the-intersection-of-infinite-sequences" }
physical-chemistry, statistical-mechanics Title: Deriving the partition function for a harmonic oscillator This question is in reference to an answer I posted here yesterday. In it I derived the partition function for a harmonic oscillator as follows $$q = \sum_{j}e^{-\frac{\epsilon_j}{kT}}$$ For the harmonic, oscillator $\epsilon_j = (\frac{1}{2}+j)\hbar \omega$ for $j \in \{ 0,1,2.. \}$ Note that $\epsilon_0 \neq 0$ there exists a zero point energy. Let's write out a few terms $$q = e^{-\frac{\hbar \omega/2}{kT}} + e^{-\frac{\hbar \omega3/2}{kT}} + e^{-\frac{\hbar \omega5/2}{kT}} +..... $$ factoring out $e^{-\frac{\hbar \omega/2}{kT}}$ $$q = e^{-\frac{\hbar \omega/2}{kT}} \left( 1+ e^{-\frac{\hbar \omega}{kT}} + e^{-\frac{2\hbar \omega}{kT}} +.....\right) $$ The sum in the bracket takes the form of a geometric series whose sum converges as shown below $$1+x+x^2+... = \frac{1}{(1-x)} $$ herein, $ x \equiv e^{-\frac{\hbar\omega}{kT}} $ Putting all of this together
{ "domain": "chemistry.stackexchange", "id": 6612, "lm_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, statistical-mechanics", "url": null }
#### alane1994 ##### Active member Ok, is "h" the highest point of the graph? And if so, r would be 5-x, where x is the corresponding coordinate for the highest point? #### MarkFL Staff member Ok, is "h" the highest point of the graph? And if so, r would be 5-x, where x is the corresponding coordinate for the highest point? No, $h$ is the distance from the top curve to the bottom curve at the value of $x$ for the arbitrary shell. The arbitrary shell can be anywhere for $0\le x\le4$. I just drew one such shell. So we have: $$\displaystyle r=5-x$$ $$\displaystyle h=\left(4x-x^2 \right)-0=4x-x^2$$ and thus the volume of the shell is: $$\displaystyle dV=2\pi(5-x)\left(4x-x^2 \right)\,dx$$ Next, you want to sum all the shells: $$\displaystyle V=2\pi\int_0^4 (5-x)\left(4x-x^2 \right)\,dx$$ #### chisigma ##### Well-known member I have been going over previous tests in an attempt to better prepare myself for the final that is coming tomorrow. I was posed a question.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429609670702, "lm_q1q2_score": 0.841595201005848, "lm_q2_score": 0.8558511469672594, "openwebmath_perplexity": 637.6273117862211, "openwebmath_score": 0.7216432690620422, "tags": null, "url": "https://mathhelpboards.com/threads/shell-method-about-the-line-x-5.5809/" }
python, file PROJECT_FOLDERS = ( "/templates", "/templates/group1", "/images", "/scss", "/css", "/scripts", ) And now you can iterate over these folders to make them in create_project: def create_project(self): if os.path.exists(self.path): raise IOError("A directory already exists at: {}".format(self.path)) for folder in pjen.PROJECT_FOLDERS: os.makedirs(self.path + folder) print("Created project in {}".format(self.path))
{ "domain": "codereview.stackexchange", "id": 17402, "lm_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, file", "url": null }
solid-mechanics to be modelled as a function along the length. Also, care might have to be taken in the numerical solution of your dynamical Euler beam PDE, if the "wear and tear" occurs at a rate comparable to the beam's frequency, but that should not be the case.
{ "domain": "physics.stackexchange", "id": 71999, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solid-mechanics", "url": null }
gazebo Title: Can't start gazebo I am just starting with ROS. On a new Ubuntu 12.04 installation, i issued apt-get ros-fuerte-* and installed everything (except openni-dev that needs SSE3 and i have only SSE2). Now i can't start gazebo!! roslaunch gazebo_worlds empty_world.launch ... logging to /home/amh/.ros/log/348d8d28-2b9c-11e2-85c7-00166f6382d6/roslaunch-amh-Latitude-D610-17941.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://amh-Latitude-D610:57229/ SUMMARY ======== PARAMETERS * /rosdistro * /rosversion * /use_sim_time NODES / gazebo (gazebo/gazebo) gazebo_gui (gazebo/gui) auto-starting new master Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored process[master]: started with pid [17957] ROS_MASTER_URI=http://localhost:11311
{ "domain": "robotics.stackexchange", "id": 11694, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
javascript, beginner, to-do-list Title: Vanilla JavaScript to-do list I'm just learning JavaScript and I started this simple to-do list project to practice on. I got most of the way there, but I couldn't get the clear button to work on any dynamically added inputs. I think this has something to do with where/when the selector variable is defined, but I couldn't work out how to fix it. I'm sure some of the code is not the best way to write it, so any recommendations or fixes would be much appreciated! var add = document.getElementById('add'); var input = document.getElementsByClassName("input-container"); var remove = document.querySelectorAll('.remove'); var addField = function() { var field = document.getElementsByClassName("input-container")[0]; var clone = field.cloneNode(true); var latestInput = document.getElementById("list-container").appendChild(clone); latestInput.childNodes[1].value = ''; };
{ "domain": "codereview.stackexchange", "id": 27704, "lm_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, beginner, to-do-list", "url": null }
c++, url-routing return insert_path(path, result, child, path_pos + 1); } } void get_wildcard_name(Path **wildcard, string_t &wildcard_name) { /* * /users/{uuid} and users/{uuid}/friends is allowed * /users/{uuid} and users/{id}/friends is not allowed, because wildcards at the same positions must match * * This method walks down the chain until the wildcard_close_ character has been found. Everything between start and end is appended to the value. */ assert((*wildcard)->children.size() == 1); if ((*wildcard)->children[0]->character != wildcard_close_) { wildcard_name.append(1, (*wildcard)->children[0]->character); *wildcard = (*wildcard)->children[0]; get_wildcard_name(wildcard, wildcard_name); } else { *wildcard = (*wildcard)->children[0]; } }
{ "domain": "codereview.stackexchange", "id": 38536, "lm_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-routing", "url": null }
• math isn't an opinion, but notation sure is. – Exodd Jun 10 '15 at 16:01 • Both are fine to use. – muaddib Jun 10 '15 at 16:04 For example, a common definition for an approximation to the derivative could be $f'(x) = (f(x+h) - f(x))/h = (f(x_{i+1})-f(x_i))/h$. This is known as a 'forward difference' and has first order accuracy in the size of your interval $h$. So if you decrease the size of your $h$, the error in your derivative approximation will correspondingly decrease by that amount. On the other hand if we define the approximation to the derivative be the 'centered difference' : $f'(x) = (f(x+h) - f(x-h))/(2h) = (f(x_{i+1})-f(x_{i-1}))/(2h)$ we can show that this results in $O(h^2)$ accuracy - i.e. if your $h$ is twice as small, the error in your derivative approximation will be 4 times less. • I think it's $2h$ in the central difference – Exodd Jun 10 '15 at 16:14
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.979976559880137, "lm_q1q2_score": 0.8405926420478133, "lm_q2_score": 0.8577681104440171, "openwebmath_perplexity": 182.66959490304475, "openwebmath_score": 0.9483143091201782, "tags": null, "url": "https://math.stackexchange.com/questions/1320137/defining-change-in-an-interval/1320153" }
asteroids, rogue-planet, intergalactic-space, interstellar Title: What would you find within a void? I'm aware that voids are relatively empty regions of the universe, but just how empty can they be? Wikipedia states that voids have 'few or no' galaxies, but I can't find much else. To make my question specific, suppose I were in the centre of a large void, way outside of the few galaxies that may still exist in this void. Would I occasionally encounter asteroids (if I may call them such), rogue planets, or even some occasional intergalactic star? Remark: I'm aware that this question is a bit of a one-up of What is there in the intergalactic space?. If this is too much of a duplicate, let me know and I remove the question. The Wikipedia article on voids is pretty good (though IMO unusually awkwardly written.) The key thing is that voids are not empty, they are just large volumes which have a lower density (typically around 10% of average) compared with the rest of the universe.
{ "domain": "astronomy.stackexchange", "id": 3779, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "asteroids, rogue-planet, intergalactic-space, interstellar", "url": null }
training resources to review the simple changes. Any set which is empty or contains a definite and countable number of elements is called a finite set. A couple of examples of an infinite sequence: 2, 4, 6, 8, … or 1, 5, 10, 15, … (notice the commas) An infinite series has either addition or subtraction symbols with a common difference: 2 + 4 + 6 + 8, … or 1 – 5 – 10 – 15, … It’s also possible (and actually quite common) to have subtraction and addition in the same series. Not all infinite sets are the same. Now try counting the number of stars in the universe. Run following ionic command in the terminal window$ ionic new ionic-infinite-scroll-app blank --type=angular . 3 Examples of Uncountable Sets 3.1 The Set of Binary Sequences Let S denote the set of infinite binary sequences. Georg Cantor (1845 to 1918) defined the following. A set that is not finite is called infinite. The set is represented by listing all the elements comprising it. It is the only set that is directly required
{ "domain": "freshface.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517456453798, "lm_q1q2_score": 0.82737548322316, "lm_q2_score": 0.8459424431344437, "openwebmath_perplexity": 417.22945825059145, "openwebmath_score": 0.7496109008789062, "tags": null, "url": "http://switcher.freshface.net/qr8m71xm/1788b5-infinite-set-example" }
orbit, solar-system, planet, gas-giants, orbital-migration Title: Why do the gas giants in the Solar System have comparatively large orbits compared to the inner planets? Ever since I observed the depictions of the Solar System, I was obsessed with the question of why the gas giants (outer planets) have very large orbits, compared to the planets that are closer to the Sun. Is it because of their mass or something I have ignored? As one gets farther from the sun, the gravity from the planets themselves becomes relatively stronger. So if a body were in an orbit between, for example, Jupiter and Saturn, those two planets would soon make the intermediate body's orbit change. This is conceptually related to the latest definition of "a planet"; A planet must clear its general vicinity of other stable orbiting bodies.
{ "domain": "astronomy.stackexchange", "id": 1514, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "orbit, solar-system, planet, gas-giants, orbital-migration", "url": null }
planets, telescopes Finally, there is the question of your eyepieces. Planetary observing is probably the most challenging aspect of visual astronomy, because the planets are so small. The planets require much more magnification than any other object you're likely to look at, except for very close double stars. Your eyepieces give you 26x and 65x, whereas serious planetary observing begins at around 150x, and is mostly carried out at 200x to 300x. The short focal length of your telescope, while providing fine wide-field views of deep sky objects, is not well suited for high magnifications. The shortest focal length eyepiece commonly used, 4mm, will only get you 162x, which is only barely adequate for planetary observing. Even then, the small aperture of your telescope may preclude using this high a magnification.
{ "domain": "physics.stackexchange", "id": 3064, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "planets, telescopes", "url": null }
haskell, primes INIT time 0.000s ( 0.001s elapsed) MUT time 0.250s ( 0.290s elapsed) GC time 0.047s ( 0.041s elapsed) RP time 0.000s ( 0.000s elapsed) PROF time 0.000s ( 0.000s elapsed) EXIT time 0.000s ( 0.000s elapsed) Total time 0.297s ( 0.332s elapsed) %GC time 15.8% (12.2% elapsed) Alloc rate 1,359,937,344 bytes per MUT second Productivity 84.2% of total user, 75.2% of total elapsed Still too much garbage collection, but that's fine for a start. Additional discussion Try to avoid last. Instead, you could have used multiples <- [i * p | i <- [1..nmax`quot`p]]
{ "domain": "codereview.stackexchange", "id": 21889, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell, primes", "url": null }
ros, roslaunch, dynamic-reconfigure, parameters Thanks in advance. Originally posted by alfa_80 on ROS Answers with karma: 1053 on 2012-09-28 Post score: 0 Dynamic reconfigure seems like a good solution for the problem you describe. Originally posted by joq with karma: 25443 on 2012-09-29 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 11172, "lm_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, dynamic-reconfigure, parameters", "url": null }
java, algorithm, graph, ai, breadth-first-search /** * Checks that {@code integer} is no less than {@code minimum}, and if it * is, throws an exception with message {@code errorMessage}. * * @param integer the integer to check. * @param minimum the minimum allowed value of {@code integer}. * @param errorMessage the error message. * @throws IllegalArgumentException if {@code integer < minimum}. */ private static void checkIntNotLess(int integer, int minimum, String errorMessage) { if (integer < minimum) { throw new IllegalArgumentException(errorMessage); } }
{ "domain": "codereview.stackexchange", "id": 15132, "lm_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, graph, ai, breadth-first-search", "url": null }
graph-theory, graph-algorithms, max-flow Any pointers at all would be most welcome :) Finding max flow from arbitrary source/sink can be reduced to finding max flow under insertion/deletion of edges. We modify the graph by adding two vertices $s^*$ and $t^*$ not connected to any vertex. We maintain the data structure to compute max flow from $s^*$ to $t^*$ under insertion/deletion of edges. Now, whenever we want to calculate max flow from any source $s'$ to any sink $t'$, we simply add edges $(s^*,s')$ and $(t',t^*)$ with infinite capacity. The max flow from $s^*$ to $t^*$ would then essentially be the max flow from $s'$ to $t'$. In case you want to change the source and sink to $s''$ and $t''$ respectively, simply delete $(s^*,s')$ and $(t',t^*)$ and add $(s^*,s'')$ and $(t'',t^*)$. The max flow from $s^*$ to $t^*$ would now represent the max flow from $s''$ to $t''$. This technique was earlier used to show the equivalence of All Pair Shortest Path and Single Source Shortest Path in the dynamic environment.
{ "domain": "cstheory.stackexchange", "id": 3641, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory, graph-algorithms, max-flow", "url": null }
The user can provide additional optional arguments to modify the default estimation. Refer to section ‘User options of tvAR’ to understand the usage of arguments p, z, bw, type, exogen, est, tkernel and singular.ok. Note that the current version only allows one single random variable z, the same for every equation. The tvVAR model wraps estimator tvOLS. At the moment all equations are estimated as if there were independent, i.e. line by line. The variance-covariance matrix in the residuals can be used to calculate the orthogonal time-varying IRF. ## User options of tvIRF The main argument x is an object of the class attribute tvvar obtained from function tvVAR. The user can provide additional optional arguments to modify the default estimation. ### Impulse and response variables The user has the option to pick a subset of impulse variables and/or response variables using arguments impulse and response. ### Horizon
{ "domain": "microsoft.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226347732859, "lm_q1q2_score": 0.818373657574057, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 3045.725653461547, "openwebmath_score": 0.6364936232566833, "tags": null, "url": "https://cran.microsoft.com/snapshot/2020-01-20/web/packages/tvReg/vignettes/tvReg.html" }
$= (3!)(2)(2)$ when none of the couples sit together = 120 - 1 couple - 2 couple = 24 then the answer would be $24+72 = 96/120$ .8, can someone tell me what i did wrong? • Why not try using $P_{\text{ At least one person is not beside his/her partner}}=1-P_{\text{ Everyone sitting beside their partner}}$? – Mohammad Zuhair Khan Aug 1 '18 at 4:02 • the answer is 0.4 there is an answer key,also, using your logic, we still get 1- (3!)(2)(2)/120 – SuperMage1 Aug 1 '18 at 4:04 • The book answer of $0.4$ is wrong. If you like, I can write down all the $96$ combinations that you have listed above. – астон вілла олоф мэллбэрг Aug 1 '18 at 4:24 • @астонвіллаолофмэллбэрг Actually check the answer below. – Mohammad Zuhair Khan Aug 1 '18 at 4:31 • I suspect the book is answering the question "what is the probability that no person is next to his/her partner?", which gives $0.4$. – Ross Millikan Aug 1 '18 at 4:47
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575142422758, "lm_q1q2_score": 0.8122918811818601, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 295.60430488219083, "openwebmath_score": 0.8129013776779175, "tags": null, "url": "https://math.stackexchange.com/questions/2868708/couples-sitting-together" }
classical-mechanics, lagrangian-formalism, definition, variational-principle, constrained-dynamics Given the function $f(x)$ that we want to maximize, and given the equation $g(x)=0$ that represents our constraints; the Lagrangian is defined as the following function: $$\mathcal{L}(x,\lambda) := f(x)-\lambda g(x).\tag{3}$$ My question is: Why is this last function called Lagrangian? Is it just a coincidence? Is there a link between our first two definitions of Lagrangian and this last third definition? Is the Lagrangian in the context of Lagrangian mechanics in some way the same thing as the Lagrangian in the context of the Lagrange multipliers? OP's question is a quite broad topic, which is better studied in textbooks, such as Goldstein's Classical Mechanics, but let's give a few pointers: OP's definition (1) of a Lagrangian as $L=T-U$ is not the most general, cf. e.g. this & this Phys.SE posts. Although for huge classes of theories, it is actually true, cf. e.g. this Phys.SE post.
{ "domain": "physics.stackexchange", "id": 77123, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, lagrangian-formalism, definition, variational-principle, constrained-dynamics", "url": null }
geology, geophysics, earth-observation, gravity Title: Does gravity increase the closer to the core you get? Or does the mantle and crust above you counteract the increase at one point and it actually decreases? The below figure, taken from Wikipedia shows a model of the free fall acceleration, i.e., 'gravity'. The left-most point corresponds to the center of the Earth; then further right at $6.3\cdot1000$ km you are at the Earth's surface; and then further out you move into space. You can follow the blue line for PREM to get an idea of the average (expected) gravity. As you see, the gravity actually increases slightly within the Earth (reaching a maximum at the core-mantle boundary), but tapers down within the core.
{ "domain": "earthscience.stackexchange", "id": 1978, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geology, geophysics, earth-observation, gravity", "url": null }
### Show Tags 08 Jul 2010, 06:02 2 8 The easiest way for you to solve this problem would be to plug in a number and see what happens. Let's say $$x = -1$$ $$\sqrt{-x|x|}=\sqrt{-(-1)|-1|}=\sqrt{(1)(1)}=1 = -(-1)$$ ##### General Discussion Intern Joined: 02 Aug 2009 Posts: 1 Re: If x<0, then (-x*|x|)^(1/2) is:  [#permalink] ### Show Tags 02 Aug 2009, 18:14 It is actually A. suppose x is -2 then you have sqrt(2*2) = sqrt(4) = 2 = -x note that x < 0 as otherwise the function does not exist. Math Expert Joined: 02 Sep 2009 Posts: 58335 Re: If x<0, then (-x*|x|)^(1/2) is:  [#permalink] ### Show Tags 06 May 2010, 13:12 10 15 LM wrote: If x<0, then $$\sqrt{-x|x|}$$ is: A. -x B. -1 C. 1 D. x E. $$\sqrt{x}$$ Given: $$x<0$$ Question: $$y=\sqrt{-x*|x|}$$? Remember: $$\sqrt{x^2}=|x|$$. As $$x<0$$, then $$|x|=-x$$ --> $$\sqrt{-x*|x|}=\sqrt{(-x)*(-x)}=\sqrt{x^2}=|x|=-x$$. _________________ Intern Joined: 08 Apr 2010 Posts: 18 Re: If x<0, then (-x*|x|)^(1/2) is:  [#permalink]
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8333245973817158, "lm_q2_score": 0.8333245973817158, "openwebmath_perplexity": 2737.8130675378316, "openwebmath_score": 0.9128187298774719, "tags": null, "url": "https://gmatclub.com/forum/if-x-0-then-x-x-1-2-is-81600.html" }
cosmology, cosmological-inflation I don't take this at face value because we should expect more distant objects to have higher observed speeds and therefore higher observed red-shifts. Here's why. Let's start with a model where the Universe expanded very fast early on, but has been slowing down ever since due to gravity, as one would normally expect. Remember that, the farther away a cosmic object is, the farther back in the past we are observing it. An object 1,000 light years away, if it's light is reaching us now, is being observed in its state that existed 1,000 years ago. We are effectively looking through a time machine. So if we observe a more distant object, we're observing an older state of that object. Therefore, we are observing it at a time when the Universe was expanding faster than it is now, so it has higher red-shifts.
{ "domain": "astronomy.stackexchange", "id": 4892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, cosmological-inflation", "url": null }
clojure For instance, => (map #(submap? {1 2} %) [{} {1 1} {1 2}]) (false false true) So far, so good. Let's use submap? to define function clean that takes a blacklist and a sequence of maps as arguments, excluding any supermaps of any map in the blacklist from the sequence: (defn clean [blacklist ms] (filter (fn [m] (not-any? #(submap? % m) blacklist)) ms)) For example, => (clean blacklist my-list) ({:a 1, :b 5, :c 6} {:a 7, :b 8, :c 12}) submap? could be careful about absent keys. If you have nil values, you need to fix this.
{ "domain": "codereview.stackexchange", "id": 37384, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "clojure", "url": null }
You can click directly on one of these commands to enter it into the cell. Now instead of adding parentheses to the command, place a single question mark (?) on the end and hit the TABkey again. You should get some nicely formatted documentation, along with example uses. (Try A.rref?below for a good example of this.) You can replace the single question mark by two question marks, and as Sage is an open source program you can see the actual computer instructions for the method, which at first includes all the documentation again. Note that now the documentation is enclosed in a pair of triple quotation marks (""", """) as part of the source code, and is not specially formatted. (Notice that the use of TABwill not work as advertised with the Sage Cell server.)
{ "domain": "runestone.academy", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9932024696568574, "lm_q1q2_score": 0.8025743567400992, "lm_q2_score": 0.8080672181749422, "openwebmath_perplexity": 197.62058196810432, "openwebmath_score": 0.996325671672821, "tags": null, "url": "https://runestone.academy/ns/books/published/fcla/section-HSE.html" }
rviz, joint-state-publisher, robot-state-publisher Title: How to visualize a real robot in Rviz How do you run Rviz so that it shows the joint positions of a real robot in real-time? I've written a URDF file descibing a simple 2-wheeled cylindrical robot with a pan/tilt head, and I can visualize it in Rviz perfectly by running the launch file: <launch> <arg name="model" default="$(find myrobot_description)/urdf/myrobot.urdf.xacro"/> <arg name="gui" default="true" /> <arg name="rvizconfig" default="$(find myrobot_description)/rviz/urdf.rviz" /> <param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" /> <param name="use_gui" value="$(arg gui)"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" /> <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" /> <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" /> </launch>
{ "domain": "robotics.stackexchange", "id": 25791, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, joint-state-publisher, robot-state-publisher", "url": null }
polynomial-time, lattice [3] Ajtai, Miklós; Kumar, Ravi; Sivakumar, D., A sieve algorithm for the shortest lattice vector problem, Proceedings of the thirty-third annual ACM symposium on theory of computing, STOC 2001. Hersonissos, Crete, Greece, July 6--8, 2001. New York, NY: ACM Press (ISBN 1-581-13349-9). 601-610 (2001). ZBL1323.68561. [4] Lyubashevsky, Vadim; Micciancio, Daniele, On bounded distance decoding, unique shortest vectors, and the minimum distance problem, Halevi, Shai (ed.), Advances in cryptology -- CRYPTO 2009. 29th annual international cryptology conference, Santa Barbara, CA, USA, August 16--20, 2009. Proceedings. Berlin: Springer (ISBN 978-3-642-03355-1/pbk). Lecture Notes in Computer Science 5677, 577-594 (2009). ZBL1252.94084. [5] http://www.noahsd.com/mini_lattices/05__babai.pdf .
{ "domain": "cstheory.stackexchange", "id": 4530, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "polynomial-time, lattice", "url": null }
- I suggest you change to "otherwise $q$ would have to be even: $q \equiv 2$ or $14 \pmod{24}$, or $q \equiv 8$ or $20\pmod{24}$ respectively." I would approach it from the other direction, checking candidates for $q$, because multiplication is safer than division in modular atithmetic. There are $12$ odd congruency classes $\pmod{24}$. The four classes $3, 9, 15, 21$ can be discarded as candidates for $q$ because of divisibility by $3$ (apart from the number $3$ itself). Any odd number $\equiv 1 \pmod{6}$ may also be safely discarded, because if $q\equiv 1 \pmod{6}$, then $p = 2q + 1 \equiv 3\pmod 6$. So we discard the four classes $1, 7, 13, 19$ as candidates for $q$. Thus we're left with four candidates for $q$: $5, 11, 17, 23$. In each case $2q + 1 \equiv 11$ or $23\pmod{24}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985496416900847, "lm_q1q2_score": 0.8034086949855685, "lm_q2_score": 0.8152324871074608, "openwebmath_perplexity": 156.73749014720698, "openwebmath_score": 0.9260779619216919, "tags": null, "url": "http://math.stackexchange.com/questions/718097/safe-prime-mod-24" }
ros, ros-melodic, catkin, build, cmake catkin_ws/src/my_package │ ... ├── venv ... Personally I would not place a Python venv inside the src space of a Catkin workspace, but you may have good reason to do so. You may want to look at tools such as catkin_virtualenv to manage this instead. Edit: and I just noticed this: catkin_ws/src/my_package │ ├── cmake-build-debug .. What is cmake-build-debug? Are you doing in-source builds with cmake directly? I would expect build artefacts to only exist in the build space of your Catkin workspace. Originally posted by gvdhoorn with karma: 86574 on 2020-11-03 This answer was ACCEPTED on the original site Post score: 7
{ "domain": "robotics.stackexchange", "id": 35703, "lm_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-melodic, catkin, build, cmake", "url": null }
ros, turtlebot, turtlebot-bringup Does anyone know how can I fix these errors? Thanks in advance, Lucas Originally posted by lucascoelho on ROS Answers with karma: 497 on 2011-09-02 Post score: 0 On your robot you should install ros-diamondback-turtlebot-robot. Currently the TurtleBot software is only stable on ROS diamondback. On your workstation computer you should install ros-diamondback-turtlebot-desktop If you have import errors similar to what is listed above then you are most likely missing rosdeps try: rosdep install turtlebot Originally posted by mmwise with karma: 8372 on 2011-09-02 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 6593, "lm_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, turtlebot, turtlebot-bringup", "url": null }
automata, finite-automata, nondeterminism Of course, if your convention of NFA allows only one starting state, only the second transformation can be applied, unless $I = \{q_0\}$ and $\mathcal{E}(q_0) = \{q_0\}$. Here are some example of conversions. Despite being different, all those NFA's recognize the language $a^*b^*c^*$. The idea for converting $\varepsilon$-NFA directly to DFA is exactly the same: you either apply $\varepsilon$-closure after transitions, but start from a bigger set of states, or apply before transitions and modify final states. In the previous example, the backward closure is already a DFA (but it is not always the case).
{ "domain": "cs.stackexchange", "id": 20748, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata, finite-automata, nondeterminism", "url": null }
distances, velocity, doppler-effect There is no direct way from a spectrum to separate these two components - they have the same qualitative result. In principle, the expansion of the universe (or a change in the peculiar velocity) could be directly measured by looking for a change in redshift with time, which would depend on the cosmological parameters. This is an extremely small effect and is confused by the peculiar motions of individual galaxies. Nevertheless, measuring this redshift drift is one of the prime goals of the Codex Instrument on the E-ELT (see Pasquini et al. 2010, http://esoads.eso.org/abs/2010Msngr.140...20P ) using Lyman alpha absorption systems towards distant quasars. This experiment is also planned for the Square Kilometre Array, using the 21cm line (Kloeckner et al. 2015 http://arxiv.org/abs/1501.03822 ). In both cases, to overcome the experimental uncertainties (eg at 21 cm, it amounts to line drifts of 0.1 Hz over a decade), then observations of millions of galaxies must be combined.
{ "domain": "astronomy.stackexchange", "id": 1480, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "distances, velocity, doppler-effect", "url": null }
ros Originally posted by Joe28965 with karma: 1124 on 2022-05-09 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 37646, "lm_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 }
atomic-structure Title: Difference between probability and probability density of finding a particle in space What is the difference between probability and probability density of finding a particle in space? I am at basics of the wave function and this thing confused me. Probability = $[\psi(x, y,z)]^2(\mathrm{d}x,\mathrm{d}y,\mathrm{d}z)$ Probability density at point $(x,y,z)$ in space = $[\psi(x, y,z)]^2$. The latter one is the probability of finding particle in an infinitesimally small volume element $\mathrm{d}V=\mathrm{d}x, \mathrm{d}y, \mathrm{d}z$ situated at $(x,y,z)$. Then what's the former one? The latter is the limit of probability per volume, as volume approaches zero, at a particular point in space.
{ "domain": "chemistry.stackexchange", "id": 9923, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "atomic-structure", "url": null }