text
stringlengths
1
1.11k
source
dict
c#, wpf, mvvm [... and more ...] #region CONSTRUCTOR public ProductEditorViewModel(IApplicationManager app) { this.app = app; CoreEditorVM = new ProductCoreEditorViewModel(); EventTreeVM = new ActionTreeViewModel(app); HistoryVM = new HistoryViewModel(app); CoreEditorVM.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(VM_PropertyChanged); EventTreeVM.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(VM_PropertyChanged); } private void InitialiseProduct(IProduct product) { CoreEditorVM.Initialise(product); EventTreeVM.Initialise(product.Events.EventList); HistoryVM.ItemsList = product == null ? null : app.PersistenceManager.GetProducts( new ProductCriteria(app.CurrentUser, false).Add(ProductCriteria.HasId(product.ProductGuid)), false); IsDirty = false; }
{ "domain": "codereview.stackexchange", "id": 5107, "lm_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#, wpf, mvvm", "url": null }
#### Howdy, Stranger! It looks like you're new here. If you want to get involved, click one of these buttons! Options # New Free Booklet on Applied Category Theory edited September 2018 Tai-Danae Bradley has a new free "booklet" on applied category theory. It grew out of the workshop Applied Category Theory 2018, and I think it makes a great complement to Fong and Spivak's books Seven Sketches: Abstract. This is a collection of introductory, expository notes on applied category theory, inspired by the 2018 Applied Category Theory Workshop, and in these notes we take a leisurely stroll through two themes (functorial semantics and compositionality), two constructions (monoidal categories and decorated cospans) and two examples (chemical reaction networks and natural language processing) within the field. Check it out! • Options 1. Comment Source:Woohoo more fun reading! Thanks for the link! • Options 2.
{ "domain": "azimuthproject.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9449947086083138, "lm_q1q2_score": 0.8483172977509752, "lm_q2_score": 0.8976952886860978, "openwebmath_perplexity": 1305.3511548285967, "openwebmath_score": 0.6538334488868713, "tags": null, "url": "https://forum.azimuthproject.org/discussion/2344/new-free-booklet-on-applied-category-theory" }
c++, unit-testing, library, macros and followed the convention of leading underscore to mean non-published. This potentially causes your code to exhibit UB because leading underscore followed by capital letter is reserved for standard library impleemnters (I think). You also used the same coding convention for code and macros (please don't). The way you use macros ensures client code cannot avoid using them to write tests. If you redesign your API to not rely on macros, you can then add the macros later with minimal effort). This will make your code maintainable (it's easier to maintain C++ functions than macros) and will not impose macros on the client code. Some features you may wish to add (complementing the list provided by Loki): test suite support automatic processing of exceptions in your unit tests: expected exceptions (testing that your code correctly identifies and reacts to error scenarios) unexpected exceptions (should cause your tests to fail gracefully and report the errors)
{ "domain": "codereview.stackexchange", "id": 15529, "lm_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++, unit-testing, library, macros", "url": null }
ros-bouncy transform = launch_ros.actions.Node(package='tf2_ros', node_executable='static_transform_publisher', arguments=['-0.07', '0', '0', '3.14159', '0', '0', 'base_link', 'laser'])
{ "domain": "robotics.stackexchange", "id": 32101, "lm_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-bouncy", "url": null }
wavefunction, fermions, quantum-chromodynamics, quarks, pauli-exclusion-principle Now consider the three-quark state $$ |f,g,h\rangle := \sum_{\pi}(-1)^\pi q_{\pi(R)}(f)q_{\pi(G)}(g)q_{\pi(B)}(h)|0\rangle, \tag{1} $$ where the sum is over all permutations $\pi$ of the color indices, with a negative sign for odd permutations. This antisymmetrized sum over permutations makes the state a color-singlet, assuming that the color group is $SU(3)$. Spin indices are omitted because were assuming that they're all equal, so the total spin is $3/2$. All three quarks are assumed to be the same flavor. The fact that the quark creation operators $q_C(f)$ anticommute with each other (because quarks are fermions) implies that the state $|f,g,h\rangle$ is symmetric with respect to permutations of $f,g,h$, as in $$ |g,f,h\rangle = |f,g,h\rangle. \tag{2} $$ In detail: \begin{align} |g,f,h\rangle &:= \sum_{\pi}(-1)^\pi q_{\pi(R)}(g)q_{\pi(G)}(f)q_{\pi(B)}(h)|0\rangle \\ &= -\sum_{\pi}(-1)^\pi q_{\pi(G)}(f)q_{\pi(R)}(g)q_{\pi(B)}(h)|0\rangle \\ &= \sum_{\pi}(-1)^\pi
{ "domain": "physics.stackexchange", "id": 60569, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "wavefunction, fermions, quantum-chromodynamics, quarks, pauli-exclusion-principle", "url": null }
\unlhd $\unlhd$ \boxminus $\boxminus$ \div $\div$ \odot $\odot$ \unrhd $\unrhd$ \boxplus $\boxplus$ \divideontimes $\divideontimes$ \ominus $\ominus$ \uplus $\uplus$ \boxtimes $\boxtimes$ \dotplus $\dotplus$ \oplus $\oplus$ \vee $\vee$ \bullet $\bullet$ \doublebarwedge $\doublebarwedge$ \otimes $\otimes$ \veebar $\veebar$ \Cap $\Cap$ \doublecap $\doublecap$ \oslash $\oslash$ \wedge $\wedge$ \cap $\cap$ \doublecup $\doublecup$ \pm $\pm$ \wr $\wr$
{ "domain": "calculla.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147161743552, "lm_q1q2_score": 0.8060722939650908, "lm_q2_score": 0.828938806208442, "openwebmath_perplexity": 10316.063277768013, "openwebmath_score": 1.0000098943710327, "tags": null, "url": "http://calculla.com/mathjax_cheat_sheet" }
symmetry, crystallography, lattices, bravais-lattices Let's try a different example. Suppose you try to construct a base-centered tetragonal lattice by allowing translations of the corners onto the centers of the opposing square faces of the prism. Tetragonal point-group symmetry does not include a roration around a body diagonal or any other operation that would shift the square faces onto another face, so you avoid the trap of turning "base-centered" into "face-centered" like what happened with cubic symmetry. You really do have a specific pair of "bases". But now there is a different trap: you can draw a smaller unit cell, with smaller square faces, that is a simple tetragonal lattice. So again your intended base-centered lattice is not unique; in this case it is just another simple tetragonal lattice.
{ "domain": "chemistry.stackexchange", "id": 15900, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "symmetry, crystallography, lattices, bravais-lattices", "url": null }
- The OP has chosen to define the trace of a matrix as the sum of its eigenvalues. Your alternative definition may be better than the OP's, but it doesn't answer their question. –  Rob Arthan Oct 24 '13 at 2:46 @RobArthan You can define $f'(x)$ as $\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}$. But if you want to understand the product rule, it is helpful to note that this definition is equivalent to $f(x+h)=f(x)+hf'(x)+o(h)$. –  1015 Oct 24 '13 at 2:52 @juliien: duh??? –  Rob Arthan Oct 24 '13 at 3:01 I think the connection here to eigenvalues is obvious enough; the only eigenvector of $w^*(\cdot)v$ is $v$ with eigenvalue $w^*(v)$. –  Alex Becker Oct 24 '13 at 4:26 Good points. :+) –  Babak S. Oct 26 '13 at 18:35 Are you surprised that if a polynomial $f(x) = x^n + a_{n-1}x^{n-1} + \ldots$ of degree $n$ has roots $r_1, \ldots r_n$, then $a_{n-1} = - (r_1 + \ldots + r_n)$? Now think about how the coefficients of $x^{n-1}$ arise in the characteristic polynomial of a matrix $M$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.988312742176424, "lm_q1q2_score": 0.817049798077796, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 125.63337028523618, "openwebmath_score": 0.9756967425346375, "tags": null, "url": "http://math.stackexchange.com/questions/537602/why-is-the-trace-of-a-matrix-the-sum-along-its-diagonal" }
python, tic-tac-toe Finally, if even that fails, such as if there are spaces but no more points to be gained, it'll just place a point anywhere. It's currently a little impossible to beat, even without the grid flipping, so I'm thinking of implementing a percentage chance where it might not notice a row, which will make it feel a little more human. If anyone would like to test what the sweet spot would be with that, please let me know. Style Python has an official style guide, which you should read and follow. Some highlights:
{ "domain": "codereview.stackexchange", "id": 15510, "lm_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, tic-tac-toe", "url": null }
mobile-robot, design, movement, wheel, first-robotics However, comparing speed and force can give a good comparison of the different types of wheels. Here is a table that offers a quick and simple comparison (Note that this assumes fictionless bearings and equal traction!):
{ "domain": "robotics.stackexchange", "id": 1741, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mobile-robot, design, movement, wheel, first-robotics", "url": null }
java, multithreading, exception-handling, socket, comparative-review private void addClient(Socket clientSocket) { Client client = new Client(clientSocket, this); connectedClients.put(client.getID(), client); Thread clientThread = new Thread(client); clientThread.start(); logEvent("Accepted new connection from " + clientSocket.getRemoteSocketAddress().toString()); client.send("@SERVER:HELLO"); }
{ "domain": "codereview.stackexchange", "id": 5816, "lm_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, multithreading, exception-handling, socket, comparative-review", "url": null }
quantum-field-theory, gauge-theory, terminology, history, gauge 1972 - Still canonical quantization for arbitrary ξ is of interest, including massive vector field. See (Nakanishi 1972). 4 Loren't'z gauge (misspelling) You may know that in the 20th century, the common spelling was "Lorentz gauge", with extra "t". I couldn't find any exceptions at my hand. The turning point might be the errata of Peskin & Schroeder. Srednicki and Siegel spell it correctly. 5 Bibliography
{ "domain": "physics.stackexchange", "id": 18749, "lm_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, gauge-theory, terminology, history, gauge", "url": null }
### Area Moments of Inertia • Define moment of inertia. • Understand importance of moment of inertia in rotational motion and bending. • Understand terms such as polar moment of inertia, radius of gyration. Area Moment of Inertia is a geometrical property of an area which reflects how its points are distributed with regard to an arbitrary axis. The area moment of inertia indicates the resistance of a beam to bending and deflection, around an axis that lies in the cross-sectional plane. Beams with higher area moments of inertia are used in construction because they offer more resistance to rotation. Polar Moment of Inertia of an area about a point is equal to the sum of moments of inertia of the area about any two perpendicular axes in the area and passing through the same point. The polar moment of inertia is a measure of an object’s ability to resist torsion as a function of its shape. $J = I_x+ I_y$
{ "domain": "herokuapp.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682441314384, "lm_q1q2_score": 0.808309915233237, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 1112.9019519949138, "openwebmath_score": 0.9989601969718933, "tags": null, "url": "https://enggtv.herokuapp.com/topic/Area%20Moments%20of%20Inertia/" }
• A qualitative analysis of the sequence fully solves this... To wit, note that the function $u:x\mapsto\frac12(x^2+c)$ is increasing on $x\geqslant0$, such that $u(x)>x$ for $x<a_c$ and $x>b_c$ and such that $u(x)<x$ for $a_c<x<b_c$, with $0<a_c<b_c$ the fixed points of $u$. These remarks, and these alone, show that $x_n\to a_c$ for every $x_0<b_c$, $x_n\to b_c$ if $x_0=b_c$ and $x_n\to\infty$ if $x_0>b_c$. Now, if $x_0>1$, three cases remain: $1<x_0<b_c$, $x=b_c$, and $x>b_c$, with $b_c=1+\sqrt{1-c}$ and $a_c=1-\sqrt{1-c}$. – Did Apr 15 '16 at 20:22 • @Bungo increasing function. – Did Apr 15 '16 at 21:18
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668717616668, "lm_q1q2_score": 0.8239191560759112, "lm_q2_score": 0.8397339736884712, "openwebmath_perplexity": 135.8512767474141, "openwebmath_score": 0.9568643569946289, "tags": null, "url": "https://math.stackexchange.com/questions/1744157/does-the-sequence-x-n1-frac12-x-n2-c-diverge" }
algorithms, arrays, subsequences Title: Count unique increasing subsequences of length 3 in $O(n\log n)$ Problem: Given an array of $n$ integers, $A[1 \dots n]$, such that any integer occurs at most 2 times in the array, we have to find the number of unique increasing subsequences of length 3 (duplicate subsequences must be counted only once). In other words, we have to count the number of unique integers $A[i], A[j], A[k]$ such that $A[i] < A[j] < A[k]$ with $i < j < k$. I have been stuck on this for quite a while now. I did look up this question which tests for the existence of such a triplet. But I think my question is different because it needs the count, and because it needs unique triplets (upto 1 repetition of any number is allowed).
{ "domain": "cs.stackexchange", "id": 804, "lm_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, arrays, subsequences", "url": null }
java, performance, comparative-review Running Time #2 = 2.74 sec (for N number of test cases) What causes implementation #2 to be faster? Is it the hashCode method? String.equals() compare their char[] inside, which is slower than simply compare two ints. String concatenation is slower than creating a Database. String.hashcode() is just like its equals. Note that your implementation of Database.equals is incorrect, though you're lucky this time. @Override public boolean equals(Object obj) { return (obj instanceof Database) && ID == ((Database)obj).ID && SC == ((Database)obj).SC; } The hashcode implementation is only a suggestion. @Override public int hashCode() { return 31 * (31 * 17 + ID) + SC; }
{ "domain": "codereview.stackexchange", "id": 3954, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, comparative-review", "url": null }
4. Jun 18, 2015 ### RUber You can read a little more on this idea at https://en.wikipedia.org/?title=Riemann_integral. For example, to your point on continuity: "A function on a compact interval [a, b] is Riemann integrable if and only if it is bounded and continuous almost everywhere (the set of its points of discontinuity has measure zero, in the sense of Lebesgue measure)." Set of measure zero means a finite (or countably infinite) set of distinct points. In the case of the step function is discontinuous at the integers which for a maximum n is finite, and without a maximum is countably infinite. Both sets are measure zero, so you are okay to integrate. 5. Jun 18, 2015 ### WWGD Just to nitpick, or to add a bit: while in this context of step functions discontinuities are finite, you may have in other cases uncountably-infinite sets of measure zero, e.g., the Cantor set. 6. Jun 18, 2015 ### SammyS
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9905874098566368, "lm_q1q2_score": 0.8803932610174803, "lm_q2_score": 0.8887587831798666, "openwebmath_perplexity": 317.66459350228246, "openwebmath_score": 0.8627914190292358, "tags": null, "url": "https://www.physicsforums.com/threads/definite-integral-of-step-function.819626/" }
quantum-field-theory, special-relativity, lorentz-symmetry $$ A(t) = A^+(t) + A^-(t). \tag{7} $$ The adjoint of the energy-increasing part of an operator is the energy-decreasing part of its adjoint: $$ \big(A^+(t)\big)^*=\big(A^*(t)\big)^-. \tag{8a} $$ The first of equations (2) implies that the energy-increasing and -decreasing parts of the field operator $\psi_k(x)$ anticommute with each other at equal time: $$ \Big\{\big(\psi_k(t,\bfx)\big)^+,\,\big(\psi_k(t,\bfy)\big)^-\Big\}=0, \tag{8b} $$ and similarly for $\psi_k^*(x)$.
{ "domain": "physics.stackexchange", "id": 62346, "lm_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, lorentz-symmetry", "url": null }
c++, game, design-patterns, entity-component-system, glfw Instead, consider having your KeyboardManager call glfwSetKeyCallback() so it will get notified when a key's state has changed. Then it can look up if any of the subscribers are interested in that key, and only then call the registered callback functions of those subscribers. A similar thing can be done with mouse events. Once a frame you have to call glfwPollEvents(), probably at the point where you called the callbackAll() functions before. Answers to your questions
{ "domain": "codereview.stackexchange", "id": 44884, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game, design-patterns, entity-component-system, glfw", "url": null }
2pi i times sum of residues of x^4/(1+x^8) at x=e^(pi i/ 8), x=e^(3 pi/8), x=e^(5 pi / 8), x=e^(7 pi i /8) The residue at x_0=e^(pi i/8 + 2pi k i / 8) is of x_0^4/(8x_0^7)=1/8 x_0^(-3) i.e. it is 1/8 e^(-3 pi i / 8 - 6 pi i/8) Hence the integral is equal to 2 pi i / 8 (e^(-3 pi i/ 8) + e^(-9 pi i/8) + e^(-15 pi i/8) + e^(-21 pi i/8)), which can be siplified to 2 pi i / 8 (e^(-3 pi i/ 8) - e^(-pi i/8) + e^(pi i/8) - e^(3 pi i/8)) = 2 pi i /8 (2 i sin(pi/8) - 2 i sin(3 pi/8))=pi/2 (sin(3 pi/8)-sin(pi / 8)) Now we relate this integral to what we actually wanted to compute. For this note that when |x|=R, the integrand is bounded by |x^4/(1+x^8)|<= R^4/(R^8-1) Hence by triangle inequality the integral over C is bounded by pi R (R^4/(R^8-1)), which tends to 0 as R tends to infinity. Hence as R tends to infinity, the integral over C and I tends to the integral over the real line. Hence the integral over the real line is also equal to pi/2 (sin(3 pi/8)-sin(pi / 8)).
{ "domain": "wikispaces.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9802808724687407, "lm_q1q2_score": 0.8370743457644876, "lm_q2_score": 0.853912760387131, "openwebmath_perplexity": 1080.4738435578147, "openwebmath_score": 0.9511043429374695, "tags": null, "url": "https://complexworld.wikispaces.com/Questions?responseToken=c3468c2e46c6e6c3d7ca2e636c77fa3a" }
n <- 10 p <- 0.6 q <- 0.4 X <- rbinom(obs, n, p) Y <- X for( i in 1:obs) { Y[i] <- rbinom(1, X[i], q) } # Simulated pmf of Y hist(Y, breaks=obs) # Theoretical/claimed pmf Y_theoretical <- rbinom(obs, n, p*q) hist(Y_theoretical, breaks=obs) The two histograms generated are shown below: (The simulated pmf) (Claimed pmf) Both seem identical for the choice of $p$ and $q$. Can a proof of this claim be provided? - Let $X = \sum_{i=1}^{n} X_i$, with $X_i \overset{iid}{\sim} Bin(1, p)$, and $Z = \sum_{i=1}^{n} Z_i$, with $Z_i \overset{iid}{\sim} Bin(1, q)$. If all the $X_i$ and $Z_i$ are mutually independent, then $Z_i | X_i \overset{iid}{\sim} Bin(1, q)$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765581257486, "lm_q1q2_score": 0.8101581743313676, "lm_q2_score": 0.8267117898012105, "openwebmath_perplexity": 428.6263194726717, "openwebmath_score": 0.9424841403961182, "tags": null, "url": "http://stats.stackexchange.com/questions/112516/binomial-random-variable-conditional-on-another-one" }
Originally Posted by HallsofIvy You are right about some things and wrong about others. Given any positive number x, there exist two real numbers whose square is x, one positive and one negative. We write those as $\displaystyle \pm\sqrt{x}$. But the reason we need that "$\displaystyle \pm$" is that the symbol, "$\displaystyle \sqrt{x}$" means only the positive one. That is, the square root of 4 is not "-2 and 2". The square root of 4 is 2. The two values of x, such that $\displaystyle x^2= 4$, are -2 and 2. Those are different statements. Given a positive number a, The square root of a is $\displaystyle \sqrt{a}$, a positive number. The two values of x, such that $\displaystyle x^2= a$ are $\displaystyle \sqrt{a}$ and $\displaystyle -\sqrt{x}$, which we can write as $\displaystyle \pm\sqrt{a}$. Again, the reason we need that "$\displaystyle \pm$" is that $\displaystyle \sqrt{a}$ alone refers only to the positive root of the equation. Ok. Now, the sqrt{-4} = -2i and 2i.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787830929848, "lm_q1q2_score": 0.8467704794440939, "lm_q2_score": 0.8577681104440172, "openwebmath_perplexity": 358.09629712428006, "openwebmath_score": 0.9164283275604248, "tags": null, "url": "http://mathhelpforum.com/math-topics/282260-square-root-two-answers.html" }
forces, vectors, geometry, linear-algebra, displacement Then you only need to recognise that a displacement vector is the same vector wherever it appears on the plane. (this also shows the parallelogram law. This is not different from the triangle law, just a different way of thinking of it). So, to apply this to forces, and other vector quantities, you only have to recognise that it does not matter where you put the vectors on the diagram. Of course, it only applies to questions where only the vector properties of the forces are relevant -- like when you are calculating the net force acting in a particular direction. It does not apply when you need to take moments, and have to describe the force acting at a point.
{ "domain": "physics.stackexchange", "id": 65548, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, vectors, geometry, linear-algebra, displacement", "url": null }
It's perfectly fine (except that, if you want to prove independence, you need to show $c_1=c_2=c_3=0$, not that their sum is 0). Next, do the matrix arithmetic on the left hand side: $$c_1 \begin {bmatrix} -1&1 \\\\ -1&1 \ \end{bmatrix} + c_2 \begin {bmatrix} 1&1 \\\\ -1&-1 \ \end{bmatrix} + c_3 \begin {bmatrix} -1&1 \\\\ 1&-1 \ \end{bmatrix} = \begin {bmatrix} -c_1+c_2-c_3&c_1+c_2+c_3\\\\ -c_1-c_2+c_3 & c_1-c_2-c_3 \ \end{bmatrix} ={\bf 0}.$$ Since a matrix is the zero matrix if and only if each of its components is 0, you get the system of equations \eqalign{ -c_1+c_2-c_3&=0\cr c_1+c_2+c_3&=0 \cr -c_1-c_2+c_3&=0 \cr c_1-c_2-c_3&=0 } -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984810954312569, "lm_q1q2_score": 0.8390124463829053, "lm_q2_score": 0.8519527963298946, "openwebmath_perplexity": 234.13300125398595, "openwebmath_score": 0.8796635866165161, "tags": null, "url": "http://math.stackexchange.com/questions/89926/are-three-matrices-linearly-independent-and-form-a-basis-of-m-2-mathbb-r" }
python, object-oriented, python-3.x, django The blocks are very similar just the file-extension changes. extension = 'png' if self.image_format == 'png' else 'jpg' And then you can delete the conditional branches that follow and leave only one path. Bug on the use of or if self.image_format == 'jpg' or 'jpeg': Does not work as you intended. or returns the first truthy value, so you wrote the same as: if self.image_format == 'jpg':
{ "domain": "codereview.stackexchange", "id": 18039, "lm_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, python-3.x, django", "url": null }
ros, roslib, ros-kinetic, pythonpath ok: [localhost] TASK [ros-kinetic-freemovr-engine : Ensure strawlab rosdep URL is included into rosdep sources] *** ok: [localhost] TASK [ros-kinetic-freemovr-engine : Ensure freemovr-engine-kinetic.rosinstall is available] *** ok: [localhost] TASK [ros-kinetic-freemovr-engine : install sudo command] ********************** ok: [localhost] TASK [ros-kinetic-freemovr-engine : install wstool command] ******************** ok: [localhost] TASK [ros-kinetic-freemovr-engine : Ensure workspace installer dir exists] ***** ok: [localhost] TASK [ros-kinetic-freemovr-engine : copy installer script] ********************* ok: [localhost] TASK [ros-kinetic-freemovr-engine : apt] *************************************** ok: [localhost] TASK [ros-kinetic-freemovr-engine : apt] *************************************** ok: [localhost] TASK [ros-kinetic-freemovr-engine : apt] *************************************** ok: [localhost]
{ "domain": "robotics.stackexchange", "id": 33058, "lm_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, roslib, ros-kinetic, pythonpath", "url": null }
# When is a binomial coefficient a factorial, i.e. when is $\binom{m}{j} = n!$ for some $n,m,j$? As stated in the title: when is a binomial coefficient a factorial, i.e. when is $\binom{m}{j} = n!$ for some $m,j,n$? I was thinking about this problem a couple of days ago because in all my years of being a mathematician (amateur or otherwise), I only noticed a handful of these. Of course there are a couple of trivial cases to negate: the case when $n$ arbitrary $m = n!$ and $j=1$, likewise when $m$ arbitrary and $j=0$ and $n=0,1$. I decided to write a Mathematica code to check this for me which I can make available for anyone who is interested. I decided to compute up to $30!$, i.e. $n=30$, and $m$ up to $110$. There were only $3$ binomial coefficients that were factorials (that were not trivial) up to binomial coefficient symmetry: • $\dbinom{4}{2} = 6 = 3!$ • $\dbinom{10}{3} = 120 = 5!$ • $\dbinom{16}{2} = 120 = 5!$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812309063186, "lm_q1q2_score": 0.809066570111944, "lm_q2_score": 0.8354835309589074, "openwebmath_perplexity": 237.86345411112998, "openwebmath_score": 0.8179789185523987, "tags": null, "url": "https://math.stackexchange.com/questions/1321905/when-is-a-binomial-coefficient-a-factorial-i-e-when-is-binommj-n-for/1321926#1321926" }
We use the definition of $t$ and read straight from the right triangle to back substitute, \begin{align*} & \frac{a^4}{8}\left( t- \sin t \cos^3 t + \sin^3 t \cos t \right) +c \\ =& \frac{a^4}{8}\left( \sin^{-1}\left(\frac{x}{a}\right)-\left(\frac{x}{a}\right)\left( \frac{\sqrt{a^2-x^2}}{a} \right)^3 +\left( \frac{x}{a} \right)^3\frac{\sqrt{a^2-x^2}}{a} \right) +c \\ =&\frac{a^4}{8}\left( \sin^{-1}\left(\frac{x}{a}\right) -\left(\frac{x}{a}\right)\frac{\sqrt{a^2-x^2}}{a}\left( \frac{a^2-x^2}{a^2}-\frac{x^2}{a^2} \right) \right) +c \\ =& \frac{a^4}{8}\left( \sin^{-1}\left(\frac{x}{a}\right)-\frac{x\sqrt{a^2-x^2}}{a^2}\left( \frac{a^2-2x^2}{a^2} \right) \right) +c \\ =&\frac{x}{8}\left( 2x^2-a^2 \right)\sqrt{a^2-x^2}+\frac{a^4}{8}\sin^{-1}\left(\frac{x}{a}\right)+c. \end{align*} This is the desired form.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936106207203, "lm_q1q2_score": 0.8242964560391617, "lm_q2_score": 0.8376199653600372, "openwebmath_perplexity": 1521.9370369195717, "openwebmath_score": 1.0000100135803223, "tags": null, "url": "https://math.stackexchange.com/questions/575933/find-a-primitive-of-x2-sqrta2-x2" }
evolution, biochemistry, virus, protein-evolution Note that I am looking for a scientific answer, and not wild-ass speculation. While I can accept some degree of speculation the accepted answer will NOT be based entirely on speculation if it is avoidable. One of the main points of contention in the study of virus evolution is whether or not they appear before the last universal cellular ancestor (LUCA) or afterwards (commonly accepted: genes that "escaped" from host organisms aka the escape hypothesis or vagrancy hypothesis). Basically though, the LUCA is the most recent ancestor that all organisms living on Earth are derived from.
{ "domain": "biology.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": "evolution, biochemistry, virus, protein-evolution", "url": null }
c#, unity3d Is there a way that the camera zooming code can be shortened? It feels unnecessarily long. void Update() { if( Input.GetMouseButtonDown( zoomButton ) ) { isCameraZoomed = !isCameraZoomed; playerCamera.fieldOfView = ( isCameraZoomed ? ReducedFOV : StandardFOV ); } } I'd also suggest making some changes in PlayerCameraController.cs private float xRotation = 0.0f; private float yRotation = 0.0f; to Vector3 newRotation = new Vector3(); then instead of this.transform.eulerAngles = new Vector3(this.xRotation, this.yRotation, 0); this.xRotation += this.VerticalInversion * this.VerticalSensitivity * Input.GetAxis("Mouse Y"); this.yRotation += this.HorizontalSensitivity * Input.GetAxis("Mouse X"); you can just write newRotation.x += VerticalInversion * VerticalSensitivity * Input.GetAxis("Mouse Y"); newRotation.y += HorizontalSensitivity * Input.GetAxis("Mouse X"); transform.eulerAngles = newRotation;
{ "domain": "codereview.stackexchange", "id": 19373, "lm_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 }
machine-learning, nlp, gensim Title: Sentence similarity using Doc2vec I have a list of 50k sentences such as : 'bone is making noise', 'nose is leaking' ,'eyelid is down' etc.. I'm trying to use Doc2Vec to find the most similar sentence from the 50k given a new sentence. tagged_data = [TaggedDocument(words=word_tokenize(_d.lower()), tags=[str(i)]) for i, _d in enumerate(data)] max_epochs = 100 vec_size = 20 alpha = 0.025 model = Doc2Vec(size=vec_size, alpha=alpha, min_alpha=0.025, min_count=1, dm =0) model.build_vocab(tagged_data) for epoch in range(max_epochs): print('iteration {0}'.format(epoch)) model.train(tagged_data, total_examples=model.corpus_count, epochs=model.iter) # decrease the learning rate model.alpha -= 0.0002 # fix the learning rate, no decay model.min_alpha = model.alpha
{ "domain": "datascience.stackexchange", "id": 4926, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, nlp, gensim", "url": null }
electrostatics, electric-fields, charge, gauss-law Title: Spherical charge enclosed by a shell - why doesn't induced charge on shell cause a greater electric field? Suppose you have a spherical conductor with charge $+Q$ and radius $R$. You have a conducting shell at radius $2R$ with net charge $-Q$. From what I understand, the shell will have a charge of $-Q$ on the inside surface of the shell, and the outer surface would then have a charge of 0.
{ "domain": "physics.stackexchange", "id": 37170, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, electric-fields, charge, gauss-law", "url": null }
reinforcement-learning, python, q-learning, game-ai, combinatorial-games import matplotlib import numpy as np import pandas as pd from functools import reduce from ast import literal_eval import unittest import math from datetime import date, timedelta import random
{ "domain": "ai.stackexchange", "id": 2132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, python, q-learning, game-ai, combinatorial-games", "url": null }
c#, .net, asp.net-core return json.FromJson<T>(); } internal RequestArgumentsBuilder<T> PrepareRequest<T>() where T : class { return new RequestArgumentsBuilder<T>(this); } internal RequestArgumentsBuilder<T> PrepareRequest<T>(HttpMethod httpMethod, EndpointSecurityType securityType, CancellationToken cancellationToken = default) where T : class { return PrepareRequest<T>() .WithEmptyStringContent(httpMethod == HttpMethod.Post || httpMethod == HttpMethod.Put || httpMethod == HttpMethod.Delete) .UseApiKey(securityType != EndpointSecurityType.None) .UseSecuritySignature(securityType is EndpointSecurityType.Trade or EndpointSecurityType.UserData) .WithCancellationToken(cancellationToken); } }
{ "domain": "codereview.stackexchange", "id": 42426, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, asp.net-core", "url": null }
reaction-mechanism Reactions that are always non-spontaneous Once you are certain that a reaction is always spontaneous, it is easy to find one that is always non-spontaneous - just swap reactants and products. So according to this argument, cyclohexane and oxygen will never form from carbon dioxide and water spontaneously. That sounds reasonable.
{ "domain": "chemistry.stackexchange", "id": 11489, "lm_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", "url": null }
javascript, html, api, dom, google-maps /** * Obtains the latitude and longitude of a location and then processes it with a callback function * @param {String} addressStr : comma separated string containing all pertinent address information * @param {Function} callback : handle to the function to call once the data lat/lng data has been retrieved successfully */ getLatLngFromAddressString : function(addressStr, callback) { var geocoder = new google.maps.Geocoder(); geocoder.geocode({'address': addressStr}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { var latitude = results[0].geometry.location.lat(); var longitude = results[0].geometry.location.lng(); callback({lat: latitude, lng: longitude}); } else { // I have a custom error logging framework set up, but for simplicity i'll just console.log in code review snippet console.log("error"); } }); } } }
{ "domain": "codereview.stackexchange", "id": 20100, "lm_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, html, api, dom, google-maps", "url": null }
programming-languages, compilers, program-optimization On the front end (parser), in the worst case, you have a ton bunch of special cases for your symbols in your parser, and in the best case, you treat them as generic symbols, in which case you're in the exact same parsing position as a language that has In the back-end, with type checking, optimizers, etc., you either treat your symbols as standard library functions, in which case you're in the exact same place as a more verbose language, or you treat them as parts of the language, in which case you will have a bunch of special cases in your type checker, code generation, etc.
{ "domain": "cs.stackexchange", "id": 11665, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-languages, compilers, program-optimization", "url": null }
piece of integral... The right-hand piece of the derivative of an integral using the Fundamental Theorem of Calculus: limits,,! The limit of a Complex Kind 1 dx, and trigonometry a place to put the anti-derivatives to its and! The foundations of Calculus for Analytic Functions −1 x in the first and second of... Ab chapter 1 limits and Their Properties this first chapter involves the Fundamental Theorem of Calculus and another thing what. Tools to explain many phenomena ideas of Calculus is a Theorem that links the concept of the derivative an! Of Calculus and are behind all machine learning for integrals and the Fundamental third fundamental theorem of calculus of Calculus, astronomers could determine! You 're using the first Fundamental Theorem of Calculus will explore the Fundamental Theorem of Calculus for Analytic Functions that... We are all used to evaluating definite integrals without giving the reason for the procedure much thought explore. Stepping stone after all those years
{ "domain": "grecotel.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9914225125587971, "lm_q1q2_score": 0.8982187047063709, "lm_q2_score": 0.9059898210180105, "openwebmath_perplexity": 578.4206299133635, "openwebmath_score": 0.8412231802940369, "tags": null, "url": "http://dreams.grecotel.com/v1g8jvh/third-fundamental-theorem-of-calculus-0d5f9d" }
java, interpreter, language-design })); functions.put("%", new Function<Object>(new Type[] { Type.OBJECT, Type.OBJECT }, new RunnableFunction<Object>() { @Override public Object run(List<Object> memory, InputIterator input, StringBuilder output, MutableObject temporaryVariable, Map<String, Object> variables, Object[] args) { Type type1 = Type.getMatch(args[0]); Type type2 = Type.getMatch(args[1]); if ((type1 == Type.DECIMAL || type1 == Type.INTEGER) && (type2 == Type.DECIMAL || type2 == Type.INTEGER)) { return mod(args[0], type1, args[1], type2); } return null; }
{ "domain": "codereview.stackexchange", "id": 18460, "lm_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, interpreter, language-design", "url": null }
php Now, if you want to get around it a little. All static calls and calls to new bind the calling code to the class that they are calling. Look at the following and answer for yourself how tightly they bind the code to the class: config::enable_sessions $object->enable_sessions $configObject = new Config(); $configObject = $container->getNew('Config');
{ "domain": "codereview.stackexchange", "id": 1156, "lm_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", "url": null }
For $0\le x\le\frac\pi2$, in this answer it is shown that $\tan(x)\ge x$. Therefore, \begin{align} \frac{\mathrm{d}}{\mathrm{d}x}\frac{\sin(x)}x &=\frac{\cos(x)}{x^2}\,(x-\tan(x))\\ &\le0 \end{align} Thus, $\frac{\sin(x)}x$ is decreasing on $\left[0,\frac\pi2\right]$, and since $\lim\limits_{x\to0}\frac{\sin(x)}x=1$, $$\frac2\pi\le\frac{\sin(x)}x\le1$$ # Proof Denote $\dfrac{1}{n}=x,(n=1,2,\cdots)$. Thus, $0<x \leq 1<\dfrac{\pi}{2}$. This shows that the angle with the radian $x$ is a first-quadrant angle on the unit circle. As the figure shows, $\angle AOB=x$,which is bisected by $OD$. Thus,$$|\widehat{AEB}|=x,~~~|\widehat{AE}|=\frac{1}{2}x,~~~ |BC|=\sin x.$$ Notice that $$|\widehat{AEB}|>|AB|>|BC|>|BG|=|DA|>|\widehat{AE}|.$$ Thus, we may have $$x>\sin x>\frac{1}{2}x,$$which is desired.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9572777975782054, "lm_q1q2_score": 0.8229370165832417, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 544.7842690102492, "openwebmath_score": 0.9218793511390686, "tags": null, "url": "https://math.stackexchange.com/questions/2847594/how-is-frac12n-leq-sin-frac1n-leq-frac1n?noredirect=1" }
special-relativity, field-theory, group-theory, dirac-equation, dirac-matrices Title: Lorentz invariance of the Dirac equation and implicability of the Klein-Gordon equation from the Dirac equation I am reading the Peskin & Schroeder's Introduction to quantum field theory, p.42~43 and don't understand some points. In their book p.42 they say that "To show that it (the Dirac equation) is Lorentz invariant, write down the Lorentz-transformed version of the left-hand side (of the Dirac equation) and calculate: $$[i\gamma^{\mu}\partial_{\mu}-m]\psi(x) \to [i\gamma^{\mu}(\Lambda^{-1})^{\nu}_{\mu}\partial_{\nu}-m]\Lambda_{\frac{1}{2}}\psi(\Lambda^{-1}x) = \cdots,$$ where $$\Lambda_{\frac{1}{2}} := \operatorname{exp}(-\frac{i}{2}\omega_{\mu \nu}S^{\mu \nu})\tag{3.30}$$ (their book p.42) Q.1) And my first question is, why the left-hand side of the Dirac equation is Lorentz - transformed in this fashion? And, in the page 43, he derives the Klein-Gordon equation from the Dirac equation as following way : by acting on the left with $(-i\gamma^{\mu}\partial_{\mu}-m)$,
{ "domain": "physics.stackexchange", "id": 93349, "lm_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, field-theory, group-theory, dirac-equation, dirac-matrices", "url": null }
machine-learning, reinforcement-learning Title: Does reinforcement learning only work on grid world? Does reinforcement learning always need a grid world problem to be applied to? Can anyone give me any other example of how reinforcement learning can be applied to something which does not have a grid world scenario? The short answer is no! Reinforcement Learning is not limited to discrete spaces. But most of the introductory literature does deal with discrete spaces. As you might know by now that there are three important components in any Reinforcement Learning problem: Rewards, States and Actions. The first is a scalar quantity and theoretically the latter two can either be discrete or continuous. The convergence proofs and analyses of the various algorithms are easier to understand for the discrete case and also the corresponding algorithms are easier to code. That is one of the reasons, most introductory material focuses on them.
{ "domain": "datascience.stackexchange", "id": 232, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, reinforcement-learning", "url": null }
differential-geometry, coordinate-systems, differentiation $$ but this last expression is simply the chain rule! That is, differentiating $x_i$ with respect to $x_k$ gives $$ \frac{\partial x_i}{\partial x_k} = \frac{\partial x_i}{\partial \Theta_1}\frac{\partial \Theta_1}{\partial x_k} +\frac{\partial x_i}{\partial \Theta_2}\frac{\partial \Theta_2}{\partial x_k}+\frac{\partial x_i}{\partial \Theta_3}\frac{\partial \Theta_3}{\partial x_k} $$ so $$ \frac{\partial x_i}{\partial \Theta_j}\frac{\partial \Theta_j}{\partial x_k}=\frac{\partial x_i}{\partial x_k}. $$
{ "domain": "physics.stackexchange", "id": 66369, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "differential-geometry, coordinate-systems, differentiation", "url": null }
dna-replication Basically, the DNA clamp is (an) independent protein unit(s) which has (have) the ability to encircle the DNA strand and travel along it. They bind to the polymerase, which is why you don't see them on your diagram. Their function is, very simply, to make it possible for the polymerase to stay closely attached to the DNA stand.
{ "domain": "biology.stackexchange", "id": 7924, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dna-replication", "url": null }
quantum-field-theory, string-theory, topological-field-theory, algebraic-geometry I'm interested in this question for its own right, but there's also a more specific reason. I recently computed that there's a generating function of Gopakumar-Vafa invariants which precisely agrees with the generating function of a certain black hole degeneracies. Of course, the Gopakumar-Vafa side is in topological string theory. The black hole story is apparently, by considering "Type IIA compactified on the six-torus $T^{6}$." Does anyone have any instincts as to why these agree? Does it seem to people like it's most likely accidental? (For example, due to the fact that there are only so many low weight modular and Jacobi forms) The crucial idea to understand why topological string theory cannot be in itself a fundamental description of nature is because, by construction, all the operators of the theory (including the energy-momentum tensor) are BRST exact.
{ "domain": "physics.stackexchange", "id": 67648, "lm_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, string-theory, topological-field-theory, algebraic-geometry", "url": null }
python, algorithm, graph, heap """ total = 0 # Total cost of edges in tree explored = set() # Set of vertices in tree start = next(iter(graph)) # Arbitrary starting vertex unexplored = [(0, start)] # Unexplored edges ordered by cost while unexplored: cost, winner = heappop(unexplored) if winner not in explored: explored.add(winner) total += cost for neighbour, cost in graph[winner]: if neighbour not in explored: heappush(unexplored, (cost, neighbour)) return total
{ "domain": "codereview.stackexchange", "id": 29228, "lm_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, algorithm, graph, heap", "url": null }
java, performance, ai, compiler, prolog Consider switch-case instead of if-else chains comparing to constants. ri(int) is an example where switch-case would probably both be faster and clearer. Scrutinize extends LinkedList. You'll probably need only two or three of its methods, so you might get away with adding the methods explicitly, and then delegating to a private field. If these classes do need to be list-like, consider adding the List interface instead, and then delegate, or add a method List asList() that provides a view of what you need.
{ "domain": "codereview.stackexchange", "id": 22490, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, ai, compiler, prolog", "url": null }
temperature, thermal-radiation There are of course restrictions to the math that I can see. The slopes will be the same at various segments depending on the temperature. So, I have to know ahead of time whether I'm measuring the temperature of a furnace or of a tree (or the moon, which is what I'm really interested in) to that I can match the slopes in appropriate temperature range. I'm aware that there are plenty of technical difficulties involved in this. Those aren't part of the concern of this question. I'm trying to find out if this is theoretically possible before I start worrying about the technical aspects. Given that I can easily detect difference in intensity between different pieces of wood, I expect the equipment is up to the task.
{ "domain": "physics.stackexchange", "id": 38722, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "temperature, thermal-radiation", "url": null }
biochemistry, immunology, immune-system, ebola Background: Fever is a defense mechanism of the body which is specific to temperature-sensitive virus and bacteria. It is so because high temperature induces stronger immune response and makes the body hostile for the pathogen1. Ebola virus, on the other hand, is not affected by this mechanism because it can survive over a much broader range of temperature. Ebola virus is moderately temperature-sensitive, and can survive in temperatures as low as 4°C2 and as high as 60°C3 (at least for half an hour). So, in practical sense, it is not possible to cure ebola disease by heating or cooling the body, either naturally or artificially. But, if we ignore practicality, then Yes, you can cure ebola disease if you take an ice bath or a steam bath for hours so that your core body temperature drops to 4°C (in former case) or 60°C (in latter case). However, it wouldn't be a very nice idea as your body would become hostile for yourself before becoming hostile for the virus.
{ "domain": "biology.stackexchange", "id": 6888, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "biochemistry, immunology, immune-system, ebola", "url": null }
c++, performance, collections, vectors pointer array = (pointer)m_Allocator->allocate(sizeof(T) * n); access memory = (access )m_Allocator->allocate(sizeof(pointer)); *memory = array; access acc = (access )m_Allocator->allocate(sizeof(pointer) * n); for (int index = 0; n > index; ++index) { acc[index] = &array[index]; } for (int index = 0; m_Size > index; ++index) { new(&array[index])T(*m_Access[index]); } for (int index = 0; m_NumArrays > index; ++index) { m_Allocator->deallocate(m_Memory[index]); } m_Allocator->deallocate(m_Memory); m_Allocator->deallocate(m_Access); m_NumArrays = 1; m_ArrayCapacity = n; m_Memory = memory; m_Access = acc; } access m_Memory; access m_Access;
{ "domain": "codereview.stackexchange", "id": 28051, "lm_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, collections, vectors", "url": null }
geophysics, meteorite, natural-disasters, mass-extinction As for, as you state,
{ "domain": "earthscience.stackexchange", "id": 1337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geophysics, meteorite, natural-disasters, mass-extinction", "url": null }
javascript, css, angular.js, html5, animation So: fireIndex += skipCount; //if fireIndex becomes greater than $scope.people.length, then set fireIndex to remainder from fireIndex / $scope.people.length if(fireIndex > $scope.people.length){ fireIndex %= $scope.people.length; } can be simplified to fireIndex = (fireIndex + skipCount) % $scope.people.length Comments Some comments are good, but you should avoid writing comments next to obvious code: if ($scope.people.length > 1) { // if more than 1 people It is already obvious from the code that you are checking if there are more than 1 people, the comment just doubles the effort required to change the code. The below comment is very confusing instead: if($scope.people.length >= 1){ // if start button clicked again Probably you changed the code but not comment.
{ "domain": "codereview.stackexchange", "id": 18477, "lm_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, css, angular.js, html5, animation", "url": null }
newtonian-mechanics, statics provided that $\mathbf{F}$ is perpendicular to the plane of A, B and C. The location of the force is then recovered from any one of the moments by $$ \mathbf{r} = \mathbf{r}_A + \frac{ \mathbf{F} \times \mathbf{M}_A}{\| \mathbf{F} \|^2} $$ Quick Proof Take $\mathbf{M}_B - \mathbf{M}_A = \left(\mathbf{r}_A-\mathbf{r}_B \right) \times \mathbf{F}$ and plug in the solution for $\mathbf{F}$ as follows: $$\require{cancel} \begin{aligned} \mathbf{M}_B - \mathbf{M}_A &= -\left(\mathbf{r}_B-\mathbf{r}_A \right) \times \frac{ \left( \mathbf{r}_B-\mathbf{r}_A \right) \times \left(\mathbf{M}_B-\mathbf{M}_A\right) }{ \| \mathbf{r}_B-\mathbf{r}_A \|^2 } \\ & = -\frac{\left(\mathbf{r}_B-\mathbf{r}_A \right) \cancel{ \left( \left(\mathbf{r}_B-\mathbf{r}_A \right) \cdot\left(\mathbf{M}_B-\mathbf{M}_A\right) \right) } - \left(\mathbf{M}_B-\mathbf{M}_A\right) \| \mathbf{r}_B-\mathbf{r}_A \|^2 }{ \| \mathbf{r}_B-\mathbf{r}_A \|^2 } \\ & \equiv \mathbf{M}_B - \mathbf{M}_A \end{aligned} $$
{ "domain": "physics.stackexchange", "id": 45804, "lm_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, statics", "url": null }
quantum-mechanics, particle-physics, protons, scattering-cross-section One can now define relations for $F_{1}\left( x, Q^{2}\right)$ and $F_{2}\left(x, Q^{2} \right)$ (I do not want to elaborate on this here, please take a look at Mark Thomson's "Modern Particle Physics", chapters 8.2.1 and 8.3 if you are interested) , and in doing so, one assumes that the electron scatters off from a quark in the proton elastically. This is very important, so let me repeat: The scattering of the electron with the proton is inelastic, but we assume that it is elastic with a (point-like) quark inside the proton. However, why do we assume this? The reason for that is the running of the coupling constant $\alpha_{S}$. Now, at high values of $Q^{2}$ ($= -q^{2}$), we know that $\alpha_{S}$ rapidly decreases, and thus we talk about asymptotic freedom, which basically means that the quarks inside the proton can be described as quasi-free particles in the proton for high enough $Q^{2}$. This plot might help in understanding (taken from (1)):
{ "domain": "physics.stackexchange", "id": 76053, "lm_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, particle-physics, protons, scattering-cross-section", "url": null }
graph-theory, planar-graphs, graph-colouring We know that 4-CEOs of claw-free plane 4-regular graphs must orient every triangle ($C_3$) and every rectangle ($C_4$) cyclically. The graph $G$ in the above figure has vertex connectivity three. Conjecture 1 might hold for the class of plane 4-regular claw-free graphs that are 4-connected. For the graph $G$ in the above figure, the good Eulerian orientations are also 4-CEOs. This suggests the next conjecture which is a very relaxed form of Conjecture 1 for a subclass. Conjecture 2: A plane 4-regular claw-free 4-connected graph $H$ has a 4-CEO if and only if $H$ has a good 4-CEO.
{ "domain": "cstheory.stackexchange", "id": 5354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory, planar-graphs, graph-colouring", "url": null }
minerals, reference-request, scale Title: Are there minerals that can't scratch each other but have different hardness on Mohs scale? So I was reading here that Mohs scale is not transitive and therefore could not overcome the comparative phase in order to be turned into a measurement procedure. As it is written in the webpage, "Mohs assumed that his relation of "scratches" was transitive and asymmetrical(...). This has been shown to be false. Some minerals (...) cannot scratch each other, and yet have different powers of scratching a third mineral" Now I've looked at the references given in the article but couldn't find which minerals these were and a Google search yielded no information either. So my question is what are these minerals. A reference would also be greatly appreciated.
{ "domain": "earthscience.stackexchange", "id": 2265, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "minerals, reference-request, scale", "url": null }
php, sql, authentication, session </div> <div id="footer"> <div id="footerWrapp"> <div id="copyrights"><center>©Te gjitha te drejtat jane te rezervuara nga <a href="#">ALALA</a> , 2013</center></div> </div> </div> </body> </html> It was not easy, but the first step for improving your code is to split the layout from the logic: layout.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Welcome to albsocial</title> <link rel="stylesheet" href="css/main.css"/> <link rel="stylesheet" href="css/menubar.css"/> <script type="text/javascript" src="../js/analytic.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> </head> <script type="text/javascript"> setTimeout(function() { $('#error_check').fadeOut('slow'); }, 5000); </script> <body>
{ "domain": "codereview.stackexchange", "id": 4005, "lm_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, sql, authentication, session", "url": null }
ros, catkin, pioneer-3dx, rosaria, ros-groovy Originally posted by gershon on ROS Answers with karma: 73 on 2013-03-27 Post score: 4 Hi Gershon, I've edited the tutorial on ROS Wiki today to reflect the changes between the fuerte and the catkinized (groovy) version. However, there is still a problem with the current python-rosdep package that prevents the smooth installation of catkinized ROSARIA. You could grab the latest rosdep and install from source. Dereck Wonnacott has put together a document to get his students started using ROS on a Pioneer 3-AT, perhaps you will find it useful: https://goo.gl/kQEyA. I'd be grateful if you tried the updated tutorial and reported if you found any problem. Best, JKS Originally posted by JKS with karma: 306 on 2013-03-28 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 13565, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, catkin, pioneer-3dx, rosaria, ros-groovy", "url": null }
openni, rosmake, macos-snowleopard Title: Openni rosmake failing on OSX Edited to add: I see that I need to install the original branch of ni, not the master, so I've done that now. MacPorts won't install libusb-devel for me, so that's the latest problem. OS X 10.6.6 Snow Leopard. openni from https://github.com/ros-pkg-git/ni.git as in the wiki. rosmake --pre-clean openni --rosdep-install
{ "domain": "robotics.stackexchange", "id": 4956, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "openni, rosmake, macos-snowleopard", "url": null }
Follow up question: Is it some general rule to follow when setting up these particular solutions? I'm feeling pretty lost and want to really learn the concept. • Yes having extra constants like that is redundant as it can be rewritten as another constant – Triatticus Feb 3 '18 at 21:55 • B + D, or maybe just call it C. Anyway, you have the form, why not put it in for y? – Kaynex Feb 3 '18 at 21:57 • What you wrote is not the general solution, it is the homogenous solution. – Joel Feb 3 '18 at 22:03
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812290812827, "lm_q1q2_score": 0.8269130812315532, "lm_q2_score": 0.8539127529517043, "openwebmath_perplexity": 244.5752201462092, "openwebmath_score": 0.8550801873207092, "tags": null, "url": "https://math.stackexchange.com/questions/2634752/method-of-undetermined-coefficients-differential-equation" }
classical-mechanics, waves, doppler-effect, signal-processing Title: Doppler effect on non-periodic signals I would like to understand what's happening to a signal emitted from a moving source and arriving to a moving receptor. But, when I am looking on internet about Doppler effect, I can only find equations linking received frequency to emitted frequency. But what I want to do here is to simulate the Doppler effect on a random signal in Matlab. Introduction My idea was to see the Doppler effect as a consequence of the movement between source and receptor, I started by writing something like this : $$S_r(\phi(t)) = S_e(t)$$ Where $S_e$ is the emitted signal, $S_r$ the received signal and $\phi(t)$ a function giving the arrival time of the signal emitted by the source at time $t$, I think the quantity $\phi(t) - t$ is called TDOA sometimes. Since I'm using classic physics here, I have $\phi(t) = t + \frac{d_t(t)}{c}$ where $d_t(t)$ is the absolute distance travelled by the signal emitted at time $t$ between the source and the receiver.
{ "domain": "physics.stackexchange", "id": 67762, "lm_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, waves, doppler-effect, signal-processing", "url": null }
and trademarks displayed on this line, vertical line and a horizontal line 1 the! How to graph the given integers on horizontal and vertical lines given the equation of a horizontal line through. Concept is 6 of a relation of the form y = a constant value, what 's slope. Integers on horizontal and vertical lines lines: their graphical presentation, their slopes, and \ ( )... Bahldg7Eobjr eaP B14 notice in the figure below point to get user ’ s functionality –1, 5 and... Point is – 8 p. 12-13 this foldable has notes and examples graphing. Videos about graphing lines is called a vertical line ( y=-3\ ) in the x-y plane is on Site. Some example problems to understand how to graph the given integers on horizontal and vertical.... \ ) and ( –1, 5 ) and \ ( x\ ), and their Equations, better. One of the form y = 3 is a horizontal line passing the. Packet: table of solutions, we write \ ( y\ ) -axis at \ ( x=a.\ ) ) the! Each of the following relations: Solution: Key Terms and graph lines of
{ "domain": "statestimesreview.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769127862449, "lm_q1q2_score": 0.8192250776127245, "lm_q2_score": 0.8397339736884711, "openwebmath_perplexity": 613.763084853192, "openwebmath_score": 0.5228882431983948, "tags": null, "url": "https://statestimesreview.com/0fqvqaz/9526fe-graphing-horizontal-and-vertical-lines" }
ros, installation, rosdep, packages, debian turtle_actionlib: Missing resource turtlesim ROS path [0]=/opt/ros/fuerte/share/ros ROS path [1]=/root/ros/diagnostics ROS path [2]=/root/ros/common ROS path [3]=/root/ros/laser_pipeline ROS path [4]=/root/ros/executive_smach_visualization ROS path [5]=/root/ros/visualization_tutorials ROS path [6]=/root/ros/geometry ROS path [7]=/root/ros/pluginlib ROS path [8]=/root/ros/bullet ROS path [9]=/root/ros/robot_model ROS path [10]=/root/ros/xacro ROS path [11]=/root/ros/dynamic_reconfigure ROS path [12]=/root/ros/executive_smach ROS path [13]=/root/ros/driver_common ROS path [14]=/root/ros/visualization_common ROS path [15]=/root/ros/python_qt_binding ROS path [16]=/root/ros/bond_core ROS path [17]=/root/ros/image_common ROS path [18]=/root/ros/geometry_visualization ROS path [19]=/root/ros/common_rosdeps ROS path [20]=/root/ros/diagnostics_monitors ROS path [21]=/root/ros/bfl ROS path [22]=/root/ros/common_tutorials ROS path [23]=/root/ros/robot_model_visualization
{ "domain": "robotics.stackexchange", "id": 10834, "lm_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, installation, rosdep, packages, debian", "url": null }
homework-and-exercises, astrophysics, plasma-physics, kinetic-theory, turbulence I could able to derive upto Eq.14 of this paper, but not sure how proceed for deriving the diffusion term ($D$) given in Eq.15 for the general case (from Eq.14). While studying the literature, I found that these quasi-linear transport coefficient are being derived by Fokker-Planck technique, such as $$D_{xx}=\langle\frac{\Delta x \Delta x}{\Delta t}\rangle$$ I don't understand how quasi linear coefficient can be calculated assuming the transport equation as a Fokker Planck equation. My understanding about Fokker Planck equation is, in Boltzman equation when particle's momentum changes very little due to one collision the transport equation become Fokker Planck equation. But in plasma we compute kinetic transport properties from collissionless Vlasov equation which does not have any collision term then how we are getting the Fokker Planck equation in the first place. Is there any relation between the quasilinear equation (Eq.14 of this paper) and the Fokker Planck equation.
{ "domain": "physics.stackexchange", "id": 85449, "lm_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, astrophysics, plasma-physics, kinetic-theory, turbulence", "url": null }
formal-languages, regular-languages, regular-expressions Title: Could we write $(a+b)^* = (\epsilon + a + b)^+$? I have read that $L^* = L^+ - \epsilon$, but if we write $(\epsilon + a + b)^+$, is it equivalent to $(a+b)^*$? I have read that $L^∗=L^+−\epsilon$ That's definitely not true, since $\epsilon\in L^*$ but $\epsilon\notin [\text{anything}]-\epsilon$. If you still know where you read this, I suggest you check to see if you've misremembered what was written. but if we write $(\epsilon+a+b)^+$, is it equivalent to $(a+b)^∗$?
{ "domain": "cs.stackexchange", "id": 7829, "lm_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, regular-expressions", "url": null }
thermodynamics, combustion, fuel For example, $\ce{2H2 + O2 -> 2H2O}$ + 286 kJ/mole, but water dissociates more as the temperature rises. At 2,200 °C water is about 3% dissociated. At 3,000 °C it is about 50% split, so half the chemical enegy is unavailable. BTW, thermodynamically, a heat engine produces power based on the difference in temperature, so preheating a fuel-air mixture actually decreases efficiency, though it might be needed to vaporize the fuel (e.g. in Otto-cycle engine in cold weather).
{ "domain": "chemistry.stackexchange", "id": 8846, "lm_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, combustion, fuel", "url": null }
javascript, jquery, animation // Keys are named keyboardEvent.code values REF https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code const keys = { // maps keyboard keys to box object control states KeyA(state) { box.controls.left = state }, KeyD(state) { box.controls.right = state }, KeyW(state) { box.controls.up = state }, ArrowUp(state) { box.controls.up = state }, ArrowLeft(state) { box.controls.left = state }, ArrowRight(state) { box.controls.right = state }, } function handleKeyEvents(event) { if(keys[event.code]) { keys[event.code](event.type === "keydown"); event.preventDefault(); } } addEventListener('keydown', handleKeyEvents); addEventListener('keyup', handleKeyEvents); focus(); // get the keyboard events.
{ "domain": "codereview.stackexchange", "id": 32766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, animation", "url": null }
r, visualization, ggplot2 bps <- function(x) { cnf <- boxplot.stats(x)$conf data.frame(as.list(set_names(cnf, c("lwr", "upr"))), mean=mean(x)) } group_by(df, hour) %>% do(bps(.$val)) %>% ggplot(aes(x=hour, y=mean, ymin=lwr, ymax=upr, group=1)) + geom_ribbon(fill="#2b2b2b", alpha=0.25) + geom_line(size=0.25) + theme_tufte(base_family="Helvetica") + theme(axis.ticks=element_blank()) + labs(x=NULL, y=NULL)
{ "domain": "datascience.stackexchange", "id": 664, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, visualization, ggplot2", "url": null }
of an exponential random variable is, $$\begin{equation*} \mu_r^\prime = \frac{r!}{\theta^r}. Click Calculate!$$ \begin{eqnarray*} F(x) &=& P(X\leq x) \\ &=& \int_0^x f(x)\;dx\\ &=& \theta \int_0^x e^{-\theta x}\;dx\\ &=& \theta \bigg[-\frac{e^{-\theta x}}{\theta}\bigg]_0^x \\ &=& 1-e^{-\theta x}. The sample take distinct values ( and conversely ) distribution ( exponential, Bernoulli etc )! Time ( x ) ] ^2 side of distribution to wait before a given occurs! Distribution function of exponential distribution before a given event occurs Marco Taboga, Marco ( 2017.. Monotone ) function that However 1 1 − ( t ) = −λx! 1 λ2 parameter λ, as defined below y ) for every x y equation * }.... Useful for random variates with parameter $\theta =1$ is said to have exponential. Distribution of the geometric distribution, we 'll assume that you are happy to receive all cookies on vrcacademy.com... X is E [ x ] = 1 1 − E − λx, for t < by! Are called the order statistics of the exponential distribution
{ "domain": "hedvik.cz", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692298333416, "lm_q1q2_score": 0.8358834877423569, "lm_q2_score": 0.855851154320682, "openwebmath_perplexity": 582.6867101253308, "openwebmath_score": 0.9167631268501282, "tags": null, "url": "https://hedvik.cz/0iu569/4a543a-cdf-of-exponential-distribution-proof" }
Name --dennis.m.snell.1, Mon, 01 Oct 2007 16:51:27 The authorship issue was not an issue. It was mentioned in class, but by a student asking about it. There is a log of every action and every edit on this kiwi that can be reviewed each week. You are safe in leaving out your name. Sometime soon the editing will be reworked; however, and you might add your name to some other special page, but it will just get lost at the bottom of a topic. I removed your name here, but worry not, you are not forgotten. ... --john.w.fawcett.1, Mon, 15 Oct 2007 11:15:56 why is this under "Exams" as it's parent? Wouldn't Chapter 3 be better? ... --john.w.fawcett.1, Mon, 15 Oct 2007 11:18:06 Sorry, meant Chapter 2. I'll go ahead and add a backlink to chapter 2, but leave this one to Exams up for now. # Frequency and Impulse Response of a causal LTI system defined by a difference equation For the discrete time L.T.I. system described by $y[n]-\frac{1}{2}y[n-1]=x[n]+\frac{1}{2}x[n-1]$
{ "domain": "projectrhea.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211590308922, "lm_q1q2_score": 0.8246425815312649, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 1219.5656107466257, "openwebmath_score": 0.9422564506530762, "tags": null, "url": "https://www.projectrhea.org/rhea/index.php?title=ECE_301_Fall_2007_mboutin_Examples&diff=cur&oldid=484" }
quantum-algorithms, circuit-construction, bqp If $\sigma$ is a braid on $2n$ strands with $m$ crossings, we can write $\sigma = \sigma_{a_1}^{\epsilon_1} \sigma_{a_2}^{\epsilon_2} \cdots \sigma_{a_m}^{\epsilon_m}$, where $a_1, a_2, \ldots, a_m \in \{1, 2, \ldots, 2n - 1\}$, $\epsilon_1, \epsilon_2, \ldots, \epsilon_m \in \{\pm 1\}$, and $\sigma_i$ is the generator of $B_{2n}$ that corresponds to crossing the $i$th strand over the $(i + 1)$st. It suffices to describe $U_{\sigma_i}$, since $U_\sigma = U_{\sigma_{a_1}}^{\epsilon_1} \cdots U_{\sigma_{a_m}}^{\epsilon_m}$.
{ "domain": "quantumcomputing.stackexchange", "id": 214, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-algorithms, circuit-construction, bqp", "url": null }
newtonian-mechanics, variational-calculus, solid-mechanics, structural-beam, structure-formation Title: Catenary shape of transmission lines When flexible metal transmission lines are hung between two poles, the shape they assume to minimize the action of gravitational and tensile forces is a called a catenary. While assuming that shape, the line undergoes stretching and internal shear which will cause it to degrade. Further, the shape keeps changing due to the extensibility of the line. Consider a transmission line design consisting of flexible transmission wires wrapped around a rigid supporting metal beam (pole).
{ "domain": "physics.stackexchange", "id": 78259, "lm_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, variational-calculus, solid-mechanics, structural-beam, structure-formation", "url": null }
c#, .net, cryptography Buffer.BlockCopy(allData, 0, salt, 0, salt.Length); Buffer.BlockCopy(allData, salt.Length, iv, 0, iv.Length); Buffer.BlockCopy(allData, salt.Length + iv.Length, data, 0, data.Length);
{ "domain": "codereview.stackexchange", "id": 36312, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, cryptography", "url": null }
$$\int_{-\infty}^\infty \frac{\log(x)}{x^2+a^2}\,dx=2\int_0^\infty \frac{\log(x)}{x^2+a^2}\,dx+\frac{i\pi^2}{2a}\tag 2$$ Setting $(2)$ equal to $\frac{\pi \log(a)}{a}+i\frac{\pi^2}{2a}$, we find that $$\int_0^\infty \frac{\log(x)}{x^2+a^2}\,dx=\frac{\pi \log(a)}{2a}$$ I thought it might be instructive to evaluate the integral of interest using real analysis only. To that end, we enforce the substitution $x\to a/x$ to find that $$\int_0^\infty \frac{\log(x)}{x^2+a^2}\,dx=\frac1a \int_0^\infty \frac{\log(a)-\log(x)}{x^2+1}\,dx \tag2$$ For $a=1$, we see from $(2)$ that $\int_0^\infty \frac{\log(x)}{x^2+1}\,dx =0$. Thus, solving $(2)$ for integral of interest, and using $\int_0^\infty \frac{\log(x)}{x^2+1}\,dx =0$, we find that $$\int_0^\infty \frac{\log(x)}{x^2+a^2}\,dx=\frac{\pi \log(a)}{2a}$$ as expected!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98593637543616, "lm_q1q2_score": 0.8600790217996309, "lm_q2_score": 0.8723473879530491, "openwebmath_perplexity": 249.4860206319465, "openwebmath_score": 0.9100432395935059, "tags": null, "url": "https://math.stackexchange.com/questions/2312010/calculate-integral-using-residue-theorem" }
ros-control, ros-kinetic like "forward controllers" are useless but actually, this is just a way to define a common interface. Thus. if you use Gazebo to simulate your robot you are going to have the exact same interface and won't have a different code to control the real robot or the simulated one. List of the controllers
{ "domain": "robotics.stackexchange", "id": 30434, "lm_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-control, ros-kinetic", "url": null }
ros-kinetic How to do I check/change the mode? I have no idea. That would be device specific. Some/many EtherNet/IP devices can be put in either scanner or adapter mode. I don't know whether this device is capable of that. In any case, it should probably be an adapter. But it's just something to check. I do not claim it is the cause of your problems here. I have removed my edits from the os32c_node.cpp be sure to update the .launch file with the correct values then. Does the Protocols in frame parameter show it is using EthernetIP?
{ "domain": "robotics.stackexchange", "id": 34055, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros-kinetic", "url": null }
quantum-mechanics, general-relativity, gravity, black-holes Does anything exist between singularity and the event horizon of a black hole Now imagine particles moving towards the singularity inside two black holes, that are actually merging. Until the horizons do not overlap, all particles are moving towards the singularity of their own black hole, that is understandable. Now let's see what happens when the horizons start overlapping. How do particles that are already on the way towards their own singularity, "know" that they need to change course (either towards the other singularity or to a new common one)?
{ "domain": "physics.stackexchange", "id": 84860, "lm_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, general-relativity, gravity, black-holes", "url": null }
### Show Tags 28 Oct 2010, 17:10 9 This post was BOOKMARKED 00:00 Difficulty: 25% (medium) Question Stats: 67% (00:44) correct 33% (00:55) wrong based on 385 sessions ### HideShow timer Statistics 2,600 has how many positive divisors? A. 6 B. 12 C. 18 D. 24 E. 48 [Reveal] Spoiler: OA _________________ I'm the Dumbest of All !! Intern Joined: 26 Sep 2010 Posts: 11 ### Show Tags 28 Oct 2010, 17:21 1 KUDOS By factorization, you can write 2600 as 2600=2^3*5^2*13^1. Number of factors = (3+1)(2+1)(1+1)=24 Manager Joined: 03 Jun 2010 Posts: 156 Location: United States (MI) Concentration: Marketing, General Management ### Show Tags 29 Oct 2010, 02:47 vgan4 wrote: Number of factors = (3+1)(2+1)(1+1)=24 can' t understand how we came to this. What does this multiplication mean? Math Expert Joined: 02 Sep 2009 Posts: 44351 ### Show Tags 29 Oct 2010, 03:11 2 KUDOS Expert's post 6 This post was BOOKMARKED ulm wrote: vgan4 wrote: Number of factors = (3+1)(2+1)(1+1)=24
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8558511414521923, "lm_q2_score": 0.8558511414521923, "openwebmath_perplexity": 6310.0483855513685, "openwebmath_score": 0.8318807482719421, "tags": null, "url": "https://gmatclub.com/forum/2-600-has-how-many-positive-divisors-103880.html" }
classification, regression, algorithms Title: Classification vs Regression Algorithms - Should exists algorithms only for Classification and/or Regression Dummy question: There exists algorithms that should only be used for Classification or Regression problems? For example, should Random Forest should only be apply on Classification problems and Neural Networks for Regression problems? Thank you for your time :) Well you can think of a regression as being a classification with a very large number of ordinal classes, therefore algorithms can be used for both. Indeed you can build a regression with a random forest, and a neural network can be used both as a regressor or a classifier depending on the activation function of its output layer.
{ "domain": "datascience.stackexchange", "id": 4100, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classification, regression, algorithms", "url": null }
cellular-respiration, fermentation Part of the discrepancy in definition may be the emphasis on the end-product of the fermentation — ethanol fermentation, lactic acid fermentation etc. However, it seems clear to me that the fermentation is the whole chain of metabolic events from sugar (or whatever) to alcohol (or whatever); and if glycolysis is part of that process (which it is in this example) then glycolysis is part of the fermentation. (Of course, glycolysis can occur in other circumstances where the product, pyruvate, is oxidised in the tricarboxylic acid cycle, which is not a fermentation process.) Footnote
{ "domain": "biology.stackexchange", "id": 6618, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cellular-respiration, fermentation", "url": null }
2) If parallel lines cut by transversal, then coresponding angles congruent 3) Vertical angles are congruent 4) Transitive property 5) Given 6) Coresponding Angles 7) Transitive property 111m andrlls Angles 9 and 6 are supplementary Statements 5) r IIS L L 16 7) L 16 Example: Given : Prove: Statements 1) r IIS Reasons 1) Given In this lesson you will see that it is a way to prove that multiple lines are parallel. The Parallel Lines Property changes = to jj. Since K 1 ||K 3 and K 3 ||K 4, again by transitive property, it follows that K 1 ||K 4. followin. Because,,, a f b f c f and, d f by the Lines Perpendicular to a Transversal Theorem (Thm. 3.3. Given 17. Since AB and CD are parallel and CD and EF are parallel you can use the transitive property to prove that AB and EF are parallel. 3.12) and the Transitive Property of Parallel Lines (Thm. Alternate Interior Angles Theorem. The transitive property states that if a=b and b=c then a=c. You will be quizzed on the relationship between
{ "domain": "dnmmagazine.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769056853638, "lm_q1q2_score": 0.8171626860372323, "lm_q2_score": 0.8376199572530449, "openwebmath_perplexity": 1076.1585395866668, "openwebmath_score": 0.3702206313610077, "tags": null, "url": "http://dnmmagazine.com/axa-travel-iabyn/c7cb85-transitive-property-of-parallel-lines" }
reinforcement-learning, q-learning, state-spaces It is easy to solve this problem if the gridworld is constant. I have a huge problem to even start thinking about it if gridworld is random in every learning episode (random fields and random size) and also random in testing. How should I define it (especially state space)? How should I create q table? I'm using Python. Thank you in advance for any help. From your linked description of the game, we can see it has a key property when used normally in AI teaching:
{ "domain": "ai.stackexchange", "id": 2691, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, q-learning, state-spaces", "url": null }
quantum-mechanics, energy, wavefunction, path-integral, discrete Suppose that those postulates are as natural as it can be, i.e. they aren't a distilled version of something more elementary. If this is the case, then how to explain, in layman's terms, that how the discrete energy levels in, e.g. the harmonic oscillator arise from those two postulates? Are there qualitative answers? I'm not sure what you expect for qualitative examples in "layman's terms". The time-evolution amplitude from one point to another, $$\langle x_f|U(T)|x_i\rangle=K(x_f,x_i;T)~,$$ evaluated from the path integral is the propagator, which, for the oscillator, happens to be the celebrated 1866 Mehler kernel: a causal Green's function of the oscillator equation. Not coincidentally, this was available 60 years before QM. The point being that the path integral propagator is mostly classical. The quantization of energy levels is actually a feature of the compact time domain, as @Qmechanic comments.
{ "domain": "physics.stackexchange", "id": 47886, "lm_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, energy, wavefunction, path-integral, discrete", "url": null }
ros, ethzasl-ptam Comment by Cerin on 2015-05-29: Also, what brand of graphics card do you have? I had similar issues with Nvidia that I was able to sort out, but it took a lot of trial and error. Do you get to the login screen, or does even that not load? Comment by aland_t on 2015-05-29: I can try the catkin reinstall next time I'm at work. Today has been such a headache I may not go in tomorrow. Comment by aland_t on 2015-05-29: I have an Nvidia graphics card, and I get the login screen. When I login I receive an error message saying something went wrong and I should report the error. After clicking, or not, I can move the mouse but there are no icons and keyboard commands and mouse clicks do nothing. Comment by aland_t on 2015-06-01: I ran dpkg -S /opt/ros/indigo/bin/catkin_make, and it ouput ros-indigo-catkin: /opt/ros/indigo/bin/catkin_make. So I reinstalled and ran catkin make. It responds catkin_make: command not found Comment by Cerin on 2015-06-01:
{ "domain": "robotics.stackexchange", "id": 21781, "lm_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, ethzasl-ptam", "url": null }
python, neural-network, scikit-learn, rmse def MLPreg(x_train, y_train):# nn,nl,a,s,learn,learn_in,max_i=MLP()#nl, act=['identity', 'logistic', 'relu','tanh'] #'identity'=Linear activ=act[a] sol=['lbfgs', 'sgd', 'adam'] solv=sol[s] l_r=['constant','invscaling','adaptive'] lr=l_r[learn] model = MLPRegressor(hidden_layer_sizes=(nl,nn), activation=activ, solver=solv, alpha=0.00001, batch_size='auto', learning_rate=lr, learning_rate_init=learn_in, power_t=0.5, max_iter=max_i, shuffle=True, random_state=None, tol=0.0001, verbose=False, warm_start=False, momentum=0.9, nesterovs_momentum=True, early_stopping=False, validation_fraction=0.1, beta_1=0.9, beta_2=0.999, epsilon=1e-08, n_iter_no_change=10, max_fun=15000) # model = MLPRegressor(max_iter = 7000) # param_list = {"hidden_layer_sizes": [(10,),(50,)], "activation": ["identity", "tanh", "relu"], "solver": ["lbfgs", "sgd", "adam"], "alpha": [0.00005,0.0005]}
{ "domain": "datascience.stackexchange", "id": 10082, "lm_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, neural-network, scikit-learn, rmse", "url": null }
$${g_1}:{\{1,2,3,4,5\}}\to{\{a,b,c,d,e\}}$$; $$g_1(1)=b$$, $$g_1(2)=b$$, $$g_1(3)=b$$, $$g_1(4)=a$$, $$g_1(5)=d$$, $${g_2}:{\{1,2,3,4,5\}}\to{\{a,b,c,d,e\}}$$; $$g_2(1)=d$$, $$g_2(2)=b$$, $$g_2(3)=e$$, $$g_2(4)=a$$, $$g_2(5)=c$$. Better yet: include the notation $$f(x)$$ or $$f(C)$$ in the discussion. I thought the way to check one to one is to graph it and see if anything intersects at two points in the graph, but that doesn't really help me if I have to write a formal proof without knowing what the graph looks like. Any function induces a surjection by restricting its co Unless otherwise noted, LibreTexts content is licensed by CC BY-NC-SA 3.0. (a) Not onto (b) Not onto (c) Onto (d) Not onto . Is it possible for a function from $$\{1,2\}$$ to $$\{a,b,c,d\}$$ to be onto? That is, f (A) = B. FUNCTIONS A function f from X to Y is onto (or surjective ), if and only if for every element yÐY there is an element xÐX with f(x)=y. If f is one-to-one but not onto, replacing the target set of
{ "domain": "asiel-dier.nl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399060540358, "lm_q1q2_score": 0.8021087692704901, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 366.96877971480524, "openwebmath_score": 0.8402517437934875, "tags": null, "url": "http://asiel-dier.nl/elsuh0/8ab49b-onto-function-proof" }
phase, beamforming If so, will a simple filter be good enough to correct this issue to transform the signal into a narrowband one? My suspicion is that you can only perform phase shift beamforming techniques on narrowband signals and will not work even if you are looking for a narrowband within a wideband signal. Am I correct?
{ "domain": "dsp.stackexchange", "id": 4162, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "phase, beamforming", "url": null }
sampling, phase, measurement Is this possible? Should I use a PLL or a FFT based approach? The achievable rms accuracy is approximately the reciprocal of the SNR as an rms quantity, specifically $10^{-35/20}$ in your case assuming the small angle criteria, if your noise is all phase noise. It is likely your SNR is equally phase and amplitude noise, so the phase result as limited by your noise would be 3 dB better after hard limiting the signal to eliminate the AM component. I linked other posts that include multiple variants for phase detector implementations, depending on if you have a complex or real representation of the signal. The simple approach is to hard limit the signals (as most phase detectors are sensitive to AM) and then use a multiplier. The output of a linear multiplier is proportional to the cosine of the phase angle between the two inputs. Phase Detectors: Phase synchronization in BPSK Phase Detection for complex signals: How to correct the phase offset for QPSK I-Q data
{ "domain": "dsp.stackexchange", "id": 8442, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sampling, phase, measurement", "url": null }
go func RunLengthDecode(s string) string { d := make([]byte, 0, len(s)) for i := 0; i < len(s); i++ { n := 0 for ; i < len(s) && (s[i] >= '0' && s[i] <= '9'); i++ { n = 10*n + int(s[i]-'0') } if i < len(s) { c := s[i] for ; n > 1; n-- { d = append(d, c) } d = append(d, c) } } return string(d) } baduker run_length_encoding.go: package encode import ( "strconv" "strings" "unicode" ) type runLength struct { enc, dec func(string) string }
{ "domain": "codereview.stackexchange", "id": 37639, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "go", "url": null }
TZF6[n_, r_] := IntegerDigits[Factorial[n], r] // SplitBy[#, 1] & // If[Part[#, -1][[1]] == 0, Length[Part[#, -1]], 0] & Let's see if these agree to iron out obvious mistakes by feeding random samples. But beware, the factorial is still dangerous and will exhaust your physical memory if you throw in too big numbers or too small radices. Table[{n = RandomInteger[10000], r = RandomInteger[{5, 30}], TZF4[n, r], TZF5[n, r], TZF6[n, r]}, 10] // TableForm Table[{n = RandomInteger[10000], TZF1[n], TZF2[n], TZF3[n], TZF4[n, 10], TZF5[n, 10], TZF6[n, 10]}, 10] // TableForm In order to get asymptotic values of the trailing zeros you now need to divide n by $(p-1) k$. You have to do this only with the prime factor that results in the largest value of $(p-1) k$ of course. Then you round down again and you will be mostly very accurate. So let's do an example: TZF5[10000, 72] 2498
{ "domain": "wolfram.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765616345254, "lm_q1q2_score": 0.8269974190579006, "lm_q2_score": 0.8438951005915208, "openwebmath_perplexity": 1811.9582054952973, "openwebmath_score": 0.3515464961528778, "tags": null, "url": "https://community.wolfram.com/groups/-/m/t/1670775?sortMsg=Replies" }
This problem can be reduced to solving $$x_1 + x_2 + x_3 = 15, \quad 0 \leq x_i \leq 9, \quad x_1 \neq 0, \quad x_1 \neq 9$$ First, we solve $$x_1 + x_2 + x_3 = 15, \quad 0 \leq x_i \leq 15$$ This is a standard stars and bars problem, with solution $\binom{15+3-1}{15} = 136$. Now which solutions are wrong? Well, first of all those with one of them above $10$. But if, say, $x_1 \geq 10$, then we can write $x_1' = x_1 - 10$ and $x_2' = x_2, x_3' = x_3$ to reduce the problem to $$x_1' + x_2' + x_3' = 5, \quad 0 \leq x_i' \leq 5$$ This is again a standard stars and bars problem, with solution $\binom{5+3-1}{5} = 21$. Since exactly one of $x_1,x_2,x_3$ could be above $10$, this gives $3 \cdot 21 = 63$ wrong solutions in total. So there are $136 - 63 = 73$ solutions to $$x_1 + x_2 + x_3 = 15, \quad 0 \leq x_i \leq 9$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713896101314, "lm_q1q2_score": 0.800894916281068, "lm_q2_score": 0.8128673223709251, "openwebmath_perplexity": 298.91895205589947, "openwebmath_score": 0.7786318063735962, "tags": null, "url": "http://math.stackexchange.com/questions/65934/how-many-numbers-between-100-and-900-have-sum-of-their-digits-equal-to-15" }
c++, linux, embedded perror("Error on I/O - ioctl"); return -1; }
{ "domain": "codereview.stackexchange", "id": 28554, "lm_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++, linux, embedded", "url": null }
radiation, antimatter, explosions It is not true that most of the energy goes into radiation, it goes into creating particles, with an average multiplicity for annihilation at rest of about five charged particles. The interaction is strong and gluon mediated, the photons produced come from pi0 decays, direct photons are a higher order effect. Thus one gets an "explosion" as this image shows, once one obtains large numbers of such annihilations in a small space
{ "domain": "physics.stackexchange", "id": 98619, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "radiation, antimatter, explosions", "url": null }
• Right. This rotundity property is called "curvature." mathworld.wolfram.com/Curvature.html – mjw Mar 22 '20 at 4:26 • Please see this posting for the curvature of an ellipse at a point $(x,y)$. math.stackexchange.com/questions/1451959/curvature-of-ellipse – mjw Mar 22 '20 at 4:32 • @mjw I come from a functional/convex analysis background; I was more referring to rotund norms/balls. It's a less fine tool than curvature, but I think it should do the trick, in principle. Mar 22 '20 at 5:08
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759649262344, "lm_q1q2_score": 0.821601293751994, "lm_q2_score": 0.8376199673867852, "openwebmath_perplexity": 150.8206396090065, "openwebmath_score": 0.9048778414726257, "tags": null, "url": "https://math.stackexchange.com/questions/3584946/minimal-distance-from-arbitrary-point-to-ellipse-as-the-point-goes-to-infinity" }
c++, simulation, c++14 Instruction("CALL","1110 xxxx xxxx xxxx","call a procedure",[](Regs &r, uint16_t &x){r.sp = r.sp - 1; r.m(r.sp) = r.pc; r.pc = x;}), Instruction("PSHI","1111 0000 0000 0000","push indirect", [](Regs &r, uint16_t &){r.sp = r.sp - 1; r.m(r.sp) = r.m(r.ac);}), Instruction("POPI","1111 0010 0000 0000","pop indirect", [](Regs &r, uint16_t &){r.m(r.ac) = r.m(r.sp++);}), Instruction("PUSH","1111 0100 0000 0000","push onto stack", [](Regs &r, uint16_t &){r.m(--r.sp) = r.ac;}), Instruction("POP ","1111 0110 0000 0000","pop from stack", [](Regs &r, uint16_t &){r.ac = r.m(r.sp); r.sp++;}), Instruction("RETN","1111 1000 0000 0000","return from a procedure",[](Regs &r, uint16_t &){r.pc = r.m(r.sp++);}), Instruction("SWAP","1111 1010 0000 0000","swap ac and sp", [](Regs &r, uint16_t &){std::swap(r.ac, r.sp);}), Instruction("INSP","1111 1100 yyyy yyyy","increment sp", [](Regs &r, uint16_t &x){r.sp += (x & 0xff);}),
{ "domain": "codereview.stackexchange", "id": 17608, "lm_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++, simulation, c++14", "url": null }
That is, taking $u_n = 2$, for all $n\geq 1$, we have that $2 F_{n+1}- 2 F_{n}= 2 F_{n-1}\geq F_{n}$, for all $n\geq 2$. As so, by the Kummer's test, the sequence $(1/F_n)$ is summable.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918512747192, "lm_q1q2_score": 0.8623082598684911, "lm_q2_score": 0.8723473630627235, "openwebmath_perplexity": 147.92625183512038, "openwebmath_score": 0.9272570013999939, "tags": null, "url": "https://math.stackexchange.com/questions/2293885/sum-of-reciprocals-of-fibonacci-numbers-convergence" }
python, ros-melodic if __name__ == "__main__": read_map_service() I have confirmed the structure of the service object by running rossrv show nav_msgs/GetMap and getting the following: --- nav_msgs/OccupancyGrid map std_msgs/Header header uint32 seq time stamp string frame_id nav_msgs/MapMetaData info time map_load_time float32 resolution uint32 width uint32 height geometry_msgs/Pose origin geometry_msgs/Point position float64 x float64 y float64 z geometry_msgs/Quaternion orientation float64 x float64 y float64 z float64 w int8[] data I would appreciate help in understanding what I'm doing wrong or missing here. Originally posted by sisko on ROS Answers with karma: 247 on 2020-12-30 Post score: 0 def print_map_data(req): print "Returning [%s]"%(req.info.resolution)
{ "domain": "robotics.stackexchange", "id": 35921, "lm_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, ros-melodic", "url": null }
electromagnetism, optics, waves, waveguide Title: Why does the attenuation constant not affect the wavelength? Reference: https://en.wikipedia.org/wiki/Propagation_constant#Phase_constant Let's say I have a propagation constant ($\gamma$), where $jk_z = \gamma = \alpha +j \beta$. Why does the attenuation constant have no role in determining the wavelength, especially in a waveguide where TE/TM modes exists peacefully? Background According to the reference we can write wavelength as $\lambda = \frac{2 \pi}{Im\{ \gamma \}}$ (see reference) Constant equation in a waveguide is $\gamma ^2 = h_{cut}^2 - k^2$
{ "domain": "physics.stackexchange", "id": 92840, "lm_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, optics, waves, waveguide", "url": null }
image-processing Label a lot of data and use deep learning. Background requirement - high, expected quality - high, efforts - high If you never heard of deep learning or need to produce results in several days, forget about this approach. In contrast, if you already have many labeled data, and has a power GPU, you should definitely try. In general, you need to prepare positive and negative patches, and feed them to a convolution neural network to learn feature extraction and classification jointly. Read some CNN tutorials and learn enough before you get start. It may takes several days or even weeks to learn deep learning from scratch. Data labelling also time consuming and may need at least several thounsands samples, an ideal number of training samples could be several millions. In addition, even with a powerful GPU, this training stage may still last several days. Hence, you will pay a lot for deep learning, but this also means you probably will get more.
{ "domain": "dsp.stackexchange", "id": 4067, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing", "url": null }