text
stringlengths
1
1.11k
source
dict
vectors mathematically . Once the war begins, all five teams pull as hard as they can. However, note that the angle must really be between 90 degrees and 180 degrees because the first vector component is negative and the second is positive. R1= A + B. R2= A + B + C. R3= A + B - C. Vector addition is presented here because it occurs quite often in the study of propulsion and because it demonstrates some fundamental differences between vectors and scalars. Vector addition involves adding each of the individual points on the vector to come up with new vector points. The vector addition may also be understood by the law of parallelogram. In the center is a ring with five ropes connected to it, and at the end of each rope is a tug-of-war team. scalars are shown in normal type. Then, according to parallelogram law of vector addition, diagonal OB represents the resultant of P and Q. This is a large HTML document. Vectors word problems. The 2D vector addition calculator by iCalculator is an
{ "domain": "umb.sk", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241956308277, "lm_q1q2_score": 0.8180079414804768, "lm_q2_score": 0.8438951025545426, "openwebmath_perplexity": 575.4111837278356, "openwebmath_score": 0.7423794269561768, "tags": null, "url": "http://www.etap.umb.sk/vzq70p/2c73f1-vector-addition-formula" }
classical-mechanics, lagrangian-formalism, calculus, variational-calculus \end{align} The Euler-Lagrange equations are \begin{align} 0 &= \frac{d}{dt} \frac{\partial L}{\partial \dot{q}} - \frac{\partial L}{\partial q} \\ &= \frac{d}{dt} [\frac{\partial }{\partial \dot{q}}(\frac{1}{2} m \dot{q}^2 - \frac{1}{2} k q^2)] - \frac{\partial }{\partial q}(\frac{1}{2} m \dot{q}^2 - \frac{1}{2} k q^2) \\ &= \frac{d}{dt} [m \dot{q}] + kq \\ &= m \ddot{q} + k q \end{align} which is the same result as Newton's law for the Harmonic oscillator. This is the result we want to end up with from first principles by following the same steps we use to derive the Euler-Lagrange equations, but for the specific Lagrangian above rather than an abstract one. Recall that in general $S(q)$ is just a function of functions $q$ (which are a function of $t$) and in general we can plug any random $q$ into $S$, so lets take an example, say the $q$ for which $q(t) = t^3$. \begin{align}
{ "domain": "physics.stackexchange", "id": 57254, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, lagrangian-formalism, calculus, variational-calculus", "url": null }
continuous-signals, impulse-response, dirac-delta-impulse Then, $at$ is seen as a time stretch. Even at the vicinity of $0$, the time axis can be stretched. One interpretation of the Dirac is to consider it as a limit of standard function sequences of unit area. Examples are rectangle (left) or triangle (right) functions. If the triangles $T_\epsilon(t)$ of support $[-\epsilon,\epsilon]$ and height $\epsilon$ are dilated by $a$, they now have support $[-a\epsilon,a\epsilon]$, hence have area $a$ instead of $1$.
{ "domain": "dsp.stackexchange", "id": 8055, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "continuous-signals, impulse-response, dirac-delta-impulse", "url": null }
regular-languages, context-free Title: Is the concatenation of a non-regular CFL and a complement of a regular upper-set always non-regular? Let $L_1$ be a non-regular CFL. Let $L_2$ be a regular language. Assume that $\left(L_1\right)^{*} \subseteq L_2$. I'm looking at $L_3 = \left( L_1 \right) ^{*} \circ \overline{L_2}$. Is $L_3$ always non-regular? I can find multiple examples of it being non-regular, yet none of it being regular. Edit: $\overline{L_2} \neq \emptyset$. Consider the language $L = \{uv\mid u, v\in\Sigma^*, |u|=|v|\wedge u\neq v\}$. I claim that $L$ is context-free, it is not regular (a simple pumping lemma proof can do the trick), but $L^*$ is regular, without being equal to $\Sigma^*$, so that means that $L^*\overline{L^*}$ is regular and satisfies your conditions. Now let's show that if we denote $L'= (\Sigma\Sigma)^*\setminus\left(\bigcup\limits_{a\in\Sigma}a^*\right)\cup \{\varepsilon\}$ (words of even length, not composed of the same letter), then $L^*=L'$:
{ "domain": "cs.stackexchange", "id": 18448, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "regular-languages, context-free", "url": null }
by the ( )... Mcgraw-Hill Dictionary of Scientific & Technical terms, precautions and advantages at Vedantu.com the difference between frequency polygon frequency... Verbal form ( e.g more general polytope in any number of sides occurrences of values ;.... Circle and its perimeter p by is one which does not intersect itself star polygons and other polygons... Been suggested that γόνυ ( gónu ) knee '' may be the origin of.... \Displaystyle a } must be used many times a specified … polygon ( plural polygons ).... Scientific field. unfamiliar problems involving frequency polygons can be drawn in two ways ;.... In Scientific field. some of the bars of a histogram chains of simple polygons and other self-intersecting polygons the. Determine its area 6E, … frequency polygon - frequency polygons can be used specified … polygon ( plural )! More easily expressed in verbal form ( e.g 100 edges, combine the prefixes as follows plane... Its boundary more than twice more generally when it is
{ "domain": "desertdingo.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.960361158630024, "lm_q1q2_score": 0.827387826184822, "lm_q2_score": 0.86153820232079, "openwebmath_perplexity": 1024.6579595903306, "openwebmath_score": 0.5896909832954407, "tags": null, "url": "http://desertdingo.com/l7ocfce/viewtopic.php?1b9ddc=frequency-polygon-wikipedia" }
c++, performance, sieve-of-eratosthenes, memory-optimization Print as you go Rather than searching the entire array at the end, only the part of the array after \$\sqrt{\text{MAX}}\$ really needs to be searched since all of the other primes were identified during sieveing. We can print them as they are discovered and save some time searching. Increment rather than multiply In the various loops, the expression 2*i+1 (stored in j in the first loop) is used to convert from an index to the actual numerical value it represents. It speeds things up a bit if the code simply increments j each loop increment. Clean up the loop Instead of using nested while loops, it seems to me to be cleaner if you use a for loop and inner if to determine whether the number is composite and should simply be skipped, or prime and should be sieved. A new sieve: Using all of these suggestions, I get this, which is about 8% faster on my machine than the original. void sieve2() { bool *a = (bool*)malloc(MAX * sizeof(bool)); if (a == NULL) {
{ "domain": "codereview.stackexchange", "id": 17499, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, sieve-of-eratosthenes, memory-optimization", "url": null }
organic-chemistry, inorganic-chemistry Wikipedia gives a specific example:
{ "domain": "chemistry.stackexchange", "id": 86, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, inorganic-chemistry", "url": null }
newtonian-mechanics, newtonian-gravity, potential-energy I have illustrated this in the graphics below. The top half shows the case for the spring fixed to a wall ( or a very heavy free mass), the bottom half for the spring connecting two equal masses. In both cases the spring is stretched to length $x$ initially (for simplicity assuming the spring has zero extension when relaxed) with the masses at rest. The second picture in each case shows the spring contracted back to length $x/2$ with the masses having gained the corresponding kinetic energy, with the total energy (potential energy $U$ + kinetic energy $K$) equal to the initial (potential) energy $1/2\cdot k\cdot x^2$ (which is solely the elastic energy stored in the spring when stretched and is independent of the attached masses). The difference between the two cases here is merely that the kinetic energy imparted after contraction of the spring is shared between the two masses in the second case, because the work done on each mass is smaller due to the smaller distance each one moved.
{ "domain": "physics.stackexchange", "id": 100122, "lm_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, potential-energy", "url": null }
simulation The driving fields should be treated as classical driving fields and not a quantum mechanical Bosonic mode. The simulation needs to include a finite linewidth for the state It also needs to include detuning, because we are virtually populating the $|2\rangle$ state. Once you put all these in as described in the lecture notes, you should be able to see the phase dependet Rabi tranisition. BTW, to get you started, I am including here some basic qutip code that should contain the necessary ingredients. I didn't get the correct Rabi flipping behavior and it's a bit hard for me to tweak it due to lack of time, but I believe it should put you on the right path. import qutip as qp import numpy as np # parameters w01 = 1 w12 = 4 g02 = 0.01 g12 = 0.01 gamma01 = 0.01 gamma12 = 0.01 phi = 0 # angle between drives
{ "domain": "quantumcomputing.stackexchange", "id": 3643, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "simulation", "url": null }
python, python-3.x Where input_datalist is the pace at each datapoint and input_distancelist is the amount of meters covered from the beginning to this datapoint. I have already written some code which is working, but is surprisingly slow and has a minor bug, in which the last item needs to be removed, as it will always be a zero. If someone could take a look at it and suggest some improvements (especially in terms of performance), that would be very helpful. Typically, the files contain between 800 and 3000 datapoints. For a example, for a run of roughly 6 km "runtastic_20191117_1510", the input data is:
{ "domain": "codereview.stackexchange", "id": 36947, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x", "url": null }
asymptotics, master-theorem However, if you try plugging in values in this calculator, you see that the answer is $\Theta(n^{\log_{3}{10}})$. Does anyone have a formal reason? I am still confused as to which of these conditions apply. Plotting isn't foolproof: for any $k,\varepsilon>0$, we have $\log^kn = o(n^\varepsilon)$ (here, I've cancelled the common term of $n^2$). However, you can need to take $n$ really big to see it when $\varepsilon$ is small (e.g., $0.095$) and $k$ isn't so small (e.g., $5$). Here's the plot for $0\leq n\leq 10^{131}$, again with the $n^2$ term cancelled, and it looks quite different from your plot up to $n=10^5\,$! Indeed, this question may even have been designed to catch you out if you try to compare the asymptotic growth by plotting instead of by understanding.
{ "domain": "cs.stackexchange", "id": 12193, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "asymptotics, master-theorem", "url": null }
Smoothing It is sometimes inconvenient if a signal has many abrupt peaks and troughs. Often, the quantity of interest is actually the underlying trend rather than the fine detail. A good way to smooth a choppy signal is to use a moving average. This involves sliding a window of fixed size over original data and replacing the centre value with the mean of all the values that fall within the window. Figure 5 illustrates the use of Excel to calculate a moving average with window size of 15 (MA15) for a set of sea surface temperature readings. Figure 5: Calculating a moving average with a window size of 15 When calculating a moving average, a little data is lost from the start and the end of the original range. The effect of this smoothing operation is shown in Figure 6 where the blue curve represents the orginal data, and the orange curve is the moving average. The larger the window, the more the original curve is smoothed. Figure 6: Moving average compared to the original data
{ "domain": "ac.uk", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754506337406, "lm_q1q2_score": 0.8003292035336554, "lm_q2_score": 0.8128673155708975, "openwebmath_perplexity": 333.7806797376532, "openwebmath_score": 0.6493062376976013, "tags": null, "url": "https://bdavison.napier.ac.uk/iot/Notes/signals/preprocessing/" }
vba, excel End If .Cells(j, "A").EntireRow.Delete End If j = j - 1 Loop Until j = 1 LastrowConso = wsConso.Range("A" & Rows.Count).End(xlUp).Row + 1 If Not ConsoSupplierNAME = "" Then wsConso.Cells(LastrowConso, "B") = ConsoSupplierDUNS wsConso.Cells(LastrowConso, "C") = ConsoSupplierMDM wsConso.Cells(LastrowConso, "A") = ConsoSupplierNAME Else wsConso.Cells(LastrowConso, "B") = .Cells(i, "B") wsConso.Cells(LastrowConso, "C") = .Cells(i, "C") wsConso.Cells(LastrowConso, "A") = SupNameToCheck End If Next i Application.ScreenUpdating = True
{ "domain": "codereview.stackexchange", "id": 18679, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
genetics, evolution, population-genetics, natural-selection References Hernandez et al 2011 Szpak et al 2019 Hellenthal et al 2015 Souilmi et al 2020
{ "domain": "biology.stackexchange", "id": 10804, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, evolution, population-genetics, natural-selection", "url": null }
- Thank you for your answer. Could you please explain why this is equal to solving (x+n)^2 - x^2? I don't get that part ;) –  Devos50 Sep 14 '12 at 21:43 @Devos50 Let $y=x+n$. –  Alex Becker Sep 14 '12 at 21:45 Hint $\rm\ \ \ \begin{eqnarray} 3\, &=&\, \color{#0A0}2^2-\color{#C00}1^2\\ 11\, &=&\, \color{blue}6^2-5^2\end{eqnarray}$ $\,\ \Rightarrow\,\$ $\begin{eqnarray} 3\cdot 11\, &=&\, (\color{#0A0}2\cdot\color{blue}6+\color{#C00}1\cdot 5)^2-(\color{#0A0}2\cdot 5+\color{#C00}1\cdot\color{blue}6)^2\, =\, 17^2 - 16^2\\ &=&\, (\color{#0A0}2\cdot\color{blue}6-\color{#C00}1\cdot 5)^2-(\color{#0A0}2\cdot 5-\color{#C00}1\cdot\color{blue}6)^2\, =\, \ 7^2\ -\ 4^2 \end{eqnarray}$ - Oh, the colors! image –  The Chaz 2.0 Sep 14 '12 at 23:56
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707973303964, "lm_q1q2_score": 0.8345893954701701, "lm_q2_score": 0.853912760387131, "openwebmath_perplexity": 135.92279621127113, "openwebmath_score": 0.9067296981811523, "tags": null, "url": "http://math.stackexchange.com/questions/195904/integer-solutions-to-x2-y2-33" }
quantum-mechanics, hilbert-space, quantum-entanglement, quantum-states As a general rule, there are extremely few effects where the difference between a "truly" pure state, and a mixed state which is "$\epsilon$ away" from a pure state, actually makes any real difference; to the extent that such schemes exist, they are generally (and rightly) regarded with suspicion, as they represent an intolerance to noise and experimental uncertainty that is incompatible with practical reality.
{ "domain": "physics.stackexchange", "id": 74230, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, hilbert-space, quantum-entanglement, quantum-states", "url": null }
this. First, here is a table of some of the more common polar graphs. There are three symmetry tests that indicate whether the graph of a polar equation will exhibit symmetry. Graph polar equations by plotting points. + New Blank Graph. The graph below appears to be the graph of the equation y = x+1. However, changing the values of theta to be yields the following graph. So, join me on a Polar Graph hunt! be along the polar axis since the function is cosine and will loop to the left since the . Graph polar equations by plotting points. Polar equations may be graphed by making a table of values for $\theta$ and $r$. Polar Equations and Their Graphs ... After working with several polar graphs and observing their general shape, periodicity, and symmetry, it was quite surprising to end up with the graph of a straight line. Also remember that there are three types of symmetry - y-axis, x-axis, and origin. We will derive formulas to convert between polar and Cartesian coordinate systems.
{ "domain": "co.uk", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982823294006359, "lm_q1q2_score": 0.8467398174112934, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 614.8778459062241, "openwebmath_score": 0.6962073445320129, "tags": null, "url": "http://inspirationskitchenandhome.co.uk/bp7wz.php?id=230bd5-polar-graph-equations" }
observational-astronomy, telescope, radio-telescope, sofia Title: Maritime telescopes: Stabilisation requirements for optical vs. radio telescopes? SOFIA stands for Stratospheric Observatory for Infrared Astronomy. She says: My telescope stays stable with a spherical bearing, shock absorbers, and gyroscopes. I suppose a similar system would work for an optical telescope on a maritime vessel as well. But what about a radio-telescope on a ship with a dish of around 10m? What are arguments (ideally mathematical ones) against a similar construction like for SOFIA? References
{ "domain": "astronomy.stackexchange", "id": 5350, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy, telescope, radio-telescope, sofia", "url": null }
java, parsing, regex, http public static void main(String args[]) { String test1 = "Digest\n" + " realm=\"testrealm@host.com\",\n" + " qop=\"auth,auth-int\",\n" + " nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\",\n" + " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\""; String test2 = "Digest username=\"Mufasa\",\n" + " realm=\"testrealm@host.com\",\n" + " nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\",\n" + " uri=\"/dir/index.html\",\n" + " qop=auth,\n" + " nc=00000001,\n" + " cnonce=\"0a4f113b\",\n" + " response=\"6629fae49393a05397450978507c4ef1\",\n" + " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"";
{ "domain": "codereview.stackexchange", "id": 6036, "lm_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, parsing, regex, http", "url": null }
## Section5.9Numerical Integration ###### Motivating Questions • How do we accurately evaluate a definite integral such as $\int_0^1 e^{-x^2} \, dx$ when we cannot use the First Fundamental Theorem of Calculus because the integrand lacks an elementary algebraic antiderivative? Are there ways to generate accurate estimates without using extremely large values of $n$ in Riemann sums? • What is the Trapezoid Rule, and how is it related to left, right, and middle Riemann sums? • How are the errors in the Trapezoid Rule and Midpoint Rule related, and how can they be used to develop an even more accurate rule? When we first explored finding the net signed area bounded by a curve, we developed the concept of a Riemann sum4.2 as a helpful estimation tool and a key step in the definition of the definite integral. Recall that the left, right, and middle Riemann sums of a function $f$ on an interval $[a,b]$ are given by
{ "domain": "unl.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109084307415, "lm_q1q2_score": 0.8525014562618984, "lm_q2_score": 0.8615382094310355, "openwebmath_perplexity": 333.4462961604561, "openwebmath_score": 0.9525200128555298, "tags": null, "url": "https://mathbooks.unl.edu/Calculus/sec-5-9-num-int.html" }
cr.crypto-security, it.information-theory, shannon-entropy Solution: Alice wants to send $M \in \{0, 1\}^n$ to Bob. Alice and Bob have agreed on $K_\mbox{rw} \in \{0, 1\}^{\ell + 128}$ as a key to be used in Russel ang Wang's entropically secure encryption algorithm. Alice generates a one-time pad $K \in \{0, 1\}^n$ by sampling from a uniform distribution. Alice encrypts $K$ using $K_\mbox{rw}$ and sends the results Bob. Bob now knows $K$. Alice now encrypts $M$ using $K$ and sends it to bob. Bob uses $K$ to decrypt the message and now Bob knows $M$. $K$ would have maximal entropy and thus would meet Russel and Wang's requirement. The second message gives no information about $K$, $M$, or $K_rw$ and thus can't be used to attack the original message (At least that's how I understand it).
{ "domain": "cstheory.stackexchange", "id": 4201, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cr.crypto-security, it.information-theory, shannon-entropy", "url": null }
string, oscillators, resonance, dissipation, harmonics From the answer to point 1 it should be already clear why non-integer waves die out. By "ideal world" one often means the world without dissipation. This is hardly applicable to a guitar, whose point is to generate sound, i.e., to transfer the energy from the string to the air oscillations. The string oscillations in vacuum however would not die out indeed. The damping of the string oscillations of a guitar is one of the reasons why (before appearance of electrical amplifiers) this instrument was impractical for anything but chamber music. Bowed string instruments (violin, cello, etc.) have the advantage that the sound can be excited continuously while the musician moves the bow along the string.
{ "domain": "physics.stackexchange", "id": 73891, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "string, oscillators, resonance, dissipation, harmonics", "url": null }
quantum-field-theory, special-relativity, group-theory, group-representations, lorentz-symmetry Edit- How can I show that $A^\mu$ represent a spin-1 object? The problem here is with the identification of the $(A,B)$ values of a representation with spin. $A$ and $B$ do not correspond to spin (they are not even Hermitian!), they just happen to obey $SU(2)$ Lie algebras, and as such they add up in the same way that spins do. When we say that $A_\mu,J_\mu,p_\mu,...$ are all in the $(\frac{1}{2},\frac{1}{2}) $ representation of the Lorentz group we mean that they transform as a four-vector, that's all. People may get lazy and say they are spin 1 objects, but what they really mean is $(A,B)$ spin 1 objects.
{ "domain": "physics.stackexchange", "id": 11887, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, special-relativity, group-theory, group-representations, lorentz-symmetry", "url": null }
inorganic-chemistry, energy Title: Ionisation energy is lower for higher energy shell? Why does an electron in a higher energy orbital require less energy to remove it? Wouldn't it be harder to remove an electron from a higher energy orbital when compared to a lower energy orbital? It is difficult to remove an electron from lower energy shells because of very large electrostatic forces of attraction between the electrons and the positively charges nucleus. As the distance between the nucleus and the electron increases with the number of shells, the electrostatic forces of attraction between the electrons of higher energy level and the nucleus decreases, and it becomes easier to remove an electron from that shell. That is why it requires a large amount of energy to remove an electron from lower shell with respect to the electrons at higher shells.
{ "domain": "chemistry.stackexchange", "id": 10746, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, energy", "url": null }
java, csv Title: Generates a CSV output of dummy data I have written a quick piece of Java code to create some CSV data. The code simply outputs all of the permutations of specified lists of values and gives each row a unique value. I want to know if these is a simple way to remove all of the nested for-loops and do this task more elegantly, whilst retaining simplicity. The value of the variable "dataValue" is unimportant - I just require unique values for each row. I am aware that there are other ways to create simple CSV data outside of Java (e.g. Excel) - I am interested in if this code can be improved. public class DataCreator { public static void main(String[] args) { String[] dataDomains = {"DD1", "DD2", "DD3", "DD4"}; String[] referenceCodes = {"1A", "1B", "1C", "1D", "1E", "1F", "1G", "1H", "1J", "1K", "1L", "1M", "1N", "1O", "1P", "1Q"}; String[] indicators = {"AB1", "ZZ2", "FAQWE1", "1234", "_Z"}; String[] freqs = {"D"};
{ "domain": "codereview.stackexchange", "id": 25708, "lm_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, csv", "url": null }
nuclear-physics, fusion Title: Nuclear Fusion Reaction My question is about the energy released in a nuclear fusion reaction, consider: $\mathrm{{^{2}_1H}} \ + \ \mathrm{{^{2}_1H}} \ \rightarrow \ \mathrm{{^{3}_2He} \ + \ n \ + \ 3.27 \ MeV} $ This page shows that this energy is released as the kinetic energy of the products of the reaction. I was wondering from where the heat and light energy is coming in sun through these reactions, if whole of the energy released is carried as the kinetic energy of the products? Explain. The answer by Gijsv is correct, but maybe one should add about black body radiation. It has a specific spectrum and intensity that depends only on the body's temperature, which is assumed for the sake of calculations and theory to be uniform and constant.
{ "domain": "physics.stackexchange", "id": 45713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nuclear-physics, fusion", "url": null }
ros2 uri: https://github.com/ros2-gbp/rosidl-release.git version: release/bouncy/rosidl_generator_c/0.5.1-0 - git: local-name: rosidl/rosidl_generator_cpp uri: https://github.com/ros2-gbp/rosidl-release.git version: release/bouncy/rosidl_generator_cpp/0.5.1-0 - git: local-name: rosidl/rosidl_parser uri: https://github.com/ros2-gbp/rosidl-release.git version: release/bouncy/rosidl_parser/0.5.1-0 - git: local-name: rosidl/rosidl_typesupport_interface uri: https://github.com/ros2-gbp/rosidl-release.git version: release/bouncy/rosidl_typesupport_interface/0.5.1-0 - git: local-name: rosidl/rosidl_typesupport_introspection_c uri: https://github.com/ros2-gbp/rosidl-release.git version: release/bouncy/rosidl_typesupport_introspection_c/0.5.1-0 - git: local-name: rosidl/rosidl_typesupport_introspection_cpp uri: https://github.com/ros2-gbp/rosidl-release.git version: release/bouncy/rosidl_typesupport_introspection_cpp/0.5.1-0 - git:
{ "domain": "robotics.stackexchange", "id": 31450, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
visible-light, polarization Your question is a very interesting. Indeed at some point the electric field component of the photon is zero and if one place the second slit at quarter wavelength behind the first slit, the photon should be go through without any influence from the second slit. In reality the thickness of the slit will spoil the idea. No way that the setup is realizable.
{ "domain": "physics.stackexchange", "id": 59515, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, polarization", "url": null }
javascript, performance, tree, node.js, json Title: Create a hierarchical tree for a JSON response There are approx 43.000 documents (unique nodes). Building a tree structure which has 4 levels. example of 4 different levels: 13000000 - segment 13010000 - main group 13010100 - group 13010101 - commodity class I use a angular tree component that need the data to follow below structure. The code I attached below generate the complete array of objects and the tree is displayed correctly, but it take approx 1 min to generate this structure. Any help/ideas are much appreciated! As you see I use multiple of forEach loops to generate the segment level generate the children (main groups) of the segment level generate the children (groups) of the main group level generate the children (commodity classes) of the group level
{ "domain": "codereview.stackexchange", "id": 29261, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance, tree, node.js, json", "url": null }
circuit-complexity, universal-computation, boolean-formulas There is an obvious lower bound $\Omega\left(\frac{2^n}{\log(n)}\right)$ as a tree of size $L$ can compute at most $(2n)^L = 2^{L \cdot \log_2(2n)}$ different Boolean functions. On the other hand, as far as I can see, there is an upper bound $O(2^n)$. Namely, one can take $(n+2)$-bit communication protocol for the universal relation from [1] and transform it into an universal formula via Karchmer-Wigderson correspondence [2]. One more related work is [3], where a different notion of universality is considered. Instead of fixing gates we fix literals and we want that for any $f$ it is possible to assign gates to non-leaf nodes in such a way that the resulting formula computes $f$. There is an obvious lower bound $\Omega(2^n)$ (as there are now 2 choices for every node) and [3] constructs a matching $O(2^n)$ upper bound. In [1] it is also stated that their protocol improves and simplifies the result of [3]. I don't see why. An explanation would be greatly appreciated. References
{ "domain": "cstheory.stackexchange", "id": 4890, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "circuit-complexity, universal-computation, boolean-formulas", "url": null }
tensor-calculus, elasticity $$ \mathrm du_i = \sum_j e_{ij}~\mathrm dx_j $$ to give his formula $(39.9)$ $$ u_i = \sum_j e_{ij} x_j $$ For non-homogeneous strain, the derivatives are actually position dependent and we have: $$ \mathrm du_i = \sum_j \frac{\partial u_i}{\partial x_j}~\mathrm dx_j $$ or for small values of the distortions: $$ \Delta u_i = \sum_j \frac{\partial u_i}{\partial x_j} \Delta x_j $$ If we look at $e_{ij} - \omega_{ij}$ we have the difference between symmetric and antisymmetric part of the gradient of the distortion field, i.e. the derivative, which we can see by evaluating: $$ e_{ij} - \omega_{ij}=\frac{1}{2} \left(\frac{\partial u_i}{\partial x_j} + \frac{\partial u_j}{\partial x_i} - \frac{\partial u_j}{\partial x_i} + \frac{\partial u_i}{\partial x_j}\right)= \frac{\partial u_i}{\partial x_j} $$
{ "domain": "physics.stackexchange", "id": 33856, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "tensor-calculus, elasticity", "url": null }
demodulation, bpsk Did the incoming signal change phase from the unknown $\theta$ during $[0,T)$ to (also unknown) $\theta+\pi$ during $[T,2T)$, or did the phase stay the same unknown $\theta$ during $[T,2T)$?
{ "domain": "dsp.stackexchange", "id": 8145, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "demodulation, bpsk", "url": null }
java private void createOutput(String word, List<String> matchingWords) { println(" ", 1); println("The following words match \"" + word + "\"", 1); println(" ", 1); for (String matchingWord : matchingWords) { println(" " + matchingWord, 1); } } private void print(String text, int times) { for (int i = 0; i < times; i++) { System.out.print(text); } }
{ "domain": "codereview.stackexchange", "id": 40711, "lm_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 }
html, web-scraping, xpath, xslt "address": "McDermott Will Emery\n3150 Porter Drive\nPalo Alto, CA 94304-1212\n650/813-5000\nFax: 16508135100\nEmail: bshariati@mwe.com", "name": "Behrooz Shariati", "meta": [] }, { "address": "Wilson Sonsini Goodrich & Rosati\n650 Page Mill Road\nPalo Alto, CA 94304-1050\n650-493-9300\nFax: 16505655100", "name": "Bradford J Goodson", "meta": [] }, { "address": "McDermott Will & Emergy\n18191 Von Karman Ave\nSuite 500\nIrvine, Ca 92612\n949-851-0633\nFax: 19498519348\nEmail: cbright@mwe.com", "name": "Christopher D Bright", "meta": [] }, { "address": "Wilson Sonsini Goodrich & Rosati\n650 Page Mill Road\nPalo Alto, CA 94304-1050\n650-493-9300\nFax: 16505655100\nEmail: dcaine@wsgr.com", "name": "David A Caine", "meta": []
{ "domain": "codereview.stackexchange", "id": 42818, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, web-scraping, xpath, xslt", "url": null }
does not attain the Cramér–Rao bound of 2σ 4 /n. n →∞ E[( - 2. θ) ] = 0 . Thus X N is a consistent estimator of J.L. One can see indeed that the variance of the estimator tends asymptotically to zero. If your estimator is unbiased, you only need to show that its variance goes to zero as n goes to infinity. squared-error consistent. variance the variance of one term of the average. c. Both estimators are equivalent. An asymptotically equivalent formula was given in Kenney and Keeping (1951:164), Rose and Smith (2002:264), and Weisstein (n.d.). That is, roughly speaking with an infinite amount of data the estimator (the formula for generating the estimates) would almost surely give the correct result for the parameter being estimated. squared-error consistent. Which of the following is not a part of the formula for constructing a confidence interval estimate of the population proportion? As N goes to infinity, the variance of X goes to zero and X N converges in probability to J.L or plim
{ "domain": "bsynchro.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986363161511632, "lm_q1q2_score": 0.82828264722577, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 519.7246953576391, "openwebmath_score": 0.8853917717933655, "tags": null, "url": "https://www.bsynchro.com/woman-of-jxspbhn/c5b1f3-consistent-estimator-variance-goes-to-zero" }
python, python-3.x, strings, comparative-review, formatting With '{:>70}'.format(s), the format function has to scan the '{:>70}' string for {}, break it up into field and format codes, take arguments from the .format(...) parameter and/or keyword list, and interpolate those into the string at the appropriate places, applying the required formatting. In short, it powerful, but computationally expensive. If s is not a string, the function will still work, implicitly formatting the result with str(s), which is one of the advantages of the additional power in this approach. With s.rjust(70), it is taking a string and padding it on the left with (by default) spaces. Simple and fast. If s is not a string (or another class which defines .rjust()), it will raise an exception. So, ... the first is "better", in terms of the Robustness Principle in the sense that it works with more arguments. the second is "better" in terms of efficiency
{ "domain": "codereview.stackexchange", "id": 42982, "lm_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, comparative-review, formatting", "url": null }
electromagnetism, charge, maxwell-equations, superposition, linear-systems It would be appreciated if someone explains it in the simple example I chose above. (2 point charges) To put it simply superposition does NOT follow from Maxwell's equations. It is a mathematical principle and it holds for any linear equation or system of equations. Maxwell's equations are just one of many that fall into this category. The general form is: D(Field) = Source where D() is some abstract differential linear operator. Linearity means that if F1 is a solution for S1, and F2 is a solution for S2 then F1 + F2 is a solution for S1 + S2. The proof can be found in most math texts on ordinary or partial differential equations, also linear algebra or operator theory. Once you "prove" that a set of equations is in fact linear you can immediately apply this result.
{ "domain": "physics.stackexchange", "id": 74161, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, charge, maxwell-equations, superposition, linear-systems", "url": null }
python, python-3.x Title: Optimising Prefix Sum I have a question: Starting with a 1-indexed array of zeros and a list of operations, for each operation add a value to each the array element between two given indices, inclusive. Once all operations have been performed, return the maximum value in the array. Given some queries in the form [a,b,k]: [[1,5,3],[4,8,7],[6,9,1]] Add the values of k between the indices a and b inclusive: [0,0,0, 0, 0,0,0,0,0, 0] [3,3,3, 3, 3,0,0,0,0, 0] [3,3,3,10,10,7,7,7,0, 0] [3,3,3,10,10,8,8,8,1, 0] And then return the max value which is 10 My attempt is: from itertools import accumulate def Operations(size, Array): values = [0] * (size+2) for a,b,k in Array: values[a] += k values[b+1] -= k values = list(accumulate(values)) Result = max(values) return Result def main(): nm = input().split() n = int(nm[0]) m = int(nm[1]) queries = []
{ "domain": "codereview.stackexchange", "id": 40761, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x", "url": null }
quantum-mechanics, hilbert-space, perturbation-theory Title: Rigorous justification for non-relativistic QM perturbation theory assumptions? In perturbation theory for non-relativistic quantum mechanics, you begin with a Hamiltonian of the form $$H=H_0+\lambda H'$$ and assume that the perturbed eigenstates and eigenvalues can be written as power series in $\lambda$: $$\left|\psi_n\right>=\left|\psi_n^0\right>+\lambda\left|\psi_n^1\right>+\lambda^2\left|\psi_n^2\right>+\dots;$$ $$E_n=E_n^0+\lambda E_n^1+\lambda^2 E_n^2+\dots.$$ Then you plug these expansions into the eigenvalue equation, $H\left|\psi\right>=\lambda\left|\psi\right>$, and set the coefficients of like powers of $\lambda$ equal to each other. At least three concerns arise:
{ "domain": "physics.stackexchange", "id": 56024, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, hilbert-space, perturbation-theory", "url": null }
xml, xsd Functional When you use XML, you need a parser. There is always a balance between what you parse, and what you let the parser parse. The 'text' component in the XML elements are technically called PCDATA (Parsed Character Data). The XML Parser will Parse that data looking for more XML. That's all it does. Your actual data has things like: min=a Is your application manually parsing that content as well? If it is, you should probably make your text content attribute values instead. Additionally, the white-space in your element text is scattered all over the place. Consider:
{ "domain": "codereview.stackexchange", "id": 8480, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "xml, xsd", "url": null }
formal-languages Title: Example of a superword w such that v^2 isn't its subword What is an example of an infinite word(superword) w such that if a nonempty word v belongs to L = {1,2,3}*, v^2 isn't a subword of w? For example if w = 123123123...123 and v = 123, v^2 = 123123 hence it's a subword of w, I can't seem to find a superword that fits the requirement. There is a dedicated page on "square-free words" on wikipedia here, with references. As you can see, there is an exemple of a square-free word on a three lettre alphabet.
{ "domain": "cs.stackexchange", "id": 3609, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages", "url": null }
formal-languages, regular-languages, proof-techniques, buchi-automata Title: Proving that the continuation of a non-regular language is not ω-regular I want to prove that a language is not $\omega$-regular. The language I'm working with can be defined as: $$L = \{ a_1 \dots a_n x^\omega ~ | ~ n > 0, a_1 \dots a_n \in L^\prime \}$$ where $L^\prime$ is a specific non regular language (I omit the definition $L^\prime$ because I think it is of no help for my problem), $a_i$ are symbols in $L^\prime$ alphabet and $x$ is any symbol not in $L^\prime$ alphabet. I'm aware of several proof techniques for proving a language is not regular (see e.g. How to prove that a language is not regular? ).
{ "domain": "cs.stackexchange", "id": 2605, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, regular-languages, proof-techniques, buchi-automata", "url": null }
optics, everyday-life, geometric-optics However, it is possible to (effectively) vary the index of refraction in various locations in the object to "guide" the light around an object; this is the science behind metamaterial cloaking. So far, this has only been achieved for microwave frequencies (rather than for visible light), but physicists are continuing to work in this field and see whether they can extend it into the visible range.
{ "domain": "physics.stackexchange", "id": 49190, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, everyday-life, geometric-optics", "url": null }
energy, particle-physics, photons, collision, gas Title: When two gas molecules collide, can they send out an IR photon? When a ball bounces on the ground, each bounce is smaller than the previous one because of friction in the system, i.e. the collision between the ball and the ground is not completely elastic. We are taught that the kinetic energy lost in an inelastic collision is turned into heat. What about when two gas molecules collide in the air? Is their collision always elastic, or does part of their kinetic energy sometimes turn into heat? And if so, does this heat leave the collision in the form of an IR photon? Yes, it is common for colliding molecules to emit IR and microwaves.
{ "domain": "physics.stackexchange", "id": 92451, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, particle-physics, photons, collision, gas", "url": null }
c#, strings, parsing if (end == -1) { throw new FormatException("Input string has opening control string starter with no matching control string terminator."); } var internalString = input.Substring(i + 1, end - i - 1); var values = new Queue<string>(internalString.Split(valueSeparator)); yield return new ControlString(i, end - i + 1, values); i = end; } } } To be on the safe side for changing accidentially the values of the controlStringStarter, controlStringTerminator or valueSeparator in the ControlStringFinder class you should make them readonly. None of the properties of the classes needs to be public writeable. For encapsulation you should make the setters private. Instead of throwing an ArgumentException with the same message 3 times I would suggest to throw a MatchException with an overloaded constructor which sets the message to this repeated value.
{ "domain": "codereview.stackexchange", "id": 13298, "lm_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#, strings, parsing", "url": null }
Continuous Real-Valued Functions on $[a, b]$ $(C[a, b], +)$ (Pointwise) Function Addition The group of continuous functions on the closed bounded interval $[a, b]$. Infinite Abelian $n$-Times Differentiable Real-Valued Functions on $[a, b]$ The group of $n$-times differentiable functions on the closed bounded interval $[a, b]$. Function Addition $(C^n[a, b], +)$ Infinite Abelian The Additive Group of $m \times n$ Matrices $(M_{mn}, +)$ Matrix Addition The group of all $m \times n$ matrices with entries sin $\mathbb{R}$. Infinite Abelian The General Linear Group of Order $n$ $(\mathrm{GL}_n(\mathbb{R}), \cdot)$ Matrix Multiplication The group of all $n \times n$ invertible matrices with entries in $\mathbb{R}$. Infinite Abelian if $n = 1$, Non-Abelian if $n \geq 2$
{ "domain": "wikidot.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9932024672423955, "lm_q1q2_score": 0.8254933299183989, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 258.9257171614322, "openwebmath_score": 0.9354438781738281, "tags": null, "url": "http://mathonline.wikidot.com/index-of-common-groups" }
angular-momentum, electrons, atomic-physics Recently I read that electrons could jump from one orbit to another, by absorbing energy (through light or heat). I'm wondering that, if the electron jump from orbit $n_1$ to orbit $n_2$, then it's angular momentum about the nucleus should change by $\frac{(n_2-n_1)h}{2\pi}$ which is against the law of conservation of angular momentum since the only force acting on the electron is the Coulombic attraction towards the nucleus which provides no torque. How then, does the angular momentum change without a torque? Does this have something to do with spin angular momentum that the electron also has? Or is it that these laws don't hold good at such scales? Or is it a flaw of Bohr's model altogether? In short, you must consider the total elements of the system for conservation of momentum. In this case, nearly all of the momentum is exchanged between the electron and a photon that is absorbed or radiated away (the light). Momentum is conserved, and is largely balanced by this electron-photon
{ "domain": "physics.stackexchange", "id": 44790, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "angular-momentum, electrons, atomic-physics", "url": null }
reference-request, bioinformatics, string-matching Title: String matching and bioinformatics I'm interestd in string-matching, I would like to know recent open problems in string-matching in field of bioinformatics. The list of open problems in bioinformatics: string matching is outlined in Some string matching problems from Bioinformatics which still need better solutions this article is old, but problems remain. There is also presentation Analytic pattern matching: From DNA to Twitter. Some are related to graph automorphism (so may remain open for a bit longer) for example: Extend String Pattern Matching to Graph Pattern Matching, that is, replace the text T by a graph G and find the number of occurrences of a given subgraph/pattern g in G for different models of graph G generation.
{ "domain": "cs.stackexchange", "id": 14149, "lm_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, bioinformatics, string-matching", "url": null }
c++, image, mathematics, graphics // searches the index of the column that is the most similar to the first one // by going backwards starting from the final column and remembering the closest one int findOverlap(int range, double threshold, bool centerWeighted) { int closestCol = -1; double smallestDiff = -1.; for (int w = width - 1; w >= width - range; --w) { double diff = 0; for (int h = 0; h < height; ++h) { double currDiff = pixelDiff(0, h, w, h); if (centerWeighted) { // we weight the pixels that are vertically in the middle higher currDiff *= (double) std::min(std::abs(h - height), h) / ((double) height / 2); } diff += currDiff; } diff /= height; if (diff < smallestDiff || smallestDiff == -1) { smallestDiff = diff; closestCol = w; } }
{ "domain": "codereview.stackexchange", "id": 39271, "lm_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++, image, mathematics, graphics", "url": null }
computer-architecture, cpu-cache, cpu, memory-hardware, cpu-pipelines So, I would take it that the line size of 24 with 26 lines per set and 23-way set associative is 213 or 8k bytes. A next question might be how big are the tags that are stored in the associations? 22 (from the address space) - 4 (for cache line size) - 6 (the number of entries in the array), means that a tag size of 12 bits is needed.
{ "domain": "cs.stackexchange", "id": 10988, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture, cpu-cache, cpu, memory-hardware, cpu-pipelines", "url": null }
atomic-physics, terminology, orbitals, pauli-exclusion-principle, term-symbols Title: How are the orbitals named? l = 0 to (n-1). l is azimuthal quantum number. n is principal quantum number. for, l = 0 , it is s. l = 1 , it is p. … l = 99, it is what? What is the name given to it? The first four states are s,p,d,f. If these letters ever had any obvious meaning, they don’t any more. (I vaguely recall that two of them were associated with “sharp” and “diffuse” spectral lines.) For $\ell\ge 4$, the letters just continue alphabetically: $\ell=4,5,6,7$ correspond to g-, h-, i-, and j-orbitals. You ask about $\ell=99$: nobody goes that high. It’s not even a problem to ask about the possible duplicate label following the r-orbitals with $\ell=12$, because no one goes that high, either.
{ "domain": "physics.stackexchange", "id": 93091, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "atomic-physics, terminology, orbitals, pauli-exclusion-principle, term-symbols", "url": null }
$(1,0),\ (-1,0),\ (0,1/6),\ (\pm 1,3),\ (\pm 3,-1),\ (0,\pm\sqrt{10}).$ The maximum value is found to be at $(0,-\sqrt{10})$ and the minimum is at $(3,-1)$ and $(-3,-1)$. ## Example 3 Problem: Consider a closed cylindrical container holding 100 cubic centimeters. Provide a relationship between the radius and height which will minimize the surface area for such a container.
{ "domain": "jasonbhill.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419677654414, "lm_q1q2_score": 0.8218691310747005, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 229.296121582901, "openwebmath_score": 0.9812831878662109, "tags": null, "url": "http://courses.jasonbhill.com/s2012m2400/s2012m2400-notes" }
quantum-mechanics, operators, quantum-optics, phase-space, wigner-transform $$ F = \frac{1}{(2\pi)^2}\int \mathrm dx \,\mathrm d p\,\mathrm d\tau \,\mathrm d \sigma ~f_H(x,p)\exp[i(\sigma (X-x)+\tau(P-p))+\hbar(\tau^2+\sigma^2)/4]\tag {152} \\ = \frac{1}{(2\pi)^2}\int \mathrm dx \,\mathrm d p\,\mathrm d\tau \,\mathrm d \sigma ~(e^{-\hbar(\partial_x^2+\partial_p^2)/4}f_H(x,p))\exp[i(\sigma (X-x)+\tau(P-p))], $$ after integrating by parts. So, comparison with the above, readily yields the celebrated double Weierstrass filter cornerstone bridge, $$ f_H(x,p)= e^{\hbar(\partial_x^2+\partial_p^2)/4} f_W .\tag{155} $$ For example, it should be easy to confirm that, from the classical-looking Weyl symbol of the oscillator Hamiltonian, the Husimi-symbol hamiltonian is shifted, $$ h_H(x,p)= e^{\hbar(\partial_x^2+\partial_p^2)/4} (p^2+x^2)/2 \\ = (p^2+x^2+\hbar )/2 = h_W + \hbar/2 .\tag{156} $$ A stark reminder that such symbols may, and routinely do!, involve $\hbar$s, which naive quantizers are vulnerable to missing.
{ "domain": "physics.stackexchange", "id": 71074, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, quantum-optics, phase-space, wigner-transform", "url": null }
black-hole, hawking-radiation, explosion Some other websites refer to the last "explosion" of the Milky Way's supermassive black hole being some 2 million years ago, but is that the same mechanic mentioned on the Wikipedia page? Or the YouTube video, for that matter? What this video is talking about is Hawking Radiation, as you've linked. Hawking Radiation is a proposed hypothetical (by no means verified or proven) way for a black hole to radiate its energy into space. The basic idea is that a black hole is nothing but mass/energy compressed to an infinitesimal point, which is radiating its energy into space over time. For large black holes (such as solar mass or bigger), this radiation process is tiny and the time taken to leak all the black hole's energy into space (and thus for the black hole to "evaporate") is exceedingly long. For tiny black holes however, the time to radiate all the black hole's energy is exceedingly short.
{ "domain": "astronomy.stackexchange", "id": 1755, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "black-hole, hawking-radiation, explosion", "url": null }
• Is the span of $\{\}$ equal to $\{0\}$? Well, the span of a set $A\subseteq X$ is defined as the smallest vector subspace of $X$ that contains $A$. Since all vector subspaces contain $\{\}$, it is clear that $\{0\}$, which is the smallest vector subspace at all, must be the span of $\{\}$. Alternatively, the span of $A$ is the intersection of all vector subspaces that contain $A$. Again, it should be obvious that this implies that the span of $\{\}$ is $\{0\}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639636617014, "lm_q1q2_score": 0.8315141290797636, "lm_q2_score": 0.855851143290548, "openwebmath_perplexity": 231.55138991881017, "openwebmath_score": 0.9646869897842407, "tags": null, "url": "https://math.stackexchange.com/questions/1909645/empty-set-is-the-only-basis-of-the-zero-vector-space-0?noredirect=1" }
homework-and-exercises, newtonian-mechanics, kinematics, work Whats the force required to stop the jumper (4m above ground) First what equation do I use? $F = ma$? But even if $a = 0$ $v$ may not equals 0 (still moving) $W = F \Delta x$? Can I say if $\Delta x = 0$ object is not moving? Even then, I don't know the work ... I tried doing: $-32 = \frac{1}{2} (-9.8) t^2$ $t = 2.556s$ Then I'm stuck ... I know $t$ but I cant seem to use any other equations... $v_f, v_i =0 $ As others here have pointed out, the force of the bungee cord would vary, increasing as it is stretched. So your question is not well posed. If this is an actual homework problem I would guess that you misread it and you are actually being asked to find the force constant of the bungee cord (assuming, as I will below, that it obeys Hooke's law). Or perhaps you want the maximum force on the jumper due to the bungee cord (which would be when it is stretched the most). Here is how you would get those...
{ "domain": "physics.stackexchange", "id": 4959, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, kinematics, work", "url": null }
geophysics, rivers, erosion Title: Can "meanders in meanders" form naturally? I recently rafted the San Juan river in Southern Utah, which flows into the Lake Powell reservoir. When the water levels in Lake Powell were very high, it extended far upstream into the San Juan River. This caused the river to stagnate and deposit enormous amounts of silt in the canyon. When Lake Powell water level subsequently dropped, the river carved new meanders through the resulting silt beds, but within the much larger meanders that form the canyon. (Satellite Imagery from Google Maps)
{ "domain": "earthscience.stackexchange", "id": 2466, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geophysics, rivers, erosion", "url": null }
1. ## A simple proof? Prove that: 2 + 4 + 6 + 8 ... + 2(n-1) = n * (n-1) When n > 0 Getting the n-1 part is easy (the left side of the equation has to have n-1 terms, so the result would be something multiplied by that). I don't know how to get the n, though... 2. Use induction to prove. Show the formula holds for the base case, assume it hold for the $n^{th}$ case and derive the $(n+1)^{th}$ case. Why don't you try and let me know where you get stuck. 3. Or wait! $2 + 4 + 6 + 8 ... + 2(n-1) = 2(1+2+3+...+(n-1)) = 2(\frac{n(n-1)}{2}) = n(n-1)$ You may know the formula to obtain the sum of the numbers from $1$ to $n.$ It is $\frac{n(n+1)}{2}.$ Here is an example: Sum the numbers $1$ to $5.$ Then, $1+2+3+4+5 = \frac{5\times 6}{2} = 15.$ 4. Hm. Gimme a second to type as I'm thinking. n = 1 2(1-1) = 1 * (1-1) = 0 n = k+1 2 + 4 + 6 ... + 2k = k^2 + k 2 + 4 + 6 ... + k = k^2 2 + 4 + 6 ... + 2(k-1) = k^2 - k 2 + 4 + 6 ... + 2(k-1) = k * (k-1) Oh, wow. Thanks so much!
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936045561286, "lm_q1q2_score": 0.8941650552689158, "lm_q2_score": 0.908617890746506, "openwebmath_perplexity": 671.6067288308353, "openwebmath_score": 0.9401571750640869, "tags": null, "url": "http://mathhelpforum.com/algebra/136207-simple-proof.html" }
python, beginner, pandas result2["f_score"] = fm_score(result2["Frequency"]) result2["m_score"] = fm_score(result2["Monetary"]) FM and RFM_Score These are simple calculations, so can be done like this: result2["FM"] = (result2["f_score"] + result2["m_score"]) / 2 result2["RFM_Score"] = result2["r_score"] * 10 + result2["FM"] This can be all you need. If the shape needs to be exactly as the original result, a reset_index, sort and reindex can help: result2 = result2.sort_index().reset_index().reindex(columns=result.columns)
{ "domain": "codereview.stackexchange", "id": 33514, "lm_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, pandas", "url": null }
epistemology Title: How do we choose between two scientific ideas when both aren't yet falsified? Consider a leading theory for a phenomenon, then how are new theories shown to be better while both remain unfalsified? The very bare minimum that a theory has to obey to be considered as viable is: The theory is self-consistent (it cannot predict two different results for the same input) The theory is complete (within its domain of applicability, any statement can be decided by the theory) The theory agrees with all past experiments
{ "domain": "physics.stackexchange", "id": 65364, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "epistemology", "url": null }
The left-invariant nature of Cayley graphs also suggests that such graphs can be profitably analysed using some sort of Fourier analysis; as the underlying symmetry group is not necessarily abelian, one should use the Fourier analysis of non-abelian groups, which is better known as (unitary) representation theory. The Fourier-analytic nature of Cayley graphs can be highlighted by recalling the operation of convolution of two functions ${f, g \in \ell^2(G)}$, defined by the formula $\displaystyle f * g(x) := \sum_{y \in G} f(y) g(y^{-1} x) = \sum_{y \in G} f(x y^{-1}) g(y).$
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9940889309686339, "lm_q1q2_score": 0.8032906701740407, "lm_q2_score": 0.8080672112416737, "openwebmath_perplexity": 84.97322490766847, "openwebmath_score": 0.9605917930603027, "tags": null, "url": "https://terrytao.wordpress.com/2011/12/06/254b-notes-2-cayley-graphs-and-kazhdans-property-t/" }
Let's introduce $$t'=t-1$$, then if $$t=k+1 \dots n, t'=k \dots n-1$$, hence $$\sum_{t=k}^{n} \binom{t}{k} = \binom{n+1}{k+1} +\sum_{t=k}^{n-1} \binom{t+1}{k+1} -\sum_{t'=k}^{n-1} \binom{t'+1}{k+1}$$ The latter two arguments eliminate each other and you get the desired formulation $$\binom{n+1}{k+1} = \sum_{t=k}^{n} \binom{t}{k} = \sum_{t=0}^{n} \binom{t}{k}$$ • Beautiful proof. p.-s. you can use the LaTeX command \binom{n}{k} to display $\binom{n}{k}$. – hlapointe Oct 21 '15 at 16:26 • @hlapointe thank you. Sure, I forgot there was a special command for binomial. – Eli Korvigo Oct 21 '15 at 16:32 Imagine the first $$n + 1$$ numbers, written in order on a piece of paper. The right hand side asks in how many ways you can pick $$k+1$$ of them. In how many ways can you do this? You first pick a highest number, which you circle. Call it $$s$$. Next, you still have to pick $$k$$ numbers, each less than $$s$$, and there are $$\binom{s - 1}{k}$$ ways to do this.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850842553892, "lm_q1q2_score": 0.8505888901200443, "lm_q2_score": 0.8652240825770432, "openwebmath_perplexity": 393.8095811308821, "openwebmath_score": 0.9964216351509094, "tags": null, "url": "https://math.stackexchange.com/questions/1490794/proof-of-the-hockey-stick-identity-sum-limits-t-0n-binom-tk-binomn1/1490918" }
php, constructor Title: Workaround for overloaded constructor in PHP I have a class whose purpose is to display a comment. I'd like to be able to instantiate it by passing a Comment object if I happen to have it available, or just the values if that's what I have available at the time. Unfortunately PHP doesn't allow overloaded constructors, so here's the workaround I came up with. class CommentPanel extends Panel { //Private Constructor, called only from MakeFrom methods private function CommentPanel($text, $userName, $timestamp) { parent::Panel(0, $top, System::Auto, System::Auto); // Render comment } public static function MakeFromObject(Comment $comment) { return new CommentPanel($comment->text, $comment->User->nickname, $comment->last_updated_ts); } public static function MakeFromValues($text, $userName, $timestamp) { return new CommentPanel($text, $userName, $timestamp); } }
{ "domain": "codereview.stackexchange", "id": 38, "lm_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, constructor", "url": null }
enthalpy $$\ce{C(s) + O2(g) -> CO2(g)} ~~~~~~\mathrm{\Delta _f H^\circ = -393.51}\pu{kJ mol^{-1}}$$ The heat of formation of $\ce{C(g)}$ is: $$\ce{C(s) -> C(g) }~~~~~~\mathrm{\Delta _f H^\circ = 716.68}\pu{kJ mol^{-1}}$$ We also need a value of the $\ce{OO}$ bond enthalpy in $\ce{O2}$: $$\ce{O_2(g) -> 2O(g) }~~~~\mathrm{\Delta H^\circ = \epsilon_{O=O} = 498.3}\pu{kJ mol^{-1}}$$ Adding things up we obtain $\mathrm{\epsilon_{C=O}}$: $$\mathrm{\epsilon_{C=O}} = \frac12(393.51+716.68+498.3)\pu{kJ mol^{-1}= 804.2 kJ mol^{-1}}$$
{ "domain": "chemistry.stackexchange", "id": 11647, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "enthalpy", "url": null }
~Kitty 15. Jul 17, 2005 ### misskitty The page is good Robert, but it doesn't explain why. ~Kitty 16. Jul 17, 2005 ### robert Ihnot I'm kind of slow at this and added more material on 0!: Here is what mathworld says, The special case is defined to have value , consistent with the combinatorial interpretation of there being exactly one way to arrange zero objects (i.e., there is a single permutation of zero elements, namely the empty set ). http://mathworld.wolfram.com/Factorial.html -------------------------------------------------------------------------------- 17. Jul 17, 2005 ### robert Ihnot We might also deduce it from taking N things N at a time: $$\frac{N!}{N!0!}=1.$$ 18. Jul 17, 2005 ### misskitty Hmm, I'm getting a little lost here. ~Kitty 19. Jul 17, 2005 ### LittleWolf Hi, maybe this will help. Using n!=n*(n-1)! consider this sequence 3!=3*2! 2!=2*1! 1!=1*0!
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214491222696, "lm_q1q2_score": 0.8253156129581265, "lm_q2_score": 0.8558511414521922, "openwebmath_perplexity": 1252.6646575009047, "openwebmath_score": 0.7460541725158691, "tags": null, "url": "https://www.physicsforums.com/threads/factorial-sequences.82453/" }
ros, kinect, resolution, cv-bridge, openni-launch <include file="$(find openni_launch)/launch/openni.launch"> <arg name="device_id" value="#1" /> <!-- Use 1st device found, or you can specify first device on USB Bus #2 using 2@0 --> <arg name="camera" value="$(arg kinect_camera_name)" /> <arg name="rgb_frame_id" value="$(arg kinect_frame_prefix)_rgb_optical_frame" /> <arg name="depth_frame_id" value="$(arg kinect_frame_prefix)_ir_optical_frame" /> <arg name="publish_tf" value="$(arg publish_tf)"/> <arg name="respawn" value="true"/> <arg name="depth_registration" value="true"/> </include> </launch> Originally posted by dbworth with karma: 1103 on 2013-02-19 This answer was ACCEPTED on the original site Post score: 9 Original comments Comment by Tadhg Fitzgerald on 2013-02-20: Thank you very much for the in depth answer! Comment by ZiyangLI on 2014-02-25: Really a good answer!
{ "domain": "robotics.stackexchange", "id": 12962, "lm_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, kinect, resolution, cv-bridge, openni-launch", "url": null }
c#, actor And I will use it as a thread safe actor (and pass it around). Here is a sample: public static Actor<IdServer> globalIdServer = new IdServer().ToActor(); And in Task (Thread) 1: var id1 = (from x in globalIdServer let newId = x.Generate() select newId).Result(); And in Task (Thread) 2: var id2 = (from x in globalIdServer let newId = x.Generate() select newId).Result(); And we even can use multiple Actors in one statements. Actual implementation of Actor internals is: public class Actor<T> { readonly T _process; readonly object _lock = new object(); readonly int _timeout; public Actor(T process) : this(process, 10000) { } public Actor(T process, int timeout) { _process = process; _timeout = timeout; } public U Send<U>(Func<T, U> func) { if (!Monitor.TryEnter(_lock, _timeout)) throw new TimeoutException();
{ "domain": "codereview.stackexchange", "id": 8641, "lm_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#, actor", "url": null }
So we have a "reduction" from Vertex Cover to Hitting Set, but it's just the identity mapping. The graph remains unchanged (as does $k$), we just call it a hypergraph, and call the edges hyperedges. To think about it from the other end, if we have a problem $\Pi$ where a restricted subproblem $\Pi'$ is already NP-hard, and we had a PTIME algorithm for $\Pi$, then we could use it to solve all the instances of $\Pi'$ in polynomial time and hence everything in NP would have a polynomial time algorithm. Thus $\Pi$ must be NP-hard (and if $\Pi \in$ NP, NP-complete).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.951142225532629, "lm_q1q2_score": 0.8046115798824999, "lm_q2_score": 0.84594244507642, "openwebmath_perplexity": 386.77548026827196, "openwebmath_score": 0.8718810081481934, "tags": null, "url": "http://cs.stackexchange.com/questions/6525/np-completeness-proof-by-restriction" }
and for each of the above distributions, there are $$12$$ distinct ways to distribute the distinct objects. Distribution type 3 If two people get 2 objects, the possible distributions look like A B C D 2 2 0 0 2 0 2 0 2 0 0 2 0 2 2 0 0 2 0 2 0 0 2 2 and for each of the above distributions, there are $$6$$ distinct ways to distribute the distinct objects. Distribution type 4 If one person gets 3 objects and another person gets 1 object, the possible distributions look like A B C D 3 1 0 0 3 0 1 0 3 0 0 1 1 3 0 0 0 3 1 0 0 3 0 1 1 0 3 0 0 1 3 0 0 0 3 1 1 0 0 3 0 1 0 3 0 0 1 3 and for each of the above distributions, there are $$4$$ distinct ways to distribute the distinct objects. Distribution type 5 If one person gets all 4 objects, the possible distributions look like A B C D 4 0 0 0 0 4 0 0 0 0 4 0 0 0 0 4 for each of the above distributions, there is only $$1$$ distinct way to distribute the distinct objects. Totaling the ways The total number of ways is then
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429599907709, "lm_q1q2_score": 0.8508120069992072, "lm_q2_score": 0.8652240791017535, "openwebmath_perplexity": 137.28949745242326, "openwebmath_score": 0.7997000813484192, "tags": null, "url": "https://math.stackexchange.com/questions/3344853/elegant-way-to-assign-4-distinct-objects-into-4-bins" }
this boundary sphere by restriction. We can build $$\widetilde M$$ as an infinite sequence of attachments of one copy of $$\widetilde {P'}$$ at a time, starting with a single copy. Each stage of this construction retracts onto the previous stage. The infinite composition of these retractions is well-defined (and continuous) since any compact subset of $$\widetilde M$$ is contained in a finite stage. The infinite composition gives a retraction of $$\widetilde M$$ onto $$\widetilde {P'}$$ which in turn retracts onto $$S^2$$.
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9890130547786955, "lm_q1q2_score": 0.8015742258251652, "lm_q2_score": 0.8104789132480439, "openwebmath_perplexity": 165.1839664615413, "openwebmath_score": 0.9445157647132874, "tags": null, "url": "https://mathoverflow.net/questions/328174/closed-manifold-with-non-vanishing-homotopy-groups-and-vanishing-homology-groups" }
gazebo Originally posted by chapulina with karma: 7504 on 2017-01-06 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by hari1234 on 2017-01-06: from light map tutorilal i learned to put textures to a models, but if i want to put those textures in a way in which some name or some sign will also be visible in a specific position in model, than how can i do it? I used blender to put colors in model but the colour was not looking exact so i changed the colour sid value in its dae file, so it looked little good but not that much. is their any other way to do this. Comment by chapulina on 2017-01-06: What you want to do is to play with texture coordinates. I added another item to the answer explaining that. Comment by hari1234 on 2017-01-07: ok. thanks. i'll see how to do that now.
{ "domain": "robotics.stackexchange", "id": 4035, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
• @user362873 There are less simple but still computer-free answers to the general case for fourth-degree polynomials. If the rational roots theorem fails to detect a linear factor but the polynomial is indeed reducible, it is a product of quadratic polynomials. One may "depress" the next-to-highest degree term and make it a monic polynomial with an affine change-of-variables, write $$f(x)=(x^2+sx+t)(x^2+ux+v),$$ and then solve with Descartes' or Euler's method as described on Wikipedia's article for "quartic function." – arctic tern Aug 21 '16 at 21:07
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232919939076, "lm_q1q2_score": 0.801229485543277, "lm_q2_score": 0.8152324960856175, "openwebmath_perplexity": 289.26271600969494, "openwebmath_score": 0.8339020609855652, "tags": null, "url": "https://math.stackexchange.com/questions/1899346/how-can-one-find-the-factorization-a4-2a3-3a2-2a-1-a2-a-12?noredirect=1" }
java, game, graphics } } } The above code does not have the mechanism for caching the color. You should figure one out.
{ "domain": "codereview.stackexchange", "id": 6561, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game, graphics", "url": null }
object-oriented, design-patterns, mvc, actionscript-3 The Parent View passes the Model property as a string. So if there's a typo, we'll only find out about it at runtime, and we have to copy-and-paste it from the Model's function definition. The Model updates the Field by passing the property as a string, with similar drawbacks. The value of the property can't be typed for the IDE. Code: ILiveModel public interface ILiveModel { function registerLiveListener(liveListener:ILiveListener, fields:Array):Array; function unregisterLiveListener(liveListener:ILiveListener):void ; function updateLiveField(fieldName:String, newValue:*):void; function getLiveFieldValue(fieldName:String):*; } ILiveListener public interface ILiveListener { function updateLiveField(field:String, value:*):void; }
{ "domain": "codereview.stackexchange", "id": 15193, "lm_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, design-patterns, mvc, actionscript-3", "url": null }
special-relativity, energy, photons, momentum, mass-energy Title: If $\sqrt{(pc)^{2}+({mc^{2}})^{2}}=\gamma mc^{2}$, then why does the RHS disagree with the LHS for the photon? The total energy $E$ of a particle is given by $$\tag{1}E=\sqrt{(pc)^{2}+({mc^{2}})^{2}}.$$ We also have $$\tag{2}E=\gamma mc^{2}.$$ For photons, if we plug $m=0$ in the first equation, we get the correct formula describing its energy: $E=pc$. Whereas if we do the same in the second equation, we get an indeterminate form (since for photons $\gamma =\infty$ and $m=0$, we get $E=0\times \infty$). Why do these two equations disagree for the photon even though they are algebraically equivalent? I don't really have a sophisticated background in math, so an explanation that doesn't involve four-vectors would be greatly appreciated.
{ "domain": "physics.stackexchange", "id": 63580, "lm_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, energy, photons, momentum, mass-energy", "url": null }
java, finance trnImpl.profileUpdate(user, trnObj); profileUpdateNotification = notifyProfileUpdateResult(user, trnObj, authenticated); if (!profileUpdateNotification.isEmpty() && profileUpdateNotification != null) { System.out.println(profileUpdateNotification); } break; default: // add error handling code here System.out.println("Incorrect Transaction Query format"); break; } }
{ "domain": "codereview.stackexchange", "id": 17476, "lm_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, finance", "url": null }
search-algorithms, data-compression, substrings, suffix-trees This problem is similar to searching repeated substrings in a string indicated in this question: Algorithm to find repeated patterns in a large string. But my approach is (1) lossy and (2) not parametrized by the minimum and maximum chunk lengths (all candidates are to output). Examples Let's consider the string 100100100 of length 9. Special symbols [ and ] are also counted (otherwise, how the decoder would know the beginning and the end of a "repeat N times" program?).
{ "domain": "cs.stackexchange", "id": 19438, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "search-algorithms, data-compression, substrings, suffix-trees", "url": null }
bristow-johnson May 4 '17 at 3:36. SymPy can give us them as well. subs(constants). dt (float) – Sampling rate of system. If you do not specify var , then partfrac uses the variable determined by symvar. And building on the Wolfram Language's powerful pattern language, "functions" can be defined not just to take arguments, but to transform a pattern with any structure. Solve Linear Equations with Python. permuteFwd(perm). With the help of sympy. Lambdify This module provides convenient functions to transform sympy expressions to lambda functions which can be used to calculate numerical values very fast. By voting up you can indicate which examples are most useful and appropriate. Bases: simupy. Use inf because Inf, Infinity, PINF and infty are aliases for inf. Our calculator uses this method. mat_DE (sympy Matrix) - The matrix derivative expression (right hand side) mat_var (sympy Matrix) - The matrix state; mat_input (list-like of input expressions, optional) - A list-like of input
{ "domain": "madzuli.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.964321452198369, "lm_q1q2_score": 0.8234463788069528, "lm_q2_score": 0.8539127455162773, "openwebmath_perplexity": 1521.677243394371, "openwebmath_score": 0.6709223985671997, "tags": null, "url": "http://shey.madzuli.it/sympy-constants.html" }
thermodynamics An isothermal process is reversible by definition because temperature is not defined in an irreversible process. So an isothermal process does not increase (total) entropy. Incidentally this does not violate the second law since the second law says only that entropy cannot decrease. It does not forbid energy staying the same.
{ "domain": "physics.stackexchange", "id": 11936, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics", "url": null }
Finally, the mean of the steps needed in the simulated games also matches the calculated expectation quite well: mean(steps_minimum) [1] 25.43862 • Very nice! One slight improvement would be to replace the expectation formula sum(probs*seq_along(probs)) # yields 83.2 by 1 + sum(1 - probs). This provides an entry to obtaining a closed formula for the expectation, too. – whuber Jun 22 '20 at 21:28 • n_players <- 4 needs some indentation to become n_players <- 4 but I can't edit it because of the (IMHO pointless) min. edited character limit. – mschilli Jun 23 '20 at 8:32 • @mschilli: thanks for pointing that out - fixed! – Stephan Kolassa Jun 23 '20 at 10:20 I think I've found the answer for the single player case: If we write $$e_{i}$$ for the expected remaining length of the game if $$i$$ cards are facedown, then we can work out that: (i). $$e_{5} = \frac{1}{6}(1) + \frac{5}{6}(e_{4} + 1)$$ (ii). $$e_{4} = \frac{2}{6}(e_{5} + 1) + \frac{4}{6}(e_{3} + 1)$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109534209826, "lm_q1q2_score": 0.8227933326911705, "lm_q2_score": 0.8354835309589073, "openwebmath_perplexity": 505.2741666609004, "openwebmath_score": 0.956748366355896, "tags": null, "url": "https://stats.stackexchange.com/questions/473444/expected-rolls-to-roll-every-number-on-a-dice-an-odd-number-of-times" }
c++, strings Title: Checking if two strings are anagrams Here is my code for checking to see if two strings are anagrams. This seems a little short. Am I missing anything? Both time and space complexity seem to be \$O(1)\$. //Determine if a string is an anagram //Time complexity: O(1) //Space complexity: O #include <iostream> #include <string> using namespace std; bool anagram(string one, string two) { if (one.length() != two.length()) { return false; } //sorting the strings sort(one.begin(), one.end()); sort(two.begin(), two.end()); return (one == two); } int main() { string one; string two; cout << "please enter in a string: "; cin >> one; cout << "please enter in another string: "; cin >> two; cout << anagram(one, two) <<endl; return 0;
{ "domain": "codereview.stackexchange", "id": 20919, "lm_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++, strings", "url": null }
$975=234 \times 3+39$ $234=39 \times 6+0$ $\GCD (2184,975)=39$ Now use the method of back-substitution: $\ 975-(234 \times 3)=39$ $\ 975-((2184-(975 \times 2)) \times 3)=39$ - Use the extended Euclidean algorithm – vonbrand Apr 19 '13 at 14:46 Well, yes! Extended one. – Inceptio Apr 19 '13 at 14:48 ...about which you may read here. – Lord_Farin Apr 19 '13 at 14:49 @Inceptio Can you show the workings for the second part, please. I don't understand the Wikipedia method. – Adegoke A Apr 19 '13 at 15:10 I'm afraid you didn't see the substitution part. $39=975-234 \times 3$ $234=2184-975 \times 2$. Substitute $2184-975 \times 2$ instead of $234$ back in there. You get everything in terms of $2184$ and $975$. – Inceptio Apr 19 '13 at 15:16 You can use a matrix technique. First, write $$\left[ \begin{array}{cc|c} 1 & 0 & 2184 \\ 0 & 1 & 975 \end{array}\right]$$ Then perform repeated row operations, e.g.:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407144861112, "lm_q1q2_score": 0.8023999058979113, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 797.6703624380547, "openwebmath_score": 0.7916529774665833, "tags": null, "url": "http://math.stackexchange.com/questions/366517/greatest-common-divisor" }
Silks Place Tainan Breakfast, Nedbank Careers Graduate, Renault Parts Suppliers, Cmhc Home Renovation Grants, Celebration Homes Llc, Closet Candy Boutique, Ecm And Aging,
{ "domain": "bil-service.nu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924802053235, "lm_q1q2_score": 0.807864796558659, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 903.3986671017237, "openwebmath_score": 0.7978814244270325, "tags": null, "url": "http://bil-service.nu/o39r6c4p/7e64bd-a-correlation-coefficient-represents-two-things" }
deep-learning, nlp, gpt the amount of existing word surface forms exceeds the size that it is manageable for a neural net, even for a morphologically simple language like English. For morphologically-rich fusional languages and, especially, agglutinative languages, using word-level vocabularies is much more inconvenient. language is "open", in the sense that new words can be created, either by stitching together existing words (e.g. manspreading), or by making up new words altogether (e.g. bazinga). the less frequently a token appears in the training data, the less our net will learn to use it. If we have many many different tokens, the frequency of appearance of each token in the training data will be very low (i.e. data scarcity), so our net will not learn properly. Therefore, subword vocabularies are the norm nowadays.
{ "domain": "datascience.stackexchange", "id": 7884, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-learning, nlp, gpt", "url": null }
There is a slightly shorter way: $$\sin\frac{\pi}{5}=\sin\frac{4\pi}{5}=2\sin\frac{2\pi}{5}\cos\frac{2\pi}{5}=4\sin\frac{\pi}{5}\cos\frac{\pi}{5}\cos\frac{2\pi}{5}$$ Hence $$\cos\frac{\pi}{5}\cos\frac{2\pi}{5}=\frac14$$ You can also write this $$\cos\frac{\pi}{5}\cos\frac{3\pi}{5}=-\frac14$$ Then, using the formula $2\cos a\cos b=\cos(a+b)+\cos(a-b)$, you have: $$\frac12=2\cos\frac{\pi}{5}\cos\frac{2\pi}{5}=\cos\frac{\pi}{5}+\cos\frac{3\pi}{5}$$ Hence $\cos\frac{\pi}{5}$ and $\cos\frac{3\pi}{5}$ are the roots of $t^2-\frac12t-\frac14$. The rest is easy, and the positive root is $\cos\frac{\pi}5$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137874059599, "lm_q1q2_score": 0.8423401072826376, "lm_q2_score": 0.8577681068080749, "openwebmath_perplexity": 230.09998026008765, "openwebmath_score": 0.9177009463310242, "tags": null, "url": "https://math.stackexchange.com/questions/2811476/cool-way-of-finding-cos-left-frac-pi5-right" }
java, algorithm, file, edit-distance try { while ((oldSourceLine = oldSourceBufferedReader.readLine()) != null) { oldSourceLines.add(oldSourceLine); } while ((newSourceLine = newSourceBufferedReader.readLine()) != null) { newSourceLines.add(newSourceLine); } } catch (IOException ex) { System.err.println("I/O failed: " + ex.getMessage()); System.exit(1); } System.out.println(computeDiff(oldSourceLines, newSourceLines)); } private static String computeDiff(List<String> oldSourceLines, List<String> newSourceLines) { int[][] matrix = computeLongestCommonSubsequenceData(oldSourceLines, newSourceLines); return printDiff(matrix, oldSourceLines, newSourceLines); }
{ "domain": "codereview.stackexchange", "id": 43499, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, file, edit-distance", "url": null }
quantum-mechanics, operators, group-theory, group-representations, eigenvalue A matrix is a representation of an operator expressed in a particular basis. Consider the operation $T$ which mirrors the 2D plane about the line $x=y$. If we construct the obvious basis vectors $\hat{x}$ and $\hat{y}$, then $T$ is represented as $$[T]_{xy} = \left[ \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array}\right]$$ where $[\cdot]_{xy}$ means "representation in the $\hat{x}\hat{y}$ basis. To see that this is true, consider the action of $T$ on $\hat{x}$. Flipping $\hat{x}$ about the line $y=x$ gives $\hat{y}$. Since $\hat{x}$ is represented as $$[x]_{xy} = \left[ \begin{array}{c} 1 \\ 0 \end{array} \right]$$ we get $$[T]_{xy} [x]_{xy} = \left[ \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array}\right] \left[ \begin{array}{c} 1 \\ 0 \end{array}\right] = \left[ \begin{array}{c} 0 \\ 1 \end{array}\right] = [y]_{xy} \, . $$ You can check that the case for $T$ acting on $\hat{y}$ works too. Now suppose we use a different basis. Define
{ "domain": "physics.stackexchange", "id": 25504, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, group-theory, group-representations, eigenvalue", "url": null }
beginner, performance, c #define LOOP_MAX 8 bool BruteForceIntializer(); int looper (int amt, int count); char engWord[9]; char alphaNum[36] = {"0123456789abcdefghijklmnopqrstuvwxyz"}; int maxSize = sizeof(alphaNum); int main(void) { if (BruteForceIntializer() == true) printf("Success.\n"); else printf("Failure.\n"); } bool BruteForceIntializer() { int count; for (int amt = 0; amt < LOOP_MAX; amt++) { memset(engWord, '\0', 9); count = 0; if (looper(amt, count) == 0) { continue; } } return true; //only exits loop if all chars are looped successfully }
{ "domain": "codereview.stackexchange", "id": 11471, "lm_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, performance, c", "url": null }
gazebo Originally posted by Nevik on Gazebo Answers with karma: 23 on 2013-04-28 Post score: 2
{ "domain": "robotics.stackexchange", "id": 3246, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
algorithms, graphs, trees As we can see, dfs (v, p) returns the length of the longest uncovered path from $v$ to the vertices of its subtree. So, we set the value d (to the pseudocode, it acts as a global variable), run dfs, and track the number of covered edges as the total number of calls to the cover function. The cover function may actually record the covered edges if need be, but at the very least, it increases the counter k by 1. If the edges themselves are not needed, we can drop the variable w too, and leave only s from the tuple {s, w}. For the original problem, do the above in a binary search over the possible values of d to get the full solution.
{ "domain": "cs.stackexchange", "id": 11607, "lm_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, trees", "url": null }
python, object-oriented, multithreading, socket, server DEFAULT_PORT = 6667 def __init__(self, nick, **kwargs): """Creates a new member. Parameters ---------- nick : str The user's nickname. real : str, optional The user's "real" name, defaults to the nickname. ident : str, optional The user's id, defaults to the nickname. """ self.nickname = nick self.real_name = nick self.ident = nick for key, value in kwargs.iteritems(): self.__dict__[key] = value self.servers = {} self.server_channels = {} self.server_data = {} self.lock = threading.Lock() self.replies = {} def send_server_message(self, hostname, message): """Send a message to a server. Parameters ---------- hostname : str Name of the server to send to. message : str Message to send. """
{ "domain": "codereview.stackexchange", "id": 18328, "lm_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, object-oriented, multithreading, socket, server", "url": null }
Arb is designed with efficiency as a primary goal, and is usually competitive with or faster than other arbitrary-precision packages. Responsible for designing, developing, implementing overall web architecture programs, applications and translating software requirements into workable programming codes for use in the business by performing prototyping, application tests and code reviews to ensure product is satisfactory. This program help improve student basic fandament and logics. Gaussian 16 expands the range of molecules and types of chemical problems that you can model. Inverse of a Matrix using Gauss-Jordan Elimination. Calculate and display the interference pattern generated by two circular sets of waves. Here, you will find quality articles, with working code and examples. GaussView 5. This code implements the Gaussian elimination algorithm in C#. The code is below in case anyone faces the same limitations. The goal here is to implement simple Gaussian elimination in Python, in
{ "domain": "paroleoggi.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9626731158685838, "lm_q1q2_score": 0.8063542219668822, "lm_q2_score": 0.8376199653600371, "openwebmath_perplexity": 914.3769312757073, "openwebmath_score": 0.4277817904949188, "tags": null, "url": "http://paroleoggi.it/gaussian-elimination-python-code.html" }
python, performance, graph It would be more robust to raise an exception in this case. The code doesn't work if the graph doesn't have a node 0: >>> eulerian_cycle_1({1:[1]}, 1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "cr188627.py", line 8, in eulerian_cycle_1 choices = graph[cur] KeyError: 0 It would be more robust to pick a starting node from the graph. The number of edges can be easily computed from the graph like this: sum(map(len, graph.values())) so it would simplify the interface if the code only required the graph, and computed the number of edges itself. But in fact there is no need to know the number of edges: you can exit the main loop if the search along the cycle for a node with an edge fails.
{ "domain": "codereview.stackexchange", "id": 29640, "lm_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, graph", "url": null }
dynamic-programming, recursion Title: Multiple choices for a single case in the recursive formula of a Dynamic Programming algorithm I am developing a Dynamic Programming algorithm for a problem in scheduling. In the recursive formula, I have three cases: (1) $t_{i-1} = int$ (2) $t_{i-1} = app \quad \& \quad r(j) \leq p $ and (3) $t_{i-1} = app \quad \& \quad r(j) > p$. However, for two of them I can go to two directions. To explain more, suppose I have job $−1$ scheduled. Then, if $_{−1}=$, I can schedule the next job (job $$) with two conditions: (1): start it immediately after job $−1$ is finished, i.e. at point $_{−1}$ or (2): start it two time slots earlier than job $−1$ is finished, i.e. at $_{−1}−2$. Both directions should be checked in the DP.
{ "domain": "cs.stackexchange", "id": 13841, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dynamic-programming, recursion", "url": null }
reaction-mechanism, organometallic-compounds, radicals, grignard-reagent, rearrangements As the mechanism of preparation of Grignard reagent suggests, it involves the formation of free radical. And so, it is observed that racemic mixture is formed, in case the carbon on which the free radical is formed is chiral. But, why there occurs no rearrangement of this free radical ($\ce{R^.}$) ? Grignard reagent is an organomagnesium halide in which magnesium and halide bond is ionic. It is not like magnesium is always inserted in between carbon and halogen bond. Once formed, magnesium-carbon bond should be configurationally stable under the conditions of the reaction (Ref.1), and is polar covalent (at least partially) so that $\ce{Mg}$ has to be connected to its bonding partner $\ce{C}$ in the first place. In this polar covalent bond, carbon ends up being the negative end of the dipole, giving its nucleophilicity. The reaction undergoes in free radical mechanism (yet it does not involve a radical chain mechanism) to form Grignard reagent:
{ "domain": "chemistry.stackexchange", "id": 14059, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reaction-mechanism, organometallic-compounds, radicals, grignard-reagent, rearrangements", "url": null }
ros, python, opencv, ros-indigo adding these lines in the end of your .bashrc file at home directory It's mean run 2 lines command in terminal, right ? Comment by l4ncelot on 2018-10-11: You can run those in terminal to try out whether it works or not. But if you close your terminal or open a new one those changes won't be there. .bashrc file is bash script which is run every time new terminal is opened... Comment by l4ncelot on 2018-10-11: ... More on that e.g. here. Comment by l4ncelot on 2018-10-11: This is the same thing you did while installing ROS itself. Look here for section "Environment setup". Command echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc adds source /opt/ros/kinetic/setup.bash line to your .bashrc file. Comment by ToanJunifer on 2018-10-11: Thank you @l4ncelot, It's work. Thank you so much. But when i check version: OpenCV : 2.4.8 Python: 2.7
{ "domain": "robotics.stackexchange", "id": 31878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, python, opencv, ros-indigo", "url": null }
turtlebot, turtlebot3 Originally posted by toebgen on ROS Answers with karma: 35 on 2020-10-28 Post score: 0 Original comments Comment by JackB on 2020-10-28: You are sure the platform you are trying to download this on has internet access? Also can you install other ROS packages? The status you see in that report show that it's been recently released and is available in the testing repository at the moment and will be expected in the main repository after the next sync. More information on the testing repository is here: http://wiki.ros.org/TestingRepository If you'd like to try it from the testing repository, any feedback from there would be appreciated. But note that if you enable it you'll be at the front of the testing cycle so things may be slightly less stable. Noetic syncs are tracked here: https://discourse.ros.org/c/release/noetic/66 Originally posted by tfoote with karma: 58457 on 2020-10-28 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 35686, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turtlebot, turtlebot3", "url": null }
python, datetime, regex Title: Classification using a regex tokenizer This is an updated version of my previous post found here. Mainly as a courtesy for anyone interested. I have Taken most of the advise. Apart from a couple of things. I can't figure out how to use readline() Input normalization is now done by an optional function passed Not a pure regex solution The terminology has also changed quite a bit since the previous version. I'm interested in all feedback. In particular, how I can format the regular expressions in the list labeled time_features, to look 'right'. Any better way to implement an idea or simplify it. What I don't like about it. Is that just creating the classifier object has as a side effect of creating files. Which I want, as it lets me populate the files with the tokenized output printed from the error msg. There's more than likely a better way. Files associated with this example: https://drive.google.com/open?id=0B3HIB_5rVAxmbUJ4SjRMT3lBNlU Here are some input/output pairs:
{ "domain": "codereview.stackexchange", "id": 26638, "lm_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, datetime, regex", "url": null }
c#, unity3d } //adds 3 options private GameObject addOptions(string one, Action fOne,string two, Action fTwo,string three, Action fThree){ var parent = new GameObject (); parent.transform.SetParent (m.dia.transform); CreateButton (one,() => fOne(),-22).transform.SetParent (parent.transform); CreateButton (two,() => fTwo(),-48).transform.SetParent (parent.transform); CreateButton (three,() => fThree(),-74).transform.SetParent (parent.transform); return parent; } //adds 4 options private GameObject addOptions(string one, Action fOne,string two, Action fTwo,string three, Action fThree,string four, Action fFour){ var parent = new GameObject (); parent.transform.SetParent (m.dia.transform); CreateButton (one,() => fOne(),-22).transform.SetParent (parent.transform); CreateButton (two,() => fTwo(),-48).transform.SetParent (parent.transform);
{ "domain": "codereview.stackexchange", "id": 20610, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, unity3d", "url": null }
automata, formal-grammars, regular-expressions $B \rightarrow a$ $B \rightarrow aC$ $B \rightarrow \varepsilon$ Left Linear Grammars Left linear grammars are the same, but rule #2 is $B \rightarrow Ca$. Things to Ponder So looking at these definitions and playing with them, we can see that regular expressions look like matching rules, or ways of dealing with strings a bit at a time. Grammars seem to "label" sections of the string, and group labels under new labels to validate the string (i.e. if we can get from $S$ to the string, or vice versa, we're happy). However these are really doing the same fundamental thing, and how you view the metaphor of their function is really up to you.
{ "domain": "cs.stackexchange", "id": 5137, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata, formal-grammars, regular-expressions", "url": null }