text
stringlengths
1
1.11k
source
dict
beginner, c, strings, ascii-art See if you can write the printdigitrow routine to use the digits array defined above to print one row of one digit. Eliminate unused variables The variable s in your code is defined but never used. Since unused variables are a sign of poor code quality, you should seek to eliminate them. Your compiler is probably smart enough to warn you about such things if you know how to ask it to do so. Avoid buffer overrun vulnerabilities The code currently includes these two statements: char str[6]; scanf("%s",str); This is a potential problem because the scanf will read any size of string, but we've only allocated 6 bytes. That's the recipe for a buffer overflow vulnerability and must be eliminated. Fortunately, it's simple to do so: scanf("%5s",str); Now the maximum width of the string is set to 5 characters (per comment by @CoolGuy -- we need to reserve room for the terminating '\0') and no buffer overflow will occur.
{ "domain": "codereview.stackexchange", "id": 27148, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, strings, ascii-art", "url": null }
beginner, unit-testing, elm Title: Introducing the basics of Elm using unit tests I am an elm beginner and I want to provide an elm practical course to my coworkers. I will do a short presentation of elm, then we will move to practical lessons. The first lesson is to read together the following file to discover elm basis and syntax: Basis.elm {- Here we will discover some elm basis and syntax. You can hack this file and run the tests by running in your terminal: elm reactor And go to http://localhost:8000/ Then select Basis.elm file ______________________________________________________________________ First of all, we are going to import some testing packages. We import the Expect package so we can use Expect package functions. For example we will be able to call Expect.equal to check equality. -} import Expect {- Then we import Test.Runner.Html and expose TestProgram to our program. Since we exposed TestProgram we can call this function without prefixing it with the package name. -}
{ "domain": "codereview.stackexchange", "id": 27351, "lm_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, unit-testing, elm", "url": null }
$$\lim_{x\rightarrow3}\frac{(x-3)(x+3)}{x-3} \color{red}{=\frac{0}{0}}$$ the problem is not that $\frac{0}{0}$ is undefined. The problem is that you broke the limit laws by applying it to a quotient where the denominator tends to zero. In this situation, I would avoid using the equals sign as well, because we're not asserting the limit is equal to anything, let alone an undefined thing. We're not making any “determination” about the limit at all. We try to work around the situation by writing the function in such a way that we can legally apply the limit laws. As you did. Since $\frac{(x-3)(x+3)}{x-3} = x+3$ when $x\neq 3$, we have $$\lim_{x\rightarrow3}\frac{(x-3)(x+3)}{x-3} = \lim_{x\rightarrow3}(x+3) = 6$$ The cancellation happens before the limit is found.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9441768604361741, "lm_q1q2_score": 0.8043941200276871, "lm_q2_score": 0.8519528000888386, "openwebmath_perplexity": 179.28067509903556, "openwebmath_score": 0.9482203125953674, "tags": null, "url": "https://math.stackexchange.com/questions/2671819/what-do-indeterminate-forms-mean" }
np-complete, reductions, approximation To establish hardness for $X$ with $k'$, should I be able to prove in (1) that $X$ has no solution with $k'$ as well? (Or is my current reduction pretty much useless as it is?) If I were able to do that, would my proof also tell me something about the hardness of approximating $X$? $X$ is a minimization problem. Yes. To show that decision problem Q is at least as hard as decision problem P (via a many-one reduction), you need to prove that a yes-instance for P maps to a yes-instance for Q, and a no-instance for P maps to a no-instance for Q. That's just what the definition of a (many-one) reduction is. In your case, P = "X has a solution with parameter $k'$" and Q = "H has a solution with parameter $k$". Therefore, the answer to your question is yes: in (1) you need to prove that $X$ has no solution with parameter $k'$. The definition of P needs to be consistent for both kinds of instances, so it has to use the same parameter in both cases.
{ "domain": "cs.stackexchange", "id": 3462, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "np-complete, reductions, approximation", "url": null }
symmetry, noethers-theorem, classical-field-theory $$\int_{-\infty}^\infty x^2 f(x) \, dx \neq \int_{-\infty}^\infty x^2 f(x+a) \, dx.$$ You can derive the expression for $\phi'$ by thinking "we map the point $x$ to $x'$" but you don't actually do that as well, because then you end up with a trivial transformation. Another way of saying this is that a symmetry means that a system stays the same if you change some things but not other things. In this case, we shifted the function $f$ relative to the fixed background $x^2$ in order to test translational symmetry, which didn’t hold. If you instead changed both, you wouldn't get any useful information.
{ "domain": "physics.stackexchange", "id": 57803, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "symmetry, noethers-theorem, classical-field-theory", "url": null }
noise, power-spectral-density \Rightarrow& c_1 \ddot x[k] &=& (c_1 + c_0 - 1) x[k] - (c_1 - 1) x[k-1] + F[k]\\ \Rightarrow& c_1 \ddot x[k] &=& (c_1 - 1) \dot x[k] + c_0 x[k] + F[k]\\ \Rightarrow& \ddot x[k] &=& \frac{c_1 - 1}{c_1} \dot x[k] + \frac{c_0}{c_1} x[k] + \frac{1}{c_1}F[k]\\ \end{array}$$ We have arrived at the discrete equivalent of Eq. 2. References Gröblacer, Simon (2012) "Quantum Opto-Mechanics with Micromirrors: Combining Nano-Mechanics with Quantum Optics" DOI: 10.1007/978-3-642-34955-3, chapter 2, page 7. Coffey, William T.; Kalmykov, Yuri P. (2012) "The Langevin Equation: With Applications to Stochastic Problems in Physics, Chemistry and Electrical Engineering" 3rd ed. ISBN: 978-981-4355-66-8, page 241.
{ "domain": "dsp.stackexchange", "id": 4343, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "noise, power-spectral-density", "url": null }
$$e^{-x} = 1 - x + \dfrac{x^2}{2!} - \dfrac{x^3}{3} + \ldots; \tag{15}$$ then $$x + e^{-x} = 1 + \dfrac{x^2}{2!} - \dfrac{x^3}{3!} + \ldots > 0, \tag{16}$$ since every term on the right is positive when $$x < 0$$. End of Note. Note that $$f''(x) = e^{-x} >0$$ so $$f$$ is strictly convex. Since $$f'(0) = 0$$, we see that $$f(x) \ge f(0) = 1$$ for all $$x$$. Note that • $$\forall x \in \mathbb{R} : x+e^{-x}>0 \Leftrightarrow \forall x \in \mathbb{R} :e^{-x}>-x \Leftrightarrow \forall x \in \mathbb{R} :\color{blue}{\boxed{e^{x}>x}}$$ The last inequality follows directly by Taylor: $$\color{blue}{e^x} = 1+x + \underbrace{\frac{e^{\xi}}{2}x^2}_{\geq 0} \color{blue}{> x}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795095031688, "lm_q1q2_score": 0.8643838202456569, "lm_q2_score": 0.8757869965109764, "openwebmath_perplexity": 318.7908080135041, "openwebmath_score": 0.9140320420265198, "tags": null, "url": "https://math.stackexchange.com/questions/3156341/why-is-xe-x0-for-all-x-in-mathbbr" }
climate-change, oceanography, foraminifera Title: What 18O indicators are there besides foraminifera? It is now standard practice to use foraminifera to represent paleo 18O signatures from a marine system. However, there are some problems if you want to show 18O variations in the last 100 years using foraminifera. One such problem is, for example, low sedimentation rate, growth in the stratification of a water column etc.
{ "domain": "earthscience.stackexchange", "id": 2740, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "climate-change, oceanography, foraminifera", "url": null }
quantum-mechanics, statistical-mechanics, wavefunction, chaos-theory, semiclassical $$\text{Limiting time average} = \text{Space average}$$ In the case of a quantum system, we lose knowledge of the exact position and momentum of our particle and have to infer information from the probability distribution given by the wave equation solving the Schrödinger evolution equation with e.g. Dirichlet boundary conditions. For sake of clarity, let us enumerate the solutions as $\psi_1,\psi_2,\dots$ as in Rudnick's talk and denote $\psi_j(z;t)$ the $j$th solution at time $t$. Since solutions to the Schrödinger equation are standing waves, $\psi_j(z;0)$ and $\psi_j(z;t)$ give the same probability distribution. So then when we talk about "uniform distribution" w.r.t. "something" that "something" doesn't seem to be the time but rather the index the standing wave or equivalently the level of energy since $E_{\psi_j}\to\infty$. As of writing I don't really know how to connect the high energy limit back to the classical analogue of
{ "domain": "physics.stackexchange", "id": 95996, "lm_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, statistical-mechanics, wavefunction, chaos-theory, semiclassical", "url": null }
For example if our universe is the natural numbers with the usual $\ge$ order, then $\forall x(x\ge 0)$ is true because there are no negative numbers. On the other hand, $\forall x(x\ge 0 \land x\neq 0)$ is false, simply because setting $x=0$ is a counterexample. More generally, a sentence "If $p$ then $q$" ($p\implies q$, or $p\rightarrow q$) is true whenever the assumption is false, i.e. $p$ never occurs. An example I often use is "If I am standing upside down from the ceiling right now, then you are all unicorns". It does not matter that I am talking to people, and not to unicorns, because I never stand upside down from the ceiling (it gives me a huge headache, you see).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226310935411, "lm_q1q2_score": 0.809891977586157, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 232.11429774287654, "openwebmath_score": 0.886125385761261, "tags": null, "url": "http://math.stackexchange.com/questions/45625/why-is-an-empty-function-considered-a-function/45878" }
c#, .net, asynchronous public AccumulationBuffer(RecordingStrategy strategy, TimeSpan inactivityTime, int maximumAccumulationCount, Action<IEnumerable<KeyValuePair<TKey, TValue>>> itemProcessor) { if (itemProcessor == null) throw new ArgumentNullException("itemProcessor"); _ItemProcessor = itemProcessor; _LastAddedTime = DateTime.MinValue; _InactivityTime = inactivityTime; _MaximumAccumulationCount = maximumAccumulationCount; _MonitorEvent = new AutoResetEvent(false); _Quit = false; _CurrentAccumulationCount = 0;
{ "domain": "codereview.stackexchange", "id": 10121, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, asynchronous", "url": null }
ros, gazebo, joint <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" args="-urdf -model syropod -param robot_description -x 0.0 -y 0.0 -z 0.2 -R 0.0 -P 0.0 -Y 0.0 -J AL_coxa_joint 0.0 -J AL_femur_joint 0.0 -J AL_tibia_joint 0.0 -J AL_psi_joint 0.0 -J AL_theta_joint 0.0 -J AL_phi_joint 0.0 -J AR_coxa_joint 0.0 -J AR_femur_joint 0.0 -J AR_tibia_joint 0.0 -J AR_psi_joint 0.0 -J AR_theta_joint 0.0 -J AR_phi_joint 0.0 -J BL_coxa_joint 0.0 -J BL_femur_joint 0.0 -J BL_tibia_joint 0.0 -J BL_psi_joint 0.0 -J BL_theta_joint 0.0 -J BL_phi_joint 0.0 -J BR_coxa_joint 0.0 -J BR_femur_joint 0.0 -J BR_tibia_joint 0.0 -J BR_psi_joint 0.0 -J BR_theta_joint 0.0 -J BR_phi_joint 0.0" respawn="false" output="screen"/>
{ "domain": "robotics.stackexchange", "id": 1791, "lm_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, gazebo, joint", "url": null }
find the roots of any polynomial with just one click. Square root: Perfect Square Numbers. square root and decimal, and exact pi and decimal. A cube root of a number x is a number a such that a 3 = x. In mathematics, a cube root of a number x is a number such that a3 = x. Eulerused ifor the square root of 1 in 1779. Manual Calculation Of Square Root Of Number The instruction manual for the Original Odhner 227 describes the procedure to extract the square The square root of a number can therefore be calculated by Squaring a number and finding the square root are opposites of each other. An Imaginary Number: To calculate the square root of an imaginary number, find the square root of the number as if it were a real number (without the i) and then multiply by the square root of i (where the square root of i = 0. The Doctor. You can input any number ranging from positive numbers, negative numbers or real numbers. Use square root and cube root symbols to represent solutions to equations of
{ "domain": "hausverwaltung-schinderling.de", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676490318649, "lm_q1q2_score": 0.8076986834677609, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 416.06560931087193, "openwebmath_score": 0.7332090139389038, "tags": null, "url": "http://cqjo.hausverwaltung-schinderling.de/cube-root-of-complex-number-calculator.html" }
number-guessing-game, rust Title: Rust cows and bulls I just wrote a cows and bulls implementation in Rust. It seems a little large. Are there any changes I could make while still keeping it easily readable? extern crate rand; use rand::Rng; use std::{io,process,str};
{ "domain": "codereview.stackexchange", "id": 20924, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "number-guessing-game, rust", "url": null }
quantum-mechanics, pauli-exclusion-principle Title: I don't understand the relationship between electron indistinguishability and the Pauli exclusion principle I know I'm wrong but this is my line of thought: If electrons are indistinguishable, then why do we have an exclusion principle? If we have two electrons in an s orbital, the Pauli exclusion principle says that they can't have the same set of quantum numbers, but then what does that say about electrons being indistinguishable?
{ "domain": "physics.stackexchange", "id": 6530, "lm_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, pauli-exclusion-principle", "url": null }
design, motors, machine-design that the surface area of an adult sitting on the swing is 1 m^2 Now we calculate how much force we need to keep the swing moving against the air friction. Drag force is $F=\frac{C_d*A*\rho*v^2}{2}$ Assume C_d =0.75 for a sitting person Air density 1.225kgm^3 $$F=\frac{0.75*1*1.225*4.48^2}{2}=9.2N\ per\ second$$ $F*1.5_{safety factor}= 13.8watt.$ Just a rough estimate.
{ "domain": "engineering.stackexchange", "id": 4356, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "design, motors, machine-design", "url": null }
object-oriented, unit-testing, excel, vb.net Now you can mock this interface and make the Open method return a stub ExcelPackage with a fake ExcelWorksheet object that you've setup for your tests, and as a side-effect of doing this, you've extracted a highly specialised and reusable component from your Import procedure, making the class more cohesive and a little less coupled. Private ReadOnly WorkbookProvider As IExcelPackageProvider Private ReadOnly HeaderValidator As IHeaderValidationLogic Public Sub New(provider As IExcelPackageProvider, validator As IHeaderValidationLogic) WorkbookProvider = provider HeaderValidator = validator End Sub It's now the job of WorkbookProvider to deal with file I/O and return a workbook object for the Import method to work with.
{ "domain": "codereview.stackexchange", "id": 20002, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "object-oriented, unit-testing, excel, vb.net", "url": null }
X^3/3 - 2*X + 5. On the negative side, it requires a formula for the derivative as well as the function, and it can easily fail. Toggle Main Navigation. The Algorithm The bisection method is an algorithm, and we will explain it in terms of its steps. Note that for a quadratic equation ax2+bx+c = 0, we can solve for the solutions using the quadratic formula. The Newton Method, properly used, usually homes in on a root with devastating e ciency. Just decide how much of the complex plane to draw, and for each pixel in the image, iterate Newton's method on the corresponding complex number and see what happens. include: Bisection and Newton-Rhapson methods etc. Find x in[a,b]. Use Newton's method to find a solution to x2 − 17 = 0. Please,I need a program in visual basic to solve the question below:-By applying Newton Raphson method,find the root of 3x-2tanx=0 given that there is a root between pie/6 and pie/3. This program graphs the equation X 3 / 3 - 2 * X + 5. 5 or so, it should have
{ "domain": "managerencoherence.fr", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682458008671, "lm_q1q2_score": 0.8461528594088757, "lm_q2_score": 0.8558511543206819, "openwebmath_perplexity": 297.25593681290644, "openwebmath_score": 0.8345716595649719, "tags": null, "url": "http://zvvs.managerencoherence.fr/newton-method-to-find-roots.html" }
ros, rosservice, actionlib, best-practices, rostopic Originally posted by Lorenz with karma: 22731 on 2012-09-06 This answer was ACCEPTED on the original site Post score: 73 Original comments Comment by jbohren on 2013-07-02: This has been added to ROS/Patterns here: http://www.ros.org/wiki/ROS/Patterns/Communication#Communication_via_Topics_vs_Services_vs_X... Comment by mr_top on 2022-11-29: Man well said thank you. You made me understand litterally in minutes
{ "domain": "robotics.stackexchange", "id": 7215, "lm_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, rosservice, actionlib, best-practices, rostopic", "url": null }
homework-and-exercises, newtonian-mechanics, friction Title: Hasn't the direction of Tension force been considered wrong here? Ok so I was going through this question: Two small spheres of masses m1 and m2 are connected by a light right rod.The system is placed between a rough floor and smooth vertical wall as shown in Fig. The co-efficent of friction between the floor and the sphere of mass m2 is μ .Find the minimum value of θ so that the system of masses does not slip. And in the solution, the following FBD was made:-
{ "domain": "physics.stackexchange", "id": 99484, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, friction", "url": null }
general-relativity, spacetime, differential-geometry, metric-tensor, definition GR is local theory and sufficinetly small region of spacetime is assumed to be isomorphic to open region of $\mathbb{R}^4.$ Globally the set is given by "gluing" these regions together until you arive at global solution you are satisfied with. GR does not strictly speaking enforce this. However, it is reasonable to demand some properties like smoothness of the metric, maximal extension and so on. In the case of Schwarzschild spacetime, these requirements are strong enough to guarantee uniqueness.
{ "domain": "physics.stackexchange", "id": 72344, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, spacetime, differential-geometry, metric-tensor, definition", "url": null }
newtonian-mechanics, fluid-dynamics Why should the pressure at two points in a liquid which are the same height be the same, when there is a column of liquid above the other. The first part of that statement is usually said for fluids where the only force present is gravity. Of course in your barometer case, if there are unequal pressures being applied to each side you will get a difference in water height (but still the same pressure at a given height in the fluid).
{ "domain": "physics.stackexchange", "id": 61913, "lm_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, fluid-dynamics", "url": null }
measurements, surveying Gyrotheodolites are "surveying instruments composed of a gyroscope attached to a theodolite". There is more information about gyrotheodolites here. When used underground, they are the best way to establish the initial surveying reference points underground. Depending of the extend of the underground infrastructure, occasionally, gyrotheodolites are used for check surveys of the underground reference points. After the initial reference points have been established conventional theodolites or total stations are used underground.
{ "domain": "engineering.stackexchange", "id": 4527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "measurements, surveying", "url": null }
observational-astronomy, photography Title: Why in my area does NEOWISE appear so dim and small? So, I was always amazed by images of NEOWISE around the Internet like this: Or this: Yet, all my efforts to see it or photograph it in its full glory were fruitless... 22.07.2020 22:01 Here you can barely see it at the bottom-left of the image...
{ "domain": "astronomy.stackexchange", "id": 4638, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy, photography", "url": null }
quantum-mechanics, wavefunction Title: Should the differential of a wavefunction have a time partial derivative? In chapter 1 of Griffths' QM text, he shows that $\frac{\mathrm{d}}{\mathrm{d}t}\int_{-\infty}^{\infty}|\Psi|^2\,\mathrm{d}x=0$ by noting $$\begin{align} \frac{\mathrm{d}}{\mathrm{d}t}\int_{-\infty}^{\infty}|\Psi|^2\,\mathrm{d}x &= \int_{-\infty}^{\infty}\frac{\partial}{\partial t}|\Psi|^2\,\mathrm{d}x \\ &= \int_{-\infty}^{\infty}\frac{i\hbar}{2m}\biggl(\bar{\Psi}\frac{\partial^2}{\partial x^2}\Psi-\Psi\frac{\partial^2}{\partial x^2}\bar{\Psi}\biggr)\mathrm{d}x \\ &= \int_{-\infty}^{\infty}\frac{\partial}{\partial x}\biggl[\frac{i\hbar}{2m}\biggl(\bar{\Psi}\frac{\partial}{\partial x}\Psi-\Psi\frac{\partial}{\partial x}\bar{\Psi}\biggr)\biggr]\,\mathrm{d}x \\ &= \biggl[\frac{i\hbar}{2m}\biggl(\bar{\Psi}\frac{\partial}{\partial x}\Psi-\Psi\frac{\partial}{\partial x}\bar{\Psi}\biggr)\biggr]_{-\infty}^{\infty} \end{align}$$
{ "domain": "physics.stackexchange", "id": 18489, "lm_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, wavefunction", "url": null }
structural-engineering, beam Title: Is it acceptable, with reinforcement, to notch a floor joist more than 1/6 of the depth? IBC 2308.8.2 states a rule of not notching more than 1/6 the depth of a wooden joist (emphasis added): Framing details. Joists shall be supported laterally at the ends and at each support by solid blocking except where the ends of the joists are nailed to a header, band or rim joist or to an adjoining stud or by other means. Solid blocking shall not be less than 2 inches (51 mm) in thickness and the full depth of the joist. Notches on the ends of joists shall not exceed one-fourth the joist depth. Holes bored in joists shall not be within 2 inches (51 mm) of the top or bottom of the joist, and the diameter of any such hole shall not exceed one-third the depth of the joist. Notches in the top or bottom of joists shall not exceed one-sixth the depth and shall not be located in the middle third of the span.
{ "domain": "engineering.stackexchange", "id": 405, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "structural-engineering, beam", "url": null }
c++, performance Just before the end of uniform_to_default_time_student(), code indentation is slightly inconsistent. G. Sliepen: use log(a/b)=log(a)−log(b) to avoid the division: auto log_u = log(u), log_q1 = log(q1), log_q2 = log(q2); tau = (t1 * (log_q2 - log_u) + t2 * (log_u - log_q1)) / (log_q2 - log_q1); (implementation imperfections by greybeard) I have no idea whether substituting two more divisions is useful: if (index == num_points + 1) { auto t1 = times[num_points - 1]; auto q1 = values[num_points - 1]; auto t2 = times[num_points]; auto _q2 = 1 / values[num_points]; auto _lam = (t2 - t1) / log(q1 * _q2); tau = t2 - log(u * _q2) * _lam; }
{ "domain": "codereview.stackexchange", "id": 44862, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance", "url": null }
search, typescript The two continue are not needed. Rather than assign the variable foundObjects the filtered result just return the result directly. The variable val that holds the property can be side stepped. Then the hasOwnProperty can be combined with the if statement Rather than use the for loop you can also use Array.some to find if any item matches the search Thus you get export const search = <T, K extends keyof T>(term: string, objects: T[], keys: K[]): T[] => { return objects.filter(x => keys.some(key => x.hasOwnProperty(key) && typeof x[key] === 'string' && x[key].toLowerCase().includes(term) ) ); };
{ "domain": "codereview.stackexchange", "id": 34265, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "search, typescript", "url": null }
c# EnteredCost and EnteredPaymentReceived are input parameters from MaskedTextBox and a MaskedTextBox Uses a mask to distinguish between proper and improper user input. then the validation is not necessary because all it does is to check whether the strings contain numeric data and a dot . as a separator. The MaskedTextBoxs alredy do that so why are you validating their input again?
{ "domain": "codereview.stackexchange", "id": 25537, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#", "url": null }
thermodynamics, entropy, time, biology The universe is another story. Disorder (entropy) increases until eventually time will end when events cease to occur due to the homogeneity of space.
{ "domain": "physics.stackexchange", "id": 51906, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, entropy, time, biology", "url": null }
motor which would look like this: Of course you should print this part rotated bottom-up, so you wont need any support material. And you should probably make the hole for the axle smaller than the axle actually is and then use a electric drill to drill in the hole with an accurate diameter. Also you need something that would need to keep your axle in place relative to your motor. This is where the mounting holes at the side of the motors come in handy. You should think about using bearings for holding the axle, but in some cases (slow speed) a hole that is just big enough for the axle should work. Without knowing what you want to build, it is hard to suggest any special shapes. But, I hope you got the Idea how this could look like. If you have any more questions, just ask...
{ "domain": "robotics.stackexchange", "id": 1573, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "motor", "url": null }
most context, “the square root” of a number refers just to its positive root. Formula – How to calculate a root. Degree The number of times the radicand is multiplied by itself. The symbol of throat chakra is a cross, which indicates a perfect void and silence that need to be transcended to reach enlightenment. It provides a quicker way to compute for the nth root of any number. A list of symbols will appear, one of which is the square root symbol. Radical symbol The √ symbol that means "root of". Powers or exponents. So are 3*4 and 3 4 (3 space 4, not 34) but using an explicit multiplication symbol makes things clearer. Alternatively, for MS Word users, type the character code ( 221A ), then press Alt+X to convert this code into the symbol. Allow up to 14 characters. All rights reserved. For example, the fifth root of 243 is 3 as 3 x 3 x 3 x 3 x 3 is 243. If this is missing, it is assumed to be 2 - the square root. The n-th root of x is a number r such that r to the power of 1/n is
{ "domain": "albertocontador.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9632305318133554, "lm_q1q2_score": 0.8047632576840449, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 1081.7137551575456, "openwebmath_score": 0.7292835116386414, "tags": null, "url": "http://www.albertocontador.org/s64cscaw/fifth-root-symbol-3bd825" }
java, beginner, object-oriented, tic-tac-toe public boolean checkDiagonalsForWinner() { return checkFirstDiagonal() || checkSecondDiagonal(); } private boolean checkRow(int row) { char cell1 = board[row][0]; int column = 1; while (column < SIZE) { if (cell1 == ' ' || cell1 != board[row][column]) { return false; } column++; } return true; } private boolean checkColumn(int column) { char cell1 = board[0][column]; int row = 1; while (row < SIZE) { if (cell1 == ' ' || cell1 != board[row][column]) { return false; } row++; } return true; }
{ "domain": "codereview.stackexchange", "id": 15911, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, object-oriented, tic-tac-toe", "url": null }
homework-and-exercises, quantum-field-theory, lagrangian-formalism, notation, classical-field-theory $$(\frac{\partial\mathcal{L}}{\partial(\partial_{\mu}\phi)})=\frac{1}{2}2(\partial_{\mu}\phi)=\partial_{\mu}\phi.$$ None of these are correct $(\partial^{\mu}\phi)$! How do I get the correct answer? What am I doing wrong? Are there any resources where they can help me specifically with such problems? You seem to be having some problems with index notation and the Einstein summation convention, so I recommend brushing up on those. Firstly, the $\mu$ in $\mathcal{L}$ is a dummy index, while the $\mu$ in $\partial/\partial\left(\partial_\mu\phi\right)$ is a live index. You cannot write both of them as $\mu$ or else you will run into problems. For example, if you are going to use $\mu$ in $\partial/\partial\left(\partial_\mu\phi\right)$, you should change the dummy indices in $\mathcal{L}$ to something like $$\mathcal{L}=\frac{1}{2}\eta^{\rho\lambda}\partial_{\rho}\phi\partial_{\lambda}\phi-\frac{1}{2}m^2\phi^2$$
{ "domain": "physics.stackexchange", "id": 81726, "lm_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, quantum-field-theory, lagrangian-formalism, notation, classical-field-theory", "url": null }
ros, real-time, realtime Originally posted by arennuit on ROS Answers with karma: 955 on 2014-06-06 Post score: 1 The EtherCAT bus is designed so that you can send a command to all devices on the bus simultaneously, so as long as you have a single ROS node responsible for sending commands, you may have some jitter between commands, but you should be able to keep the motors in sync. If you're building a precision motion system like the one demonstrated in the video, you should have a good understanding of the required control frequency and jitter tolerance before you start building your system. It is possible to achieve high-speed, low jitter motion control on linux, but you'll need to use a real-time linux kernel. For example, the PR2 has a 1kHz motion control loop, with a few dozen microseconds of jitter, running the realtime fork of the linux kernel.
{ "domain": "robotics.stackexchange", "id": 18185, "lm_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, real-time, realtime", "url": null }
The purpose of this reply is twofold. Firstly, I'd like to point out that the integral is convergent for all real $a<1$. Secondly, I'd like to show another possible way of calculating the integral. Let $f(x)=1/(1-a\sin x)$. We calculate $$\int_0^{\pi/2}f(x)\, dx.$$ If $0<a<1$ then $f$ is monotonically increasing on $(0,\pi/2)$ with values in $(1,1/(1-a))$. Its inverse $f^{-1}$ is given by $f^{-1}(x)=\arcsin\bigl(\tfrac{1}{a}\bigl(1-\tfrac{1}{x}\bigr)\bigr)$. We use the fact that (draw the graph!) $$\int_0^{\pi/2}f(x)\, dx + \int_{1}^{1/(1-a)} f^{-1}(x)\, dx = \frac{\pi}{2}\times \frac{1}{1-a}.$$ (Another way here is to just use the substitution $y=1/(1-a\sin x)$.)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9859363750229257, "lm_q1q2_score": 0.8106261687822371, "lm_q2_score": 0.8221891283434876, "openwebmath_perplexity": 1130.4637757891185, "openwebmath_score": 1.000001311302185, "tags": null, "url": "https://math.stackexchange.com/questions/1080017/integrate-ia-int-0-pi-2-fracdx1-a-sin-x/1081033" }
react.js } return ( <div className="todos__area"> <div className="todos__events"> <input id='input' className="todos__input" placeholder="type here" type="text" /> <button onClick = {this.addTodo} className="todos__button">Go</button> </div> <ul className="todos__list"> {listOfTodos} </ul> </div> ) } } function TodoItem(props){ return (<li id={props.thisItem.id}> <input onClick={props.toggler} className="checkbox" type='checkbox'/> <span style= {{textDecoration:props.thisItem.completed?"line-through":"none"}}> {props.thisItem.value} </span> </li>) }
{ "domain": "codereview.stackexchange", "id": 38938, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "react.js", "url": null }
php, authentication, laravel, controller $users = User::all(); $username = $request->input('usernameText'); foreach($users as $user) { if($user->Username == $username) { return redirect()->route('register'); } }
{ "domain": "codereview.stackexchange", "id": 24223, "lm_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, authentication, laravel, controller", "url": null }
c# This way your code becomes shorter and more readible, and your method names should show their intent anyways. Redundance This part return Ok(new { IsSuccess = ... InvalidCode = ... }); appears multiple times with very minor differences. You could increase readability by merging it into one. For example LoginInvalidCode invalidCode; if (!IsCaptchaValid()) { invalidCode = LoginInvalidCode.CaptchaInvalid; } else if (IsUserDisabled()) { invalidCode = LoginInvalidCode.DisableAccountAndInDisableGroup; } else if (IsInBlackList()) { invalidCode = LoginInvalidCode.InLoginBlackList; } var success = invalidCode != null; return Ok(new { IsSuccess = success, InvalidCode = invalidCode });
{ "domain": "codereview.stackexchange", "id": 28234, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#", "url": null }
gazebo-gui Title: How to enable gui in gazebo when the simulation is running? I am setting the gui flag false when I bring up the robot model using roslaunch in gazebo. My code interacts with the robot model to apply a torque at each joint. After a while, with the code and gazebo simulation still running, I want to turn the gui back on. Is there any way to accomplish this? Please explain. Thanks. Originally posted by SP on Gazebo Answers with karma: 27 on 2016-08-09 Post score: 0 In a terminal use the 'gzclient' command. Originally posted by Brosseau.F with karma: 284 on 2016-08-10 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by SP on 2016-08-15: Thank you for the simple and awesome solution.
{ "domain": "robotics.stackexchange", "id": 3963, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo-gui", "url": null }
general-relativity, forces, metric-tensor, geodesics Title: Gravity without force of gravity. What does it mean? As we know, the gravitation force in General Relativity is the semblant phenomenon. Let's look at this phenomenon in more detail. A brief preface
{ "domain": "physics.stackexchange", "id": 47966, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, forces, metric-tensor, geodesics", "url": null }
ros, ros-kinetic, pluginlib package.xml: <buildtool_depend>catkin</buildtool_depend> <build_depend>pluginlib</build_depend> <build_depend>roscpp</build_depend> <exec_depend>pluginlib</exec_depend> <exec_depend>roscpp</exec_depend> <export> <pluginlib_tutorials_ plugin="${prefix}/polygon_plugins.xml" /> </export> Could anyone please help me? Originally posted by DangTran on ROS Answers with karma: 66 on 2020-05-21 Post score: 0 I finally understand the problem and fixed it successfully: The main reason is ros::package::xxx() compatible with boost-1.58 (installed by sudo apt-get install libboost-all-dev) while I was using boost-1.70(from source) link. Return everything back to boost-1.58, everything's fine. Originally posted by DangTran with karma: 66 on 2020-05-22 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 34993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-kinetic, pluginlib", "url": null }
Miscellaneous Useful Facts Applications of Taylor Polynomials Taylor Polynomials When Functions Are Equal to Their Taylor Series When a Function Does Not Equal Its Taylor Series Other Uses of Taylor Polynomials. When the series converges, to what function does it converge? Notice that, in this case, the series is the Taylor series of the function. Within the interval of convergence the power series represents a function. Find the Taylor series for f(x) centered at the given value of a. is called a Power Series. Finding Taylor series and determining interval of convergence? Hi, I need some help with calculus please. The Taylor series converges within the circle of convergence, and diverges outside the circle of convergence. At x = −1, the series converges absolutely for p ≥ 0 and diverges for p < 0. For instance, for the function defined piecewise by saying that () = {= − ≠, all the derivatives are 0 at =, so the Taylor series of () is 0, and its radius of convergence is infinite, even
{ "domain": "tunup.fr", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9911526436103748, "lm_q1q2_score": 0.8193975780811791, "lm_q2_score": 0.826711791935942, "openwebmath_perplexity": 259.4769035586787, "openwebmath_score": 0.9378222823143005, "tags": null, "url": "http://qwvm.tunup.fr/radius-of-convergence-taylor-series.html" }
c++, object-oriented, opengl public: Shader(const unsigned int type, const std::string& filepath); ~Shader(); void Recompile(const std::string& filepath); inline unsigned int GetHandle() const { return m_RendererID; } inline bool Attachable() const { return m_Attachable; } inline unsigned int GetType() const { return m_ShaderType; } inline const std::string& GetSource() const { return m_Source; } inline bool SameInstance(const Shader& s) { return (this == &s) ? true : false; } }; Shader.cpp: #include "Shader.h" #include <sstream> #include <fstream>
{ "domain": "codereview.stackexchange", "id": 31270, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, opengl", "url": null }
python, algorithm if command[current_command] == 'L': rover.rotate_left() current_command += 1 ... use for letter in command: if letter == 'L': ... elif letter == 'M': ... I/O It is generally a good idea to separate I/O from model code. For example, if you wanted to change the current code so the rover is controlled via a web interface, a RESTful API, or via intergalactic WiFi, the Rover class would need to be revised. f-strings f-strings makes is easy to format strings. Rather than str(self.X) + " " + str(self.Y) + " " + self.direction use f"{self.X} {self.Y} {self.direction}" All together, something like this: RIGHT_ROTATE = { 'N':'E', 'E':'S', 'S':'W', 'W':'N' } LEFT_ROTATE = { 'N':'W', 'W':'S', 'S':'E', 'E':'N' } class MarsRover(): """ class to simulate a Mars rover. """ def __init__(self, x, y, heading): self.x = x self.y = y self.heading = heading
{ "domain": "codereview.stackexchange", "id": 37287, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, algorithm", "url": null }
sampling, analog-to-digital for (int m = 1; m < M; m++) { IQ *= rotation[M]; roundedIQ = cplx(round(real(IQ)*IScaleInv)*IScale, round(imag(IQ))); cost += norm(roundedIQ-IQ); } double fundamentalIQNorm = norm(fundamentalIQ); int k = std::max(floor(log2(initialI)), floor(log2(initialQ))); // printf("(%d,%d)",k,initialI); if (cost*bestArrangements[M+(maxM+1)*k].fundamentalIQNorm < bestArrangements[M+(maxM+1)*k].cost*fundamentalIQNorm) { bestArrangements[M+(maxM+1)*k] = {initialI, initialQ, fundamentalIQ, fundamentalIQNorm, cost}; } } } } printf("N"); for (int k = mink; k <= maxk; k++) { printf(",%d-bit", k+2); } printf("\n"); for (int M = minM; M <= maxM; M += stepM) { printf("%d", M); for (int k = mink; k <= maxk; k++) { printf(",%.13f", sqrt(bestArrangements[M+(maxM+1)*k].cost/bestArrangements[M+(maxM+1)*k].fundamentalIQNorm/M)); } printf("\n"); }
{ "domain": "dsp.stackexchange", "id": 5038, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sampling, analog-to-digital", "url": null }
# Probability question 1. Jan 14, 2009 ### Inertialforce 1. The problem statement, all variables and given/known data Two hockey players, Wayne and Mario, each independently take a penalty shot. Wayne has a 7/10 chance of scoring, while Mario has a 3/5 chance of scoring. What is the probability that; a) they both miss 2. Relevant equations P(A and B) = P(A) x P(B) 3. The attempt at a solution For this question I found out what the complements (P(not mario) and P(not Wayne)) for each were and then I used the formula for independent events [P(A and B) = P(A) x P(B)] to find my answer and the answer that I got was correct. However, I was wondering why I cannot just go: P(both miss) = 1- P(both score) I tried this method and the answer that came up was different than the answer that I got from my first method of trying to solve this question (using the complements). Could someone explain why I cannot use "P(both miss) = 1- P(both score)" to solve this question? 2. Jan 15, 2009
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357573468175, "lm_q1q2_score": 0.8282078947821543, "lm_q2_score": 0.8459424373085146, "openwebmath_perplexity": 1522.6579035953537, "openwebmath_score": 0.6143222451210022, "tags": null, "url": "https://www.physicsforums.com/threads/probability-question.284982/" }
machine-learning, python, nlp, scikit-learn, text-classification history = model.fit(train_padded, training_labels, shuffle=True , epochs=epochs, batch_size=batch_size, class_weight=class_weights_dict, validation_data=(validation_padded, validation_labels), callbacks=[ReduceLROnPlateau(monitor='val_loss', factor=0.2, patience=5, min_lr=0.0001), EarlyStopping(monitor='val_loss', mode='min', patience=2, verbose=1), EarlyStopping(monitor='val_accuracy', mode='max', patience=5, verbose=1)]) You have to apply the same preprocessing to the test data. Based on your code you apply the clean_text function only to train data but then predict on test/validation data that was not cleaned. That means that your model learns on clean data but you want it to predict on raw data which contains things the model never seen (because it was removed from the train dataset) which will result in worse performance.
{ "domain": "datascience.stackexchange", "id": 11182, "lm_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, python, nlp, scikit-learn, text-classification", "url": null }
rosmake, rosbuild Title: Is there a rosmake clean? I know about rosmake --pre-clean. But what if you just want to clean your package and not build it? There doesn't seem to be a "don't build" flag in rosmake. When I have a new package that I want to add to my svn repository, I develop it until it is working, then remove the bin, build, and other computer generated files, then do an svn add on the package. I typically remove all these directories by hand... Originally posted by baxelrod on ROS Answers with karma: 794 on 2011-03-22 Post score: 3 You can just do roscd your_package_name && make clean to clean out all the generated files from just that package. I typically use rosmake only when building new package the first time to make sure all dependencies are built or when dependencies change. After the initial rosmake, plain make command is much faster and only builds the package I am currently developing.
{ "domain": "robotics.stackexchange", "id": 5165, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosmake, rosbuild", "url": null }
java, performance, stack, queue public class twoStacksInOneQueue { private Stack <Integer> oddStack; private Stack <Integer> evenStack; private int counter;// count added element private int shift;//count internal movement from one stack to another. /** Constructor */ public twoStacksInOneQueue() { counter = 1; shift = 0; oddStack = new Stack<Integer>(); evenStack = new Stack <Integer>(); } /** add element to queue according to amount of elements. if there are 3 element, the 3rd element is put into odd stack. */ public void addToQueue(int num) { if(counter % 2 == 0) { evenStack.push(num); System.out.println("evenStack: " + num); } else { oddStack.push(num); System.out.println("oddStack: " + num); } counter++; } /** remove an element from queue according to amount of elements */ public int removeFromQueue() { int temp; int result = 0;
{ "domain": "codereview.stackexchange", "id": 20930, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, stack, queue", "url": null }
5. Let $$P$$ be the statement “Student X passed every assignment in Calculus I,” and let $$Q$$ be the statement “Student X received a grade of C or better in Calculus I.” (a) What does it mean for $$P$$ to be true? What does it mean for $$Q$$ to be true? (b) Suppose that Student X passed every assignment in Calculus I and received a grade of B-, and that the instructor made the statement $$P \to Q$$. Would you say that the instructor lied or told the truth? (c) Suppose that Student X passed every assignment in Calculus I and received a grade of C-, and that the instructor made the statement $$P \to Q$$. Would you say that the instructor lied or told the truth? (d) Now suppose that Student X did not pass two assignments in Calculus I and received a grade of D, and that the instructor made the statement $$P \to Q$$. Would you say that the instructor lied or told the truth? (e) How are Parts (5b), (5c), and (5d) related to the truth table for $$P \to Q$$?
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754504074422, "lm_q1q2_score": 0.8267814474688453, "lm_q2_score": 0.8397339656668286, "openwebmath_perplexity": 132.42719216959972, "openwebmath_score": 0.7440686821937561, "tags": null, "url": "https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Mathematical_Reasoning_-_Writing_and_Proof_(Sundstrom)/1%3A_Introduction_to_Writing_Proofs_in_Mathematics/1.1%3A_Statements_and_Conditional_Statements" }
## 7 Answers We have to count the number of three elements subsets of $\{1,\ldots,100\}$ having sum greater than $100$, or $\leq 100$. For first, we have that the number of lattice points $(x,y,z)\in[1,100]^3$ such that $(x+y+z)\leq 100$ is given by: $$\sum_{x=1}^{98}\left|\{(y,z)\in[1,100]^2:y+z\leq 100-x\}\right|=\sum_{x=1}^{98}\binom{100-x}{2}=\binom{100}{3}.$$ Obviously, not every lattice point gives a valid subset. Among the previously counted lattice points, there are $33$ points of the type $(x,x,x)$ and $3\cdot 2417=7251$ points of the type $(u,u,v),(u,v,u)$ or $(v,u,u)$ with $u\neq v$. Hence the number of three elements subsets of $\{1,\ldots,100\}$ with sum $\leq 100$ is given by: $$\frac{1}{6}\left(\binom{100}{3}-7251-33\right) = 25736$$ so the wanted probability is: $$1-\frac{25736}{\binom{100}{3}}$$ that is between $\frac{280}{333}$ and $\frac{37}{44}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9572777987970315, "lm_q1q2_score": 0.8018349869674973, "lm_q2_score": 0.8376199552262967, "openwebmath_perplexity": 1112.4425436581973, "openwebmath_score": 0.7192723751068115, "tags": null, "url": "https://math.stackexchange.com/questions/953908/probability-that-the-sum-of-three-integer-numbers-from-1-to-100-is-more-than-1/953950" }
galaxy, distances, fast-radio-bursts for a repeating FRB. In the case you're talking about, FRB 180814.J0422+73 (Amiri et al. 2019 for the CHIME/FRB Collaboration), six bursts were detected from one particular region, with only 18 total bursts detected in that pre-commissioning phase (so 13 sources total). That high a fraction of bursts coming from a very small part of the sky is enough to raise some eyebrows.
{ "domain": "astronomy.stackexchange", "id": 5280, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "galaxy, distances, fast-radio-bursts", "url": null }
\\ -150, \textrm{ if } 4.5 \leq t \leq 5 \end{cases}$$$$x(t)= \begin{cases} 45t^2 + C, \textrm{ if } 0 \leq t \leq 0.5 \\ 45t + C, \textrm{ if } 0.5 \leq t \leq 2 \\ -90t^2+225t + C, \textrm{ if } 2 \leq t \leq 2.5 \\ 0, \textrm{ if } 2.5 \leq t \leq 3 \\ 75t^2-450t + C, \textrm{ if } 3 \leq t \leq 3.5 \\ 75t + C, \textrm{ if } 3.5 \leq t \leq 4.5 \\ -75t^2 +750t + C, \textrm{ if } 4.5 \leq t \leq 5 \end{cases}$$And so I happily elaborated the graphs. And when I went to compare the results to the ones in my textbook, I realized there was no answer there. So I checked on the web and I found a document from an unknown source in which the question was solved, and I was faced with the following graphs:
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9637799472560581, "lm_q1q2_score": 0.8266996972331667, "lm_q2_score": 0.8577681031721324, "openwebmath_perplexity": 502.6945397347745, "openwebmath_score": 0.6502695083618164, "tags": null, "url": "https://www.physicsforums.com/threads/motion-graphs-and-their-units.912153/" }
fluid-mechanics, thermodynamics Assumptions: ideal gas, constant gas flow rate My derivation begins with writing the following differential equation: $$dP=P(1−\frac{dV}{V_s})$$ How do I get to the solution from this? I did get the same result but started from this: $$\frac{dP}{ P } = (\frac{dV}{dt} / Vs) * dt$$ Then integrating both sides $$ ∫\frac{1}{P} dP = ∫ (\frac{dV}{dt} / Vs) * dt$$ Integrating: $$ln|P| = (\frac{dV}{dt} / Vs) * t + C1$$ Now, we'll exponentiate both sides: $$P = exp((\frac{dV}{dt} / Vs) * t + C1)$$ we drop the absolute value for P: it's always positive. Combine the constants C1 and exp(C1) into one constant, let's call it C: $$P = C * exp((\frac{dV}{dt} / Vs) * t )$$ This is your answer by replacing C with its boundary value which is $P_2$. $$P = P_2 * exp((\frac{dV}{dt} / Vs) * t )$$
{ "domain": "engineering.stackexchange", "id": 5241, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-mechanics, thermodynamics", "url": null }
machine-learning, classification, object-detection, activity-recognition As the action being performed on the video covers anywhere from 10% to 90% of the frame, you can perform TestTimeAugmentation on the video in order to find the action with a higher confidence rate. Similar approach could be found in this video by Google.
{ "domain": "datascience.stackexchange", "id": 4858, "lm_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, object-detection, activity-recognition", "url": null }
ds.algorithms, np-hardness, tree, optimization, application-of-theory Here's one example of why most simple solutions (including topological sort) won't work: You have 10 items with the quantities 1 through 10, and 10 price labels with the prices $\$$1 through $\$$10. There is one condition: the item with the quantity 10 must not be cheaper than the item with the quantity 1. The optimal solution is: Price, $ 1 2 3 4 5 6 7 8 9 10 Qty 9 8 7 6 1 10 5 4 3 2 with a total cost of $\$$249. If you place the 1,10 pair near either extreme, the total cost will be higher. I also posted this on your original question on Stack Overflow:
{ "domain": "cstheory.stackexchange", "id": 662, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ds.algorithms, np-hardness, tree, optimization, application-of-theory", "url": null }
frequency-domain Title: 2 by 2 bit orthogonal encoding mult-kronecker expansion matrices? What is the name of the following bit encoding generator matrices? This is called Sylvester's construction for a $2^n\times 2^n$ Hadamard matrix. The matrices are sometimes called Walsh matrices or Walsh-Hadamard matrices.
{ "domain": "dsp.stackexchange", "id": 1766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "frequency-domain", "url": null }
Mathematical background The expression $$y = a * \sin (b * x + c)$$ is the general solution to $$y'' + b^2 y = 0 \,,$$ and thus $$y = a * \sin (b * x + c) + d$$ is the general solution to $$y''' + b^2 y' = 0\,.\tag{1}$$ Even further, it is the general solution to $${d \over dx} {y''' \over y'} = {d \over dx} \left(-b^2\right) \,,$$ or equivalently $$y'y^{(4)}-y''y''' = 0 \,.\tag{2}$$ Equation (2) is equivalent to the vanishing of the second-order Wronskian of $$y'$$ and $$y'''$$, $$W \equiv \left|\matrix{ y' & y''' \\ y'' & y^{(4)} \\}\right| = 0 \,. \tag{3}$$ The condition $$W=0$$ is equivalent to $$y'$$ and $$y'''$$ being linearly dependent. A fourth-order ODE is as far as we can go, since the form $$y = a * \sin (b * x + c) + d$$ has four parameters. Solution methods A solution based on (1), using the internal, undocumented function PeriodicPeriodicFunctionPeriod is the following:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9496693645535725, "lm_q1q2_score": 0.8052889949631967, "lm_q2_score": 0.8479677506936878, "openwebmath_perplexity": 2925.453596467647, "openwebmath_score": 0.48634108901023865, "tags": null, "url": "https://mathematica.stackexchange.com/questions/207426/how-can-i-check-if-a-function-can-be-written-as-a-sin-b-x-c-d" }
c#, thread-safety, generics, cache { if (!Ektron.Com.Helpers.Constants.IsCachingEnabled) { Remove<T>(cacheKey); } Type t = typeof(T); bool retrievedFromCache = TryGet<T>(cacheKey, out returnData); if (retrievedFromCache) { return true; } else { returnData = getData(); Set<T>(cacheKey, returnData); return returnData != null; } }
{ "domain": "codereview.stackexchange", "id": 20465, "lm_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#, thread-safety, generics, cache", "url": null }
First, recognize that $max(A)-1\geq max(A)-min(A)=k$ implies $max(A)\geq k+1$, for example if the distance between max and min is six, you cannot have the largest number be $6$ or less, it must be at least $7$ or more. Step 1: Pick the largest number. We first need to count how many ways in which we may pick the largest number for our set for a specific $k$. As $20\geq max(A)\geq k+1$ there are $20-k$ different possibilities for $max(A)$. (E.g. for $k=19$ our only choice is for $max(A)=20$ and $min(A)=1$ for a total of $20-19=1$ choices while for $k=17$ we could have $max(A)=18~min(A)=1,~~max(A)=19~min(A)=2,$ or $max(A)=20~min(A)=3$ for a total of $20-17=3$ choices) In having picked the largest number, the smallest number is forced to ensure that the desired difference is achieved. Step 2: Pick the locations of the remaining two numbers in relation to the smallest number.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.988841968751916, "lm_q1q2_score": 0.8014355619447876, "lm_q2_score": 0.8104789109591832, "openwebmath_perplexity": 207.9534146714843, "openwebmath_score": 0.7422946095466614, "tags": null, "url": "https://math.stackexchange.com/questions/2098433/four-numbers-are-chosen-from-1-to-20-if-1-leq-k-leq-17-in-how-many-ways-is" }
c#, linq, hash-map Title: Reverse Dictionary: Group from child array elements and get its minimum key Objective I have following array and would like to group by each child and get its smallest Id:- var list = new[] { new { Id = 1, Childs = new [] { 'a', 'b' } }, new { Id = 2, Childs = new [] { 'a' } }, new { Id = 3, Childs = new [] { 'a', 'c' } }, new { Id = 4, Childs = new [] { 'b' } }, new { Id = 5, Childs = new [] { 'b' } }, new { Id = 6, Childs = new [] { 'b', 'c' } }, }; Attempt var groups = list .SelectMany(item => item.Childs) .Distinct() // for each unique child .ToDictionary( child => child, // with each child as key child => list.Where(item => item.Childs.Any(c => c == child)) // get items with corresponding child .Min(item => item.Id)); // extract min Id
{ "domain": "codereview.stackexchange", "id": 35747, "lm_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#, linq, hash-map", "url": null }
factor analysis, co-inertia analysis, STATIS, and DISTATIS. k 4, pp. l In this section, we demonstrate a few such applications. {\displaystyle k} n k As we see from many years of experience of teaching Mathematics and other STEM related disciplines that motivating, by nature, is not an easy task. ′ {\displaystyle n} Eigenvalues/vectors are used by many types of engineers for many types of projects. Thus the matrix of eigenvectors for $A$ is, $$Z=\begin{bmatrix}0.81124 &-0.58471\\0.8471&0.81124\end{bmatrix}$$. However, this compresses (or expands) the fluctuations in all dimensions of the signal space to unit variance. A = In fields such as astronomy, all the signals are non-negative, and the mean-removal process will force the mean of some astrophysical exposures to be zero, which consequently creates unphysical negative fluxes,[17] and forward modeling has to be performed to recover the true magnitude of the signals. In this section, we demonstrate a few such applications. The
{ "domain": "decortech.pl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668734137682, "lm_q1q2_score": 0.8067047406864422, "lm_q2_score": 0.8221891327004132, "openwebmath_perplexity": 850.2870432599236, "openwebmath_score": 0.8346825242042542, "tags": null, "url": "http://www.decortech.pl/slug/application-of-eigenvalues-and-eigenvectors-in-statistics-78ff40" }
regular-languages, pumping-lemma Initially, you have taken a value $p$, with no assumption. This is in accordance with for all $p$. Then, you have chosen a string $s$ with length at least $p$. This is in accordance with there exists a string $s$, i.e., a single instance of a string satisfying the rest of the statement is sufficient. Now, you need to consider all ways of partitioning $s$ in the form $x,y,z$, and show that always, at least one of the three statements of the lemma is false. So, you have partitioned it into $x=a^l, y=a^k, z=a^{{2^p}-l-k}$. As of now, there are no assumptions on the values $l$ and $k$ can take, except that they are non negative, which is as required. To force a contradiction, you need to try to show that all the statements of the lemma do hold. Statement 2 states that $|y|\gt0$. So, if it were true, we must have $k\gt0$. Statement 3 states that $|yz|\le p$. If it were true, we must have $k+l\le p$.
{ "domain": "cs.stackexchange", "id": 8275, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "regular-languages, pumping-lemma", "url": null }
$\int_0^2 (x-1) f(x) dx = \int_0^1 (x-1) f(x) dx + \int_1^2 (x-1) f(x) dx$, we see that it suffices to prove that $\int_1^2 (x-1) f(x) dx = - \int_0^1 (x-1) f(x) dx$. Letting $u = x - 1$ gives $\int_1^2 (x-1) f(x) dx = \int_0^1 u f(u+1) du.$ Then, by the symmetry hypothesis on $f$, this last integral equals $\int_0^1 u f(1-u) du.$ Now, letting $v = 1 - u$, this last integral equals $\int_1^0 (1-v) f(v) (-dv) = \int_0^1 (1-v) f(v) dv = - \int_0^1 (v-1) f(v) dv$ as desired.  So, the proof is complete. Can anyone find any generalizations? ## An Arithmetic Progression of Local Extrema I was just trying to design a graph for an upcoming calculus exam.  I wanted it to be a polynomial function f with local maxima at x = 1, 3 and a local minimum at x = 2.  For variety I wanted $f(1) \neq f(3).$
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9915543718110061, "lm_q1q2_score": 0.8284273598836708, "lm_q2_score": 0.8354835432479663, "openwebmath_perplexity": 378.12107820867465, "openwebmath_score": 0.8204935193061829, "tags": null, "url": "http://theninepointsquare.wordpress.com/" }
general-relativity, special-relativity, reference-frames, thought-experiment The upper reasoning seems to solve the problem, but surely is not a precise formulation; and also remains the problem that seems to me absurd that no separate principle regarding this is clearly stated in the literature. Edit: A lot of answers revolve around the idea that the principle of relativity (or the principle of general covariance) implies that different observers must agree on what a specific experimental setup is measuring; or to say it in another way, that all observers should agree on events like the presence of an explosion. But I cannot see why this implication holds: the principle of general covariance states that the laws of physic must be the same in every reference frame, but this does not mean that all the observers must agree on what those laws of physics predict for a specific object. This is an entirely different statement. Let me give it a try, too. I would state the principle as follows.
{ "domain": "physics.stackexchange", "id": 70180, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, special-relativity, reference-frames, thought-experiment", "url": null }
So it means that either: A occurs (but not B) or B occurs (but not A) So P(C) = P( $A$ n $B^c$) U P( $B$ n $A^c$) So P(C) = P( $A$ n $B^c$) U P( $B$ n $A^c$)[/QUOTE] would be the expression for C in terms of unions, intersections and complements of A and B. How would I use this to derive an expression for P(C) in terms of P(A), P(B) and P(AnB). Would it be like this? P(C) = ( P(A) - P(A n B) ) u ( P(B) - P(A n B)) This is the question: (a) draw a Venn diagram (b) Write down an expression for C in terms of union, intersections and complement of A and B. (c) Using result (b) derive an expression for P(C) in terms of P(A), P(B) and P(A nB). Give a detailed proof of the result. I dont no what the difference for the expression of C and the expression of P(C) is?
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419694095655, "lm_q1q2_score": 0.8282737721551241, "lm_q2_score": 0.837619961306541, "openwebmath_perplexity": 783.4337532567864, "openwebmath_score": 0.6101536750793457, "tags": null, "url": "http://mathhelpforum.com/statistics/157982-venn-diagram-b-c.html" }
between frequency distributions of dimensions less than 100 edges, combine prefixes... Command is the polygon is a primitive used in modelling and rendering figure can. 3 ] [ 4 ], polygons have been known since ancient times = ( x0, y0 ) also. Represent frequency distributions such that each bin encompasses a range of values within a particular.! One with the collection of data divided into things called the shoelace formula or Surveyor 's.... A different tabulation scheme aggregates values into bins such that each bin encompasses a range of values a... As to compare several frequency distributions frequency polygon wikipedia histograms, line charts, charts... Are simple algorithms to calculate median, range from a grouped frequency table way of representing quantitative.... Any number of times a score occurs could be organized into the following table. Involving frequency polygons can be drawn without it as well observation and mark a vertical bar ( | for! There exists a line may
{ "domain": "desertdingo.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.960361158630024, "lm_q1q2_score": 0.827387826184822, "lm_q2_score": 0.86153820232079, "openwebmath_perplexity": 1024.6579595903306, "openwebmath_score": 0.5896909832954407, "tags": null, "url": "http://desertdingo.com/l7ocfce/viewtopic.php?1b9ddc=frequency-polygon-wikipedia" }
matlab, frequency-spectrum, filter-design, lowpass-filter, finite-impulse-response This picture makes perfect sense to me because the filtered signal just oscillates around the original signal and those are the low frequencies I see. Next I used the GUI based filter builder included in MATLAB's DSP System Toolbox to design my own filter. So I made a low pass, finite impulse response, single-rate filter using the equiripple method and the minimum order possible with the passed frequency amplitude being 1dB and the stopped frequency amplitude attenuated 60dB. Since the range must start with a strictly positive number I used the allowed range of 10e-9 Hz to 0.0008 Hz. The filter is implemented as a direct-form FIR. Here is the frequency response. My question is when I run the same data through this designed filter, the filtered signal looks so strange.
{ "domain": "dsp.stackexchange", "id": 581, "lm_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, frequency-spectrum, filter-design, lowpass-filter, finite-impulse-response", "url": null }
ros, catkin-make, catkin, ros-hydro, navfn Originally posted by joq with karma: 25443 on 2014-03-05 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by Dirk Thomas on 2014-03-05: The bug has been fixed in https://github.com/ros-planning/navigation/commit/25f6ef8b7008bc383fb22aec84280e4d107ac8d5 but no new release has been made since then. I added a comment (https://github.com/ros-planning/navigation/commit/166614ca97a637cf525c930d81fcb7b80c48d08c#commitcomment-5575488) - hopefully the maintainers will release a new version into hydro soon. Comment by luka-s on 2014-03-07: Thank you, the suggested approach works :). Sort of. Now I can use navfn's planner but the rest of code stops working ..and I can't really figure out why. So I can either use navfn or, remove the navigation source from my workspace and try to run my code without it, like before. I hope the repair the headers soon
{ "domain": "robotics.stackexchange", "id": 17171, "lm_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, catkin, ros-hydro, navfn", "url": null }
Multiplying $(3)$ by $k!$ and taking the $\log$ of both sides yields $$\sum_{j=0}^{k-1}\log(n-j)>k\log(n)-k\log(2)\tag{4}$$ Noting that $$\sum_{j=0}^{k-1}\log(n-j)\ge\int_{n-k}^n\log(x)\,\mathrm{d}x\tag{5}$$ We get that $$\int_{n-k}^n\log(x)\,\mathrm{d}x>k\log(n)-k\log(2)\tag{7}$$ implies $(3)$. Computing the integral in $(7)$ yields $$n\log(n)-n-(n-k)\log(n-k)+(n-k)>k\log(n)-k\log(2)\tag{8}$$ Subtracting $k\log(n)-k$ from both sides and dividing by $k$ yields $$\frac{n-k}{k}\log\left(\frac{n}{n-k}\right)>1-\log(2)\tag{9}$$ Substituting $\alpha=k/n$ yields $$\frac{1-\alpha}{\alpha}\log\left(\frac{1}{1-\alpha}\right)>1-\log(2)\tag{10}$$ Here is a plot of $\frac{1-\alpha}{\alpha}\log\left(\frac{1}{1-\alpha}\right)$ and $1-\log(2)$: $\hspace{4cm}$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9891815535796247, "lm_q1q2_score": 0.8503635242854863, "lm_q2_score": 0.8596637505099167, "openwebmath_perplexity": 710.6211572365571, "openwebmath_score": 0.9999480247497559, "tags": null, "url": "http://math.stackexchange.com/questions/125954/bounding-n-choose-k" }
A different approach to (1): Letting $B$ be the unit ball and $\Sigma$ be the surface of a ball of radius $\rho$, then by symmetry \begin{align} \iiint\limits_D y^2 \; dx \; dy \; dz &= {1 \over 2} \iiint\limits_B y^2 \; dx \; dy \; dz = {1 \over 2} \iiint\limits_B x^2 \; dx \; dy \; dz = {1 \over 2} \iiint\limits_B z^2 \; dx \; dy \; dz\cr &= {1 \over 6} \iiint\limits_B(x^2+y^2+z^2) \; dx \; dy \; dz\cr &= {1 \over 6} \int_0^1\iint\limits_\Sigma \rho^2 \; dS \; d\rho = {1 \over 6} \int_0^1\iint\limits_\Sigma \; dS \;\rho^2\; d\rho = {1 \over 6} \int_0^1 4\pi\rho^2 \;\rho^2\; d\rho \cr &= {1\over6} {4\pi \over 5} = {2 \pi \over 15}\,. \end{align} - +1 This is a very nice approach. –  DonAntonio Jan 17 '13 at 2:37
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877726405083, "lm_q1q2_score": 0.802479034146416, "lm_q2_score": 0.8267117983401363, "openwebmath_perplexity": 1886.1058109069752, "openwebmath_score": 0.9992231130599976, "tags": null, "url": "http://math.stackexchange.com/questions/280261/two-multiple-integrals" }
algorithms, approximation And this may not (insufficient B Stocks) AB B B 30 10 20 This sounds like a more or less common problem which should have a known solution. I would be happy with any reference or idea. Also if the solution is resource heavy a cheaper approximation would be great. You can formulate this as a maximum flow problem, which you can solve using standard techniques. Turn every stock in to a source node with capacity equal to the amount of stock. Any demand gets turned in to a sink with demand equal to its demand. Add edges between stocks and demands if the stock can fulfill the demand. If you don't want to have more than one sink or source that is possible too: you create the stock and demand nodes as before, and create an edge between the sink and all stock nodes (with capacity equal to the amount of stock available), similarly create an edge between all demand nodes and the sink (with capacity equal to the demand).
{ "domain": "cs.stackexchange", "id": 5300, "lm_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, approximation", "url": null }
electrostatics Let $R$ be the radius of the large cylinder, and let $\sigma(z)=Ai\frac{i-z/R}{i+z/R}$ (where $A$ is a real constant). You can check that this map sends the interior of the large cylinder (viewed as a disk in the complex plane $\mathbb C$) to the upper half plane $\mathbb H$. You can also check that it maps circles to other circles, so the electrode cylinders are mapped into two rescaled circles in the upper half plane. Moreover, the centers of the electrodes are mapped to a line parallel to the real axis, and both circles in $\mathbb H$ have equal radius. As promised, the picture:
{ "domain": "physics.stackexchange", "id": 31824, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics", "url": null }
java, beginner, mvc, tic-tac-toe, ai view.printGameField(model); counter++; } //prompt players for their turn try { input = prompt(); while (input[0] < 0 || input[0] > 2 || input[1] < 0 || input[1] > 2) { System.err.printf("Row and Col must be between 0 - 2. %n"); input = prompt(); } while (!isValidMove(input)) { System.err.printf("This field is already taken! %n"); input = prompt(); } } catch (IOException ioe) { System.err.println("Error reading input"); ioe.printStackTrace(); } placeStone(input); if (hasWon()) { view.printGameField(model); System.out.printf("%nPlayer %d has won! GG EZ %n", counter % 2 + 1); return; } counter++; }
{ "domain": "codereview.stackexchange", "id": 29611, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, mvc, tic-tac-toe, ai", "url": null }
beginner, php, image Title: Writing values from JSON on image and display image This is a script I made that opens img.png, downloads the JSON data from the API, writes it on image and displays it. It currently is a community ad over Arqade. <?php header('Content-type: image/png'); //setting header to png so it will display as an image $donationImage = imagecreatefrompng("img.png"); //loading the donation image's base from the file img.png $white = imagecolorallocate($donationImage, 255, 255, 255); $json = json_decode(utf8_encode(file_get_contents("http://www.mariomarathon.com/rest/partners/arqade.com"))); $total = round($json->total); //Rounding the total amount because it uses floats $byus = $json->domainTotal;
{ "domain": "codereview.stackexchange", "id": 21963, "lm_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, php, image", "url": null }
quantum-field-theory, quantum-electrodynamics, renormalization, research-level, infrared-radiation $$ A_{n+1} \to \sum_k Q_k \frac{p_k \cdot \epsilon}{p_k \cdot q} A_n $$ Gauge invariance requires that if I replace $\epsilon \to q$, the amplitude must vanish. This implies $$ \sum_k Q_k = 0 $$ which is the statement of charge conservation. The subleading soft photon theorem is (I'm not being careful about overall factors) $$ A_{n+1} \to \text{leading} + \sum_k Q_k \frac{q^\mu \epsilon^\nu J_{\mu\nu} }{ p_k \cdot q } A_n $$ Due to anti-symmetric of the angular momentum tensor $J_{\mu\nu}$, the second term automatically vanishes when I replace $\epsilon \to q$. There is no new constraint on any of the charges. Analogously in gravity, the leading and subleading soft theorems are associated to global momentum and angular-momentum conservation. The subsubleading soft theorem is not associated to any new global symmetry.
{ "domain": "physics.stackexchange", "id": 88291, "lm_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, quantum-electrodynamics, renormalization, research-level, infrared-radiation", "url": null }
gravity The Earth's coal reserves are something like 1 trillion tons which is $10^{15}$ kg. Let's bring this amount from another celestial body - it's about 10 orders of magnitude less than what we can do now but let's imagine we double our coal reserves in this way. The Earth's mass is $6\times 10^{24}$ kg, so the coal reserves are approximately $10^{-10}$ of the Earth's mass. Now, if all the extraterrestrial coal landed by a slow speed relatively to the Earth, the Earth's velocity wouldn't change at all; only the mass would increase and the heavier Earth would continue along exactly the same trajectory as before. But now, imagine that the coal lands at some speed, e.g. the safe speed that the space shuttles used to take. It's about $350$ km/h. If you don't get approximately this low, there's a risk that your coal will burn in the atmosphere.
{ "domain": "physics.stackexchange", "id": 446, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity", "url": null }
differential-geometry, vector-fields Title: Interpreting Vector fields as Derivations on Physics I have a subtle doubt about the physical interpretation of the mathematical definition of vector field as a derivation. In basic physics we understand a vector quantity as a quantity that needs more than magnitude to be fully specified, in other words, quantities with the notion of direction. This goes very well with the also basic mathematical definition that a vector is an equivalence class of oriented line segments. However, when we go to the study of manifolds, we see that a better definition of vector is to say that a vector at a point is a derivation on the algebra of smooth functions on that point. But then, we represent forces for instance with vectors, what's the interpretation of representing one force acting on a point by a derivation on the smooth functions on the point? I imagine that there must be some interpretation for that, but I didn't find what's it.
{ "domain": "physics.stackexchange", "id": 6495, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "differential-geometry, vector-fields", "url": null }
newtonian-mechanics, classical-mechanics, kinematics, rotational-kinematics, angular-velocity notice that the rotation matrix $~\mathbf R~$ is depending on the three parameter which are the generalized rotation coordinates e.g. $~d_x(t)~,d_y(t)~,\theta(t)~$ and is orthonormal $~\mathbf R^T\,\mathbf R=\mathbf I_3$
{ "domain": "physics.stackexchange", "id": 89157, "lm_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, classical-mechanics, kinematics, rotational-kinematics, angular-velocity", "url": null }
quantum-mechanics Similarly, the other two basis vectors of the 3D space of $Y_{1m}$ spherical harmonics, those proportional to $x$ or $y$ on the unit sphere (they are either the sum or the difference of $Y_{1,\pm 1}$, perhaps with phases that may change for unusual conventions), respectively, give the other two permutations of $(1,1,0)$ for the eigenvalues of $J_x^2,J_y^2,J_z^2$. The theorem and especially its starting axioms are trivial in proper quantum mechanics. They only become non-trivial in various alternative theories people could propose instead of quantum mechanics, namely various hidden-variable theories and GRW-type collapse theories etc. The theorem shows that these hidden-variable and collapse theories cannot be made compatible with relativity. I think that you meant Conway's and Kochen's axioms.
{ "domain": "physics.stackexchange", "id": 15232, "lm_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", "url": null }
c#, generics public event EventHandler<EventListArgs<T>> ItemAdded; public event EventHandler<EventListArgs<T>> ItemRemoved; private void RaiseEvent(EventHandler<EventListArgs<T>> eventHandler, T item, int index) { var eh = eventHandler; eh?.Invoke(this, new EventListArgs<T>(item, index)); } public IEnumerator<T> GetEnumerator() { return _list.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public void Add(T item) { var index = _list.Count; _list.Add(item); RaiseEvent(ItemAdded, item, index); } public void Clear() { for (var index = 0; index < _list.Count; index++) { var item = _list[index]; RaiseEvent(ItemRemoved, item, index); } _list.Clear(); } public bool Contains(T item) { return _list.Contains(item); }
{ "domain": "codereview.stackexchange", "id": 16899, "lm_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#, generics", "url": null }
signal-detection, software-defined-radio, frequency-modulation Next idea was to use the fact that structure of radio channel is known and try to detect stereo pilot (19 kHz tone in demodulated band, tired to do a tone analysis on band-passed portion from 17 to 21 kHz and use THD as a tune-in measure). However, again the method gave many false-positive results and the tune-in measure turned out to be very imprecise. My last idea, that I have not yet tested, is to measure SINAD of demodulated mono audio but I'm afraid of the results similar to the stereo pilot case. So my question is: how to do it correctly? I mean - what measure can be adopted to detect presence of FM signal and to estimate what the carrier frequency is? Of the methods you've already tried, the "looking for peaks in the spectrum" to me sounds like the most promising, but: My guess is that your "spectrum" is actually a PSD estimate done with the FFT. Which is a fine method of getting an understanding of the spectrum – but as you probably noticed, the "peaks" will not be very clear.
{ "domain": "dsp.stackexchange", "id": 5973, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-detection, software-defined-radio, frequency-modulation", "url": null }
neuroscience, cell-membrane, action-potential I totally get the main takeaway, that Vm results from the net accumulation of ion gradients, rather than the immediate consequences of the ion pumps. But I'm unclear on the phrase large cells -- whose surface-to-volume is so large that ion gradients run down slowly. Presumably a cell with a large surface-to-volume ratio, like a long thin neuron, would have many ion channels which leak constitutively. So I'd expect the net ion conductance to be high, and gradients would run down quickly. But that contradicts the book's run down slowly point, so I'm confused. Does passive diffusion play a role here? A long, thin cell would have slow passive ion diffusion, so is that why Vm would run down slowly? Am I overthinking this? What is the authors' point here? In a typical neuron at rest, potassium is high inside the cell and low outside, with the opposite true for sodium. The membrane is mostly permeable to potassium. Let's ignore the other ions.
{ "domain": "biology.stackexchange", "id": 9526, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, cell-membrane, action-potential", "url": null }
• @trueblueanil - Exactly! – brilliant Jul 29 '16 at 15:34 • When the first person draws, 1 out of the 30 lots are going to have an "X" on it. Thus his odds of drawing the "X" are 1/30 . The second person draws from a pool of 29 lots. Thus the probability that he chooses an "X" is 1/29 , iff the first person did not draw an "X". The probability that the first person does not draw an "X" is 29/30 since there are 29 lots without an "X" on it when he draws. Thus Person 2's probability of drawing an X is (29/30)*(1/29) = 1/30 . Does that help? – Ninja_Coder Jul 29 '16 at 15:37 • @brilliant Which becomes obvious if you think about the opposite side. What is the probability of drawing anything other than the ace of spades? Well, there are 51 cards that aren't the ace of spades, and only 1 that is. By your logic the probability would be 51/1, but it should be 51/52. – Paulpro Jul 29 '16 at 15:48
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.988491850596674, "lm_q1q2_score": 0.8362072072729823, "lm_q2_score": 0.845942439250491, "openwebmath_perplexity": 383.3412133618312, "openwebmath_score": 0.9261120557785034, "tags": null, "url": "https://math.stackexchange.com/questions/1875045/is-this-lot-drawing-fair/1875053" }
complexity-theory, np-complete $$ 40eN \leq N(N-1)(N-2). $$ This condition is satisfied for $N \geq 12$. We conclude that for $N \geq 12$, the required permutation always exists. Using the recent constructive version of LLL, we can even find it efficiently.
{ "domain": "cs.stackexchange", "id": 1182, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, np-complete", "url": null }
fluid-dynamics, experimental-physics, fourier-transform, fluid-statics, statistics By making a measurement many, many times and averaging them (ie. ensemble averaging), you eliminate most of those perturbations in your initial and boundary conditions. That means that whatever small changes that lead to chaotic flows will usually all average out, and you are left with a "true" representation of the flow based on the expected values of the initial and boundary conditions.
{ "domain": "physics.stackexchange", "id": 49627, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, experimental-physics, fourier-transform, fluid-statics, statistics", "url": null }
finite-automata, regular-expressions Title: How to convert DFA to regex with State Elimination I can do the very simple transitions but it gets difficult when you have transitions jumping over 1 or more states. I have this difficult DFA i need help converting to RE: using STATE ELIMINATION if you could explain ripping state q1 from the DFA it would help a lot If we're talking about the same Elimination problem then you should add an accept state and a start state. In addition, I allowed myself to disregard state $q_b$ as it never part of the language. The start state will replace $q_0$. The accept state will replace $q_9$. Then to your request, we'll do the rest, starting from $q_1$. From $q_1$ you either have 0 endless times or a 1 in other words, $0^* \cup1$ from $q_1$ to $q_2$. Let us now rip $q_3$: from $q_2$ to $q_4$ you'll need 01. While from $q_4$ to $q_1$ you'll need 00.
{ "domain": "cs.stackexchange", "id": 11953, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "finite-automata, regular-expressions", "url": null }
python, pygame images = load_images() # timer for adding new pipes pygame.time.set_timer(EVENT_NEWPIPE, PIPE_ADD_INTERVAL) pipes = [] steps_to_jump = 2 score = 0 done = paused = False while not done: for e in pygame.event.get(): if e.type == QUIT or (e.type == KEYUP and e.key == K_ESCAPE): done = True break elif e.type == KEYUP and e.key in (K_PAUSE, K_p): paused = not paused elif e.type == MOUSEBUTTONUP or (e.type == KEYUP and e.key in (K_UP, K_RETURN, K_SPACE)): steps_to_jump = BIRD_JUMP_STEPS elif e.type == EVENT_NEWPIPE: pp = random_pipe_pair(images['pipe-end'], images['pipe-body']) pipes.append(pp) clock.tick(FPS) if paused: continue # don't draw anything for x in (0, WIN_WIDTH / 2): display_surface.blit(images['background'], (x, 0))
{ "domain": "codereview.stackexchange", "id": 9328, "lm_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, pygame", "url": null }
graphs, approximation, partitions, dag, minimum-cuts Title: Path graph partitioning, minimizing cut while minimizing maximum total node weight in each part Suppose there is a path (linear) graph $G = (V, E)$ where $V = \{0, \ldots, n - 1\}$ and $E=\{(0, 1), (1, 2), \ldots, (n - 2, n - 1)\}$, with edge weights $w_e : E \to \mathbb{N}$ and vertex weights $w_v : V \to \mathbb{N}$. Let $\lambda$ be a known constant. We need to find an exact cover $C \subseteq \mathbb{P}(V)$ of $V$ (with $\iota : V \to C$ being the associated injection) such that each $p \in C$ is a contiguous subset (interval) in $\mathbb{N}$ and $$\lambda \left( \sum_{\iota(i) \neq \iota(j)} w_e(i, j) \right) + (1 - \lambda) \left( \max_{p \in C} \sum_{v \in p} w_v(v) \right)$$ is minimized. In other words, we are trying to minimize a convex combination of the sum of the edge weights of the cut edges and the maximum total node weight for each part.
{ "domain": "cs.stackexchange", "id": 18116, "lm_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, approximation, partitions, dag, minimum-cuts", "url": null }
ros Title: 'String' object has no attribute 'splitlines' I'm trying to parse the output of ros_caffe and republish this in a format ready for speaking. Simon Birrell's node filter_caffe does this but I'm getting the error in the headline. https://github.com/SimonBirrell/filter_caffe import sys print print sys.path print import rospy from filter_caffe import filter_caffe_message from std_msgs.msg import String Pub = 0 def received_caffe_message(data): global Pub filtered_message = filter_caffe_message(data) if filtered_message: Pub.publish(filtered_message) rospy.loginfo(filtered_message) else: rospy.loginfo("No good hit.")
{ "domain": "robotics.stackexchange", "id": 27488, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
gravity Title: In the process of Bel-robisons tensor: identity for $R_{amnk} R_{b}^{\phantom{b}mnk} = \frac{1}{4} g_{ab} R_{dmnk} R^{dmnk}$ Recently, i an starting to study some subject related with Bel-Robinson tensor. In the process of computing its some basic properties i noticed i need to prove following identity which holds on vacuum. $R_{amnk} R_{b}^{\phantom{b}mnk} = \frac{1}{4} g_{ab} R_{dmnk} R^{dmnk}$ or equivalently $g_{ab} R_{\mu \lambda \sigma \tau} R_{\nu}^{\phantom{a} \lambda \sigma \tau} = g_{\mu\nu} R_{a\lambda \sigma \tau} R_{b}^{\phantom{b} \lambda \sigma \tau}$ Can you give me some idea to compute above identity? Starting from \begin{align} R_{almn} R_{b}^{\phantom{\b} lmn} = g_{ab} A \end{align} This can be constructed by considering free index and symmetric properties. Thus by contraction we obtain coefficients $A$ For $D=4$, $g_{ab} g^{ab}=4$, thus $A= \frac{1}{4} R_{dlmn}R^{dlmn}$
{ "domain": "physics.stackexchange", "id": 36909, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity", "url": null }
thermodynamics, cooling And final note: If a ceiling fan doesn't heat up the area, is there a practical instance where some source of wind would 'wick' away enough heat to actually heat the medium the wind is occurring in? If the air is stationary, the air near your body will heat up to (about) body temperature, reducing your heat loss. If the air is moving, you will lose more heat to the air, which will raise the average temperature of all the air in the room. However, if the air is moving the air comes into better contact with the walls, losing more heat. At the level of this experiment it is not fair to assume the air in the room is isothermal. It is hard to see which effect is greater. I suspect you are correct that the average temperature will rise with a fan, but the temperature you experience will fall.
{ "domain": "physics.stackexchange", "id": 61343, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, cooling", "url": null }
ros, moveit, ros-melodic, move-group Title: FK without using moveit service Is there a better way to determine forward kinematics for a given joint pose without having to go through MoveIt's FK service? I'm finding I need to call the FK service faster than it's compute time (around 20 ms for me). I don't think using tf2 is an option, as it will give me the current robot joint state. What I'm looking for is, essentially, a way to use the URDF/robot model to make a fk call with joint angles of my choosing, similar to how it can be done with the moveit service. I found this on the moveit tutorials, which on the surface looks like I'd need to create a "dummy" robot kinematic state and update it's state with my desired joint angles, and then call the getGlobalLinkTransform as indicated. I looked around the moveit repo, and couldn't find where this service even originates. When I load up moveit, a rosservice info /compute_fk says it's launched by move_group but I couldn't find anywhere in there that showed how this was called.
{ "domain": "robotics.stackexchange", "id": 36105, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, ros-melodic, move-group", "url": null }
This is what logarithmic differentiation is for. You start with writing the function as an equation $$y = (x + 1)^{2x},$$ then take the natural log of both sides: $$\ln y = \ln\left[(x + 1)^{2x}\right] = 2x \ln(x+1).$$ We then implicitly differentiate both sides with respect to $$x$$. By chain rule (remember, $$y$$ is a function of $$x$$), the left side comes to $$\frac{1}{y} \cdot y'.$$ The right side can be differentiated as normal: $$\frac{2x}{x + 1} + 2\ln(x + 1).$$ So, \begin{align*} &\frac{1}{y} \cdot y' = \frac{2x}{x + 1} + 2\ln(x + 1) \\ \implies \, &y' = y\left(\frac{2x}{x + 1} + 2\ln(x + 1)\right) \\ \implies \, &y' = (x + 1)^{2x}\left(\frac{2x}{x + 1} + 2\ln(x + 1)\right). \end{align*}
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105307684549, "lm_q1q2_score": 0.8198411195981915, "lm_q2_score": 0.8397339716830605, "openwebmath_perplexity": 197.3303585016941, "openwebmath_score": 0.9748504161834717, "tags": null, "url": "https://math.stackexchange.com/questions/3353508/what-is-the-derivative-of-a-function-of-the-form-uxvx" }
frequency, doppler, position, timing Title: A-GPS frequency (fd) search ranges A-GPS is able to reduce the fd search range from several kHz (GPS search range) to several hundred Hz (a-GPS search range). I know the GPS search range has a center at 0 Hz. What is the center frequency with the reduced A-GPS search range? I got an impression that this A-GPS frequency search center shouldn't be located at 0 Hz. Instead, it should be the assumed initial fd value. A-GPS will give you ephemeris data. That will be used to update your initial guess for the frequency of the downlink signal, indeed. The relevant remaining uncertainty is in the local oscillator of the GPS receiver itself. And that can be large compared to Dopplers! So, yes, assuming the frequency probability density to be symmetrical convex around the nominal frequency, that would put an ML estimator at the doppler frequency.
{ "domain": "dsp.stackexchange", "id": 8974, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "frequency, doppler, position, timing", "url": null }
If anyone could help me or give me hints , I would be grateful. • Is the first entry supposed to be a $2$? I'm not sure what the pattern is. – Elliot G Feb 22 '18 at 19:23 • are you sure about the 1 in the first row and first column in your matrix. – Surb Feb 22 '18 at 19:35 • Yes I'm pretty sure since if you multiply the matrix A by the column matrix containing $x_1$ to $x_{100}$ you'd get the system given in part $A)$ – Raku Feb 22 '18 at 19:42 Here is a "brute-force" method. Looking at some small dimension examples, it is clear how to construct the inverse. It is good to notice that $A$ is symmetric, and so its inverse is also symmetric. Let $$B=\begin{bmatrix} 100&99&98&97&\cdots&2&1\\ 99&99&98&97&\cdots&2&1\\ 98&98&98&97&\cdots&2&1\\ 97&97&97&97&\cdots&2&1\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 1&1&1&1&\cdots&1 \end{bmatrix}$$ Now, when we do $BA$, we need to look at the three kinds of columns $A$ has:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.976310530768455, "lm_q1q2_score": 0.8071274242091983, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 206.1977654228186, "openwebmath_score": 0.9790522456169128, "tags": null, "url": "https://math.stackexchange.com/questions/2662213/calculating-the-inverse-of-a-matrix" }
newtonian-mechanics, torque, power The maximum power is usually achieved near the highest rated RPM for the engine, but since you normally don't drive the car near the max RPM, this figure by itself is less useful for the non-racing driver than looking at the torque curve I think. The maximum torque is usually achieved at a lower RPM so just getting that parameter (and the RPM it relates to) could be more useful actually. You might be able to estimate that a car with a higher maximum power might have a higher torque at relevant RPMs of course so it's still useful for quick comparisons. In a turbo engine (like the 335i engine above) the maximum torque will be very quickly achieved at low RPMs and it will then stay flat through a long range; this is where you typically will be driving the car between gearshifts and this is what will give you the "oomph". A non-turbo engine will have a more gradually increasing torque curve.
{ "domain": "physics.stackexchange", "id": 26504, "lm_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, torque, power", "url": null }
slam, computer-vision Title: Why do we need a marginalization in Bundle Adjustment? A common practice in Bundle Adjustment is to reduce the state dimension by marginalizing structure or pose states to improve the optimization speed. In case 3d points(structure) $\textbf{p}_i$ are marginalized out as follows, $\textbf{p}_i$ are triangulated to calculate residual $\textbf{e} $. $\textbf{e} = \textbf{z}_{ij} - \pi(\textbf{T}_j\textbf{p}_i)$ where $\textbf{T}_j\in SE(3), \textbf{p}_i\in R^3$ are the states we want to estimate and $\textbf{z}_{ij}$ is the observed feature in $R^2$. And just optimize the pose related terms only. $\begin{bmatrix} \textbf{H}_{cc}& \textbf{H}_{cs} \\ \textbf{H}_{sc} & \textbf{H}_{ss} \end{bmatrix} \begin{bmatrix} \mathbf{\xi}_c \\ \textbf{p}_s \end{bmatrix}= \begin{bmatrix} \textbf{g}_{c} \\ \textbf{g}_{s} \end{bmatrix}$ $\bar{\textbf{H}}_{cc}=\textbf{H}_{cc}-\textbf{H}_{cs}{\textbf{H}_{ss}}^{-1}\textbf{H}_{sc}$
{ "domain": "robotics.stackexchange", "id": 1657, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, computer-vision", "url": null }
cpu Title: Why does the explanation of auxiliary carry flag differ from the article to article? These two images are from Google search. AUXILIARY CARRY FLAG: This flag is set to a 1 by the instruction just ending if a carry occurred from bit 3 to bit 4 of the A Register during the instruction’s execution Explanation from Quora It indicates when a carry or borrow has been generated out of the least significant four bits of the accumulator register following the execution of an arithmetic instruction. It is primarily used in decimal (BCD) arithmetic instructions. Explanation from Wikipedia These two different definitions really confuses me. As I experimented this on Keil using 8051, and it showed that AC is set when the carry occurs out of four low bits. What is the precise definition? The two definitions are exactly the same. Don't forget that in computer science, we often start counting things at zero rather than at one.
{ "domain": "cs.stackexchange", "id": 12283, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cpu", "url": null }