text
stringlengths
1
1.11k
source
dict
quantum-mechanics, photons, quantum-information, quantum-optics where I used the property of the Poisson distribution $\sum_n n P_\lambda(n)=\lambda$. Similarly, we have $$\sum_n n^2 P(n)=\sum_\lambda p_\lambda \lambda(\lambda+1),$$ where I used $\sum_n n^2 P_\lambda(n)=\lambda(\lambda+1)$. The variance $\sigma^2$ of the distribution thus reads $$\sigma^2\equiv\sum_n (n-\mu)^2 P(n)=\sum_\lambda p_\lambda \lambda(\lambda+1)-\mu^2,$$ and finally the difference between variance and expected value, $\sigma^2-\mu$, is $$\sigma^2-\mu=\sum_\lambda p_\lambda\lambda(\lambda+1)-\mu(\mu+1).\tag1$$ Defining $f(\lambda)\equiv\lambda(\lambda+1)$, (1) can be written as $$\sigma^2-\mu=\sum_\lambda p_\lambda f(\lambda)-f\Big(\underbrace{\sum_\lambda p_\lambda \lambda}_{\mu}\Big).$$ The conclusion $\sigma^2-\mu\ge0$ now follows from $f$ being convex, together with Jensen's inequality. This proves that an arbitrary mixture (convex combination) of Poissonians gives a super-Poissonian distribution satisfying $\sigma^2\ge\mu$.
{ "domain": "physics.stackexchange", "id": 99806, "lm_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, photons, quantum-information, quantum-optics", "url": null }
materials, structural-analysis, finite-element-method, measurements, steel Title: Units of measurement for structural analysis FEA engine I'm using CCX finite elements analysis engine along with its pre- and post-processor CGX: http://www.dhondt.de/index.html https://github.com/calculix Example I'm looking at one example here that is using steel material: https://github.com/calculix/CalculiX-Examples/blob/a3ef0b86de47ad3d8f7e4bb39a3200c839a55f2c/Elements/Solid/solid.inp#L7 Elastic specifications In the example above, the declaration is done for Young’s modulus, Poisson’s ratio, and Temperature: *ELASTIC,TYPE=ISO 210000,0.333333333,0 Density Mass density is initialized by: *DENSITY 7.85e-9 Gravity Gravity, i.e. acceleration vector, is defined like this: *DLOAD Eall,GRAV,9810.,0.,-2,0. Input values Therefore, the input values are: Young’s modulus = 210000 Mass density = 7.85e-9 Gravity acceleration = 9810.
{ "domain": "engineering.stackexchange", "id": 5104, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "materials, structural-analysis, finite-element-method, measurements, steel", "url": null }
quantum-mechanics, homework-and-exercises of the particle Just recall the definitions: spherical harmonics $Y^m_l$ are eigenvectors of both ${ \hat L}_z$ and $\hat L^2$ with eigenvalues of $m$ and $l(l+1)$ respectivelly (with $\hbar = 1$) if you understand that this is a spin $1 \over 2$ particle then it should be obvious that $\hat s^2 = s(s+1) = {3 \over 4}$. If not, recall how spin matrices look like (e.g. start with Pauli matrices) and compute $\hat s^2$ directly. the total Hilbert space $H$ is a tensor product of the scalar particle system with the spin system $H_{total} = H_s \otimes H_2$. So the operators on this space are $\hat {\mathbf L}_{total} = \hat {\mathbf L} \otimes \hat {\mathbb 1}_2$, $\hat {\mathbf s}_{total} = \hat {\mathbb 1}_s \otimes \hat {\mathbf s}$ (this just means that orbital momentum is still just differential operators and spin is just matrix operator) and $\hat J_{total} = \hat L_{total} + \hat s_{total}$. The rest is direct computation
{ "domain": "physics.stackexchange", "id": 515, "lm_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, homework-and-exercises", "url": null }
navigation, mapping, gps Originally posted by Tom Moore with karma: 13689 on 2014-11-25 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 20148, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, mapping, gps", "url": null }
ruby, networking, email, ssh, status-monitoring @username = "username" @password = "password" server_list = %w(these are all the servers that we can ssh too) server_list.each do |server| status = server_status(server) puts status_message(server,status) end
{ "domain": "codereview.stackexchange", "id": 17270, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby, networking, email, ssh, status-monitoring", "url": null }
ideal-gas, gas, states-of-matter 2. Crumpled water bottle after plane lands System: air inside the closed bottle. Amount of gas is constant. (Bottle is closed.) Temperature is constant. (Your plane cabin is heated for your comfort.) Pressure increases. (Although the cabin is pressurised, it isn't pressurised to the atmospheric pressure at ground level, and it isn't completely airtight. When the plane lands, it goes from the lower-pressure sky-level to the higher-pressure ground level. So the external pressure on the bottle increases, and at equilibrium the internal pressure must match that.) Therefore, volume decreases. (Your bottle is not rigid, so it crumples to decrease the volume in response to the other conditions.) 3. Fridge door harder to open second time after first
{ "domain": "physics.stackexchange", "id": 55601, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ideal-gas, gas, states-of-matter", "url": null }
terminology, metrology, experimental-technology Any of various measuring instruments having two usually adjustable arms, legs, or jaws used especially to measure diameter or thickness —usually used in plural a pair of calipers "Micrometer screw" from the Oxford dictionary: A screw of fine pitch attached to optical and other instruments for making fine adjustments of position. Micrometer from Merriam Webster's dictionary: 1 An instrument used with a telescope or microscope for measuring minute distances 2 A caliper for making precise measurements that has a spindle moved by a finely threaded screw The Wikipedia article "Micrometer" uses the term "micrometer-screw calipers" and notes that such devices were introduced to the mass market by the company Brown and Sharpe who were founded in Providence, Rhode Island. The Oxford dictionary defines "micrometer" as follows:
{ "domain": "physics.stackexchange", "id": 39244, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "terminology, metrology, experimental-technology", "url": null }
units, notation, unit-conversion Title: Semantics: Unit/second versus unit-second I've been trying to make sense of an unusual bit of mathematical and notational semantics in my electrical engineering studies: Velocity is typically given in units of metres per second ( $ v = \frac{m}{s} = m \cdot s^{-1} $ ). That is, a velocity of one metre per second is defined as a rate of positional change of one metre in a time period of one second. However, some examples where this notation isn't the case in electrical engineering include the following:
{ "domain": "physics.stackexchange", "id": 41686, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "units, notation, unit-conversion", "url": null }
brushless-motor, esc Weight: 32g Programming Functions: Battery Type: Lipo /NiXX Brake: On / Off Voltage Protection: Low / Mid / High Protection mode: Reduce power / Cut off power Timing: Auto / High / Low Startup: Fast / Normal / Soft PWM Frequency: 8k / 16k Helicopter mode: Off / 5sec / 15sec (Start up delay) If the motor stalls, I know the current draw will increase drastically. So my questions are:
{ "domain": "robotics.stackexchange", "id": 492, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "brushless-motor, esc", "url": null }
|\ -4| \ | \ |_____ \ <- theta -3 and then go through the process as above to find the second set of possible values for $\sin \theta, \cos \theta$. I'm going to go for a more visual approach to this, ignoring the triangle above. Consider a 2D cartesian graph, let's try to draw the possible triangles that the above condition represents. In order for $\tan \theta = \frac{4}{3}$ we either have a triangle in the first or third quadrant. Drawing these two triangles we either get /| / | / | / | / | 4 / | theta -> /______| 3 or -3 -------------- <- theta | / | / -4 | / | / | / | / | / | / | / | / | / | / |/ Now we can use the pythagorean theorem (taking the hypotenuse as positive since the slope here is clearly positive) to find the last sides of the triangles and from there find $\sin \theta, \cos \theta$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471632833944, "lm_q1q2_score": 0.8240900168589559, "lm_q2_score": 0.8376199552262967, "openwebmath_perplexity": 454.80773401897204, "openwebmath_score": 0.8197816014289856, "tags": null, "url": "https://math.stackexchange.com/questions/827648/trigonometry-tan-theta-dfrac43/827657" }
javascript, callback, promise @type Function.VowList: Pledge */ Pledge['resolve'] = function() { var /** @type Pledge */ pledge = create(arguments); setTimeout(function() { resolve(pledge); }, 0); return pledge; }; /** pledge.and Appends a new pledge to this one and returns it. @type Function.VowList: Pledge */ Pledge.prototype['and'] = function() { return resolveNext(this, create(arguments)); }; /** pledge.or Sets a new pledge as this pledge's error handler, and returns this pledge. @type Function.VowList: Pledge */ Pledge.prototype['or'] = function() { if (this.locked) { throw new Error("locked"); } this.fail = create(arguments); return /** @type Pledge */ this; }; /** pledge.then
{ "domain": "codereview.stackexchange", "id": 8268, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, callback, promise", "url": null }
cc.complexity-theory, np-hardness satisfying assignment $\to$ clique Next suppose we have a satisfying assignment of $\phi$ with exactly $K = k+ (n+1) \times {k \choose 2}$ true variables. Any satisfying assignment has $y_e^0 = y_e^1 = \cdots = y_e^n$. Then let $y_e = y_e^0$. Define $n_y$ to be the number of true $y_e$s. Similarly, define $n_x$ to be the number of true $x_v$s. Notice that the number of true variables in the assignment is equal to $n_x + (n+1) \times n_y$. Furthermore, $0 \le n_x < n+1$ since there are only $n$ different $x_v$s. Thus, we can conclude that $n_x = K~\text{mod}~(n+1) = k$ and $n_y = \lfloor \frac{K}{n+1} \rfloor = {k \choose 2}$. Let $C = \{v \in V~|~x_v~\text{is true}\}$ and let $E' = \{e \in E~|~y_e~\text{is true}\}$. Note that $|C| = n_x$ and $|E'| = n_y$ by definition. Then $E'$ is a set of ${k \choose 2}$ edges, and $C$ is a set of $k$ edges.
{ "domain": "cstheory.stackexchange", "id": 3996, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, np-hardness", "url": null }
**Method 1:** I tried $$x=r\cos\theta, y=\frac{r}{k}\sin\theta.$$ Then assuming my calculations are correct (I verified them several times) I end up with the following equation after multiplying all terms by $k^2$: $$r^2\cos^2\theta-kr^2\sin\theta\cos\theta+k^2r^3\cos^3\theta+r^3\cos \theta-r^3\cos^3\theta-r^4\cos^2\theta+r^4\cos^4\theta+kr^2-kr^2\cos^2\theta-kr^3\cos\theta+kr^3\cos^3\theta+r^3\sin^3\theta+kr^4\cos^2\theta-kr^4\cos^4\theta \geq 0.$$ Upon attempting to bound terms, I ran into great difficulty (I won't elaborate here but it suffices to say I didn't get what I needed). This expression is monstrous, with lots of differing terms and exponents! **How can I proceed?** **Method 2:** I linearized the system at the origin to get $$\dot{x}=-x+y, \dot{y}=-y,$$ which has eigenvalues $-1,-1$. Then $$\dot{V}=2x(-x+y)+2ky(-y)=-2x^2+2xy-2ky^2=x^2-xy+ky^2 \geq 0 \implies$$ $$(x-\frac{y}{2})^2 = x^2-xy+\frac{y^2}{4} or (x-\sqrt{k}y)^2=x^2-2\sqrt{k}xy+ky^2 \implies k=1/4$$.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692359451417, "lm_q1q2_score": 0.824206386947015, "lm_q2_score": 0.8438951045175643, "openwebmath_perplexity": 400.30834278422464, "openwebmath_score": 0.7860698103904724, "tags": null, "url": "https://mathhelpboards.com/threads/algebraic-manipulations-for-system-of-differential-equations.9373/" }
(Which of course, means $n$ is $441/9$, or $49$.) You wouldn't even have to guess and check at all, if you compute that $$110\equiv2\mod9$$ then you can see that $$4\cdot110\equiv-1\mod9$$ so $4\cdot110+1$ is your multiple of $9$. - Ah, I see, thanks. Suppose you decided to take a different approach, such as just solving it. How would you solve for n? – Josh M Feb 6 '14 at 2:43 Ah, thanks a lot :) – Josh M Feb 6 '14 at 2:47 You could solve for $n$ in each of your original three congruences first. But then what would you do? The standard approach would be to use the CRT to merge the three solutions together into a solution mod $441$. Why would we do that when we already had $A\equiv B$ modulo three relatively prime moduli? So we can just skip to the same equation modulo the product. – alex.jordan Feb 6 '14 at 2:48 $5,11\mid 9n\!-\!1\, \Rightarrow\, 55\mid 9n\!-\!1,\ \$ therefore $\ \ n\equiv \color{#c00}1/9\equiv \color{#c00}{-54}/9\equiv -6\pmod{55}$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290901291856, "lm_q1q2_score": 0.8092657560276371, "lm_q2_score": 0.8333245953120234, "openwebmath_perplexity": 163.89968102094952, "openwebmath_score": 0.7205091118812561, "tags": null, "url": "http://math.stackexchange.com/questions/665499/determine-the-smallest-multiple-of-9-which-divided-by-each-of-the-numbers-2-5-a/665503" }
newtonian-mechanics, energy-conservation Here is a simulation involving a reasonably "stiff" force law $$ F \;=\; \begin{cases}0 & \text{if }d \geq 2, \\ 10^{54}(2-d)^{10} & \text{if }d<2.\end{cases} $$
{ "domain": "physics.stackexchange", "id": 11630, "lm_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, energy-conservation", "url": null }
lost with this I found the second derivative but cant find any values for it equaling 0?. Finally, apply reasoning skills to justify solutions for optimization problems. Example # 4: Find the relative extrema using both the 1st Derivative Test and the 2nd Derivative Test. Calculus Q&A Library Find the relative extrema, if any, of the function. The test for extrema uses critical numbers to state that:. Extrema can be found by taking the derivative of a function and setting it to equal zero. We show a procedure to find global extrema on closed intervals. Only those whose second derivative is negative are relative maxima. 2 2 CONSTRAINED EXTREMA Thus, the second partial derivatives of f are the same at both (±1, 0) and (0, ±1), but the sharpness with which the two level curves bend determines which are local maxima and which are local minima. Let us consider a function f defined in the interval I and let \(c\in I$$. Objective: Apply the Second Derivative Test to find relative extrema of a
{ "domain": "brouwerverkeersopleidingen.nl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9916842195563768, "lm_q1q2_score": 0.8198370424180074, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 259.82261796467463, "openwebmath_score": 0.7462790012359619, "tags": null, "url": "http://brouwerverkeersopleidingen.nl/how-to-find-relative-extrema-using-second-derivative-test.html" }
Odd numbers still have not been eliminated yet. We have to eliminate the cases where the last digit is $$1, 3, 7,$$ or $$9$$. Suppose that the last two digits ($$f(2)$$ and $$f(3)$$) are $$0$$ and $$1$$ respectively. Then, one must have $$f(1) \in \{2,3,4,6,7,8,9\}$$, eliminating $$7$$ odd numbers to reduce the count to $$441$$. Similar considerations apply when the middle digit is still $$0$$, but the last digit is now $$3, 7,$$ or $$9$$. This eliminates $$3 \cdot 7=21$$ more odd numbers, reducing the count to $$420$$. Now, let's move on to the case where the middle digit is nonzero. Fixing a last digit $$d \in \{1,3,7,9\}$$, one would then need to subtract the number of injections $$\{1,2\} \to \{1,2,3,4,6,7,8,9\} \setminus \{d\}$$. Suppose that $$d=1$$. Then, subtracting the number of injections $$\{1,2\} \to \{2,3,4,6,7,8,9\}$$ gives $$420-{_{7}P_{2}}=420-42=378$$. Forty-two odd numbers with the last digit equal to $$1$$ have now been eliminated.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290963960277, "lm_q1q2_score": 0.8348444759997028, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 233.2971381188454, "openwebmath_score": 0.5184412598609924, "tags": null, "url": "https://math.stackexchange.com/questions/3801331/how-many-even-three-digit-numbers-have-distinct-digits-and-have-no-digit-5" }
mass, torque Title: Lifting objects from their center of mass =zero torque? If i lift an object like a dumbbell from its center of mass, torque would be zero,however we don't generally lift a barbell from its center of mass(we lift them near the sides) ,the dumbbell should be much easier to stabilize since there will be no torque when we lift them from their center of mass.
{ "domain": "physics.stackexchange", "id": 62198, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mass, torque", "url": null }
coins. for the two-headed coin, the probability of getting two heads in two flips is 1. coin is chosen at random and flipped, and comes up heads. 1 Directed graphical models. A coin is chosen at random from the bag and tossed 2 times. If the experiment can be repeated potentially infinitely many times, then the probability of an event can be defined through relative frequencies. Published on June 14, 2016. We do not return it to the bin. You flip it and it comes up "heads". (d) There are two coins in a box. The first coin is two-headed. A fair coin has a 50-50 probability of coming up heads or tails; a double-headed coin always comes up heads. Given that heads show both times, what is the probability that the coin is the two-headed one?. There are three coins in a box. A two headed quarter is not something that was done at the mint, it is a novelty item, generally with high enough magnification you can see the seam that the two coins were joined together. Math Two-Headed Coin and Bayesian
{ "domain": "makobene.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771770811146, "lm_q1q2_score": 0.8482965725150092, "lm_q2_score": 0.8596637541053282, "openwebmath_perplexity": 262.3697052783987, "openwebmath_score": 0.8458251953125, "tags": null, "url": "http://chhh.makobene.de/two-headed-coin-probability.html" }
ros, pcl, svn, ros-fuerte It puts the pcl trunk code into a 'pcl16' namespace, so that it can coexist with fuerte's pcl 1.5. Using it basically involves replacing the pcl and pcl_ros namespaces with pcl16 and pcl16_ros respectively. - Bhaskara Originally posted by prince with karma: 660 on 2012-06-19 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 9852, "lm_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, pcl, svn, ros-fuerte", "url": null }
reinforcement-learning, sutton-barto, sarsa, expected-sarsa A policy could be stochastic. In the case of SARSA, it is stochastic because of the use of $\epsilon$-greedy. Isn't it on-policy and therefore ϵ-greedy? I don't quite understand the question. SARSA is on-policy evaluation with $\epsilon$-greedy policy. Q-learning is off-policy evaluation with $\epsilon$-greedy policy. $\epsilon$-greedy is just a way to turn an action-value function into a policy. Because Expected-Sarsa is off-policy the experience it learns from can be from any policy ... How can Exected-Sarsa learning from such policy be generally better than normal Sarsa learning from an ϵ-greedy policy, especially with the same amount of experience?
{ "domain": "ai.stackexchange", "id": 983, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, sutton-barto, sarsa, expected-sarsa", "url": null }
php Than this? if( !$this->$text_object->checkPattern( 'name' ) ) { return $this->$message_object->get( 'name' ); } if( !$this->$text_object->checkPattern( 'email' ) ) { return $this->$message_object->get( 'email' ); } if( !$this->$text_object->checkPattern( 'pass' ) ) { return $this->$message_object->get( 'pass' ); }
{ "domain": "codereview.stackexchange", "id": 1920, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php", "url": null }
c, queue Put them in an enum instead. typedef enum {VERY_LOW, LOW, NORMAL, HIGH, VERY_HIGH} priority_t; You will have to change your struct definition though (and perhaps some other definitions in other areas). struct Priority_Queue { Queue **index; //Queue array size_t element_count; enum priority_t priority_levels; }; This is an odd line that may need re-writing. You should change the overall queue struct to be defined as queue_t in my opinion typedef struct Priority_Queue Priority_Queue; // can be confusing typedef struct queue_t Priority_Queue; // goes from abstract to concrete, readable You have some very long name definition such as pq_insert_with_default_priority. That can be a task to type without an IDE, and annoying if you misspell it. Perhaps you should make the name shorter.
{ "domain": "codereview.stackexchange", "id": 5840, "lm_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, queue", "url": null }
python, beginner, python-2.x, random, playing-cards def bet(bank): #Ask how much you want to wager print ('How much would you like to wager?: ', end="") try: wager = int(raw_input()) if wager > bank: print ('Your bet must be less than or equal to what is in your bank. Please try again.') bet(bank) else: checkBet(wager, bank) except ValueError: print('Please input a valid integer') bet(bank) def checkBet(wager,bank): wagerString = str(wager) print ('Awesome! You want to bet $'+ wagerString + ' is that right?: ') check = raw_input('Type \'y\' or \'n\': ') if check == 'y': print ('Awesome, lets play!') cardGame(wager, bank) elif checkBet == 'n': print ('Lets try again, shall we?') checkBet(wager) else: print ('Please try again') checkBet(wager)
{ "domain": "codereview.stackexchange", "id": 22145, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-2.x, random, playing-cards", "url": null }
c#, algorithm, programming-challenge, time-limit-exceeded, hash-map \$1 \le T \le 10\$ \$1 \le N1, N2 \le 1000\$ \$1 \le \text{Length of String} \le 1000\$ Every String is composed of digits from [1 - 9] Sample input 1 2 2 234526 8345 333564 98847675 Sample output 0.750 Explanation The output of all the combination will be: Simple(234526,333564) = 3456 Simple(8345,333564) = 345 Simple(8345,98847675) = 458 Simple(234526,98847675) = 456 Since 3 of them are even, probability is \$\frac{3}{4}\$. Time Limit: 1.0 sec(s) for each input file. Memory Limit: 256 MB
{ "domain": "codereview.stackexchange", "id": 23780, "lm_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, programming-challenge, time-limit-exceeded, hash-map", "url": null }
regression, amazon-ml Again this may not be possible in AWS. edit: I juse realized that the histograms were residual plots. Do three things Increase bin size. Check to see if the residuals are centered around 0 and then check if there is skewness in the data. If the data is centered around 0 and symmetric then you can say the model error is basically random and does not favor over or under predicting. If the data is not centered around 0 and there is skewness, then the errors can be systematic and then in that case considering adding more variables.
{ "domain": "datascience.stackexchange", "id": 2353, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "regression, amazon-ml", "url": null }
newtonian-mechanics, lagrangian-formalism, computational-physics, variational-principle, action The slope of the plane appears to be $\frac{dz}{dy} = \frac{-1}{2g}; \frac{dz}{dv}=0$ and passes through the initial condition $(y_0 = 0, v_0 = 5)$. My question is: where does the slope of this plane come from? Any other information about level sets and direct minimization of the action functional would be appreciated also. FWIW, the simplest is probably to graph the mechanical energy $(y,\dot{y})\mapsto \frac{m}{2}\dot{y}^2 + mgy $ rather than the Lagrangian. Because of energy conservation the stationary paths would then be level sets.
{ "domain": "physics.stackexchange", "id": 65019, "lm_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, lagrangian-formalism, computational-physics, variational-principle, action", "url": null }
ros, arduino, pid, rosserial, ros-indigo If you want to move the PID away from the Arduino, you could Publish "state" (aka currentValue) and "setpoint" (aka command) topics Subscribe to a "control_effort" topic Launch a pid control node Originally posted by AndyZe with karma: 2331 on 2017-01-23 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 26801, "lm_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, arduino, pid, rosserial, ros-indigo", "url": null }
performance, c, random, library The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a splitmix64 generator and use its output to fill s. */ uint64_t s[2]; //////////////////////////////////////////////////////////////////////// /* Modifications by Subhomoy Haldar (github.com/Subh0m0y) start here. */ // As per the recommendation by the original authors - David Blackman and // Sebastiano Vigna, we shall use two iterations of a seeded splitmix64 // generator (written by Sebastiano Vigna) and use its output to seed this // program's seed vector. // Original and permanent link: http://xoroshiro.di.unimi.it/splitmix64.c static uint64_t splitmix64next(const uint64_t x) { uint64_t z = (x + 0x9e3779b97f4a7c15); z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9; z = (z ^ (z >> 27)) * 0x94d049bb133111eb; return z ^ (z >> 31); } const uint64_t SEED_SCRAMBLER = 0x37bc7dd1f3339a5fULL;
{ "domain": "codereview.stackexchange", "id": 30654, "lm_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, c, random, library", "url": null }
• Yeah I've come across telescoping sum and products before but I'd never think of it to use it here in the proof. Interesting way to see that. But what do you need to do to complete this proof? Does one just say because 13 is a product in this telescoping product that is indeed divisible by 13 and then the proof is finished? – Anonymous196 Sep 11 '17 at 15:27 • See this answer for a vivid view of the telescopic cancellation in the above answer. – Bill Dubuque Sep 12 '17 at 15:02
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822876987039989, "lm_q1q2_score": 0.820685196942615, "lm_q2_score": 0.8354835330070839, "openwebmath_perplexity": 834.9521838044379, "openwebmath_score": 0.9147459864616394, "tags": null, "url": "https://math.stackexchange.com/questions/2425275/how-to-prove-82n-52n-is-divisible-by-13-where-n-in-mathbbn-0/2425333" }
each other. Opposite angles are congruent. If the diagonals of a parallelogram are perpendicular and not congruent, then the parallelogram is. The parallelogram has the following properties: Opposite sides are parallel by definition. The parallelogram has the following properties: Opposite sides are parallel by definition. 10. If all the angles of the rhombus are right angles then you have a special rhombus which is a square A rhombus is a special kind of parallelogram, in which all the sides are equal. Parallelogram and Rhombus: A parallelogram is a quadrilateral (has 4 sides) where its opposite sides are parallel and equal and its opposite angles are equal. When the diagonals of a parallelogram are perpendicular to each other then it is called. So I'm thinking of a parallelogram that is both a rectangle and a rhombus. Start here or give us a call: (312) 646-6365, © 2005 - 2021 Wyzant, Inc. - All Rights Reserved, a Question Trapezoid Midsegment Theorem. Squares are rhombuses and
{ "domain": "thinkandstart.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471632833943, "lm_q1q2_score": 0.8681741653815287, "lm_q2_score": 0.8824278788223264, "openwebmath_perplexity": 404.38305370460273, "openwebmath_score": 0.6866893172264099, "tags": null, "url": "https://thinkandstart.com/menace-ii-oqcpwq/if-the-diagonals-of-a-parallelogram-are-perpendicular-3f40df" }
java, thread-safety, reflection, event-handling private final EventHandler[] getEventHandlers(final Class<?> clazz) { Set<EventHandler> handlers = eventMapping.get(clazz); if (handlers == null) { return new EventHandler[0]; } synchronized(handlers) { return handlers.toArray(new EventHandler[handlers.size()]); } } @Override public void registerListenersOfObject(final Object callbackObject) { Arrays.stream(callbackObject.getClass().getMethods()) .filter(method -> (method.getAnnotation(Event.class) != null)) .filter(method -> method.getReturnType().equals(void.class)) .filter(method -> method.getParameterCount() == 1) .forEach(method -> { Class<?> clazz = method.getParameterTypes()[0]; if (!classConstraint.isAssignableFrom(clazz)) { return; } includeEventHandler(clazz, new MethodEventHandler(method, callbackObject, clazz)); }); }
{ "domain": "codereview.stackexchange", "id": 7388, "lm_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, thread-safety, reflection, event-handling", "url": null }
## Quadratic Equation prob: x - 10 - 20 square root (x - 2) + Quadratic equations and inequalities, variation equations, function notation, systems of equations, etc. DrO Posts: 1 Joined: Sat May 16, 2009 2:16 am Contact: ### Quadratic Equation prob: x - 10 - 20 square root (x - 2) + How do you attempt a problem like this? x - 10 - 20 square root (x - 2) + 30 = 0 Sorry I recently joined and don't know how to put the square root sign in. There is a square root sign above the (x - 2). If someone can tell me how to put in the square root sign I will repost the question. Martingale Posts: 350 Joined: Mon Mar 30, 2009 1:30 pm Location: USA Contact: DrO wrote:How do you attempt a problem like this? x - 10 - 20 square root (x - 2) + 30 = 0 Sorry I recently joined and don't know how to put the square root sign in. There is a square root sign above the (x - 2). If someone can tell me how to put in the square root sign I will repost the question. $x-10-20\sqrt{x-2}+30=0$
{ "domain": "purplemath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713896101315, "lm_q1q2_score": 0.8055327424588082, "lm_q2_score": 0.8175744784160989, "openwebmath_perplexity": 668.8426733625743, "openwebmath_score": 0.7430055737495422, "tags": null, "url": "http://www.purplemath.com/learning/viewtopic.php?f=8&t=532&p=1689" }
ros, ros2, ardent Originally posted by Dirk Thomas with karma: 16276 on 2018-04-10 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by NickM on 2018-04-10: I see, thanks for the explanation. The benefit of Travis is that is integrated with GitHub and is free for public projects. Working in a forked repo I see the result of running all the tools right away. This is way better than running tools locally and hoping that local environment is a good one. Comment by NickM on 2018-04-10: I want that by the time PR is submitted, the quality of the PR is very clear for the submitter and the maintainer without any additional steps on their side. There is definitely no value in duplicating work.
{ "domain": "robotics.stackexchange", "id": 30604, "lm_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, ardent", "url": null }
classical-mechanics Measurement Case 2 (origin $O'$ vertically directly beneath $P$): Now if I choose to describe the same problem by choosing an origin $O'$ of a Cartesian coordinate system to be vertically directly beneath $P$, the particle's position vector $\vec{r}'$ makes an angle $\phi$ with the z-axis and the particle's angular momentum $\vec{L}'$ also makes a $\phi$ angle with the z-axis. As the particle rotates, however, $\vec{r}'$ also rotates about the z-axis, and therefore, the angular momentum $\vec{L}'$ keeps changing direction as shown below: $\vec{L}' = \vec{r}'\times\vec{p}'\;\ldots\text{ definition} \\ \hphantom{\vec{L}'} = m\,(\vec{r}'\times\vec{v}')\;\ldots\text{ definition of linear momentum }\vec{p}' \\ \hphantom{\vec{L}'} = m\,(\vec{r}'\times(\vec{\omega}\times\vec{r}'))\;\ldots\text{ definition of linear velocity in terms of angular velocity} \\
{ "domain": "physics.stackexchange", "id": 13248, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics", "url": null }
optics The main idea is that the convex lens should be able to move back and forth on some track or rail controlled by you, so that you can move the actual point where you need the suns light rays converge. This way the light should be able to be focused on any point.
{ "domain": "physics.stackexchange", "id": 86191, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics", "url": null }
javascript, object-oriented, tree, ecmascript-6 which supports your use case, too: we can assign another instance of this object to some property and enjoy the traversable structure: > e.b.another = new Element({ abc: 'xyz' }) Element { abc: 'xyz', __current__: [Circular] } > e.b Element { c: 2, d: Element { e: 3, f: Element { g: 4, h: [Element], __current__: [Circular], __parent__: [Circular] }, __current__: [Circular], __parent__: [Circular] }, __current__: [Circular], __parent__: Element { a: 1, b: [Circular], __current__: [Circular], e: [Circular] }, another: Element { abc: 'xyz', __current__: [Circular] } } > e.b.another.e = e Element { a: 1, b: Element { c: 2, d: Element { e: 3, f: [Element], __current__: [Circular], __parent__: [Circular] }, __current__: [Circular], __parent__: [Circular], another: Element { abc: 'xyz', __current__: [Circular], e: [Circular] } },
{ "domain": "codereview.stackexchange", "id": 31492, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, object-oriented, tree, ecmascript-6", "url": null }
cc.complexity-theory, time-complexity, set-cover, notation Title: Worst-case asymptotic-complexity of the Set-cover problem? What's the worst-case asymptotic-complexity of the Set-cover problem in Big O notation? I've been developing some novel techniques to try and solve this problem but am having trouble finding the theoretical limits I need to surpass. Thanks for all information I don't see how you can say that SCP or any other problem has "worst-case asymptotic complexity", but surely an algorithm solving it can have. However, the problem is NP-complete, and the optimization version is NP-hard.
{ "domain": "cstheory.stackexchange", "id": 1507, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, time-complexity, set-cover, notation", "url": null }
python, kivy The GUI The MP3 tagger This way, it's easier to maintain both parts, you could also end up creating a CLI tool that does the same thing as the GUI tool and you wouldn't need to rewrite a thing, you could just reuse the mp3 tagger class.
{ "domain": "codereview.stackexchange", "id": 35597, "lm_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, kivy", "url": null }
javascript, jquery, node.js, api, express.js //model data var locations = [{ name: 'Le Thai', coords: { lat: 36.168743, lng: -115.139866 } }, { name: 'Atomic Liquors', coords: { lat: 36.166782, lng: -115.13551 } }, { name: 'The Griffin', coords: { lat: 36.168785, lng: -115.140329 } }, { name: 'Pizza Rock', coords: { lat: 36.17182, lng: -115.142304 } }, { name: 'The Mob Museum', coords: { lat: 36.172815, lng: -115.141242 } }, { name: "Joe Vicari's Andiamo Italian Steakhouse", coords: { lat: 36.169437, lng: -115.142903 } }, { name: 'eat.', coords: {
{ "domain": "codereview.stackexchange", "id": 25318, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, node.js, api, express.js", "url": null }
forces, free-body-diagram To some extent the issue might be one of semantics - ie whether 'van der Waals force' includes the inter-molecular repulsion or is separate from it. Nature does not distinguish one force from another, only we do that, for our own convenience. So I think it is an issue of how forces are distinguished and classified.
{ "domain": "physics.stackexchange", "id": 31336, "lm_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, free-body-diagram", "url": null }
- \verts{-t - 2n\pi}}\,\dd t = {\pi \over 2}\sum_{n=-\infty}^{\infty}\overbrace{\left.\int_{-1}^{1}\dd t \right\vert_{-1 - 2n\pi\ <\ t\ <\ 1 - 2n\pi}}^{\ds{=\ 2\,\delta_{n0}}} = \color{#0000ff}{\Large\pi} \end{align} where we use the identity $\ds{{\sin\pars{x} \over x} = \half\int_{-1}^{1}\expo{\ic tx}\,\dd t}.\quad$ See line $\pars{4}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754515389344, "lm_q1q2_score": 0.8003292154280248, "lm_q2_score": 0.8128673269042767, "openwebmath_perplexity": 1889.0419364904883, "openwebmath_score": 0.9932861328125, "tags": null, "url": "https://math.stackexchange.com/questions/331404/how-to-prove-this-identity-pi-sum-limits-k-infty-infty-left-frac-sin" }
beginner, go, coordinate-system, a-star import "fmt" // TODO separate things in packages /* Error codes */ const ( SUCCESS int = iota INTERNAL_ERROR NO_PATH TOO_FAR UNAVAILABLE ) /* Define any object here */ type Obj struct { attr int8 } /* Define the positional/distances type to be used in geo funcitons. This can be any numerical type, signed or unsigned, integer or real. */ type Coord int64; /* Define any N-dimentional position struct here */ type Pos struct { y Coord x Coord } /* A grid represented by a hash table of the form { position : object } */ type Grid map[Pos]Obj /* Don't A* if dst further than this, and stop iteration after this */ const MAX_PATHFINDING_STEPS Coord = 6000 /* Returns the positions in the shortest path between src and dst and an error code.
{ "domain": "codereview.stackexchange", "id": 17633, "lm_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, go, coordinate-system, a-star", "url": null }
Name Explanation Description Band matrix A square matrix whose non-zero entries are confined to a diagonal band. Bidiagonal matrix A band matrix with elements only on the main diagonal and either the superdiagonal or subdiagonal. Binary matrix or Boolean A matrix whose entries are all either 0 or 1. Defective matrix if the geometric and algebraic multiplicities differ for at least one eigenvalue. Diagonal matrix A square matrix with all entries outside the main diagonal equal to zero. Elementary matrix If it is obtained from an identity matrix by performing a single elementary row operation. Hadamard matrix A square matrix with entries +1, −1 and whose rows are mutually orthogonal. Hermitian or self-adjoint A square matrix which is equal to its conjugate transpose. $${\bf A} = {\bf A}^{\ast} .$$ Hessenberg matrix Similar to a triangular matrix except that the elements adjacent to the main diagonal can be non-zero: $$A[i,j] =0$$ whenever $$i>j+1$$ or $$i < j-1 .$$ Hollow matrix A square
{ "domain": "brown.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9941800395535466, "lm_q1q2_score": 0.8009434415069948, "lm_q2_score": 0.8056321889812553, "openwebmath_perplexity": 193.4964166188315, "openwebmath_score": 0.8856301307678223, "tags": null, "url": "https://www.cfm.brown.edu/people/dobrush/am34/Mathematica/ch1/special.html" }
algorithms, graphs, shortest-path For each edge $(u,v) \in F$ add: an edge (of weight $0$) between the copy of $u$ in $G_1$ and the copy of $v$ in $G_2$. an edge (of weight $0$) between the copy of $u$ in $G_2$ and the copy of $v$ in $G_3$. Add a new vertex $t^*$ and the three edges (of weight 0) between each copy of $t$ in $G_1$, $G_2$, and $G_3$ and $t^*$. You can now find a shortest path $P$ between the copy of $s$ in $G_1$ and $t^*$. The list of vertices traversed by $P$ (except for the final vertex $t^*$) will induce the sought shortest path on $G$.
{ "domain": "cs.stackexchange", "id": 17882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, shortest-path", "url": null }
matlab, signal-analysis, stft, time-frequency, real-time Figures 4.18 & 4.20, Wavelet Tour. Left is plain WVD, such interference is a dealbreaker for most applications. Right is windowed WVD, which attenuates interferences, but "reduces the time-frequency resolution" (under Eq 4.156).
{ "domain": "dsp.stackexchange", "id": 11711, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, signal-analysis, stft, time-frequency, real-time", "url": null }
c#, excel Update: After converting my document to CSV and using FileHelpers and changing the runtime configuration of my DbContext like so: yourContext.Configuration.AutoDetectChangesEnabled = false; yourContext.Configuration.ValidateOnSaveEnabled = false;
{ "domain": "codereview.stackexchange", "id": 7120, "lm_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#, excel", "url": null }
c++, chess // Attacks to the east for (int i = 1; i < numberOfMovesEast; i++) { Bitboard targetSquare = utils::shiftCurrentSquareByDirection(squareBitboard, i * EAST); if (targetSquareIsBlocked(targetSquare, blockerVariation)) { break; } else { attackBoard |= targetSquare; } } // Attacks to the west for (int i = 1; i < numberOfMovesWest; i++) { Bitboard targetSquare = utils::shiftCurrentSquareByDirection(squareBitboard, i * WEST); if (targetSquareIsBlocked(targetSquare, blockerVariation)) { break; } else { attackBoard |= targetSquare; } } } bool targetSquareIsBlocked(Bitboard targetSquare, Bitboard occupiedSquares) { return ( (targetSquare & occupiedSquares).numberOfSetBits() == 1 ); } Bitboard calculateBishopBlockerMask(const Bitboard & bitboard) { Bitboard potentialBlockersToTheBishop; Square square = static_cast<Square>(bitboard.findIndexLSB());
{ "domain": "codereview.stackexchange", "id": 44989, "lm_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++, chess", "url": null }
and Decay Determine whether each table represents an exponential growth function, an exponential decay function, or neither. Exponential growth formula Suppose the rate of change of some substance or quantity is proportional to the amount present, then the amount or numberA~t! at time t is given by A~t! 5 A 0 ekt (1. Biomedical engineers use them to measure cell decay and growth, and also to measure light intensity for bone mineral density measurements, the focus of this unit. Using negative power values results in fractions, and when these fractions have exponents applied to them we get “Decay”. Exercise 2It has been observed that a particular plant's growth is directly proportional to time. Distance, rate, time word problems Mixture word problems Work word problems One step equations Multi step equations Exponents Graphing exponential functions Operations and scientific notation Properties of exponents Writing scientific notation Factoring By grouping Common factor only Special cases
{ "domain": "libreriaperlanima.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713852853137, "lm_q1q2_score": 0.8374522814371483, "lm_q2_score": 0.8499711794579723, "openwebmath_perplexity": 1193.5853796587046, "openwebmath_score": 0.3269873261451721, "tags": null, "url": "http://gjde.libreriaperlanima.it/continuous-exponential-growth-and-decay-word-problems-worksheet.html" }
Cos a cos b
{ "domain": "burgerfi8518.site", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806523850542, "lm_q1q2_score": 0.8354084306694132, "lm_q2_score": 0.8519527982093666, "openwebmath_perplexity": 3452.214131882267, "openwebmath_score": 0.8957402110099792, "tags": null, "url": "https://zlsuzb.burgerfi8518.site/cos-a-cos-b.html" }
ros, imu, imu-drivers, quaternion Title: quaternion from IMU interpreted incorrectly by ROS I have a new CH Robotics UM6 IMU that outputs Quaternion which the datasheet labels as [a,b,c,d]. When I pass the Quaternion to ROS the X and Z axes are swapped, also pointing the IMU UP points the quat DOWN in rviz. I thought Quaternions didn't have "handedness"? Here is a video of the behavior. Anyhow, how do I swap axes without converting to Euler angles and introducing singularities? From the datasheet: All UM6 angle measurements are made with respect to a North-East-Down (NED) inertial frame. The inertial frame x-axis is aligned with magnetic north, the y-axis is aligned with magnetic east, and the z-axis points down toward the center of the Earth. The "pitch" angle represents positive rotation about the x-axis, "roll" represents positive rotation about the y-axis, and "yaw" represents positive rotation about the z-axis.rotation about the z-axis. PS I'm using python so numpy code would be great!
{ "domain": "robotics.stackexchange", "id": 5294, "lm_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, imu, imu-drivers, quaternion", "url": null }
python, performance, python-3.x, reinventing-the-wheel, serialization if not isinstance(obj, supported): return indent_level * not_value + repr(obj) enclosures = { dict: ('{', '}'), frozenset: ('frozenset({', '})'), list: ('[', ']'), set: ('{', '}'), tuple: ('(', ')') } singletons = { dict: 'dict()', frozenset: 'frozenset({})', list: '[]', set: 'set()', tuple: '()' } for cls in supported: if isinstance(obj, cls): if not obj: return open_indent + singletons[cls] start, end = enclosures[cls] obj_cls = cls break start = open_indent + start if obj_cls in singles: single_tuple = (obj_cls == tuple and len(obj) == 1) for i in obj: item = worker(i, indent+increment) if single_tuple: item += ','
{ "domain": "codereview.stackexchange", "id": 42248, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-3.x, reinventing-the-wheel, serialization", "url": null }
homework-and-exercises, lagrangian-formalism So it would be kinetic energy of the ball. Than I need potential energy. $$E_p = mgl\cos{(\phi)} + mgr\sin{(\omega t)}$$ Therefor Lagrangian should be: $$\mathcal{L} = \frac12 m \dot\phi^2 l^2 + \frac12 m r^2 \omega^2 - mrl \omega \dot \phi \sin{(\phi + \omega t)} - mgl\cos{(\phi)} - mgr\sin{(\omega t)}$$ It seems like right time for Lagrange equation. I'll compute every part of equation on the new line. $$\frac{\partial \mathcal{L}}{\partial \phi} = -mrl\omega \dot \phi^2 \cos{(\phi+ \omega t)} + mgl \dot \phi \sin{(\phi)}$$ $$\frac{\partial \mathcal{L}}{\partial \dot \phi} = ml^2 \dot \phi - mrl \omega \sin{(\phi + \omega t)}$$ $$\frac{d}{dt} \left( \frac{\partial \mathcal{L}}{\partial \dot \phi} \right) = ml^2\ddot \phi - mrl \omega^2 \dot \phi \cos{(\phi + \omega t)}$$ If this was right, the equation would look like: $$ml^2\ddot \phi - mrl \omega^2 \dot \phi \cos{(\phi + \omega t)} + mrl\omega \dot \phi^2 \cos{(\phi+ \omega t)} - mgl \dot \phi \sin{(\phi)} = 0$$
{ "domain": "physics.stackexchange", "id": 7469, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, lagrangian-formalism", "url": null }
algorithm, graph, rust while let Some(Visit { vertex, distance }) = to_visit.pop() { if !visited.insert(vertex) { // Already visited this node continue; } if let Some(neighbors) = adjacency_list.get(&vertex) { for (neighbor, cost) in neighbors { let new_distance = distance + cost; let is_shorter = distances .get(&neighbor) .map_or(true, |&current| new_distance < current); if is_shorter { distances.insert(*neighbor, new_distance); to_visit.push(Visit { vertex: *neighbor, distance: new_distance, }); } } } } distances } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] struct Vertex<'a> { name: &'a str, } impl<'a> Vertex<'a> { fn new(name: &'a str) -> Vertex<'a> { Vertex { name } } }
{ "domain": "codereview.stackexchange", "id": 31816, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, graph, rust", "url": null }
c++, beginner, rock-paper-scissors switch (r) { case 1: return 'r'; break; case 2: return 'p'; break; case 3: return 's'; break; } return 0; } // show choice of r, p or s void showValue(char x) { switch (x) { case 'r': std::cout << "Rock\n"; break; case 'p': std::cout << "Paper\n"; break; case 's': std::cout << "Scissors\n"; break; } } // find the winner void getWinner(char x, char y) { if ((x == 'r' && y == 'p') || (x == 'p' && y == 's') || (x == 's' && y == 'r')) { std::cout << "YOU LOST!\n"; } else if (x == y) { std::cout << "IT'S A TIE!\n"; } else { std::cout << "YOU WON!\n"; } }
{ "domain": "codereview.stackexchange", "id": 45307, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, rock-paper-scissors", "url": null }
# Ronelio’s Heavy Polynomial The featured problem for today came from a young mathematician named Ronelio Barasi. He is an inc0ming 4th year High School of Dalandanan National High School. He came from a poor and broken family and grew up with separated parents. At this very young age, here are his few achievements in mathematics both local and international math challenges. • 2014 MMC NCR Regional Individual – 3rd Place • 2014 MMC NCR Sectoral Individual Category A – 1st Place 2014 • MMC NCR Sectoral Regional Team – 2nd Place • 2013 MMC NCR Sectoral Regional Team – 1st place • Bronze medalist, 2013 Environmental Math Cup International Level in Hong Kong • Bronze medalist, 2013 King of Mathematics International Level in Hong Kong • Silver medalist,  2013 Asia Cup Math Olympiad International Level Hong Kong
{ "domain": "techiemathteacher.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989510906574819, "lm_q1q2_score": 0.8112934002918036, "lm_q2_score": 0.8198933381139645, "openwebmath_perplexity": 12872.72833337726, "openwebmath_score": 0.1976892501115799, "tags": null, "url": "http://techiemathteacher.com/2014/05/23/ronelios-heavy-polynomial/" }
machine-learning, clustering, dataset, data-cleaning For ex Number of transactions Gender Age group Weekend or weekday txns etc Hence you would need to first aggregate your data at a user level and create features of interest like the examples above and the try to cluster the customers.
{ "domain": "datascience.stackexchange", "id": 5368, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, clustering, dataset, data-cleaning", "url": null }
equilibrium, solubility $$ \ce{Ag2SO4 <=> 2Ag+ + SO4^2-}$$ Adding water accounts to increasing the volume of the solution. Hence more amount of solute can be dissolved since solubility of a salt depends on the amount of salt dissolved per unit volume. Therefore, there is an increase in the no. of ions produced in the solution. But as Avnish Kabaj mentioned, $[\ce{Ag+}]$ remains the same. Also as MollyCooL said, $\pu{K_{sp}}$ doesn't change as it is a constant at a particular temperature.
{ "domain": "chemistry.stackexchange", "id": 9780, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "equilibrium, solubility", "url": null }
the difference between theoretical and experimental probability; Diagram and visualize sample spaces using set lists, tree diagrams, tables, and Venn diagrams. Learn vocabulary, terms, and more with flashcards, games, and other study tools. 1 – Vocabulary Set Notation and Venn Diagrams v2-x4tc9m. May 19, 2017 - Conditional, permutations, combinations,. Basics of Set Theory. 3 Solving Proportions by Cross Multiplication 8. Let us come to know about the following terms in details. Start by watching the video then click the Begin Lesson button. 4 -Probability VENN Diagrams Name: MUTUALLY EXCLUSIVE (Disjoint) EVENTS vs. How many people do not like to sit during a concert. 2) Analyzing information using probability. Probability Y7 - Displaying top 8 worksheets found for this concept. Date: Topic: Assignment: Wednesday, 4/11: Set Theory and Venn Diagrams Section 7-1 – Sets – Blank-1gi7vy9. Unit 5-Polynomial graphing behaviour up to degree of three including regressions and extrapolations.
{ "domain": "svc2006.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713857177955, "lm_q1q2_score": 0.8334828736177018, "lm_q2_score": 0.8459424334245617, "openwebmath_perplexity": 1918.1852568927695, "openwebmath_score": 0.4274599254131317, "tags": null, "url": "http://svc2006.it/xffd/unit-7-probability-using-venn-diagrams.html" }
graphs how about the other side? how can I prove that? Can I say that, because the graph is undirected and it can be converted to a digraph, for each arbitrary pair of vertices $u$ and $v$ there is a path (or maybe some paths) which we can reach $v$ from $u$ and vice versa except the directed path of between them (the edge between them). So we can remove the directed path of between them. So there is no bridge edge in the graph. If $uv$ is a bridge then any orientation of $G$ either includes the edge $u\to v$ and has no path from $v$ to $u$, or vice-versa. If $G$ has no bridge, then it is $2$-connected. A graph is $2$-connected if, and only if, it can be decomposed as $C\cup P_1 \cup\dots \cup P_k$ where $C$ is a cycle and each $P_i$ is a path (possibly just a single edge) that intersects $C\cup P_1\cup\dots\cup P_{i-1}$ at both its endpoints and nowhere else. Now construct your strongly connected orientation from this decomposition.
{ "domain": "cs.stackexchange", "id": 12730, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graphs", "url": null }
java, validation, generics @SuppressWarnings( "boxing" ) private DecimalMaxValidator addDecimalMaxValidator( HashMap<String, Object> result, DecimalMaxValidator decMax, Validator v, HashMap<String, Object> tmp ) { if ( decMax == null ) { decMax = (DecimalMaxValidator) v; tmp.put( "value", decMax.getValue() ); tmp.put( "inclusive", decMax.isInclusive() ); tmp.put( "translationKey", decMax.getTranslationKey() ); result.put( "decimalMaxValidator", tmp ); } else { // TODO error, double dec } return decMax; } private LengthValidator addLengthValidator( LengthValidator lengthVal, Validator v, HashMap<String, Object> tmp ) { if ( lengthVal == null ) { lengthVal = (LengthValidator) v; tmp.put( "min", lengthVal.getMin() ); tmp.put( "max", lengthVal.getMax() ); tmp.put( "translationKey", lengthVal.getTranslationKey() ); } else { // TODO error, double dec } return lengthVal; }
{ "domain": "codereview.stackexchange", "id": 23918, "lm_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, validation, generics", "url": null }
ros2 def main(args=None): rclpy.init(args=args) intersection_manager = IntersectionActionServer() rclpy.spin(intersection_manager) rclpy.shutdown() if __name__ == '__main__': main() And then finally the tester node: import rclpy from rclpy.node import Node from agc_interfaces.srv import IntersectionManager import time class IntersectionTester(Node): def __init__(self): super().__init__('intersection_tester') self.cli = self.create_client(IntersectionManager, 'intersection_manage') while not self.cli.wait_for_service(timeout_sec=1.0): self.get_logger().info('Intersection Manager not available, waiting again...') self.req = IntersectionManager.Request() def send_request(self): self.req.ask = input("Enter the test string: ") self.future = self.cli.call_async(self.req)
{ "domain": "robotics.stackexchange", "id": 36744, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
mechanical-engineering, gears, torque This, of course, is in an ideal situation, without considering losses. (how can I add an estimation of electric motor losses?) The worm/spur system has a gear ratio of 23:1. Considering the efficiency of the system of 80%, we have: Tout = 23 * (0.8 * Pin) / win = 45.2 N*m Now, Tout also can be calculated by Tout = 0.8 * Pin / wout angular velocity applied on the spur is: wout = (0.8 * Pin) / Tout wout = 0.8 * 373 (kg * m2 /s3) / 45.2 N*m = 6.6 rad/sec --> 63 rpm To consider real circumstances, its the moment of inertia has something to do within this case? I mean, is this Tout enough to accelerate the spur to 63 rpm?? SECTION T: In this section, I'm wondering what happens with force transmitted in the distance "d" to the pinion. I'm not sure if I need to consider losses in this section. SECTION B: Here I have a lot of question about what's happening. The Pinion has 17 teeth and is module 4.
{ "domain": "engineering.stackexchange", "id": 2838, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, gears, torque", "url": null }
java, optimization, iteration Map<Long, String> docInfo; // Document is a Map Document<String> doc1 = new Document<String>(); Document<Integer> doc2; Map<Integer, Long> sorted; ArrayList<String> intersectionWords; HashSet<String> different; try { docInfo = dbDocMeta.getDocInfo(); String family; int index = 0; for (Long id : docInfo.keySet()) { family = docInfo.get(id).contains("sky") ? "sky" : "earth"; for (Neighbor<Integer> neighbor : neighbors) { // check if the document in the Neighbour family if (neighbor.getFamily().equalsIgnoreCase(family)) { different = new HashSet<String>(); different.addAll(someWord); doc1 = dbWords.getNeighbors(id); doc2 = new Document<Integer>(); intersectionWords = new ArrayList<String>(); for (String word : doc1.getMap().keySet()) {
{ "domain": "codereview.stackexchange", "id": 6532, "lm_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, optimization, iteration", "url": null }
It does not say, "Find the probability that an employee both travels to work by car AND lives more than 2 miles from work." If the problem was stated with the word "and", then your answer would make sense. But, it asks about employees "who" travel to work by car, so every employee being considered is already known to travel to work by car. Now, given that they travel to work by car, what is the probability that they also live more than 2 miles from work? That is known as a conditional probability. You can read more about it here: https://en.wikipedia.org/wiki/Conditional_probability
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429634078179, "lm_q1q2_score": 0.8471875307071224, "lm_q2_score": 0.8615382040983515, "openwebmath_perplexity": 771.0324243939665, "openwebmath_score": 0.6243986487388611, "tags": null, "url": "http://mathhelpforum.com/statistics/277210-probability.html" }
c, linux, socket void UploadFile(int clntSock, char *buffer) { char *file_name, *header[BUFFSIZE]; long bytes_recvd, bytes_written, file_size, all_bytes_recvd; FILE *aFile; // Parse received buffer for file name and file size parseARGS(header, buffer); file_name = header[1]; file_size = atoi(header[2]); // Open a file stream in wite bin mode aFile = fopen(file_name, "wb"); if(aFile == NULL) DieWithError("failed to open the file!\n"); // Receive file via socket, place it in 4096 Byte array // than write buffer content into file. // Repeat until amount of all received Bytes equals file size. memset(buffer, 0, BUFFSIZE); all_bytes_recvd = 0; while((bytes_recvd = recv(clntSock, buffer, BUFFSIZE, 0)) > 0){ all_bytes_recvd += bytes_recvd; printf("Received %ld B, remaining data = %ld B\n", bytes_recvd, (file_size - all_bytes_recvd));
{ "domain": "codereview.stackexchange", "id": 14835, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, linux, socket", "url": null }
quantum-field-theory, commutator, dirac-equation, anticommutator $$ H = \left(\delta \psi\right) \pi $$ with $$\{\psi, \pi \} = i $$ $\psi$ and $\pi$ satisfy the usual anticommutation relations! Then we can compute: $$ -i[\psi, H] = -i[\psi, \left(\delta \psi\right) \pi] = -i \{\psi, \delta \psi \} \pi - -i\delta \psi \{\psi, \pi \} = \delta \psi $$ Here we use the properties of commutators and anticommutators (which hold in general). Your Hamiltonian (or any other observable that you will use to generate transformations) will in general look different (or involve sums or integrals over more degrees of freedom), but this calculation should illustrate that one can generate anticommuting operators, using the usual commutator from the Heisenberg equation.
{ "domain": "physics.stackexchange", "id": 89372, "lm_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, commutator, dirac-equation, anticommutator", "url": null }
genetics, homework, human-genetics, gender *For example: Angelman and Prader-Willi syndromes are both results of errors on the same region of chromosome 15, however, the important how that explains who gets PW and who gets A is, the phenotype depends on whether it was maternal or paternally inherited due to imprinting. By telling you this, if the question told you that males tend to get PWS and females tend to get Angelmann, told you some characteristics of either syndrome, then told you "given that a specific gender is more likely to get a specific symptom", you can determine whether males or females are more likely to have which disorder (PWS or A) based on the symptoms. The question doesn't have this sort of information. It doesn't tell you how a person tend to get patchy or missing sweat glands and it doesn't tell you anything about incomplete dominance, co dominance, mosaicism etc.
{ "domain": "biology.stackexchange", "id": 11814, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, homework, human-genetics, gender", "url": null }
linear-regression, correlation Title: Is it necessary to have a perfect correlation when using linear regression? I am working on predicting BMI against weight, using linear regression. The scatter plot of the data can be found below. As you can see in the plot, there seems to be low (or no) correlation between the two variables and thus I have doubts whether I'm using the right method. Is it necessary to have correlated data in order to use linear regression? Would you advice me to try other methods or adding features? If there is no correlation between variables you cannot run regression analysis as one variable cannot predict the other. Hence, it is necessary to have correlated data in order to run linear regression.
{ "domain": "datascience.stackexchange", "id": 11190, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "linear-regression, correlation", "url": null }
php, security for ($i=0; $i<$maxlength; $i++) $key .= $charset[(crypto_rand(0,(strlen($charset)-1)))]; return $key; } // Check that members group are allowed to vote if (($this->EE->session->userdata('group_id') == 1) || ($this->EE->session->userdata('group_id') == 5) || ($this->EE->session->userdata('group_id') == 6) || ($this->EE->session->userdata('group_id') == 7) || ($this->EE->session->userdata('group_id') == 8) || ($this->EE->session->userdata('group_id') == 9) || ($this->EE->session->userdata('group_id') == 10) || ($this->EE->session->userdata('group_id') == 11)) { // Function for logging function logvote ($text) { $handle = fopen("/dana/data/www.parlamentet.dk/votelog/logtest.txt", "a+"); fwrite($handle, $text); fwrite($handle, "\r\n"); fclose($handle); } // Get password_compat for bcrypt. require('/dana/data/www.parlamentet.dk/scripts/password.php'); // Get DB connection
{ "domain": "codereview.stackexchange", "id": 4607, "lm_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, security", "url": null }
distribution also provides the basis for an initial estimate for the 3-D velocity field. We assume the system of the conservation of momentum and the continuity equation after thin boundary layer simplifications and boundary conditions. to the nabla for another coordinate system, say… cylindrical coordinates. with and related to the coordinates and using the polar coordinate system relationships. So what we've done is shifted from polar to vectorial system with the vector components of the velocity at the position of the particle at any time, adding to give the speed and direction. We assume the system of the conservation of momentum and the continuity equation after thin boundary layer simplifications and boundary conditions. Derivation #rvy‑ew‑d. continuty equation in cylindrical coordinates Posted Jul 8, 2011, 7:52 AM EDT Fluid, Geometry Version 4. The circulation is then so that. Can you advise me please how to solve analytically the linear Navier-Stokes equations in a cylindrical
{ "domain": "daisytale.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9891815519849906, "lm_q1q2_score": 0.8177680555031247, "lm_q2_score": 0.8267117940706734, "openwebmath_perplexity": 603.2376859278611, "openwebmath_score": 0.8972199559211731, "tags": null, "url": "http://daisytale.it/qiyn/velocity-in-cylindrical-coordinates.html" }
Question What is the probability of getting the sum as a prime number if two dice are thrown? $\dfrac5{24}$ $\dfrac5{12}$ $\dfrac5{30}$ $\dfrac14$ Solution Correct option is $\dfrac5{12}$ As per the question: $n (S) = 6\times6 = 36$ And, the event that the sum is a prime number: $E = {(1, 1), (1, 2), (1, 4), (1, 6), (2, 1), (2, 3), (2, 5), (3, 2), (3, 4), (4, 1), (4, 3), (5, 2), (5, 6), (6, 1), (6, 5)}$ So, $n (E) = 15$ $\dfrac{n(E)}{n(S)} = 15/36 = 5/12$ Question The probability of getting two tails when two coins are tossed is - $\dfrac16$ $\dfrac12$ $\dfrac13$ $\dfrac14$ Solution Correct option is $\dfrac14$ The sample space when two coins are tossed = (H, H), (H, T), (T, H), (T, T) So, n(S) = 4 The event "E" of getting two tails (T, T) = 1 So, n(E) = 1 So, the probability of getting two tails, P (E) = $\dfrac{n(E)}{n(S)}=\dfrac14$ # Prepare for National and State govt. exams in your local language from anytime anywhere!
{ "domain": "pariksha.co", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969684454967, "lm_q1q2_score": 0.823880454650548, "lm_q2_score": 0.837619961306541, "openwebmath_perplexity": 777.8033669622704, "openwebmath_score": 0.42619237303733826, "tags": null, "url": "https://www.pariksha.co/practice-problems/probability" }
parity, classical-field-theory Title: Parity Transformation on Classical Fields I've been confused by this parity transformation in classical field theory for a long time. Let $\phi(t,\vec{x})$ be a scalar field. Then, up to some constant phase factor, it transforms to $\phi^{\mathrm{P}}(t,\vec{x})=\phi(t,-\vec{x})$. Now, consider the current $$j^{\mu}(t,\vec{x})=i\left\{\phi^{\dagger}(t,\vec{x})\partial^{\mu}\phi(t,\vec{x})-(\partial^{\mu}\phi^{\dagger}(t,\vec{x}))\phi(t,\vec{x})\right\}. \quad\quad\quad\quad\quad\quad(\ast)$$ Under a parity transformation $\mathrm{P}:(t,\vec{x})\rightarrow(t,-\vec{x})$, I expect to have $$(j^{\mathrm{P}})^{0}(t,\vec{x})=j^{0}(t,-\vec{x}),\quad\vec{j^{\mathrm{P}}}(t,\vec{x})=-\vec{j}(t,-\vec{x})$$
{ "domain": "physics.stackexchange", "id": 53300, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "parity, classical-field-theory", "url": null }
algorithms, graphs, optimization As an example: Suppose that the A.I. walks into $v_i$, $m_i$ corresponding to $v_i$ has a TN flag, and $v_j\in N_i$. Then $m_j$ corresponding to $v_j$ will have a PT flag. Now suppose the A.I. arrives at $v_k$, there is no TN flag in $m_k$, and $v_j\in N_k$. This means that the PT flag in $m_j$ is not true, and therefore $v_j$ is a safe room. A more detailed example Step 1: The A.I. starts the game at $v_i$. It stores information in $m_0$, the $i$ index of $v_i$, the flags from this room (either safe or non safe). Then it moves randomly as it cannot backtrack. Step 2: The A.I. walks into $u\in N_i$, once again storing the information in $m_1$. Suppose $u$ has a TN flag, then all of $v\in N(u)$ has a PT flag except for $v_i$. The A.I. decides to backtrack to the previous cave (if it wasn't dangerous). Else, the A.I. has to choose to move randomly between $N(u)$.
{ "domain": "cs.stackexchange", "id": 9311, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, optimization", "url": null }
particle-physics, charge, standard-model, higgs It is a charge +1 goldston eaten by $(W_1-iW_2)/\sqrt{2}\equiv W^+$, with similar charge properties, perhaps counterintuitively: $W_1-iW_2$ ate $\partial (\phi_1+i\phi_2)$! I don't have a glib maxim for it, but it follows direct calculation from the covariantly completed Higgs kinetic terms: Remind yourself of how the resulting mass term emerges proportional to $W^+ W^-$, skipping Lorentz indices, so it conserves charge, likewise. A good SM text should help. As always, check the electron-neutrino-Higgs Yukawa on the last line of (6) in the WP article to ensure you understand how it conserves charge, weak hypercharge, and weak isospin.
{ "domain": "physics.stackexchange", "id": 56074, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, charge, standard-model, higgs", "url": null }
c#, rational-numbers var positiveNumber2 = number2 < 0 ? BigInteger.Abs(number2) : number2; var positiveNumber1 = number1 < 0 ? BigInteger.Abs(number1) : number1; return positiveNumber1 / GreatestCommonDivisor(positiveNumber1, positiveNumber2) * positiveNumber2; } public static BigInteger GreatestCommonDivisor(BigInteger number1, BigInteger number2) { var positiveNumber2 = number2 < 0 ? BigInteger.Abs(number2) : number2; var positiveNumber1 = number1 < 0 ? BigInteger.Abs(number1) : number1; if (positiveNumber1 == positiveNumber2) return positiveNumber1; if (positiveNumber1 == 0) return positiveNumber2; if (positiveNumber2 == 0) return positiveNumber1;
{ "domain": "codereview.stackexchange", "id": 14521, "lm_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#, rational-numbers", "url": null }
c#, regex, csv, stream, sqlite using (StreamReader sr = new StreamReader(@"c:\Temp\test.csv")) { string line = null; int ln = 0; while ((line = sr.ReadLine()) != null) { string[] fields = splitRx.Split(line); if (fields.Length != 2) { Console.WriteLine("Invalid Input on line:" + ln); continue; } ln++; al.Add(fields); } } using (var conn = new SQLiteConnection(@"Data Source=C:\Temp\test.sqlite")) { conn.Open(); using (var cmd = new SQLiteCommand(conn)) { using (var transaction = conn.BeginTransaction()) { foreach (string[] sa in al) { cmd.CommandText = "INSERT INTO Person (FirstName, LastName) VALUES ('" + sa[0] + "', '" + sa[1] + "');"; cmd.ExecuteNonQuery(); } transaction.Commit(); } }
{ "domain": "codereview.stackexchange", "id": 11683, "lm_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#, regex, csv, stream, sqlite", "url": null }
Now, let X be the number of eggs supplied by B. A will supply 3X eggs. The total is 4X. So the probability to take an egg from A is $\displaystyle \frac{3X}{4X}=\frac{3}{4}$ With the formula of conditional probability, we have $\displaystyle {\color{red} P(A/R)=\frac{P(A \cap R)}{P(A)}}$ Hence $\displaystyle P(A/R)=\frac{.04}{\frac{3}{4}}=\dots$ 3. Hmm, the formula of conditional probability that I learnt was $\displaystyle P(A/R)=\frac{P(A \cap R)}{P\color{red}(R)}$ And if so, to get $\displaystyle P(R)$ - would it be: $\displaystyle \frac{3}{4} \times 0.04 = 0.03$ 4. Outch ! Sorry, I'll think again about it ! 5. Ok, so $\displaystyle P(A/R)=\frac{P(A \cap R)}{P\color{red}(R)}$ Plus $\displaystyle P(R/A)=\frac{P(A \cap R)}{P(A)} \Longleftrightarrow P(A \cap R)=P(R/A)P(A)$ Hence : $\displaystyle {\color{blue} P(A/R)=\frac{P(R/A)P(A)}{P(R)}}$ I misread and $\displaystyle {\color{blue} P(R/A)=.04}$, not $\displaystyle P(R \cap A)$ Let's calculate P(R).
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9621075755433746, "lm_q1q2_score": 0.8288924310728526, "lm_q2_score": 0.86153820232079, "openwebmath_perplexity": 1522.000654156938, "openwebmath_score": 0.859788715839386, "tags": null, "url": "http://mathhelpforum.com/advanced-statistics/35186-need-help-tough-conditional-probability-problem.html" }
vba, excel Variables with numeric suffixes like CustName1 is as code smell. Use an array instead. Dim CustName1 As String, CustName2 As String, CustName3 As String, custName4 As String Dim CustName5 As String, CustName6 As String, CustName7 As String, custName8 As String CustName1 = loanData.Range("CustLNSuff1") & ", " & loanData.Range("CustFMI1") CustName2 = loanData.Range("CustLNSuff2") & ", " & loanData.Range("CustFMI2") CustName3 = loanData.Range("CustLNSuff3") & ", " & loanData.Range("CustFMI3") custName4 = loanData.Range("CustLNSuff4") & ", " & loanData.Range("CustFMI4") CustName5 = loanData.Range("CustLNSuff5") & ", " & loanData.Range("CustFMI5") CustName6 = loanData.Range("CustLNSuff6") & ", " & loanData.Range("CustFMI6") CustName7 = loanData.Range("CustLNSuff7") & ", " & loanData.Range("CustFMI7") custName8 = loanData.Range("CustLNSuff8") & ", " & loanData.Range("CustFMI8")
{ "domain": "codereview.stackexchange", "id": 37212, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
are girls that both are! A number of coins, one card is drawn and it is seen from the problem P! 25,000 or more is six times more likely if the defendent is guilty is... Is an equally likely basis, and a unit is defective and \ ( P ( E_3 ) = ). 1 ] [ 7 ] so the probability that he or she will make$ or... Tree corresponds to a sample space and then learn that an event occurring given that has. Us now concentrate on the more complex conditional probability '' of B given a,.... C '' be the event that I arrived late at work, what is the the... Problems involve conditional probability P ( S|F ) = 0.85\ ), \ ( P ( G ) (! A woman is seventy years old, what is the probability of three heads, more. Extra days on this problem set since I may not get to know what Monty... 90 percent of the defective units corresponds to a single outcome in the sample space you observe one. 1 ] [ 7 ] say a Professor is interested in the lot conditional probability – &... And it is given that I win and which
{ "domain": "pfsrm.pl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363512883316, "lm_q1q2_score": 0.8480433828159828, "lm_q2_score": 0.8615382147637196, "openwebmath_perplexity": 672.5178864302072, "openwebmath_score": 0.8050689697265625, "tags": null, "url": "http://konferencja.pfsrm.pl/7hu3cg/conditional-probability-problems-02b1e4" }
with pdf $f(x)$: f = Exp[-6 (x^2/n)] / Sqrt[n Pi /6]; domain[f] = {x, -Infinity, Infinity} && {n > 0}; Here is a plot of pdf $f(x)$ when $n = 1000$: BB = Plot[f /. n -> 1000, {x, -50, 50}, PlotRange -> All, PlotStyle -> Red] This is, of course, instantaneous and works for arbitrarily large $n$. The following plot compares the exact solution AA to the asymptotic solution BB when $n = 1000$: Show[BB, AA] There is no discernible visual difference between the two plots here. Whereas the exact AA solution fails to evaluate for very large $n$, the asymptotic BB solution will always evaluate immediately, and with ever improving accuracy as $n$ increases. The built-in function UniformSumDistribution may be useful:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692311915196, "lm_q1q2_score": 0.878144192866316, "lm_q2_score": 0.8991213860551286, "openwebmath_perplexity": 1805.8553106697436, "openwebmath_score": 0.3286290168762207, "tags": null, "url": "https://mathematica.stackexchange.com/questions/80278/iterating-distributions" }
c++, c, algorithm, strings, recursion Title: To check if a string C is an interleaving of A and B Code This is my code to check if a string C is an interleaving of Strings A and B. Please suggests optimizations, and where I can improve. #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include<string.h> using namespace std; int isInterleaved(char a[100],char b[100],char c[200],int i, int j, int k) { if(i==0&&j==0) return true; if(i>=0&&j>=0) {
{ "domain": "codereview.stackexchange", "id": 6020, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c, algorithm, strings, recursion", "url": null }
c, unit-testing, reinventing-the-wheel, error-handling, quick-sort if (N > MAXARRAY) { fprintf(stderr, "run_tests(%lu) exceeds max array size.\n", N); exit(EXIT_FAILURE); } for (i = 0; i < (int) N; ++i) distinct[i] = i; for (i = 2; i < (int) N; ++i) if (repeats[i] == 0) repeats[i] = 5; dataset[0] = distinct; dataset[1] = repeats; for (test = 0; test < 2; ++test) { while ((retval = next_perm((int) N, perm)) == 1) { for (i = 0; i < (int) N; ++i) to_sort[i] = dataset[test][perm[i]]; #if VERBOSE print_array(N, to_sort); putchar('\n'); #endif sorted[0] = SENTINEL_LEFT; memcpy(sorted + 1, to_sort, N * sizeof(int)); sorted[N + 1] = SENTINEL_RIGHT; quicksort(sorted + 1, (size_t) N, sizeof(int), cmp_int); if (error_check(N, sorted)) print_error(N, to_sort, sorted); } if (retval == -1) memquit(); }
{ "domain": "codereview.stackexchange", "id": 33031, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, unit-testing, reinventing-the-wheel, error-handling, quick-sort", "url": null }
quantum-field-theory, grand-unification, proton-decay First thing to note is, leptoquarks are the particles that carry lepton (L) and baryon (B) numbers and the second thing to note is, for proton decay processes, $B$ and $L$ numbers have to be violated. Now let me answer them separately. ========================================================================= 01=> The gauge bosons corresponding to the $SU(4)$ group is 15-plet. Under the sub-group $SU_{c}(3)\times U_{B-L}(1)$, the decomposition is $15=1+3+\overline{3}+8$. Of these four, two of them has non-zero $B-L$ charge, $3$ and $\overline{3}$ which are $4/3$ and $-4/3$ respectively. So $3$ and $\overline{3}$ are leptoquarks.
{ "domain": "physics.stackexchange", "id": 30288, "lm_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, grand-unification, proton-decay", "url": null }
special-relativity, reference-frames, coordinate-systems, inertial-frames Title: Doubt about Lorentz transformations derivation: $y$ and $z$ axis Reading "Introduction to special relativity" by Resnick, I'm a bit confused about a detail in deriving Lorentz transformations. Of course we consider the reference frames S and S' coinciding at $t=t'=0$, and we consider S' moving at speed $v$ relative to S. He starts by saying that the most general formula is: $$x'=a_{11}x+a_{12}y +a_{13}z +a_{14}t $$ And same for y', z' and t'. He explains why the trasformations have to be linear, then he proceeds considering that the x axis and the x' axis always coincide, and this is true also for the xy plane and the x'y' plane, and for the xz plane and the x'z' plane. From this considerations he concludes that the formulas for y' and z' have to be the following: $$y'=a_{22}y$$ $$z'=a_{33}z$$ Up to this point everything seems clear to me.
{ "domain": "physics.stackexchange", "id": 96337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, reference-frames, coordinate-systems, inertial-frames", "url": null }
soft-question, mathematics, education Theoreticians, in my opinion, should study mathematics like math majors, almost forgetting about physics for a time; this is the point I feel so strongly about. The thing is that math is such a big subject, and once you have the road map of what is important for theoretical physics; then it really takes years of study to learn all the mathematics. I think it's so bad how many physics proffessors, who are themselves experimentalists, teach math improperly to young theoretician's. I personally had to unlearn many of the things I thought I knew about math, once I took a course based on Rudin's "Principle's of Analysis".
{ "domain": "physics.stackexchange", "id": 2202, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "soft-question, mathematics, education", "url": null }
electromagnetism, visible-light In fact, the "colors" surrounding each other can modify our interpretation of what color we see. (Search for "color optical illusions". There are fascinating examples.) Regarding absorb and reflect: they mean exactly what you think. The energy of an EM wave is taken into a molecular structure and not released as the same wavelength (absorption) or it is released as the same wavelength (reflection or transmission).
{ "domain": "physics.stackexchange", "id": 24273, "lm_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, visible-light", "url": null }
quadcopter, ardupilot Title: sending and receiving parameters to ardupilot I am interested in getting an arducopter with an ardupilot(APM). I read through the documentation and from what I understand, ardupilot is the low level hardware and firmware that directly controls the motors of the arducoptor. I would like to know if there is a higher level programmatic interface to the ardupilot? The mission planner provides a user interface to control the ardupilot. But is there a programmatic interface to control it?
{ "domain": "robotics.stackexchange", "id": 267, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quadcopter, ardupilot", "url": null }
ros, turtlebot, teleop, keyboard-teleop * /mobile_base/commands/reset_odometry * /mobile_base/commands/sound * /cmd_vel_mux/input/safety_controller * /cmd_vel_mux/input/navi * /mobile_base/commands/digital_output * /mobile_base/commands/led1 * /mobile_base/commands/led2 * /mobile_base/commands/motor_power
{ "domain": "robotics.stackexchange", "id": 18612, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, turtlebot, teleop, keyboard-teleop", "url": null }
special-relativity, momentum, velocity, units $$ However, $mc$ has dimension $\text{mass}\frac{\text{length}}{\text{time}}$, whereas energy (the 4-momentum's time component) has dimension $\text{mass}\frac{\text{length}^2}{\text{time}^2}$ What's the exact problem here? Does one multiply the time component of the 4-momentum by $c$ again, so $s^\mu(t)=(c^2t,\vec{x}(t))$? Or is there something else I'm missing? The time component of the four-momentum should not have energy units. We can probably agree that four-momentum should transform as a Lorentz vector under Lorentz transformations - thus the "first"/"zeroth"/"timelike" component and the "spacelike" components can get mixed. This is only possible if all the components have the same units (because the Lorentz transformation is free of units). Thus there is no problem here at all - the components of the four-momentum vector in any system do all have units of momentum.
{ "domain": "physics.stackexchange", "id": 32730, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, momentum, velocity, units", "url": null }
Now take the squares $\frac 12$ and $\frac 13$: these go onto the top shelf. On the second shelf go $\frac 14$ to $\frac 17$. These fractions are all less than $\frac 14$, so fit onto the second shelf. Likewise, squares from $8$ to $15$ go onto the third shelf, each $\frac 1n$ is smaller than $\frac 18$, and so forth. Therefore $\sum_{n=2}^{\infty}\frac 1n < 1$, and therefore the whole lot is less than two squares. by the integral test : $\int^\infty_1 \frac{1}{n^2} dn \le \sum_{i=1}^\infty \frac{1}{n^2}\le 1+\int^\infty_1 \frac{1}{n^2}dn$ . you can compute the integral so the answer is : $1 \le \sum_{i=1}^\infty \frac{1}{n^2}\le 2$ . because : $\int^\infty_1 \frac{1}{n^2} dn =1$ Hint: Prove the the following holds for all $n$ by induction. $$\sum_1^n \frac{1}{k^2} \le 2 – \frac{1}{n}.$$ Is it not uncommon that when proving some inequality by induction, you will first need to strengthen the hypothesis to get the induction to work.
{ "domain": "bootmath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419703960399, "lm_q1q2_score": 0.8660149440859115, "lm_q2_score": 0.8757870013740061, "openwebmath_perplexity": 209.7219452408486, "openwebmath_score": 0.9254652857780457, "tags": null, "url": "http://bootmath.com/need-to-prove-the-sequence-a_n1frac122frac132cdotsfrac1n2-converges.html" }
Z x2 0 e−t2 dt = E(x2) So by the chain rule d dx Z x2 0 e −t2 dt = d dx E(x2) = 2xE′(x2) = 2xe x4 Example 3 Example 4 (d dx R x2 x e−t2 dt) Find d … The Second Fundamental Theorem of Calculus. Suppose that f(x) is continuous on an interval [a, b]. Viewed 71 times 1$\begingroup$I came across a problem of fundamental theorem of calculus while studying Integral calculus. You may assume the fundamental theorem of calculus. The Fundamental Theorem of Calculus, Part 1 shows the relationship between the derivative and the integral. ���y�\�%ak��AkZ�q��F� �z���[>v��-��$��k��STH�|A The Fundamental Theorem of Calculus, Part 2, is perhaps the most important theorem in calculus. The Fundamental Theorem of Calculus, Part 2 is a formula for evaluating a definite integral in terms of an antiderivative of its integrand. Set F(u) = The FTC and the Chain Rule Three Different Concepts As the name implies, the Fundamental Theorem of Calculus (FTC) is among the biggest ideas of Calculus, tying together
{ "domain": "com.ua", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138105645059, "lm_q1q2_score": 0.8147529614725092, "lm_q2_score": 0.8333245911726382, "openwebmath_perplexity": 486.0355546145191, "openwebmath_score": 0.8772138953208923, "tags": null, "url": "http://vzta.com.ua/winnipeg-radio-pqs/f9ed30-2nd-fundamental-theorem-of-calculus-chain-rule" }
I can derive $(2)$ using well-known formulas for arithmetic series and square pyramidal number, but how do the other formulas, $(3),\,(4),\,(5)$, derive? Does it use Faulhaber's formula? • – Lucian Nov 14 '14 at 18:16 The derivation is by straightforward induction on $n$. Suppose $\sum_{k=1}^n k(k+1)...(k+r)=\frac{n(n+1)(n+2)...(n+r+1)}{r+2}$ Then \begin{align} \sum_{k=1}^{n+1} k(k+1)...(k+r) & =\frac{n(n+1)(n+2)...(n+r+1)}{r+2} + (n+1)(n+2)...(n+r+1) \\ & = (n+1)(n+2)...(n+r+1)\left(\frac{n}{r+2} + 1\right) \\ & = (n+1)(n+2)...(n+r+1)\left(\frac{n + r + 2}{r+2}\right) \\ & =\frac{(n+1)(n+2)...(n+r+1)(n+r+2)}{r+2} \end{align} Now you just have to check the base case $n=1$ to establish the formula for all $n$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846621952494, "lm_q1q2_score": 0.8044172432518225, "lm_q2_score": 0.8221891392358015, "openwebmath_perplexity": 811.4462920236148, "openwebmath_score": 0.9986788034439087, "tags": null, "url": "https://math.stackexchange.com/questions/1021942/intuition-behind-sum-of-multiplication-arithmetic-sequence" }
machine-learning, classification, bigdata, scikit-learn, random-forest Title: How to deal with a skewed data-set having all the samples almost similar? I have a very large skewed training set where every feature's data-points are very similar ? For example, following is some part of the training data : 93.65034,94.50283,94.6677,94.20174,94.93986,95.21071,1 94.13783,94.61797,94.50526,95.66091,95.99478,95.12608,1 94.0238,93.95445,94.77115,94.65469,95.08566,94.97906,1 94.36343,94.32839,95.33167,95.24738,94.57213,95.05634,1 94.65813,94.65246,94.64984,95.29596,95.14167,95.39941,1 95.50876,94.45346,95.23837,95.26877,94.84924,94.8021,0 94.5774,93.92291,94.96261,95.40926,95.97659,95.17691,0 93.76617,94.27253,94.38002,94.28448,94.19957,94.98924,0
{ "domain": "datascience.stackexchange", "id": 1435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, classification, bigdata, scikit-learn, random-forest", "url": null }
ros, catkin-make, gradle, message-generation, rosjava Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. make[2]: *** [nao_writing/nao_writing_android_nodes/CMakeFiles/gradle-nao_writing_android_nodes] Error 1 make[1]: *** [nao_writing/nao_writing_android_nodes/CMakeFiles/gradle-nao_writing_android_nodes.dir/all] Error 2 make: *** [all] Error 2 Invoking "make -j1" failed What can i do to fix them?? Thank you Originally posted by chri_io on ROS Answers with karma: 1 on 2017-04-07 Post score: 0 Hi there, did you try to resolve your dependencies? The command rosdep install --from-paths ~/your-workspace/src --ignore-src will try to resolve the dependencies of your packages. Then try again with catkin_make I hope that it will work for you. Originally posted by FLYINGKNIGHT with karma: 36 on 2017-04-07 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 27554, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, catkin-make, gradle, message-generation, rosjava", "url": null }
(a) 4 (b) 5 (c) 6 (d) 7 The diagonal distance of this square is $\sqrt{{17^2} + {17^2}} = 17\sqrt 2$. This means that even with $2$ points, this rule would still hold because even if the two points were in either corner of the square, and since the longest distance is the diagonal distance, they would always be within a distance of $17\sqrt 2$. In this case, the lowest number to choose from is $4$, so that is the minimum -- however the answer is $5$. Where am I going wrong? • I think @Robert Z has a point below, can you recheck the Question 3 because if distance is at most $17\sqrt{2}$ then $2$ points are enough. So it should be something else. And if the answer is $5$, it is probably $\frac{17}{\sqrt{2}}$. – ArsenBerk Feb 25 '18 at 8:28 • Indeed I have made a typo. It is the latter! – udpcon Feb 25 '18 at 16:49
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109099773435, "lm_q1q2_score": 0.873171995005695, "lm_q2_score": 0.8824278602705732, "openwebmath_perplexity": 113.64390907394264, "openwebmath_score": 0.894754946231842, "tags": null, "url": "https://math.stackexchange.com/questions/2665717/k-subsets-counting-and-the-pigeon-hole-principle" }
fl.formal-languages, counter-automata Title: Can a two counters machine decide $n^2$? Can a standard two counters ($c_1,c_2$) machine with the following instructions: 1) ADD 1 to c_i, GOTO label_j 2) IF c_i = 0 GOTO label_j, OTHERWISE SUB 1 to c_i and GOTO label_k 3) GOTO label_j 4) HALT and ACCEPT|REJECT decide the following language: $$L = \{ n^2 \mid n \geq 1 \}$$ (the input is initially loaded in the counter $c_1$)?. Is it still an open problem? (cf. Rich Schroeppel, "A Two counter Machine Cannot Calculate $2^N$" [1972]) The problem has been solved in: Oscar H. Ibarra, Nicholas Q. Trân, A note on simple programs with two variables, Theoretical Computer Science, Volume 112, Issue 2, 10 May 1993, Pages 391-397, ISSN 0304-3975, http://dx.doi.org/10.1016/0304-3975(93)90028-R. Let $TV$ be the class of languages recognized by two-counter machines. Theorem 3.3: For any fixed integer $k \geq 2$, $L_k = \{ n^k \mid n \geq 0 \} \notin TV$ Note: it's strange that in the Ibarra&Tran's paper
{ "domain": "cstheory.stackexchange", "id": 2509, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fl.formal-languages, counter-automata", "url": null }
physical-chemistry, thermodynamics, enthalpy, ideal-gas For example, if you have 1 mol of idealium on Earth's surface at 273 K, it has a volume of 22.4 L. Take that same 1 mol of gas to your exotic planet, where the temperature is still 273 K but the pressure is 10 atm, and the volume will now be just 2.24 L. Although P and V have both changed, PV is the same. The internal energy U is also unchanged because the temperature is unchanged. Therefore the enthalpy is unchanged. I think you are imagining a system that has a pressure of 10 atm but takes up the same 22.4 L on the exotic planet. But to achieve that, either the temperature would have to be higher, or you would have to have more moles of idealium, or some combination of those. Either way, one of the assumptions is violated.
{ "domain": "chemistry.stackexchange", "id": 17767, "lm_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, thermodynamics, enthalpy, ideal-gas", "url": null }
quantum-mechanics, quantum-field-theory, quantum-optics, open-quantum-systems, cavity-qed Title: Quantum input-output theory : Why do we multiply by density of mode to have a number of photon **per unit of time** In this paper, https://journals.aps.org/pra/abstract/10.1103/PhysRevA.31.3761, we work with input-output theory. I will first summarize the physics of it and then ask my question. In input-output theory we model everything by saying : I send an input field, it interacts with a quantum system, and after the interaction I have an output field. ==Input==> [Interaction of field with Q.Syst] ==Output==> The Hamiltonian is : $$ H = H_s + H_{field} + H_{int} $$ Where $H_{field}=\int d\omega ~ \hbar \omega b^{\dagger}(\omega) b(\omega) $. It is not necessary to explicit the other parts for my question In Heisenberg picture, if we didn't had any interaction, the field would freely evolve such that $$b(\omega,t)=e^{-i \omega t} b^0(\omega)$$
{ "domain": "physics.stackexchange", "id": 58968, "lm_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, quantum-optics, open-quantum-systems, cavity-qed", "url": null }
genetics, molecular-genetics, population-genetics, genetic-linkage So, assuming that they used default parameters, you can reconstruct their methodology from the default method documentation and their description: Take that default haplotype block output. Where that default output didn't describe a block, select a common SNP every ~5Kbp in the unblocked region. Answering your questions In figure 1, the SNPs displayed are all tag SNPs. They are not the only SNPs in the block, but rather the tag SNPs used to represent the block. I am not clear on why multiple SNPs are used in some cases and single SNPs in others, unless they just try to have 1 SNP every ~5Kbp in general. I don't think that's what they did, judging from the figures. In Figure 2, presumably the blocks are the output of the Gabriel et al. 2002 algorithm using D'. The single SNPs that are not part of any block are presumably derived from the "every 5Kbp" procedure for regions not labeled with haplotype blocks.
{ "domain": "biology.stackexchange", "id": 11955, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, molecular-genetics, population-genetics, genetic-linkage", "url": null }