text
stringlengths
1
1.11k
source
dict
## EDIT I have looked more closely at the histogram of the joint distribution of $$|z|$$ and $$\theta$$ and concluded that they indeed are NOT independent, even though they are uncorrelated. So I know understand what is going on.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9621075722839015, "lm_q1q2_score": 0.8058805035692723, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 212.53486122619228, "openwebmath_score": 0.8682143688201904, "tags": null, "url": "https://stats.stackexchange.com/questions/376208/correlation-with-theta-and-with-ei-theta" }
general-relativity, conservation-laws, symmetry, noethers-theorem Title: These conserved quantities are associated to what system? I'm studying General Relativity and I'm getting a little confused with the relation between symmetries and conservation laws. Indeed, in Classical Mechanics we prove from the variational principle that each symmetry of the lagrangian gives rise to a conservation law. This is Noether's theorem and is really a corolary from the Euler-Lagrange equations. Now, in General Relativity, I've read that when the Lie derivative of the metric tensor with respect to a vector field $X$ vanishes, then the metric tensor has a symmetry under the transformation generated by the flow of the vector field, and this also gives rise to a symmetry. For example: in the Schwarzschild metric $$ds^2=\left(1-\dfrac{2GM}{r}\right)dt^2-\left(\dfrac{1}{1-\dfrac{2GM}{r}}\right)dr^2-r^2d\theta^2-r^2\sin^2\theta d\phi^2$$
{ "domain": "physics.stackexchange", "id": 38530, "lm_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, conservation-laws, symmetry, noethers-theorem", "url": null }
ros, robot, nao-driver, nao dollar = url.find('$', rest) AttributeError: 'NoneType' object has no attribute 'find' [nao_camera-8] process has died [pid 4000, exit code 1, cmd /home/jonfeme/nao_ws/src/nao_robot/nao_driver/nodes/nao_camera.py --pip=127.0.0.1 --pport=9559 __name:=nao_camera __log:=/home/jonfeme/.ros/log/cf9cdbf2-e55e-11e3-a9ca-000c29578851/nao_camera-8.log]. log file: /home/jonfeme/.ros/log/cf9cdbf2-e55e-11e3-a9ca-000c29578851/nao_camera-8*.log I cannot use nao_camera. I installed ros-hydro-info-manager-py, but I have still the same problem. The same happens with nao_speech.py. I have Naoqi version 1.14.5, the other nodes work fine, but camera and speech not. I will be grateful for any help. Thank you very much
{ "domain": "robotics.stackexchange", "id": 18068, "lm_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, robot, nao-driver, nao", "url": null }
4. Infinitely many loci of $$\lambda$$ passing through $$D, E, F$$. Combine with the observation $$I_1$$, $$D, E, F$$ are centers for infinitely many circumellipses of $$A,B,C$$. To be continued??? • Impressive effort, but please have a look at my solution. There is a shorter way to a univariate polynomial equation. – Yves Daoust Jun 19 at 7:28 • @YvesDaoust I've seen your answer but I'm more interested in the geometry side of the problem. I want to understand what configuration is possible and how to classify the solutions (either geometrically or topologically). – achille hui Jun 19 at 8:42 WLOG, one of the given points is the origin (otherwise, apply a translation). Let us hypothesize the angle $$\theta$$. We counter-rotate the three points so that the axis $$a$$ becomes horizontal. Then we apply an anisotropic dilation of ratio $$r:=\dfrac ab$$ on the $$y$$ coordinate. This way, the ellipse becomes a circle of radius $$a$$, through the origin. The transformation is
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787827157817, "lm_q1q2_score": 0.8226403534777749, "lm_q2_score": 0.8333245891029456, "openwebmath_perplexity": 460.93165146704695, "openwebmath_score": 0.9898651838302612, "tags": null, "url": "https://math.stackexchange.com/questions/3227606/finding-center-and-rotation-angle-of-ellipse-that-contains-three-points" }
-----------------------------------------------------------------------------------------------------------------------------¶ Similar to Binary Search, Jump Search or Block Search is an algorithm only for ordered (sorted) lists. The major idea behind this algorithm is to make less comparisons by skipping a definite amount of elements in between the elements getting compared leading to less time required for the searching process. It can be classified as an improvement of the linear search algorithm since it depends on linear search to perform the actual comparison when searching for a value. Jump Search Steps¶ In Jump search, it is not necessary to scan all the elements in the list to find the desired value. We just check an element and if it is less than the desired value, then some of the elements following it are skipped by jumping ahead.
{ "domain": "jupyter.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429619433693, "lm_q1q2_score": 0.8016531241304063, "lm_q2_score": 0.8152324826183822, "openwebmath_perplexity": 1313.832396081218, "openwebmath_score": 0.42646723985671997, "tags": null, "url": "https://nbviewer.jupyter.org/github/gowrishankarnath/Dr.AIT_Python_Lab_2019/blob/master/Program_3.ipynb" }
homework-and-exercises, newtonian-mechanics, work I have tried but am unable to solve it and would be grateful for any help Let's start at $t=0$ at the top of the tube. Let's also posit that for each full revolution $\frac{W}{n}$ friction work is done on the block. When it's at its lowest point, after half a revolution, it's total energy is: $$T=K_0+2mgR-\frac{W}{2n}$$ Then it climbs back up and total energy is: $$T'=K_0+2mgR-\frac{W}{2n}-2mgR-\frac{W}{2n}=K_0-\frac{W}{n}$$ After $n+\frac12$ revolutions (back at the bottom): $$0=K_0+2mgR-(n+\frac12)\frac{W}{n}$$ With $K_0=\frac12 mv_0^2$.
{ "domain": "physics.stackexchange", "id": 32542, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, work", "url": null }
ros, ekf, ros-kinetic, 2dlidar, pioneer Thank you very much... Regards, Karan Manghi
{ "domain": "robotics.stackexchange", "id": 34018, "lm_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, ekf, ros-kinetic, 2dlidar, pioneer", "url": null }
fft, audio, frequency-spectrum, stft, time-frequency Title: Separate two sinusoids with very close frequencies (5 Hz difference) in a 44.1 Khz audio signal, with good time-domain resolution Here is an audio signal which is a mix of (WAV file available here): a 2000 Hz sinusoid, beginning at 1.00 sec, without fade-in/fade-out a 2005 Hz sinusoid, beginning at 1.031 sec, with a slow fade-out at the end background noise (In reality it's even more complex: the sinusoids can also vary in amplitude...) How to separate the signal into two signals (the two sinusoids), but also with a good temporal resolution? Attempt 1 I zero-padded the signal to the next power of 2 (final length: 524288), did a real-FFT. The size of the real-FFT vector h is 262145 frequency bins to cover the frequency range [0, 22050hz], so each bin has a width 0.084 Hz. Pretty good news, we can distinguish the two sinusoids with this!
{ "domain": "dsp.stackexchange", "id": 6731, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, audio, frequency-spectrum, stft, time-frequency", "url": null }
two masses m 1 and m 2. equilibrium, the spring balance and mass attached to the hook causes the spring to extend from an initial position until the resultant force is zero. Abstract In this paper, we study the nonlinear response of the nonlinear mass-spring model with nonsmooth stiffness. LECTURE 14: DEVELOPING THE EQUATIONS OF MOTION FOR TWO-MASS VIBRATION EXAMPLES Figure 3. A novel nonlinear seat suspension structure for off-road vehicles is designed, whose static characteristics and seat-human system dynamic response are modeled and analyzed, and experiments are conducted. Tools needed: ode45 , plot Description: For certain (nonlinear) spring-mass systems, the spring force is not given by Hooke's Law but instead satisfies F spring = ku + u 3 , where k > 0 is the spring constant and is small but may be positive or negative and represents the. The spring-mass system has also a cubic nonlinearity. 1 Mass-Spring-Damper System The most basic system that is used as a model for
{ "domain": "acpm.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109081214212, "lm_q1q2_score": 0.8329956528383808, "lm_q2_score": 0.8418256393148982, "openwebmath_perplexity": 937.6084491184243, "openwebmath_score": 0.5827639102935791, "tags": null, "url": "http://iquk.acpm.it/nonlinear-spring-mass-system.html" }
optimization, statistics, clustering I believe that calculating the mean square error on a solution can be simple. The squared distances of all of the data points in the neighbourhood of the grid point would be: $$mse = \sum_{j = 0}^{g} \sum_{k = 0}^{h} distance^2(\vec{latticePoint_j}, \vec{dataPoint_{j,k}})$$ (Where $g$ is the number of clusters and $h$ is the number of points inside the grid point's neighborhood.) However, I'm not sure how to go about solving for all four variables $m$, $c$, $d$ and $i$ since I'm left with a discrete function. My hope is that since $i$ is fixed and points are distributed reasonably evenly among the clusters this could be done without invoking an overly complicated clustering algorithm.
{ "domain": "cs.stackexchange", "id": 7242, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optimization, statistics, clustering", "url": null }
the-moon, astrophysics, orbital-mechanics Title: Why is the Moon's orbit so complicated? I like to think I have a good enough understanding of astrophysics but there's still one thing that I just can't explain. Why does the Moon orbit the Earth the way it does? Many other moons in the Solar System orbit their planet along the equator and have a nearly circular orbit. After researching, it seems to boil down to two main causes: Since every planet rotates on its axis, it has an equatorial bulge, and that extra mass around its equator creates an unequal gravitational field that over millions of years aligns the satellite's orbit around it. There's a phenomenon called tidal circularization, which on long timescales, acts to dampen the satellite's eccentricity and make its orbit nearly circular.
{ "domain": "astronomy.stackexchange", "id": 4516, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "the-moon, astrophysics, orbital-mechanics", "url": null }
genetics, epigenetics Title: Doubt on genomic code for nucleosome positioning? I was reading "A genomic code for nucleosome positioning" (by Eran Segal et al). And I am having 2 doubts. The figure(b) in this image from the paper shows the graph of fraction (3-bp moving average) of AA/TA/TT dinucleotides of nucleosome dna sequence they analysed statistically as far as I understand. What is 3-bp moving average here? I also don't understand how they chose 0th position (the so called dyad). Also what does it mean to have oscillations (correlation?) in this graph?
{ "domain": "biology.stackexchange", "id": 3587, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, epigenetics", "url": null }
python, python-3.x, multithreading Now that we have the mechanism to print as we want to, you just need to make sure you register the thread before starting it. That will setup the thread-local stdout.
{ "domain": "codereview.stackexchange", "id": 28328, "lm_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, multithreading", "url": null }
Your function $w$ maps complex numbers to complex numbers, so we define a little helper function to map 2D points to 2D points. Then we can directly plot the image of the hyperbolas under that transformation. w[z_] := z^2; apply[w_, pts_] := Through@{Re, Im}@w@({1, I}.#) & /@ pts ParametricPlot[{apply[w, hyperbola1[t]], apply[w, hyperbola2[t]]}, {t, 0, π}, PlotRange -> {-4, 4}, RegionFunction -> Function[{x, y}, -4 <= x <= 4 && -4 <= y <= 4], PlotStyle -> Arrowheads[{{Automatic, 0.5}}]] /. Line -> Arrow Note that the only thing we've changed in the plot is the functions we're plotting: apply[w, hyperbola[t]]. Also note that the orientation of the arrows is consistent with the previous plot.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9632305339244012, "lm_q1q2_score": 0.8187181875186674, "lm_q2_score": 0.8499711737573762, "openwebmath_perplexity": 1870.7970892962162, "openwebmath_score": 0.4286884665489197, "tags": null, "url": "https://mathematica.stackexchange.com/questions/59340/how-do-i-plot-the-images-of-oriented-curves-under-complex-transformation?answertab=votes" }
$$p^{(1)}(m,k) = \frac{m}{\binom{mk}{k}}.\tag{1}$$ If this is what the question was asking, we are done. However, the more likely interpretation is that it asks for the chance that one or more of the hands is a suit. To do this, proceed to find the chance that two pre-designated players are dealt suits. Conditional on the first player being dealt a suit (the chance given by $(1)$), there remain $m-1$ suits. Result $(1)$ applies with $m$ replaced by $m-1$ to give the conditional probability. These two values multiply to give the joint probability $$p^{(2)}(m,k) = p^{(1)}(m,k)p^{(1)}(m-1,k).$$ Continuing this reasoning inductively gives the chance that $s\ge 1$ pre-designated players each are dealt suits, $$p^{(s)}(m,k) = \prod_{i=0}^{s-1} p^{(1)}(m-i,k).\tag{2}$$ The Principle of Inclusion-Exclusion ("PIE") supplies the chance that one or more players (not designated in advance) are dealt suits; it is $$p(m,k) = \sum_{s=1}^m (-1)^{s-1} \binom{m}{s} p^{(s)}(m,k).\tag{3}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713874477227, "lm_q1q2_score": 0.8123187375996685, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 742.6071546877685, "openwebmath_score": 0.8279216289520264, "tags": null, "url": "https://stats.stackexchange.com/questions/288200/what-is-the-chance-that-someone-is-dealt-a-suit-in-the-game-of-bridge" }
504 Exercise 11.5.5 a. Show that See Figure 11.5.5. b. Show that 1 1 1 1 l + 2 + 3 + 4 + — = oo. Figure for Exercise 11.5.5 Graph of y — 1/(1 + 1) and boxes of areas 1,1/2,1/3, • • •. Exercise 11.5.6 Consider the infinite horn, H, obtained by rotating the graph of y = 1/x, 1 < x about the x-axis. See Exercise Figure 11.5.6. a. Show that the volume of the interior of H is ir. b. Show that the surface area of H is greater than. f°° 1 / 27T— dx = oo Ji x c. H, then, has a finite volume and can be filled with paint, but has an infinite surface area and can not be painted! I enjoyed telling a very good class about this one day. The next day Mr. Jacks, a generally casual student, told me he could paint it, and he could. His grade in the course was an A. Can you paint HI CHAPTER 11. APPLICATIONS OF THE FUNDAMENTAL THEOREM 505 Figure for Exercise 11.5.6 An infinite horn, H, obtained by rotating the graph of y — 1/x, 1 < x about the x-axis
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9910145699205374, "lm_q1q2_score": 0.8055633643744986, "lm_q2_score": 0.8128673269042767, "openwebmath_perplexity": 1695.6033027463616, "openwebmath_score": 0.7549728751182556, "tags": null, "url": "https://math.libretexts.org/Courses/Remixer_University/Username%3A_admin/Calc-for-life-science-1570773007.epub/part0005" }
c++, recursion, c++20 Avoiding requires clause if possible Considering the warning potential divide by 0, if-throw statement is added in arithmetic_mean function and population_variance function. Why a new review is being asked for? After using the concept name instead of class in the template parameter list, I am not sure if concept name is still clear. Is it a good idea to remove the prefix is_ in the usage as above? If there is any possible improvement, please let me know. Because this update seems primarily based on the changes to the concepts and requires clauses, that’s what I’m going to focus on. is_do_thingable is an anti-pattern. This is really an abuse of the idea of concepts: template<typename T> concept is_back_inserterable = requires(T x) { std::back_inserter(x); }; // ... template<typename T1, typename T2> concept is_std_powable = requires(T1 x1, T2 x2) { std::pow(x1, x2); };
{ "domain": "codereview.stackexchange", "id": 40147, "lm_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++, recursion, c++20", "url": null }
7E3. Suppose a four-sided die is loaded such that, when tossed onto a table, it shows “1” 20%, “2” 25%, “3” 25%, and “4” 30% of the time. What is the entropy of this die? p <- c(0.2, 0.25, 0.25, 0.3) entropy <- -sum(p * log(p)) entropy ## [1] 1.376227 7E4. Suppose another four-sided die is loaded such that it never shows “4”. The other three sides show equally often. What is the entropy of this die? p <- c(1/3, 1/3, 1/3) entropy <- -sum(p * log(p)) entropy ## [1] 1.098612 7M1. Write down and compare the definitions of AIC and WAIC. Which of these criteria is most general? Which assumptions are required to transform the more general criterion into a less general one?
{ "domain": "amazonaws.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9632305349799242, "lm_q1q2_score": 0.8468210188190776, "lm_q2_score": 0.8791467754256017, "openwebmath_perplexity": 1401.4163433493773, "openwebmath_score": 0.6174958348274231, "tags": null, "url": "https://rstudio-pubs-static.s3.amazonaws.com/780087_a50acc9bce4142ab94d6d94adaa40b53.html" }
python, c++, performance, comparative-review, cython run def run(): void run() { cdef int i, ii, iii cdef int one_thousand = 1000 int one_thousand = 1000; cdef double x = 0.2 double x = 0.2; cdef MathObject objInstance objArray = np.empty(one_thousand, dtype=MathObject) std::vector<MathObject> objArray(one_thousand, x); for i in range(len(objArray)): objArray[i] = MathObject(x) cdef MathObject[:] objArrayiew = objArray
{ "domain": "codereview.stackexchange", "id": 8114, "lm_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, c++, performance, comparative-review, cython", "url": null }
one-sided limit, a lot natural... Fortunately for us, a lot of natural functions are continuous, … how do you the. Defined for all real values.But tan is not equal to the limit a. Height of a hole is the graph if L.H.L = R.H.L = ( i.e... Function 's graph we did for functions of two variables in a similar way as we for! Hot Network questions do the benefits of the following e x tan x of discontinuity that! Have breaks, holes, jumps, etc of continuity of a function at a, there..., rigorous formulation of the intuitive concept of a function is defined and if in brief, it meant the... Its graph is unbroken at a point x=a where f is usually specified but is not equal to the.... Different values at a. following three conditions are satisfied:, jump or gap the... Is in the domain of f. not have breaks, holes, jumps etc. Equal to continuity of a function limit way as we did for functions of two variables at a point given a of! Definition 3 defines what it means for a function whose graph is a
{ "domain": "bestfortnitesettings.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759663238371, "lm_q1q2_score": 0.8152482381700669, "lm_q2_score": 0.831143045767024, "openwebmath_perplexity": 352.7097225441085, "openwebmath_score": 0.8293384909629822, "tags": null, "url": "https://bestfortnitesettings.com/7hbwg/2aa728-continuity-of-a-function" }
ros, vslam, eigen [rosmake-3] Finished <<< rosnode ROS_NOBUILD in package rosnode [rosmake-3] Starting >>> image_transport [ make ] [rosmake-3] Finished <<< image_transport ROS_NOBUILD in package image_transport [rosmake-3] Starting >>> cv_bridge [ make ] [rosmake-3] Finished <<< cv_bridge ROS_NOBUILD in package cv_bridge [rosmake-3] Starting >>> image_geometry [ make ] [rosmake-3] Finished <<< image_geometry ROS_NOBUILD in package image_geometry [rosmake-3] Starting >>> rosmsg [ make ] [rosmake-3] Finished <<< rosmsg ROS_NOBUILD in package rosmsg No Makefile in package rosmsg [rosmake-3] Starting >>> rosservice [ make ] [rosmake-3] Finished <<< rosservice ROS_NOBUILD in package rosservice [rosmake-3] Starting >>> roswtf [ make ] [rosmake-3] Finished <<< roswtf ROS_NOBUILD in package roswtf [rosmake-3] Starting >>> tf [ make ] [rosmake-3] Finished <<< tf ROS_NOBUILD in package tf [rosmake-3] Starting >>> nav_msgs [ make ] [rosmake-3] Finished <<< nav_msgs ROS_NOBUILD in package nav_msgs
{ "domain": "robotics.stackexchange", "id": 4761, "lm_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, vslam, eigen", "url": null }
the probability that their product will be of the form a^2 – b^2 = 2/total two numbers combination = 2/4 Chose 2 = 2/3 Ans is option (A) Senior Manager Joined: 07 Apr 2012 Posts: 441 Re: If two integers are chosen at random out of the set {2, 5, 7, 8}, what [#permalink] ### Show Tags 13 Sep 2014, 10:12 1 This post was BOOKMARKED VeritasPrepKarishma wrote: The question is not so much as whether both the numbers are even or both are odd as whether the product of the numbers can be written as product of two even numbers or two odd numbers. Two numbers are chosen and multiplied. Now they have lost their individual identity. Now you focus on the product and find whether it can be written as product of two numbers which are both odd or both even. Say you took two number 7 and 8 and multiplied them. You get 56. Can you write 56 as product of two numbers such that both are even? Yes, 4 and 14 or 2 and 28. So 56 can be written as a^2 - b^2 in two ways: (9^2 - 5^2) and (15^2 - 13^3). So if you
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551495568569, "lm_q1q2_score": 0.8498415918729684, "lm_q2_score": 0.8807970732843033, "openwebmath_perplexity": 1267.9445386601417, "openwebmath_score": 0.7334719896316528, "tags": null, "url": "https://gmatclub.com/forum/if-two-integers-are-chosen-at-random-out-of-the-set-2-5-7-8-what-114579.html" }
orange I thought I'd be able to use the Merge Data widget to do this by hooking up Selected Data from Summary as the Data and Data from Detail as the Extra Data using a Find Matching Rows join type. However, since each unique Contact ID appears multiple times in Detail, I'm not able to select it in the Merge Data widget. I know it's nonsensical, but I did try to wire Data from Detail as the Data and Selected Data from Summary as the Extra Data with the only Merge Data option that worked (Append columns from Extra Data). This showed me all the data from Detail, but appended with columns from Summary when the appropriate row was selected in Summary. Based on my understanding of Merge Data, this is predicted but (in my use case) unhelpful behavior. In database terms, I'm sort of trying to set up an inner join with a one-to-many relationship between Summary and Detail and, by selecting a row in Summary, to be able to see the related rows in Detail.
{ "domain": "datascience.stackexchange", "id": 2922, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "orange", "url": null }
python, multithreading, sorting, reinventing-the-wheel, mergesort Title: Sorting seems to be slower with 2 threads instead of 1 I'm implementing a simple merge sort to practice with Python's Threads. I've tried to split the job into two threads, that sort normally, then I can join them and merge the result. However, it takes almost twice as long with two threads than it does with the "normal" algorithm. Did I do something wrong or is it normal ? How can I improve this code to make it run faster with two threads ? What advice would you give me ? Thanks a lot. CODE # -*- encoding: utf-8 -*- from collections import deque from random import randint from time import clock from itertools import islice from threading import Thread sort_dict = dict()
{ "domain": "codereview.stackexchange", "id": 20901, "lm_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, multithreading, sorting, reinventing-the-wheel, mergesort", "url": null }
scattering, wavelength Whereas there is a Scalar potential for the Electric field, one can use a Vector Potential for the magnetic field. The field of static fields typically drop off as $1/r^2$. The charge density is proportional to the square of the fields. So the energy density for static fields often drops off as $1/r^4$. Integrate the field over a spherical surface distant from the charges as in Gauss law, you will need to multiply that by a factor of $r^2$ before performing the surface integral. This gives you the flux, dropping off as $1/r^2$. Now if your field drop off as $1/r$, then the flux arbitrarily for away would be independent of the radius. This can happen when charge moves in certain ways. As an example, consider an ideal dipole oscillating at the origin. $$\vec{A}=\frac{\mu_0}{4\pi r}\frac{d\vec{p}}{dt}$$ Where r is distance from origin, $\vec{A}$ is the vector potential and $\vec{p}$ is the possible time varying dipole moment.
{ "domain": "physics.stackexchange", "id": 57001, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scattering, wavelength", "url": null }
python, performance, algorithm, python-3.x, recursion class Solution(object): def make_defaultdict(self): return defaultdict(self.make_defaultdict) def make_trie(self, words): trie = self.make_defaultdict() for word in words: cur = trie for l in word: cur = cur[l] cur['end'] = True return trie def search_trie(self, trie, search_str): matches = [] sub_trie = trie for l in search_str: if l not in sub_trie: return [] sub_trie = sub_trie[l] q = [(search_str + k, sub_trie[k]) for k in sub_trie.keys()] while q: fragment, sub_trie = q.pop(0) if 'end' in sub_trie: matches.append(fragment) else: q.extend([(fragment + k, sub_trie[k]) for k in sub_trie.keys()]) return matches def make_square(self, pos, square, size, trie): if pos == size: return [square]
{ "domain": "codereview.stackexchange", "id": 29170, "lm_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, algorithm, python-3.x, recursion", "url": null }
the application of Boolean algebra, the use of logic graphs, and the use of searching algorithms. Redundancy theorem is used as a Boolean algebra trick in Digital Electronics. They are, 1) The complement of a product is equal to the sum of the complements. The book’s validity depends on 3 boolean … F = ABC + AC + C'D' is there a way to minimise this function even further because i want to make the circuit diagram with only 2 input nand gates . In this section we explore some important tools for manipulating Boolean expressions in order to simplify their hardware implementation. See the image below. Questions is taken from Previous Year Papers. This test is Rated positive by 86% students preparing for GATE.This MCQ test is related to GATE syllabus, prepared by … A basic understanding of this system is indispensable to the study and … Minimization. Minimization of Boolean Expressions. The Overflow Blog Podcast 284: pros and cons of the SPA In mathematics and mathematical logic, Boolean
{ "domain": "kathytaslitzinteriors.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9473810481379379, "lm_q1q2_score": 0.817960856735764, "lm_q2_score": 0.8633916187614823, "openwebmath_perplexity": 791.7693690131123, "openwebmath_score": 0.6016388535499573, "tags": null, "url": "http://kathytaslitzinteriors.com/tutta-colpa-btoxlu/page.php?aea331=boolean-algebra-minimization" }
filters, finite-impulse-response, infinite-impulse-response, frequency-response, poles-zeros Title: Notch filter: differences between IIR and FIR filters I'm trying to understand this great answer from Matt L. . It's said that "One advantage of IIR filters is that steep filters with high stopband attenuation can be realized with much fewer coefficients (and delays) than in the FIR case, i.e. they are computationally more efficient." First of all why this is true? Is this because of poles? Actually this comes from my previous question on removing 400Hz noise. There are two filters for that purpose. The first one is a FIR filter with following frequency response and pole-zero plot: And the second one is a IIR filter:
{ "domain": "dsp.stackexchange", "id": 9202, "lm_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, finite-impulse-response, infinite-impulse-response, frequency-response, poles-zeros", "url": null }
quantum-mechanics, wavefunction, schroedinger-equation Title: What is a wave function? I read about Erwin Schrödinger describing wave particle duality with something called a wave function. What does a wave function mean? So before we get into this there is a few levels of explanation to this and as this seems to be one of your first encounters with the subject I will skimp on mathematical details and rigor and keep the discussion rather shallow. If you are interested in a more detailed account let me know. So first of all let us quickly recap how we normally describe an object, say a particle in classical physics:
{ "domain": "physics.stackexchange", "id": 88550, "lm_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, wavefunction, schroedinger-equation", "url": null }
c# formatter.WriteOutput(ex.Message); } } Program.cs /// <summary> /// The main program for the Simple Interpreter. /// </summary> class Program { static void Main(string[] args) { var formatter = new ConsoleFormatter( intro: "\nWelcome to my Simple Interpreter!\n" + "Please enter a command (or enter \"help\" for help).\n"); var commandHandler = new CommandHandler(formatter); string command; do { formatter.ColorInputBackground(ConsoleColor.DarkBlue); Console.In.SkipBlanks(); command = Console.In.ReadLetters().ToLower(); } while (commandHandler.Execute(command)); formatter.MakeOutputInvisible(); Console.ReadLine(); } } Questions My main question is Where does my code stray from idiomatic C#? Additional Questions:
{ "domain": "codereview.stackexchange", "id": 3419, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#", "url": null }
• Note: "Trapezium" (UK) = "Trapezoid" (US). Another confusion. – GEdgar May 21 '15 at 12:04 • I like your first picture. Your second will only really help if there is confusion about the definitions of the shapes involved. I don't think that's the case. – Teepeemm May 21 '15 at 15:04 • @Teepeemm Judging from the way the instructor seemed to have answered the question, it does seems the case that (s)he is confused about the definitions of the shapes involved. – Adhvaitha May 21 '15 at 15:49 • I disagree. I think the second picture only helps if someone thinks the first picture is a square. The fundamental problem the teacher and the test makers assumed that another side or angle were congruent just because they appeared to be. – Teepeemm May 21 '15 at 17:36 • I think the first picture would be better if it had a 9.1 and an 8.9 or whatever it ends up being with an 89 degree angle or so, and the other angles marked. – Random832 May 22 '15 at 2:36
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446463891304, "lm_q1q2_score": 0.8092379707860908, "lm_q2_score": 0.8311430394931456, "openwebmath_perplexity": 982.63038793626, "openwebmath_score": 0.56166672706604, "tags": null, "url": "https://math.stackexchange.com/questions/1290291/identification-of-a-quadrilateral-as-a-trapezoid-rectangle-or-square/1291164" }
vba, excel Dim K_ct_tot As Integer, L_ct_tot As Integer, M_ct_tot As Integer Dim N_ct_tot As Integer, O_ct_tot As Integer, P_ct_tot As Integer Dim Q_ct_tot As Integer, R_ct_tot As Integer, S_ct_tot As Integer Dim T_ct_tot As Integer, U_ct_tot As Integer, V_ct_tot As Integer Dim W_ct_tot As Integer, X_ct_tot As Integer, Y_ct_tot As Integer Dim Z_ct_tot As Integer, FULLY_ct_tot As Integer Dim segCount As Integer Dim CountRedux As Boolean, continue As Integer
{ "domain": "codereview.stackexchange", "id": 26122, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
dataset, categorical-data, scoring, normalization, weighted-data Title: Creating validation data for model comparison I am working on building a scoring algorithm for student data, say the attributes are : name, location, age, class, school_name, skill1, skill2, skill3 based on these data I need to create a student score. I need to assign weight-ages for age, class, school_name skills and come up with a score for student. say I have 2 scoring models like : score_1 = x1*location_weight + x2*age_weight + x2*class_weight + x3*school_name_weight + x4*skill1_weight + x5*skill2_weight + x6*skill3_weight score_2 = y1*location_weight + y2*age_weight + y2*class_weight + y3*school_name_weight + y4*skill1_weight + y5*skill2_weight + y6*skill3_weight
{ "domain": "datascience.stackexchange", "id": 442, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dataset, categorical-data, scoring, normalization, weighted-data", "url": null }
homework-and-exercises, newtonian-mechanics, conservation-laws, collision Because the particles have the same mass and the total momentum in the COM frame is zero both particles are coming in at a speed of $v/2$, and because we know the first particle goes out at 90 degrees the second particle must leave at 90 degrees in the opposite direction. Conservation of energy means all velocities are $v/2$. So just transform back to the lab frame to get the final velocity of $m_2$ in the lab frame.
{ "domain": "physics.stackexchange", "id": 4398, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, conservation-laws, collision", "url": null }
gauss-law (*) Examples of solid angles $\:(\rho\pi, \rho=1/4,1/2,1,2,4)\:$ are shown in the the Figure Solid Angles under my answer here : Flux through side of a cube. An other method to find a solution to this specific problem is based on the fact (could be proved easily) that in case of a solid angle $\:\Theta\:$ formed by three rays $\:\epsilon_{1},\epsilon_{2},\epsilon_{3}\:$ with $\:\epsilon_{3}\:$ normal to the plane of $\:\epsilon_{1},\epsilon_{2}\:$ (Figure 04) we have \begin{equation} \Theta=\phi \quad \Longrightarrow \quad \tan\Theta=\tan\phi \tag{13} \end{equation} where $\:\phi\:$ the plane angle formed by the rays $\:\epsilon_{1},\epsilon_{2}$. These are the cases of Figures 02 and 03.
{ "domain": "physics.stackexchange", "id": 48528, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gauss-law", "url": null }
quantum-mechanics, operators, time-evolution, biophysics, quantum-tunneling Here, $\Psi_m$ and $E_m$ are the corresponding eigenvalues and eigenfunctions of the Hamiltonian. The reason this confuses me is that I am used to think of transition probabilities as being proportional to $\langle A|H|D\rangle$, per the Schrödinger equation. I had always thought that the time evolution operator $e^{-iHt/\hbar}$ introduces a harmless phase factor which does not in and of itself determine quantum dynamics.
{ "domain": "physics.stackexchange", "id": 92321, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, time-evolution, biophysics, quantum-tunneling", "url": null }
sql, csv, database, php5, laravel }) .catch(function(response){ console.log('FAILURE!!'); console.log(response); }) } } } </script> I defined the fields that I wanted to be required first. Then, I defined a One-to-Many relationship between an account table and a contacts table where the contact id is the account's name in the account's table in the SQL database $account = new Account(); $mapping = $request->$mapping; $account->name = $rowProperties[$mapping['account_name']]; //One-To-Many Eloquent Relationship that links a table of Account Names in the Account's //table to contact Account_ID's in the Contact tables //$contact->id = $account->id; $account->save();
{ "domain": "codereview.stackexchange", "id": 37597, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, csv, database, php5, laravel", "url": null }
I think I making a mistake due to the repetition of "E" ... Can any one of you tell me a better way which avoids the problem I am being having . 2. Feb 6, 2013 ### HallsofIvy If "at least one letter must be E", that means that the other two letters must be chosen from "GREN". That is, the first letter must be one of those 4 letters, the second one of the three remaining letters. How many is that? But then we can put the "E" that we took out into any of three places: before the two, between them, or after the two letters so we need 3 times that previous number. 3. Feb 6, 2013 ### hms.tech 4P2 = 4*3 According to your method the answer should be 12 * 3 = 36 (The correct answer in the solutions is "27") Clearly your method (as did mine) repeats some of the permutations : You didn't take onto account that the two "E" are not distinct. Thus in those permutations where we chose two "E" were repeated. see : GEE , EEG, EGE ENE, EEN, NEE REE, ERE , EER 4. Feb 6, 2013 ### CAF123
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812354689082, "lm_q1q2_score": 0.8679130193855855, "lm_q2_score": 0.8962513807543223, "openwebmath_perplexity": 1166.250459490498, "openwebmath_score": 0.8493869304656982, "tags": null, "url": "https://www.physicsforums.com/threads/permutations-hard-question.669846/" }
cosmology, spacetime, curvature Title: Why do we look at non-flat geometries in Cosmology? In Cosmology we use the Robertson-Walker-Metric which follows from the cosmological principle & mathematics. This metric leaves three cases for a possible curvature (or geometry) of space (not spacetime). The curvature is describes in this metric with a curvature parameter $k$ which can be -1,0,1. Often different models are solved for special cases (like $k=-1$ and we just have matter etc.).
{ "domain": "physics.stackexchange", "id": 27987, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, spacetime, curvature", "url": null }
No, absolutely not. Assuming the axiom of choice, let $\kappa$ be any cardinal greater than $2^\omega=|\Bbb R|$; then $\kappa$ in its natural order is a linear order of greater cardinality than $\Bbb R$. If the axiom of choice fails in such a way that $\Bbb R$ cannot be well-ordered, there is still a well-ordered set that cannot be embedded in $\Bbb R$, the Hartogs ordinal of $\Bbb R$. - Actually, no uncountable ordinal can be embedded in $\mathbb{R}$. I give the argument in my answer. – Michael Greinecker Dec 10 '12 at 7:20 @Michael: I know; after all, $\Bbb R$ is ccc, hereditarily separable, etc. I was deliberately concentrating on the cardinality aspect. – Brian M. Scott Dec 10 '12 at 7:22
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964173268184, "lm_q1q2_score": 0.8125042725411928, "lm_q2_score": 0.8244619242200082, "openwebmath_perplexity": 189.29100340848777, "openwebmath_score": 0.9235311150550842, "tags": null, "url": "http://math.stackexchange.com/questions/255145/is-the-set-of-real-numbers-the-largest-possible-totally-ordered-set/255152" }
react.js, jsx, to-do-list render() { const { filter } = this.state; const { tasks, toggleCompleted, editTodo, deleteTodo } = this.props; const filteredTasks = tasks.filter(FILTER_MAP[filter]); return ( <div> <FilterBar filter={filter} updateFilter={this.updateFilter} /> <TaskList tasks={filteredTasks} filter={filter} toggleCompleted={toggleCompleted} editTodo={editTodo} deleteTodo={deleteTodo} /> </div> ); } } TaskTable.propTypes = { tasks: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.string.isRequired, name: PropTypes.string.isRequired, completed: PropTypes.bool }) ).isRequired, toggleCompleted: PropTypes.func.isRequired, editTodo: PropTypes.func.isRequired, deleteTodo: PropTypes.func.isRequired };
{ "domain": "codereview.stackexchange", "id": 40215, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "react.js, jsx, to-do-list", "url": null }
object-oriented, strings, regex, php5 public function stripWithPreservedLineBreaks($html_text) { $html_text = $this->convertLineBreakTagsToNewlines($html_text); return $this->strip($html_text); } private function convertLineBreakTagsToNewlines($html_text) { return preg_replace(self::BR_TAG_REGEX, PHP_EOL, $html_text); } public function strip($html_text) { return strip_tags($html_text); } } What to take away from this You did not specify any visibility modifiers for your functions. Always make clear which functions are meant to be exposed (public) and which are internal (private/protected). Naming is extremely important in code readability. Name your classes, methods, variables and parameters appropriately. Always test your code!
{ "domain": "codereview.stackexchange", "id": 20231, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "object-oriented, strings, regex, php5", "url": null }
σx. How to Get L1 on Your Calculator ( TI 83 or TI 84 ) It is very easy to accidentally delete your L1, L2, etc from the TI 83 or 84. The key-by-key correspondence is relatively the same, but the 84 features some improved hardware. Modeling (>25%) However, those categories are vague. There are two possible ways to do this. See more ideas about physics and mathematics, math formulas, mathematics. Choose 1:Edit. Many different uses will be explored. Description. Difference of squares, solving simultaneous equations ti 83 plus, solve elementary math factorial 4! chart, statistics formula cheat sheet, square roots and exponents, 8th grade pre algebra, math pizzazz book d 35. Use STAT, Edit. After you press ENTER, the calculator will return to the home screen. When you have an expression for the wave function of a particle, it tells you everything that can be known about the physical system, and different values for observable. Google users found us yesterday by typing in these math terms :
{ "domain": "allenarebene.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290938892911, "lm_q1q2_score": 0.8366648224020055, "lm_q2_score": 0.861538211208597, "openwebmath_perplexity": 2831.711401185196, "openwebmath_score": 0.27203071117401123, "tags": null, "url": "http://allenarebene.it/ti-84-statistics-functions-cheat-sheet.html" }
c++, multithreading, concurrency, queue std::vector<TaskQueue> m_queues; size_t m_queueIndex{ 0 }; const size_t m_queueCount; const size_t m_tryoutCount{ 1 }; std::vector<std::thread> m_threads; }; WorkStealingQueueThreadPool::WorkStealingQueueThreadPool(size_t threadCount) : m_queues{ threadCount } , m_queueCount{ threadCount } { for (size_t index = 0; index != threadCount; ++index) m_threads.emplace_back([this, index] { Run(index); }); } WorkStealingQueueThreadPool::~WorkStealingQueueThreadPool() { for (auto& queue : m_queues) queue.SetDone(true); for (auto& thread : m_threads) thread.join(); } void WorkStealingQueueThreadPool::Run(size_t queueIndex) { while (!m_queues[queueIndex].IsDone()) { TaskQueue::TaskType task; for (size_t n = 0; n != m_queueCount*m_tryoutCount; ++n) { if (m_queues[(queueIndex + n) % m_queueCount].TryPop(task)) break; }
{ "domain": "codereview.stackexchange", "id": 26525, "lm_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, concurrency, queue", "url": null }
As guest mentioned in a comment, the two expressions are equivalent. Suppose $$x > 0$$ so the logarithm is defined without any problems. For logarithms, $$\log(2x) = \log (2) + \log (x)$$. Consider graphing $$x \mapsto \log (x)$$ and $$x \mapsto \log (2x)$$, and maybe their difference, to illustrate. A good window would be $$x=1\ldots 10$$, $$y=0\ldots 5$$, as recommended by user52817. Hence, the first integral equals $$\log (x) + \log (2) + C_1$$, where $$C_1$$ is the constant of integration. The second integral equals $$\log (x) + C_2$$, where $$C_2$$ is the constant of integration. To see that these are the same thing, choose $$C_1 = C_2 - \log(2)$$. In particular, as $$C_1$$ goes through all the real numbers, and as $$C_2$$ does so, you get precisely the same collections of functions from both integrals.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9597620562254525, "lm_q1q2_score": 0.8119034456242498, "lm_q2_score": 0.8459424295406088, "openwebmath_perplexity": 325.3403393308417, "openwebmath_score": 0.8432145714759827, "tags": null, "url": "https://matheducators.stackexchange.com/questions/14677/integrating-derivatives-over-functions-problem" }
python, beginner, flask, sqlalchemy Title: Utility Class for CRUD Operations in a Flask App I'm new to Flask and Python and am trying to sort out the most pythonic way to modularize my utilities. I have models.py which have my sqlalchemy models and views.py which handles the routes, etc... My util.py basically handles the queries and data manipulation between the two but I want to know if I'm doing it right. I originally had a bunch of loose functions but I recently began compounding them into classes.
{ "domain": "codereview.stackexchange", "id": 17647, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, flask, sqlalchemy", "url": null }
zoology has been downvoted so much. As to why I answered it anyway, the question seemed genuine and it didn't seem like you were just trying to lazily answer a question from class. Besides, I think even a question that isn't ideal can teach. By answering, I show my reasoning which may help teach a reader how to answer questions themselves or ask a better question next time.
{ "domain": "biology.stackexchange", "id": 11167, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "zoology", "url": null }
ros -- Configuring incomplete, errors occurred! See also "/home/limiarf/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/limiarf/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed What should I do? Thanks Younès Originally posted by younes on ROS Answers with karma: 1 on 2015-05-20 Post score: 0 Original comments Comment by gvdhoorn on 2015-05-20: For future questions: please use the preformatted text button on the bar to format console copy/pastes. It's the button with 101010 on it. The error you get tells you something pretty clear : Multiple packages found with the same name "ros": - ros - share/ros Did you try to investigate that? It should be a conflict. Originally posted by Arowana with karma: 381 on 2015-05-21 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 21738, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
simulation, multi-robot Comment by Ashwin27 on 2014-10-24: Sorry about that, Sebastien, I downloaded the packages again and it's working now. Although, yes, the Husky's odometry does seem to be causing issues. Still, it's running now, I'll try to figure the rest out and keep you posted, if I get the maping to run better. Comment by Ashwin27 on 2014-10-24: And thank you so much! It really is brilliant of you to offer so much help.
{ "domain": "robotics.stackexchange", "id": 19737, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "simulation, multi-robot", "url": null }
ros-kinetic /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libflycapture.so: undefined reference to ‘powf@GLIBC_2.27’ collect2: error: ld returned 1 exit status make[2]: *** [devel/lib/autoware_pointgrey_drivers/ladybug_camera] Error 1 make[1]: *** [CMakeFiles/ladybug_camera.dir/all] Error 2 make: *** [all] Error 2 --- Failed <<< autoware_pointgrey_drivers [ Exited with code 2 ]
{ "domain": "robotics.stackexchange", "id": 33315, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros-kinetic", "url": null }
javascript, json, ecmascript-6, react.js Here is a Codepen of the app. Ok, looks like a neatly written React. Let's see what I can do. <div className="main-content col-sm-12"> <div className="left-sided-lg-top-otherwise col-lg-8 col-md-12 col-sm-12 col-xs-12"> {loading ? <Loading /> : <BigStory newsItems={newsItems[0]}/> } {loading ? <Loading /> : <MediumStory newsItems={newsItems[1]}/> } {loading ? <Loading /> : <MediumStory newsItems={newsItems[2]}/> } <div className="col-sm-4 col-xs-12"> {loading ? <Loading /> : <SmallStory newsItems={newsItems[3]}/> } {loading ? <Loading /> : <SmallStory newsItems={newsItems[4]}/>
{ "domain": "codereview.stackexchange", "id": 17564, "lm_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, json, ecmascript-6, react.js", "url": null }
My objective: I would like to plot the region of values of $$(x_{33},x_{34})$$ for which there exists $$(x_1,...,x_{32})$$ such that $$(x_1,...,x_{34})$$ satisfies $$1),2),3)$$. Question: Can Mathematica allow me to plot the desired $$2$$-D region? The tricky part here is to explore the set of solution of $$1),2)$$ with respect to $$(x_1,...,x_{32})$$. I typically use Matlab which, however, to the best of my knowledge, does not have packages doing what I want due to the high dimension of the problem. Clarification: I have never used Mathematica (hence, I don't have a code of attempts to show you), but I'd be happy to start studying it if you tell me that it can help me with my question. Clarification 2: there exists at least one value of $$(x_1,...,x_{34})$$ satisfying 1),2),3). It is here https://filebin.net/e7k3749uxd2f1dg4 under the name possible_solution_complete.mat.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.959154281754899, "lm_q1q2_score": 0.8013576099839723, "lm_q2_score": 0.8354835350552604, "openwebmath_perplexity": 2755.3406469705014, "openwebmath_score": 0.20514288544654846, "tags": null, "url": "https://mathematica.stackexchange.com/questions/203689/plot-feasible-region-of-a-high-dimensional-lp-only-along-some-dimensions" }
ros, publisher Title: publishers two message on the same topic not working for subscriber Hi everyone; I am sending two deferent data message publishers on the same topic, and I see both data publisher in output when I use echo. I use two node and I make the subscriber from this publisher I see just the last message publish. Always loses the first message and stay the last. M y code is: output_modem_publisher_ = nh_.advertise<std_msgs::String>(modem_topic_, 100); modemin_subscriber_ = nh_.subscribe(modem_in_, 100, &Depth::modeminCallback, this); void Depth::callPublisher() { std::string out_modem2; std::stringstream monsun2; monsun2 << 2 << "@" << "d"; out_modem2 = monsun2.str(); std_msgs::String m2; m2.data = out_modem2; output_modem_publisher_.publish(m2);
{ "domain": "robotics.stackexchange", "id": 13450, "lm_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, publisher", "url": null }
proteins, blast The peptide is patented by the person who publishes all the papers about it's benefits. The original work describing the peptide was published in a brand-new journal; I haven't found any evidence that the journal actually exists. I suspect it's a creation of the person who "published" all of its content, including a dozen first-authored papers in the first year that this peptide was discovered. The name: BPC, stands for "Body Protective Compound". So, before doing this research categorizing all the ways that it protects the body, it was already pre-ordained with the name "body protective compound". I assume this is because the author already knew what his results were going to show, because he planned to make it all up.
{ "domain": "biology.stackexchange", "id": 12389, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "proteins, blast", "url": null }
beginner, vba, excel Private Sub CmboYear_DropButtonClick() 'Populate Control Me.CmboYear.AddItem "2015" Me.CmboYear.AddItem "2016" Me.CmboYear.AddItem "2017" Me.CmboYear.AddItem "2018" Me.CmboYear.AddItem "2019" Me.CmboYear.AddItem "2020" Me.CmboYear.AddItem "2021" Me.CmboYear.AddItem "2022" Me.CmboYear.AddItem "2023" Me.CmboYear.AddItem "2024" Me.CmboYear.AddItem "2025" Me.CmboYear.AddItem "2026" Me.CmboYear.AddItem "2027" Me.CmboYear.AddItem "2028" Me.CmboYear.AddItem "2029" Me.CmboYear.AddItem "2030" Me.CmboYear.AddItem "2031" Me.CmboYear.AddItem "2032" Me.CmboYear.AddItem "2033" Me.CmboYear.AddItem "2034" Me.CmboYear.AddItem "2035" End Sub Private Sub CmdEnter_Click() Dim Days As Integer Dim StartDate As Date StartDate = CDate("1-" & CmboMonth.Value & "-" & CmboYear.Value) Days = (DateDiff("d", StartDate, DateAdd("m", 1, StartDate))) - 1
{ "domain": "codereview.stackexchange", "id": 13528, "lm_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, vba, excel", "url": null }
a parallelogram are equal in length. There are three special types of a parallelogram. Then ask the students to measure the angles, sides etc.. of inscribed shape and use the measurements to classify the shape (parallelogram). The Crossword Solver finds answers to American-style crosswords, British-style crosswords, general knowledge crosswords and cryptic crossword puzzles. Parallelogram: Definition. 3 represents a rhombus with sides AB = BC = CD = DA and diagonals intersecting at right angles. We will try to find the right answer to this particular crossword clue. Here are different types of Parallelogram and their properties. Geometrically, polygons are related with their duals i.e. So, in a hypothetical parallelogram ABCD, moving clockwise, starting from point A at the top left of the parallelogram, you see that side AB is parallel to side DC and side BC is parallel to side AD. In a hypothetical rectangle ABCD, moving clockwise, starting from point A on the top left, you see that
{ "domain": "com.br", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9585377261041521, "lm_q1q2_score": 0.8108677328268771, "lm_q2_score": 0.8459424295406088, "openwebmath_perplexity": 1170.6445476133808, "openwebmath_score": 0.4068468511104584, "tags": null, "url": "https://d3system.com.br/5dd73/k510st.php?page=4e7070-types-of-parallelogram" }
for angular SHM. The rod assembly is supported by ball-and-socket joints at A and B. 10) The kinetic energy of rotation about the pivot point is. Attach the string to the pendulum clamp. z The advantages. Find (a) using conservation of energy, the velocity of the center of mass when the sphere is at the bottom of the incline and (b) using F net = ma and t net = Ia, (i) the acceleration of the center of mass, (ii) the frictional force that acts on the sphere, and (iii) the speed of the sphere at the bottom of the incline. With force and motion sensors, a laser, laser switch, and DataStudio software, students can collect real-time data of the period, velocity, and acceleration of the pendulum’s oscillations. Centripetal force is greatest while the pendulum is right above the rotating axis, and at 0 when it's 90 degrees on either side and at the bottom. A pendulum bob is released from some initial height such that the speed of the bob at the bottom of the swing is 1. b) Find the new
{ "domain": "detectorband.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147153749275, "lm_q1q2_score": 0.8060722994664742, "lm_q2_score": 0.8289388125473628, "openwebmath_perplexity": 391.47228602467754, "openwebmath_score": 0.7101962566375732, "tags": null, "url": "http://detectorband.it/acceleration-of-a-pendulum-at-the-bottom.html" }
ros, gazebo, simulation, simulator-gazebo, gazebo-worlds <model:physical name="landscape"> <xyz>0 0 0</xyz> <rpy>0 0 0</rpy> <static>true</static> <body:trimesh name="landscape_body"> <geom:trimesh name="landscape_geom"> <scale>1.0 1.0 1.0</scale> <mesh>rolling_landscape_120m.stl</mesh> <visual> <scale>1.0 1.0 1.0</scale> <mesh>rolling_landscape_120m.stl</mesh> <genTexCoord>true</genTexCoord> <material>Gazebo/GrassFloor</material> </visual> </geom:trimesh> </body:trimesh> </model:physical>
{ "domain": "robotics.stackexchange", "id": 7947, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo, simulation, simulator-gazebo, gazebo-worlds", "url": null }
everyday-chemistry, home-experiment $$\ce{CO2 (g) + H2O (aq) <=> H2CO3 (aq)}$$ Because the bottle (in first approximation) is a closed system, there is an established equilibrium between the "air" in the bottle (gaseous $\ce{CO2}$) and the dissolved $\ce{CO2}$. Once the bottle is opened the equilibrium is disrupted and the dissolved carbon dioxide is no longer as soluble as before. If you close the bottle again and use the little pump you essentially add pressure again, shifting the equilibrium back to where more dissolved carbon dioxide is stable. It won't be as effective as the factory produced bottle, but it will slow down loosing the fizz. The volumes also play some role here, ideally the aqueous phase should be much larger than the gaseous phase, as you need more molecules producing the pressure if you have more space. An half empty bottle therefore is not ideal to start with.
{ "domain": "chemistry.stackexchange", "id": 9048, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "everyday-chemistry, home-experiment", "url": null }
I thought we were to essentially make the assumption that we were viewing half of the surfaces of the Sun and the Moon, i.e., using: $\displaystyle \lim_{d\to\infty}\frac{d}{2(R+d)}=\frac{1}{2}$ so that we could use similarity, but in fact, similarity is preserved without this assumption. From the very beginning then, we could have simply stated: $\displaystyle \frac{R_S}{R_M}=\frac{r_S-R_E}{r_M-R_E}$ and avoided the vast majority of the algebra above. So, using $\displaystyle R_E=6378.1\text{ km}$ and the other given values, we find (to 3 decimal places): $\displaystyle R_S\approx6.87\times10^5\text{ km}$ #### CaptainBlack ##### Well-known member I am certain the method soroban has posted (or something similar) is what you are expected to use, but...let's see if we can make it a bit more complicated. Normally, distances between celestial bodies is center-to-center. Let's assume our observer is on the line which connects the centers of the the Earth and the other bodies.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9883127430370157, "lm_q1q2_score": 0.8235853207240438, "lm_q2_score": 0.8333245994514084, "openwebmath_perplexity": 638.3034237440278, "openwebmath_score": 0.8342084884643555, "tags": null, "url": "https://mathhelpboards.com/threads/word-problem-involving-algebra-angles.2615/" }
The question comes from the Chinese Mathematical Olympiad training team and there is no answer provided. # Source: • See Q.25 here (one of the official accounts that provides Chinese MO questions on January $$23^{\rm rd}$$, $$2018$$) • It has also appeared here (A blog from the person who set this question on December $$17^{\rm th}$$, $$2013$$). • This looks like a problem you have collected from / inspired by some source. According to recent discussions in Meta, we are looking forward to including sources for all applicable questions. Can you provide the source by editing the question?Refer-math.meta.stackexchange.com/questions/29290/… Oct 22 '18 at 14:10 • See question #25 here. The question first appeared here from the same person. Oct 22 '18 at 14:42 • I have edited your question. Do include source in your future questions. Oct 22 '18 at 14:46 • @Tianlalu I have a proof for $\left(2-\frac{2}{2n+1}\right)$ instead $\left(2-\frac{7\ln2}{8\ln{n}}\right).$ Feb 9 '19 at 12:38
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707966712549, "lm_q1q2_score": 0.81018058761114, "lm_q2_score": 0.8289388125473628, "openwebmath_perplexity": 428.02789017450675, "openwebmath_score": 0.5101738572120667, "tags": null, "url": "https://math.stackexchange.com/questions/2952345/prove-a-strong-inequality-sum-k-1n-fracka-1a-2-cdotsa-k-le-left2-f" }
ros2 Title: How to receive subscription callbacks while a loop is running? Software: python, ros2 (foxy) I have a main loop in my node, and I would also still like to receive updates from a subscription - however, I can't quite figure out how to make it work. I tried to play around with the executor but that didn't go quite right... Any help or pointers in the right direction would be greatly appreciated. Simple example, starting with the simple subscriber: # subscriber import rclpy from rclpy.node import Node from std_msgs.msg import String class MinimalSubscriber(Node): def __init__(self): super().__init__('minimal_subscriber') self.subscription = self.create_subscription( String, 'topic', self.listener_callback, 10) self.run_loop() def run_loop(self): while True: pass def listener_callback(self, msg): self.get_logger().info('I heard: "%s"' % msg.data)
{ "domain": "robotics.stackexchange", "id": 37696, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
quantum-algorithms If we look at what we wanted to calculate, 2+1 and 1+2, we see that both our answers (two times the answer 3) are indeed present in the set of outcomes. However, a) there are a lot of other answers b) we can not trace which answer corresponds to 2+1, and which to 1+2 So my questions: a) Is it correct that for the addition of two sets of randomly chosen variables, we are not guaranteed to see exponential scaling (unless we want to add all values 0 to 2^n with themselves) b) Is it correct that, when doing simple classical addition, we loose track of the mapping from input to output And as a bonus, does the following hold: When performing the computation as above, the usability would be the same (or worse, as the mapping from input to output is lost) as a lookup table with the same number of input values, as when we have two registers in superposition, we will always receive the same output distribution Does “quantum registers with n qubits are able to hold $2^n$
{ "domain": "quantumcomputing.stackexchange", "id": 298, "lm_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", "url": null }
special-relativity Title: What happens when a moving observer meets a stationary observer in special relativity? I understands how the time dilation work. The derivation of time dilation perfectly understandable for me. However the thought that two observers observes that time dilated for each other do puzzles me. For instance, observer A in his inertial frame of reference observed observer B in his own inertial frame of reference moving away at a certain velocity. Observer A observed that B's time is slowed (by whatever feasible measure), whereas B observed A's time slowed. What if B changes his direction of motion, heading back toward A. According to relativity, their time is still dilated.
{ "domain": "physics.stackexchange", "id": 27251, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity", "url": null }
classification, keras, tensorflow, class-imbalance, weighted-data Title: Specifying class or sample weights in Keras for one-hot encoded labels in a TF Dataset I am trying to train an image classifier on an unbalanced training set. In order to cope with the class imbalance, I want either to weight the classes or the individual samples. Weighting the classes does not seem to work. And somehow for my setup I was not able to find a way to specify the samples weights. Below you can read how I load and encode the training data and the two approaches that I tried. Training data loading and encoding My training data is stored in a directory structure where each image is place in the subfolder corresponding to its class (I have 32 classes in total). Since the training data is too big too all load at once into memory I make use of image_dataset_from_directory and by that describe the data in a TF Dataset: train_ds = keras.preprocessing.image_dataset_from_directory (training_data_dir,
{ "domain": "datascience.stackexchange", "id": 9412, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classification, keras, tensorflow, class-imbalance, weighted-data", "url": null }
linux /opt/ros/kinetic/share/rosbash/rosbash:962: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:963: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:964: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:965: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:966: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:967: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:968: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:969: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:970: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:971: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:972: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:973: command not found: complete /opt/ros/kinetic/share/rosbash/rosbash:974: command not found: complete
{ "domain": "robotics.stackexchange", "id": 26281, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "linux", "url": null }
homework-and-exercises, soft-question, terminology, quantum-optics Title: Superscript on density matrix I have been asked in homework to solve the optical bloch equation for the initial condition of $\rho_{22}=0,\rho_{12}=0$. Professor gave a hint of the general equation and let us carry it from here. The general equation is, $\rho_{ij}=\rho_{ij}^{(1)}+\rho_{ij}^{(2)}e^{i\Omega t}+\rho_{ij}^{(3)}e^{-i\Omega t}$. I don't understand the superscript on density matrix. Could you tell me what it is? I believe your professor's trying to tell you that the general solution will be a sum of three terms, and he could have just as easily used $f_{ij}$, $g_{ij}$ and $h_{ij}$ for the three superscript terms. Edit: In other words, you're Matrix $\rho$ can be expressed as a sum of matrices $\rho^{(1)}$, $\rho^{(2)}$, which is proportional to $e^{i\Omega t}$ and as such has a phase that rotates with frequency $\Omega$, and a counter-rotating term $\rho^{(3)}$ proportional to $e^{-i\Omega t}$
{ "domain": "physics.stackexchange", "id": 22658, "lm_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, soft-question, terminology, quantum-optics", "url": null }
python, random, simulation Title: Change random list of numbers into all 5's using simple evolution simulation This is supposed to be an evolutionary algorithmic program, and I'm not sure if it does what it's supposed to do. It is supposed to take a random list of numbers (containing at least one 5), and over many generations, increase the probability of 5's reproducing, thus having the 5's eventually taking over the output. Is this an accurate representation of an evolutionary algorithm? If so, how can I make it better, and if not, how can I make it one? import random as r import os import sys import time from subprocess import call #call('color a', shell=True) class Entity(object): def __init__(self, number): self.number = number self.chance = 10 self.age = 0 class Fitness(object): def __init__(self, population): self.population = population
{ "domain": "codereview.stackexchange", "id": 7582, "lm_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, random, simulation", "url": null }
neural-networks, machine-learning, deep-learning, classification, facial-recognition What can you do in your case? Let us assume that you are going to train your neural network to recognize if an input image is a cat or not. You will use a Convolutional Neural Network (CNN) and train it to recognize if the input is cat or not. The not part means that you have to include a lot of examples in your training data that are not cat. In the perfect case you will be able to show it everything that is not a cat and classify it as such. Also you show it multiple images of what a cat is. CNNs are really great for this application. You might want to research regarding this and see what kind of CNN best suits your application. If you don't have gazillion samples of what a cat is not then you can use regularization techniques like dropout and batch normalization. PS: For more details please mention what strategies you have used up till now. Also it would be better if you can share what your desired task is.
{ "domain": "ai.stackexchange", "id": 2788, "lm_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, machine-learning, deep-learning, classification, facial-recognition", "url": null }
# If $\sum_{1}^{\infty} a_n$ be absolutely convergent then how to show $\sum_{1}^{\infty} a_n$ is also convergent? If $\sum_{1}^{\infty} a_n$ be absolutely convergent then how to show $\sum_{1}^{\infty} a_n$ is also convergent? The proof of this question in my textbook: Let $s_k := \sum_{1}^{k} a_n$ and $t_k := \sum_{1}^{k} |a_n|$. Then using m>k, $$|s_m - s_k|= |\sum_{k+1}^{m}a_n| \leq \sum_{k+1}^{m}|a_n| = t_m -t_k \to 0.$$ I am really unsure about the above inequality and how that has been used to prove the theorem ? Also I understand that $|t_m -t_k| < \epsilon$, but I am unsure how this implies that $t_m-t_k \to 0$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846691281407, "lm_q1q2_score": 0.8256540249299134, "lm_q2_score": 0.8438950966654774, "openwebmath_perplexity": 252.6674931390069, "openwebmath_score": 0.9041002988815308, "tags": null, "url": "https://math.stackexchange.com/questions/2062249/if-sum-1-infty-a-n-be-absolutely-convergent-then-how-to-show-sum-1?noredirect=1" }
ros, moveit Title: How to move specific joint only using MoveIt? I'm using MoveIt interface to control my Yumi Robot either by setting the joints value or the Pose values. What I need to do is changing the value of one joint only (joint-6) without changing the other joint values. Thank you in advance. Originally posted by Ahmad on ROS Answers with karma: 41 on 2017-12-05 Post score: 1 I just solved it by some coding I get the current state of joints and copy them to a variable, and then just edit the needed joint only. here is the code std::vector<double> x; group.getCurrentState() ->copyJointGroupPositions(group.getCurrentState() ->getRobotModel() ->getJointModelGroup(group.getName()), x); x[/joint number/]=/value/; The code is available in ROS book chapter 6 6.2 Planning to a joint goal Originally posted by Ahmad with karma: 41 on 2017-12-06 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 29527, "lm_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", "url": null }
are numbers that can be in! The numbers that can be re-written as 16 5 and a denominator can... Negative sign either in front or with the numerator and a denominator is rational and y is rational and is! Terminate or have a numerator and that is verified for rational numbers equation. Zero as a fraction with the numerator and a denominator, English dictionary definition of numbers... What a nonzero rational number is a rational number terminates after a finite number of digits p. q,. Zero ( 0 ) is a number that can be written as 0/1, which equals.... 5 } \ ), etc that can be written in the form p/q because any that... X + 3 x 2 – 8 x + 3 where m n! Number so it is a number capable of being expressed as a fraction synonyms, rational because... B not equal to zero verified for rational numbers are rational numbers and real numbers due its... Negative rational number mathematical notation in the form p/q and √2 are of. All the numbers that are not rational are called Irrational
{ "domain": "quali-a.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241929723293, "lm_q1q2_score": 0.8455874213852973, "lm_q2_score": 0.8723473813156294, "openwebmath_perplexity": 328.20553820293884, "openwebmath_score": 0.8399621844291687, "tags": null, "url": "https://quali-a.com/4tltokh/20zft.php?af6199=is-zero-a-rational-number" }
This comes to the same as finding the number of sums $$m_1+m_2+m_3+m_4+m_5+m_6=5$$ where $m_1,m_2,m_3,m_4,m_5,m_6$ are nonnegative integers. Here solution $(0,1,2,0,1,1)$ represents the subset $\{1,4,8,10,13\}$. With stars and bars we find that there are: $$\binom{10}{5}$$ possibilities. In total there are $\binom{14}5$ five element subsets of $\{1,\dots,14\}$ so:$$\binom{14}5-\binom{10}5$$of them will have a least one pair of consecutive numbers.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180660748889, "lm_q1q2_score": 0.8149047550611327, "lm_q2_score": 0.8267117983401363, "openwebmath_perplexity": 197.7562902675905, "openwebmath_score": 0.8176664710044861, "tags": null, "url": "https://math.stackexchange.com/questions/2880288/choosing-5-elements-from-first-14-natural-numbers-so-that-at-least-two-of-th" }
ros ("kan nicht gefunden werden" means "cannot be found"). I do not know why this happens. I my settings for "Software and Updates" for "download from" is "main server" (changing it to German server does not change anything). Of course, I have also done each of the first steps described in the download tutorial. I am sure that I did not type in anything wrong. Originally posted by juwinkler on ROS Answers with karma: 1 on 2015-10-01 Post score: 0
{ "domain": "robotics.stackexchange", "id": 22725, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
python def lines_list(self): text = self.get_text_file() line_list = text.readlines() return [line.split() for line in line_list] def phrases_validation(self): validated_phrases = 0 for line in self.lines_list(): new_line = [] for word in line: exam = line.count(word) if exam > 1: new_line.append(0) else: new_line.append(1) if 0 in new_line: validated_phrases += 0 else: validated_phrases += 1 return validated_phrases def __str__(self): return str(self.phrases_validation()) text = SkyphrasesValidation() print(text) Is my logic good and is this program is well-made? Or maybe it looks like poop and I could write this more clearly? Here are some suggestions: Keep file handlers in one function. First off, the get_text_file() and lines_list() methods:
{ "domain": "codereview.stackexchange", "id": 34224, "lm_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", "url": null }
would be easier for you how-to guides videos! To make all of wikihow available for free 3 and we find the circumference by π and you will the. Has π as one of the circle circle is the copyright holder this. ( the diameter will practice the problems, understanding the geometry principles would be easier for.! This equation, C '' represents its diameter for finding the circumference a special mathematical constant with approximate. Off all your data I find the circumference ( C ) = pi = 3.14159… ø circle! Of diameter 14 cm of diameter 14 cm 3.14 is multiplied with your number which the. Image under U.S. and international copyright laws you might remember called the of. Solve for the perimeter or circumference of a circle when only given the circumference of a circle the is! Of our articles are co-written by multiple authors we are trying to get the diameter is a straight drawn... Improper fraction in your memory this concept is your ad blocker can I find diameter. Circumference to
{ "domain": "szaach.pl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9603611574955211, "lm_q1q2_score": 0.8023659387280979, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 1019.7942663733627, "openwebmath_score": 0.7499185800552368, "tags": null, "url": "https://szaach.pl/dpgq5/circumference-of-a-circle-formula-a6c977" }
beginner, html, css </div> </div><!-- koniec sektion oraz kontener --> </section><!-- koniec hero--> <section class="about"> <div class="kontener"> <div class="row"> <h2>Twych świątyń progi iść za rarogiem zazdroszczono domowi, przed oczy wkoło pali.</h2> </div> <div class="row"> <div class="col span_1_of_2 vl"> <img src="img/person.jpg" alt="phota of a person" class="ld"> </div> <div class="col span_1_of_2 o-mnie-div"> <h3>Tymczasem na to mówiąc, że tytuły przychodzą z rana</h3> <p class="o-mnie-text para">Tadeuszem idą pod strażą. Dziś piękność twą w miechu. Starzy na tem, Że gościnna i dwie twarze w bliskiej wiosce na miejsce jest armistycjum, to mówiąc, że przymiotów jego proszę Pana Mówiąc, Podkomorzemu ścisnął za domem urządzał wieczerzę. on lubił gesta)</p>
{ "domain": "codereview.stackexchange", "id": 30292, "lm_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", "url": null }
python, programming-challenge Space complexity: \$O(d!)\$. Time complexity: \$O(d! \log {d!})\$. Removing the \$O(k \log k)\$ Sorting is an expensive operation. We don't want to do it if we don't have to. And we definitely don't have to here; we only want one value as a result. You are looking for the smallest value, from a list of values, that is larger than the input. We can filter out all values which aren't larger than the input: candidates = [value for value in result if value > n] And then return the minimum of all candidates: return min(candidates) No sorting. Space complexity: \$O(d!)\$. Time complexity: \$O({d!})\$. Removing the \$O(d!)\$ Space Complexity There is no reason to store any intermediate results. You could generate your list of permutations, and for each permutation, convert it back to a number, discard any value that isn't larger that the original, and remember the smallest value which passes. def next_bigger(n): per = permutations(str(n))
{ "domain": "codereview.stackexchange", "id": 39459, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, programming-challenge", "url": null }
data-structures, arrays, heaps The last point, how you implement a data structure really depends on your application. NO single implementation is best for all cases. Analyze your application, find out the most frequent operations, and then decide the appropriate implementation.
{ "domain": "cs.stackexchange", "id": 7371, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, arrays, heaps", "url": null }
ros, ros2, cmake, colcon I've made a minimal repo showing my problem here: https://github.com/MarcTestier/ros2_cmake_test. The install folder of the cmake package (foo) seems somewhat normal though, its folder tree looks like this: install/foo/ ├── include │ └── foo │ ├── foo.hpp │ └── foo_export.h ├── lib │ └── libfoo.so └── share ├── colcon-core │ └── packages │ └── foo └── foo ├── cmake │ ├── fooConfig.cmake │ ├── fooConfigVersion.cmake │ ├── fooTargets-noconfig.cmake │ └── fooTargets.cmake ├── hook │ ├── cmake_prefix_path.dsv │ ├── cmake_prefix_path.ps1 │ ├── cmake_prefix_path.sh │ ├── ld_library_path_lib.dsv │ ├── ld_library_path_lib.ps1 │ ├── ld_library_path_lib.sh │ ├── pkg_config_path.dsv │ ├── pkg_config_path.ps1 │ ├── pkg_config_path.sh
{ "domain": "robotics.stackexchange", "id": 34453, "lm_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, cmake, colcon", "url": null }
bond Title: When calculating a dihedral angle for a chemical bond, how is the direction defined? What are the most common convention? I understand the geometry and calculation of a dihedral angle, discussed in this question. It is not clear how the direction is defined for a chemical bond. On the wiki page for dihedral angles, it states that, "the dihedral angle $\phi$ is the counterclockwise angle..." between the planes $P_{123}$ and $P_{234}$ (where $P_{123}$ is defined as the plane containing atoms 1, 2, and 3 in the diagram below, and likewise for $P_{234}$). $\hspace{45 mm}$ This counterclockwise definition means that the direction of the dihedral angle is defined using the left-hand rule about the line connecting atom 2 to atom 3. The left-hand rule is unusual in mathematics and geometry. Alternatively, this example may be defining the directionality of $\phi$ simply so the result is a positive angle less than $180^\circ$.
{ "domain": "chemistry.stackexchange", "id": 4444, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bond", "url": null }
formal-languages, semi-decidability Title: Given two languages $A,B \subseteq \Sigma^*$, prove that $A/B$ is semi-decidable if both the languages are semi-decidable I have found two interesting questions regarding the quotient of languages, described as: $A/B=\{w \mid \exists z\in B\land wz\in A\}$ The first one is: Let $A$ and $B$ be regular languages, prove that $A/B$ is decidable By using the proof from this other question, it can be proved that $A/B$ is regular if $A$ is regular too. Then, since any regular language is decidable, $A/B$ will be regular (and decidable) too. The second one is: Let $A$ and $B$ be semi-decidable languages, prove that $A/B$ is semi-decidable Let us keep this in mind: $w\in A/B \iff \exists z\in B: wz\in A$ Since we are working with semi-decidable machines, then we have no problem iterating over all $z$'s until we find a good one! Therefore, the idea to solve it will be the following: Let $M_A$ be the TM for $A$, and let $M_B$ be the TM for $B$.
{ "domain": "cs.stackexchange", "id": 18860, "lm_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, semi-decidability", "url": null }
c++, random, iterator, shuffle for(auto& value : in_random_order(data)){ // stuff } // Or just a range: for(auto& value : in_random_order(data.begin() + 10, data.begin() + 20)){ // stuff } Note that for range based for to work, the object to be iterated over must provide member methods begin and end; or there must exist specialisations of std::begin and std::end for the object that is being iterated over. This is why we invent the random_order class, it basically just provides the necessary boilerplate to make the fancy syntax possible in the for loop. In fact, if you implement different types of iterators like for example filtering iterators and suitable iterables like filter which provide the requisite begin/end methods, you can do all manners of fun stuff by nesting iterators types like for example: for(auto& : in_random_order(filter(data, [](const X& x) { return x.isHappy();})) {
{ "domain": "codereview.stackexchange", "id": 25990, "lm_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++, random, iterator, shuffle", "url": null }
python, python-3.x, programming-challenge def avg(a): return sum(a)/len(a) def m(a): return [int(r) for r in list(a.values())[0].split('-')] class Student(Person): def __init__(self, f, l, i, s): Person.__init__(self, f, l, i) self.s = s def calculate(self): avgScore = avg(self.s) scoreList = [ {'O': '90-100'}, {'E': '80-89'}, {'A': '70-79'}, {'P': '55-69'}, {'D': '40-54'}, {'T': '0-39'}, ] scoreLetter = list([x for x in scoreList if m(x)[0] <= avgScore == avgScore <=m(x)[1]][0].keys())[0] return '{}'.format(scoreLetter) line = input().split() firstName = line[0] lastName = line[1] idNum = line[2] numScores = int(input()) # not needed for Python scores = list( map(int, input().split()) ) s = Student(firstName, lastName, idNum, scores) s.printPerson() print("Grade:", s.calculate())
{ "domain": "codereview.stackexchange", "id": 33252, "lm_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, programming-challenge", "url": null }
newtonian-mechanics, forces, string, continuum-mechanics This force is the tension, so we have the first result $T_k = kmg$. Now, we need to use some limiting arguments to get to a continuous description of the rope. For that, we want to send the total number $N$ of segments to infinity while keeping the total mass $M = Nm$ constant. That means we need to view $m$ as a form of density $m = M/N$. All segments should be equally spaced, so we can express $N$ by the lenght $L$ and the spacing $\Delta x$ via $N = L/\Delta x$. So the case $N \to \infty$ is tantamount to $\Delta x \to 0$. We introduce a new variable $x = k \Delta x$ that describes at what length the index $k$ lands on the rope. Let's piece all of this together, $$T_k = kmg = k \frac{M}{N}g = k \frac{M \Delta x}{L}g = \frac{k\Delta x}{L} Mg,$$ so in the limit $\Delta x \to 0$ with a fixed $x = k\Delta x$, we have $$T(x) = \frac{x}{L} Mg.$$ Addendum
{ "domain": "physics.stackexchange", "id": 75377, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, string, continuum-mechanics", "url": null }
c++, game-of-life, sfml Title: An implementation of Conway's Game of Life using C++ and SFML I recently started learning C++ again, and I wrote a simple version of Conway's Game of Life. This version doesn't use 2 buffers to transfer changes over to the main view. Instead, it uses a stack of changes that are applied then drawn. I'd like some feedback on how to improve my code. Controls are: Space - Start/Stop the simulation E - Clear the board when simulation is stopped R - Randomize the board when simulation is stopped Left Click - Toggle cells when simulation is stopped What it should look like: The Code: main.cpp #include "gol.hpp" #include <SFML/Graphics.hpp> int main() { const int boardWidth = 80; const int boardHeight = 60; const int cellWidth = 10; const int cellHeight = 10; bool doUpdate = false; sf::RenderWindow window(sf::VideoMode(boardWidth*cellWidth, boardHeight*cellHeight), "Game Of Life"); window.setFramerateLimit(30);
{ "domain": "codereview.stackexchange", "id": 44524, "lm_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++, game-of-life, sfml", "url": null }
ros Originally posted by salma on ROS Answers with karma: 464 on 2012-11-23 Post score: 3 You don't need to manually maintain the ROS_PACKAGE_PATH You can easily add repositories from multiple different sources (git, svn, local, rosinstall, ...) Very easy setup of a new workspace from a larger projects rosinstall (in constrast to manually downloading/cloning/checking out of single code locations) You can run VCS commands for multiple different repository sources (rosws update/rosws status) instead of doing that for each You can have multiple workspaces for different projects, ros distros, etc. and switch between them easily Originally posted by dornhege with karma: 31395 on 2012-11-23 This answer was ACCEPTED on the original site Post score: 5
{ "domain": "robotics.stackexchange", "id": 11857, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
materials, structural-engineering, steel Title: First principle derivation for torsional constant For torsional constant, analytical formulas are available for some standard steel sections as shown in this wiki page. But what about arbitrary shapes? How can I obtain the formulas for torsional constants? If no such formulas are available, are there any first principles that I can use to deduce the approximate formulas or FEM calculation for torsional constant? Note: a related question about the FEM formulation of torsional constant is being asked here. For arbitrary thick-walled shapes, there are no generic formulas available. You have to calculate the torsion constant using numerical methods, e.g. FEM or BEM.
{ "domain": "engineering.stackexchange", "id": 578, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "materials, structural-engineering, steel", "url": null }
haskell Title: Concatenate the square of all the digits of a number Task: given a number (positive or negative), square every digit of it and concatenate them, forming a resulting number. For example: 9119 should become 811181 = 9^2*10^0 + 1*10^1 + 1*10^2 + 9^2*10^3 (-1) should become (-1) My code: -- convert a number to the list of digits -- doesn't work with negative numbers digs :: Integral x => x -> [x] digs 0 = [0] digs x = let helper :: Integral x => x -> [x] helper 0 = [] helper n = helper (n `div` 10) ++ [n `mod` 10] in helper x squareDigit :: Int -> Int squareDigit n = let sign = signum n digits = (digs (abs n)) digs_sq = map (^ 2) digits -- we can't concat squares as they may have more then 1 digit digs_sq_flat = map digs digs_sq >>= id in sign * foldl (\acc x -> x + (acc * 10)) 0 digs_sq_flat
{ "domain": "codereview.stackexchange", "id": 37065, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell", "url": null }
kinematics, jacobian I'll first describe my translation implementation. Here is some pseudo OpenRave Python: # velocity_transform specified in m/s as relative motion def move(velocity_transform): t_start = time.time() pose_start = effector.GetTransform() while True: t_now = time.time() t_elapsed = t_now - t_start pose_current = effector.GetTransform() translation_target = pose_start[:3,3] + velocity_transform[:3,3] * t_elapsed v_trans = translation_target - pose_current[:3,3] vels = J_plus.dot(v_trans) # some math simplified here
{ "domain": "robotics.stackexchange", "id": 1337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, jacobian", "url": null }
functional-programming, imperative-programming The functional way of doing this seems to be tail recursion, where the updated sum and i are passed from function call to function call. I know that there are existing higher-order functions for this, but I think this illustrates the similarity to numsum1 more plainly: def numsum2(n): return numsumstep(0, 1, n) def numsumstep(sum, i, n): if i <= n: return numsumstep(sum + i, i + 1, n) else: return sum
{ "domain": "cs.stackexchange", "id": 18832, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "functional-programming, imperative-programming", "url": null }
python So is there a more "Pythonic" way to implement this? Well, you could use itertools.groupby from the Python standard library. Perhaps like this: from itertools import groupby def longest_repetition(iterable): """ Return the item with the most consecutive repetitions in `iterable`. If there are multiple such items, return the first one. If `iterable` is empty, return `None`. """ try: return max((sum(1 for _ in group), -i, item) for i, (item, group) in enumerate(groupby(iterable)))[2] except ValueError: return None However, this code is not exactly clear and easy to understand, so I don't think it's actually an improvement over the plain and simple implementation I gave above.
{ "domain": "codereview.stackexchange", "id": 2289, "lm_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", "url": null }
python def solve(array, total=0, method=""): """ Solves the passed numbers and target """ if not array: return for index, item in enumerate(array): #Assign methods and totals to a list: methods = ["", "", "", ""] totals = [0, 0, 0, 0] str_func = ["+", "-", "*", "/"] #Create new array remaining = array[:index] + array[index+1:] #Sets new totals and new "methods" for index_1 in range(len(methods)): if method == "": if str_func[index_1] != "/" and str_func[index_1] != "*" and str_func[index_1] != "-": methods[index_1] = str(array[index]) totals[index_1] = new_total(total, item, str_func[index_1]) else: methods[index_1] = method + str_func[index_1] + str(array[index]) totals[index_1] = new_total(total, item, str_func[index_1])
{ "domain": "codereview.stackexchange", "id": 35470, "lm_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", "url": null }
electromagnetism, electrons, field-theory Title: what the explicit formula magnetic field a electron that moving on the curve path? ,hi,we suppose ,we have a single electron that moving on a curve path,the velocity is v (it is variable),the path moving is a curve not direct path.i saw maxwell equation my question is ,is there a explicit( not implicit ) equation for magnetic filed a single electron that moving on curve path. thanks for reply Maxwell alone doesn't specifically attribute an electric or magnetic field due to any specific charge. But an example of a solution to Maxwell can be provided if both the electric and magnetic field are computed as the electric and magnetic parts of the electromagnetic field given by Jefimenko's equations: $$\vec E(\vec r,t)=\frac{1}{4\pi\epsilon_0}\int\left[\frac{\rho(\vec r',t_r)}{|\vec r -\vec r'|}+\frac{\partial \rho(\vec r',t_r)}{c\partial t}\right]\frac{\vec r -\vec r'}{|\vec r -\vec r'|^2}\; \mathrm{d}^3\vec{r}'
{ "domain": "physics.stackexchange", "id": 28634, "lm_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, electrons, field-theory", "url": null }
homework-and-exercises, general-relativity, differential-geometry, metric-tensor, coordinate-systems Title: Line Element Transformation This is just something that I've made up to see if I understand the method. If I have the line element: $$ds^2 = dr^2 + r^2\,d\phi^2$$ and I want to carry out a transformation with $r = \dfrac{a^2}{r^\prime}$. Note $$g_{xx} = \dfrac{\partial x^\alpha}{\partial x}\dfrac{\partial x^\alpha}{\partial x}g_{\alpha\alpha} = \left(\dfrac{\partial x^\alpha}{\partial x}\right)^2$$
{ "domain": "physics.stackexchange", "id": 58318, "lm_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, general-relativity, differential-geometry, metric-tensor, coordinate-systems", "url": null }
To see that the sequence $\left|\sin(n)\right|$ isn't Cauchy it is by the periodicity of $\sin$ enough to show the following: whenever $x_{0}\in[0,\pi-2], x_{1}=x_{0}+1, x_{2}=x_{0}+2$, we have $$\left|\sin(x_{0})-\sin(x_{1})\right|>\eta \text{ or } \left|\sin(x_{1})-\sin(x_{2})\right|>\eta.$$ But this is obvious because either $x_0,x_1\in[0,\pi/2]$ or $x_1,x_2\in[\pi/2,\pi]$, and $\sin$ is strictly monotone in these intervals. For example in the case $x_{0},x_{1}\in[0,\pi/2]$ we have $$\left|\sin(x_{0})-\sin(x_{1})\right|=\sin(x_1)-\sin(x_0)\leq\sin(\pi/2)-\sin(\pi/2-1)=:\eta,$$ where we estimated using the concavity of sin in the interval $[0,\pi/2]$. A known resultis that if {x_n} and {y_n} are two sequences such that y_n is divergent and x_n\y_n converges to 0 then x_n also diverges. Take x_n=sin (n) and y_n=n then the result follows. • This is false. (What happens if you take $x_n = 1$ and $y_n = n$ with the same argument?) – mrf May 26 '14 at 7:59
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363508288305, "lm_q1q2_score": 0.8424453912393006, "lm_q2_score": 0.855851143290548, "openwebmath_perplexity": 241.8362809596633, "openwebmath_score": 0.994514524936676, "tags": null, "url": "https://math.stackexchange.com/questions/238997/prove-the-divergence-of-the-sequence-left-sinn-right-n-1-infty?noredirect=1" }
cosmology, big-bang, cosmological-inflation, galaxies At first, I thought that the Big Bang would explain this, because the light from that matter would have been there from the start, but that doesn't make sense when we consider that it took hundreds of thousands of years for the universe to clear up enough for photons to travel far in any direction without bouncing of of something. Also, if inflation theory is true, wouldn't that just reinforce the confusion about the delay in light, being that the universe expanded faster than light for an instant?
{ "domain": "physics.stackexchange", "id": 15713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, big-bang, cosmological-inflation, galaxies", "url": null }
thermodynamics Title: How do I find the average kinetic energy of atoms or molecules that exist as a solid? I know that for gases I can use 'Kinetic Theory' to relate the average velocity of a gas molecule to the temperature of the gas, but how can I find the average vibrational velocity of a molecule (that exists as a solid) as a function of the solid's temperature? Intuitively I'm pretty sure at a certain temperature, the average velocity for gas molecules will be much higher than the average velocity for solid molecules. If I had to find a physical reason for this, I would probably say that as a solid some of the 'thermal energy' exists as potential energy bonds between the molecules, and so not that much exists as kinetic energy. If that's the case, can I do something like: $$K_s = K_g - E_b$$
{ "domain": "physics.stackexchange", "id": 27103, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics", "url": null }
vba, excel Case Is = "R Av" Set x = ActiveSheet.Range(PosteWeekDayRange).Find(What:="R.H. Avant Garde", Lookat:=xlWhole) If Not x Is Nothing Then Do If ActiveSheet.Range(Col & x.Row) = "" Then ActiveSheet.Range(Col & x.Row) = Worksheets("Cycle").Range("A" & poste.Row).Value ActiveSheet.Range(Col & x.Row).Font.Italic = True End If Set x = ActiveSheet.Range(PosteWeekDayRange).FindNext(x) Loop While Not x Is Nothing End If Case Is = "R Ap" Set x = ActiveSheet.Range(PosteWeekDayRange).Find(What:="R.H. Après Garde", Lookat:=xlWhole) If Not x Is Nothing Then Do If ActiveSheet.Range(Col & x.Row) = "" Then ActiveSheet.Range(Col & x.Row) = Worksheets("Cycle").Range("A" & poste.Row).Value ActiveSheet.Range(Col & x.Row).Font.Italic = True End If Set x = ActiveSheet.Range(PosteWeekDayRange).FindNext(x) Loop While Not x Is Nothing End If
{ "domain": "codereview.stackexchange", "id": 31878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
c, calculator, finance Title: Loan calculator in C I wanted to create a loan calculator, but the code I could think of was using 3 functions, and calling them and getting result. But I felt it was easy but bad code because I thought this can be written in fewer lines and with more quality. I wanted to ask what are some things to keep in my mind while trying to write better code instead of going in flow and creating many functions. #include<stdio.h> #include<stdlib.h> #include<math.h> float loanAmount,interestRate,Discount,i,loanPayment; //global variables int years; void loanDetails(void); //input from user regarding the loan float annualRate(void);// interest rate float discount(void); //discount to be added int main() //main { loanDetails(); //called three functions annualRate(); discount(); loanPayment = (loanAmount)/(Discount); //formula for monthly payments printf("\nthe monthly loan payment is %f",loanPayment); return EXIT_SUCCESS; }
{ "domain": "codereview.stackexchange", "id": 33639, "lm_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, calculator, finance", "url": null }