text
stringlengths
1
1.11k
source
dict
template, wpf, xaml </DataTemplate.Resources> <Border> <Grid> <Border> <!-- Guts --> </Border> </Grid> </Border> </DataTemplate>
{ "domain": "codereview.stackexchange", "id": 12279, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "template, wpf, xaml", "url": null }
java It'd be neat to know if there is a better way of achieving this. Have I used Streams properly, specifically in the selectNumberOneRankCell & extractWeeks functions? Any other style concerns would be appreciated. I think the addition of latestResult should be good, please let me know if I'm overlooking something!
{ "domain": "codereview.stackexchange", "id": 38795, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java", "url": null }
c++ Title: Befunge-93 interpreter Befunge is an esoteric language designed with the goal of being as diffcuat to compile https://esolangs.org/wiki/Befunge. I have attempted multiple times in the past to make a befunge interpreter in C++ and have failed each time due to me not fully understanding the language. However recently decided to finally fully learn Befunge and make an interpreter for it in C++ and as result I was able to make a complete Befunge-93 interpter. b93.cc: #include <cstdio> #include <cinttypes> #include <string_view> #include <array> #include <vector> #include <random>
{ "domain": "codereview.stackexchange", "id": 39778, "lm_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 }
beginner, c I'd expect more error checking on file I/O. Example: fp = fopen(fname, "r"); // add if (fp == NULL) { Whine_and_complain(fname); return; } A style issue, yet declaring and initializing is a nice coding style to consider. Avoids uninitialized variables and keeps them closer to use. // double metric; // metric = std(final_sum); double metric = std(final_sum);
{ "domain": "codereview.stackexchange", "id": 28227, "lm_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, c", "url": null }
python, performance, python-3.x, natural-language-processing, data-mining assoc_df.sort_values(by='Association Strength (Word 1 -> Word 2)', ascending=False) This produces the word associations like so: Word 1 Word 2 Association Strength (Word 1 -> Word 2) 330 wiki encyclopedia 3.0 895 encyclopadia found 1.0 1317 anyone edit 1.0 754 peer science 1.0 755 peer encyclopadia 1.0 756 peer britannica 1.0 ... ... ... However, the code contains a lot of for loops which hampers its running time. Specially the last part (sort the word pairs in decreasing order of their association strengths) consumes a lot of time as it computes the association strengths of n^2 word pairs/combinations, where n is the number of words we are interested in (those in word_list in my code above). So, the following are what I would like some help on:
{ "domain": "codereview.stackexchange", "id": 33645, "lm_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, python-3.x, natural-language-processing, data-mining", "url": null }
water, phase, isotope Title: Freezing point of oxygen-18 water The freezing points of heavy water (3.8 °C) and tritiated water (4.49 °C) both seem to be well-known. I can't find anywhere that gives the freezing points of $\ce{H2^18O}$, $\ce{D2^18O}$, or $\ce{T2^18O}$, though. Are any of these values known? If not, is it at least known whether they'd be higher than with ordinary oxygen? In this paper [1] from 1963, various properties of heavy-oxygen water are measured including the melting point of both $\ce{H2^{18}O}$ and $\ce{D2^{18}O}$. The melting temperatures were measured at: $$\ce{H2^{18}O}:\ T_\mathrm{mp}=\pu{0.28\pm0.02^\circ C}$$ $$\ce{D2^{18}O}:\ T_\mathrm{mp}=\pu{4.02\pm0.02^\circ C}$$
{ "domain": "chemistry.stackexchange", "id": 8685, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "water, phase, isotope", "url": null }
with four unknowns. Usually when faced with an IVP, you first find the general solution of the differential equation and then use the initial condition (s) to evaluate the constant(s) By contrast, the Laplace transform method uses the initial conditions at the beginning of the solution so that the result obtained in the final step by taking the inverse Laplace. It presents papers on the theory of the dynamics of differential equations (ordinary differential equations, partial differential equations, stochastic differential equations, and functional differential equations) and their discrete analogs. The SIR Model for Spread of Disease. equation is given in closed form, has a detailed description. Free System of ODEs calculator - find solutions for system of ODEs step-by-step. Specify a differential equation by using the == operator. Once we specify initial conditions (which wil, we can solve for c1 and c2. High School Math Solutions – Systems of Equations Calculator, Elimination A
{ "domain": "alberodellerose.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9925393576394881, "lm_q1q2_score": 0.8183109043825968, "lm_q2_score": 0.8244619199068831, "openwebmath_perplexity": 415.0163270236108, "openwebmath_score": 0.768282413482666, "tags": null, "url": "http://alberodellerose.it/general-solution-of-system-of-differential-equations-calculator.html" }
classical-mechanics, energy-conservation, spring, elasticity If the material's constitutive law dictates that the stress is a function of the strain alone: $$T = \hat T(E)$$ then the work required will be the same in either case. If however, the material's constitutive behavior has a viscous term, then the rate of deformation will affect the work required: $$ T = \hat T(E, \dot E)$$ The dependence on $\dot E$ will dissipate energy, so the case that was loaded more quickly will require more work. There are detailed thermodynamic arguments that guarantee that the dependence of the stress on $\dot E$ will always dissipate energy, but they are well beyond the scope of this question.
{ "domain": "physics.stackexchange", "id": 10266, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, energy-conservation, spring, elasticity", "url": null }
python Title: Trouble accessing Raspberry pi 2 GPIO with python I have a scenario in which i have to take readings from a DHT11 Temperatute & Humidity sensor and publish it to a topic (I am using python so suggestions keeping python in mind would be helpful). The problem is that i need to do sudo to assess the GPIO but again rosrun is not found when in sudo. What should i do ? Originally posted by nishthapa on ROS Answers with karma: 47 on 2016-03-18 Post score: 0 Please try to use the search next time (or Google: $searchterms site:answers.ros.org fi), this has been asked (and answered) many times before. See Raspberry Pi 2, ROS and GPIO access for a recent one. Originally posted by gvdhoorn with karma: 86574 on 2016-03-18 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 24161, "lm_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 }
\begin{align*} \matrixentry{\transpose{(\alpha A)}}{ji}&= \matrixentry{\alpha A}{ij}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\alpha\matrixentry{A}{ij}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\\ &=\alpha\matrixentry{\transpose{A}}{ji}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\matrixentry{\alpha\transpose{A}}{ji}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\text{.} \end{align*} Since the matrices $$\transpose{(\alpha A)}$$ and $$\alpha\transpose{A}$$ agree at each entry, Definition ME tells us the two matrices are equal. We again want to prove an equality of matrices, so we work entry-by-entry and use Definition ME. For $$1\leq i\leq m\text{,}$$ $$1\leq j\leq n\text{,}$$
{ "domain": "runestone.academy", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419690807407, "lm_q1q2_score": 0.8014355644746147, "lm_q2_score": 0.810478913248044, "openwebmath_perplexity": 281.1879529503222, "openwebmath_score": 0.9999170303344727, "tags": null, "url": "https://runestone.academy/ns/books/published/fcla/section-MO.html" }
# Finite abelian subgroups of $\mathrm{SL_2}(\mathbb{C})$ This problem is from a Ph.D Qualifying Exam for algebra. Question: Classify all finite abelian subgroups of $\mathrm{SL_2}(\mathbb{C})$ up to isomorphism. My attempt: First, given a positive integer $n$, I tried to find an element of $\mathrm{SL_2}(\mathbb{C})$ of order $n$, and that was easy; a rotation by $2\pi/n$ radians. Therefore, for every $n\ge 1$, $\mathbb{Z}_n$ is a subgroup of $\mathrm{SL_2}(\mathbb{C})$. My conjecture is that there are no other finite abelian subgroups than what I mentioned above, and I have to prove or disprove it, and here is where I stuck. Does anyone have ideas? Any hints or advice will help a lot!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.980280871316566, "lm_q1q2_score": 0.8190085297224036, "lm_q2_score": 0.8354835371034368, "openwebmath_perplexity": 218.53518740442036, "openwebmath_score": 0.8408506512641907, "tags": null, "url": "https://math.stackexchange.com/questions/2823775/finite-abelian-subgroups-of-mathrmsl-2-mathbbc" }
research-level, hawking-radiation, qft-in-curved-spacetime, tidal-effect, pair-production Since the paper puts a lot of emphasis on analogy of Hawking radiation with Schwinger pair production let us take this analogy a step further by considering pair production in the background electrostatic field of a point charge. Just like the paper in question does for gravitational field, we can evaluate the imaginary part of effective action (a well known expression due to Heisenberg and Euler) for Coulomb field and obtain some nonzero “rate”. If we are to believe the authors, then this would indicate that background EM field of a charge (for example a heavy nucleus) would spontaineously produce electron–positron pairs. This is, of course, wrong. The Coulomb field of a charge $Z$ (in units of elementary charge) is stable against pair production for $Z<137$. For larger charge values situation is more complicated, for example, nuclei of finite size can have negative energy bound electron states for $150<Z<173$ while ultra-heavy nuclei with $Z>173$ would spontanously emit positrons.
{ "domain": "physics.stackexchange", "id": 95527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "research-level, hawking-radiation, qft-in-curved-spacetime, tidal-effect, pair-production", "url": null }
ros, catkin, catkin-package, catkin-pkg Originally posted by KruseT with karma: 7848 on 2013-01-17 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by AdrianPeng on 2013-01-17: Thank you! I got it!
{ "domain": "robotics.stackexchange", "id": 12470, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, catkin, catkin-package, catkin-pkg", "url": null }
biochemistry, cell-biology, dna-replication, thermodynamics The first replicating life There is a lot less known about this, as we’re still researching it now. Not only this, but there are currently several different going theories. Keep in mind, the Central Dogma of molecular biology describes genetic flow as DNA—> RNA—> PROTEIN. The reason why there are different theories (and so many models within them) around the chemistry-to-biology (CTB) transition does not lie in which monomer is more likely to synthesize spontaneously, rather it is almost literally a chicken-and-the-egg situation. Everything is a precursor for everything.
{ "domain": "biology.stackexchange", "id": 11482, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "biochemistry, cell-biology, dna-replication, thermodynamics", "url": null }
homework-and-exercises, centrifugal-force, coriolis-effect, relative-motion And so we have two coupled second order differential equations; $\ddot{x} = \Omega^2x + 2\Omega\dot{y}$ $\ddot{y} = \Omega^2y - 2\Omega\dot{x}$ A method we had used previously in class to solve coupled equations was to set $\Omega = 0$ and solve, then substitute this solution back in for $\dot{x} and \dot{y}$. I attempted this, however it yielded two cubic equations. The solution I am told this system has, for the initial conditions $(x(0),y(0)) = (x_0,0)$, is a spiral when mapped parametrically, namely; $x(t) = (x_0 + v_{x0}t)\cos\Omega t + (v_{y0} + \Omega x_0)t\cos\Omega t$ $y(t) = -(x_0 + v_{x0}t)\sin\Omega t + (v_{y0} + \Omega x_0)t\sin\Omega t$ To me these appeared to be solutions gained from solving the non-homogenous linear second-order differential equation, however this did not work either.
{ "domain": "physics.stackexchange", "id": 1568, "lm_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, centrifugal-force, coriolis-effect, relative-motion", "url": null }
of an event can be dependent on another event occuring in this example problem. With dice rolling, your sample space is going to be every possible dice roll. 6 of landing heads. 25 " = 25% = 1/4 Probabilities are usually given as fractions. The coin is tossed four times. 7870 and the probability of getting three or more heads in a row or three or more tails in a row is 0. 2 is flipped. What about probabilities when we don't have equally likely events? Say, we have unfair coins? If you're seeing this message, it means we're having trouble loading external resources on our website. (Remember, to calculate probability when the question includes the word “and”, you multiply. The coin is flipped 50 times. What is the probability that you must flip the coin four or more times. Example The same unfair coin as in the previous example is flipped three times. Note that the. Here you can assume that if a child is a girl, her name will be Lilia with probability $\alpha \ll 1$ independently from
{ "domain": "alterauto.fr", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682471364099, "lm_q1q2_score": 0.8363564324320225, "lm_q2_score": 0.8459424431344437, "openwebmath_perplexity": 315.305787512818, "openwebmath_score": 0.7686670422554016, "tags": null, "url": "http://ttwj.alterauto.fr/unfair-coin-probability.html" }
rotational-dynamics, rotational-kinematics, rotation, rigid-body-dynamics, angular-velocity Title: Proving that the angular velocity of a rigid body is the same about any point Please consider the below image which is from Rana and Joag, Classical Mechanics. They build on a proof, which I reiterate below and through it they show that angular velocity of any point B in the rigid body is the same about a point $B_0$ and then state that the angular velocity of B is same about any other point too.
{ "domain": "physics.stackexchange", "id": 68482, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rotational-dynamics, rotational-kinematics, rotation, rigid-body-dynamics, angular-velocity", "url": null }
thermodynamics, entropy, stability \end{bmatrix},$$ $$H_{V,N} = \begin{bmatrix} -NR/V^2 & R/V \\ R/V & -(c+1)R/N \end{bmatrix},$$ $$H_{U,N} = \begin{bmatrix} -cNR/U^2 & cR/U \\ cR/U & -(c+1)R/N \end{bmatrix}.$$ Now $H_{U,V}$ is diagonal and so immediately we see that it has negative eigenvalues. The other two are not, but we caan argue as follows. Since each of the other two has a negative trace, there must exist at least one negative eigenvalue (trace equals sum of eigenvalues). Thus, since the determinant equals the product of all the eigenvalues, the other two matrices are negative definite (only negative eigenvalues) if and only if they have positive determinant. Now, $$\det(H_{V,N}) = (c+1)R^2/V^2 - R^2/V^2 = cR^2/V^2>0,$$ and $$\det(H_{U,N}) = c(c+1)R^2/U^2 - c^2R^2/U^2 = cR^2/U^2>0.$$ So the ideal gas EOS is locally stable everywhere, and thus globally stable. There is an important conceptual issue that should be clarified when discussing the stability conditions.
{ "domain": "physics.stackexchange", "id": 96003, "lm_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, entropy, stability", "url": null }
python, beginner, tree Title: Binary tree in Python As a Python newbie, I have coded this binary tree as best as I could to follow Python idioms. However, I know it is still very verbose and not up to standard. I would like Python experts to tear this apart and identify its weaknesses. class TreeNode(object): """ applicable to all tree nodes including root node """ def __init__(self, value, left=None, right=None,root=False): self.value = value TreeNode.check(left) TreeNode.check(right) self.left = left self.right = right self.root = root def inorder(self): s = list() if not self.left: s.append('') else: s.append(self.left.inorder()) s.append(str(self.value)) if not self.right: s.append('') else: s.append(self.right.inorder()) return ' '.join(s).strip()
{ "domain": "codereview.stackexchange", "id": 322, "lm_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, tree", "url": null }
java, performance, sorting, mergesort //we keep comparing unless we hit the boundary on either partition while(leftHead <= mid && rightHead <= right){ //no data in the buffer - normal compare if((bufferSize - bufferIndex) == 0){ //right is less than left - we overwrite left with right and store left in the buffer if(a[leftHead] > a[rightHead]){ buffer[bufferSize] = a[leftHead]; a[leftHead] = a[rightHead]; bufferSize++; rightHead++; } } //some data in the buffer - we use buffer (instead of left) for comparison with right else{ //right is less than buffer if(buffer[bufferIndex] > a[rightHead]){ //we overwrite next left value, but must save it in the buffer first buffer[bufferSize] = a[leftHead]; a[leftHead] = a[rightHead];
{ "domain": "codereview.stackexchange", "id": 1513, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, sorting, mergesort", "url": null }
python, logistic-regression, k-nn, confusion-matrix, lda-classifier It's a bit strange that the first 2 classifers predict class 0 more often than class 1. It looks as if the training set and test set don't have the same distribution. the k-NN classifier correcly predicts class 1 more often, and that's why it works better. k-NN is also much less sensitive to the data distribution: in case it differs between training and test set, this could explain the difference with the first 2 classifiers. However it's rarely meaningful for the $k$ in $k$-NN to be this high (125). Normally it should be a low value, like one digit only. I'm not sure what this means in this case. Suggestion: you could try some more robust classifiers like decision trees (or random forests) or SVM.
{ "domain": "datascience.stackexchange", "id": 10036, "lm_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, logistic-regression, k-nn, confusion-matrix, lda-classifier", "url": null }
### Exercise 11 132294501132294501 size 12{ left [ matrix { 1 {} # 3 {} # - 2 {} ## - 2 {} # 9 {} # 4 {} ## - 5 {} # 0 {} # 1{} } right ]} {} (4) #### Solution 1224, R=2/31/30, C=2/301/3, The value=01224 size 12{ left [ matrix { 1 {} # - 2 {} ## - 2 {} # 4{} } right ]} {}, R=2/31/30 size 12{R= left [ matrix { 2/3 {} # 1/3 {} # 0{} } right ]} {}, C=2/301/3 size 12{C= left [ matrix { 2/3 {} ## 0 {} ## 1/3 } right ]} {}, The value=0 size 12{"The value"=0} {} (5) ### Exercise 12 011012124313011012124313 size 12{ left [ matrix { 0 {} # 1 {} # 1 {} ## 0 {} # 1 {} # 2 {} ## 1 {} # 2 {} # 4 {} ## 3 {} # 1 {} # 3{} } right ]} {} (6) ### Exercise 13 20480662224624802048066222462480 size 12{ left [ matrix { 2 {} # 0 {} # - 4 {} # 8 {} ## 0 {} # - 6 {} # - 6 {} # 2 {} ## 2 {} # - 2 {} # 4 {} # 6 {} ## - 2 {} # - 4 {} # - 8 {} # 0{} } right ]} {} (7) #### Solution
{ "domain": "cnx.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9525741227833249, "lm_q1q2_score": 0.8188934481679507, "lm_q2_score": 0.8596637559030338, "openwebmath_perplexity": 11980.602721686899, "openwebmath_score": 0.7934074997901917, "tags": null, "url": "http://cnx.org/content/m38665/latest/" }
quantum-mechanics, identical-particles \phi_{n_b}\beta(1) & \phi_{n_b}\beta(2) & \phi_{n_b}\beta(3)\\ \phi_{n_c}\beta(1) &\phi_{n_c}\beta(2)&\phi_{n_c}\beta(3) \end{vmatrix}$$ Notationally, $\alpha$ refers to spin up particles, $\beta$ refers to spin down, and $\phi_n=\sqrt{\frac{2}{L}}\sin{\frac{n\pi x}{L}}$ 3 spin $\frac{1}{2}$ particles can't be paired up, so we're dealing with what chemists would call an open shell configuration. Two of the particles can be piled up into the same spatial orbitals with different spins (ie $n_a=1$ and $n_b=1$, but you still have an electron left over. As you showed earlier, you can't have $n_c=1$ because your wave function would the equal 0, so the next lowest energy state is $n_c=2$. Effectively, you're just piling them in two at a time to each spatial orbital, one with each spin. You eventually have one left over, but we have no reason to assume that it is either spin up or spin down, so let's just write it as a linear combination of both. Does this line of thinking make sense?
{ "domain": "physics.stackexchange", "id": 62869, "lm_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, identical-particles", "url": null }
higgs However, what makes the Higgs field different is that it does not have a minimum of its energy at $H=0$ but rather at about $H=246$ GeV, call this $H=v$. Then fluctuations and excitations in the $H$ field occur not around zero but around $v$. It is useful to separate out these two parts and define $H=v+h$, where $h$ is the fluctuation around $v$. Substituting this into the equation above obviously gives rise to a term $gv^2\phi^2$, where $v$ is just our constant VEV. But this is exactly the same form as a mass term, with $gv^2$ playing the role of $\frac{1}{2}m^2$. Thus the nonzero VEV of the field $H$ makes it "look like" the particle associated with the field $\phi$ has a mass $m=v\sqrt{2g}$. There is of course also a term $gh^2\phi^2$
{ "domain": "physics.stackexchange", "id": 5559, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "higgs", "url": null }
homework-and-exercises, electrostatics, charge, density, dirac-delta-distributions Title: Delta Dirac Charge Density question I have to write an expression for the charge density $\rho(\vec{r})$ of a point charge $q$ at $\vec{r}^{\prime}$, ensuring that the volume integral equals $q$. The only place any charge exists is at $\vec{r}^{\prime}$. The charge density $\rho$ is uniform: $$\rho(\vec{r}) = \delta(\vec{r} - \vec{r}^{\prime})\rho$$ But if I evaluate the total charge, I get $$ q = \int dq = \int^{\infty}_{-{\infty}}\delta(\vec{r} - \vec{r}^{\prime})\rho ~dV $$$$= \rho\int^{\infty}_{-{\infty}}\delta({x} -{x}')dx\int^{\infty}_{-{\infty}}\delta({y} -{y}')dy\int^{\infty}_{-{\infty}}\delta({z} -{z}')dz$$ The Dirac delta functions integrate to one each, but what becomes of the charge density $\rho$? For that matter, how does one integrate a zero dimensional point over 3 dimensinal space? Any help greatly appreciated.
{ "domain": "physics.stackexchange", "id": 14014, "lm_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, electrostatics, charge, density, dirac-delta-distributions", "url": null }
object-oriented, game, objective-c Title: Adding features to a strategy game I'm working on a basic strategy game for iOS and I have a question about the overall layout of the code in the program. I added some features to the game today and I had to add code to several different places to get the features to function properly. In general I think I am doing things correctly, but I fear I am falling into common programming pitfalls that I do not yet know about. In this question I will walk through the features I wanted to add to the program, and the way I approached them. To start with I had basic enemies in the game that were randomly created on floors of the tower given certain conditions. When spawned they just stayed in place and did nothing. So I looked at the class and saw that once the enemies were created, there was no logic present to decide what they would do. So I added some logic to tell the enemies to move to attack the nearest wall if one was present on the floor that they spawned on.
{ "domain": "codereview.stackexchange", "id": 8080, "lm_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, game, objective-c", "url": null }
reference-request, co.combinatorics, fl.formal-languages, automata-theory, research-practice Title: Is there a book/survey-paper outlining language class hierarchies, closure properties, etc I'm currently doing some Formal Language research involving classes of languages above Regular but below Context Free. I'm looking at things like Reversal-Bounded Multicounter Machines, Single-stack counter machines, deterministic CFLs, etc. I'm wondering if anybody knows of a good book or survey paper which outlines the properties of these languages. Most of what I'm looking at is too obscure or too new to be in my Hopcroft-Ullman book, even the 1979 edition. Mainly I'm looking for which language classes are contained in one-another, the closure properties of these languages, and the decidability of basic problems (F-problems) on these languages. Some example of things I'd look up in this reference:
{ "domain": "cstheory.stackexchange", "id": 2087, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, co.combinatorics, fl.formal-languages, automata-theory, research-practice", "url": null }
Limit of $t$-distribution as $n$ goes to infinity I found in my intro to stats textbook that $$t$$-distribution approaches the standard normal as $$n$$ goes to infinity. The textbook gives the density for $$t$$-distribution as follows, $$f(t)=\frac{\Gamma\left(\frac{n+1}{2}\right)}{\sqrt{n\pi}\Gamma\left(\frac{n}{2}\right)}\left(1+\frac{t^2}{n}\right)^{-\frac{n+1}{2}}$$ I think it might be possible to show that this density converges (uniformly) to the density of normal as $$n$$ goes to infinity. Given $$\lim_{n\to \infty}\left(1+\frac{t^2}{n}\right)^{-\frac{n+1}{2}}=e^{-\frac{t^2}{2}}$$, it would be great if we can show $$\frac{\Gamma\left(\frac{n+1}{2}\right)}{\Gamma\left(\frac{n}{2}\right)}\to \frac{\sqrt{n}}{2}$$ as $$n\to \infty$$, yet I am stuck here. Can someone point out how to proceed or an alternative way to show that $$t$$-distribution converges to normal as $$n\to \infty$$. Thanks!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.976310525254243, "lm_q1q2_score": 0.8071274279871774, "lm_q2_score": 0.8267117962054048, "openwebmath_perplexity": 175.21277237591423, "openwebmath_score": 0.9458598494529724, "tags": null, "url": "https://stats.stackexchange.com/questions/449097/limit-of-t-distribution-as-n-goes-to-infinity" }
error-correcting-codes Title: When is Viterbi's algorithm practical? Here is an excerpt from Andrew S. Tanenbaum, Computer Networks, 5th edition, Chapter 3 (The data link layer), Page 208:
{ "domain": "cs.stackexchange", "id": 16195, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "error-correcting-codes", "url": null }
performance, php, sql, php7, yii `transaction_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'blast', `remaining_balance` decimal(19,6) NOT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(), PRIMARY KEY (`id`,`created_at`), KEY `transaction_type` (`transaction_type`), KEY `user_id_transaction_type` (`user_id`,`transaction_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
{ "domain": "codereview.stackexchange", "id": 42896, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, php, sql, php7, yii", "url": null }
audio, algorithms, speech-recognition One method is to use speech recognition software to obtain words from an audio segment. However, this method is unable to come up with how "similar" audio is to human speech; it can often tell whether or not there are words in the audio, but if there are no definite words, it can't tell close the audio is to having such words.Examples: CMU Sphinx, Dragonfly, SHoUT The more promising method is referred to as Voice Activity Detection (VAD). However, this tends to have the same problems: the algorithms / programs using VAD tend to just return whether or not the activity threshold has been reached, and no "similarity" value before or after such threshold. Alternatively, many just look for volume, not similarity to human speech.Examples: Speex, Listener, FreeSWITCH
{ "domain": "dsp.stackexchange", "id": 338, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "audio, algorithms, speech-recognition", "url": null }
ice creams in cylinders, not cones, you get 3 times as much! Oblique Cone. Every 4cm is estimating at best. When we write volume = s 3, strictly speaking this should be read as "s to the power 3", but because it is used to height of 15 cm. When we model the volume of a cone, we will be getting the following result. In the powerpoint is a link to a demonstration of the formula (not involving calculus as students studying this topic most likely will not have encountered this yet!). sphere = (4/3) pi r 3. You should order your ice creams in cylinders, not cones, you get 3 times as much!Volume of a Frustum of a Right Circular Cone A frustum may be formed from a right circular cone by cutting off the tip of the cone with a cut perpendicular to the height, forming a lower base and an upper base that are circular and parallel. A cylinder is a type of prism. Notice that the volume of a cylinder is derived by taking the area of its base and multiplying by the height . Calculates the volume,
{ "domain": "consultoriaig.es", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718486991903, "lm_q1q2_score": 0.8091304499023398, "lm_q2_score": 0.8175744828610095, "openwebmath_perplexity": 368.03488808347953, "openwebmath_score": 0.7482104897499084, "tags": null, "url": "http://paginasweb.consultoriaig.es/zyacniw/nfgrzmm.php?gakoombkk=volume-of-cone" }
amateur-observing, star-gazing, meteor-shower Good to go? You are mostly correct: a dark site is desirable, and the altitude of the radiant affects the observed hourly rate. However, meteors can appear in any part of the sky; you need not face the radiant exactly. The American Meteor Society recommends: The best strategy to see the most activity is to face the northeast quadrant of the sky and center your view about half-way up in the sky. By facing this direction you be able to see meteors shoot out of the radiant in all directions. This will make it easy to differentiate between the Quadrantids and random meteors from other sources.
{ "domain": "astronomy.stackexchange", "id": 4154, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "amateur-observing, star-gazing, meteor-shower", "url": null }
python, python-3.x, strings if string.endswith('ing'): string += 'ly' elif len(string) >= 3: string += 'ing' print(string)
{ "domain": "codereview.stackexchange", "id": 43376, "lm_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, strings", "url": null }
java, performance, recursion, image, gui if ( i > 0){ i--; if(curTop[i].contains("sausage")){ img = 0; }else if(curTop[i].contains("ham")){ img = 1; }else if(curTop[i].contains("pepperoni")){ img = 2; }else if(curTop[i].contains("green")){ img = 3; }else if(curTop[i].contains("mushrooms")){ img = 4; }else if(curTop[i].contains("olives")){ img = 5; }else if(curTop[i].contains("chicken")){ img = 6; }else{ img = 7; } iva[i].setImage(topImgs[img]); imgLoop(i, curTop); } } } There's a lot that can be said here, but I'll keep it to the main points of attention.
{ "domain": "codereview.stackexchange", "id": 24206, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, recursion, image, gui", "url": null }
newtonian-mechanics, forces, reference-frames, centripetal-force, centrifugal-force Then the passengers feel that they are swung outwards in the car, towards the far window. But in reality, it is not them who are swung outwards, it is rather the car which is moving into them, because it is turning and moving away from them from underneath them. This "swinging-outwards" feeling - which we can call a centrifugal effect - is not unique to human beings. It is of course also felt by any object inside the car, including the car itself. The inwards force is only acting at the wheels, so the upper part of the car feels swung outwards because it wants to just continue straight while the bottom part of the car wants to turn. If the lower part of the car and the wheels are pulled too quickly inwards (if you turn too sharply), then the upper part can't follow along. And then you see the car tilting outwards.
{ "domain": "physics.stackexchange", "id": 60939, "lm_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, reference-frames, centripetal-force, centrifugal-force", "url": null }
python, mathematics, combinatorics for two_places in all_places_combo: letter1_history = {} # Choosing the first letter the different from all the other for letter1 in alpha: if letter1 != equal_letter: letter1_history[letter1] = letter1 # Choosing the second letter that different from all the other for letter2 in alpha: if letter2 != equal_letter and letter2 != letter1: found = False for k in letter1_history.keys(): if letter2 == k: found = True if not found:
{ "domain": "codereview.stackexchange", "id": 31890, "lm_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, mathematics, combinatorics", "url": null }
ros, messages, ros-indigo Comment by kolner on 2018-05-29: I've found probably more elegant way to provide sychronized reading, which involves a class message_filters.ApproximateTimeSynchronizer in order to synchronize callbacks of IMUs' subscribers. Would it work appropriately? Comment by jarvisschultz on 2018-05-29: The algorithm that the ApproximateTimeSynchronizer uses is explained in some detail here. If that type of synchronization is appropriate for your use case (which only you can answer), then yes, it could work. Comment by jarvisschultz on 2018-05-29: Although, as @PeteBlackerThe3rd pointed out, this could be introducing temporal error to some of your data. If you really need exactly synchronized data then either your hardware needs to provide the capability to synchronize somehow (e.g. triggering, shared clocks, etc.) or you should be aware... Comment by jarvisschultz on 2018-05-29:
{ "domain": "robotics.stackexchange", "id": 30917, "lm_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, messages, ros-indigo", "url": null }
slam, navigation, mapping, odom-combined, gmapping Original comments Comment by Albert K on 2013-09-27: Yeah, I've tried both view_frame and tf_echo, the frame does not exist. Since the /map->/odom_combined transform is missing, we cannot localize the robot correctly. The SLAM functionality is reduced to only mapping. Comment by ayush_dewan on 2013-09-27: That seems a little weird. Is gmapping not publishing any frame or it is not publishing map->odom_combined?? In rviz check the tf tree once and confirm whether frame "/map" exists or not?? Comment by Albert K on 2013-09-29: It seems to be the problem of time synchronization problem between c1 and c2 computer on PR2. It is said that the tf is very sensitive to time. After I run the time sync command on basestation, c1, c2, everything gets fine. Comment by Albert K on 2013-09-29: The clock sync command can be found here: http://pr2support.willowgarage.com/wiki/PR2%20Manual/Chapter13#Clock_Synchronization
{ "domain": "robotics.stackexchange", "id": 15661, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, mapping, odom-combined, gmapping", "url": null }
catkin-make cmd_sub_ = rbcar_robot_control_node_handle.subscribe<ackermann_msgs::AckermannDriveStamped>("command", 1, &RbcarControllerClass::commandCallback, this); ^ /home/claudia/catkin_ws/src/rbcar_sim/rbcar_robot_control/src/rbcar_robot_control.cpp:278:153: note: candidates are: In file included from /opt/ros/indigo/include/ros/ros.h:45:0, from /home/claudia/catkin_ws/src/rbcar_sim/rbcar_robot_control/src/rbcar_robot_control.cpp:36: /opt/ros/indigo/include/ros/node_handle.h:389:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::)(M), T, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::fp)(M), T obj, ^ /opt/ros/indigo/include/ros/node_handle.h:389:14: note: template argument deduction/substitution failed: /home/claudia/catkin_ws/src/rbcar_sim/rbcar_robot_control/src/rbcar_robot_control.cpp:278:153: error: template argument 1 is invalid
{ "domain": "robotics.stackexchange", "id": 25020, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin-make", "url": null }
ros, embedded Title: Software architecture with micro-ROS and asynchronous events Hello everyone, I have a question regarding the software architecture with micro-ROS and asynchronous events, for example interrupts. For example an interrupt indicates when new data is present. Now I want to send this data with a publisher. How can this be realized within the micro-ROS framework? Is there an intended concept here? I also have a question about the sample code / concept on the website: https://micro.ros.org/docs/concepts/client_library/execution_management/ A code snippet for the example in Fig. 1 is shown at the bottom of that website. Here, the data pipeline is described with three executors. How is the communication between the executors realized? In the code are subscribers for data collection defined, where consequently the data must be sent from the preceding block by a publisher (over a topic)? That means that the communication within the node is realized by topics?
{ "domain": "robotics.stackexchange", "id": 37540, "lm_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, embedded", "url": null }
acid-base, equilibrium, aqueous-solution, ph, formal-charge You have omitted in your analysis the essential presence of other cations, like of alkali metals. You cannot have $\mathrm{pH}>7$ (at $\pu{25^{\circ}C}$) and to have $\ce{H+(aq)}$ as the only cation, as then $[\ce{H+(aq)}] \lt [\ce{OH-(aq)}]$. If the system consists just of $\ce{H2O}$ and $\ce{CO2}$ in any of its dissolved forms, without addition of a base like e.g. $\ce{NaOH}$, $\ce{Na2CO3}$ or $\ce{NaHCO3}$, so having truly just $\ce{H+(aq)}$ cations, then your chart should end at $\mathrm{pH}=7$, as you would not be able to reach alkalic $\mathrm{pH}$.
{ "domain": "chemistry.stackexchange", "id": 16789, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acid-base, equilibrium, aqueous-solution, ph, formal-charge", "url": null }
algorithms, complexity-theory, approximation Title: Calculating match % and ranking according to that I'm creating a website like where users will answer some yes/no questions set by me, up to them how many of those questions they want to answer. After a user submits his answer(s), he will be shown top 5 matches along with their match percentages. If two users have 10 common questions and their answers match for 8 of those questions then their match % will be 80%. I can make this but my concern is about efficiency. A way of making this: If a user wants to see his top matches then match % (or match ratio) will be calculated for him vs every other user in the system. This will be stored in a temporary array. Array is sorted. Top 5 matches from the array are displayed. Any less resource intensive way to calculate and show top matches?
{ "domain": "cs.stackexchange", "id": 15403, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, complexity-theory, approximation", "url": null }
The oscillation of a single pendulum is 2.05s. What is the period of another simple pendulum which makes 300 vibration in the time it takes the first pendulum to make 200 vibrations? 4. ### wcccd The period p of a pendulum, or the time it takes for the pendulum to make one complete swing, varies directly as the square root of the length L of the pendulum. If the period of a pendulum is 1.3 s when the length is 2 ft, find 1. ### physic A "seconds pendulum" is one that moves through its equilibrium position once each second. (The period of the pendulum is precisely 2.000 s.) The length of a seconds pendulum is 0.9928 m at Tokyo and 0.9943 m at Cambridge, England. 2. ### math The formula T=2*pi*sqrt[L/32] gives the period of a pendulum of length l feet. The period P is the number of seconds it takes for the pendulum to swing back and forth once. Suppose we want a pendulum to complete three periods in 2 3. ### Physics
{ "domain": "jiskha.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854103128327, "lm_q1q2_score": 0.8081460265598152, "lm_q2_score": 0.8333245870332531, "openwebmath_perplexity": 1050.4198965774242, "openwebmath_score": 0.905746579170227, "tags": null, "url": "https://www.jiskha.com/questions/349041/a-simple-pendulum-has-a-period-of-4-2sec-when-the-pendulum-is-shortened-by-1-m-the-period" }
linux but I can use rosrun -v leddar leddar.launch to run the package. when I open the rviz there have problem said that For fram[leddar]:Fixed Frame [map] does not exist Comment by ahendrix on 2016-04-04: It sounds like you have resolved the original issue with being unable to find the launch file. You should probably open a new question about being unable to connect to the serial port. (these are very different topics) Comment by Zero on 2016-04-04: ok.thanks. Comment by trusktr on 2021-04-01: I'm having a similar issue. How do we run source devel/setup.bash? I mean, where is that file. That's a relative path, so it is not clear what folder to be in. I think I have things installed, but I get the error regardless: vagrant@ubuntu-bionic:~$ apt list ros-melodic-rosbridge-* Listing... Done ros-melodic-rosbridge-library/bionic ... ros-melodic-rosbridge-msgs/bionic ... ros-melodic-rosbridge-server/bionic ... ros-melodic-rosbridge-suite/bionic ...
{ "domain": "robotics.stackexchange", "id": 24292, "lm_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 }
special-relativity, velocity, inertial-frames, differentiation, calculus \nonumber\\ & \boldsymbol{=}\dfrac{\gamma_v\dfrac{\mathrm dx}{\mathrm dt}\boldsymbol{-}\gamma_v\upsilon}{\left(\boldsymbol{-}\gamma_v\dfrac{\upsilon}{c^2} \right)\dfrac{\mathrm dx}{\mathrm dt}\boldsymbol{+}\gamma_v} \boldsymbol{=}\dfrac{u_x\boldsymbol{-}\upsilon}{\boldsymbol{-}\dfrac{\upsilon}{c^2} u_x\boldsymbol{+}1} \tag{A-01}\label{A-01} \end{align} that is \begin{equation} u'_x \boldsymbol{=}\dfrac{u_x\boldsymbol{-}\upsilon}{1\boldsymbol{-}\dfrac{\upsilon u_x}{c^2} } \tag{A-02}\label{A-02} \end{equation} Any way we use is equivalent to the division of the Lorentz equations \eqref{02a},\eqref{02b} side by side so I don't think that there exists any sense of the chain rule use. It doesn't give to us a better way or something new.
{ "domain": "physics.stackexchange", "id": 78872, "lm_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, velocity, inertial-frames, differentiation, calculus", "url": null }
c++, object-oriented, windows return 0; } Just a couple of quick thoughts. DoScan and GetName probably should be initialised to NULL as well. Load doesn't call Unload for any previous loaded dlls. If Load should be called once only per SaModule, that should be detected. A more informative exception could be thrown. "...during attempted insertion of plugin xyz", for example. Beware of function name decoration, if that could be an issue.
{ "domain": "codereview.stackexchange", "id": 2486, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, windows", "url": null }
spring, oscillators, phase-space, coupled-oscillators, normal-modes while the corresponding eigenvectors are: $\underline{\hat{x}}_{1} =\begin{bmatrix} 1 \\ 1 \end{bmatrix}$,$\quad$$\underline{\hat{x}}_{2} =\begin{bmatrix} 1 \\ -1 \end{bmatrix}$. The first eigensolution is the mode with the two masses oscillating "in phase" with the same amplitude and pulsation $\omega_1 = \sqrt{\frac{k}{m}}$. The second eigensolution is the mode with the two masses oscillating "in anti-phase" with the same amplitude and pulsation $\omega_2 = \sqrt{3\frac{k}{m}}$. We can use these eigensolutions to build the general solution of the homogeneous system as $\underline{x}(t) = A_1 \underline{\hat{x}}_1 e^{j( \omega_1 t +\phi_1)} + A_2 \underline{\hat{x}}_2 e^{j( \omega_2 t+\phi_2)}$ $x_1(t) = A_1 \hat{x}_{11} e^{j( \omega_1 t +\phi_1)} + A_2 \hat{x}_{21} e^{j( \omega_2 t+\phi_2)}$ $x_2(t) = A_1 \hat{x}_{12} e^{j( \omega_1 t +\phi_1)} + A_2 \hat{x}_{22} e^{j( \omega_2 t+\phi_2)}$
{ "domain": "physics.stackexchange", "id": 91451, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spring, oscillators, phase-space, coupled-oscillators, normal-modes", "url": null }
neural-network, backpropagation, convolutional-neural-network Title: Convolution backpropagation I'm in the progress to learn, and understand different neural networks. I pretty much understand now feed-forward neural networks, and back-propagation of them, and now learning convolutional neural networks. I understand the forward-propagation of them, but having issues understanding their back-propagation. There is a very good resource explaining the convolutional layer, however, can't understand the back-propagation. In my understanding, according the back-propagation algorithm of feed-forward neural networks/multi-layer perception, if I have the following input (its items as $i$), and filter (its items as $w$), giving the output (its items as $o$). $$\begin{pmatrix}i_{1}^1 & i_{2}^1 & i_{3}^1\\\ i_{4}^1 & i_{5}^1 & i_{6}^1\\\ i_{7}^1 & i_{8}^1 & i_{9}^1\end{pmatrix} * \begin{pmatrix}w_1^1 & w_2^1\\\ w_3^1 & w_4^1\end{pmatrix} = \begin{pmatrix}o_1^1 & o_2^1\\\ o_3^1 & o_4^1\end{pmatrix}$$
{ "domain": "datascience.stackexchange", "id": 8228, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-network, backpropagation, convolutional-neural-network", "url": null }
concentration, halides, hydrocarbons Title: How does the use of inert gas in fluorination of saturated aliphatic hydrocarbons make it less violent? While studying alkanes, I found this written in my book: Fluoridation can be achieved without violence when alkane is treated with fluorine diluted with an inert gas, or by the action of inorganic fluorides like $\ce{AsF3}$, $\ce{SbF3}$, $\ce{AgF}$, $\ce{HgF2}$, $\ce{Hg2F2}$, etc., or by use of bromo or iodo derivatives. The picture is given below for clarification:
{ "domain": "chemistry.stackexchange", "id": 8907, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "concentration, halides, hydrocarbons", "url": null }
ros, moveit, ros-melodic, universal-robots Originally posted by cambel07 on ROS Answers with karma: 92 on 2021-02-11 Post score: 1 It is best practice to make your Gazebo package publish its controllers under the same name as your real robot. Your simulation is much easier to change than the real robot driver. Your leftarm_controller is probably defined in the controllers.yaml of your gazebo package. Change leftarm_controller to say scaled_pos_joint_trajectory and make sure the type of controller matches. You can find the type of controller in your robot's driver package (in your case it is position_controllers/JointTrajectoryController). If you have multiple robot arms, you will want to start your robot driver in a namespace, so it advertises on different topics than the other arm. In that case its controller action will be at e.g. left_arm/scaled_pos_joint_traj_controller/follow_joint_trajectory. You can reproduce this in your gazebo package's controllers.yaml by nesting the tags: left_arm:
{ "domain": "robotics.stackexchange", "id": 36071, "lm_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, ros-melodic, universal-robots", "url": null }
# Sect. 4.1 Antiderivatives Sect. 4.2 Area Sect. 4.3 Riemann Sums/Definite Integrals Sect. 4.4 FTC and Average Value Sect. 4.5 Integration by Substitution. ## Presentation on theme: "Sect. 4.1 Antiderivatives Sect. 4.2 Area Sect. 4.3 Riemann Sums/Definite Integrals Sect. 4.4 FTC and Average Value Sect. 4.5 Integration by Substitution."— Presentation transcript: Sect. 4.1 Antiderivatives Sect. 4.2 Area Sect. 4.3 Riemann Sums/Definite Integrals Sect. 4.4 FTC and Average Value Sect. 4.5 Integration by Substitution Sect. 4.6 Numerical Integration and Trapezoidal Rule Particle Motion CHAPTER FOUR: INTEGRATION Write the general solution of a differential equation. Use indefinite integral notation for antiderivatives. Use basic integration rules to find antiderivatives. Find a particular solution of a differential equation. Sect. 4.1 Antiderivatives and Indefinite Integration
{ "domain": "slideplayer.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812327313545, "lm_q1q2_score": 0.8005721862557084, "lm_q2_score": 0.8267117940706734, "openwebmath_perplexity": 882.615969675128, "openwebmath_score": 0.8631556034088135, "tags": null, "url": "http://slideplayer.com/slide/8800457/" }
thermodynamics, fluid-dynamics, everyday-life, physical-chemistry, atmospheric-science Title: Why does a dump yard stink more in the night? There was an open dump yard a few miles away from where I used to live for an internship. It was not noticeable during the daytime, but once the sun sets, the dump yard reminded us of its presence through its stinking odor. The smell came every evening and left the following day as if on a schedule, and my colleagues shared the same experience. One of my friends said it might be because of the temperature, but that didn't make sense. Smells, or the gases that cause those smells, travel faster at higher temperatures, which is why food has a more intense smell when served hot, as opposed to when taken out of a fridge. That would mean that we would get the smell during the day, and not during the night, which is the exact opposite of what is happening in reality. What might be the reason then, why we can smell the dump yard at night, and not during the day?
{ "domain": "physics.stackexchange", "id": 95845, "lm_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, fluid-dynamics, everyday-life, physical-chemistry, atmospheric-science", "url": null }
ros, ros-melodic, dependencies apt-cache search melodic solfege tinyeartrainer ros-melodic-kdl-parser-py ros-melodic-visualization-marker-tutorials ros-melodic-rqt-logger-level ros-melodic-warehouse-ros ros-melodic-cpp-common ros-melodic-navfn ros-melodic-moveit-commander ros-melodic-rqt-topic ros-melodic-sound-play ros-melodic-roscpp-tutorials ros-melodic-moveit-ros-manipulation ros-melodic-forward-command-controller ros-melodic-rosconsole-bridge ros-melodic-visualization-msgs ros-melodic-gazebo-ros ros-melodic-teleop-tools-msgs ros-melodic-geometry-msgs ros-melodic-rqt-srv ros-melodic-rostest ros-melodic-twist-mux ros-melodic-catkin ros-melodic-rqt-shell ...and so on Comment by saikishor on 2020-02-17: @Reaper151 It seems the problem is not with the TIAGo simulation packages, it has something to do with your ROS setup, try to do the same using a ROS Melodic Docker and check what's happening (or) try to reinstall your ROS and check again. Comment by Procópio on 2020-02-17:
{ "domain": "robotics.stackexchange", "id": 34444, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-melodic, dependencies", "url": null }
action, callback, service, ros-hydro, message Original cloud contains 200k-300k valid points. Crop to a bounding volume of interest (~1 order of magnitude less points) Downsample with octomap (additional ~2 orders of magnitude reduction) Finally, if you need point clouds at discrete time instances (as opposed to a continuous stream), gate pointcloud traffic through an on-demand snapshotter. Originally posted by Adolfo Rodriguez T with karma: 3907 on 2013-09-08 This answer was ACCEPTED on the original site Post score: 6
{ "domain": "robotics.stackexchange", "id": 15453, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "action, callback, service, ros-hydro, message", "url": null }
general-relativity, string-theory, mathematical-physics Hawking, Ellis: "The large scale structure in space-time". You may have heard that both Hawking and Ellis are famous experts and that their work is hard to understand: While this may be true, their book is very well and clearly written and should be understandable to anyone with some background in GR and differential geometry. Try it. Anyway, I'd recommend that you try to become a little bit more specific with your question and narrow it down to a specific physical setting or theory, like: what is a singularity in viscuous flows described by the Navier-Stokes equation, what is the description of a black hole like singularity in a spacetime according to the XY theory of quantum gravity etc.
{ "domain": "physics.stackexchange", "id": 519, "lm_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, string-theory, mathematical-physics", "url": null }
parsing, rust, lexical-analysis In parser.rs: The use of self.source.chars().nth to keep getting the nth character is problematic. Note that .chars() will be a new iterator over the source string each time and nth will get the nth character; so you probably have a very inefficient algorithm (at least n^2) for parsing large strings. There are two possible fixes here. First, the easy way: Strings are a pain because character boundaries are of different lengths, making indexing into them difficult. So to completely avoid string issues, get rid of &str in the beginning and instead convert it to an array of characters: &[char]. Converting a string s to a vector of characters is easy: let char_vec: Vec<char> = s.chars().collect(). Then use &char_vec to get a &[char]. The harder way: to work with the string directly, what you "really" want is a pointer into the string, not an index. So start and current should really be iterators with lifetime &'a which are pointing into the string source. Like this: use std::str::Chars;
{ "domain": "codereview.stackexchange", "id": 42636, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "parsing, rust, lexical-analysis", "url": null }
c++, linked-list // This needs a return statement. // return *this; } Good try at the destructor. But there seems to be an ordering issue. ~SingleLinkedList(){ Node<T>* nodePtr = head; while(nodePtr != nullptr) { Node<T>* nextNode = nodePtr->next; // You should delete nodePtr here. // Then once you have deleted you can move to // the next item in the chain by assigning // nextNode to nodePtr nodePtr = nextNode; // To fix simply move this delete above the previous line delete nodePtr; } } Move semantics are a compliment to normal semantics. Things can not always be moved. So you should do this in addition to the normal copy version not instead of. void createNode(const T&& theData) { So I would have both functions: void createNode(const T& theData) void createNode(T&& theData)
{ "domain": "codereview.stackexchange", "id": 30711, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, linked-list", "url": null }
ros, wifi Originally posted by PeteBlackerThe3rd with karma: 9529 on 2017-12-29 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by jayess on 2017-12-29: +1 on the indenting and giving us more information.
{ "domain": "robotics.stackexchange", "id": 29625, "lm_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, wifi", "url": null }
algorithms, graphs Thus to find such an arborescence, run Tarjan's strongly connected components algorithm which takes $O(|V| + |E|)$ time. Loop over all the strongly connected components and find one with in-degree $0$, which takes $O(|V|)$ time. Keep looping and if you find a second one with in-degree $0$, report that an arborescence does not exist. Once you found the unique strongly connected component with in-degree $0$, simply pick any node in it and construct an arborescence rooted at it using a $O(|V| + |E|)$ depth-first search, as every other node is reachable from this one.
{ "domain": "cs.stackexchange", "id": 21316, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs", "url": null }
schroedinger-equation, group-theory Why does it seem like a tautology to me? Well, if $H\Psi=E\Psi$ then it should be obvious that $H(R\Psi)=E(R\Psi)$. I think my confusion is related to the fact that I don't know how $E$ as $i\hbar \frac{\partial}{\partial t}$ is energy. But I'm not looking for a physics answer to be honest. I don't want any physical argument or something. I just don't know what is being proven mathematically here. My question really boils down to: Why does the expression imply "$R\Psi$" has the same energy? Any help? I'm as confused as you by the boxed equation. At best the author is making that all-too-common mistake of reordering the expressions in a transitive equals relation, making the equation nonsensical when read left to right. However, it is not quite a tautology to prove what I think this is trying to prove: If $E$ and $\psi$ satisfy $H \psi = E \psi$, then $H (R \psi) = E (R \psi)$ whenever $H$ is invariant under conjugation by $R$.
{ "domain": "physics.stackexchange", "id": 25022, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "schroedinger-equation, group-theory", "url": null }
The second term. This is swiftly dealt with: by continuity of $$f$$ and $$0 on $$(0,1]$$ it follows that $$M=\max_{[\eta,1]}f<1$$. Then $$0\leq II_n\leq nM^n$$ so that $$II$$ indeed (converges and) tends to $$0$$. The first term. Integrating the inequality from above yields $$-n\bigg[\frac{(1-(\ell+\epsilon)x)^{n+1}}{(n+1)(\ell + \epsilon)}\bigg]^\eta_0 \leq I_n\leq -n\bigg[\frac{(1-(\ell - \epsilon)x)^{n+1}}{(n+1)(\ell - \epsilon)}\bigg]^\eta_0$$ The LHS equals $$\frac{n}{n+1}\frac{1}{\ell+\epsilon} - C_nq_1^n=\frac{1}{\ell+\epsilon}+o(1)$$ for $$C_n=\frac{n}{(n+1)(\ell + \epsilon)}$$ and $$q_1=1-(\ell + \epsilon)\eta\in(0,1)$$. Similarly, the RHS equals $$\frac{n}{n+1}\frac{1}{\ell-\epsilon} - D_nq_2^n=\frac{1}{\ell-\epsilon}+o(1)$$ for $$D_n=\frac{n}{(n+1)(\ell - \epsilon)}$$ and $$q_2=1-(\ell - \epsilon)\eta\in(0,1)$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668734137681, "lm_q1q2_score": 0.8044521766130933, "lm_q2_score": 0.8198933315126791, "openwebmath_perplexity": 8676.316014006905, "openwebmath_score": 0.9999970197677612, "tags": null, "url": "https://math.stackexchange.com/questions/3976248/calculate-lim-n-to-infty-int-0nf-fracxnndx/3976283" }
c++, c++11, memory-management, stack stack operator=(const std::initializer_list<T> &ilist) { this->_clear_all_nodes(); for (const auto &el : ilist) this->_add_node(el); return *this; } //MOVE ASSIGNMENT stack operator=(stack &&rhs) { this->_clear_all_nodes(); node *temp = std::move(rhs._top); while (temp != nullptr) { this->_add_node(std::move(temp->_key)); temp = temp->_next; } return *this; } stack operator=(std::initializer_list<T> &&ilist) { this->_clear_all_nodes(); for (const auto &el : ilist) this->_add_node(std::move(el));
{ "domain": "codereview.stackexchange", "id": 16912, "lm_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++, c++11, memory-management, stack", "url": null }
javascript, node.js <label>Temperature °C - <strong>Maximum</strong></label> <input type="number" class="form-control" name="maxtemp3" step=0.01> </div> <br> <br> <!-- All humidity --> <div class="humidity"> <label>Relative Humidity - <strong>Actual</strong></label> <input type="number" class="form-control" name="actualhumid3"> <label>Relative Humidity - <strong>Minimum</strong></label> <input type="number" class="form-control" name="minhumid3"> <label>Relative Humidity - <strong>Maximum</strong></label> <input type="number" class="form-control" name="maxhumid3"> </div> </div>
{ "domain": "codereview.stackexchange", "id": 39460, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, node.js", "url": null }
How is this series rearranged? I'm stuck at this. How is RHS rearranged? Is it a change of index? $$\sum_{n=1}^{2N} \frac{1}{n} - \sum_{n=1}^{N} \frac{1}{n} = \sum_{n=N+1}^{2N} \frac{1}{n}$$ I'm stuck here: $$\sum_{n=1}^{2N} \frac{1}{n} = \frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\dots+ \frac{1}{2N}$$ $$\sum_{n=1}^{N} \frac{1}{n} =\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\dots+ \frac{1}{N}$$ $$\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\dots+\frac{1}{2N}-(\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\dots+ \frac{1}{N})= \frac{1}{2N}-\frac{1}{N}=\frac{-1}{2N}$$ Thanks!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.971992476960077, "lm_q1q2_score": 0.8078647918286739, "lm_q2_score": 0.8311430499496095, "openwebmath_perplexity": 762.9398072475047, "openwebmath_score": 0.7017688155174255, "tags": null, "url": "https://math.stackexchange.com/questions/1803589/how-is-this-series-rearranged" }
abbreviation standard error mean Abbreviation Standard Error Mean table id toc tbody tr td div id toctitle Contents div ul li a href Abbreviation For Standard Deviation a li li a href Standard Error Of The Mean Definition a li li a href Scheduled Abbreviation a li li a href Abbreviate Scholarship a li ul td tr tbody table p operator precedence abs x x absolute value of x without regard to sign alpha significance level relatedl of a hypothesis test also type I error rate -a is standard error abbreviation excel the level of the confidence interval ANOVA analysis of variance beta p abbreviation for standard error in excel
{ "domain": "winbytes.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936068886641, "lm_q1q2_score": 0.899143230082056, "lm_q2_score": 0.9136765281148513, "openwebmath_perplexity": 10404.382160598483, "openwebmath_score": 0.3121330142021179, "tags": null, "url": "http://winbytes.org/help/standard-error/proportion-standard-error.html" }
strings, parsing, search, smalltalk Title: Smalltalk (Squeak) - String parsing I'm learning Smalltalk programming as I think its way ahead as an OOP programming tool. I would appreciate feedback regarding my coding of the following problem. I have a sequence of letters representing bases in a DNA and want to change the T to a U in the string. I have done this in two ways. The first uses the copyReplaceAll:with: message to the string object which changes every occurrence of 'T' to a 'U': string := 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC'. string copyReplaceAll: 'T' with: 'U'.
{ "domain": "codereview.stackexchange", "id": 26688, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "strings, parsing, search, smalltalk", "url": null }
gazebo, ubuntu, ros-fuerte, ubuntu-precise, 64bit Title: Gazebo Illegal instruction Hello I'm new to ROS and I installed Fuerte on Ubuntu 12.04 (Precise Pangolin) 64bit. The normal examples work well, but gazebo crashes with an illegal instruction error. I get the error with an AMD Phenom II CPU and with an Intel Core 2 CPU as well. Do you have any ideas? Thanks Matthias roslaunch gazebo_worlds empty_world.launch ... logging to /home/abc/.ros/log/67d03dc8-985f-11e1unch-gandalf-21949.log Checking log directory for disk usage. This may take awh Press Ctrl-C to interrupt Done checking log file disk usage. Usage is ignored process[empty_world_server-1]: started with pid [21969] Exception AttributeError: AttributeError("'_DummyThread' obje '_Thread__block'",) in ignored process[gazebo_gui-2]: started with pid [21976] Gazebo multi-robot simulator, version 1.0.1 Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and Released under the Apache 2 License. http://gazebosim.org
{ "domain": "robotics.stackexchange", "id": 9277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, ubuntu, ros-fuerte, ubuntu-precise, 64bit", "url": null }
Now, for the questions... • Is the above correct? It surely seems to be, but I find it kind of unsettling, especially since... • ... the same reasoning seems to apply to $\mathbf{Ab}\to \mathbf{Set}$. Is the same indeed true for $\mathbf{Ab}$? I'd intuitively expect richer structure in the nonabelian case. • The role played by the cyclic group ($\mathbb{Z}$) seems worth further consideration. I know $\mathbb{Z}$ is a generator (separator) in $\mathbf{Grp}$, but it doesn't seem to immediately lead to any useful generalizations. Is there some connection between endomorphisms of forgetful functor and separators? Or some other related notion? • What about some "more abstract" ways to answer such questions? That is, instead of element chasing perhaps some variant of Yoneda lemma for suitably enriched categories? Your proof is correct. Here is a shorter proof using the Yoneda Lemma (actually you have proven the Yoneda Lemma in a special case, we do this all the time without knowing it):
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303443461076, "lm_q1q2_score": 0.8092600252993428, "lm_q2_score": 0.8175744761936437, "openwebmath_perplexity": 137.56216228131262, "openwebmath_score": 0.9806076884269714, "tags": null, "url": "https://math.stackexchange.com/questions/658308/endomorphisms-of-forgetful-functor-mathbfgrp-to-mathbfset" }
For stage (ii), there are 9 choices of non-zero digit to go in the remaining left-hand empty box, and 9 to go in the right-hand box. Total number of choices = $9 \times 9 = 81$. So the number of different numbers with exactly two non-zero digits is $6 \times 81 = 486$. So the probability is $\frac{486}{10000}=0.0486$. 6. Originally Posted by mr fantastic (a) You want the combinations 0 X X X or X X X 0. Using the pigeon hole principle: (1)(10)(10)(10) + (10)(10)(10)(1) = 2000. But you have to subtract numbers of the form 0 X X 0 otherwise they get counted twice in the above: (1)(10)(10)(1) = 100. So the total number of numbers satisfying the restriction is 1900. The total number of numbers withut restriction is (10)(10)(10)(10) = 10000. So the probability is 1900/10000 = 19/100.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575121992375, "lm_q1q2_score": 0.8777278760094821, "lm_q2_score": 0.8933094145755219, "openwebmath_perplexity": 420.19214079886615, "openwebmath_score": 0.7649855017662048, "tags": null, "url": "http://mathhelpforum.com/statistics/97227-solved-probability-question-digits.html" }
javascript, algorithm, programming-challenge, functional-programming Better sort The sort is the bottle neck in this problem. You can use a binary tree sort as it is the least complex for real numbers (every coder should learn how to implement a binary tree sort) Do you need the sort? However I think (think means might be, I am going by instinct) that there is a faster solution that does not involve a sort and that is at most \$O(n)\$ Remember that the order of the points is not important, that you need only separate the points in two. It may take a few passes to do, but as long as the number of passes is not related to the number of points or 'k' you will have a \$O(n)\$ solution. I am not going to give you the solution this time (if there is one) as there is no problem solving experienced gained coping code.
{ "domain": "codereview.stackexchange", "id": 40375, "lm_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, algorithm, programming-challenge, functional-programming", "url": null }
f#, clustering newCentroids Finally the client code and a sample generator function: open System open FSLib let createData count = let rand = Random(5) let min = -500 let max = 500 [ for i in 1 .. count -> [| (float)(rand.Next(min, max)); (float)(rand.Next(min, max)); (float)(rand.Next(min, max)) |]] // Test Case for FSLib.Point2D: let kmc1_2D data initailCentroids = // Converts the initialCentroids list of float[3] to list of Point2D let seedCentroids = initailCentroids |> List.mapi(fun i (c : float[]) -> Point2D(c.[0], c.[1], i)) // Converts the data a sequence of Point2D objects let samples = data |> Seq.mapi(fun i (d : float[]) -> Point2D(d.[0], d.[1], i)) seedCentroids |> Seq.iter(fun x -> printfn "%A" x) printfn "\n" // Compares two points: as our only concern is whether they are equal or not it returns either 1 (unequal) or 0 (equal) let compare (point1 : Point2D) (point2 : Point2D) = if point1.X <> point2.X || point1.Y <> point2.Y then 1 else 0
{ "domain": "codereview.stackexchange", "id": 20892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "f#, clustering", "url": null }
hilbert-transform, minimum-phase Title: Hilbert transformer and minimum-phase I can't find out if it possible to compute the minimum-phase response corresponding to a given magnitude response using a Hilbert transformer. Is that possible? When I write Hilbert transformer I mean a 90-degree phase shifter. I know other ways to compute the minimum-phase response but since there are IIR filters that approximately can realize a Hilbert transformer I was wondering if it is possible to use the Hilbert transformer. Not sure if the answer is obvious but it is not a homework question. Edit: Implementation of proposed function y = test_minph(Mag) Mag = Mag(:); x = [Mag; Mag(end-1:-1:2)]; len = length(x); N = (len)/2-1; wn = [0; -1i*ones(N,1); 0; 1i*ones(N,1)]; xhat = real(fft(log(x))); y = -ifft(wn.*xhat); end
{ "domain": "dsp.stackexchange", "id": 5431, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hilbert-transform, minimum-phase", "url": null }
robotic-arm, jacobian, orientation # Compute torque commands tau = (pinv_jac @ target_dx - dq[:, np.newaxis]) + G[:, np.newaxis] the function that I used to compute the quaternion error is def compute_quat_vec_error(quat_desired, quat_measured): eta_d = quat_desired[-1] eta = quat_measured[-1] q_d = quat_desired[:3] q = quat_measured[:3]
{ "domain": "robotics.stackexchange", "id": 2564, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "robotic-arm, jacobian, orientation", "url": null }
python, beginner, python-3.x, role-playing-game else: #Misfire, add * nameEdit += '*' #Check if inven item is Item instance and the same as item elif isinstance(self._inven[item + nameEdit], Item) and self._inven[item + nameEdit] == _item: self._inven[item + nameEdit] = [2, _item] break else: #Misfire, add * nameEdit += '*' else: #Add new item self._inven[item + nameEdit] = _item break else: print('Item type(?) not available: ' + str(type(_item) ) ) break
{ "domain": "codereview.stackexchange", "id": 28639, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, role-playing-game", "url": null }
python, tkinter, shuffle global time_score, high_score, name, word_count, skips, word, start_time wrong_label.config(text="WRONG!", fg='red') time_score_label.config(text="Time: " + str(time_score) + "s") root = Tk() root.title("SpeedTypr") root.geometry = ("750x600")
{ "domain": "codereview.stackexchange", "id": 17506, "lm_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, tkinter, shuffle", "url": null }
Ampere's Circuital Law Ampere's law is is analogous to Gauss's law in electrostatics. apparent power. This equation applies to situations where the electric current is constant. Or / Describe the working of a moving coil galvanometer. This course is the introductory course in electromagnetic theory. Show through an example, how this law enables an easy evaluation of this magnetic field when there is a symmetry in the system? (ii) What does a toroid consist of? Show that for an ideal toroid of closely wound turns, the magnetic field. Ampere’s magnetic circuital law 255. Links are added to Ampere's circuital law and Lorentz force and Biot-Savart law. There is, therefore, a need to include this current ‘ flowing’ across the ‘gap’. amplifier - general purpose inverting amplifier. Ampere’s law can be valuable when calculating magnetic fields of current distributions with a high degree of symmetry. Line integral of the magnetic field B around any closed curve is equal to 0 times the net
{ "domain": "animalhousesrl.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126438601955, "lm_q1q2_score": 0.8413637768140202, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 527.8623371915256, "openwebmath_score": 0.7762930393218994, "tags": null, "url": "http://dkxo.animalhousesrl.it/ampere-circuital-law.html" }
positive-definite matrix. The Inner Product The inner product (or dot product'', or scalar product'') is an operation on two vectors which produces a scalar. Ordinary inner product of vectors for 1-D arrays (without complex conjugation), in higher dimensions a sum product over the last axes. ^��t�Q��#��=o�m�����f���l�k�|�‰yR��E��~ �� �lT�8���6�c�|H� �%8Dxx&\aM�q{�Z�+��������6�$6�$�'�LY������wp�X20�f��w�9ׁX�1�,Y�� In Euclidean geometry, the dot product of the Cartesian coordinates of two vectors is widely used. More abstractly, the outer product is the bilinear map W × V∗ → Hom(V, W) sending a vector and a covector to a rank 1 linear transformation (simple tensor of type (1, 1)), while the inner product is the bilinear evaluation map V∗ × V → F given by evaluating a covector on a vector; the order of the domain vector spaces here reflects the covector/vector distinction. This ensures that the inner product of any vector … NumPy Linear Algebra Exercises, Practice and Solution: Write a
{ "domain": "ac.th", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102524151827, "lm_q1q2_score": 0.8488800296174422, "lm_q2_score": 0.8774767762675405, "openwebmath_perplexity": 668.7707819299859, "openwebmath_score": 0.8892807364463806, "tags": null, "url": "https://maet.eat.kmutnb.ac.th/v0uuvx85/inner-product-of-complex-vectors-8f9b90" }
c#, database, entity-framework, wpf, postgresql private void TextBoxName_TextChanged(object sender, TextChangedEventArgs e) { PopulateDataGrid(); } } } Reducing your code to what I think is the core of your question: private System.Linq.IQueryable<Multi.Model.clients> FilterClients(optisysEntities db, System.Linq.IQueryable<Multi.Model.clients> clients) { if (!String.IsNullOrWhiteSpace(textBoxName.Text)) clients = db.clients.Where(c => c.name.Contains(textBoxName.Text) || c.phone.Contains(textBoxName.Text)); if (!String.IsNullOrWhiteSpace(search.Email)) clients = clients.Where(u => u.Email.Contains(search.Email)); if (search.UsertypeId.HasValue) clients = clients.Where(u => u.UsertypeId == search.UsertypeId.Value); return clients; } Yes, this is one of the better ways to do dynamic filtering.
{ "domain": "codereview.stackexchange", "id": 30197, "lm_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#, database, entity-framework, wpf, postgresql", "url": null }
thermodynamics, temperature, microwaves, food Added later: I did some research. If you google "microwave penetration depth" you will find different sites giving reasonably consistent values. For water at room temperature it's around 1 to 1.5 cm, but it's more for cooked meat. It's also important to note that there is no sharp cutoff. The penetration depth is defined as the depth at which the power is $1/e$ of the level at the surface, or about 37%. If you go the same distance further in, it will be 37% of 37%, and so on.
{ "domain": "physics.stackexchange", "id": 89630, "lm_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, temperature, microwaves, food", "url": null }
api, kotlin, music, reference fun setClass(clazz: Int): Ring { Class = clazz return this } fun setGroup(group: Int): Ring { Group = group return this } private fun modulo(x: Int): Int { return (x % Size + Size) % Size } } Your concepts look completely misguided. A ring is a mathematical concept, an algebraic structure. It does have a size, but it doesn't have a value. The value would be part of a ring element. Such a ring element is a tuple (ring, value). The pitch of a note is indeed a ring element. A ring element can only be used to store the pitch of a note, but not its octave. If it did, it would not match the mathematical concept of a ring anymore. To represent a musical note in Western notation, my first idea is: data class Note( val octave: Int, val name: NoteName, val mod: NoteModifier, val duration: NoteDuration ) enum class NoteName { C, D, E, F, G, A, B }
{ "domain": "codereview.stackexchange", "id": 35186, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "api, kotlin, music, reference", "url": null }
python, nlp, sentiment-analysis Here, I tokenize the sentence as follow: from nltk.tokenize import word_tokenize tokenized_sents = [word_tokenize(i) for i in sentence_List] tokenized=[i for i in tokenized_sents] Then I try to find out surrounding words with respect to my target phrases by using this loot at here. However, I want to find out relatively closer or closest adjective, or verbs or VBN with respect to my target phrase. How can I make this happen? Any idea to get this done? Thanks POS-tagging consist of qualifying words by attaching a Part-Of-Speech to it. Part-Of-Speech is a tag that indicates the role of a word in a sentence (e.g. a noun, a transitive verb, a comparative adjective, etc.). You need this to know if a word is an adjective, and it is easily done with the nltk package you are using [source]: >> nltk.pos_tag("The grand jury") >> ('The', 'AT'), ('grand', 'JJ'), ('jury', 'NN')
{ "domain": "datascience.stackexchange", "id": 4257, "lm_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, nlp, sentiment-analysis", "url": null }
n=1000; (* Sample size *) raw=RandomVariate[BinormalDistribution[{mu,mu},{sigma,sigma},rho],n]; (* Create a table with the minimum (b) and maximum (a) of each pair of random samples and a placeholder for d *) data=Table[{Min[raw[[i,All]]],0,Max[raw[[i,All]]]},{i,n}]; (* Determine the weighted average of a and b *) c = 0.4; data[[All,2]]=c data[[All,3]]+(1-c)data[[All,1]]; (* Plot the resulting samples *) ListPointPlot3D[data, BoxRatios->{1, 1, 1}] Note that none of the elements of the triplet will have a normal distribution but the triplet is generated from a bivariate normal distribution.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.965899575269305, "lm_q1q2_score": 0.8170954390228207, "lm_q2_score": 0.8459424353665381, "openwebmath_perplexity": 1734.551798488426, "openwebmath_score": 0.22503715753555298, "tags": null, "url": "https://mathematica.stackexchange.com/questions/97730/generating-correlated-random-variables-with-normal-distribution" }
newtonian-mechanics, newtonian-gravity, celestial-mechanics If you want to know how two objects will move because of a force between them, relative to a distant inertial observer, calculate the change of their relative velocity by picking whatever frame measures the acceleration due to gravity that you want to integrate over time, then conserve momentum in the distant inertial frame. For example: Bob and Alice are standing together on some frictionless ice. Bob (mass $m_B$) pushes on Alice (mass $m_A$) such that Alice has a velocity of $v$ relative to Bob. Conserve momentum $P_0$ in the frame in which you want to measure Alice's and Bob's velocity. (If this is the frame in which Alice and Bob were initially standing still, $P_0 = 0$.) $P_0 = m_A v_a + m_Bv_b$ $v = v_a - v_b$ Solve for $v_a$ and $v_b$ in terms of $v, m_A, m_B, P_0$.
{ "domain": "physics.stackexchange", "id": 95272, "lm_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, newtonian-gravity, celestial-mechanics", "url": null }
c++, c++11, vectors, container #include <vector> #include <algorithm> /* LinkedVector * Vector of elements with links to other elements * Basically does what this would do if it was compilable : * vector<pair<T, vector<V::size_type>>> * where T is the usual type (in a vector<T>) * and V is the type of the whole vector (so that V::size_type is the type of its indices) * The class has an inherited vector<T> and a member vector<vector<vector<T>::size_type>> */
{ "domain": "codereview.stackexchange", "id": 9563, "lm_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++, c++11, vectors, container", "url": null }
javascript, jquery, ajax // Handling _completeCallback if(!_completeCallback || typeof _completeCallback !== "function") _completeCallback = function() {}; // AJAX configuration object var ajaxObj = { url : _url.trim(), contentType : "application/json", type : _type.trim(), data : _data || {}, async: !!isAsync, success : function(data) { try { _successCallback(data); } catch (exception) { global.logger.i(TAG, 'Exception! ' + exception); } }, error : _errorCallback, complete: _completeCallback }; // Capturing AJAX call return $.ajax(ajaxObj); }; Let me know if this is a valid way to centralize the AJAX calls. Central ajax function in jquery
{ "domain": "codereview.stackexchange", "id": 25459, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, ajax", "url": null }
denoising, covariance The picture in the bottom is the result after applying KLT on the data, by zeroing the smallest eigenvalue of data's covariance matrix. My question is, why the assumption of time alignment of the "event" (horizontal features)? The method fails if the events occurred along a line with a slope, that is the same event was observed with a delay from one trace to the next. Thanks There is something that is not clear of what you have done with the data, and that is who do you form the random vectors to perform de SVD (or EVD) on the covariance matrix.
{ "domain": "dsp.stackexchange", "id": 1620, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "denoising, covariance", "url": null }
chaos-theory, non-linear-systems My take is that, without nonlinearity, folding is missing. One of the main mechanisms behind classical chaos is the so-called stretch and fold. It can be visualized as a blob of initial conditions being stretched and then folded over itself by the mapping: stretching leads to a divergence of close trajectories (the hallmark of chaos), while folding keeps them bounded (and dense). A linear system may be able to produce stretching, but this alone corresponds to a trivial behavior, divergence. But, in the spaces we're considering, a linear system cannot produce folding:
{ "domain": "physics.stackexchange", "id": 48701, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "chaos-theory, non-linear-systems", "url": null }
java Prefer verb names for methods. I would call it sort, except that this doesn't sort. It just bubbles the largest item to the last position. So I simply call it bubble. I prefer names like data to names like array. I removed your initial check. The for loop will not run in that case, having the same effect. So you don't need the initial check. This version returns a boolean to say whether the method did anything. How would we know that it was sorted? Then the data would be in order and we'd make no swaps. So this tracks whether it swapped or not. If it did not, it's sorted. If it did swap, it's not sorted. I don't check it, but top has to be less than or equal to data.length. If greater, you will get an array out of bounds exception (unless top is 1 and the array is empty, in which case it is sorted and will just return).
{ "domain": "codereview.stackexchange", "id": 41242, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java", "url": null }
ros, turtlebot, rosparam, turtlebot-calibration NODES / kinect_breaker_enabler (turtlebot_node/kinect_breaker_enabler.py) openni_manager (nodelet/nodelet) openni_camera (nodelet/nodelet) pointcloud_throttle (nodelet/nodelet) kinect_laser (nodelet/nodelet) kinect_laser_narrow (nodelet/nodelet) scan_to_angle (turtlebot_calibration/scan_to_angle.py) turtlebot_calibration (turtlebot_calibration/calibrate.py) ROS_MASTER_URI=http://10.0.12.151:11311
{ "domain": "robotics.stackexchange", "id": 7092, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, turtlebot, rosparam, turtlebot-calibration", "url": null }
- 3 years ago Do solve an easy one Like this - 3 years ago Yes He also correct .. but thing is while writing this Raghav also little mistke ... $$\beta =-V\cfrac { dp }{ dV }$$ here V=intial vol. Since it is neglibly changed ... @Raghav Vaidyanathan @Mvs Saketh - 3 years ago Awesome...... I got It completly .... Yes I realise My mistake ... Example of Circular disc is best , Thanks to you both guys for realising me my blunder.... Even an Genius known as Shashwat shukla ji .. also made this mistake intially .. he posted it and then deleted it ... :P :P - 3 years ago Haha :). Thanks for the undue praise... And yes, I also made the same mistake as I misinterpreted the word 'tensile'. - 3 years ago yes, its a common error, thanks for posting, please post more such problems when you want, these were pretty good quality problems - 3 years ago Karan has posted a closed form for question 1(scroll down to see it)....What would your approach to arrive at the same, be? - 3 years ago
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102589923637, "lm_q1q2_score": 0.8082553390688111, "lm_q2_score": 0.8354835309589074, "openwebmath_perplexity": 1549.150341953173, "openwebmath_score": 0.8924978375434875, "tags": null, "url": "https://brilliant.org/discussions/thread/jee-math-problem-help/?sort=new" }
newtonian-mechanics, orbital-motion, speed What I need: orbital speed $v$. My biggest issue is taking first point into consideration. I know for circular orbit $$v = \sqrt{\frac{GM}{r}},$$ but that doesn't bring me any closer to solution. I assume we can neglect the orbiting mass $m$ compared to the parent body mass $M$, hence $m\ll M$. In any Kepler orbit the orbital speed $v$, radius $r$ and semi-major axis $a$ are related by the vis-viva equation: $$v^2=GM\left(\frac{2}{r}-\frac{1}{a}\right) \tag{1}$$ This equation holds all the way along the orbit, not only at perihelion and aphelion. You also have Kepler's 3rd law relating the semi-major axis $a$ and orbital period $T$: $$\frac{a^3}{T^2}=\frac{GM}{4\pi^2} \tag{2}$$ Now you can use both equations (1) and (2) and eliminate $a$ from them. You will get an equation relating $v$, $r$ and $T$. Then you can solve that equation for $v$.
{ "domain": "physics.stackexchange", "id": 68386, "lm_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, orbital-motion, speed", "url": null }
c#, json, serialization, async-await, json.net try { return await JsonConvert.DeserializeObjectAsync<T>(serialsedString); } catch (JsonSerializationException ex) { _logger.LogEntry(ex); throw new SerialisationException("Could Not Deserialse The Object", ex); } } /// <summary> /// Uncompress and deserialise the Json string into the generic object /// </summary> /// <typeparam name="T">Generic type of the serialised object</typeparam> /// <param name="serialed">The object to be serialised</param> /// <returns>An uncompressed & deserialsied object of type T</returns> public async Task<T> DeserialseAndUnCompressAsync<T>(byte[] serialed) { if (serialed == null) throw new ArgumentNullException("serialed");
{ "domain": "codereview.stackexchange", "id": 13430, "lm_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#, json, serialization, async-await, json.net", "url": null }
So should we switch the door we have chosen, or does it not matter if we switch or stay with our choice? One of the problems with this question, is the motivations of the host are unknown. You specifically said that he revealed one of the doors, but not whether: • He always reveals a door. • He always reveals a losing door. Without knowing that information, it is impossible to know if you should switch, not switch, or it doesn't matter. - The Monty Hall problem always confused me. And so, I coded it up in Matlab (2013a) to better understand it. In this version, the number of games played and N, the number of doors per game, are user settable parameters. I found 100,000 games gives relatively stable win/loss distributions for N = 100. Code: %Monty Hall problem assuming N doors, and N-2 doors %opened prior to the final door choice. clear;clc rng('shuffle');
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983342957061873, "lm_q1q2_score": 0.8318515378070829, "lm_q2_score": 0.8459424373085146, "openwebmath_perplexity": 765.8667170314341, "openwebmath_score": 0.7283174395561218, "tags": null, "url": "http://math.stackexchange.com/questions/608957/monty-hall-problem-extended/609797" }
navigation, rviz, ros-kinetic, gmapping, marker Your goal is to create a new map by replacing the values of the cells at the pose of an object from 100 to 0, that would remove the objects from the map. You need to have another occupancy grid to save the history of your objects that have been removed. This occupancy grid would have cells with intermediate values at the pose of the objects (I'll suggest 50 but anything different than 0, -1 or 100 would be fine). This occupancy grid will be constantly overwritten (meaning the value of each cells) by the occupancy grid from gmapping to always have the updated map, unless the cells have the value 50. By doing so you won't have to deal with the same object each time. Without history_map, you wouldn't know which cell needs to be overwritten or not and you would do the same calculations over and over. Then you will have to remove the objects and you'll be able to create the cleared_map by changing every cells of histroy_map from the value 50 to 0. Delete your objects
{ "domain": "robotics.stackexchange", "id": 32537, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, rviz, ros-kinetic, gmapping, marker", "url": null }
ros, household-objects-database, rosservice Title: unable to communicate with service Hey ,I get this error : ERROR: Unable to communicate with service [/objects_database_node/get_model_list], address [rosrpc://grasp.willowgarage.com:15432] when I tried to add model sets to my DB "household_objects_database" using this command : rosservice call /objects_database_node/get_model_list REDUCED_MODEL_SET ,roscore was running too . I'm using furete with Ubuntu 11.10 Originally posted by RiskTeam on ROS Answers with karma: 238 on 2013-03-10 Post score: 1 Unfortunately, we are no longer supporting remote access to a database server hosted at Willow Garage. Instructions for installing the household_objects_databaselocally are provided here: http://www.ros.org/wiki/household_objects_database Originally posted by Matei Ciocarlie with karma: 586 on 2013-03-21 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 13284, "lm_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, household-objects-database, rosservice", "url": null }
magnetic-fields, electric-circuits, electric-fields, potential, electromagnetic-induction Consider case 2 above. Here we have a similar time-varying, uniformly distributed cylindrical magnetic field in the region as shown. An equilateral triangular conductor is placed in the magnetic field, with its centroid coinciding with the centre of the cylindrical region. The three branches of the triangle have the SAME resistances. In this case, we wish to find out the potential difference between the points A and B. This is a very common question given in the text-books. My question is on this case 2. In this case, we are asked the potential difference between points A and B.
{ "domain": "physics.stackexchange", "id": 92310, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetic-fields, electric-circuits, electric-fields, potential, electromagnetic-induction", "url": null }
experimental-chemistry, solutions, spectroscopy, enzymes, uv-vis-spectroscopy For water, the absorption coefficients $\alpha\ [\mathrm{m^{-1}}]$ at $\lambda$ = 680, 580, 535, 480 and 380 nm are 0.47, 0.09, 0.045, 0.013 and 0.011. (Source: R. M. Pope, E. S. Fry, Applied Optics, 1997, 36, 8710-8723) That is not a lot. On the other hand, you never know about impurities in your buffers or other components (apart from your probe). Therefore, you usually do not measure against "just the solvent", but against the solution of "everything except the probe" to record the complete background.
{ "domain": "chemistry.stackexchange", "id": 952, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "experimental-chemistry, solutions, spectroscopy, enzymes, uv-vis-spectroscopy", "url": null }
routing, ip For instance, if you send an IP packet over Ethernet, then the packet needs to contain an Ethernet destination address (so that the recipient host's Ethernet card can tell it is destined for them) and an IP destination address (because it's possible that ultimate destination is a host not on this Ethernet link, in which case the Ethernet destination address will be a router on this Ethernet link and the IP destination address will be the ultimate destination). Each protocol is simpler if it has its own address space, that does not depend on that of any other protocol.
{ "domain": "cs.stackexchange", "id": 19439, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "routing, ip", "url": null }
php, array, wordpress /* * remove any missing $menu items from our $custom_menu */ if ( !empty($removed_menu_items) ) { foreach ( $custom_menu as $index => $custom_menu_item ) { if ( in_array( $custom_menu_item[2], $removed_menu_items ) ) { unset( $custom_menu[$index] ); } } } } There is nothing inherently wrong with foreach loops. Alternatives might include:
{ "domain": "codereview.stackexchange", "id": 16370, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, array, wordpress", "url": null }