text
stringlengths
1
1.11k
source
dict
java, beginner, recursion /** * A simple class that solves a Sudoky. * @author Luke Kelly * @version 1.0 */ class SudokuSolver { /** * Solves the given Sudoku, preconditions: * 1. Empty space is reperesnted by 0s. * 2. The sudoku is not already invalid(No duplicates in a row, colum, or 3x3 box,except zeros). * 3. The sudoku is a normal 9x9 sudoku. * @return a solved sudoku is the sudoku is solvable, null if not. */ public static int[][] solveSudoku(int[][] original) { //Clone the original so I don't change the original array int[][] workingSudoku = cloneSudoku(original); //Find all the emtpy indexes in the array, this simplifes the algorithm. Stack<Integer[]> allEmtpyIndexes = findAllEmptySpaces(workingSudoku); //Solve it, if they method returns false the sudoku is unsolvable. if(solveSudoku(workingSudoku, allEmtpyIndexes)){ return workingSudoku; }else{ return null; } }
{ "domain": "codereview.stackexchange", "id": 36983, "lm_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, beginner, recursion", "url": null }
trees, combinatorics, counting The tree below has code (with subscripts that count position in the string and superscript which is the inorder label associated to the root of the corresponding subtree) $U_1^3 U_2^1 D_3^1 U_4^2 D_5^2 D_6^3 U_7^{10} U_8^6 U_9^4 D_{10}^4 U_{11}^5 D_{12}^5 D_{13}^6 U_{14}^8 U_{15}^7 D_{16}^7 D_{17}^8 U_{18}^9 D_{19}^9 D_{20}^{10} U_{21}^{11} D_{22}^{11}$.
{ "domain": "cs.stackexchange", "id": 17993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "trees, combinatorics, counting", "url": null }
machine-learning, neural-network, optimization, gradient-descent, hyperparameter Having clarified the above, it should be easy to see that a in your example above is a hyperparameter and not a parameter; as such, it would normally be optimized using grid search.
{ "domain": "datascience.stackexchange", "id": 6263, "lm_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, neural-network, optimization, gradient-descent, hyperparameter", "url": null }
If our mask didn’t have the bold bit set ( only the italic one ), our mask would be 0010. An AND between 0010 AND 0001 is false ( they have no bit set to 1 in common ) and the result is 0 aka false. So let’s create a function for that too! # Conclusion With a little knowledge about binary numbers and bitwise operations, we can easily set, add, remove and check various font styles in SDL_TTF. Since it does involve a little low level code, I made a simple class that does the apparitions for us in a more intuitive way. I strongly suggest using this opposed to “raw” TTF_Fount* Feel free to comment if you have anything to say or ask questions if anything is unclear. I always appreciate getting comments. You can also email me : olevegard@headerphile.com # Rendering text In the previous parts, we’ve look at how to render rectangles and images, both with and without transparency. Now it’s time to look at how we can render text.
{ "domain": "headerphile.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9893474901025369, "lm_q1q2_score": 0.804208231718864, "lm_q2_score": 0.8128673087708699, "openwebmath_perplexity": 853.2340588705124, "openwebmath_score": 0.5163815021514893, "tags": null, "url": "http://headerphile.com/tag/sdl/" }
botany, reproduction But, still, isn't this the same sentence using another words? Thanks for answering. The difference is that they come from different scientific traditions and describe the same idea for different kinds of organisms. Homothallic is applied to fungi and algae, whilst monoecious is applied to plants (and sometimes invertebrates). This use of different words to describe the same phenomena in different types of organisms is unfortunately quite common. You could also had hermaphrodite as another example for organisms with both male and female reproductive parts. One can point to crude phenotypic differences to justify the distinction in terms but the underlying concepts are the same. I note as well that the separation into different types of organism used is usually based on older classification systems rather than reflecting any biological reality.
{ "domain": "biology.stackexchange", "id": 9447, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "botany, reproduction", "url": null }
python, beginner, python-2.x, number-guessing-game def play_game(user_name, maximum_attempts=7): """ Play a number-guessing game. Return True if the number is guessed correctly within the allotted attempts. """ random_number = random.randrange(1,21) print "Hello %s, I'm thinking of a number between 1 and 20." % (user_name) user_number = None for remaining_attempts in range(maximum_attempts, 0, -1): prompt = ("Take a guess." if user_number is None else "A bit lower ..." if user_number > random_number else "A bit higher ...") user_number = int(raw_input(prompt + "\n")) if user_number == random_number: print "Well done %s, You beat me!" % (user_name) return True print "You have %d lives left." % (remaining_attempts - 1) else: print "Sorry %s, You lost!" % (user_name) return False
{ "domain": "codereview.stackexchange", "id": 19575, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-2.x, number-guessing-game", "url": null }
spacetime, time, universe, big-bang, time-dilation Para 3b) by the tie we got to the location of the big bang its earlier epochs would be over; light from its earlier moments would have long since departed and could not be viewed from this position. I have only been able to make a brief summary in these areas which likely means there is some ambiguity in the words used - suffice to say a lot of reading around Relativity and cosmology will give you "proper" answers in time. (assuming, you know, you have enough... (attempt at humour))
{ "domain": "physics.stackexchange", "id": 38745, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spacetime, time, universe, big-bang, time-dilation", "url": null }
general-relativity, spacetime, elementary-particles On the other hand, let us think about the non-gravitational interactions. GR deals really well with gravity, but we still know the Universe has electromagnetic, strong, and weak interactions. As I mentioned, we can incorporate Classical Electromagnetism within GR, but we also know things should behave according to the laws of Quantum Mechanics. We know how to describe the non-gravitational interactions in accordance with QM: we use a framework known as Quantum Field Theory (QFT). The quantum field theory describing Electromagnetism in the quantum level is what we call Quantum Electrodynamics, and it does not incorporate the weak interaction in its description. However, nowadays we also know how to describe weak and strong interactions by similar means and we have a quantum field theory that describes all the known non-gravitational interactions: it is known as the Standard Model of Particle Physics, or just Standard Model.
{ "domain": "physics.stackexchange", "id": 81691, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, spacetime, elementary-particles", "url": null }
java, performance, swing, floating-point, fractals @Override public String toString() { return real + " + " + complex + "i"; } } This is a great project to do. I did a similar project in Swing; except using Clojure's Seesaw wrapper library. You can add many interesting add-on panels to it. My favorite panels that I came up with were a panel that lets the user decide how they want things colored, and one that allowed multiple images to be saved to disk in parallel. It was a great lesson in handling complex async processes. They're worth considering trying. Anyways, onto some suggestions: diverges can be made much more interesting if you allow it to return the i value that it fails at. This allows you to color your pixels based on the returned value of i, which adds a whole new dimension to what you can produce. This is my favorite image that I've ever produced (linking externally because it's 80 MB large; it's just my Google Drive. It's safe I swear!). Here's a tiny sample of it:
{ "domain": "codereview.stackexchange", "id": 34886, "lm_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, swing, floating-point, fractals", "url": null }
evolution, human-evolution, adaptation Title: Why aren't there any transitional animals today? You have probably heard this question before and in different formats. Usually, it is used as a "proof" to disprove the theory of evolution.
{ "domain": "biology.stackexchange", "id": 5722, "lm_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, human-evolution, adaptation", "url": null }
catkin, macbook, ros-hydro, gradle, rosjava Originally posted by heyfred on ROS Answers with karma: 122 on 2013-12-20 Post score: 3 If you need to install ros in the simplest way, then I suggest getting a virtual machine and install ubuntu on it and install ros in there. As for OSX, it is definitely possible, but count on it to take some time and some searching through the web for solutions to compile errors and such when building ROS. If you do want to go through with it, this'd be a good place to start: http://wiki.ros.org/hydro/Installation/OSX/Homebrew/Source Originally posted by Hansg91 with karma: 1909 on 2013-12-21 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 16507, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin, macbook, ros-hydro, gradle, rosjava", "url": null }
c++, beginner, array, primes, sieve-of-eratosthenes The trouble here is I don't know who owns the pointer that is returned. Is it a pointer to a static array. Is it dynamically allocated. There is no way to know from the language level based on reading that interface. In C++ it could look like this (probably not but steering clear of vector for you). std::unique_ptr<std::size_t[]> prime_sieve(std::size_t limit);
{ "domain": "codereview.stackexchange", "id": 24760, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, array, primes, sieve-of-eratosthenes", "url": null }
human-biology, human-physiology, sleep consciously aware of yourself and your surroundings while you are also unconsciously moving about, outside of your conscious control. because the intrusion of sleep paralysis would in fact lead to muscle atonia and prevent one moving about. This is not to say that terrible things have not occurred where muscle atonia has failed while the subject remains asleep/unconscious; this falls under the fascinating category of REM-behavior disorders (where people act our their dreams - including violently hurting themselves and their partners), which judging by your question I think you will find interesting! [Ref. 4]. References: [Ref. 1]: sleep stages [Ref. 2]: sleep paralysis [Ref. 3]: muscle atonia [Ref. 4]: rem-behavior disorder
{ "domain": "biology.stackexchange", "id": 7967, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, human-physiology, sleep", "url": null }
electromagnetism, thermodynamics, electricity, electric-current Title: What happens in a tightly wound up cable reel under AC power? This question came up when I used our vacuum cleaner (230 V, 50 Hz AC, 1 kW) without pulling out most of the cable, i.e. about 8 meters were still wrapped around a small cable reel (maybe 5-10 cm diameter) inside the device. I got told this should be avoided because the cable might produce an electromagnetic field or heat up strongly when it's wound up like that. Is this true? Would it be dangerous to operate a device consuming much AC power with a tightly wound up cable? What could happen worst-case and how high power consumption would be needed to expect any effect? Or is that just a myth? A typical (cheap) extension reel (10 metres, 10 amps) has the following specifications: Uncoiled 2400W (10 A) 240 V Coiled 720 W (3 A) 240 V The reel had 4 sockets and a 13 A fuse in the mains plug. Measuring the lead resistances I found them to be approximately $0.3 \; \Omega$ and $0.4 \; \Omega$ so a total of $0.7 \Omega$.
{ "domain": "physics.stackexchange", "id": 33927, "lm_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, thermodynamics, electricity, electric-current", "url": null }
java, algorithm, game, recursion, tower-of-hanoi I have taken your code, and restructured it using the ideas I have shown above. This is closer to something that I would consider readable. Note, I have not changed the algorithm at all: import java.util.ArrayList; import java.util.EnumMap; import java.util.List;
{ "domain": "codereview.stackexchange", "id": 6034, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, game, recursion, tower-of-hanoi", "url": null }
algorithms, linear-algebra, randomized Title: Why is the probability of a false positive not 0 for Freivald's Algorithm? Freivald's algorithm (see the wiki) is a randomized algorithm for verifying whether the product of two $n \times n$-matrices $A$ and $B$ yields a given matrix $C$ (i.e. $AB = C$). The way this task is accomplished is to introduce a random vector $\vec{v} \in \mathbb{R}^{n}$ and evaluate whether $$A(Bv) = Cv$$ The claim is that if $AB \neq C$, then $AB v = Cv$ with probability at most $1/2$, and they provide a justification. Their argument for why 1/2 works makes some sense to me. What I don't understand is why this bound can't be improved further by the following argument: Claim: Suppose that $AB \neq C$. Then for almost all choices of $v$ (i.e. with probability $1$), $AB v \neq Cv$.
{ "domain": "cs.stackexchange", "id": 18668, "lm_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, linear-algebra, randomized", "url": null }
machine-learning, clustering, data-mining, predictive-modeling, k-means Note that normalization depends on the dimensional reduction algorithm you are using. UMAP wouldn't require data normalisation, whereas t-SNE or PCA requires it. https://towardsdatascience.com/tsne-vs-umap-global-structure-4d8045acba17 Finally, clusters' interpretation should be backed by actual proofs: even if algorithms are often very efficient in clustering data, it is crucial to add indicators to check if the data has been well distributed (for instance comparing mean or standard deviation values between clusters). In some cases, if the raw data have a too wide distribution, it could be interesting to apply a log but you might loss information.
{ "domain": "datascience.stackexchange", "id": 10845, "lm_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, clustering, data-mining, predictive-modeling, k-means", "url": null }
Then we include the leading term into the sum and utilize a well-known trigonometric identity $$\sin(a)\sin(b)=\tfrac 12(\cos(a-b)-\cos(a+b))$$ to transform products into sums: $$LHS = \sum\limits_{m=0}^{N-1} \left(\sin(x/2) \sin((m+\tfrac{1}{2})x)\right) =$$ $$\frac 12\,\sum\limits_{m=0}^{N-1} \left(\cos(x/2 - (m+\tfrac{1}{2})x) - \cos(x/2 + (m+\tfrac{1}{2})x)\right) =$$ $$\frac 12\,\sum\limits_{m=0}^{N-1} \left(\cos(-mx) - \cos((m+1)x)\right) =$$ $$\frac 12\,\sum\limits_{m=0}^{N-1} \left(\cos(mx) - \cos((m+1)x)\right)$$ The second term of each sum cancels the first term of the next sum, and the whole sum telescopes so that only the first and last terms remain: $$= \frac 12\, \left(\cos(0x) - \cos(Nx)\right) =$$ which we transform back into a product by the same identity mentioned above: $$= \sin(Nx/2)\sin(Nx/2) = \sin^2(Nx/2) = RHS.$$ Q.E.D. • This is an interesting approach! – mjw Mar 4 at 21:50 One way: Recall that$$\sin p = \frac{1}{2i}[e^{ip}-e^{-ip}]$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109102866639, "lm_q1q2_score": 0.8202439947940664, "lm_q2_score": 0.8289388083214156, "openwebmath_perplexity": 246.76141820220002, "openwebmath_score": 0.9099003076553345, "tags": null, "url": "https://math.stackexchange.com/questions/4049262/proof-explanation-for-a-sum-of-sines" }
formal-languages, automata, finite-automata I would build a NFA. That NFA must have exactly one starting state and one end state, where the starting state is never the end state. The amount of characters of the given language equals the amount of states of the NFA +1. Every state except for the end state has an (outgoing) arrow to the next state where every single character of the language occurs exactly once (ordered aka one after the other). If the language is made up of just one character, do: The end state has an outgoing arrow to itself with that one character of the language. Else do: The end state has an outgoing arrow to the second state (I mean that state where the starting state points at) with the first character of the language. Here is an example: Given is language (aba)^+ where ^+ means exponent + The NFA for this language would look like this ("Beispiel" means example):
{ "domain": "cs.stackexchange", "id": 10090, "lm_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, automata, finite-automata", "url": null }
formal-languages, regular-languages, closure-properties Title: Why proving that two languages used to merge into a regular language are not necessarily regular isn't possible with closure properties? Let $L$ be a regular language over alphabet $\Sigma$. $L$ is the result of merging $2$ languages letter by letter that is for $a_1a_2...a_n\in L_1, b_1b_2...b_n\in L_2, L=a_1b_1a_2b_2...a_nb_n$. $\epsilon \in L \iff\epsilon \in L_1,L_2$. Does this mean that $L_1$ is necessarily regular?
{ "domain": "cs.stackexchange", "id": 13160, "lm_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, closure-properties", "url": null }
electronic-band-theory, fermi-liquids One way to do that kind of exploration is to go where the math takes you, while trying hard not to make judgment calls that are instead based on what is most familiar. For example, is momentum space a "real" space? Both because it is not the space we see in everyday life, and because it can always interpreted as nothing more than a Fourier transform of what we see in xyz space, the deeply biological reflex is to say "no, of course momentum space is not 'real' ").
{ "domain": "physics.stackexchange", "id": 31091, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electronic-band-theory, fermi-liquids", "url": null }
diffraction, shadow (Aside: It occurs to me that the finite angular size of the sun may be significant for this effect. I suspect the same would be true of a point source, but I haven't investigated this yet.) My questions are: Does this effect have a name, and can someone point me to a mathematical analysis of it? I would expect such a basic phenomenon would have been analyzed long ago, but when I try to search for it I just find a bunch of papers on CGI shadows (not what I want). (Of course, if no one has done the analysis on this, please tell me, and I'll gladly be the first :)
{ "domain": "physics.stackexchange", "id": 89743, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "diffraction, shadow", "url": null }
keras Title: Is there an implementation of pocket algorithm in Keras? As explained in Wikipedia, the pocket algorithm is a very simple variant/addition of/to ANN which keeps a copy of the best model seen so far and returns that one as the trained model (instead of the actual final state of the model). Implementing it is very simple and straightforward. I was wondering if this algorithm is implemented in Keras. Yes this is usually part of the early stopping algorithm, where you supply a cross-validation data set, and a limit on number of epochs since best result so far. In Keras, you can use an instance of the EarlyStopping class, choosing the metric that you want the best model for, and setting the patience parameter to limit the number of epochs to test after any best so far result. The instance is supplied to the fit method as a callback. See http://parneetk.github.io/blog/neural-networks-in-keras/ for an example (last section)
{ "domain": "datascience.stackexchange", "id": 3580, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "keras", "url": null }
Which persons join which group? Use a truth table to find out. Here is my solution: (a) a -> b (b) ¬(b ^ c) (c) a -> ¬c (d) (a ^ b) xor (a ^ c) I don't think the solutions are correct. What do you think what changes should I make? How to find out which persons join which group using the truth table? Thank you :)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561712637256, "lm_q1q2_score": 0.8031224779950344, "lm_q2_score": 0.828938806208442, "openwebmath_perplexity": 735.7252099056665, "openwebmath_score": 0.505609929561615, "tags": null, "url": "https://math.stackexchange.com/questions/2489411/converting-text-to-propositional-logic-and-use-the-truth-table-to-find-the-solut" }
(2) The group must have exponent two: Otherwise, the map sending an element to its inverse, would be a nontrivial automorphism. In particular, it is an elementary Abelian group, or is a vector space. (3) The group must be one-dimensional as a vector space, otherwise it will have other automorphisms (the general linear group on a vector space of dimension greater than one, is nontrivial) - Is there a way to check if isomorphism is unique? – jevie Jul 22 '14 at 4:42 Yes, by my second comment, an isomorphism is unique, iff the automorphism group of $G$ is trivial. – Adam Hughes Jul 22 '14 at 4:43 ...which almost never happens. @jevie – Micah Jul 22 '14 at 4:45 haha, yes, I should have included that in the answer since it's so simple. Thanks for mentioning it @Micah – Adam Hughes Jul 22 '14 at 4:48 This was the faster answer, and with the inclusion of that last proof, I'd probably have accepted it over mine myself. – JHance Jul 22 '14 at 5:19
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471689667877, "lm_q1q2_score": 0.8066497417230386, "lm_q2_score": 0.819893340314393, "openwebmath_perplexity": 183.92537268388153, "openwebmath_score": 0.9759756326675415, "tags": null, "url": "http://math.stackexchange.com/questions/874419/is-isomorphism-not-always-unique" }
cosmology, resource-recommendations, space-expansion, dark-matter, cosmological-constant The picture from your question: isn't numerically accurate. There's too much outward flaring at the top given that the top edge is supposed to represent the present time, according to the arrow on the left. The scale factor wasn't nearly that large in the CMB era, and the way the CMB map is shown to "fill" the cone makes no sense. Even drawing it as a ring on the cone would be wrong: it should be just two points when there's only one spatial dimension. And the way galaxies are drawn makes no sense—they should, of course, be lines/tubes, not isolated blobs. (And they're far too large.)
{ "domain": "physics.stackexchange", "id": 94497, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, resource-recommendations, space-expansion, dark-matter, cosmological-constant", "url": null }
follows: (* following Mathematica's parametrization for the hyergeometric case *) negativeHypergeometricDistribution[k_, m_, n_ ] := TransformedDistribution[ \[FormalX] + 1, \[FormalX] \[Distributed] BetaBinomialDistribution[ k, m, n-m ] ] (* unfortunately parametrization is no standardized so one has to dwelve into the formulae for this in the paper, which are given though *) nhg = negativeHypergeometricDistribution[ 1, 4, 52 ]; Mean @ nhg $\frac{53}{5}$And we can indeed convince ourselves that our case simply is a special case of a NHG-distributed random var$X$, where$X$is the number of draws from$N = 52$cards, where$M=4$are "successes" and where we need$k=1$success to stop: And @@ Table[ PDF[ analyticalDist, i ] === PDF[ nhg, i ], {i, 1, 52 } ] True ## EDIT: Decision Support / Expected Utility The OP has edited his question and asked for guidance in playing at a casino (e.g. what number of draws to bet on?). For this we have to turn to decision theory and excepted utility. Let's
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769085257165, "lm_q1q2_score": 0.8670525461196917, "lm_q2_score": 0.8887587831798665, "openwebmath_perplexity": 2416.923694968831, "openwebmath_score": 0.994888186454773, "tags": null, "url": "https://mathematica.stackexchange.com/questions/139605/mostellers-first-ace-problem" }
optics, fourier-transform, imaging Summary So we see that calculation under the two approaches results in different answers for the where the image is formed. I can't find a flaw in the reasoning of either approach so I am thoroughly confused. Can someone please help me resolve the paradox and let me know where I am going wrong? The only lead I have is that perhaps in this sort of imaging system the approximations necessary for the Fourier transforming property of the lens to hold true are not satisfied?
{ "domain": "physics.stackexchange", "id": 64414, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, fourier-transform, imaging", "url": null }
ros-kinetic I’ve tried re-downloading Whycon and repeating the entire process but that did not work. I’m not sure where I went wrong, but any help would be appreciated. Here's the whycon_ros file: C:\fakepath\1st part of whycon.JPG C:\fakepath\2nd part of whcon.JPG C:\fakepath\3rd part of whycon.JPG WHYCON_TRANSFORMS.YML file image_width: 640 image_height: 480 camera_name: narrow_stereo camera_matrix: rows: 3 cols: 3 data: [664.135327, 0, 343.103845, 0, 668.256661, 227.776189, 0, 0, 1] distortion_model: plumb_bob distortion_coefficients: rows: 1 cols: 5 data: [0.141424, -0.347581, 0.002344, 0.008555999999999999, 0] rectification_matrix: rows: 3 cols: 3 data: [1, 0, 0, 0, 1, 0, 0, 0, 1] projection_matrix: rows: 3 cols: 4 data: [672.257385, 0, 347.376007, 0, 0, 681.516541, 228.472198, 0, 0, 0, 1, 0] Originally posted by sdorman on ROS Answers with karma: 60 on 2018-05-04 Post score: 0
{ "domain": "robotics.stackexchange", "id": 30780, "lm_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 }
complexity-theory, p-vs-np, 3-sat Title: Could a modification of Krom's proof system be used to solve 3-SAT in polynomial time? A literal is a nonzero integer, and we define $\sim x = -x$. A clause is a nonempty set of literals. A CNF is a set of clauses. A K-rule is a pair $(F,C)$ where $F$ is a CNF and $C$ is a clause. A Krom-style proof system (KPS) is a set of K-rules. If $S$ is a KPS, then an $S$-proof of $C$ from $F$, or an $(S,F)$-proof of $C$, is a sequence $\langle C_1,..,C_n\rangle$ of clauses such that $C = C_n$ and for all $1\le i\le n$, either $C_i \in F$ or there is a K-rule $R = (G,A) \in S$ and a function $f : \{x,\sim x : x \in B \in G \lor x \in A\} \rightarrow \mathbb{Z}_{\ne 0}$ which respects negation such that letting $g(B) := \{f(a) : a ∈ B\}$, we have $C_i = g(A)$, and for all $B \in G$, there exists some $j < i$ with $C_j = g(B)$. For fixed $S$, the language $\{(F,C) : F \vdash_S C\}$ is polynomial-time decidable: read inputs F and C if C ∈ F return true
{ "domain": "cs.stackexchange", "id": 10215, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, p-vs-np, 3-sat", "url": null }
c#, beginner, console, rock-paper-scissors Console.WriteLine($"Computer chose {comChoice}"); switch (ComputeWinner(userChoice, comChoice)) { case Player.User: Console.WriteLine("User won"); game.PlayerScore++; break; case Player.Computer: Console.WriteLine("Computer won"); game.ComputerScore++; break; default: Console.WriteLine("Tie"); break; } } public static int SetRound() { Console.Write("How many round would you like to play?\t"); return Convert.ToInt32(Console.ReadLine()); } }
{ "domain": "codereview.stackexchange", "id": 32174, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner, console, rock-paper-scissors", "url": null }
graph-theory, graph-algorithms, graph-isomorphism, algebraic-complexity Now for the general case, we need to show that there is always a way of adjusting the middle vertices. We know that $T$ has even cardinality. So let $|T|=2r$. We just need to show that such an automorphism exists if $|T|=2$ since otherwise we can apply the composition of $r$ automorphisms corresponding to partitioning $T$ into $r$ subsets of size $2$. Thus assume $T=\{i,j\}$. Then the automorphism swaps $a_i$ with $b_i$, $a_j$ with $b_j$, each middle vertex $S$ such that $S\cap\{i,j\}=\emptyset$ with the middle vertex $S\cup \{i,j\}$ (this can be seen in your example), and each subset $S$ such that $S\cap \{i,j\}=\{i\}$ with the subset such that $S\cap \{i,j\}= \{j\}$ (This you can see for $k=3$). Notice that this swapping process is an automorphism since for an index $p\neq \{i,j\}$ the edge relation between $a_p$, $b_p$ and these swapped vertices is completely preserved, and clearly the edge relation between $a_i,a_j,b_i,b_j$ is properly adjusted.
{ "domain": "cstheory.stackexchange", "id": 1812, "lm_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, graph-algorithms, graph-isomorphism, algebraic-complexity", "url": null }
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" /> # 4.4: Triangle Congruence using ASA, AAS, and HL Difficulty Level: At Grade Created by: CK-12 ## Learning Objectives • Use and understand the ASA, AAS, and HL Congruence Postulate. • Complete two-column proofs using SSS, SAS, ASA and AAS. ## Review Queue 1. What sides are marked congruent? 2. Is third side congruent? Why? 3. Write the congruence statement for the two triangles. Why are they congruent? 1. From the parallel lines, what angles are congruent? 2. How do you know the third angle is congruent? 3. Are any sides congruent? How do you know? 4. Are the two triangles congruent? Why or why not? 1. If \begin{align*}\triangle DEF \cong \triangle PQR\end{align*}, can it be assumed that: 1. \begin{align*}\angle F \cong \angle R\end{align*}? Why or why not? 2. \begin{align*}\overline{EF} \cong \overline{PR}\end{align*}? Why or why not?
{ "domain": "ck12.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357549000773, "lm_q1q2_score": 0.8004346510148687, "lm_q2_score": 0.8175744828610094, "openwebmath_perplexity": 6355.686699751187, "openwebmath_score": 0.840915322303772, "tags": null, "url": "http://www.ck12.org/book/CK-12-Geometry-Basic/r1/section/4.4/" }
fourier-transform, sampling, convolution, zero-padding My question is, why does the length of the signals have to be the length of the convolution? If $x_1(t)$ is shorter than $x_2(t)$ why isn't it sufficient just to extend $x_1(t)$ to the length of $x_2(t)$? Then, both signals have the same length and the samples would still line up in the frequency spectrum, guaranteeing the property mentioned in (1), right? Multiplication in the frequency domain is equivalent to circular convolution in the time domain with a period of NFFT. If you don't zero pad them to at least length(x1)+length(x2)-1 samples, the IFFT result would be aliased in the time domain. That's why overlap-save method discards part of the result.
{ "domain": "dsp.stackexchange", "id": 10546, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fourier-transform, sampling, convolution, zero-padding", "url": null }
equation using the finite element method. Poisson Solvers William McLean April 21, 2004 Return to Math3301/Math5315 Common Material. Let (x,y) be a fixed arbitrary point in a 2D domain D and let (ξ,η) be a variable point used for integration. Recalling Lecture 13 again, we discretize this equation by using finite differences: We use an (n+1)-by-(n+1) grid on Omega = the unit square, where h=1/(n+1) is the grid spacing. 1 From 3D to 2D Poisson problem To calculate space-charge forces, one solves the Poisson's equation in 3D with boundary (wall) conditions: ∆U(x, y,z) =−ρ(x, y,z) ε0. Poisson on arbitrary 2D domain. Thanks for contributing an answer to Mathematics Stack Exchange! Please be sure to answer the question. 4 Consider the BVP 2∇u = F in D, (4) u = f on C. This example shows the application of the Poisson equation in a thermodynamic simulation. I want to use d_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, &xhandle, &yhandle, ipar, dpar, &stat)to solve the eqution with
{ "domain": "laquintacolonna.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9918120917924487, "lm_q1q2_score": 0.8085574450136944, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 572.7196407654142, "openwebmath_score": 0.8367288708686829, "tags": null, "url": "http://zgea.laquintacolonna.it/2d-poisson-equation.html" }
thermodynamics, temperature All three of these are pretty complicated which is why you've received so many answers that feel like educated guesses. Last, until the whole bottle reaches thermal equilibrium, the freezer will be colder than the glass which is colder than the wine. A) Wine bottle on rack vs. wine bottle in water: With the tap water at room temperature, the free bottle will be cooler because water has a very high specific heat that insulates the wet bottle. If you got a thermally conductive container with less water, but more of the bottle's surface in contact with the water, you would cool the wet bottle faster, but the geometry of these things is really important, and that is the wrong bowl.
{ "domain": "physics.stackexchange", "id": 40355, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature", "url": null }
python, file If you want to control which files and folders are skipped (keeping them unchanged), you can edit the lists in-place. Anything removed from the folders list will be skipped by os.walk(). Use folders[:] = edited_folder_list instead of folders = edited_folder_list. The latter has no effect on os.walk(). filecmp.cmpfiles() The other library you should look into for get_task() is filecmp, which has a set of functions for comparing files. Specifically, filecmp.cmpfiles() is probably what you want to use instead of hashing (see more comments on that in the next section). matching, mismatching, errors = filecmp.cmpfiles(path_1, path_2, file_list, shallow=False) This call will take a list of files (file_list) and compare the versions in path_1 and path_2, sorting the files into three lists: matching: files that match according to the shallow criteria. mismatching: files that are different. errors: files that could not be compared due to errors such as not existing in one of the directories.
{ "domain": "codereview.stackexchange", "id": 44858, "lm_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, file", "url": null }
soft-question, laws-of-physics The one difference that I think most people will agree upon is that in order for something to be called a "law," there must (or at least should) be experimental evidence supporting it. There is no such requirement to be called a "theory." So it is possible for a theory to be "upgraded" to a law, once there is enough experimental evidence to make it seem true. However, even when that happens, it doesn't mean people are going to stop calling it a theory; for example, many people still use the terms "theory of gravity" and "theory of relativity" (and many others) even though both those theories have been confirmed by many, many experiments and have unquestionably achieved "law" status.
{ "domain": "physics.stackexchange", "id": 46704, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "soft-question, laws-of-physics", "url": null }
Let $P_i = 100,000$ equal population in $2000$. Then $P(n) = P_i* (1 + rate)^n$ where $n$ is the number of years since $2000$. So $P(12) = P_i*(1+rate)^{12} = 2*P_i$ and $(1+rate)^{12} = 2$ and so $1 + rate = \sqrt[12]{2}$ and $rate = \sqrt[12]{2} -1 = 0.0594631.$ (you are off by a factor of $10$). So $P(n) = 100,000 * (1.0594631)^n$. So since $1995$ is $5$ years before $2000$ plug in $n=-5$ $P(-5) = 100,000 * (1.0594631)^{-5} \approx 74,915$. ===== Alternatively $(1 + rate)^{12} = 2$. What is $(1 + rate)^5$?(1+rate)^{12} = 2 \implies rate = .0594631$so$(1+rate)^5 = 1.594631^5 = 1.3348398541700343648308318811845$So from$1995$to$2000$the population grew by a factor of$1.3348398541700343648308318811845$. Or$x*1.3348398541700343648308318811845 = 100,000$so$x= \frac {100,000}{1.3348398541700343648308318811845} = 74,915\$ • Thank you very much. I'm sorry but I don't have enough reputation to declare your answer as useful but of course, it is. – Bachir Messaouri Dec 11 '17 at 22:16
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429565737234, "lm_q1q2_score": 0.8396890838319615, "lm_q2_score": 0.8539127455162773, "openwebmath_perplexity": 257.1134782461324, "openwebmath_score": 0.8036748170852661, "tags": null, "url": "https://math.stackexchange.com/questions/2562303/exponential-growth-of-population-how-to-go-back-in-time" }
signal-analysis, fourier-transform, frequency-spectrum, power-spectral-density, frequency-response As far as a Spectrum Analyzer is concerned, to display the power spectrum in dBm, what it does it to take the FFT and compute square of magnitude $P_n = 20 \times log_{10}(|X(f_n)|^2*1000/100)$ with $f_n$ being the discrete frequencies separated by resolution bandwidth (see it is set to 1kHz for this case). I multiplied by 1000 since unit is in dBm and I divided by 100 because to get to power, I have to pass voltage $X(f_n)$ through a resistance of $50\Omega$. ($\frac{V^2}{2R}$). To derive power spectral density from power spectrum, I am sure it is just dividing power in each bin by RBW. $P_n/f_{rbw}$. Though I am not very sure whether it is the (dBm value divided by rbw) or (dBm value of linear power value divided by rbw). I think this representation has no sense: the ordinate should be the power spectral density, not its integral in a neighborhood around the frequency considered
{ "domain": "dsp.stackexchange", "id": 8481, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-analysis, fourier-transform, frequency-spectrum, power-spectral-density, frequency-response", "url": null }
The dot product on $$\mathcal{R}^n$$ is defined as follows: $$(a,b) = a^i b^j (e_i,e_j) = a^i b^j \delta_{ij} = a^i b^i ,$$ where $$a,b \in \mathcal{R}^n$$ and $$e_i,e_j$$ standard basis vectors. I used Einstein summation convention here. In general we can express $$a,b$$ in a different basis i.e. $$a=\tilde{a}^i \tilde{e}_i$$ and $$b = \tilde{b}^i \tilde{e}_i$$ so now not the standard basis but an arbitrary basis of $$\mathcal{R}^n$$ assuming still $$(,)$$ is positive-definite. This then gives: $$(a,b) = \tilde{a}^i \tilde{b}^j (\tilde{e}_i,\tilde{e}_j) = \tilde{a}^i \tilde{b}^j A_{ij} \equiv a^T A \ b.$$ Note that $$A$$ now is not the identity matrix like in the standard inner product. The tensor metric allows for the vector norm to remain constant under change of basis vectors, and is an example of inner product (page 15). In the simple setting of basis vectors constant in direction and magnitude from point to point in $$\mathbb R^2,$$ here is an example:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147129766448, "lm_q1q2_score": 0.8580858344676041, "lm_q2_score": 0.8824278602705731, "openwebmath_perplexity": 199.8445595459628, "openwebmath_score": 0.9432286024093628, "tags": null, "url": "https://math.stackexchange.com/questions/3039219/in-mathbbrn-is-the-dot-product-the-only-inner-product/3039248" }
c++, c++11, visitor-pattern Title: Visitor design pattern used for an asteroid game Please review my code below. I am studying the Visitor Design Pattern and I think I have implemented it correctly. Please check. I have tried to split the method definitions and the prototypes as much as possible so there are many files. Any comments are welcome. And no, this is not homework. AsteroidBase.cpp #include <iostream> #include "AsteroidBase.h" #include "SpaceShipBase.h" CAsteroidBase::CAsteroidBase(const std::string& aAsteroidName) : iAsteroidName(aAsteroidName) { } AsteroidBase.h #ifndef ASTEROIDBASE_H #define ASTEROIDBASE_H class CSpaceShipBase; class CApolloSpaceShip; class CColumbiaSpaceShip;
{ "domain": "codereview.stackexchange", "id": 30606, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, visitor-pattern", "url": null }
real-time, online-processing This new mode of operation opened exciting opportunities for low latency audio processing, such as reported by happy users: I get perfect rock solid stable audio with 2ms buffers + 0.5ms latency, compared to semi-stable audio in 4ms buffers (+5ms output latency), with ASIO. Depending on whether this real-time approximation is good for you, Windows might still be a good environment for the mentioned task.
{ "domain": "dsp.stackexchange", "id": 9183, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "real-time, online-processing", "url": null }
ros, ros2, rosout, best-practices If every node is publishing both rosout and diagnostics, then no matter what you do you'll have a node subscribing to every other node to watch for diagnostics or rosout (or even both). With DDS, that will produce a socket connection to every other node (though just a few sockets per node inter-connection, regardless of number of topics). Originally posted by ChuiV with karma: 1046 on 2023-05-16 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 37191, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2, rosout, best-practices", "url": null }
genetics, botany, reproduction, dendrology Title: Why don't the apples seeds from grafted trees produce the same kind of apples? As Wikipedia says: Grafting is a horticultural technique whereby tissues from one plant are inserted into those of another so that the two sets of vascular tissues may join together. In most cases, one plant is selected for its roots and this is called the stock or rootstock. The other plant is selected for its stems, leaves, flowers, or fruits and is called the scion or cion. The scion contains the desired genes to be duplicated in future production by the stock/scion plant.
{ "domain": "biology.stackexchange", "id": 4590, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, botany, reproduction, dendrology", "url": null }
genetic-algorithms A gradient is a partial derivative that specifies the rate of change in every direction from some point on a surface. With respect to optimization, that surface is the thing that we're looking for some extremum of. Often it might be something like an error function, such as the use of gradients in backpropagation for training a neural network. You compute the error function $f(d,w)$ where $d$ is the data, $w$ is the weights of the network, and $f$ is the error (the squared difference between what the network outputs and the desired target). The gradient with respect to $w$ gives us the rate of change of that error as we change the weights. And because we want the error to be small, we can just change the weights in the direction of the greatest decrease in the error. That's an example of "using" a gradient in optimization. It's a way of choosing an action based on knowing mathematically what will happen to your function for whatever move you make.
{ "domain": "ai.stackexchange", "id": 3562, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetic-algorithms", "url": null }
graph-theory, graph-algorithms Title: Relationship between $O(\log n)$ (bounded) treewidth and H-minor-free What is the relationship between graphs which have $O(\log n)$ treewidth and $\mathcal{H}$-minor-free graphs? Are graphs which have $O(\log n)$ treewidth $\mathcal{H}$-minor-free? I know that graphs which are $\mathcal{H}$-minor-free have treewidth $O(\sqrt{n})$ but I am concerned more with the relationship between $O(\log n)$ treewidth graphs and $\mathcal{H}$-minor-free graphs. A proper minor-closed family of graphs has bounded treewidth if and only if it's forbidden minors includes a planar graph. Thus, either the family contains all planar graphs or has bounded treewidth. In the former case the treewidth can be $\Omega(\sqrt{n})$ and in the latter case the treewidth is $O(1)$.
{ "domain": "cstheory.stackexchange", "id": 4742, "lm_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, graph-algorithms", "url": null }
optics, electromagnetic-radiation, hologram If you consider the distance of points H1, H2 from two generic points A, B and calculate the distances, the difference between H1-A and H1-B distances will differ from the difference between H2-A and H2-B by a distance comparable to the distance between H1 and H2 themselves. So the wave is imprinted in the hologram. However, when the object we are visualizing is sufficiently far from the screen in the normal direction, the change of the phase will actually be much smaller which means that the lines on the photographic plates will be much further from each other than the wavelength. This should be known from double-slit experiments and diffraction gratings. At most, you need the resolution of the hologram to exceed one pixel per the wavelength of the light. That's comparable to 0.5 microns. Invert it and you get 5,000 wave maxima per inch. That's close to the dots-per-inch resolution of some best printers.
{ "domain": "physics.stackexchange", "id": 34845, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, electromagnetic-radiation, hologram", "url": null }
Transitive: For any $x,y,z \in \Bbb Z$, if ${x} - {y} = 2k$ and ${y} - {z}= 2l$ for some $k,l \in \Bbb Z$, then ${x} - {z} = 2(k+l)$ Is the proof correct? And how do I find equivalence class? • your proof is not correct as the relation is defined on $\mathbb{R}$ while you pick your $x, y$ and $z$ in $\mathbb{Z}$ Dec 14 '13 at 3:51 • Why the $2$s in your transitivity argument? They are unnecessary. Dec 14 '13 at 3:52 • You find the equivalence class of $1/3$ by finding all real $x$ such that $x-(1/3)$ is an integer. Dec 14 '13 at 3:53 Your ideas are good, but your proof contains some errors. First of all we are talking about $x,y\in\mathbb{R}$ not $x,y\in\mathbb{Z}$. Fixing your errors, the proof would look something like this: Reflexive: $\forall x\in\mathbb{R}$, $x-x=0$ so $x\sim x$. Therefore $\sim$ is reflexive.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924810166349, "lm_q1q2_score": 0.8120837180685355, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 80.08907029687327, "openwebmath_score": 0.9293708801269531, "tags": null, "url": "https://math.stackexchange.com/questions/606175/define-a-relation-on-the-set-of-all-real-numbers-x-y-in-mathbbr-as-follow/606181" }
Any help is greatly appreciated. 2. Re: Help defining critical pts and the sign of f(x,y)=(2x^2-y)*(x^2-y) As far as part 1 is concerned, you are given $F(x,y)= (2x^2-y)(x^2-y)$, do you not see that F(x,y)= 0 if and only if either $2x^2- y= 0$ or $x^2- y= 0$? And those are equivalent to $y= 2x^2$ and $y= x^23$. Now since F is continuous and 0 only on those curves, F can change sign (go from positive to negative or vice-versa) only on those curves. So it is sufficient to test a single point in each of the regions bounded by those curves to see what sign F has in each. Now $F_x= 4x(x^2- y)+ 2x(2x^2- y)= 8x^3- 6xy= 2x(4x^2- 3y)= 0$ which is 0 if x= 0 or if $4x^2= 3y$, and $F_y= -(x^2- y)- (2x^2- y)= -3x^2+ 2y= 0$ so $2y= -3x^2$. If x= 0, then 2y= 0 so y= 0. If $4x^2= 3y$ then $2y= (8/3)x^4$ so that $2y= (8/3)x^4= -3x^2$, $x^2((8/3)x^2+ 3)= 0$ from which x= 0. Yes, (0, 0) is the only critical point.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137918802722, "lm_q1q2_score": 0.8074010699851656, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 272.9090462022417, "openwebmath_score": 0.7697988152503967, "tags": null, "url": "http://mathhelpforum.com/calculus/214390-help-defining-critical-pts-sign-f-x-y-2x-2-y-x-2-y.html" }
• Your limit expression becomes $$\lim_{\alpha \to 0}\sqrt{\frac{2-2\cos\alpha}{\alpha^2}} \ = \ \lim_{\alpha \to 0} \ \frac{\sqrt{2} \ · \ \sqrt{2} \ | \sin \left(\frac{\alpha}{2} \right) | }{\alpha} \ = \ \lim_{\alpha \to 0} \ \frac{2 \ | \sin \left(\frac{\alpha}{2} \right) | }{2 \ · \left( \frac{\alpha}{2} \right) } \ = \ 1 \ \ .$$ This last is the "limit law" $\lim_{u \to 0} \ \frac{\sin u}{u} \ = \ 1 \$ which justifies the "small-angle approximation". – boojum Mar 26 at 3:41
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850906978876, "lm_q1q2_score": 0.8170843426985496, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 207.43069810206157, "openwebmath_score": 0.9527865648269653, "tags": null, "url": "https://math.stackexchange.com/questions/4071256/deriving-the-centripetal-acceleration-in-circular-motion" }
python, python-3.x class MaxOMP: def __enter__(self): os.environ["OMP_NUM_THREADS"] = str(mp.cpu_count()) def __exit__(self, exc_type, exc_val, exc_tb): os.environ["OMP_NUM_THREADS"] = "1" def main(): with MaxOMP(): run_omp_intensive_job() Instead of MaxOMP as a name, I like MaxOmp - in general still CamelCase your names even if they include an acronym. Additionally, there isn't any reason why this needs to be restricted to any particular environment variable. As such, I would probably make this: class EnvironmentVariableContextManager: _base_value = None _variable = None def __init__(self, variable_name, value): self.variable = variable_name self.target_value = value @property def variable(self): return self._variable @variable.setter def variable(self, name): self._base_value = os.environ.get(name, None)
{ "domain": "codereview.stackexchange", "id": 35744, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x", "url": null }
organic-chemistry, hydrogen, nmr-spectroscopy The second one seems trickier. It looks as though the signal was split into a quartet, and then each peak into a triplet. To me that looks like it should be d - split into the quartet by e and then split into the triplets by c and b. So why is the answer b? These J values wouldn't have been supplied for now reason - is there a way I could have used them? More generally, is it possible (and if so how) to identify the type of proton and the structure of a molecule if you just had access to the NMR and the J values like this? The proton(s) in question absorbs at 5.95 ppm, the olefinic region - so it cannot be D which is expected to absorb upfield in the aliphatic region. B is the correct answer. Proton B would be split by proton C into a doublet with a 15.5 Hz separation (the coupling constant $\ce{J_{BC}}$). Each line in the doublet would be further split into another doublet with a J=8 Hz spacing by proton A. So now we have 4 lines, a doublet of doublets. Each of these four lines will
{ "domain": "chemistry.stackexchange", "id": 1216, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, hydrogen, nmr-spectroscopy", "url": null }
to mass. Best Answer: Consider the rod to be two rods placed with one end coinciding. Jul 16, 2013 · If A. Apr 24, 2017 · Although calculating the moment of inertia can be very complicated, shapes such as spheres, rods and discs simplify the math considerably. Moment of Inertia of a Uniform Rod. 097 This means a mass of 22 units placed at (3. Nov 08, 2017 · Moment of inertia ‘I’ of a rotating object with respect to its axis of rotation is given by the product of its mass and the square of its distance from the axis of rotation. Moment of Inertia, General Form. k = (2π) 2 (3. This has many implications, including that the angular momentum vector is not always parallel to the angular velocity vector, and the relationship between angular acceleration and torque is no longer so simple. The moment of inertia is related to the rotation of the mass; specifically, it measures the tendency of the mass to resist a change in rotational motion about an axis. Unit 30 Moments of Inertia of Masses
{ "domain": "mass-update.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9938070087416098, "lm_q1q2_score": 0.838668867561424, "lm_q2_score": 0.8438951025545426, "openwebmath_perplexity": 246.3611296504142, "openwebmath_score": 0.601813793182373, "tags": null, "url": "http://vkxt.mass-update.de/moment-of-inertia-rod.html" }
ros, moveit wait. The "post-processing" you refer to (which is what "the STOMP page states") is not the same necessarily as time-parameterisation. The text on that page is pretty clear about what sort of post-processing is meant (from the STOMP page you refer to): Some of the moveIt planners tend to produce jerky trajectories and may introduce unnecessary robot movements. A post processing smoothing step is usually needed. In contrast as STOMP tends to produce smooth well behaved motion plans [..], there is no need for a post processing smoothing step as required by some other motion planners. This post-processing is the smoothing step. It does not state anything -- as far as I can tell -- about time-parameterisation itself.
{ "domain": "robotics.stackexchange", "id": 34971, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit", "url": null }
ros, root, permission, robot-upstart Title: robot_upstart with root permission Hi, My question is: when the .launch file is launched by using robot_upstart set up, does it have root access? I have not tested yet because my package it not ready. Our project uses a headless robot, and there is a package that would use the PRU of the Beaglebone. At the moment, we need to do rosrun from root, in order for this package to work. If the answer is no, could you please suggest some solution to us? Best regards, Nhan Nguyen Originally posted by Nann Nguyen on ROS Answers with karma: 1 on 2014-08-04 Post score: 0 No, here is a detailed explanation https://github.com/clearpathrobotics/robot_upstart/blob/jade-devel/doc/install.rst Originally posted by shoemakerlevy9 with karma: 545 on 2017-03-03 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 18885, "lm_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, root, permission, robot-upstart", "url": null }
biochemistry Furthermore, if there is a way for the victim to be be unaware of why they can't sleep, I would like to know that too. The technology context is 80's decade and the purpose is a that a organization want to make some experiments about the consequences of sleep privation, especially if there is a point when allucinations begin. A bit of a primer first: The body's sleep cycle is regulated by Melatonin, which is a hormone produced by the pineal gland. You can read more about this hormone here but in summary, for a biochemical solution to keeping someone awake, you would want to either catalyse the breakdown of melatonin in the body or inhibit melatonin secretion by the pineal gland.
{ "domain": "chemistry.stackexchange", "id": 13212, "lm_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", "url": null }
ros-humble, ros2-control, universal-robots, ros2-controllers, ur-driver EDIT2: interfaces: command interfaces [94melbow_joint/position [available] [claimed][0m [96melbow_joint/velocity [available] [unclaimed][0m [94mgpio/io_async_success [available] [claimed][0m [94mgpio/standard_analog_output_cmd_0 [available] [claimed][0m [94mgpio/standard_analog_output_cmd_1 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_0 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_1 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_10 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_11 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_12 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_13 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_14 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_15 [available] [claimed][0m [94mgpio/standard_digital_output_cmd_16 [available] [claimed][0m
{ "domain": "robotics.stackexchange", "id": 38995, "lm_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-humble, ros2-control, universal-robots, ros2-controllers, ur-driver", "url": null }
cell-biology, dna, chromosome, dna-replication, meiosis Title: When the sister chromatids are joined in the centromere, why is it stated that the number of chromosomes is 46 and not 72? Before the DNA is replicated in a human somatic cell, the cell has 46 chromosomes. Also, after the sister chromatids are separated during Anaphase, the chromosome number in the cell doubles to 72, so when the sister chromatids are joined, why isn't the chromosome number also 72? On the internet, some sources say that one chromosome in a cell that hasn't replicated its DNA is equal to one chromatid. Is this correct, or are chromosomes and chromatids structurally different? When I was learning genetics for the first time I have also found naming the two chromatids joined at centromere as chromosome a little bit strange. The number of DNA molecules and their behaviour in cell cycle seemed to me more important for understanding of genetics.
{ "domain": "biology.stackexchange", "id": 11155, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-biology, dna, chromosome, dna-replication, meiosis", "url": null }
homework-and-exercises, lagrangian-formalism, variational-calculus Which then reduces to the second line in the original question. Does this seem correct? You have to apply the rules for calculating with deltas and summation indices. $$ m_c \nabla_a W_{bc} \delta_{ba} = m_c \nabla_a W_{ac} = m_b \nabla_a W_{ab}$$ So just remove the $\delta_{ba}$ and convert the index $b$ to $a$. Then, $c$ is a summation index, you can change its name to $b$. This is how $m_c$ vanishes in the result. Do the same with $$ -m_c \nabla_a W_{bc} \delta_{ca} = - m_c \nabla_a W_{ba} $$ Now apply the mentioned antisymmetry $$- m_c \nabla_a W_{ba} = m_c \nabla_a W_{ab} $$ Again, $c$ is a summation index, just change it to $b$. Inserting this into the original equation should then summarize to the second line.
{ "domain": "physics.stackexchange", "id": 40758, "lm_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, lagrangian-formalism, variational-calculus", "url": null }
$$a_0 = z\qquad \qquad \qquad a_{n+1} = z^{a_n}$$ let $b_n = \ln a_n$ so $a_n = e^{b_n}$ and $$b_{n+1} = \ln \left(z^{e^{b_n}}\right) = e^{b_n} \ln z$$ if $b_n$ converges to $b$ then $b = e^b \ln z = - e^{b} (-\ln z)$ so $$b = e^b \ln z = W(-\ln z)$$ where $W$ is (one of the branches of ?) the Lambert function. let $c_n = b_n - b$ so $$c_{n+1} = e^{(b + c_n)} \ln z - b= (e^b \ln z) e^{c_n} - b = b e^{c_n} - b = b (e^{c_n} - 1)$$ suppose $|b| > 1$ and $\ln z \ne 0$. then suppose $b_n \to b$ thus $c_n \to 0$ so $e^{c_n}-1 \sim c_n$ so $c_{n+1} \sim b c_n$ which clearly cannot converge except if $c_0 = 0$ which would imply $c_n = 0$ for every $n$ which is not the case because $b_0 = \ln z$ so $b_1 = e^{\ln z} \ln z \ne b_0$ so $c_1 \ne c_0$ $\implies$ a contradiction. hence if $\ln z \ne 0$ $$|b| = \left|W(-\ln z)\right| \le 1$$ is a necessary condition for the convergence of $(b_n)$ and $(a_n)$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631643177029, "lm_q1q2_score": 0.801782373085416, "lm_q2_score": 0.8128673110375457, "openwebmath_perplexity": 88.14897015906828, "openwebmath_score": 0.9507485032081604, "tags": null, "url": "https://math.stackexchange.com/questions/1652846/convergence-or-divergence-of-infinite-power-towers-of-complex-numbers-zzz" }
• In your example you did not count the possibilities $0|0|10$ and $0|10|0$ and $10|0|0$. So there are $66$ possibilities. This agrees with stars and bars since $\binom{10+2}2=66$. – Vera May 11 at 8:58 This problem is equivalent to finding the number of integer solutions to $$a+b+c+d+e=10$$. If you imagine your $$10$$ as a line of $$10$$ stars then you can insert $$4$$ "|" (bars) in between the stars to get a solution, for example $$|\star\star|\star\star\star\star|\star|\star\star\star$$ represent the solution $$0+2+4+1+3$$. Since every permutation of stars and "|" bars represents a solution the total number of solutions is given by the possible permutations of this $$14$$ symbols, that is $$\frac{14!}{10!4!}$$. This method, actually called stars and bars, can be used for similar problems with other numbers involved.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.987568347500326, "lm_q1q2_score": 0.8452114956547073, "lm_q2_score": 0.8558511396138365, "openwebmath_perplexity": 222.76870217271295, "openwebmath_score": 0.7871385812759399, "tags": null, "url": "https://math.stackexchange.com/questions/1462099/number-of-possible-combinations-of-x-numbers-that-sum-to-y/1462106" }
We can now repeat this process by using $$c_2 = \dfrac{c_1 + b}{2}$$ and proving that $$c_1 < c_2 < b$$, In fact, for each natural number, we can define $$c_{k + 1} = \dfrac{c_k + b}{2}$$ and obtain the result that $$a < c_1 < c_2 < \cdot\cdot\cdot < c_n < \cdot\cdot\cdot < b$$ and this proves that the set $$\{c_k\ |\ k \in \mathbb{N}$$ is a countably infinite set where each element is a rational number between $$a$$ and $$b$$. (A formal proof can be completed using mathematical induction. See Exercise (). This result is true no matter how close together $$a$$ and $$b$$ are. For example, we can now conclude that there are infinitely many rational numbers between 0 and $$\dfrac{1}{10000}$$ This might suggest that the set $$\mathbb{Q}$$ of rational numbers is uncountable. Surprisingly, this is not the case. We start with a proof that the set of positive rational numbers is countable. Theorem 9.14 The set of positive rational numbers is countably infinite. Proof
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137884587393, "lm_q1q2_score": 0.8307271319582111, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 82.19969367751484, "openwebmath_score": 0.970478355884552, "tags": null, "url": "https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Mathematical_Reasoning__Writing_and_Proof_(Sundstrom)/9%3A_Finite_and_Infinite_Sets/9.2%3A_Countable_Sets" }
and interpret the stage distribution graphs. This section presents an overview of the available methods used in life data analysis. To view one cycle of the 0. Anmelden; Eigener Account; Mein Community Profil; Lizenz zuordnen; Abmelden; Produkte. Introduction, Matlab notes Math 1070. The code is one of the experiments in version 5. matrix as the matrix T. The ode45 command is an integrated six-stage, fifth-order, Runge-Kutta method of solving differential equations. Diseases are a ubiquitous part of human life. This simulation package is intended as a tool for experimenting with different models of social contact and social distancing as a virus spreads through a population. MATLAB/Simulink pre-existing blocks are used for modeling and control of the. Is it possible to model discrete populations Learn more about ode45, ode, model Is it possible to model discrete populations using ode45? Follow 2 views (last 30 days) Andrew on 16 Dec 2013. The population is xed. Anmelden; Eigener
{ "domain": "collezionericordi.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307739782682, "lm_q1q2_score": 0.8085615365691371, "lm_q2_score": 0.8311430499496095, "openwebmath_perplexity": 1495.8913086396221, "openwebmath_score": 0.5351118445396423, "tags": null, "url": "http://jmnd.collezionericordi.it/matlab-population-model.html" }
probability that the 3rd ball is also. We give an overview of two approaches to probability theory where lower and upper probabilities, rather than probabilities, are used: Walley’s behavioural theory of imprecise probabilities, and Shafer and Vovk’s game-theoretic account of probability. Free essays, homework help, flashcards, research papers, book reports, term papers, history, science, politics. Another math related question Two urns both contain green balls and red balls. Four balls are selected at random without replacement from an urn containing three white balls and five blue balls. Consider 3 urns. CBMM Tutorial: Optimization Notes August 17, 2016 This page goes through the concepts that will be taught in the Optimization tutorial at the 2016 CBMM Summer School at Woods Hole. both urns, while preference for urn 1 in (3) and (4) contradicts that probabilities are 50/50 for both urns. A match occurs if the ball numbered m i. One ball is drawn at random and its color noted. The
{ "domain": "istitutocomprensivoascea.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517418068649, "lm_q1q2_score": 0.8370666978267032, "lm_q2_score": 0.8558511396138365, "openwebmath_perplexity": 264.5772213848859, "openwebmath_score": 0.7951757311820984, "tags": null, "url": "http://ajyf.istitutocomprensivoascea.it/3-urns-probability.html" }
general-relativity, particle-physics, differential-geometry, topology I am particularly interested in compact space-times, for one can then apply the Yamabe problem. Thanks! On point i.): JohhnyMo1's comment touches the essential point, though the result he quoted holds assuming that the manifold is Hausdorff. I emphasize this because the definition of paracompactness in the literature is not uniform - sometimes it is assumed that a paracompact topological space is Hausdorff, sometimes not (M. W. Hirsch's book "Differential Topology", for instance, doesn't - neither does he assume that a manifold must be Hausdorff, by the way). More precisely, the result is a direct consequence of the Smirnov metrization theorem: a topological space is metrizable if and only if it is Hausdorff, paracompact and locally metrizable (i.e. any point has an open neighborhood whose relative topology is metrizable). Any manifold clearly satisfies the latter condition.
{ "domain": "physics.stackexchange", "id": 13591, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, particle-physics, differential-geometry, topology", "url": null }
particle-physics, special-relativity, symmetry, tensor-calculus Title: Testing covariance of an expression? This is something I've been unsure of for a while but still don't quite get. How does one tell whether an expression (e.g. the Dirac equation) is covariant or not? I get it for a single tensor, but how is it defined when there is no overall up/down index to base it on? Any advice? The covariance of Dirac equation in the ordinary Hamiltonian form $$i\hbar \frac{\partial \Psi}{\partial t} = H \Psi$$ is far from evident. The 'trick' consists on rewriting it in terms of invariant/covariant quantities such as the Dirac matrices $\gamma_\mu$ and kinetic four-momenta $\pi^\mu$ $$\gamma_\mu \pi^\mu \Psi = m \Psi$$ This rewritten form can be found in any standard textbook (check e.g. Feynman's Quantum electrodynamics) and its covariance is rather evident.
{ "domain": "physics.stackexchange", "id": 5138, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, special-relativity, symmetry, tensor-calculus", "url": null }
ros, moveit, ompl, source class StateStorageWithMetadata : public StateStorage ^ /opt/ros/indigo/include/ompl/base/StateStorage.h:214:15: note: no known conversion for argument 1 from ‘const ModelBasedStateSpacePtr {aka const boost::shared_ptr<ompl_interface::ModelBasedStateSpace>}’ to ‘const ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >&’ /opt/ros/indigo/include/ompl/base/StateStorage.h:214:15: note: candidate: ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >::StateStorageWithMetadata(ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >&&)
{ "domain": "robotics.stackexchange", "id": 28063, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, ompl, source", "url": null }
electromagnetism, field-theory, lagrangian-formalism \:\vphantom{\dfrac{\dfrac{a}{b}}{\dfrac{a}{b}}}} \tag{008} \end{equation} 2. The Euler-Lagrange equations of EM Field Now, our main task is to find a Lagrangian density $\:\mathcal{L}\:$, function of the four ''field coordinates'' and their 1rst order derivatives \begin{equation} \mathcal{L}=\mathcal{L}\left(\eta_{\jmath}, \overset{\centerdot}{\eta}_{\jmath}, \boldsymbol{\nabla}\eta_{\jmath}\right) \qquad \left(\jmath=1,2,3,4\right) \tag{009} \end{equation} such that the four scalar electromagnetic field equations (006) and (008) are derived from the Lagrange equations \begin{equation} \frac{\partial }{\partial t}\left[\frac{\partial \mathcal{L}}{\partial \left(\dfrac{\partial \eta_{\jmath}}{\partial t}\right)}\right]+\sum_{k=1}^{k=3}\frac{\partial }{\partial x_{k}}\left[\frac{\partial \mathcal{L}}{\partial \left(\dfrac{\partial \eta_{\jmath}}{\partial x_{k}}\right)}\right]- \frac{\partial \mathcal{L}}{\partial \eta_{\jmath}}=0\:, \quad \left(\jmath=1,2,3,4\right)
{ "domain": "physics.stackexchange", "id": 96947, "lm_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, field-theory, lagrangian-formalism", "url": null }
thermodynamics, solubility, theoretical-chemistry, equilibrium You might be able to guess that the mathematics gets a little complex at this point. It is possible to do these calculations by hand, but there are computer programs that can handle them. The most easily accessible one is Visual MinTEQ. The other hard part is having the data for the equilibrium constants, there may be data for your system, but you’ll have to look. Just to summarize. Complexation constants don’t change with pH (they are, in fact, constant) it’s just that the speciation matters, and speciation is controlled by pH. The ‘global constant’ you refer to is pH, not something else.
{ "domain": "chemistry.stackexchange", "id": 357, "lm_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, solubility, theoretical-chemistry, equilibrium", "url": null }
game, c++17, logging Main.cpp #include <iostream> #include "CoreLogger.h" #include "ClientLogger.h" int main() { Logger logger(LogLevel::TRACE); while (true) { // Logging using Client identifier LOG_TRACE(logger, "This is a trace message from Client."); LOG_DEBUG(logger, "This is a debug message from Client."); LOG_INFO(logger, "This is an info message from Client."); LOG_WARN(logger, "This is a warning message from Client."); LOG_ERROR(logger, "This is an error message from Client."); LOG_CRITICAL(logger, "This is a critical message from Client.");
{ "domain": "codereview.stackexchange", "id": 45236, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "game, c++17, logging", "url": null }
homework-and-exercises, electrostatics, magnetic-fields $J = \int \tau dt $ The equation which you obtained for torque will be having the rate of change of flux, solving the simple differential equation, you should obtain the answer for angular impulse. The rest of course, you must be knowing, equate it to the angular momentum of the object(Angular Impulse = change in angular momentum) to obtain the angular velocity.
{ "domain": "physics.stackexchange", "id": 28434, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electrostatics, magnetic-fields", "url": null }
machine-learning, keras, overfitting, regularization, dropout $L_1$ versus $L_2$ is easier to explain, simply by noting that $L_2$ treats outliers a little more thoroughly - returning a larger error for those points. Have a look here for more detailed comparisons.
{ "domain": "datascience.stackexchange", "id": 10923, "lm_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, keras, overfitting, regularization, dropout", "url": null }
particle-physics, string-theory, ads-cft The most detailed computational checks of the correspondence are probably those that use integrability to compute anomalous dimensions of operators over the full range from weak to strong coupling. I'm not an expert on this, but I'll point you to one fairly recent paper that contains some of the major references to get you started.
{ "domain": "physics.stackexchange", "id": 245, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, string-theory, ads-cft", "url": null }
ros, rviz, ros-kinetic, tf2, rosmsg Since, the /tf topic uses tf2_msgs/TFMessage and, the rosmsg types and details But this not working by showing the error TypeError: Invalid number of arguments, args should be ['transforms'] args are( ) . Is there any way to move the robot along with the map or also do my currently trying ways correct? Thanks for your attention. Originally posted by yanaing on ROS Answers with karma: 35 on 2020-04-13 Post score: 1 See this tutorial in c++ or python: http://wiki.ros.org/tf2/Tutorials/Writing%20a%20tf2%20broadcaster%20%28C%2B%2B%29#How_to_broadcast_transforms http://wiki.ros.org/tf2/Tutorials/Writing%20a%20tf2%20broadcaster%20%28Python%29 Rewrite the subscriber to a Timer based callback that takes e.g pose.x = pose.x + 0.1 per time iteration (or reading from a file etc) to move it. You could otherwise manually in the terminal publish the transformation step by step by using: rosrun tf2_ros static_transform_publisher 1 0 0 0 0 0 map base_link Depends on what you are trying to do.
{ "domain": "robotics.stackexchange", "id": 34753, "lm_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, rviz, ros-kinetic, tf2, rosmsg", "url": null }
c++, multithreading void loopFilesVect(vector<string>& filesVect, thread_pool_parameters parameters) { … } loopFilesVect(vFiles, {.packSize = 200, .nbThreads = std::thread::hardware_concurrency() / 2});
{ "domain": "codereview.stackexchange", "id": 45471, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, multithreading", "url": null }
Since you said "Or", I will do the inner one. you can do it like this: p1 = ParametricPlot[ r {(1 + Cos[t]) Cos[t], (1 + Cos[t]) Sin[t]}, {t, 0, 2 Pi}, {r, 0, 1}, PlotRange -> All, Frame -> False, PlotStyle -> {White, Opacity[1]}]; Show[g, h, p1] For the outer one "Also can be used in general for inner and outer" you can use: p1 = ParametricPlot[{1 - r + r (1 + Cos[t]) Cos[t], r (1 + Cos[t]) Sin[t]}, {t, 0, 2 Pi}, {r, 1, 2}, PlotRange -> All, Frame -> False, PlotStyle -> {White, Opacity[1]}]; Show[g, h, p1] If you really need a Graphics object that represents a "sliced" version of the boundary curve (instead of just hiding one half of the line as in Algohi's solution which I also upvoted because it's easier), then you can achieve that as follows: g = ParametricPlot[{(1 + Cos[t]) Cos[t], (1 + Cos[t]) Sin[t]}, {t, 0, 2 Pi}, PlotRange -> {{-0.5, 2.2}, {-1.5, 1.5}}, PlotStyle -> {Thickness[0.06]}];
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9553191271831558, "lm_q1q2_score": 0.8430002132757837, "lm_q2_score": 0.8824278602705731, "openwebmath_perplexity": 1356.7098533895132, "openwebmath_score": 0.3564513325691223, "tags": null, "url": "https://mathematica.stackexchange.com/questions/69572/how-to-cut-a-thick-curve-in-half-lengthwise" }
ros Title: libtf.so cannot open shared object file I was using a package done by myself on fuerte and I have moved this package on Turtlebot which is on electric. But it's not working on electric, I have a error message when I execute roslaunch mypackage mylaunchfile.launch: error while loading shared libraries: libtf.so: cannot open shared object file: No such file or directory process[vision_odometrie-1]: started with pid [30562] [vision_odometrie-1] process has died [pid 30562, exit code 127]. log files: /home/turtlebot/.ros/log/2827a526-d4ef-11e2-a445-047d7b6f6b57/vision_odometrie-1*.log
{ "domain": "robotics.stackexchange", "id": 14561, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
java, swing, event-handling, graphics frame.setSize(FRAME_WIDTH, FRAME_HEIGHT); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setContentPane(new JPanel(new BorderLayout()) { /** * */ private static final long serialVersionUID = 1L;
{ "domain": "codereview.stackexchange", "id": 13272, "lm_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, swing, event-handling, graphics", "url": null }
molecular-biology, proteins, nutrition, amino-acids Using the indicator amino acid oxidation (IAAO) approach to further examine this issue, Di Buono et al. (9–11) confirmed the mean requirement for methionine as 12.6 mg/kg/d in the absence of exogenous cysteine but noted that a safe level of intake of total SAA for the population was substantially higher at 21 mg/kg/d.
{ "domain": "biology.stackexchange", "id": 9547, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "molecular-biology, proteins, nutrition, amino-acids", "url": null }
quantum-field-theory, lagrangian-formalism, standard-model Title: Mass and flavour eigenstates in SM From what I understand, if we develop the terms in the Lagrangian of SM containing the $SU(2)$ quark doublets $$Q_{i,L}=\begin{pmatrix} u_{i,L}\\ d_{i,L} \end{pmatrix}$$ with $u_i=u,c,t$ and $d_i=d,s,b$, the terms that are responsible for the mass of the quarks mixes different quarks together. We then say this doesn't diagonalize the masses matrix, it's in the flavour eigenstates. On the other hand, it's possible to do a linear combination of the quarks such that the mass terms don't mixes the quarks together anymore. We then say that it diagonalize the masses matrix and that it's in the mass eigenstates. Here are my questions: Is this explanation correct ? Why do we call those two ways of writing the Lagrangian eigenstates? We don't talk about states (kets) here. Apperently, the CKM matrix allow us to go from one point of view to the other, how exactly?
{ "domain": "physics.stackexchange", "id": 72410, "lm_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, lagrangian-formalism, standard-model", "url": null }
quantum-mechanics, quantum-field-theory, probability, bohmian-mechanics The only way they could be tested is if there were some way the Universe had to allow us access to that information without the measurement. But this would effectively constitute proving quantum mechanics wrong as a fundamental theory of nature as it means we would be seeing a phenomenon that is at variance with the usual quantum theory. Any theory that allows this is not an interpretation of quantum mechanics, but a different physical theory altogether.
{ "domain": "physics.stackexchange", "id": 51086, "lm_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, quantum-field-theory, probability, bohmian-mechanics", "url": null }
python, animation, pygame, physics For converting to SI units: You would need to ensure that ALL properties are SI (or unitless). If, for example, your dimensions are based on pixels, not metres, you would need to scale by some pixel:metre conversion. I suspect having things like density just being 1 rather than the actual density of a golf ball are causing issues. This is probably why gravity feels a little "heavy". Using purely SI units may be a bit of a stretch. Accurately mimicking properties like friction may be a little over the top for a simple game. I would suggest it's a good idea to use real physical formulae, then tweak some constants and add scale factors. I won't comment on the code style as I can see people have done that in the past. EDIT:
{ "domain": "codereview.stackexchange", "id": 34256, "lm_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, animation, pygame, physics", "url": null }
condensed-matter, hilbert-space, second-quantization My argument: By definition, $\vert r b, r^\prime b^\prime \rangle=\frac{1}{\sqrt{2}} \left(\vert r b \rangle \otimes \vert r^\prime b^\prime \rangle-\vert r^\prime b^\prime \rangle \otimes \vert r b \rangle \right)$ and analogously for $\langle k a, k^\prime a^\prime \vert.$ Therefore, one quickly finds that the scalar product is just the determinant of the matrix consisting of all possible pairings, that is: $$\langle k a, k^\prime a^\prime \vert r b, r^\prime b^\prime \rangle=\langle ka \vert rb \rangle \langle k^\prime a^\prime \vert r^\prime b^\prime \rangle- \langle ka \vert r^\prime b^\prime \rangle \langle k^\prime a^\prime \vert rb\rangle,$$ which gives the result: $$\exp(-ikr-ik^\prime r^\prime)\delta_{a,b}\delta_{a^\prime,b^\prime}-\exp(ikr^\prime+ik^\prime r)\delta_{a,b^\prime} \delta_{a^\prime, b}.$$
{ "domain": "physics.stackexchange", "id": 39209, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, hilbert-space, second-quantization", "url": null }
java, object-oriented, tic-tac-toe private boolean checkDiag() { StringBuilder d1 = new StringBuilder(); StringBuilder d2 = new StringBuilder(); boolean isOver = false; for(int row=0,col=2;row<3 && col>=0;row++,col--){ d1.append(board[row][row]); d2.append(board[row][col]); if (d1.toString().equals("xxx") || d1.toString().equals("ooo")) isOver=true; if (d2.toString().equals("xxx") || d2.toString().equals("ooo")) isOver=true; } return isOver; } private boolean checkCols() { boolean isOver = false; StringBuilder sb; for(int row=0;row<3;row++){ sb = new StringBuilder(); for(int col=0;col<3;col++){ sb.append(board[col][row]); if (sb.toString().equals("xxx") || sb.toString().equals("ooo")) isOver=true; } } return isOver; } private boolean checkRows() { boolean isOver = false;
{ "domain": "codereview.stackexchange", "id": 15322, "lm_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, object-oriented, tic-tac-toe", "url": null }
quantum-field-theory, path-integral, propagator, regularization, wick-rotation Wick Rotation First we change $t \rightarrow i \tau$ which has the following effect \begin{equation} Z[J(i\tau,\vec{x})]=\int \mathcal{D}\phi e^{-\int (\mathcal{L}_E-J\phi)d^4x} \end{equation} That is: the $dt=id\tau$ gives a minus sign in the exponential and the Lagrangian becomes euclidean. Since this was only a change of variables the integral is still ill-defined (acording to the change of variables $t=i\tau$ the new variable $\tau$ should be complex so we have the same problem as before. However, we now analitically continuate to the complex plane and make $\tau$ a real number so that the integral actually converges. Then we can do all the calculations and go back to real time evaluating $J$ in the right variable at the end. $i\epsilon$ Prescription
{ "domain": "physics.stackexchange", "id": 55367, "lm_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, path-integral, propagator, regularization, wick-rotation", "url": null }
c++, recursion, unit-testing, boost, c++20 BOOST_AUTO_TEST_CASE(vector_test_7dimension_char) { constexpr int nested_layer = 7; constexpr int element_count = 3; typedef char TestType; TestType input = 1; BOOST_TEST((n_dim_container_generator<std::vector, nested_layer, element_count, TestType>(input)) == (n_dim_vector_generator<nested_layer, TestType>(input, element_count))); BOOST_TEST(true); } BOOST_AUTO_TEST_CASE(vector_test_7dimension_int) { constexpr int nested_layer = 7; constexpr int element_count = 3; typedef int TestType; TestType input = 1; BOOST_TEST((n_dim_container_generator<std::vector, nested_layer, element_count, TestType>(input)) == (n_dim_vector_generator<nested_layer, TestType>(input, element_count))); BOOST_TEST(true); } BOOST_AUTO_TEST_CASE(vector_test_7dimension_short) { constexpr int nested_layer = 7; constexpr int element_count = 3; typedef short TestType; TestType input = 1;
{ "domain": "codereview.stackexchange", "id": 40088, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, recursion, unit-testing, boost, c++20", "url": null }
c++, object-oriented, game, playing-cards switch (_pile.getTopCard()._rank) { case Rank::Two: { printInformationAboutThePlayerAndTheTopCardFromPile(player, Rank::Two); std::cin >> cardNumber; if (!cardNumber) receiveCardsFromDeck(player, neededCardsToPickForTwo); else if (player.getCard(cardNumber)._rank == Rank::Four && player.getCard(cardNumber).isCompatibleWith(_pile.getTopCard())) putCardToPile(player, cardNumber); else { validatePlayerCardCompatibilityWithPileTopCard(player, cardNumber); if (!cardNumber) receiveCardsFromDeck(player, neededCardsToPickForTwo); else putCardToPile(player, cardNumber); } break; } case Rank::Three: { printInformationAboutThePlayerAndTheTopCardFromPile(player, Rank::Three); std::cin >> cardNumber;
{ "domain": "codereview.stackexchange", "id": 31130, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, game, playing-cards", "url": null }
boost /usr/include/boost/bind/bind.hpp: In member function ‘void boost::_bi::list3<A1, A2, A3>::operator()(boost::_bi::type<void>, F&, A&, int) [with F = boost::_mfi::mf2<void, PointCloudBuilder, const geometry_msgs::PoseStampedConstPtr&, const geometry_msgs::Pose2DConstPtr&>, A = boost::_bi::list9<const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::Pose2D_<std::allocator<void> > >&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&>, A1 = boost::arg<1>, A2 = boost::arg<2>, A3 = boost::_bi::value<PointCloudBuilder*>]’:
{ "domain": "robotics.stackexchange", "id": 7718, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "boost", "url": null }
enzymes, enzyme-kinetics Why is this true? This would mean that at equilibrium half of the binding sites are occupied? As the other answer says, it is true for a simplified model. The model you describe has only one ligand binding site per protein, which makes it the most simple model there is. It doesn't mean that this is the case at equilibrium as you asked. This is because Kd is not necessarily equal to [L] at equilibrium. Hopefully this simple derivation will help: As you said, we know the formula for the dissociation constant: Kd = [P][L]/[PL] Suppose [L] = Kd. If we plug back into the equation above we get: [L] = [P][L]/[PL] Doing some algebra we can derive: [P] = [PL] Therefore, at equilibrium, when [L] = Kd, the amount of free protein ([P]) and the amount of ligand-bound protein ([PL]) are equal. In other words, half of the protein is bound to ligand, which is exactly what you were asking about.
{ "domain": "biology.stackexchange", "id": 6428, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "enzymes, enzyme-kinetics", "url": null }
particle-physics, charge, conservation-laws, mass-energy, antimatter $1.$ There is No "Turning a Particle Into Energy" There is no meaning that can be attached to the phrase "turn a particle into energy". Energy is not some kind of a supernatural spirit of its own that can float around without a physical conduit. Energy is simply a specific measurable property of systems. There is no energy on its own, you have the energy of an electron, the energy of a proton, the energy of an electromagnetic wave, etc. An analogy would be the names of people. There is no name on its own, there are only names of people. $2.$ There is No "Turning Mass Into Energy" Either
{ "domain": "physics.stackexchange", "id": 86976, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, charge, conservation-laws, mass-energy, antimatter", "url": null }
Last edited: Sep 19, 2004 13. Sep 19, 2004 mathwonk well, after several tries, i still do not see what convergence has to do with this problem. however the reason there is no polynomial formula for the sum seems to be that the partial sums of the series oscillates infinitely often between positive and negative values, as no polyonmial ever does. i.e. there is no polynomial in n, that is positive for all odd values of n and negative for all even values of n, or vice versa. so the problem, as posed, has no solution as a finite polynomial formula. Last edited: Sep 19, 2004 14. Sep 19, 2004 mathwonk so just multiply metacristi's formula that works for even n, by the factor absolute value of cos(npi/2) and multiply his formula for the odd case, by absolute value of cos([n+1]pi/2). that should give one "formula" that works for all n. i.e. |cos(npi/2)|(-2n^2) + |cos([n+1]pi/2)| (1+2[n^2-1]). if you do not like absolute values you can multiply by (1/2)[1 plus or minus cos(npi)].
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9802808701643914, "lm_q1q2_score": 0.8082042567198721, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 966.9360921753578, "openwebmath_score": 0.8182647228240967, "tags": null, "url": "https://www.physicsforums.com/threads/sum-of-a-series.43455/" }
c++, algorithm, c++14, rags-to-riches Title: Simple linear equation solver In working on a review for Solve a set of "restricted" linear equations efficiently, I decided to reimplement from scratch using the method I proposed in my answer. The application I won't repeat the entire specification here, but in a nutshell, this program is intended to solve a very restricted system of linear equations. In particular, each equation is specified to be of the following format: var = var|value [+ var|value]*
{ "domain": "codereview.stackexchange", "id": 24882, "lm_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++, algorithm, c++14, rags-to-riches", "url": null }
homework-and-exercises, electricity I would start with $T$. It doesn't really matter what you take for $T$, but you do have to be consistent about it. Let's say you want $T$ to be the time it takes the electron to make one complete circuit. OK, now we go through the other formulas. Can we find an interpretation for all of them with this definition of $T$? First compute the energy gained/lost by one electron. That would be $E=qV$, where $V$ is the voltage gained/lost by an electron in that period of time. Actually... to be very precise we only want the energy lost by the electrons as they moved through the appliance, we don't want the energy gained by the electron as it went through the battery. With that caveat, a single electron loses $e V_0$ of energy, where $V_0$ is the voltage of the battery. Then, how much energy does the device use in that time? Call it $W$. Then use conservation of energy. All the energy the device used came from electrons. So $W=NqV_0$, where $N$ is the number of electrons that are in the wire.
{ "domain": "physics.stackexchange", "id": 46099, "lm_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, electricity", "url": null }
javascript, beginner, quiz function renderQuestions() { aQuestion = document.getElementById("thisQuestion"); aChoices = document.getElementsByTagName("label"); bChoices = document.getElementsByTagName("input"); if(count < allQuestions.length){ allQuest = allQuestions[count].question; count++; } else{ alert("You have a total of " + sumPoints + "/4" + " correct answers!"); finished(); } aQuestion.innerHTML = allQuest; //render the choices and structure for(var i = 0; i < allQuestions.length; i++){ aChoices[i].innerHTML = allQuestions[zCount].choices[i]; } zCount++; } renderQuestions() //render first question function checkAnswer() {
{ "domain": "codereview.stackexchange", "id": 15145, "lm_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, beginner, quiz", "url": null }
r t_prag_top_total_income_10<-decili_total_income_neto\[1,1\] t_prag_top_total_income_filter_10<-filter(data2, NET_INCOME>= 0, NET_INCOME<= t_prag_top_total_income_10) t_prag_top_total_income_filter_10_tax<-sum(t_prag_top_total_income_filter_10$TAX) t_tax_share_10<-((t_prag_top_total_income_filter_10_tax)/ZBIR_TOTAL_TAX)*100 t_prag_top_total_income_filter_10<-sum(t_prag_top_total_income_filter_10$NET_INCOME) t_prag_top_total_income_filter_10a<-nrow(filter(data2, NET_INCOME>= 0, NET_INCOME<= t_prag_top_total_income_10)) t_prag_top_total_income_10b<-((t_prag_top_total_income_filter_10)/ZBIR_TOTAL_NET_INCOME)*100 FINAL_DECILE_TABLE<-data.frame(cbind(t_prag_top_total_income_10,t_prag_top_total_income_filter_10,t_prag_top_total_income_filter_10a,t_prag_top_total_income_10b,t_prag_top_total_income_filter_10_tax , t_tax_share_10))
{ "domain": "codereview.stackexchange", "id": 33177, "lm_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", "url": null }
cross-compiling Title: Error while cross-compiling rospkg for arm Hello,I want to cross compile rospackage for arm.I do following the website http://answers.ros.org/question/191070/compile-roscore-for-arm-board/ . I have created rostoolchain.cmake file like this: cmake_minimum_required(VERSION 2.4.6) include($ENV{ROS_ROOT}/core/rosbuild/rostoolchain.cmake) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_C_COMPILER /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-gcc) set(CMAKE_CXX_COMPILER /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-g++) set(CMAKE_FIND_ROOT_PATH /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain) set(CMAKE_LIBRARY_PATH /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/lib /home/znzx/boost/lib /opt/ros/hydro/lib)
{ "domain": "robotics.stackexchange", "id": 21497, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cross-compiling", "url": null }
ros, navigation, odometry, gps-common, robot-pose-ekf Might wanna double-check my math there, but it ought to be something like that. Note that this assumes a robot navigating in 2D, and only really addresses the variances for X and Y. Originally posted by Tom Moore with karma: 13689 on 2014-08-05 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by l0g1x on 2014-08-05: I am simultaneously trying to get the robot_localization package to work as well, except i dont understand how to get it all to work even after the tutorials. How can you set one covariance matrix in the launch file for all sensor inputs? I am getting really erratic data from its output. Comment by Tom Moore on 2014-08-05: You don't manually set covariances with it. Feel free to ask a new question about it, or shoot me an e-mail (see the package wiki page) and we'll sort it out and then post the question and answer.
{ "domain": "robotics.stackexchange", "id": 18913, "lm_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, navigation, odometry, gps-common, robot-pose-ekf", "url": null }
It is easy to dispose of the cases $k<1/2$ and $k>1/2$ using the equations $$f(0)+kf'(c_{1})=f(k)=1=f(k)=f(1)+(k-1)f'(c_{2})$$ The case when $k=1/2$ requires a bit more analysis. If $f'(1/2)>0$ then there is a point $k'>1/2$ such that $f(k') >f(1/2)=1$ and then $$1<f(k')=f(1)+(k'-1)f'(c_{3})$$ so that $|f'(c_{3})|>2$. Similarly we can deal with the case $f'(1/2)<0$. Let's consider the case when $f'(1/2)=0$ and $f(1/2)=1$ is the maximum value of $f$ in $[0,1]$. If $f'(c) \leq 2$ for all $c\in(0,1/2)$ then we can see that $$f(x)=f(0)+xf'(c)\leq 2x,f(x)=f(1/2)+(x-1/2)f'(d)\geq 1+2(x-1/2)=2x$$ so that $f(x) =2x$ for all $x\in[0,1/2]$ and this contradicts $f'(1/2)=0$. Thus we must have some point $c\in(0,1/2)$ for which $f'(c) >2$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759626900699, "lm_q1q2_score": 0.8375824863115992, "lm_q2_score": 0.8539127455162773, "openwebmath_perplexity": 152.01790370164318, "openwebmath_score": 0.855697751045227, "tags": null, "url": "https://math.stackexchange.com/questions/2523322/prove-that-there-exist-c-in-0-1-such-that-fc2" }
philosophy, agi, artificial-consciousness, incompleteness-theorems, turing-machine The mathematician has one advantage over a standard theorem proving algorithm: the mathematician can "step out of the system" (as Douglas Hofstadter called in Gödel, Escher, Bach), and start thinking about the system. From this point of view, the mathematician may find that the derivation is impossible. However, an AI for proving theorems could be programmed to recognize patterns in the derivation, just like our hypothetical mathematician, and start reasoning about the formal system to derive properties of the formal system itself. Both the AI and the mathematician would still be bound by the laws of mathematics, and not be able to prove a theorem if it was mathematically improvable.
{ "domain": "ai.stackexchange", "id": 4, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "philosophy, agi, artificial-consciousness, incompleteness-theorems, turing-machine", "url": null }