text
stringlengths
1
1.11k
source
dict
Transform (FFT). Fast Fourier Transform (FFT) and Discrete Fourier Transform (DFT) algorithms can be a challenge if you don't work with them every day. Anyone can help me by calculating the Fourier Transform of this formula?. Lecture 7 -The Discrete Fourier Transform 7. The name “Fourier-transform expansion” is probably the most sensible one. Fhe Hilbert transform of the field data, which is alwaysdiscrete is computed by making use of the discrete Fourier transform (DFT) and the discrete Hilbert transform (DHT). Since Matlab is a numerical solver it requires that input to Matlab be completely numerical (not algebraic). S The binomial model provides many insights:. A periodic function is broken down and expressed in terms of sine and cosine terms. Fourier series is a way to represent a wave-like function as a combination of simple sine waves. The simpler the signal (e. Y = fft(X) returns the discrete Fourier transform (DFT) of vector X, computed with a fast Fourier transform (FFT)
{ "domain": "vicommunication.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464443071381, "lm_q1q2_score": 0.8153871933099816, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 567.2721390969662, "openwebmath_score": 0.7845139503479004, "tags": null, "url": "http://ccwn.vicommunication.it/fourier-transform-calculator-matlab.html" }
useful for determining the Fourier coefficients fan,bnggiven a function f(x) defined on [ L, L]. The first is an interesting result about the sum of a Fourier cosine series with non-negative. In this particular case it's just a sum of cosines, as f (x) is an even function: Of course, the finite series can only approach f (x), but it is straightforward to plot in MATLAB. To be more specific, it breakdowns any periodic signal or function into the sum of functions such as sines and cosines. We can express the Fourier Series in different ways for convenience, depending on the situation. If I know the fourier series expansion of a function f(x) upto Nth harmonic, then is it possible to express the fourier series coefficients of (f(x))^m as functions of fourier series coefficients. Fourier Series Formula. Create AccountorSign In. 2) where in the latter expression the discrete frequencies and times!k D2ˇk=T and tj Dj1are introduced. If you had to remember two formulas from the last post let
{ "domain": "ilcampanileborgo.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9940889313188784, "lm_q1q2_score": 0.8173291119369778, "lm_q2_score": 0.8221891283434876, "openwebmath_perplexity": 395.5653213813762, "openwebmath_score": 0.9252848029136658, "tags": null, "url": "http://ilcampanileborgo.it/mbyu/fourier-series-formula.html" }
magnetic-fields, induction, electromagnetic-induction If, on the other hand the multimeter is soldered to the rod with two other rods so that they form a static hoop, then you will not see any voltage since, in that case, you'd have $$\mathop{\oint}_{C^{'}}\nabla\times\vec{B}\cdot\mathrm{d}\vec{l}=const$$ and the rate of change of that quantity wrt time is zero. Now, when you talk of a Lorentz force, then $\vec{F}=q\left(\vec{v}\times\vec{B}\right)$ and you see the perpendicularity of the velocity and the magnetic field hence creating a force on the electrons which sift towards a given side. This creates a charge seggregation and hence a potential difference on the ends of the rod.
{ "domain": "physics.stackexchange", "id": 43085, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetic-fields, induction, electromagnetic-induction", "url": null }
space-telescope, gravitational-lensing Title: Is it plausible to use other stars for the proposed FOCAL mission instead of the Sun? For some time, the far-reaching and speculative idea of using the Sun as a gravitational lens has been floating around. See this and this. This would require sending a spacecraft about ~550 AU of a distance away from Earth, so the idea is not currently realistic. But I am wondering, is there any plausibility to using other stars (like the Alpha Centauri stars)? Is there there enough parallax for this to be useful? How far away must a satellite go to be able to manipulate parallax to its advantage? Are there any shortcomings to this idea that make the FOCAL proposition superior? And of course, are there any shortcomings to both propositions? I can imagine there's not much freedom in where the so-called lens can be used, but maybe the limited field of view can still be useful if the satellite could roam the solar system?
{ "domain": "astronomy.stackexchange", "id": 4263, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "space-telescope, gravitational-lensing", "url": null }
# Simple Set Theory Question I'm starting to learn Set Theory and I'm stuck on a question: Show that the relations $$(A \cup C)\subset(A\cup B), (A\cap C) \subset (A\cap B)$$ when combined, imply $C\subset B$. If it's in anyone's interest, this is from the online textbook "Basic Concepts of Mathematics" by Elias Zakon. I'm afraid I've no idea where to start. Any help would be much appreciated. - Suppose $c$ is in $C$. We want to show that $c$ is in $B$. Certainly $C$ is in $A \cup C$, and so by your first assumption, $c$ is in $A \cup B$. That is, either $c$ is in $A$ or $c$ is in $B$. In the latter case we are done. In the former case, $c$ is in $C$ and in $A$ and so $c$ is in $A \cap C$, and so by your second assumption, $c$ is in $A \cap B$ and hence in $B$. Thus in all cases, if $c$ is in $C$, then $c$ is in $B$, and so we have shown $C \subset B$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995713428385, "lm_q1q2_score": 0.8247939584492966, "lm_q2_score": 0.8539127492339909, "openwebmath_perplexity": 453.7163592064431, "openwebmath_score": 0.7153640985488892, "tags": null, "url": "http://math.stackexchange.com/questions/151245/simple-set-theory-question/151247" }
c++, design-patterns Communication (); template < typename Iterator > void send( Iterator first, Iterator last ) const { // send from first to last to } template< typename Iterator > std::vector< char > read( Iterator first, Iterator last ) const { // read from first to last to } private: // internal stuff }; /** Validate an input packet and get the body */ class ReaderAndValidator { public: ReaderAndValidator ( const Communication& comm ) : mComm( comm ) { } std::vector< char > read() { // read data return mComm.read( /* params */ ); } private: const Communication& mComm; } /** Given the PacketOut obtain the corrisponding PacketIn. */ template < typename PacketOut > class Dispatcher { Dispatcher() { static_assert( false, "unable to instantiate Controller" ); } };
{ "domain": "codereview.stackexchange", "id": 3962, "lm_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++, design-patterns", "url": null }
powershell Before someone says anything about it, I have to tell you why I did not use a switch type for -Recurse and -Force parameters, and it is because the function is feed from .csv file with data, and I did not find a elegant way to pass string value to a switch parameter. I have found a way to use pass string values to switch parameters to Remove-Files function so I have refactored the function ho have two switch parameters. The new version function Remove-Files { [CmdletBinding(SupportsShouldProcess = $true)] [OutputType([PSCustomObject])] param ( [Parameter(Mandatory = $true, Position = 0, ParameterSetName = "FolderPath", ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, HelpMessage = "Full folder path in which file/files are to be deleted")] [string] $FolderPath,
{ "domain": "codereview.stackexchange", "id": 39733, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "powershell", "url": null }
beginner, html, css, layout So the main takeaway is twofold: simplicity and structure. Structure wise, you should separate things out. Keep your styling very clearly away from your structure, so your page makes sense without styling. Then use styling to enhance your page. I hope this helps, ping me any questions if something is unclear.
{ "domain": "codereview.stackexchange", "id": 21168, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, html, css, layout", "url": null }
general-relativity, spacetime, momentum, metric-tensor, stress-energy-momentum-tensor Wikipedia page does reference the linear frame-dragging effects. Consider the following situation: test particle is initially at rest and a mass $M$ (let's call it a star) flies by it. In the reference frame of the particle, gravitational field of a star has both gravitoelectric and gravitomagnetic components. The particle would accelerate toward the star and after gaining velocity component toward it would interact with the gravitomagnetic field of the star (via analog of Lorentz force) gaining velocity component parallel to the velocity of a star. This effect could be described as “entraining”. Also, if the test body is equipped with a gyroscope, it would “wobble” during the star's flyby, analogously to the Lense–Thirring precession. Keep in mind however, that too literal, mechanistic interpretation of this frame–dragging via some kind “ether” could be unsatisfactory (see Rindler, 97).
{ "domain": "physics.stackexchange", "id": 88058, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, spacetime, momentum, metric-tensor, stress-energy-momentum-tensor", "url": null }
c++, pcl, ros-indigo make[2]: *** [/home/baxterpc/ros_ws/devel/lib/test_package/sphere_detector_test] Error 1 make[1]: *** [test_package/CMakeFiles/sphere_detector_test.dir/all] Error 2 make: *** [all] Error 2 Invoking "make -j8 -l8" failed
{ "domain": "robotics.stackexchange", "id": 30029, "lm_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++, pcl, ros-indigo", "url": null }
The problematic aspect of this question is that the $$\Delta X_i$$ are not independent: for instance, $$\Delta X_1 = X_2-X_1$$ and $$\Delta X_2 = X_3 - X_2$$ involve the same roll $$X_2.$$ However, this isn't really a difficulty. Since statistical expectation is additive and all differences have the same distribution, if we pick any possible value $$k$$ of the differences, the expected number of times the difference equals $$k$$ in the entire sequence of $$n$$ rolls is just $$n-1$$ times the expected number of times the difference equals $$k$$ in a single step of the process. That single-step expectation is $$\Pr(\Delta X_i = k)$$ (for any $$i$$). These expectations will be the same for all $$k$$ (that is, uniform) if and only if they are the same for a single $$\Delta X_i.$$ But we have seen that no $$\Delta X_i$$ has a uniform distribution, even when the die might be biased. Thus, even in this weaker sense of expected frequencies, the differences of the rolls are not uniform.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9553191309994467, "lm_q1q2_score": 0.8194422789214453, "lm_q2_score": 0.8577681031721325, "openwebmath_perplexity": 272.6822410066029, "openwebmath_score": 0.7277336120605469, "tags": null, "url": "https://stats.stackexchange.com/questions/421676/are-differences-between-uniformly-distributed-numbers-uniformly-distributed" }
python, performance, c, primes for i in range(10000): rabin_miller(i) C #include <stdio.h> #include <stdlib.h> #include <time.h> long mod_pow(long b, long e, long m){ if(m == 1) return 0; long c = 1; for(long i = 0; i < e; i++) c = (c * b) % m; return c; } int rabin_miller(long n){ if(n == 2 || n == 3) return 1; if(n < 2 || n % 2 == 0) return 0; long s = 0, d = n - 1, k = 10, a, x, stop; while(d % 2 == 0) s += 1, d >>= 1; srand(time(NULL)); for(long i = 0; i < k; i++){ a = (long) (((float) rand() / RAND_MAX) * (n - 3)) + 2; x = mod_pow(a, d, n); if(x == 1 || x == n - 1) continue; stop = 1; for(long r = 0; r < s - 1; r++){ x = mod_pow(x, 2, n); if(x == 1) return 0; if(x == n - 1){ stop = 0; break; } } if(stop){ return 0; } } return 1; }
{ "domain": "codereview.stackexchange", "id": 27656, "lm_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, c, primes", "url": null }
quantum-field-theory, fermions, pauli-exclusion-principle, spin-statistics, identical-particles Are antisymmetric wavefunctions simply classified as fermions, in the way half-integer spin particles were? I don't see how this could be the case, as, if spin and symmetry were independent, half-integer spin particles with symmetric wavefunctions (and antisymmetric integer spin particles) would be possible. You can find the right statistics using QFT. In QFT you can write down the fields for spin-$0$ and spin-$\frac{1}{2}$, then you can show that fermions have to be antisymmetric otherwise there will be an infinity number of negative energy states (if they are finite you can always shift your definition of ground state with the lower state). In this sense you can find a proof in Peskin and Schroder - QFT page 52-58. Another way is to require the propagators to be Lorentz invariant. You can find more details in Schwartz - QFT and SM chapter 12.4.
{ "domain": "physics.stackexchange", "id": 24864, "lm_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, fermions, pauli-exclusion-principle, spin-statistics, identical-particles", "url": null }
homework-and-exercises, electric-circuits, electrical-resistance, batteries Also I measured the resistance across the piano and it turned out to be about $170\,\rm{k\Omega}$, so isn't a resistor of $5.6\,\rm{k\Omega}$ excessively large? This just seems wrong. I need to know why. The calculation is correct, it's a voltage divider. (R+r)/r = 12/9, supposing that it's 17k and 5.6k. But the piano may have a varying resistance, for example if more tones are played simultaneously. Also the acoustic energy depends on the frequency. And the car's alternator has a variable output up to ca. 14.4 Volt. So it's better to take a LM7809 voltage regulator and 2 capacitors to ensure always the same sound /frequency - otherwise it might become some kind of torture equipment for the listeners. Another point is the measurement of the piano's resistance. If done with a multimeter in the resistance position, the value is of no use, since the measurement voltage may be much lower than the 9 Volt. A far better solution would be to measure the current of the piano if fed with 9 Volt
{ "domain": "physics.stackexchange", "id": 44494, "lm_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, electric-circuits, electrical-resistance, batteries", "url": null }
machine-learning, linear-regression, unsupervised-learning, supervised-learning Title: How can Clustering (Unsupervised Learning) be used to improve the accuracy of Linear Regression model (Supervised Learning) I came through this questions and I failed to find the right answer for it. How can Clustering (Unsupervised Learning) be used to improve the accuracy of Linear Regression model (Supervised Learning)? a- Creating different models for different cluster groups. b- Creating an input feature for cluster ids as an ordinal variable. c- Creating an input feature for cluster centroids as a continuous variable. d- Creating an input feature for cluster size as a continuous variable. Just an idea: You may be able to cluster a continuous variable and add the clusters as indicator in a linear regression jointly with an interaction term. Say your linear model is income (inc) explained by years of job experience (exp)... inc = b0 + b1*exp + u.
{ "domain": "datascience.stackexchange", "id": 5507, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, linear-regression, unsupervised-learning, supervised-learning", "url": null }
rosout, rosmake, mavericks, macosx, homebrew [rosmake-0] Finished <<< genmsg ROS_NOBUILD in package genmsg No Makefile in package genmsg [rosmake-5] Starting >>> rospack [ make ] [rosmake-0] Starting >>> genlisp [ make ] [rosmake-6] Starting >>> gencpp [ make ] [rosmake-4] Finished <<< rostime ROS_NOBUILD in package rostime No Makefile in package rostime [rosmake-1] Starting >>> roslang [ make ] [rosmake-3] Starting >>> xmlrpcpp [ make ] [rosmake-7] Starting >>> genpy [ make ] [rosmake-4] Starting >>> roscpp_traits [ make ] [rosmake-5] Finished <<< rospack ROS_NOBUILD in package rospack No Makefile in package rospack [rosmake-0] Finished <<< genlisp ROS_NOBUILD in package genlisp No Makefile in package genlisp [rosmake-5] Starting >>> roslib [ make ] [rosmake-3] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp No Makefile in package xmlrpcpp [rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang No Makefile in package roslang [rosmake-6] Finished <<< gencpp ROS_NOBUILD in package gencpp
{ "domain": "robotics.stackexchange", "id": 20047, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosout, rosmake, mavericks, macosx, homebrew", "url": null }
$120\cdot 3 \cdot18^4 < \frac{120\cdot18^5}7$ $3 < \frac{18}7$ which is clearly absurd, thus $\sin(40^\circ) < \sqrt{\frac37}$. - 5 years, 5 months ago Just a query, how will you show that the remaining terms in the Maclaurin series are negative? The terms after $\ldots$ - 5 years, 5 months ago I did'nt say that it's negative, but sum of every two consecutive terms are positive. - 5 years, 5 months ago Then how did you say that $\sin(x) \leq x - \frac{x^3}6$, or am I missing something? - 5 years, 5 months ago Whooops. I forgot to add in one more term. Silly me. Let me fix that. - 5 years, 5 months ago I get that sum of every two consecutive terms must be positive. I think I got confused due to the typo. It should be $\sin x \geq x - \frac {x^3}{6}$ - 5 years, 5 months ago Oh. I fixed one small typo. This is what I get for not proofreading my solution. Thanks for correcting me. By the way, do you have a solution of your own? I do not like my solution.
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9653811611608242, "lm_q1q2_score": 0.8065600691569393, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 2076.9182437635477, "openwebmath_score": 0.9963759183883667, "tags": null, "url": "https://brilliant.org/discussions/thread/trigonometric-values/" }
c++, datetime inline bool operator==(const TimeOnly& lhs, const TimeOnly& rhs) { /* do actual comparison */ return lhs.GetTotalSeconds() == rhs.GetTotalSeconds(); } inline bool operator!=(const TimeOnly& lhs, const TimeOnly& rhs){ return !operator==(lhs, rhs); } inline bool operator<(const TimeOnly& lhs, const TimeOnly& rhs) { /* do actual comparison */ return lhs.GetTotalSeconds() < rhs.GetTotalSeconds(); } inline bool operator>(const TimeOnly& lhs, const TimeOnly& rhs){ return operator<(rhs, lhs); } inline bool operator<=(const TimeOnly& lhs, const TimeOnly& rhs){ return !operator>(lhs, rhs); } inline bool operator>=(const TimeOnly& lhs, const TimeOnly& rhs){ return !operator<(lhs, rhs); } TimeOnly.cpp #include "TimeOnly.h" #include <stdexcept> #include <ctime> TimeOnly::TimeOnly(int seconds) { Init(seconds); }
{ "domain": "codereview.stackexchange", "id": 1653, "lm_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++, datetime", "url": null }
medicinal-chemistry Bismuth is a heavy metal that has a relatively low toxicity in comparison to barium. Yes but this is for the soluble metal ion. Barium sulfate is inert under most conditions, importantly the acidic ones in the digestive tract. Because the sulfate binds the barium ions to the solid and thus barium cannot enter the blood stream to cause a physiological response. Contrast this to Bismuth (no pun intended) which is non-toxic but typically soluble in acid and if not soluble, the bismuth is at least leachable. Now typically bismuth ions are not an issue as they will harmlessly be excreted, but there is a potential it could interact with a patient or the drugs of a patient in a negative or uncontrolled way. Since doctors don't like to introduce variables when making diagnosis's nor do the like surprises, especially when it's caused by them, the fully inert barium sulfate is the favorite for radio contrast.
{ "domain": "chemistry.stackexchange", "id": 11641, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "medicinal-chemistry", "url": null }
electromagnetic-radiation, radiation, power, distance Would this change in any way if the bulb is not a point source but has a filament of say, 1 cm length (assuming "distance" as the distance from the closest part of the filament)? The quoted document refers to medical radiation dose, in terms of intensity of radiation absorbed by tissue. In your case, the Sun's radiation is taken at the Earth's surface. Since intensity is inversely proportional to square of distance from source, it will be actually $0.01\%$ of the Sun's radiation intensity in the ultraviolet region at the Earth's surface as you are standing $100$ times further away from the source (so the intensity becomes ${1/10^{4}}^{th}$ of that at $1 cm$ from the source).
{ "domain": "physics.stackexchange", "id": 25873, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetic-radiation, radiation, power, distance", "url": null }
teleportation Probably I am misunderstanding the purpose of quantum teleportation or missing something big. Thanks for any help. Here's Quirk's example circuit for quantum teleportation. It has some helpful visuals to show how the state from the top qubit gets perfectly transferred to the bottom qubit regardless of the input state. You can play around with e.g. removing the controlled X gate at the end to see how different parts of the circuit make different things happen.
{ "domain": "quantumcomputing.stackexchange", "id": 4023, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "teleportation", "url": null }
What is the minimum of $s:=x+y+z+u+v$ subject to $x<y<z<u<v$ and $\frac1x+\frac1y+\frac1z+\frac1u+\frac1v=1$? From $\frac12+\frac14+\frac17+\frac1{14}+\frac1{28}=1$, we know thst $s\le 55$. Hence this is a finite problem. A quick brute force check of all possibilities with $x+y+z+u+v<55$ reveals that $$\tag{38} \frac13+\frac14+\frac15+\frac16+\frac1{20}=1$$ with $s=38$ is the optimum. The next solutions with small sums are: $$\tag{43} \frac12+\frac14+\frac1{10}+\frac1{12}+\frac1{15}=1$$ $$\tag{45} \frac12+\frac14+\frac1{9}+\frac1{12}+\frac1{18}= \frac12+\frac15+\frac1{6}+\frac1{12}+\frac1{20}=1$$ $$\tag{50} \frac12+\frac14+\frac1{8}+\frac1{12}+\frac1{24}=1$$ If you want to find the minimum $v+w+x+y+z$ subject to $\dfrac1{v}+\dfrac1{w}+\dfrac1{x}+\dfrac1{y}+\dfrac1{z}=1$, here is one way.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9893474866475718, "lm_q1q2_score": 0.8134307541413573, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 317.3024984650148, "openwebmath_score": 0.7719083428382874, "tags": null, "url": "https://math.stackexchange.com/questions/371662/reciprocal-sum-equal-to-1/371670" }
So $\lim_{n\to \infty} \frac {\sum_{i=0}^n c_i}n \ge \lim_{n\to \infty}\frac {K-N\epsilon}n + \epsilon = \epsilon > 0$. That's a contradiction so there are infinitely many $c_n < \epsilon. ..... And that mean there are infinitely many$a_k + b_k < \epsilon$and as each$a_k, b_k$is positive$a_k < a_k +b_k < \epsilon$and$b_k < a_k + b_k < \epsilon\$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713839878681, "lm_q1q2_score": 0.8210508814126248, "lm_q2_score": 0.8333245994514082, "openwebmath_perplexity": 114.32610560079955, "openwebmath_score": 0.9819243550300598, "tags": null, "url": "https://math.stackexchange.com/questions/2828167/two-sequences-which-have-an-average-tend-to-zero" }
ds.algorithms, graph-theory, approximation-algorithms [Caveat: The current post doesn't specify the objective-function value if one or both of the clusters contains no edges. I assume that the objective-function value only sums the maximum-weight edges within clusters that do contain edges. (If, say, the graph is bipartite then the optimal value is zero.)] Proof. Here's the algorithm:
{ "domain": "cstheory.stackexchange", "id": 5284, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ds.algorithms, graph-theory, approximation-algorithms", "url": null }
I know how to handle the problem in the 1D case. Here except for the first and last rows, the matrix is tridiagonal, with its diagonal entries being $2$ and its superdiagonal and subdiagonal entries being $-1$. (Here I am using the positive semidefinite convention for the Laplacian, as usual in graph theory but reversed from the usual for PDE). Additionally there is a $-1$ in the top right and bottom left corners. This means that we have the circulant matrix corresponding to the vector $(2,-1,0,0,\dots,-1)$, where there are $n-3$ zeros. In this case as for any circulant matrix, the eigenvectors are the columns of the discrete Fourier transform and the eigenvalues can be read off by substitution.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109538667758, "lm_q1q2_score": 0.8484522640718903, "lm_q2_score": 0.8615382076534743, "openwebmath_perplexity": 115.5002852358433, "openwebmath_score": 0.9962352514266968, "tags": null, "url": "https://math.stackexchange.com/questions/1829043/eigenvalues-of-periodic-lattice-laplacian/1829228" }
general-relativity, black-holes, metric-tensor If it is not possible, however is there a method to find the velocity of a particle near two Schwarzschild black holes if sufficient data are known? The Schwarzschild solution doesn't apply to a spacetime with two black holes, but numerical methods have been derived to find the metric tensor in a spacetime with two black holes. From the metric tensor, the motion of test particles can, in principle, be calculated. Beyond this, Cartensian coordinates will almost certainly not be definable in such a spacetime for an area larger than a neighborhood around a point.
{ "domain": "physics.stackexchange", "id": 86422, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, black-holes, metric-tensor", "url": null }
javascript, game, array if (posY !== -1) { index[0] = posX; index[1] = posY; outputA = index[0]; outputB = index[1]; return true; } return false; }); return index; }
{ "domain": "codereview.stackexchange", "id": 9672, "lm_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, game, array", "url": null }
ros2, ros-humble, joint-state-publisher, joint-states Title: How do you send positions in joint_states topic if there's already default positions being published? By default joint_state_publisher publishes a message with all joints and default positions to the joint_states topic. What is the proper way of doing this? How do you take the preexisting message in joint_states and modify it to publish your own positions? This code below is in a loop, publishing positions to joint_states but because there are 2 messages for the same joint, the joint wants to be in 2 different positions simultaneously. sensor_msgs::msg::JointState joint_state_msg; joint_state_msg.header.stamp = this->get_clock()->now(); joint_state_msg.name.push_back("joint_name"); joint_state_msg.position.push_back(position); joint_state_publisher_->publish(joint_state_msg);
{ "domain": "robotics.stackexchange", "id": 38883, "lm_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, ros-humble, joint-state-publisher, joint-states", "url": null }
python, python-3.x, functional-programming, chess, n-queens Remove the semicolons :P This is Python, not Javascript or C++ or (insert another language). Though they are optional and are perfectly fine to put in, they can cause clutter and reduce readability. All functions and variables should be lower_case_with_underscores, classes as UpperCase, and constants as UPPER_CASE_WITH_UNDERSCORES. We'll replace them with the correct convention. Replace map and filter with generator expressions. They may be a bit slower, but it'll be more readable as it resembles normal Python syntax such as the for loop and the if statement. That recursive function at the bottom can be changed so that it doesn't need that lambda. It can make it look nicer without the hidden extra arguments.
{ "domain": "codereview.stackexchange", "id": 35607, "lm_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, functional-programming, chess, n-queens", "url": null }
malindenmoyer Okay I got (2), (thanks for the correction), by comparing (2) to $$\frac{\sqrt{n}}{n^2}=\frac{1}{n^\frac{3}{2}}$$ which converges (p-series w/ p>1), therefore (2) converges. Is this correct? As for (1) I wrote out the terms and discovered it is an alternating series with the even terms all equal to 0 as follows: 1-1/3+1/5-1/7+... I can't seem to write a series to satisfy the requirements however...any guidance would be appreciated. Homework Helper Okay I got (2), (thanks for the correction), by comparing (2) to $$\frac{\sqrt{n}}{n^2}=\frac{1}{n^\frac{3}{2}}$$ which converges (p-series w/ p>1), therefore (2) converges. Is this correct? As for (1) I wrote out the terms and discovered it is an alternating series with the even terms all equal to 0 as follows: 1-1/3+1/5-1/7+... I can't seem to write a series to satisfy the requirements however...any guidance would be appreciated.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.977022632097108, "lm_q1q2_score": 0.8098919722247834, "lm_q2_score": 0.8289388040954683, "openwebmath_perplexity": 357.15988122072287, "openwebmath_score": 0.9726477861404419, "tags": null, "url": "https://www.physicsforums.com/threads/series-convergence-divergence-questions.391048/" }
energy This is my claim. Total mechanical energy is defined as $$M=K+U$$ where $K=\frac{1}{2}mv^2$ and $U=mgh$. No matter which direction the object is moving $K$ must be positive due to the $v^2$. (I am assuming that mass is also never negative.) Potential energy is also positive because $g=9.8$ and height is a distance, which is also non-negative. And yet, the problems says that the answer is true, as in the total mechanical energy is allowed to be negative. What am I not seeing here ? As Kyle implies in the comments, mechanical energy is generally defined only up to a constant. Therefore, if you choose your constant as a large, negative number, you could have a total energy that is negative even with a very fast moving particle. Likewise, if you choose your potential energy to equal zero at, say, the top of a cliff, then anything you throw off the cliff will have negative potential energy once it falls below your feet.
{ "domain": "physics.stackexchange", "id": 10929, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy", "url": null }
\begin{align} &P(A) + P( B \cap A') \cup (C \cap A') \\&=P(A)+ P(B \cap A') + P(C \cap A') \color{blue}{- P(B \cap C \cap A')}\\ &=P(A)+P(B)-P(B \cap A) + P(C)-P(C \cap A) -(P(B\cap C)-P(A \cap B \cap C)) \end{align} • $P((B \cap C) \cap A') + P((B \cap C) \cap A) = P(B \cap C)$ – Siong Thye Goh Sep 24 '18 at 1:46 • If you let $D = B \cap C$, we get $P(D \cap A') +P(D \cap A) = P(D)$. That should be a plus. – Siong Thye Goh Sep 24 '18 at 1:50 Use the "change of variables" $$B\cup C=D$$ and everything follows.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.965899577232538, "lm_q1q2_score": 0.8006716404274585, "lm_q2_score": 0.8289388040954683, "openwebmath_perplexity": 263.20557689555784, "openwebmath_score": 1.0000014305114746, "tags": null, "url": "https://math.stackexchange.com/questions/2928423/proof-that-pa-cup-b-cup-c-pa-pb-pc-pa-cap-b-pb-cap-c?noredirect=1" }
ros, rqt-image-view Title: rqt_image_view Segmentation Fault Howdy folks I am using ROS Indigo on Ubuntu 14.04 LTS. Since recently when I want to start rqt_image_view, nothing is happening and then I get a segmentation fault. All other rqt gui plugins appear to work fine (like RVIZ, Bag, etc.). I un-installed and then re-installed ROS, but that didn't help. Does anyone have any ideas or suggestions? Thanks in advance Galto Originally posted by Galto2000 on ROS Answers with karma: 73 on 2016-07-07 Post score: 0 Fixed it: I found that OpenCV was the culprit. I am using OpenCV 2.4.11 and in CMAKE I had configured it with QT on. I now reconfigured it without QT, rebuilt and re-installed it and now rqt_image_view is working normally. Galto Originally posted by Galto2000 with karma: 73 on 2016-07-09 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 25177, "lm_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, rqt-image-view", "url": null }
turbulence Remind yourself that Monin-Obukhov length scale (L) is simply the ratio of shear production to buoyancy in TKE budget and is NOT tracer dependent. Now back to dimensional analysis. The group of variables are unique to our problem are : 1) z/z0 , 2) C/C* and 3) **z/L where C is mean concentration (C bar in previous equation). Similar to what we do for temperature and humidity. A ψc can be calculated by choosing the second and the third group as independent variables and we would arrive at your equation. Regarding the Gaussian plume, Remember that the equations you posted are only applicable near a boundary and only used to drive eddy diffusivity close to the wall layer e.g. wind tunnel, ocean, and earth. If I recall correctly Gausian plume model use different diffusivities compared to these and are more appropriate to interior of the flow.
{ "domain": "earthscience.stackexchange", "id": 1316, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turbulence", "url": null }
neural-networks, deep-neural-networks, explainable-ai, grad-cam $A^k$ the final feature maps $\alpha_k^c$ the average pooled partial derivatives of the output class scores $y^c$ with respect to the the final feature maps $A_k$. The second point is clear to me. The stronger the derivative, the more important the $k$th channel of the final feature maps is. The first point is not, because the implicit assumption is that non-zero activations have more significance than activations close to zero. I know it's tempting to take that as a given, but for me it's not so obvious. After all, neurons have biases, and a bias can arbitrarily shift the reference point, and hence what 0 means. We can easily transform two neurons [0, 1] to [1, 0] with a linear transformation. So why should it matter which regions of the final feature maps are strongly activated? EDIT To address a comment further down, this table explains why I'm thinking about magnitude rather than sign of the activations.
{ "domain": "ai.stackexchange", "id": 2458, "lm_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, deep-neural-networks, explainable-ai, grad-cam", "url": null }
many-body, quantum-chemistry Title: Why does Fock operator in Hartree-Fock method have the molecule symmetry? I am reading Szabo - 1967 - Modern Quantum Chemistry. In Chapter 3 P122, it mentions that the spin orbitals $\left|\chi_a\right\rangle$ obtained by the Fock operator $f\left|\chi_a\right\rangle=\varepsilon_a\left|\chi_a\right\rangle$ can have the symmetry of the molecule. (form a basis for an irreducible representation of the point group of the molecule) It confuses me a lot because it is not obvious. I guess it could be done by proving $[f,P_R]=0$ (R is any element of the molecular point group). However Fock operator is not a linear operator and has a really complicated form by $$f(1)=h(1)+\sum_b \int d \mathbf{x}_2 \chi_b^*(2) r_{12}^{-1}\left(1-\mathscr{P}_{12}\right) \chi_b(2)$$
{ "domain": "physics.stackexchange", "id": 94529, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "many-body, quantum-chemistry", "url": null }
ros2, webots package_name = 'my_package' data_files = [] data_files.append(('share/ament_index/resource_index/packages', ['resource/' + package_name])) data_files.append(('share/' + package_name + '/launch', ['launch/robot_launch.py'])) data_files.append(('share/' + package_name + '/worlds', ['worlds/my_world.wbt'])) data_files.append(('share/' + package_name + '/resource', ['resource/my_robot.urdf'])) data_files.append(('share/' + package_name, ['package.xml'])) setup( name=package_name, version='0.0.0', packages=[package_name], data_files=data_files, install_requires=['setuptools'], zip_safe=True, maintainer='user', maintainer_email='user.name@mail.com', description='TODO: Package description', license='TODO: License declaration', tests_require=['pytest'], entry_points={ 'console_scripts': [ 'my_robot_driver = my_package.my_robot_driver:main', 'obstacle_avoider = my_package.obstacle_avoider:main' ], },
{ "domain": "robotics.stackexchange", "id": 38598, "lm_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, webots", "url": null }
c++, beginner, vectors void update_list_v2(std::vector<element> v, std::vector<element> &g_list) { std::sort(v.begin(), v.end()); if (g_list.empty()) { std::for_each(v.begin(), v.end(), [](element &e){ e.update_max_bmi(); }); } else { auto curr{g_list.begin()}; for (auto &elem : v) { while (curr != g_list.end() && *curr < elem) { ++curr; } if (curr != g_list.end()) { if (*curr == elem) { curr->update_max_bmi(); elem.update_max_bmi(); if (curr->is_smaller_bmi_than(elem)) { std::cout << "max_bmi will be increased!\n" "old data:" << *curr << "new data:" << elem; } elem.update_max_bmi(*curr); } } } } std::swap(v, g_list); }
{ "domain": "codereview.stackexchange", "id": 32553, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, vectors", "url": null }
c, unicode, utf-8, c11 Let's say I'm reading a file or some socket line by line. I'd actually want to allocate just one buffer, and re-use it for each line (reallocating or doing partial reads if I get a very long line). Thus, I'd like for utf8_to_utf32 to write to a particular buffer that I give it. Much better than having many, many allocations and deallocations. Let's say I'm updating some user input. In most cases I'd already have a UTF-32 buffer where the old user input is stored, and I want to update it. Again, I'd like for utf8_to_utf32 to write to a particular buffer. I may wish to concatenate or append text. Again, writing to a particular buffer.
{ "domain": "codereview.stackexchange", "id": 34759, "lm_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, unicode, utf-8, c11", "url": null }
c#, performance, linq, comparative-review, iteration Title: Building XML elements from a list using LINQ and foreach I wrote the following code: var xmlArray = from m in (from row in data select row.Mitarbeiter).Distinct() select "<Value Type='Text'>" + m + "</Value>"; var xml = string.Join("",xmlArray); Then I noticed there are two iteration (two from) and also the Distinct() and I rewrote it using a foreach: var mitarbeiter = new List<string>(); var xmlArray = new List<string>(); foreach(var row in data) { if (!mitarbeiter.Contains(row.Mitarbeiter)){ mitarbeiter.Add(row.Mitarbeiter); xmlArray.Add("<Value Type='Text'>" + row.Mitarbeiter + "</Value>"); } } var xml = string.Join("",xmlArray);
{ "domain": "codereview.stackexchange", "id": 20201, "lm_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, linq, comparative-review, iteration", "url": null }
javascript, node.js, asynchronous var errors = []; var Workspace = mongoose.model("Workspace"); var User = mongoose.model("User"); User.findOne( { login: req.body.login}, function(err, docs){ // Log database error if it's there if(err){ next("Database error fetching user"); // TODO: add error handler } else { // If the user exists, add it to the error vector BUT keep going if(docs){ errors.push({ field:'login', message: 'Login name taken, sorry!' } ); } Workspace.findOne({ name: req.body.workspace }, function(err, docs){ if(err){ next("Database error fetching workspace"); } else { if(docs){ errors.push( {field: "workspace", message: "Workspace taken, sorry!"} ); } if(errors.length != 0){ serverResponse(res, errors); } else { // // AT THIS POINT, UNLESS SOMETHING JUMPS ON US, both user and workspace are available //
{ "domain": "codereview.stackexchange", "id": 2351, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, node.js, asynchronous", "url": null }
navigation, amcl Originally posted by Augusto Luis Ballardini on ROS Answers with karma: 430 on 2011-05-19 Post score: 3
{ "domain": "robotics.stackexchange", "id": 5610, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, amcl", "url": null }
ros, build-from-source, debian, ros-indigo Title: Indigo ros_core source compile error in actionlib_msgs I'm compiling indigo-ros_core from source on Debian and I'm getting stuck at actionlib_msgs with the following error: <== Finished processing package [43 of 63]: 'std_msgs'
{ "domain": "robotics.stackexchange", "id": 23081, "lm_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, build-from-source, debian, ros-indigo", "url": null }
This is a very widely applicable method of deriving consequences of axioms, i.e. by "unifying" or "overlapping" terms of both so that both axioms apply, yielding a rewriting of the term in two different ways (e.g. another example). In fact in some cases it can be used to algorithmically derive all of the consequences of the axioms, so yielding algorithms for deciding equality, e.g. see the Knuth-Bendix equational completion algorithm and the Grobner basis algorithm, and see George Bergman's classic paper The Diamond Lemma in Ring Theory. • A nice application:: $\,4ab-1 \mid 4a^2-1\Rightarrow a=b,\,$ see here $\ \$ Mar 18 at 13:23 What you have shown already is a technique that, using the Extended Euclidean Algorithm will give you the inverse (if it exists). Note also that you can determine if an element $a \mod n$ has an inverse by checking that they have no common divisors (that is, $\gcd(a,n)=1$).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551525886193, "lm_q1q2_score": 0.8466379934958057, "lm_q2_score": 0.8774767810736693, "openwebmath_perplexity": 161.20471041182458, "openwebmath_score": 0.977404773235321, "tags": null, "url": "https://math.stackexchange.com/questions/2033470/prove-if-a-mod-n-has-a-multiplicative-inverse-then-its-unique" }
- Yes, it does. Also, that $|u+iv|^2=u^2+v^2$. –  Cameron Buie May 26 '12 at 0:10 As a general rule, if you have an idea, try it. Only for the simplest of problems (and problems like those you have previously solved) will you know the right thing to do before you do it. If your idea works and you solve the problem, great! If it doesn't work, then when you come here, you'll be able to get much deeper advice if you show what you've tried and why you think it doesn't work. –  Hurkyl May 26 '12 at 0:24 Thanks, I did try some calculations using pen and paper, but I didnt really get anywhere with it and I was not sure if I was on the right direction, so hence I didnt type out what I've written out. Seeing what Javier Badia just answered below, I did actually use the sum formula for $\sin(a+b)$, but I just didnt realise to could convert it as he did below. –  Derrick May 26 '12 at 0:27
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429595026213, "lm_q1q2_score": 0.8396890863329848, "lm_q2_score": 0.8539127455162773, "openwebmath_perplexity": 595.664883251431, "openwebmath_score": 0.9977002143859863, "tags": null, "url": "http://math.stackexchange.com/questions/149872/how-to-show-sinxiy2-sin2x-sinh2y/149880" }
• The notation here is awful. $x$ means $AB$ and $y$ means $AC$. So ($x_1$, $x_2$, $x_3$) should be called ($AB_x$, $AB_y$, $AB_z$). Mar 3, 2019 at 21:49 Say you have 3 points $\mathbf{A, B, C}$. Find the angle $\theta$ between $\mathbf{AB}$ and $\mathbf{AC}$ using dot product (i.e. $\mathbf{AB}\cdot\mathbf{AC}=|\mathbf{AB}||\mathbf{AC}|\cos\theta$) and then you can find the area of the triangle using $$A=\frac{1}{2}|\mathbf{AB}||\mathbf{AC}|\sin\theta$$ • Note that $\sin \theta = \sqrt{1 - (\cos\theta)^2}$ allows you to compute $\sin\theta$ quicker than using $\cos^{-1}$ and $\sin$. Aug 9, 2017 at 12:18 • Wouldn't it just be easier to make use the matrices/determinant method to find the cross product rather than finding $\theta$ first and then using the cross product formula? Apr 30, 2018 at 14:08
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9912886142555052, "lm_q1q2_score": 0.8081306868907961, "lm_q2_score": 0.8152324915965392, "openwebmath_perplexity": 484.5277355568259, "openwebmath_score": 0.7874472141265869, "tags": null, "url": "https://math.stackexchange.com/questions/128991/how-to-calculate-the-area-of-a-3d-triangle/1483219" }
rosrun Title: rosrun cannot find specified node file Using electric on Ubuntu 11.10 I recently created a new package and node. Something I have done before with no problems. roscreate-pkg my_package rospy std_msgs There were no errors with rosmake. When I go to run the node I wrote via rosrun my_package my_node.py I get "No such file or directory" despite the file being in /my_workspace/my_package/nodes/my_node.py The file is in place and set as executable, ros can find and build the package but will not run my node. The only edits I made to the CMakeList.txt file were to uncomment the rosbuild_genmsg() and rosbuild_gensrv() lines.
{ "domain": "robotics.stackexchange", "id": 10477, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosrun", "url": null }
java, console String[] posterioriVarStrings = parts[0].split(","); String[] aprioriVarStrings = parts[1].split(","); try { for (int i = 0; i < posterioriVarStrings.length; ++i) { posterioriVarStrings[i] = posterioriVarStrings[i].trim(); boolean negate = false; String varName; if (posterioriVarStrings[i].startsWith("not ")) { negate = true; varName = posterioriVarStrings[i].substring(4); } else { varName = posterioriVarStrings[i]; } if (!nodeMap.containsKey(varName)) { error("No node \"" + varName + "\"."); return true; } posterioriVariables.put(nodeMap.get(varName), !negate); }
{ "domain": "codereview.stackexchange", "id": 15753, "lm_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, console", "url": null }
ros, yaml, rosparam, parameter, parameter-server But this just seems to work with something like: pcl_filter: filter: - filter_cascade_1 - filter_cascade_1 And: std::map<std::string, std::string> param; getParam("filter", param); just workes with: pcl_filter: filter: filter_cascade_1: a filter_cascade_1: b Does somebody know a way to get all of these parameter? Thanks for your help Originally posted by Tobias Neumann on ROS Answers with karma: 179 on 2014-08-07 Post score: 3 I just did this for one of my packages. Here is some example code: #include <XmlRpcValue.h> ...
{ "domain": "robotics.stackexchange", "id": 18945, "lm_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, yaml, rosparam, parameter, parameter-server", "url": null }
c++, linked-list //if list has only one node if (h->next==NULL){ T ret = h->data; this->head = NULL; this->size --; return ret; } //if list has multiple nodes else{ T ret = this->head->data; this -> head = h->next; this->size --; return ret; } delete h; } /*removes the last node in the list returns the associated data.*/ template <class T> T LinkedList<T>::removeLast(){ Node<T> *h = this->head; //if list is empty if (h==NULL){ return 0; } //if list has only one node if (h->next==NULL){ return this->pop(); } //if list has multiple nodes while (h->next->next != NULL){ h = h->next; } T ret = h->next->data; h->next = NULL; this->size--; delete h->next; return ret; } /*removes all of the nodes from the list, freeing the associated data using the given function */ template <class T> void LinkedList<T>::clear(){
{ "domain": "codereview.stackexchange", "id": 28256, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, linked-list", "url": null }
ros, ros2, embedded [1631300905.970282] info | UDPv4AgentLinux.cpp | init | running… | port: 8888 [1631300905.971320] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6 [1631300912.581017] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x00000000, len: 24, data: 0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 47 BE DC BE 81 00 FC 01 [1631300912.581299] info | Root.cpp | create_client | create | client_key: 0x47BEDCBE, session_id: 0x81 [1631300912.581483] info | SessionManager.hpp | establish_session | session established | client_key: 0x47BEDCBE, address: 127.0.0.1:47774 [1631300912.582069] debug | UDPv4AgentLinux.cpp | send_message | [** <> ] | client_key: 0x47BEDCBE, len: 19, data: 0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00 [1631300912.582199] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x47BEDCBE, len: 44, data:
{ "domain": "robotics.stackexchange", "id": 36898, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2, embedded", "url": null }
python, chess and after clean up, looks like this: [[[2], [2]], [[2], [0]]] So it can go to A6 or C6 in chess terms and here is the function: def enumerate_moves(x, y): potential_moves = [] # moves before clean up function # ------------------------------------------------------------------------------ # resolve pawn moves. 4 possible moves maximally if board[x][y] == "bPawn": potential_moves.append([[x+1], [y]]) # if the pawn is in the second rank (has not moved) try: if board[x+2][y] == "" and x == 1 and board[x+1][y] == "": potential_moves.append([[x+2], [y]]) except IndexError: pass try: if board[x+1][y+1][0] == "w": potential_moves.append([x+1], [y+1]) except IndexError: pass try: if board[x+1][y-1][0] == "w": potential_moves.append([x+1], [y-1]) except IndexError: pass
{ "domain": "codereview.stackexchange", "id": 14260, "lm_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, chess", "url": null }
parsing, haskell Putting everything together we get: import Control.Applicative (liftA, liftA2) parseMessage :: String -> LogMessage parseMessage m = case (words m) of "I":t:ws -> try $ asI (unwords ws) $ parseInt t "W":t:ws -> try $ asW (unwords ws) $ parseInt t "E":s:t:ws -> try $ asE (unwords ws) (parseInt s) $ parseInt t _ -> u where try = maybe u id asI c = liftA $ i c asW c = liftA $ w c asE c = liftA2 $ e c i c t = LogMessage Info t c w c t = LogMessage Warning t c e c s t = LogMessage (Error s) t c u = Unknown m parseInt :: String -> Maybe Int parseInt s = case (reads s :: [(Int, String)]) of [(n, "")] -> Just n _ -> Nothing
{ "domain": "codereview.stackexchange", "id": 19805, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "parsing, haskell", "url": null }
rosjava ---------------Talker.cpp--------------------- 2. #include <ros/ros.h> #include <std_msgs/String.h> #include <mbd_msgs/Observations.h> #include <sstream> int main(int argc, char** argv) { ros::init(argc, argv, "talker1"); ros::NodeHandle n; ros::Publisher chatter_pub = n.advertise<std_msgs::String>("chatter", 100); ros::Rate loop_rate(5); int count = 0; while (ros::ok()) { std::stringstream ss; ss << "Hello there! This is message [" << count << "]"; std_msgs::String msg; msg.data = ss.str(); chatter_pub.publish(msg); ROS_INFO("I published [%s]", ss.str().c_str()); ros::spinOnce(); loop_rate.sleep(); ++count; } }
{ "domain": "robotics.stackexchange", "id": 7359, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosjava", "url": null }
deep-rl, tensorflow, keras, pytorch, sarsa Network informations: It use Adam optimizer, and a network with two layers : 256 and 128, with relu on each : class Q_Network(nn.Module): def __init__(self, state_dim , action_dim): super(Q_Network, self).__init__() self.x_layer = nn.Linear(state_dim, 256) self.h_layer = nn.Linear(256, 128) self.y_layer = nn.Linear(128, action_dim) print(self.x_layer) def forward(self, state): xh = F.relu(self.x_layer(state)) hh = F.relu(self.h_layer(xh)) state_action_values = self.y_layer(hh) return state_action_values For keras/Tensorflwo I use this one : def CreationModele(dimension): entree_etat = keras.layers.Input(shape=(dimension)) sortie = keras.layers.Dense(units=256, activation='relu')(entree_etat) sortie = keras.layers.Dense(units=128, activation='relu')(sortie) sortie = keras.layers.Dense(units=4)(sortie) modele = keras.Model(inputs=entree_etat,outputs=sortie) return modele
{ "domain": "ai.stackexchange", "id": 3501, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-rl, tensorflow, keras, pytorch, sarsa", "url": null }
ros-fuerte, rqt I get: /opt/ros/fuerte/stacks/rqt/rqt_gui/src/rqt_gui/roslib_plugin_provider.py:31: UserWarning: roslib.rospack is deprecated, please use rospkg import roslib.rospack RosPluginlibPluginProvider::load_explicit_type(rqt_rviz/RViz) failed initializing plugin (plugin is not a nodelet) PluginManager._load_plugin() could not load plugin "rqt_rviz/RViz": Traceback (most recent call last): File "/opt/ros/fuerte/stacks/qt_gui_core/qt_gui/src/qt_gui/plugin_handler.py", line 89, in load self._load() File "/opt/ros/fuerte/stacks/qt_gui_core/qt_gui/src/qt_gui/plugin_handler_direct.py", line 54, in _load self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context) File "/opt/ros/fuerte/stacks/qt_gui_core/qt_gui/src/qt_gui/composite_plugin_provider.py", line 71, in load instance = plugin_provider.load(plugin_id, plugin_context) File "/opt/ros/fuerte/stacks/qt_gui_core/qt_gui/src/qt_gui/composite_plugin_provider.py", line 71, in load
{ "domain": "robotics.stackexchange", "id": 13340, "lm_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-fuerte, rqt", "url": null }
python, recursion, sorting, mergesort Also, you could make things clearer by adding a variable to denote the middle index. def merge_sort(l): if len(l) <= 1: return l mid = len(l)//2 return merge( merge_sort(l[:mid]), merge_sort(l[mid:])) In your merging procedure, you spend a lot of times checking the same conditions again and again. This is purely personal but I'd rather go for a solution where conditions are checked a minimal number of times : while True: if len(left) > 0: if len(right) > 0: if left[0] <= right[0]: result.append(left[0]) left.pop(0) else: result.append(right[0]) right.pop(0) else: result.append(left[0]) left.pop(0) elif len(right) > 0: result.append(right[0]) right.pop(0) else: break return result
{ "domain": "codereview.stackexchange", "id": 8937, "lm_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, recursion, sorting, mergesort", "url": null }
formal-languages, formal-grammars, context-sensitive, linear-bounded-automata Then, I quote, "The languages generated by those grammars are not context-sensitive". This is not true as you suspected. Both languages can be recognized by a linear space Turing machine, or generated by noncontracting grammar. (I prefer noncontracting here, as context-sensitive is usually a more restrictive type of grammar, which nevertheless is equally powerful.) PS. For the second example several solutions can be found at Context sensitive grammar for $\{a^{2^n}\mid n\ge 0\}$.
{ "domain": "cs.stackexchange", "id": 21386, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, formal-grammars, context-sensitive, linear-bounded-automata", "url": null }
hematology, red-blood-cell Title: Do females living on mountains have more RBCs than a normal male I got this doubt when I was studying about haematocrit value. According to my NCERT textbook males have greater number of RBCs than females. But who will have more RBCs when comparing a normal male and a female who lives at a higher altitude? *edit the magnitude of altitude would be less than 8,586 m (28,169 ft) as the woman I know is not exactly at the top summit of Kanchenjunga so what would be the answer then? Currently impossible to give a definite answer... It depends what altitude you look at.
{ "domain": "biology.stackexchange", "id": 2426, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hematology, red-blood-cell", "url": null }
quantum-algorithms, programming, grovers-algorithm The oracle first will mark $ |011\rangle$, so its amplitude will be $-\frac{1}{\sqrt{8}} = -\frac{1}{2\sqrt{2}}$. $$ \langle\alpha\rangle\ = \frac{1}{8} (7* \frac{1}{\sqrt{8}} - \frac{1}{\sqrt{8}}) = \frac{6}{8\sqrt{8}} = \frac{3}{8\sqrt{2}}$$ So the amplitude of $ |011\rangle$ after the reflection operator becomes $$ - (-\frac{1}{2\sqrt{2}}) + 2\langle\alpha\rangle\ = \frac{5}{4\sqrt{2}} $$ while others will have a new amplitude: $$ - (\frac{1}{2\sqrt{2}}) + 2*\frac{3}{8\sqrt{2}} = \frac{1}{4\sqrt{2}}$$ If you square those amplitudes, then $ |011\rangle$ has $\frac{25}{32} \approx 0.78 > \frac{1}{8}$ probability to be measured, while another state will have $\frac{1}{32}$ probability to be measured. You see the probability of the solution to be outputed increased while non-solutions less likely to be.
{ "domain": "quantumcomputing.stackexchange", "id": 1212, "lm_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-algorithms, programming, grovers-algorithm", "url": null }
c++, multithreading, multiprocessing Don't let Timeit() print the results Your Timeit() both performs timing measurements and handles printing the results to std::cout. This complicates the function, and it's inflexible: what if you want to print the results to a file instead? What if you want to print it to both std::cout and a file? The solution is to not let Timeit() handle printing of the results at all. Instead, consider creating a friend ostream& operator<<() that will format a Result. If you want the "verbose" behaviour, the caller can then simply do: std::cout << Timeit(...);
{ "domain": "codereview.stackexchange", "id": 43865, "lm_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++, multithreading, multiprocessing", "url": null }
By definition, $ac\equiv bc \pmod{m}$ means that there exists a $k\in\mathbb{Z}$ such that $ac=bc+km$. If $d=\gcd(c,m)$, let $c=sd$ and $m=td$ (note now that $\gcd(s,t)=1$). This means that \begin{aligned} ac &\equiv bc \pmod{m} \Longleftrightarrow \\ ac &= bc+km \Longleftrightarrow \\ asd &= bsd+ktd \Longleftrightarrow \\ as &= bs+kt, \end{aligned} so $as\equiv bs \pmod{t}$, or in other words $as\equiv bs \pmod{m/d}$. But since $\gcd(s,t)=1$ we can conclude that $a\equiv b \pmod{m/d}$, and we are done.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446502128796, "lm_q1q2_score": 0.8005200441537786, "lm_q2_score": 0.8221891261650247, "openwebmath_perplexity": 222.32360949522868, "openwebmath_score": 0.9998898506164551, "tags": null, "url": "https://math.stackexchange.com/questions/1883921/if-ac%E2%89%A1bc-mod-m-and-gcdc-m-d-show-that-a%E2%89%A1b-mod-fracmd/1883930" }
structural-formula Carbon atoms are also implied; carbons exist at every "corner" of the polygon which doesn't have an element explicitly identified. Hydrogens attached to carbons are also implied. So at the intersection of two lines, if there are no other attachments and no charge, you can expect there to be two hydrogens (carbon is generally tetravalent). The third structure you posted is a wedge-dash diagram. Wedges depict substituents angled toward you; dashes are substituents pointing away from you; the lines are coplanar. The advantage of this diagram is that it shows the 3D nature of the molecule. Your first picture of the fluoro-carbon compound implies 90 degree bond angles. However, you should realize that the carbon atoms are sp3 hybridized and thus should not have 90 degree bond angles. Further reading and exploration of other depictions of molecular structure: http://www.masterorganicchemistry.com/2010/10/15/the-many-many-ways-to-draw-butane/
{ "domain": "chemistry.stackexchange", "id": 1532, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "structural-formula", "url": null }
quantum-mechanics, condensed-matter, electronic-band-theory The left panel shows some of the energy levels (eigenvalues of the Hamiltonian operator) for a single isolated atom. The levels are labeled by the standard notation of atomic orbitals (3d and 4s in this case). If you have $N$ independent atoms (atoms very far apart), then these two levels are $N$-fold degenerate. The right panel instead shows what happens on a lattice: i.e. when the atoms are so close to one another that their atomic orbitals overlap. Now the atomic states are no longer degenerate, and the degeneracy is lifted by the presence of orbital hybridization between neighbor atoms. As you can see, the energy levels are scattered around the original atomic level, and form a "band". This is what they mean with "levels broadened into bands".
{ "domain": "physics.stackexchange", "id": 94341, "lm_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, condensed-matter, electronic-band-theory", "url": null }
compared to multiplying arbitrary square matrices Pythagorean Triples.. Entering your matrix row number and column number in the cells or type in the answer box to complete choice. Is zero then and orthogonal matrix is a tedious job, but when using the numpy.linalg! With step by step explanations square of matrix Calculator is designed to calculate determinant. Below and, if Possible and orthogonal matrix is a basis of R3 consisting eigenvectors... Matrix 1 user can select either 2x2 matrix or 3x3 matrix '' .. & professionals has n linearly independent eigenvectors D: example 12.1 is called diagonalizable if and if... The commutator is zero then and orthogonal matrix is a process of transforming a matrix, quickly compute powers a... Calculator is designed to calculate the determinant of the e tvalues non-diagonal matrix ’ s nd the eigenvalues sorted ascending... Of Aprecisely when det ( I a ) { // a must be diagonalizable a diagonal matrix rank! 'S breakthrough technology &
{ "domain": "barnabasinstitute.org", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9859363750229259, "lm_q1q2_score": 0.8360422654074207, "lm_q2_score": 0.8479677660619634, "openwebmath_perplexity": 878.4192854509583, "openwebmath_score": 0.7679001092910767, "tags": null, "url": "http://barnabasinstitute.org/qtno0/7e9ae4-how-to-diagonalize-a-matrix-3x3" }
np-complete On the other hand, $B=C_0$ does have the required property. We prove by induction on $|c|$ that any $c\in C$ is a union of a subcollection of $C_0$: if $c\in C_0$, this holds trivially; otherwise $c$ is the union of its proper subsets in $C$, which in turn can be written as unions of subcollections of $C_0$ by the induction hypothesis. Thus, the problem is equivalent to $|C_0|\le K$, which can be checked in polynomial time.
{ "domain": "cs.stackexchange", "id": 8783, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "np-complete", "url": null }
electromagnetism, electrostatics, electric-fields, potential But even if $\mathbf{F}=-q\ \nabla V$, I still don't know how to calculate the force. The components of the gradient are given by \begin{align} &\frac{\partial V}{\partial x}=\frac{1}{4\pi\epsilon_0}\left\{-\frac{qx}{[x^2+y^2+(z-d)^2)]^{3/2}}+\frac{qx}{[x^2+y^2+(z+d)^2]^{3/2}} \right\},\\ &\frac{\partial V}{\partial y}=\frac{1}{4\pi\epsilon_0}\left\{-\frac{qy}{[x^2+y^2+(z-d)^2)]^{3/2}}+\frac{qy}{[x^2+y^2+(z+d)^2]^{3/2}} \right\},\\ &\frac{\partial V}{\partial z}=\frac{1}{4\pi\epsilon_0}\left\{-\frac{q(z-d)}{[x^2+y^2+(z-d)^2)]^{3/2}}+\frac{q(z+d)}{[x^2+y^2+(z+d)^2]^{3/2}} \right\}. \end{align}
{ "domain": "physics.stackexchange", "id": 69984, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electrostatics, electric-fields, potential", "url": null }
navigation, odometry, ros-kinetic, rtabmap-odometry, gmapping Comment by matlabbe on 2018-08-30: This is an issue with the released binaries version when Grid/CellSize is set to 1 cm, that issue is fixed in latest source code (see this issue). Set it back to 5 cm as a workaround if you don't want to rebuild rtabmap from source. Comment by NAGALLA DEEPAK on 2018-08-31: Thankyou, I am able to run both gmapping and RTabMap simultaneously now. Have to test how perfect and clear the 3D map is......but could I ask you for more information about what Grid/CellSize is? Comment by matlabbe on 2018-08-31: It is the size of the occupancy grid's cells. I think gmapping also uses 5 cm by default. In your gmapping config, you set it to 2.5 cm. (<param name="delta" value="0.025"/>). Comment by NAGALLA DEEPAK on 2018-10-04: Oh! thank you so much
{ "domain": "robotics.stackexchange", "id": 31666, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, odometry, ros-kinetic, rtabmap-odometry, gmapping", "url": null }
$$\frac{2}{7}A + \frac{5}{9}(90)=\frac{2}{5}(A+90)$$ $$\frac{2}{7}A + 50=\frac{2}{5}A + \frac{2}{5}(90)$$ $$\frac{2}{7}A + 50=\frac{2}{5}A + 36$$ $$14=\frac{2}{5}A-\frac{2}{7}A$$ $$14 = \frac{4}{35}A$$ $$A = (14*\frac{35}{4})=122.5$$ gallons of A _________________ SC Butler has resumed! Get two SC questions to practice, whose links you can find by date, here. At the still point, there the dance is. — T.S. Eliot Target Test Prep Representative Affiliations: Target Test Prep Joined: 04 Mar 2011 Posts: 2819 Re: Two mixtures A and B contain milk and water in the ratios  [#permalink] ### Show Tags 12 Nov 2017, 08:45 bmwhype2 wrote: Two mixtures A and B contain milk and water in the ratios 2:5 and 5:4 respectively. How many gallons of A must be mixed with 90 gallons of B so that the resultant mixture contains 40% milk? A. 144 B. 122.5 C. 105.10 D. 72 E. 134 Mixture A has a ratio of milk : water = 2x : 5x. Mixture B has a ratio of milk : water = 5y : 4y.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8221891283434877, "lm_q2_score": 0.8221891283434877, "openwebmath_perplexity": 3334.6928289862044, "openwebmath_score": 0.7750915884971619, "tags": null, "url": "https://gmatclub.com/forum/two-mixtures-a-and-b-contain-milk-and-water-in-the-ratios-57862-20.html" }
java, android, database Title: Factoring out REST-POST activity to a manager I want to factor out the AsyncTask to a Manager. I thought to make it a singleton, but then I cannot use generics as the object to serialize to JSON and send (e.g. PostManager<T>). How can this be refactored? public class RestPostActivity extends BaseActivity implements OnClickListener { ... public static String POST(String url, Person person) { InputStream inputStream = null; String result = ""; try { // 1. create HttpClient HttpClient httpclient = new DefaultHttpClient(); // 2. make POST request to the given URL HttpPost httpPost = new HttpPost(url); String json = "";
{ "domain": "codereview.stackexchange", "id": 6441, "lm_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, android, database", "url": null }
python, text-processing, genbank CDS 9632..11416 /gene="frdA" /locus_tag="HAPS_0005" /note="part of four member fumarate reductase enzyme complex FrdABCD which catalyzes the reduction of fumarate to succinate during anaerobic respiration; FrdAB are the catalytic subcomplex consisting of a flavoprotein subunit and an iron-sulfur subunit, respectively; FrdCD are the membrane components which interact with quinone and are involved in electron transfer; the catalytic subunits are similar to succinate dehydrogenase SdhAB" /codon_start=1 /transl_table=11 /product="fumarate reductase flavoprotein subunit" /protein_id="YP_002474658.1" /db_xref="GI:219870283"
{ "domain": "bioinformatics.stackexchange", "id": 1455, "lm_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, text-processing, genbank", "url": null }
ros, ros2, apt The following packages have unmet dependencies. ros-desktop-full : Depends: ros-desktop but it is not going to be installed Depends: ros-perception but it is not going to be installed Depends: ros-simulators but it is not going to be installed E: Unable to correct problems, you have held broken packages.
{ "domain": "robotics.stackexchange", "id": 34826, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2, apt", "url": null }
mass, field-theory There is no direct connection between the total energy (or mass) of a specific classical field configuration, and the mass of a single quantum (aka particle) associated with the field. The total energy of a field configuration can be infinite (at least mathematically), the mass of a single particle should be finite.
{ "domain": "physics.stackexchange", "id": 92629, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mass, field-theory", "url": null }
java, rock-paper-scissors I find that the logic is clearer to read. Any good IDE will helpfully suggest you to add cases for all your enum values. If Lizard and Spock paid a visit to your game, the Map solution will require significant re-tooling, whereas... it's at least easier to refactor the switch statement to prudently take care of them, for starters. edit The alternative throw-ing of IllegalStateException suggested by @maaartinus is nifty in the sense that any good IDE will also prompt you to add case clauses for new enum values, and you'll still get the exception thrown. Player enum Player implements Iterator<Move> { A() { @Override public Move next() { return Move.PAPER; } }, B() { @Override public Move next() { return Move.values()[GENERATOR.nextInt(Move.values().length)]; } }; private static final Random GENERATOR = new Random(); @Override public boolean hasNext() { return true; }
{ "domain": "codereview.stackexchange", "id": 13533, "lm_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, rock-paper-scissors", "url": null }
suits you. also a rational number. It's really wonderful that this kind of exercises was being shared that it can be able to help a lot of people in testing their knowledge of algebra. We look at the basic elements used to build circuits, and find out what happens when elements are connected together into a circuit. Thanks once again. Do not just copy th … LOL, Here is the official site of this book. waiting for help:I cannot find the list of mistakes in Linear Algebra Done Right(3E). Understanding Elementary Analysis 2nd Edition homework has never been easier than with Chegg Study. A modern introduction to probability and statistics : understanding why and how / F.M. Hence there might have many different choices of square roots. Download free Textbook PDF or purchase low-cost hardcopy Welcome. troductory student rmly in mind. In my teaching of analysis, I have come to understand the strong correlation between how students learn analysis and how they write it. This is immensely helpful
{ "domain": "bvs.br", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632241040058, "lm_q1q2_score": 0.8544831252386027, "lm_q2_score": 0.8976952818435994, "openwebmath_perplexity": 1203.877316008927, "openwebmath_score": 0.4788626730442047, "tags": null, "url": "http://determinantes.saude.bvs.br/my3jn/914481-understanding-analysis-slader" }
electrons, capacitance So I would rather expect it to quickly (because $0$ the absence of any resistance) dissolve all negative charge and gain positive ones therefore lowering capacitor potential to $0$ - since second plate slowly (due to 10Mohm resistor of voltmeter) discharges its positive charge.
{ "domain": "physics.stackexchange", "id": 49377, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrons, capacitance", "url": null }
general-relativity, boundary-conditions, ads-cft, anti-de-sitter-spacetime, diffeomorphism-invariance be relaxed enough to allow the group action of global asymptotic symmetry transformations & finite mass excitations, e.g. multiple stars & black holes, because we want the model to be able to accommodate and describe these. be tight enough (i.e. fall-off fast enough for $r\to\infty$) for the Einstein-Hilbert action integral $S_{EH}[g]$ of the allowed metrics $g_{\mu\nu}$ to be well-defined with a finite value, possibly after renormalization. be consistent with the EFE.
{ "domain": "physics.stackexchange", "id": 41125, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, boundary-conditions, ads-cft, anti-de-sitter-spacetime, diffeomorphism-invariance", "url": null }
$$\begin{array}{cc} 0&1&2&3&4&5&6&7&\cdots&n&\cdots\\ \hline 0&2&4&6&8&10&12&14&\cdots&2n&\cdots\\ \hline 1&3&5&7&9&11&13&15&\cdots&2n+1&\cdots \end{array}\tag{4}$$ In more formal terminology, what the author calls size is known as cardinality. Two sets are said to have the same cardinality if there is a way to pair them up one for one, with nothing left over in either set; in technical terms, this means that there is a bijection between the two sets, a function that is one-to-one and onto. Clearly $\Bbb N$ can be paired up with itself in this fashion no matter how we rearrange it.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561685659695, "lm_q1q2_score": 0.8365022940224162, "lm_q2_score": 0.863391617003942, "openwebmath_perplexity": 226.38880395218584, "openwebmath_score": 0.7926708459854126, "tags": null, "url": "http://math.stackexchange.com/questions/448715/i-read-that-ordinal-numbers-relate-to-length-while-cardinal-numbers-relate-to-s" }
organic-chemistry, stereochemistry There is no diastereomerism present in this compound, but I would guess that the other reason why stereochemistry is indicated is to alert the reader to the fact that the product is chiral. Sometimes, this can be considered to be misleading. The most unambiguous way to indicate "undefined stereochemistry" is therefore using the wavy line as I did above.
{ "domain": "chemistry.stackexchange", "id": 5505, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, stereochemistry", "url": null }
botany, plant-physiology The great cycle of life You'll note that while plants (and some other things) uses $CO_2$ to build their mass, animals (and some other things) exhale $CO_2$ when they breathe. In other words, respiration frees up carbon dioxide while photosynthesis fixes carbon dioxide into organic matter. Then you may want to ask where does the carbon we exhale come from. From our food. If you eat a beef burger for example, you'll the carbon that was present in the cow. The beef got its carbon from the grass that she grazed on. The grass got its carbon from the air and there is carbon in the air because animals (and some other things) exhale carbon when we breathe. respiration and photosynthesis are two essential series of chemical reactions that explain the existence of this cycle.
{ "domain": "biology.stackexchange", "id": 4421, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "botany, plant-physiology", "url": null }
vision, eyes, sensation Fig. 1. Left: normal cone spectral distribution vision, right: cone distribution in Deuteranopes. source: Enchroma What Enchroma has come up with is actually really clever (!) - they've put a spectral notch filter in place and wedge it in-between the red and green spectral optima, thereby removing the large area of overlap. This reduces brightness, but it will enhance contrast when the glasses are worn (Fig. 2). Fig. 2. Spectral notch filter to enhance green-red color contrast. source: Enchroma And yes, above considerations hold for any colored object, including monitor pixels.
{ "domain": "biology.stackexchange", "id": 5686, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vision, eyes, sensation", "url": null }
c++20, data-mining Reconsider your datatypes I see both std::map and std::unordered_map. I see the member variable tmp_count in fpgrowth_node, but local function variables visitable and in_tree. All these things have a certain cost, and the performance of your algorithm can be greatly affected by this. For example, lookups and insertions in std::map are \$O(\log N)\$, whereas lookups and insertions in std::unordered_map are \$O(1)\$. Also consider memory usage of these datastructures. Both std::map and std::unordered_map can make a separate heap memory allocation for each item you insert. So if you can make in_tree a bool member variable of fpgrowth_node, that would save a lot of memory. Also consider merging maps if possible. Why have separate last_pointer, firstpointer and createdElements maps when they are all indexed by the same key? These maps could be merged by creating a struct that holds the value parts of each of the three original maps.
{ "domain": "codereview.stackexchange", "id": 44677, "lm_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++20, data-mining", "url": null }
visible-light, speed-of-light, refraction The easiest way to see this is to think about what would happen over time. Let's assume we are looking at a clock, and the light from the clock gets to us slowly - say it takes a second longer than it would in a vacuum. Then when the second hand reaches "1 second past the hour", I see it at the top of the hour. But a second later, the information "it is now one second later" must reach me. Otherwise, all that information will end up piled up between the clock and me - and a person who just walks into the room would either see a different time than I see (they see the one second delay), or for them the situation would be different than it was for me when I walked into the room. Neither of those things make sense. So - constant delay due to the extra time the signal takes; but other than that, no difference in speed with which observed events unfold.
{ "domain": "physics.stackexchange", "id": 34151, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, speed-of-light, refraction", "url": null }
java, sudoku, backtracking for(Map.Entry<Position, BitSet> e : grid.entrySet()){ if(e.getValue().cardinality() == 0){ return false; } } return true; } @Override public SudokuBoard clone(){ try{ SudokuBoard clone = (SudokuBoard)super.clone(); clone.grid = new HashMap(grid); for(Map.Entry<Position, BitSet> e : clone.grid.entrySet()){ e.setValue((BitSet)e.clone()); } return clone; } catch(CloneNotSupportedException e){ return null;//can't happen } } } Then the algorithm looks something like: public Set<SudokuBoard> getAllSolutions(SudokuBoard board){ if(board.isSolved) return Collections.singleton(board); if(!board.isSolvable()) return Collections.emptySet(); Set<SudokuBoard> result = new HashSet<SudokuBoard>();
{ "domain": "codereview.stackexchange", "id": 15957, "lm_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, sudoku, backtracking", "url": null }
homework-and-exercises, photons, momentum, conservation-laws, antimatter Suppose the annihilation produced a single photon. The momentum of a photon is: $$ p = \frac{h}{\lambda} $$ but the problem is that the momentum of a photon is always $h/\lambda$. Unlike a massive particle a photon has no rest frame i.e. no frame in which it's momentum is zero. So creation of a single photon means the momentum would change from zero to $h/\lambda$ and momentum wouldn't be conserved. For momentum to be conserved we have to create a minimum of two photons moving in opposite directions i.e. with momenta $h/\lambda$ and $-h/\lambda$.
{ "domain": "physics.stackexchange", "id": 25997, "lm_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, photons, momentum, conservation-laws, antimatter", "url": null }
python, performance Title: Find words in a word grid I made a program to find words in a word grid. It will find words that are horizontal, vertical, positive sloped and vertical sloped, all in both forwards and backwards. Here is my code: with open('grid.txt', 'r') as f: lst = [[a for a in l.strip() if a != ' ' and a!= '\n'] for l in f.readlines() if l] # Convert file to a nested list, with all whitespaces removed lst2 = [a[::-1] for a in zip(*lst)] # Create another nested list that is the first nested list rotated 90 degrees clockwise height = len(lst) # Height of grid width = len(lst[0]) # Width of grid while True: word = input("Input your word: ") # Word to find # Find horizontal word for l in lst: w = ''.join(l) if word in w or word in w[::-1]: print(w) print('Horizontal!')
{ "domain": "codereview.stackexchange", "id": 39638, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance", "url": null }
filters, digital-communications, matched-filter Matched filters
{ "domain": "dsp.stackexchange", "id": 10496, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, digital-communications, matched-filter", "url": null }
beginner, clojure, lisp :start-count @intermed-count :total-count total-sequence-counts)))) (println "Total time taken = " (hrs-min-sec (- (current-time) beginning-time)) ", Done = " @intermed-count "/" total-sequence-counts)))
{ "domain": "codereview.stackexchange", "id": 1161, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, clojure, lisp", "url": null }
error-correction, stabilizer-code Title: Other than distance, what other metrics can be used to compare quantum error correcting codes? Using classical error correction (or channel coding) as a reference, I'd like to be able to compare QECC's from different constructions. Distance is a reasonable measure and you can argue that an $[[n_1,k_1,d_1]]$ is a better code than an $[[n_2,k_2,d_2]]$ if for example $k_1/n_1 = k_2/n_2$ and $d_1>d_2$ (same rate, larger distance); or maybe $d_1 = d_2$ and $k_1/n_1 \gt k_2/n_2$, (same distance, higher rate),or $n_1/k_1=n_2/k_2, d_1=d_2$ and $n_1 \lt n_2$, (same rate and distance, smaller number of physical qubits). However, just like the classical case, I'm sure that distance doesn't tell the whole story. The "channel" (or error model) has to enter the picture as well as the decoding algorithm. Distance can also be difficult to calculate for large $n$. In classical ECC, a plot of BER vs SNR in AWGN channel can quickly tell you if a code/decoder combination gives better performance
{ "domain": "quantumcomputing.stackexchange", "id": 1699, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "error-correction, stabilizer-code", "url": null }
ros, moveit, gazebo-ros-control Originally posted by kidpaul on ROS Answers with karma: 38 on 2023-01-10 Post score: 0 I'll answer my own question. Indeed, my controller PID gains were too off to follow the planned trajectory. After tuning those gains with trails and errors in the gazebo environment, errors became much more reasonable. Originally posted by kidpaul with karma: 38 on 2023-01-18 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 38218, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, gazebo-ros-control", "url": null }
Introduce the notation $Q_{n,\mathbf{i}}=\overset{d}{\underset{k=1}{\times}}\left[\frac{i_k}{2^n},\frac{i_k+1}{2^n}\right]$ to indicate the dependence of closed dyadic cubes on $n\in\mathbb{N}\cup \left\{0\right\}$ and $\mathbf{i}=(i_1,i_2,\cdots, i_d)\in\mathbb{Z}^{d}$. For every $\mathbf{i}=(i_1,i_2,\cdots, i_d)\in\mathbb{Z}^{d}$ for which there exists a closed dyadic cube $Q_{n,\mathbf{i}}$ contained in $E$, choose the biggest closed dyadic cube $Q_{n,\mathbf{i}}$ in $E$, i.e. choose $n_0=\underset{n}{\min}\left\{n\in\mathbb{N}\cup \left\{0\right\}:Q_{n,\mathbf{i}}\in E\right\}$. It is now obvious that by having capped the cubes by a sidelength of 1, there exists a maximum cube $Q_{n_0,\mathbf{i}}$ among $\left\{Q_{n,\mathbf{i}}\in E:n\in\mathbb{N}\cup \left\{0\right\}\right\}$, which is a maximal cube among those contained in $E$.
{ "domain": "papamarkou.blog", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806557900713, "lm_q1q2_score": 0.8213539269860421, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 2770.544067615771, "openwebmath_score": 0.9897416234016418, "tags": null, "url": "https://papamarkou.blog/category/solutions/books/an-introduction-to-measure-theory/" }
c#, beginner, unit-conversion Notice that I didn't use Console.WriteLine() yet. You've had to copy paste that in every method, which is not a reusable pattern. It would be better to have the method return a string: static string convertCelsiusToKelvin() { var convertedValue = temp + 273.15; var convertedValueString = convertedValue + "°K"; return convertedValueString; } And wrap the method call in the Main() method: switch (tempUnit) { //Converting temp to F and K if tempUnit == c case 'c': Console.WriteLine("Celsius To Farhenheit and Kelvin"); Console.WriteLine(convertCelsiusToFarhenheit()); Console.WriteLine(convertCelsiusToKelvin()); Note: This can be optimized further, but this is already a good first step. It teaches you to separate the calculation from the presentation of the calculated value. Try to separate the logic into methods more. Your Main() method currently is doing many things that don't really have anything to do with each other:
{ "domain": "codereview.stackexchange", "id": 30263, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner, unit-conversion", "url": null }
# Finding a series expansion, about some given $x = x_0$ for the solution to a second order ODE I am currently looking at a question requiring me to find a series expansion (about the point $x=0$) for the solution to the below second order ODE (Airy's equation): $$y'' - xy = 0$$ I believe that I understand what this requires me to do, but I wish to make certain, so correct me if I am wrong: By setting $$y = \sum_{n=0}^{\infty} a_n x^n = a_0 + a_1x + a_2x^2 + a_3x^3 + ...$$ which also gives us $$y'' = \sum_{n=2}^{\infty} n(n-1)a_nx^{n-2} = 2a_2 + 6a_3x + 12a_4x^2 + 20a_5x^3 + ...$$ and subbing these power series into the ODE gives us $$2a_2 + 6a_3x + 12a_4x^2 + 20a_5x^3 + 30a_6x^4 + ... - a_0x - a_1x^2 - a_2x^3 - a_3x^4 + ... = 0$$ And thus, setting $a_0 = a_0$ and $a_1 = a_1$ arbitrarily, we can express every other $a_n$ in terms of $a_0, a_1$, as follows:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.987375052204446, "lm_q1q2_score": 0.8140531354673086, "lm_q2_score": 0.8244619242200082, "openwebmath_perplexity": 158.4181260029838, "openwebmath_score": 0.9272786378860474, "tags": null, "url": "https://math.stackexchange.com/questions/2131933/finding-a-series-expansion-about-some-given-x-x-0-for-the-solution-to-a-sec" }
electricity, electric-circuits, electric-current, electrical-resistance, power Title: Seemingly contradictory situation in electrical system loss In a power supply system, we know that we decrease the current and increase the potential difference. If we decrease the current by a factor of 10 and increase potential difference by a factor of 10, the system loss (emitted heat) decreases following the formula $P=I^2R$. But according to $P=V^2/R$, the system loss is being increased by a factor of 100. It seems contradictory. Now what is the conclusion? There is more than one relevant potential difference. You must distinguish between the potential difference, $V_L$, across the load (i.e. the 'user' that we are aiming to supply) and the potential difference, $V_W$, across just the transmitting wires (of resistance $R_W$ taken together). The load and the wires are in series across the supply so $V_\text{supply}=V_L+V_W$. The power received by the load is $IV_L$.
{ "domain": "physics.stackexchange", "id": 72104, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, electric-circuits, electric-current, electrical-resistance, power", "url": null }
c, multithreading, tetris else if(turn == 2 && a + 2 !=9 && field[3 + k][a + 1] == 0 && field[2 + k][a + 1] == 0 && field[1 + k][a + 1] == 0 && field[0 + k][a + 1] == 0) { a++; if(field[0 + k - 1][a - 1] != 2) field[0 + k - 1][a - 1] = 0; if(field[0 + k - 1][a - 2] != 2) field[0 + k - 1][a - 2] = 0; if(field[0 + k - 1][a - 3] != 2) field[0 + k - 1][a - 3] = 0; if(field[0 + k - 1][a - 4] != 2) field[0 + k - 1][a - 4] = 0; turn = 0; } if(field[0 + k - 1][a - 1] != 2) field[0 + k - 1][a - 1] = 0; if(field[0 + k - 1][a] != 2) field[0 + k - 1][a] = 0; if(field[0 + k - 1][a + 1] != 2) field[0 + k - 1][a + 1] = 0; if(field[0 + k - 1][a + 2] != 2) field[0 + k - 1][a + 2] = 0;
{ "domain": "codereview.stackexchange", "id": 20767, "lm_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, multithreading, tetris", "url": null }
is Reflexive Symmetric or Transitive - Practice Questions. 13 0 obj (iv) Reflexive and transitive but not symmetric. Thus (1, 1) S, and so S is not reflexive. A relation $\mathcal R$ on a set $X$ is * reflexive if $(a,a) \in \mathcal R$, for each $a \in X$. A relation $\mathcal R$ on a set $X$ is * reflexive if $(a,a) \in \mathcal R$, for each $a \in X$. Thus . Justify Your Answers. R is transitive if for all x,y, z A, if xRy and yRz, then xRz. 5 0 obj Make now. If a relation is Reflexive symmetric and transitive then it is called equivalence relation. A lot of fundamental relations follow one of two prototypes: A relation that is reflexive, symmetric, and transitive is called an “equivalence relation” Equivalence Relation A relation that is reflexive, antisymmetric, and transitive is called a “partial order” Partial Order Relation and . I just want to brush up on my understanding of Relations with Sets. Proof: Let s.t. Scroll down the page for more examples and solutions on equality
{ "domain": "wasteclub.org", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9284088005554475, "lm_q1q2_score": 0.8222280473353932, "lm_q2_score": 0.8856314662716159, "openwebmath_perplexity": 387.0013629805693, "openwebmath_score": 0.7882970571517944, "tags": null, "url": "https://wasteclub.org/glee-don-hxb/etusx.php?ab814e=reflexive%2C-symmetric-and-transitive-relations-pdf" }
filters, filter-design, lowpass-filter An important point to note - consider the original filter has a transition width of 10 Hz i.e. from 10 Hz to 20H at the 50 Hz sampling rate. If the filter coefficients remain unchanged when applied in a system with a sampling rate is 500 Hz, the resulting transition width is now from 100Hz - 200 Hz, so the transition width has also increased. This is the reason that if you are trying to design a filter with a narrow transition width at high sampling rates it requires more filter taps i.e. the impulse response of the filter gets longer in terms of the number of samples. In most of the filter design software they accept normalized frequency values for the specification - but be careful some use slightly different normalizations e.g. I believe Matlab expects the frequencies to be between 0 and 1 rather than 0 and 0.5, their filter design interface has changed over the years.
{ "domain": "dsp.stackexchange", "id": 2448, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, filter-design, lowpass-filter", "url": null }
ros, imu, rviz, visualization, ros-kinetic Originally posted by BuxBleed on ROS Answers with karma: 3 on 2018-08-05 Post score: 0 Original comments Comment by gvdhoorn on 2018-08-05: I'm sorry, but you're question does not follow the support guidelines. Please review them, especially the sections about not posting screenshots of console output. If you want to update it to remove the images, let me know and I'll re-open it. Comment by BuxBleed on 2018-08-05: Ok I updated post Comment by gvdhoorn on 2018-08-05: I would suggest to also show the IMU message as the frame_id field of the header is empty, which seems very much related (or could be a red herring). Looking at the code for the IMU vrep plugin I don't see it setting the frame_id field. That is most likely the cause here. Edit: But how is the function or class property name to set frame_id for given String ? I'm not sure what you're asking, but to set a proper frame id: fl.header.frame_id = "<insert some frame name here>"
{ "domain": "robotics.stackexchange", "id": 31467, "lm_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, imu, rviz, visualization, ros-kinetic", "url": null }
slam, navigation, rtabmap-ros, rtabmap EDIT I updated the rtabmap parameters in the launch file above so that it can work on indigo binaries version (0.11.8). In recent versions, these parameters have these default values: --Vis/CorNNDR 0.6 --Vis/CorGuessWinSize 20 --Vis/PnPFlags 0. Did you use the launch file I created above? because normally you won't have the SURF/SIFT not available error message as Kp/DetectorStrategy is not set in my example. In 0.11.8, local bundle adjustment is not implemented, so odometry is drifting a lot more. To get best results, build latest rtabmap version from source. For the hector_mapping xml error, it is maybe ros parsing all packages xml files that is causing this error on launch (so it would be a problem with the hector xml files but hector is not used in this example, it could be ignored). cheers, Mathieu
{ "domain": "robotics.stackexchange", "id": 28490, "lm_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, rtabmap-ros, rtabmap", "url": null }
ros, catkin-make, beaglebone, armhf ^ /opt/ros/indigo/include/tf2_ros/message_filter.h:53:3: note: in expansion of macro ‘ROS_DEBUG_NAMED’ ROS_DEBUG_NAMED("message_filter", "MessageFilter [target=%s]: ", fmt, getTargetFramesString().c_str(), __VA_ARGS__) ^ /opt/ros/indigo/include/tf2_ros/message_filter.h:282:5: note: in expansion of macro ‘TF2_ROS_MESSAGEFILTER_DEBUG’ TF2_ROS_MESSAGEFILTER_DEBUG("%s", "Cleared"); ^ virtual memory exhausted: Cannot allocate memory make[2]: *** [robot_localization/CMakeFiles/ros_filter.dir/src/ros_filter.cpp.o] Error 1 make[1]: *** [robot_localization/CMakeFiles/ros_filter.dir/all] Error 2 make: *** [all] Error 2 Invoking "make -j1 -l1" failed ubuntu@arm:/media/sdcard/catkin_ws$ #############################
{ "domain": "robotics.stackexchange", "id": 22322, "lm_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, catkin-make, beaglebone, armhf", "url": null }