text
stringlengths
1
1.11k
source
dict
java, recursion, tree /** * Public method to return the data stored in the node * @return The data stored in the node */ public T getData() { return data; } /** * Public method to return the colour of the node * @return The colour of the node */ public char getColour() { return colour; } /** * Public method to return the left child of the node * @return The left child of the node */ public RBNode<T> getLeftChild() { return leftChild; } /** * Public method to return the right child of the node * @return The right child of the node */ public RBNode<T> getRightChild() { return rightChild; } /** * Public method to return whether or not this node has been deleted. * Used by the RBTree contains method. * @return True if the node has been deleted, false otherwise */ public boolean isDeleted() { return deleted; }
{ "domain": "codereview.stackexchange", "id": 11732, "lm_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, recursion, tree", "url": null }
performance, primes, lisp, scheme, sicp (define (miller-rabin-test n) (define (try-it b) (if (and (= b 1) (> n 2)) (miller-rabin-test n) (= (expmod b (- n 1) n) 1))) (try-it (random 1 n))) (define (fast-prime? n times) (or (= times 0) (and (> times 0) (miller-rabin-test n) (fast-prime? n (- times 1))))) You've corrected the error of not taking the remainder of the square. There's no need to define a function square just to save one call to *. You've converted your recursive expmod into iterative code; although I wouldn't call the former "horrible" since its complexity is only logarithmic, so recursion depth is kept in check. Assuming you're using Racket, (+ 1 (random (- n 1))) can be written simply (random 1 n). You've kept the awkward encoding for fast-prime? which is more naturally coded directly with the logical connectives. Will think over some more with regards to its correctness, that you ask about.
{ "domain": "codereview.stackexchange", "id": 21751, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, primes, lisp, scheme, sicp", "url": null }
context-free, context-sensitive, chomsky-hierarchy Title: Doubt regarding Chomsky Hierarchy, CFG and CSG I was following a discussion on a website, where a fellow scholar claims that this grammar S→ aAa | bAb | ϵ A→aA | bA |ϵ is not CSG, so it should also NOT be a CFG. But this grammar properly satisfies the rules of CFG according me, on the other hand it fails to satisfy the conditions of CSG, which states that-- In addition, a rule of the form S → λ where λ represents the empty string and S does not appear on the right-hand side of any rule is permitted So the given grammar is definitely not in CSG. But According to chomsky hierarchy
{ "domain": "cs.stackexchange", "id": 14567, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "context-free, context-sensitive, chomsky-hierarchy", "url": null }
ros, eigen, package.xml, cmake, ros-indigo /usr/include/eigen3/Eigen/src/Cholesky/LDLT.h:543:64: error: ‘bAndX’ was not declared in this scope bool LDLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const ^ /usr/include/eigen3/Eigen/src/Cholesky/LDLT.h: In member function ‘MatrixType Eigen::LDLT<_MatrixType, _UpLo>::reconstructedMatrix() const’: /usr/include/eigen3/Eigen/src/Cholesky/LDLT.h:559:61: error: there are no arguments to ‘eigen_assert’ that depend on a template parameter, so a declaration of ‘eigen_assert’ must be available [-fpermissive] eigen_assert(m_isInitialized && "LDLT is not initialized."); ^ /usr/include/eigen3/Eigen/src/Cholesky/LDLT.h:565:25: error: there are no arguments to ‘transpositionsP’ that depend on a template parameter, so a declaration of ‘transpositionsP’ must be available [-fpermissive] res = transpositionsP() * res; ^
{ "domain": "robotics.stackexchange", "id": 22429, "lm_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, eigen, package.xml, cmake, ros-indigo", "url": null }
performance, assembly, x86 Changes Not Implemented: Use Memory Efficiently: One suggested improvement, was to eliminate the necessity of separate input and output buffers, by reading data directly into place, and carrying out the necessary processing from within the one memory buffer. However, I do not think that this is possible, as for each byte read from file, two bytes are written to stdout. Attempting to convert the characters in situ, would mean overwriting the second character, during the conversion of the first, and so on and so forth. For example, when reading char “A” from file, the underlying binary stored in memory, is 41h, one byte. In order to print “41” to the terminal, the single byte read from file, is converted to two bytes, 3431h. If the conversion was done ‘in place’, the byte 31h would overwrite the second byte read from file, before it had been processed.
{ "domain": "codereview.stackexchange", "id": 31715, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, assembly, x86", "url": null }
• For this question, it doesn't matter that the hanging weight is larger than the resting weight. The result (excepting its magnitude) will be the same. Oct 3 '15 at 11:45 • BTW: this is an example of the way to ask a very basic question on Physics. The focus is on physics and not on a particular incarnation of the problem. Oct 3 '15 at 17:48 • Also, the final answer will depend a bit on whether the hanging mass runs on a rail down the side or is free to swing. Oct 3 '15 at 17:49 • @dmckee In what way does it alter the outcome? Oct 3 '15 at 20:24 • Well, it doesn't change the answer to "Does it move?", but it does change the answer to "How far has it gone before the falling block hits the ground? And how fast is it moving at that time?" because the falling block is no longer constrained to have the same horizontal velocity as the cart. Oct 3 '15 at 20:28 Yes, the cart will move, due to the force applied by the string to the pulley.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9458012671214072, "lm_q1q2_score": 0.8076317619947421, "lm_q2_score": 0.8539127510928476, "openwebmath_perplexity": 254.5390970796982, "openwebmath_score": 0.46886196732521057, "tags": null, "url": "https://physics.stackexchange.com/questions/210434/pulley-system-on-a-frictionless-cart" }
electromagnetic-radiation, frequency, discrete Title: Is frequency discrete? We know that E = hv E = photon energy h = Planck constant v = frequency We also know that photon energy E can only come in discrete values (quanta). Does the combination of these two assumptions then determine that frequency, v can only come in discrete values as well? ====== Note on research: There are Phys.SE questions that are similar to mine, but none seem satisfactory, in terms of explaining how the equation can only take on discrete values. You say: We also know that photon energy E can only come in discrete values (quanta). but this is not true. It is generally true that the energy of a bound system takes discrete values, but the energy of a free system has a continuous range and can take any value. Since for such a system the energy is not discrete it follows that the frequency is not discrete either.
{ "domain": "physics.stackexchange", "id": 35324, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetic-radiation, frequency, discrete", "url": null }
quantum-field-theory, resource-recommendations Zeidler E., Quantum field theory, Vol. 1, 2 and 3. Initially intended to be a six-volume set, although I believe the author only got to publish the first three pieces, each of which is more than a thousand pages long! Needless to say, with that many pages the book is (painfully) slow. It will gradually walk you through each and every aspect of QFT, but it takes the author twenty pages to explain what others would explain in two paragraphs. This is a double-edged sword: if your intention is to read the whole series, you will probably find it annoyingly verbose; if, on the other hand, your intention is to review a particular topic that you wish to learn for good, you will probably find the extreme level of detail helpful. To each their own I guess, but I cannot say I love this book; I prefer more concise treatments. Other.
{ "domain": "physics.stackexchange", "id": 72374, "lm_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, resource-recommendations", "url": null }
thermodynamics, fluid-dynamics, pressure, liquid-state Any information on what type of textbooks would have this information would also be very useful! Let the volume of the cuvette be $V_C$ and the original volume of the compressible tube be $V_T$. If the cuvette is so rigid that its volume doesn't change under pressure and the volume of fluid in the compressible tube is reduced to 15% of the original volume, then the fluid volume ratio is $$\frac{(V_C+0.15V_T)}{V_C+V_T}=1-\frac{0.15V_T}{V_C+V_T}=\exp{[-\beta (P-P_0)]}$$where $\beta$ is the bulk compressibility of the fluid. If the volume change can be brought about by a relatively modest pressure increase, this equation approximately reduces to: $$(P-P_0)=\frac{1}{\beta}\frac{0.15V_T}{(V_C+V_T)}$$
{ "domain": "physics.stackexchange", "id": 59017, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, fluid-dynamics, pressure, liquid-state", "url": null }
ros, joy-node Originally posted by Marcus Barnet on ROS Answers with karma: 287 on 2016-02-16 Post score: 1 One very simple implementation of what you're interested in is available here: updateCommand takes in a speed and angular rate in the range [-1.0,1.0] (which can be directly mapped to joystick axes) and generates left and right wheel int8_t commands in the range [-127,127]. You'd basically just have to substitute the "127" for a "100" as far as I can see. A message containing the left and right wheel command is sent to an Arduino via rosserial_arduino. This is then used to apply PWM to the motors on the Arduino side via this code in the command callback. Originally posted by Stefan Kohlbrecher with karma: 24361 on 2016-02-16 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 23782, "lm_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, joy-node", "url": null }
beginner, rust Title: Simple array "manager" I'm new to Rust, coming from C++, and so to increase my knowledge of Rust I made a small program to manage an array. You can add, insert, delete, print and more an array or its elements. I don't really care much about performance at this point, but more on readability, good practices and so on. So, what could I have done better? use std::io; fn get_element() -> i64 { println!("Enter the element: "); let mut element = String::new(); io::stdin().read_line(&mut element).expect("Failed to read line!"); match element.trim().parse() { Ok(num) => num, Err(_) => { println!("Invalid number! Try again."); get_element() } } } fn get_index(length: usize) -> usize { println!("Enter the index: "); let mut index = String::new(); io::stdin().read_line(&mut index).expect("Failed to read line!");
{ "domain": "codereview.stackexchange", "id": 25041, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, rust", "url": null }
arduino, navigation //target points float xt = -300; float yt = -300; //turning angle float turnAngle; //*************** float startingHeading = 0; float currentHeading = startingHeading; //*************** //*************** float turnRight = 1; float turnLeft = -1; float wheelBase = <This is a number you get by measuring your vehicle> float tireRadius = <This is a number you get by measuring your vehicle> float speedModifier = 0; float vRightMotor = 0; float vLeftMotor = 0; float vMotor = 0; float theta = 0; float distance = 0; //************** void setup() { // pin setup Serial.begin(9600); } void loop() { //************* destinationHeading = atan2((yt-yc), (xt-xc)); //calculate turning angle destinationHeading = destinationHeading * 180/3.1415; //convert to degrees turnAngle = destinationHeading - currentHeading; //************* if (turnAngle > 180) { turnAngle = turnAngle-360; } if (turnAngle < -180) { turnAngle = turnAngle+360; }
{ "domain": "robotics.stackexchange", "id": 797, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "arduino, navigation", "url": null }
quantum-mechanics, quantum-field-theory, conservation-laws, charge, antimatter Conversely, if we start from fields with non-simple relations but $[H,Q] = 0$, then elementary representation theory for $\mathrm{U}(1)$ (the symmetry group of the charge numbers we are considering here) suggests that the vector space of fields must decompose into one-dimensional representations. Simply switch basis so that we use the basis vectors of these irreps as your fields and we have arrived at a formulation of the theory with simple commutation relations. So if one reads Weinberg as "it is necessary that for a Hamiltonian that is the sums of products of fields that have conserved charges, a following choice of fields exists", then "necessary" is correct. If one reads him as "the only way to write down such a theory is with fields with simple commutation relations", then it's wrong.
{ "domain": "physics.stackexchange", "id": 63849, "lm_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, conservation-laws, charge, antimatter", "url": null }
That is, let $\ds \lim_{n \mathop \to \infty} x_n = x$. Then: $\ds \lim_{n \mathop \to \infty} \norm {x_n} = \norm x$ ## Proof By the Triangle Inequality, we have: $\cmod {\cmod {x_n} - \cmod l} \le \cmod {x_n - l}$ Hence by the Squeeze Theorem and Convergent Sequence Minus Limit, $\cmod {x_n} \to \cmod l$ as $n \to \infty$. $\blacksquare$
{ "domain": "proofwiki.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308789536605, "lm_q1q2_score": 0.8101619248388024, "lm_q2_score": 0.8198933381139645, "openwebmath_perplexity": 226.8658062714732, "openwebmath_score": 0.9987077713012695, "tags": null, "url": "https://proofwiki.org/wiki/Modulus_of_Limit" }
• Why don't you graph the binomial distribution and superpose the normal, and Poisson approximations, and draw a line at $x=20$? Feb 29, 2016 at 4:45 • @NeilG Although, I am studying for an exam where I won't have access to CAS, I still did exactly what you said using Mathematica just for my own understanding. However, the values are so close (only differ after second decimal place), that all the probabilities appear to be exactly the same. Also, that doesn't explain WHY any approximation is better than the other, it just shows us which one is. Feb 29, 2016 at 4:50 • Those don't like like Poisson and Normal distributions, which are continuous. Also, please graph from 0 to at least 50. Feb 29, 2016 at 5:02
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102561735719, "lm_q1q2_score": 0.8260839550828883, "lm_q2_score": 0.8539127529517043, "openwebmath_perplexity": 622.9645525298937, "openwebmath_score": 0.7647407054901123, "tags": null, "url": "https://stats.stackexchange.com/questions/199067/approximating-binomial-distribution-with-normal-vs-poisson" }
java, cache The Cache's responsibility is cache any kind of object. As long as it's ICacheable??? Here is my problem. As you can see, I create the SourceCode object with the first element of params array (remember the varargs in the above method's signature). IMO, this is not a clean solution, because some objects will use the params array (SourceCode), and others won't use it. I'm rather lost what it's all about. If there's a params array, it sounds OK to me to use just a part of it. Not using it at all is a special case as it's like using a subarray of zero length. Maybe your single cache should be multiple caches, one per class? See also ClassToInstanceMap.
{ "domain": "codereview.stackexchange", "id": 14231, "lm_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, cache", "url": null }
php, object-oriented Here are some example usages based on the above options. The results are from print_r(): $obj = new coreConfig; //*Option 1*: $config1 = $obj->getConfig('php'); // Returns single entire sub array: Array ( [php] => Array ( [current] => 50609 [required] => 50400 [test-index] => php test data ) ) //*Option 2*: $config2 = $obj->getConfig(array('php', 'router')); // Returns 2 entire sub arrays: Array ( [php] => Array ( [current] => 50609 [required] => 50400 [test-index] => php test data ) [router] => Array ( [allowedchars] => A-z [url-prefix] => http:// [test-index] => router test data ) ) //*Option 3*: $config3 = $obj->getConfig(array('php' => array('current', 'test-index'))); // Returns partial sub array: Array ( [php] => Array ( [current] => 50609 [test-index] => php test data ) )
{ "domain": "codereview.stackexchange", "id": 14641, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented", "url": null }
noise Then $W \in \mathbb{R}^{512×512}$ and there are $512$ values of $p_m$. How would I go on from there? As far as I can tell, this $W$ term is $w_m = \frac{(p_m - r_m)^2}{p_m}$ (equation 29). But, the part of the discussion on page 1451 that involves $W$ is to explain how to calculate your $E$ that drives the optimisation detailed in equation 33. between what you "guess" $Hx$ (see "data fidelity term" pages 1440-1441 around equations 1 and 2) and what you measure $ym$. So how image is affected by Poisson noise is one thing and calculating that error term during optimisation is another. Hope this helps.
{ "domain": "dsp.stackexchange", "id": 7048, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "noise", "url": null }
human-biology, immunology, transplantation, immunosuppression mention, I'll mention mycophenolate mofetil and tacrolimus later with regards to how this is feasible biologically; with regards to cyclosporine, this study (admittedly old) has data illustrating the rates of rejection of renal transplants when patients withdrew from or tapered cyclosporine (here for financial reasons, but this drug also has significant adverse effects) and you can see from Figure 1 in the paper that although the patients who withdrew completely had many allograft rejections, those who tapered did not.
{ "domain": "biology.stackexchange", "id": 6148, "lm_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, immunology, transplantation, immunosuppression", "url": null }
# Thread: Functional equationsolving find f(x) 1. ## Functional equationsolving find f(x) Hi, I am trying to solve the following functional equation f(x)-f(2a-x)=b(x-a) considering "a" and "b" are positive constants. 2. ## Re: Functional equationsolving find f(x) there are two parameters so let's try a function of the form $f(x) = c_1 x + c_0$ $c_1 x + c_0 - (c_1(2a-x)+c_0) = b(x-a)$ $2c_1 x - 2 a c_1 = b x - a b$ $2c_1 = b$ $c_1 = \dfrac b 2$ $-2ac_1 = -a b$ $a$ is specified positive so $2c_1 = b$ $c_1 = \dfrac b 2$ and we have agreement in the value of $c_1$ so we have $f(x) = \dfrac b 2 x + c_0$ There are of course higher order polynomials that satisfy this functional relationship but this is the lowest order one. 3. ## Re: Functional equationsolving find f(x) Thanks romsek. I knew that, the second order polynomial also satisfies, but not higher order ones. However to solve the functional equation we need to find all functions, not just examples that satisfy.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9915543738075946, "lm_q1q2_score": 0.8326418884802141, "lm_q2_score": 0.8397339676722393, "openwebmath_perplexity": 455.7383453331717, "openwebmath_score": 0.9496765732765198, "tags": null, "url": "http://mathhelpforum.com/advanced-algebra/280734-functional-equationsolving-find-f-x.html" }
newtonian-mechanics, hamiltonian-formalism, harmonic-oscillator, integrable-systems $ -\frac{\omega_{x}}{\omega_{y}}\cos^{-1}\left(\frac{y}{B}\right)+\cos^{-1}\left(\frac{x}{A}\right)=c$ This quantity $c$ is clearly another integral of motion. But- in general - this does not isolate the region where the motion takes place any further, because $\cos^{-1}z$ is a multiple-valued function. To see this more clearly, let us write $ x=Acos\left\{c+\frac{\omega_{x}}{\omega_{y}}\Big[Cos^{-1}\left(\frac{y}{B}\right)+2\pi n \Big]\right\}$ Where $Cos^{-1}z$ (with an uppercase C) denotes the principal value. For a given value of $y$ we will get an infinite number of $x$'s as we take $n=0, \pm 1, \pm 2, \dots $ Thus, in general, the curve will fill a region in the $(x,y)$ plane.
{ "domain": "physics.stackexchange", "id": 15453, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, hamiltonian-formalism, harmonic-oscillator, integrable-systems", "url": null }
ros, pluginlib, roscpp, ros-indigo Then, I've removed "src/PositionNodelet.cpp" from the "set (LIB_SOURCES ...)" command and now it works fine. Originally posted by lucascoelho with karma: 497 on 2019-04-23 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 32920, "lm_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, pluginlib, roscpp, ros-indigo", "url": null }
# Best constant approximations in $C[0,1]$, $L^1[0,1]$, $L^2[0,1]$ Let $f(t)=t^2$. Find the best approximation to $f(t)$ over $[0,1]$. Consider the Banach space $(C[0,1],\|\cdot\|_\infty)$. Then the best constant approximation, in my understanding, should be $g(t)\equiv 1$, since $$\left\|t^2\right\|_\infty=1$$ In $\left(L^1[0,1], d_1\right)$ we have $$\int_0^1|t^2|dt=\int_0^1t^2dt=\frac{1}{3}$$ So the best approximation in this case is $g(t) \equiv \frac13$. In $\left(L^2[0,1], d_2\right)$ we have $$\left(\int_0^1t^4dt\right)^{1/2}=\frac{1}{\sqrt{5}}$$ So the best approximation in this case is $g(t) =\frac{1}{\sqrt{5}}$. Please let me know if my understanding is correct. Also, it is noted that the result for $L^2[0,1]$ can be obtain in at least two ways. What could a second way possibly be? I'd appreciate a hint on this.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676454700793, "lm_q1q2_score": 0.803222967463957, "lm_q2_score": 0.8198933293122507, "openwebmath_perplexity": 87.1739594546353, "openwebmath_score": 0.9420205950737, "tags": null, "url": "https://math.stackexchange.com/questions/2537392/best-constant-approximations-in-c0-1-l10-1-l20-1" }
ros, opencv, ros-electric Original comments Comment by Patrick Mihelich on 2012-03-19: imgproc.hpp is installed under /usr/include/opencv-2.3.1/opencv2/imgproc/. What is your question? Is your build failing? If so, copy-paste the error messages into your question. Comment by jcc on 2012-03-19: no the build is not falling, but it didn't fail when using the ROS opencv2. I only want to check if i'm using the system dependecy of opencv and not the ROS Package opencv2. I'm woried that in a future upgrade the program stops working because it still was suported by the ROS package. Comment by jcc on 2012-03-19: oh and also. i didn't do the step 2 of the guide. I don't understand what i have to do there.
{ "domain": "robotics.stackexchange", "id": 8632, "lm_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, opencv, ros-electric", "url": null }
Example 2 Find the determinant of each of the following matrices a) $A = \begin{bmatrix} 3 & 0 & 0 \\ 1 & -1 & 0 \\ -2 & 3 & 2 \end{bmatrix}$      b) $B = \begin{bmatrix} x & 0 & 1 \\ 0 & x+1 & 1 \\ 0 & 0 & x \end{bmatrix}$      c) $C = \begin{bmatrix} -1 & 0 & 0 & 0\\ 5 & -9 & 0 & 0\\ 5 & 4 & 7 & 0\\ 5 & 0 & 0 & 0 \end{bmatrix}$ Solution a) Matrix $A$ is a lower triangular matrix and therefore its determinant is equal to the product of its entries in the main diagonal. Hence $Det(A) = (3)(-1)(2) = -6$ b) Matrix $B$ is an upper triangular matrix and its determinant is is equal to the product of its entries in the main diagonal. Hence $Det(B) = x(x+1)x = x^3 + x^2$ c) Matrix $C$ is a lower triangular matrix and its determinant is is equal to the product of its entries in the main diagonal. Hence $Det(C) = (-1)(-9)(7)(0) = 0$
{ "domain": "analyzemath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9933071490757152, "lm_q1q2_score": 0.8121025765201408, "lm_q2_score": 0.8175744806385543, "openwebmath_perplexity": 156.52815957096396, "openwebmath_score": 0.9260660409927368, "tags": null, "url": "https://www.analyzemath.com/linear-algebra/matrices/triangular.html" }
php, codeigniter Title: Codeigniter 3: how can I avoid repeating this chunk of code in my controllers? I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. Several entities are present in all controllers (except Login.php and Register.php): static data, categories and pages. $data = $this->Static_model->get_static_data(); $data['pages'] = $this->Pages_model->get_pages(); $data['categories'] = $this->Categories_model->get_categories();
{ "domain": "codereview.stackexchange", "id": 34109, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, codeigniter", "url": null }
ros, stereo-camera, stereo, stere-image-proc, pointcloud Title: Getting point cloud from image_rect_color using stereo_image_proc I have a bag publishing left and right camera_info and image_rect_color topics. How can I use stereo_image_proc to get the point cloud? stereo_image_proc/disparity nodelet subscribes to image_rect and gives out disparity, which can be used by the stereo_image_proc/point_cloud2 nodelet. Do I need to modify the source code, make a custom launch file or this can be done via an easier way that I am unable to see immediately? Afai understand, I have to convert to mono image and then maybe remap or publish to the relevant topic. ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc -> here the whole node subscribes to raw images which I don't have as a topic. Originally posted by ratneshmadaan on ROS Answers with karma: 71 on 2015-09-27 Post score: 0
{ "domain": "robotics.stackexchange", "id": 22717, "lm_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, stereo-camera, stereo, stere-image-proc, pointcloud", "url": null }
computability, artificial-intelligence, halting-problem What the halting problem says is that given any program $I$ ("I" for "intelligent"), (say a really complicated AI program written in Netbeans) that looks for infinite loops we can produce a program that $I$ can't analyze. The way we do this is a clever technique called diagonalization, which is described in the question @Raphael linked: How to show that a function is not computable?, and also in Why, really, is the Halting Problem so important? The halting problem is similar to the Liar's Paradox in that it demonstrates the limits of mathematical and logical definitions of "truth", and "provability". The Liar's Paradox is: suppose I say "this statement is a lie." Is that statement true or false? If it is true then it must be a lie, so must be false. If it is false, then it is not a lie, so must be true. Writing a complicated artificial intelligence (or relying on a really smart person) won't make the question about whether I lied or not any more meaningful.
{ "domain": "cs.stackexchange", "id": 4275, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computability, artificial-intelligence, halting-problem", "url": null }
forces, classical-mechanics, work, potential-energy, conservative-field Title: Meaning of "a force that derives from potential energy" In mechanics course, when the idea of equilibrium was introduced they included the idea of a force that derives from potential energy which is the force $F$ which is related to the potential energy $E_p$ by the relation: $$F=-\nabla E_p$$ I didn't understand at all the physical meaning of such a definition. Any help in such an explanation (physical meaning) is appreciated. Any force $\vec{F}$ that can be represented by a gradient $\nabla$ of a scalar field $V$ is called a "conservative force". But why is this definition important? Let's try to derive the work done by this force $\vec{F}$. For any force, we have the following from the definition of "work": $$W = \int_\mathcal{C} \vec{F}\cdot\vec{d}l$$ for a given path $\mathcal{C}$. Now, if our force can be written as $\vec{F}=-\nabla V$, we have $$W = \int_\mathcal{C} (-\nabla V)\cdot d\vec{l}$$
{ "domain": "physics.stackexchange", "id": 58383, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, classical-mechanics, work, potential-energy, conservative-field", "url": null }
ros-diamondback ii libqt4-designer 4:4.7.0-0ubuntu4.3 Qt 4 designer module ii libqt4-dev 4:4.7.0-0ubuntu4.3 Qt 4 development files ii libqt4-help 4:4.7.0-0ubuntu4.3 Qt 4 help module ii libqt4-network 4:4.7.0-0ubuntu4.3 Qt 4 network module ii libqt4-opengl 4:4.7.0-0ubuntu4.3 Qt 4 OpenGL module ii libqt4-opengl-dev 4:4.7.0-0ubuntu4.3 Qt 4 OpenGL library development files ii libqt4-qt3support 4:4.7.0-0ubuntu4.3 Qt 3 compatibility library for Qt 4
{ "domain": "robotics.stackexchange", "id": 6380, "lm_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-diamondback", "url": null }
bioinformatics, cardiology, action-potential Is this how I am thinking it correct or I just got lost in my own thoughts and it is easier than I make it look? My question is: How do I get the cardiac excitation threshold using stimulus1 and stimulus2 and how can I incorporate the theory in my C++ code. You wouldn't normally apply the stimuli simultaneously. The idea is to apply stimulus1, which has a given amplitude and duration, and follow that with stimulus2, which also has a given amplitude and duration, after a variable lag. You'll then see that the effective refractory period is dependent on the amplitude of stimulus2 (at least until you hit the absolute refractory period).
{ "domain": "biology.stackexchange", "id": 2916, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bioinformatics, cardiology, action-potential", "url": null }
beginner, android, kotlin, graphics coordinatesX < 0 -> { touchCoordinates.x = 0 colorAtTouchCoordinates = colorPickerViewBitmap.getPixel(0, coordinatesY.toInt()) } coordinatesX >= colorPickerViewBitmap.width -> { touchCoordinates.x = width - 1 colorAtTouchCoordinates = colorPickerViewBitmap.getPixel(colorPickerViewBitmap.width - 1, coordinatesY.toInt()) } coordinatesY < 0 -> { touchCoordinates.y = 0 colorAtTouchCoordinates = colorPickerViewBitmap.getPixel(coordinatesX.toInt(), 0) } coordinatesY >= colorPickerViewBitmap.height -> { touchCoordinates.y = height - 1 colorAtTouchCoordinates = colorPickerViewBitmap.getPixel(coordinatesX.toInt(), colorPickerViewBitmap.height - 1) }
{ "domain": "codereview.stackexchange", "id": 43817, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, android, kotlin, graphics", "url": null }
html, web-scraping, xpath, xslt The intermediate "up-converted" form could be JSON or XML, or you could do XML to JSON conversion as another processing phase between the other two. The more you can split your complex task into a sequence of simpler tasks, the easier it will be. I can't see where the problem with "mode" arose, but then I'm not sure whether the XSLT code shown is before or after the change you describe. SaxonJS, however, is less "smart" about apply-templates than SaxonJ, it's more inclined to do a complete search of all the template rules in the chosen mode. This might be the issue, but I don't see a large number of template rules, so I may have got the wrong end of the stick. It's unclear to me, reading your post again, whether this is a problem in achieving the functionality required, or in writing good XSLT code to achieve it, or in achieving improved performance. In short, it's not really clear what your problem is: perhaps you need to address one concern at a time.
{ "domain": "codereview.stackexchange", "id": 42818, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, web-scraping, xpath, xslt", "url": null }
python, python-3.x, csv from html import unescape from datetime import datetime start_time = datetime.now() p_filename = re.compile(r"[./\\]") p_last_word = re.compile(r"^.*\b(?<!-)(\w+(?:-\w+)*)[^\w]*$", re.U) p_sentence = re.compile(r"<sentence>(.*?)</sentence>") p_typography = re.compile(r" (?:(?=[.,:;?!) ])|(?<=\( ))") p_non_graph = re.compile(r"[^\x21-\x7E\s]") p_quote = re.compile(r"\"") p_ellipsis = re.compile(r"\.{3}(?=[^ ])") As for splitting up functions, I don't personally think that's necessary as your functions aren't overly long and it's a relatively specific process without a lot of repeating code, so I would keep to the two separate ones you have here.
{ "domain": "codereview.stackexchange", "id": 15366, "lm_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, csv", "url": null }
modulation, forward-error-correction Like designing any reliable communications system, designing reliable deep space communications requires more than just adding powerful FEC. Signal power, free-space path loss, receiver noise, etc., must be taken into consideration. Deep space communications actually have a lot of advantages and two enormous disadvantages. The disadvantages are the enormous distance and the limited transmitter power. The advantages are the really high-gain directional antennas, the low noise that the earth dishes get from looking into empty space, the even lower noise they get by cooling their receivers with liquid nitrogen, etc. They can also slow down their data rate while keeping the transmitted power constant to give each bit more energy.
{ "domain": "dsp.stackexchange", "id": 2153, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "modulation, forward-error-correction", "url": null }
organic-chemistry, nomenclature, carbonyl-compounds, cyclohexane I cite various definitions from within the Gold Book, the following two being of particular importance: IUPAC - chain (Note 2). https://goldbook.iupac.org/terms/view/C00946 IUPAC - end-group. https://goldbook.iupac.org/terms/view/E02092 To address one of the comments in particular: it should be noted that nowhere in the Gold Book is there an authoritative definition of the term "ring." That would make claim that "according to IUPAC a ring cannot be a chain," already dubious based on the definition I cited above, even less likely to be the case -- they certainly aren't going to "prohibit" something they don't even define.
{ "domain": "chemistry.stackexchange", "id": 15047, "lm_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, nomenclature, carbonyl-compounds, cyclohexane", "url": null }
beginner, c, validation, file, formatting strcpy(ErrorLine, DataLine); On closer look, I see that both ErrorLine and DataLine have the same size, so it should be ok, but it would be better if this was obvious without thinking, by using strncpy, and using a named constant as the size parameter, the same constant used in the declaration of the destination array (as I pointed out in the previous point).
{ "domain": "codereview.stackexchange", "id": 9787, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, validation, file, formatting", "url": null }
experimental-chemistry, equipment of the tube, and this time, air jacketed it before do slow heating and get accurate reading. Whole this process is just to save your time and energy. That air jacket make long time to make your freezing tube with solvent cool (prime example: Dewar flask, with vacuum though). And, imagine if you have to stir that whole time with one stroke per second?
{ "domain": "chemistry.stackexchange", "id": 9938, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "experimental-chemistry, equipment", "url": null }
groundwater, hydrogeology Title: Where on Earth does paleo-groundwater exist? Where on Earth do we expect to find very old groundwater (infiltrated thousands of years ago)? In large intracontinental basins where the main rock formations are exposed in adjoining highlands and rare deeply buried within the basin itself. The Madison Limestone is an example. The Madison and its equivalent strata extend from the Black Hills of western South Dakota to western Montana and eastern Idaho, and from the Canada–United States border to western Colorado and the Grand Canyon of Arizona. From Wikipedia. Ground-water ages vary from virtually modern to about 23,000 yr. The 14C ages indicate flow velocities of between 7 to 87 ft/yr. Hydraulic conductivities based on average carbon-14 flow velocities are similar to those based on digital simulation of the flow system (Downey, 1984). From: Geochemical Evolution of Water in the Madison Aquifer in Parts of Montana, South Dakota, and Wyoming
{ "domain": "earthscience.stackexchange", "id": 1230, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "groundwater, hydrogeology", "url": null }
obtuse or right angle of new, high-quality pictures added every day scalene. Collinear vertices ) is the same i ) equilateral triangle: if two are... The area of a scalene triangle is a kind of acute triangle click. ) What type of triangle where all sides are equal, then it is an obtuse triangle definition, triangle! High-Quality pictures added every day to draw a triangle with three sides all of different.... Select the Freeform tool is because scalene triangles, by definition, lack special properties as! This goose ; it ’ s scalene and obtuse is possible for an triangle. Possible for an obtuse triangle is a triangle where all sides of different measures t draw than. Of different measures if three sides all of different lengths reduced equations for equilateral, isosceles and scalene Yes but... Called right if a ninety degree angle is inside or right triangle as long as none the. ’ s scalene and obtuse triangle, and is always equilateral foot of this ;...: it is an obtuse triangle
{ "domain": "com.br", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540692607815, "lm_q1q2_score": 0.8343634415851212, "lm_q2_score": 0.8519528000888387, "openwebmath_perplexity": 822.874777669038, "openwebmath_score": 0.573951244354248, "tags": null, "url": "http://mooboo.com.br/guardian-meaning-xhxdp/grnhj3.php?tag=scalene-obtuse-triangle-ddef80" }
# Largest inscribed rectangle in sector What is the largest (by area) rectangle that can be inscribed in a circular sector wiith radius $r$ and central angle $\alpha$? I think I have an answer to this question, but would like it confirmed. It is well known that the largest rectangle in a semi-circle (where the central angle $\alpha = \pi$) has the dimensions $x= \sqrt{2}r$ and $y=\frac{\sqrt{2}}{2}r$. For sector angles larger than $\pi$, i.e for $\pi \lt \alpha \lt 2\pi$, this remains the largest rectangle, as no rectangle can bend around or encompass the circle's center (see figure below). For sectors smaller than a semi-circle, i.e. for $0 \lt \alpha \lt \pi$ we have the following situation: After setting up equations for x and y (dependent on $\theta$ and $\alpha$), setting area $A = xy$ and differentiating, I find that the maximum area rectangle occurs when $$\theta = \frac{\alpha}{4}$$ Can anyone confirm this is correct?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9910145733704833, "lm_q1q2_score": 0.825836812148989, "lm_q2_score": 0.8333245891029457, "openwebmath_perplexity": 245.38458214242493, "openwebmath_score": 0.8822910189628601, "tags": null, "url": "https://math.stackexchange.com/questions/2829710/largest-inscribed-rectangle-in-sector" }
slam, navigation, kinect, ros-fuerte, rgbdslam-freiburg /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: error: undefined reference to 'omp_get_thread_num' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: error: undefined reference to 'omp_get_num_threads' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: error: undefined reference to 'omp_get_thread_num' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: error: undefined reference to 'omp_get_num_threads' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: error: undefined reference to 'omp_get_thread_num' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:145: error: undefined reference to 'GOMP_parallel_start' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:145: error: undefined reference to 'GOMP_parallel_end' /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:47: error: undefined reference to 'omp_get_max_threads'
{ "domain": "robotics.stackexchange", "id": 14409, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, kinect, ros-fuerte, rgbdslam-freiburg", "url": null }
quantum-mechanics, poincare-symmetry Title: Doubt in the Poincaré algebra and one-particle states I am studyng the algebra of Poincaré group and the definition of one particle states using the Weinberg book "Quantum theory of Fields" (vol. 1), but I'm having a hard time understanding part of the book. It says that the square of 4-vector momentum $$p^{2} = \eta_{\mu \nu} p^{\mu} p^{\nu}$$ is invariant under the Lorentz transformation $\Lambda^{\mu}_{\ \ \nu}$ (it's ok, I understand this), and, for $p^{2} \leq 0$, the sign of $p^{0}$ is also invariant (this I didin't understand). And the book says that, for each value of $p^{2}$ and sign of $p^{0}$ (for $p^{2} \leq 0$) we can choose a "standard" 4-momentum $k^{\mu}$ such that $$p^{\mu} = L^{\mu}_{\ \ \nu}(p)k^{\nu},$$ where $L$ is some Lorantz transformation. Now I am really confused, I'm not understanding the idea. What would be exactly this $k$ and this $L$? And why can he express the momentum in this way? For simplicity take 1 spatial dimension and 1 temporal dimension.
{ "domain": "physics.stackexchange", "id": 58374, "lm_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, poincare-symmetry", "url": null }
You can put this solution on YOUR website! Solved by pluggable solver: Find the equation of line going through points hahaWe are trying to find equation of form y=ax+b, where a is slope, and b is intercept, which passes through points (x1, y1) = (1, -2) and (x2, y2) = (3, 4). Slope a is . Intercept is found from equation , or . From that, intercept b is , or . y=(3)x + (-5) Your graph: since is slope-intercept form where is a slope and is a so, is ; point (,) : set to find ... is ; point (,) Question 750228: Write an equation in slope-intercept form for the line that satisfies the following condition. passes through (12, –4), perpendicular to the graph of y = 7/12x + 22 You can put this solution on YOUR website! The given equation has slope = The slope of any line perpendicular to this one will have slope = ----------------------- ( 12, -4 ) Using the general point-slope formula: ------------------------- check: Does it go through ( 12, -4 ) ? OK
{ "domain": "algebra.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140235181257, "lm_q1q2_score": 0.8015125543182527, "lm_q2_score": 0.8289388040954684, "openwebmath_perplexity": 4345.30489262015, "openwebmath_score": 0.6710036993026733, "tags": null, "url": "http://www.algebra.com/algebra/homework/Linear-equations/Linear-equations.faq" }
python, game, console def highScore(name, score, highScoreLst, zFile): for line in highScoreLst: if score >= int(line[-3:-1]): highScoreLst.insert(highScoreLst.index(line), name+'-'+str(score)+'\n') highScoreLst.pop() zFile.seek(0, 0) zFile.writelines(highScoreLst) break def rsg(): print('Ready?') sleep(1) print('Set?') sleep(1) print('Go!') sleep(1) name = input('Enter a username for this session: ') print("Type the word then press enter in under 3 seconds!") sleep(2) rsg()
{ "domain": "codereview.stackexchange", "id": 41387, "lm_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, game, console", "url": null }
php, object-oriented, design-patterns, codeigniter Now, with all that said, the thing that will help you the most with being DRY is to create a "base controller" that will extend CI_Controller. This "base controller" is then used to create all the other controllers for the application. Refer to the CI documentation about Extending Native Libraries for details but the basic idea starts with creating the "base controller". Create the file application/core/MY_Controller.php class MY_Controller extends CI_Controller { protected $data; public function __construct() { parent::__construct(); $this->load->model('general_model', '', TRUE); $this->data = $this->general_model->data_init(); }
{ "domain": "codereview.stackexchange", "id": 24950, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented, design-patterns, codeigniter", "url": null }
java, datetime } return -(days/30) + " months from now"; } else if (days >= 365) { if (days/365 == 1) { return "Last year"; } return days/365 + " years ago"; } else if (days <= -365) { if (-days/365 == 1) { return "Next year"; } return -(days/365) + " years from now"; } else { return minutes + " minutes ago"; }
{ "domain": "codereview.stackexchange", "id": 14306, "lm_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, datetime", "url": null }
Reconstructing the solution from the observations above \begin{align*} \mbold{v_{\parallel}} &= (\mbold{v} \cdot \unit{n}) \unit{n} \\ \mbold{v_{\perp}} &= \mbold{v} - \mbold{v_{\parallel}} \\ &= \mbold{v} - (\mbold{v} \cdot \unit{n}) \unit{n} \\ \mbold{w} &= \unit{n} \times \mbold{v_{\perp}} \\ &= \unit{n} \times (\mbold{v} - \mbold{v_{\parallel}}) \\ &= \unit{n} \times \mbold{v} - \unit{n} \times \mbold{v_{\parallel}} \\ &= \unit{n} \times \mbold{v} \end{align*} Finally
{ "domain": "mauriciopoppe.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9943580913327833, "lm_q1q2_score": 0.8129617912504787, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 2282.403926947458, "openwebmath_score": 1.0000100135803223, "tags": null, "url": "https://www.mauriciopoppe.com/notes/computer-graphics/transformation-matrices/rotation/introduction/" }
python, animation, pygame, physics Title: Golf Physics "Game" Continuation of this post I wrote a program in pygame that basically acts as a physics engine for a ball. You can hit the ball around and your strokes are counted, as well as an extra stroke for going out of bounds. Recently, I added a few things like air resistance, and rewrote my movement physics to make it easier to bounce. I'm wondering if the physics approach is good. Also, is there any way to convert everything into SI units? Right now, my air drag is an arbitrary value. import math import pygame as pg class Colors: BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) YELLOW = (255, 255, 0) GOLD = (255, 215, 0) GRAY = (100, 100, 100) NIGHT = (20, 24, 82) DAY = (135, 206, 235) MOON = (245, 243, 206) SMOKE = (96, 96, 96) class Constants: SCREEN_WIDTH = 1500 SCREEN_HEIGHT = 800 WINDOW_COLOR = Colors.NIGHT TICKRATE = 60 GAME_SPEED = .35
{ "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 }
chip-seq, software-installation, hi-c Missing parentheses? Oh my god, it's using python3 for some reason again. I grep the installation directory for a file that calls merge_sam.py, and find config-system.txt. I go in there and just need to change the python path from /usr/bin/local/ where python3 is installed to /usr/bin/ where python2 is installed. Lastly, I get an error during the ICE normalization step that numpy is not installed. Using my big fat brain, I isntall numpy to my python3 and call it a day. Now it all works as intended.
{ "domain": "bioinformatics.stackexchange", "id": 1559, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "chip-seq, software-installation, hi-c", "url": null }
In the case $$k=n$$, we get $$p(n)=1/2$$ as in the other solutions. Maybe there is an intuitive explanation of the general formula; I couldn't think of one. Added reference: Finding your seat versus tossing a coin by Yared Nigussie, American Mathematical Monthly 121, June-July 2014, 545-546.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347905312774, "lm_q1q2_score": 0.824315749269558, "lm_q2_score": 0.84594244507642, "openwebmath_perplexity": 500.10150711242886, "openwebmath_score": 0.7296741008758545, "tags": null, "url": "https://math.stackexchange.com/questions/5595/taking-seats-on-a-plane/5596" }
r Note that in the output of the factor, the possible levels are listed as any given vector may or may not have an every possible value in it. The set of allowed values can be larger than the ones that are present in any given vector. For dividing into two groups based on a single cut point, this is fine, but this approach becomes unwieldy when making more than two groups. cut is a built-in function which is designed to do just this: categorize a continuous variable based on a set of cut points. There is always one fewer groups than cut points because the points define the edges of the groups (and anything outside the extremes is set to NA). When including everything, I don't usually compute the extremes and use those, but use -Inf and Inf. By default, the intervals are closed on the right which means that the upper value is included in the range but the lower value is not. Since you wanted 79 in the upper group, you have to include right=FALSE.
{ "domain": "codereview.stackexchange", "id": 958, "lm_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 }
frequency-spectrum, phase Estimation of $A_F$ and $A_R$ from their RMS values. Multiplication $X(t)=F(t)R(t)$ Calculation of $2\textrm{Mean}[F(t)R(t)]$ (twice the DC level of $X(t)$) Calculation of $\cos({\phi})=\frac{2\textrm{Mean}\left[F(t)R(t)\right]}{A_F A_R}$ Calculation of inverse cosine $\phi=\arccos \left(\frac{2\textrm{Mean}\left[F(t)R(t)\right]}{A_F A_R} \right )$
{ "domain": "dsp.stackexchange", "id": 4728, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "frequency-spectrum, phase", "url": null }
python, numpy, playing-cards #Step 5 - Check for Straight and return the index of highest card in sequence if checkForStraight(face_values)[0]: return ["Straight"] + [checkForStraight(face_values)[1]]
{ "domain": "codereview.stackexchange", "id": 44020, "lm_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, numpy, playing-cards", "url": null }
java, algorithm, graph, ai, breadth-first-search for (N child : current) { I'd far rather see for (N child : current.generateNeighbors()) {
{ "domain": "codereview.stackexchange", "id": 15132, "lm_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, graph, ai, breadth-first-search", "url": null }
kinematics, momentum, energy-conservation, collision I will come back to how you are correct, but you should be counting a lot more. Let us ignore the possibility of the circles rotating. Then you have the position of each of the two circles, two coördinates each, so that is already 4 variables. Their velocities make 4 variables too, so you actually have 8 DoF. You know that there is a centre of mass. Conservation of (total) linear momentum (CoLM or Co$\vec p$) means that the centre of mass moves on a straight line with uniform velocity. Before and after the collision, the relative momentum is also constant, which means that the relative motion is also made of straight lines. That is, the relative position is really equivalent to a time coördinate, just like the centre of mass is.
{ "domain": "physics.stackexchange", "id": 96765, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, momentum, energy-conservation, collision", "url": null }
board using Planahead. MulT() with w as 0 //fbx sdk forced w to 1 and then multiplied Then I gave up and just manually zeroed out the matrix's T. You can only multiply two matrices if their dimensions are compatible, which means the number of columns in the first matrix is the same as the number of rows in the second matrix. The first one is called Scalar Multiplication, also known as the “Easy Type“; where you simply multiply a number into each and every entry of a given matrix. So this right over here has two rows and three columns. Multiplication Factor appears in the Matrix Table for the new entrants at the entry level. I have therefore written a matrix vector multiplication example that needs 13 seconds to run (5 seconds with. What are synonyms for matrix multiplication?. We’ve seen so far some divide and conquer algorithms like merge sort and the Karatsuba’s. Multiplication Here is a list of all of the skills that cover multiplication! These skills are organized by grade, and you
{ "domain": "auit.pw", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9879462219033657, "lm_q1q2_score": 0.8511534225450522, "lm_q2_score": 0.8615382129861583, "openwebmath_perplexity": 562.5575512182271, "openwebmath_score": 0.7270029187202454, "tags": null, "url": "http://vuut.auit.pw/matrix-multiplication.html" }
signal-analysis, linear-systems Title: Is $y(t) = y(t-4)+x(t-4)$ time invariant or not? I want to check the time invariability of this recursively defined function $$y(t) = y(t-4)+x(t-4)$$ We can check time invariability of functions expressed in terms of x(t), but I couldn't find anything for such recursively defined function. In the book "Signals and System by A. Nagoorkani", we can test for time invariance as follow: Delay the input signal by m units of time and determine the response of the system for this delayed input signal. Let this response be y1(t). Delay the response of the system for unshifted input by m unit of time. Let this delayed response by y2(t). Check whether y1(t) = y2(t). If they are equal then the system is time invariant. Otherwise the system is time variant.
{ "domain": "dsp.stackexchange", "id": 12557, "lm_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, linear-systems", "url": null }
deep-learning, tensorflow, python-3.x ValueError: cannot reshape array of size 2352 into shape (784,784) Why I got cannot reshape array of size 2352 into shape (784,784) my image has 28*28 size. And how can I predict that? By default, the image is loaded as a color Image i.e. 784*3 = 2352 Load image as grayscale i.e. use parameter color_mode="grayscale" No need to of np.vstack(), simply reshape to (-1,784)
{ "domain": "datascience.stackexchange", "id": 8941, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-learning, tensorflow, python-3.x", "url": null }
interior angles are congruent, lines. + 16 ) ° = 3 x 35 + 16 ) ° = x! Unit 3 parallel lines answers: 3 get other questions on the subject: Mathematics ). ≅ ∠5 prove g h STATEMENTS REASONS 1 to check parallel-ness of two lines with an intersecting traversal are.... Are congruent them to your toolbox Theorem is the one obtained by taking a as. Implies its supplement is less than the other angle … consecutive interior angles to angle. The presence of parallel lines duration Examples in Real Life ; FAQs add them to your toolbox add them your... Angles on opposite sides of the transversal alternate angles inside the two parallel lines are parallel the interior! That ∠3 and ∠5 are on alternate sides of a Theorem is two lines with intersecting! Must intersect and a perpendicular line of non-adjacent interior angles are supplementary »! Strong in your memory this concept is correctly justifies that the lines are parallel. These are two pairs of angles formed by these two lines are parallel
{ "domain": "promeng.eu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399043329855, "lm_q1q2_score": 0.8480646050694786, "lm_q2_score": 0.8740772269642948, "openwebmath_perplexity": 1012.6163456426845, "openwebmath_score": 0.3168395757675171, "tags": null, "url": "http://promeng.eu/3h9fdd/33c2bb-alternate-interior-angles-converse" }
python, callback, ros-hydro, rospy, environment-variables But i got the following error print x1 NameError: global name 'x1' is not defined Originally posted by jashanvir on ROS Answers with karma: 68 on 2014-06-30 Post score: 0 You are printing values, i.e. x1, y1 before they have been assigned. The subscribers won't do anything until spin is called and messages are received. Originally posted by dornhege with karma: 31395 on 2014-06-30 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 18437, "lm_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, callback, ros-hydro, rospy, environment-variables", "url": null }
Proof of Lemma 3. Theorem 1 (applied to $w$ instead of $y$) shows that there exist integers $p$ and $q$ such that $px+qw=\gcd\left( x,w\right)$. Let us denote these $p$ and $q$ by $p_{1}$ and $q_{1}$. Thus, $p_{1}$ and $q_{1}$ are integers satisfying $p_{1}x+q_{1}w=\gcd\left( x,w\right)$. Theorem 1 (applied to $y$ and $z$ instead of $x$ and $y$) shows that there exist integers $p$ and $q$ such that $py+qz=\gcd\left( y,z\right)$. Let us denote these $p$ and $q$ by $p_{2}$ and $q_{2}$. Thus, $p_{2}$ and $q_{2}$ are integers satisfying $p_{2}y+q_{2}z=\gcd\left( y,z\right)$. Theorem 1 (applied to $z$ instead of $y$) shows that there exist integers $p$ and $q$ such that $px+qz=\gcd\left( x,z\right)$. Let us denote these $p$ and $q$ by $g$ and $h$. Thus, $g$ and $h$ are integers satisfying $gx+hz=\gcd\left( x,z\right)$. Hence, $gx+hz=\gcd\left( x,z\right) =1$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787876194204, "lm_q1q2_score": 0.8310324198820089, "lm_q2_score": 0.8418256452674008, "openwebmath_perplexity": 193.48269262494674, "openwebmath_score": 0.9265310764312744, "tags": null, "url": "https://math.stackexchange.com/questions/1394801/prove-that-ab-cd-a-cb-d-left-fracaa-c-fracdb-d-right-left" }
kinematics, computational-physics, simulations, calculus Title: Creating equation for position when the acceleration depends on the current position I am writing a simplified simulation of how a drone will move to a target destination. The drone adjusts the acceleration based on the distance from the target location. I want to use the equation for acceleration where c is the target location: $$a(t) = c - x(t)$$ That makes the velocity (where v0 is the initial velocity): $$v(t) = v0 + \int_0^tc-x(t')dt' $$ $$v(t) = v0 +ct - \int_0^tx(t')dt'$$ This is where it starts to get messy. I then try to integrate again to get the position and end up with the function that is dependent upon itself: $$x(t)=x0+\int_0^tv0+ct-\int_0^tx(t')dt'dt''$$ $$x(t)=x0+tv0+\frac{t^2c}2-\int_0^t\int_0^tx(t')dt'dt''$$ I'm not really sure how to work with this. Is there an easier form I can put this in that will make it easier to program something to calculate the results? Sure! Instead of integrating, express your original equation in terms of $x(t)$, like so:
{ "domain": "physics.stackexchange", "id": 66150, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, computational-physics, simulations, calculus", "url": null }
objective-c, mvc, ios Title: Retrieving values from UITableViewCell I have a UITableview with custom cells, every cell has a button called cellButton. When the user taps the button I present an action sheet which has two buttons, buttonOne and buttonTwo. When buttonOne has been tapped I call a method with some values from the actual cell, when buttonTwo I perform a segue and prepareForSegue: method to pass data from the table view cell to another VC. I have a working solution, but I'm not sure that this is the best way because I'm passing the PFUser object from the index path to an instance variable and only use it when the user choose something in the action sheet. I never needed passing values like this, I always used directly the NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];.. way in prepareForSegue:, therefore I'm a bit confused now. Is it a correct way or can it go wrong in any case? @property (nonatomic, strong) PFUser *userObj;
{ "domain": "codereview.stackexchange", "id": 12667, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c, mvc, ios", "url": null }
• by definition $S \subseteq \mathbb{N}$ • $0 \in S$ and S is closed under successor function, thus $\mathbb{N} \subseteq S$. • Therefore, $S = \mathbb{N}$ ### Corollary to PMI Corollary to PM: Let $M\in \mathbb{Z} \land S = \{z \in \mathbb{Z} | z \geq M\}$. P(n) is a variable proposition defined on S such that 1. P(M) holds 2. $(\forall k \in S)(P(k) \implies P(k+1))$ holds. Then $(\forall n \in S)P(n)$ holds. • prove that the minimum point in the set hold • prove that if every point in the set hold, every point + 1 also hold. #### Template for Induction Proofs using PMI Claim: $(\forall n \in \mathbb{N})P(n)$ Proof: We processed by induction on $n \in \mathbb{N}$ - (Base Case): P(0) holds because ____. - (Inductive Step): Let $n \in \mathbb{N}$ and assume P(n) holds. (This is the Inductive Hypothesis) Use this assumption to show P(n+1) holds also - (Conclusion) By PMI, we have $(\forall n \in \mathbb{N})P(n).$ • be sure to state the variable on which you are inducting.
{ "domain": "kokecacao.me", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9957353660038597, "lm_q1q2_score": 0.818682792635497, "lm_q2_score": 0.8221891283434877, "openwebmath_perplexity": 2272.324540676236, "openwebmath_score": 0.9610524773597717, "tags": null, "url": "https://kokecacao.me/page/Course/F20/21-127/Lecture_010.md" }
physical-chemistry, mole Title: Effect of redefining Avogadro's constant and kilogram on molar mass Avogadro's constant $N_\mathrm A$ is defined as the number of constituent particles (usually atoms or molecules) contained in the amount of substance given by one mole. The value of Avogadro's constant $N_\mathrm A$ is going to be set to exactly $6.02214076\times 10^{23}\ \mathrm{mol}^{-1}$ in 2019. I might add that the kilogram is also going to be redefined in 2019 based on Planck's constant. Will these changes result in the molar mass of a substance no longer being exactly equal to the molecular mass expressed in grams? Will these changes result in the molar mass of a substance no longer being exactly equal to the molecular mass expressed in grams?
{ "domain": "chemistry.stackexchange", "id": 12501, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, mole", "url": null }
c#, .net, networking, socket void InvokeConnected(IAsyncClient a); void InvokeMessageReceived(IAsyncClient a, List<byte> msg); void InvokeMessageSubmitted(IAsyncClient a, bool close = false); void InvokeReceivingStarted(); void InvokeError(string errorMessage); Task StartClient(); void StartReceiving(); void SetId(Guid clientId); Task<bool> Send(IProcessable message, bool close = false); Task<bool> SendSomeCommand(); Task<bool> SendAlarm(); } IAsyncSocketListener public delegate void MessageReceivedHandler(Guid id, List<byte> msg); public delegate void MessageSubmittedHandler(Guid id, bool close); public interface IAsyncSocketListener : IDisposable { event MessageReceivedHandler MessageReceived; event MessageSubmittedHandler MessageSubmitted; IServerChainsContainer ServerChainsContainer { get; set; }
{ "domain": "codereview.stackexchange", "id": 25599, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, networking, socket", "url": null }
eigenvectors for systems in which the energies are degenerate. Note: OCR errors may be found in this Reference List extracted from the full text article. <0: The characteristic equation is r2 = 0, with roots r = i p. (This is called the eigenspace. Hence ‚0 = 0 is an eigenvalue with y0 = 1 the corresponding eigen-function. Daileda Sturm-Liouville Theory. ON COOPERATIVE ELLIPTIC SYSTEMS: PRINCIPAL EIGENVALUE AND CHARACTERIZATION OF THE MAXIMUM PRINCIPLE KING-YEUNG LAM The purpose of this set of notes is to present the connection between the classical maximum principle with the principal eigenvalue of the elliptic operator. Let Downloaded 10/27/14 to 38. Simple Eigenvalues The following property regarding the multiplicity of eigenvalues greatly simpli es their numerical computation. Representation theory5 4. The value of the observable for the system is the eigenvalue, and the system is said to be in an eigenstate. It can be obtained from the previous one by a ‘conjugacy’ transformation
{ "domain": "desdeelfondo.mx", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683473173829, "lm_q1q2_score": 0.8250971020162651, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 629.0544501096225, "openwebmath_score": 0.9012609124183655, "tags": null, "url": "http://desdeelfondo.mx/44n7a4l/q8efnp.php?sl=eigenvalue-and-eigenfunction-pdf" }
if the derivative exists at each in... Not continuous at this point: Constant functions are continuous everywhere, limits. So the function defined by f ( x ) = tan x is a continuous function Domain, it a. A graph is called a jump discontinuity are known to be continuous, their limits may evaluated... Be evaluated by substitution defined for all real number except cos⁡ = 0 i.e continuous everywhere tan is... Value and the limit aren ’ t the same and so the is. Should have seen proved, and should perhaps prove yourself: Constant functions are known to be continuous their. ) = tan x is a continuous function.. more formally continuous how to prove a function is continuous, every. Domain: value c in its Domain, it is a continuous function = ﷐﷐sin﷮﷯﷮﷐cos﷮﷯﷯ defined... Certain functions are known to be differentiable if the derivative exists at each point its. Not continuous at this point f is continuous if, for every c. Of discontinuity in a graph is called a jump discontinuity it is a
{ "domain": "co.za", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639653084244, "lm_q1q2_score": 0.8557507062723771, "lm_q2_score": 0.8807970826714614, "openwebmath_perplexity": 466.77284364666457, "openwebmath_score": 0.9244361519813538, "tags": null, "url": "http://alexkia.co.za/3rouxw4w/how-to-prove-a-function-is-continuous-02283a" }
c#, .net-core #if DEBUG Console.Clear(); Console.WriteLine($"\n***** End Of Debug Mode - Press ENTER To Close The Window *****"); Console.ReadLine(); #endif } #endregion MainView.cs (just a little codesnippet, since this class needs to be worked on extensive). When clicking C in a menu this method is called. private void Action_C() { using var scope = _hostProvider.Services.CreateScope(); var services = scope.ServiceProvider; services.GetService<ISettingView>()!.Run(); } SettingView here I want to display the information provided by appsettings.json (whether got from the CommandLine, launchSettings.json, appsettings.Production.json or appsettings.json. using BasicCodingConsole.ConsoleMessages; using BasicCodingConsole.ConsoleViews; using BasicCodingLibrary.ViewModels; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using System.Diagnostics; namespace BasicCodingConsole.Views.SettingView;
{ "domain": "codereview.stackexchange", "id": 44833, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net-core", "url": null }
we need to Viewed 48 times 1 $\begingroup$ I wish to show that $\cos^2(\frac{\pi}{5})+\cos^2(\frac{3\pi}{5})=\frac{3}{4}$ I know … Traditionally the letters zand ware used to stand for complex numbers. An easy to use calculator that converts a complex number to polar and exponential forms. They are just different ways of expressing the same complex number. This is a quick primer on the topic of complex numbers. Modulus or absolute value of a complex number? Apart from Rectangular form (a + ib ) or Polar form ( A ∠±θ ) representation of complex numbers, there is another way to represent the complex numbers that is Exponential form.This is similar to that of polar form representation which involves in representing the complex number by its magnitude and phase angle, but with base of exponential function e, where e = 2.718 281. apply: So -1 + 5j in exponential form is 5.10e^(1.77j). With Euler’s formula we can rewrite the polar form of a complex number into its exponential form as
{ "domain": "digiloopdesigns.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769049752756, "lm_q1q2_score": 0.8212656594744931, "lm_q2_score": 0.8418256472515683, "openwebmath_perplexity": 908.6045495790235, "openwebmath_score": 0.7954952120780945, "tags": null, "url": "http://nitrous.digiloopdesigns.com/kristine-cofsky-rae/pt5uzlr.php?tag=09e9e4-exponential-form-of-complex-numbers" }
noise, qpsk, pll The expected input noise will typically rise significantly as dominant phase noise as we approach the carrier (low frequency offsets) as is typical for local oscillator phase noise. However at some offset from the carrier the decreasing phase noise will intersect the noise floor which will then dominate from other white noise sources such as amplified thermal noise and quantization noise in fixed point implementations. Thus we see how a trade can exist with the loop bandwidth setting where the savings from further attenuation of lower frequency noise is offset by the noise enhancement from the wider loop bandwidth setting. Note that the decision directed phase detector is equally sensitive to AM and PM components on the signal, and the AM noise components of the input signal will be translated to PM components on the NCO in the loop and will thus not cancel out the AM noise but add to it as an uncorrelated noise source. Ultimately if an optimization is desired, and to confirm if this
{ "domain": "dsp.stackexchange", "id": 8613, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "noise, qpsk, pll", "url": null }
So I'll demonstrate by letting $\vec{u}, \vec{v} \in \mathbb{R}^3$ such that $\vec{u} = (u_1, u_2, u_3)$ and $\vec{v} = (v_1, v_2, v_3)$. Then we have $$T(\vec{u} + \vec{v}) \\ = T((u_1 + v_1), (u_2 + v_2), (u_3 + v_3)) \\ = ((u_1 + v_1) - (u_2+v_2), 2(u_2+v_2)) \\ = ((u_1-u_2)+(v_1-v_2), 2u_2+2v_2) \\ = (u_1-u_2, 2u_2) + (v_1-v_2, 2v_2) \\ = T(\vec{u}) + T(\vec{v}).$$ Thus, we can conclude that $T$ is closed under vector addition. Next, let $k$ be a scalar from the same field as the components of $\vec{v}$; that is, let $k \in \mathbb{R}$. Then we have $$T(k\vec{v}) \\ = T((kv_1, kv_2, kv_3)) \\ = (kv_1-kv_2, 2kv_2) \\ = (k(v_1-v_2), k(2v_2))\\ = k(v_1-v_2, 2v_2) \\ = kT(\vec{v}).$$ This means that $T$ is closed under scalar multiplication. This logically equivalent to saying that $T$ preserves linear combinations of vectors and so $T$ is linear.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992951349231, "lm_q1q2_score": 0.802329290329427, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 668.4808948017474, "openwebmath_score": 0.7554827928543091, "tags": null, "url": "https://math.stackexchange.com/questions/1302556/help-determining-whether-a-transformation-is-linear-or-not" }
probability-theory, scheduling, parallel-computing As a function of $m$, $n$, and the $X_i$'s, what is the makespan $M$? Specifically, what is $E[M]$? $Var[M]$? Second question: Suppose $P(X_i = 2) = P(X_i = 4) = 1/2$, and all $X_i$ are pairwise independent, so $\mu_i = 3$ and $\sigma^2 = 1$. As a function of $m$, $n$, and these new $X_i$'s, what is the makespan? More interestingly, how does it compare to the answer from the first part?
{ "domain": "cs.stackexchange", "id": 1367, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "probability-theory, scheduling, parallel-computing", "url": null }
• You are missing \begin{document} so get an error right at the start, and after that any output is essentially accidental. If you add \begin{document} before 43. then all numbers indent the same way (but you should not number explicitly or use \\ ) – David Carlisle Oct 15 '13 at 0:25 • @DavidCarlisle, thanks for seeing my typo, but, in texmaker, I have the line but still only 43 indents correctly. – MaoYiyi Oct 15 '13 at 0:40 • No all the numbers indent the same amount, I'll add an image output from your MWE with a box added so you see that the numbers are all on the same line. – David Carlisle Oct 15 '13 at 1:28 • @DavidCarlisle Could it be that I used texsudio to type 43 and then used texmaker for the rest? I don't know howto show you a picture of the pdf I get when I quickbuild it. But, 43 is the only one that looks nice. I agree with you that there should not be any difference. I have tried reopening the file, rebooting, and still having this problem. – MaoYiyi Oct 15 '13 at 1:53
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104982195785, "lm_q1q2_score": 0.809484726083589, "lm_q2_score": 0.8376199633332891, "openwebmath_perplexity": 2492.8847200599894, "openwebmath_score": 0.9947049021720886, "tags": null, "url": "https://tex.stackexchange.com/questions/138874/why-are-only-part-indents-nicely-but-the-rest-dont" }
python Open,68.0526173088621,453,scaling_factor3_7,1.6841836814052158e-09±4.902916655781307e-12 Open,25.312650389033205,453,scaling_factor1_85,8.115614846815333e-10±2.5565744449155122e-12 Open,13.88595435739187,453,scaling_factor0_925,3.954707672448876e-10±1.374596439573057e-12 Monomer,954.9159242043648,453,scaling_factor3_7,3.78058584438179e-09±4.232857842107978e-11 Monomer,252.25939340758032,453,scaling_factor1_85,1.8787318367685657e-09±1.9069806541342135e-11 Monomer,98.85342052853116,453,scaling_factor0_925,9.425087377223917e-10±8.71988387545325e-12 Open-Closed_Single_Scales,10.085070177091046,1360,k,scaling_factor,5.278888437487694e-12±0.0015018338723078069,1.5195857905325738e-09±2.609848716517211e-12 Monomer-Open_Single_Scales,15.332529600935272,1360,k,scaling_factor,7364.423376672264±353.32129467610883,3.4487934730265124e-09±4.7249311070061075e-12
{ "domain": "codereview.stackexchange", "id": 44935, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
The scheme “If $A$ implies a contradiction, then $\lnot A$ must hold” is true even in intuitionistic logic, because $\lnot A$ is just an abbreviation for $A \to \bot$, and so that scheme just says “if $A \to \bot$ then $A \to \bot$”. But in intuitionistic logic, if we prove $\lnot A \to \bot$, this only shows that $\lnot \lnot A$ holds. The extra strength in classical logic is that the law of the excluded middle shows that $\lnot \lnot A$ implies $A$, which means that in classical logic if we can prove $\lnot A$ implies a contradiction then we know that $A$ holds. In other words: even in intuitionistic logic, if a statement implies a contradiction then the negation of the statement is true, but in classical logic we also have that if the negation of a statement implies a contradiction then the original statement is true, and the latter is not provable in intuitionistic logic, and in particular is not provable directly.
{ "domain": "mathzsolution.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631633155348, "lm_q1q2_score": 0.8516176830609768, "lm_q2_score": 0.8633916134888614, "openwebmath_perplexity": 160.97916514303006, "openwebmath_score": 0.8328729271888733, "tags": null, "url": "https://mathzsolution.com/can-every-proof-by-contradiction-also-be-shown-without-contradiction/" }
data-cleaning, preprocessing Title: How is the fit function in SimpleImputer working to find the mean in the Salary column as well when just the Age column is given as its argument? The only argument inside the fit function of SimpleImputer is: 'Age'. Yet the returned output worked on the 'Salary' column as well. That is what I am unable to understand. Here is my code (considering all the necessary libraries imported): from sklearn.impute import SimpleImputer imputer = SimpleImputer(missing_values = np.nan) imputer = imputer.fit(df[['Age']]) X[:, 1:3] = imputer.fit_transform(X[:, 1:3]) print(X) Dataset: Country Age Salary Purchased 0 France 44.0 72000.0 No 1 Spain 27.0 48000.0 Yes 2 Germany 30.0 54000.0 No 3 Spain 38.0 61000.0 No 4 Germany 40.0 NaN Yes 5 France 35.0 58000.0 Yes 6 Spain NaN 52000.0 No 7 France 48.0 79000.0 Yes 8 Germany 50.0 83000.0 No 9 France 37.0 67000.0 Yes
{ "domain": "datascience.stackexchange", "id": 7895, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-cleaning, preprocessing", "url": null }
inorganic-chemistry, molecular-structure, terminology Title: What does “generally octahedral” mean? Based on vdW repulsions for generally octahedral $\ce{BrSF5},$ each following statement about bond angles (“ba”) is true except that (1) $8~\ce{F-S-F}$ “ba” ’s are $< 90^\circ$ (2) the $\ce{Br-S-F}$ “ba” is $\neq 90^\circ$ (3) $4~\ce{F-S-F}$ “ba” ’s are $< 90^\circ$ are equal (4) $4$ other $\ce{F-S-F}$ “ba” ’s $< 90^\circ$ are equal (5) $2~\ce{F-S-F}$ “ba” ’s are $< 180^\circ$
{ "domain": "chemistry.stackexchange", "id": 1483, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, molecular-structure, terminology", "url": null }
the interest is paid half yearly, say at r%per annum compound interest, then the amount after t years is given by: P( 1 + R / 2*100) 2t. If Ben leaves the money in the account for 12 years, how much interest will he earn? 2) Steph took out a simple interest loan that charges 8. Note: Banks usually charge compound interest not simple interest. The simple interest (SI) is a type of interest that is applied to the amount borrowed or invested for the entire duration of the loan, without taking any other factors into account, such as past interest (paid or charged) or any other financial considerations. 1400 with simple interest for as many years as the rate […]. Rate of Return. P = the principal amount (the initial amount invested) r = the annual interest rate. For the vast majority of us, however, the magic becomes a shattering disappointment because we simply don't understand how wealth building really works. simple interest notes in hindi for ssc, simple interest questions and answers
{ "domain": "cralstradadeiparchi.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795098861572, "lm_q1q2_score": 0.815947592901234, "lm_q2_score": 0.8267117855317474, "openwebmath_perplexity": 1403.1439827840675, "openwebmath_score": 0.4161606729030609, "tags": null, "url": "http://iptn.cralstradadeiparchi.it/compound-interest-pdf.html" }
thermodynamics, work Title: Is heat flowing outside in this case? In Feynman's treatment of the Carnot cycle, he considers a perfect gas in a cylinder+piston in which we are injecting heat $Q_{1}$ with the help of a heat reservoir at constant temperature $T_{1}$. At the same time, we are expanding the piston by ourselves. He said,
{ "domain": "physics.stackexchange", "id": 63574, "lm_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, work", "url": null }
magnetometer, orientation The discrepancy between magnetometer and gyrometer then, may be used for calculation of the correct orientation of the compass. Later the compass should be used for yaw calculation. I don't know if you're using magnetometer and compass interchangeably here or if you are actually referring to two different devices, but as stated above, a gyro will only ever output a relative heading, so you can't use it to determine any absolute heading. This means that you can't use it to set/test/check the alignment of an absolute output device such as a magnetometer. Below is the starting orientation of both sensors (just an example, the orientation of the compass can be anything). Does someone know a good way to figure out the rotation of the compass?
{ "domain": "robotics.stackexchange", "id": 831, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetometer, orientation", "url": null }
forces Title: Estimating Squeezing Force of Toothpaste Tube How could I estimate the force I apply when I squeeze a new toothpaste tube? I want to either be able to calculate it without having to perform an experiment, or refer to some scientific journal with a similar calculation or rough estimate.
{ "domain": "physics.stackexchange", "id": 26820, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces", "url": null }
ros, ros-melodic, rosdep, ros-kinetic, github For reference this implies that this is governed by the unauthenticated API rate limit of 60/hour, Authenticating will get you up to 5000/hour. GitHub API rate limiting Comment by gvdhoorn on 2019-11-21:\
{ "domain": "robotics.stackexchange", "id": 34040, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-melodic, rosdep, ros-kinetic, github", "url": null }
ros, ros2, rclcpp Title: node_interface for now? The node_interfaces (https://github.com/ros2/rclcpp/tree/master/rclcpp/include/rclcpp/node_interfaces) are really useful for dependency injection allowing much nicer tests. There however does not seem to be an interface that provides the method now. Is there a way to call that method without a node interface? Originally posted by tylerjw on ROS Answers with karma: 83 on 2021-07-19 Post score: 0 I found that you can get a NodeClockInterface and gen call now like this: node_clock_interface->get_clock()->now() Originally posted by tylerjw with karma: 83 on 2021-07-19 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 36727, "lm_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, rclcpp", "url": null }
ros, moveit, ros-melodic, catkin, build box.subframe_poses[3].position.x = .025; ^~~~~~~~~~~~~~ plane_poses /home/pyro/ws_moveit/src/moveit_tutorials/doc/subframes/src/subframes_tutorial.cpp:141:7: error: ‘moveit_msgs::CollisionObject {aka struct moveit_msgs::CollisionObject_<std::allocator<void> >}’ has no member named ‘subframe_poses’; did you mean ‘plane_poses’? box.subframe_poses[3].position.y = -.05; ^~~~~~~~~~~~~~ plane_poses /home/pyro/ws_moveit/src/moveit_tutorials/doc/subframes/src/subframes_tutorial.cpp:142:7: error: ‘moveit_msgs::CollisionObject {aka struct moveit_msgs::CollisionObject_<std::allocator<void> >}’ has no member named ‘subframe_poses’; did you mean ‘plane_poses’? box.subframe_poses[3].position.z = -.01 + z_offset_box; ^~~~~~~~~~~~~~ plane_poses
{ "domain": "robotics.stackexchange", "id": 33763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, ros-melodic, catkin, build", "url": null }
python, ros2 The code is below, I believe most of the issues and the solution should be in the callback_sense_oxygen method. #!/usr/bin/env python3 import sys import rclpy from rclpy.node import Node from functools import partial from garden_interfaces.srv import OxygenSense from garden_interfaces.srv import SerialMessage
{ "domain": "robotics.stackexchange", "id": 36158, "lm_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, ros2", "url": null }
c++, algorithm, sorting // For Merge Sort std::vector<int> _merge(std::vector<int> L, std::vector<int> R); std::vector<int> _mergeSort(std::vector<int> to_sort); // For Quicksort int _partition(std::vector<int> &arr, int from, int to); void _quicksort(std::vector<int> &arr, int from, int to); void _save_numbers_to_file(std::string output_filename); void _swap(int *left, int *right); void _die(const std::string& err_msg); }; sorter.cpp #include <fstream> #include <iostream> #include <algorithm> #include "sorter.h" #include "timer.h" void Sorter::load_numbers(std::string filename) { /* * Reads numbers from file and saves them to _unsorted vector * * :param filename: filename to read numbers from */ std::ifstream nums_file (filename); int curr_num; _unsorted.clear(); while (nums_file >> curr_num) { // Add numbers from file to an array //std::cout << curr_num << ", "; _unsorted.push_back(curr_num); } nums_file.close(); }
{ "domain": "codereview.stackexchange", "id": 41205, "lm_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, sorting", "url": null }
c Tournament setupTour(Tournament tour, void *base, int (*comp)(const void *, const void *)) { if (tour == NULL || base == NULL || comp == NULL) return NULL; compa = comp; uint32_t i; char *_base = (char *) base; char * _tourTree = (char *) (tour->tourn->tourTree); _tourTree = _tourTree + ((tour->tourn->size - 1) * tour->tourn->sizeofPlayer); for (i = 0; i < tour->tourn->size * tour->tourn->sizeofPlayer; i++) { *_tourTree++ = *_base++; } tour = play(tour, comp); return tour; }
{ "domain": "codereview.stackexchange", "id": 36648, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c", "url": null }
used the result,. Arabic - Learner log book [PDF 277 Kb] Arabic - Guide for supervising drivers [PDF 835 Kb] Chinese. In fact ln(0) is undefined meaning. 5 mm because scale is logarithmic on x axis. PRODUCT RULE for LOGS log b(MN) = (log bM) + (log bN) For any positive numbers M, N, and b (b ≠ 1). Updating Log odds. Combining or Condensing Logarithms The reverse process of expanding logarithms is called combining or condensing logarithmic expressions into a single quantity. Click here to find temporary job opportunities. Logarithm, the exponent or power to which a base must be raised to yield a given number. Regulations. The Rule of Five states that poor absorption or permeation is expected when MW>500, NHD>5, NHA>10 or log P>5. SOAR Math Course. The laws of logarithms There are a number of rules which enable us to rewrite expressions involving logarithms in different, yet equivalent, ways. the Steps for Solving Logarithmic Equations Containing Terms without Logarithms. For some lines
{ "domain": "clicksmart.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964211605606, "lm_q1q2_score": 0.812504271451398, "lm_q2_score": 0.8244619199068831, "openwebmath_perplexity": 2107.3554604779924, "openwebmath_score": 0.5253328084945679, "tags": null, "url": "http://purd.clicksmart.it/logarithm-rules-pdf.html" }
• After reading "logarithms and inverse trig functions become algebraic functions when differentiated" I tried $\int x \tan^{-1}x \;dx$ and it also yield identical results both ways... Anyways, thanks for the insight! – user408202 Jun 23 '17 at 19:31 Lets say you are trying to integrate $f(x) = u\frac{dv}{dx} = \mu\frac{d\nu}{dx}$. Then \begin{align} \mu\nu -\int\nu\,d\mu = \int f(x)\,dx = uv-\int v\,du \end{align} or, to put it more simply, you are evaluating the same integral by two different methods, of course they will always both give you the same result (up to a constant), otherwise your original integral would not have been well defined.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765628041175, "lm_q1q2_score": 0.824969406218381, "lm_q2_score": 0.8418256492357358, "openwebmath_perplexity": 636.8810321336057, "openwebmath_score": 0.9998966455459595, "tags": null, "url": "https://math.stackexchange.com/questions/2328594/integration-by-parts-the-cases-when-it-does-not-matter-what-u-and-dv-we-cho" }
haskell, computational-geometry, coordinate-system Your function uniq looks like Data.List.nub. nub is a strange name and uniq honestly makes more sense, but it's better to use library functions that readers are familiar with. It's also fine to define synonyms, like uniq = nub, this way readers can see that in the source. Recognizing that uniq is a complete re-implementation is a bit harder. If you think a function you need is simple or common, check the standard library! Haskell's is quite extensive. With top-level types added and no other changes, this would be a very strong starting point. I'd label that as good work!
{ "domain": "codereview.stackexchange", "id": 35511, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell, computational-geometry, coordinate-system", "url": null }
electromagnetism, magnetic-fields, electric-fields, maxwell-equations, magnetostatics $$ 0 = - \mu_0 \frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf G$$ $$\implies \nabla \cdot \mathbf G = \mu_0 \frac{\partial \rho}{\partial t}$$ From Gauss' law for electric fields, we know that $\rho = \epsilon_0 \nabla \cdot \mathbf E$, and so $$\nabla \cdot \mathbf G = \epsilon_0 \mu_0 \frac{\partial}{\partial t} \nabla \cdot \mathbf E = \nabla \cdot \left(\epsilon_0 \mu_0 \frac{\partial}{\partial t}\mathbf E\right)$$ and so we can simply postulate that $$\mathbf G = \epsilon_0\mu_0 \frac{\partial}{\partial t} \mathbf E$$ so $$\nabla \times \mathbf B = \mu_0 \mathbf J + \epsilon_0\mu_0 \frac{\partial}{\partial t} \mathbf E$$ This was Maxwell's correction to Ampere's law, and it has been validated over and over by experiment.
{ "domain": "physics.stackexchange", "id": 60200, "lm_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, magnetic-fields, electric-fields, maxwell-equations, magnetostatics", "url": null }
photons, double-slit-experiment, interference From Anna's answer and comments the photon is not regarded as a wave in its own but i dont understand this. The photon is an elementary particle in the standard model of particle physics. The theory at present has elementary particles as point particles in a quantum mechanical theoretical model using quantum field theory. This leads to the Feynman diagram representation of elementary particle interactions which leads to calculating measurable quantities, as crossections and decays. The point nature of the particles appears when they are detected, and detection means interaction with other particles or fields. See this singe photon at a time experiment, the photons detected by the point seen on the screen on the left.
{ "domain": "physics.stackexchange", "id": 56781, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photons, double-slit-experiment, interference", "url": null }
Find Jordan canonical form and basis of a linear operator. Let $T:\mathbb{R}^3 \to \mathbb{R}^3$ be a linear operator such that: $T(x,y,z)=(-y-2z,x+3y+z,x+3z)$, I need to find a Jordan canonical form and a basis. This is what i did: In the first place, I found the associated matrix to this linear operator in the canonical basis which is this one: $$A=\begin{pmatrix} 0 & -1 & -2 \\ 1 & 3 & 1 \\ 1 & 0 & 3 \\ \end{pmatrix}$$ After that i found the characteristic polynomial which is: $(\lambda-2)^3=0$ so we have this polynomial that has only one root with multiplicity 3. After finding the eigenvalue I found the eigenvector associated to 2, which is $V_3=(-1,0,1)$. Now the Jordan canonical form should be this one(If I have done it correctly): $$J=\begin{pmatrix} 2 & 0 & 0 \\ 1 & 2 & 0 \\ 0 & 1 & 2 \\ \end{pmatrix}$$ We know the a Jordan basis is formed with these vectors: $B=v_1,v_2,v_3$ First I found $v_2$ :
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9873750514614408, "lm_q1q2_score": 0.8002466451169157, "lm_q2_score": 0.8104788995148792, "openwebmath_perplexity": 282.163346486554, "openwebmath_score": 0.9113667011260986, "tags": null, "url": "https://math.stackexchange.com/questions/2730123/find-jordan-canonical-form-and-basis-of-a-linear-operator" }
molecular-orbital-theory, metal, conductivity, electricity One website stated that 'it is only when these bands become filled with 2p electrons that the elements lose their metallic character'. Which I interpret as that when the conduction band is completely filled with electrons, the substance isn't able to conduct electricity any more. However why is this so? Aren't there still electrons in the pi MOs which are 'de-localised' along the substance? Also the above explanation using MOs seems to explain why these bands form. Does this mean that the explanation that my teacher gave me about the Pauli Exclusion Principle being responsible for the formation of bands is wrong and not needed? doesn't explain why electrons in the conduction band are able to conduct electricity while electrons in the valence band can't
{ "domain": "chemistry.stackexchange", "id": 5708, "lm_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-orbital-theory, metal, conductivity, electricity", "url": null }
java, algorithm, tower-of-hanoi public static void main(String[] args) { Stack myStack = new Stack("A"); myStack.push(10); myStack.push(15); myStack.push(20); myStack.push(25); Stack anotherStack = new Stack("B"); Stack yetAnotherStack = new Stack("C"); tower(4, myStack, anotherStack, yetAnotherStack); } Use java.util.Deque Instead of implementing your own stack, it's better and easier to use the Deque in the JDK. (Not Stack, as the JavaDoc explains, Deque is recommended. Thanks @greybeard for the tip!) Naming In this game there are discs and towers (or sticks, rods, pegs). It would be better to call them that way instead of Node and Stack. tower is a poor name for moving discs. In general, verbs are best for method names. In this example move would be natural. Alternative implementation With the above suggestions applied, the implementation becomes: import java.util.ArrayDeque; import java.util.Deque; public class Hanoi { private static class Tower {
{ "domain": "codereview.stackexchange", "id": 17814, "lm_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, tower-of-hanoi", "url": null }
[1, 4, 2, 4]. Calculates the per-element sum of two arrays or an array and a scalar. In order to find the sum of all elements in an array, we can simply iterate the array and add each element to a sum accumulating variable. Join 124,729,115 Academics and Researchers. Expected time complexity is O(m+n) where m is the number of elements in ar1[] and n is the number of elements in ar2[]. I am trying to compute the maximum possible sum of values from a matrix or 2d array or table or any suitable structure. A selected portion of the array may be summed, if an integer range expression is provided with the array name (. Hence there would be four different arrays in this case. sum += numbers [i] In The Standard Way we first declare the variable sum and set its initial value of zero. The sum choice number is the minimum over all choosable functions f of the sum of the sizes in f. Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous)
{ "domain": "lampedusasiamonoi.it", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97594644290792, "lm_q1q2_score": 0.8963875270376713, "lm_q2_score": 0.9184802440252811, "openwebmath_perplexity": 681.2426012969111, "openwebmath_score": 0.3012574017047882, "tags": null, "url": "http://lampedusasiamonoi.it/yvgr/max-sum-of-2-arrays.html" }
electromagnetism, magnetic-fields, induction The Answer Given the simplification that the magnetic field produced from a solenoid is zero when outside the coils of that solenoid, you can say that there is no magnetic field from the interior inductor in that space. Therefore it is as if that interior solenoid is not there. Assigning the variables to the larger, exterior solenoid with a subscript 1, you get $B = B_{1_{in}} = \frac{\mu\mu_0}l{I_1n_1}$ when $R_2<r<R_1$.
{ "domain": "physics.stackexchange", "id": 18854, "lm_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, magnetic-fields, induction", "url": null }
data-structures, binary-trees, search-trees And you wanted to make a range update of +5 to [3..7]: 0 0 0 5 5 5 5 5 0 0 (array) 0 0 0 5 10 15 20 25 25 25 (desired cumulative sums) How could you store the desired cumulative sums using 2 binary indexed trees? The trick is to use two binary indexed trees, BIT1 and BIT2, where the cumulative sum is calculated from their contents. In this example, here's what we'd store in the the two trees: 0 0 0 5 5 5 5 5 0 0 (BIT1) 0 0 0 10 10 10 10 10 -25 -25 (BIT2) To find sum[i], you compute this: sum[i] = BIT1[i] * i - BIT2[i] For example: sum[2] = 0*2 - 0 = 0 sum[3] = 5*3 - 10 = 5 sum[4] = 5*4 - 10 = 10 ... sum[7] = 5*7 - 10 = 25 sum[8] = 0*8 - (-25) = 25 sum[9] = 0*9 - (-25) = 25 To achieve the desired BIT1 and BIT2 values for the previous range update, we do 3 range updates:
{ "domain": "cs.stackexchange", "id": 3594, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, binary-trees, search-trees", "url": null }