text
stringlengths
1
1.11k
source
dict
javascript, jquery, html, css // Selects current item without closing the dropdown if(event.which == SPACE_KEY) { var temp_hex_selection = $(HEX_SELECTION); for(var i = 0; i < temp_hex_selection.length; i++) { if($(temp_hex_selection[i]).is(":focus")) { var selector = $(temp_hex_selection[i]).closest(HEX_SELECTOR); if(selector.hasClass(ACTIVE)){ selectItem(selector.find("."+CURRENT), selector); } } } }
{ "domain": "codereview.stackexchange", "id": 13119, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, html, css", "url": null }
performance, mysql, sql Title: Performance problem: Ranking with ties and skipping rows on passmark condition I am using the following code for calculating ranking and it is working great for not large data. But when it comes to large data, processing time takes almost a minute. Please can anyone suggest a better way or atleast a faster way to put the same mysql statement? SELECT id, Names, TOTALSCORE, Rank FROM ( SELECT t.*, IF(@p = TOTALSCORE, @n, @n := @n + 1) AS Rank, @p := TOTALSCORE FROM( SELECT id, Names,SUM(score) TOTALSCORE FROM exam e1, (SELECT @n := 0, @p := 0) n WHERE NOT EXISTS( SELECT null FROM exam e2 WHERE e1.id = e2.id AND e2.score/e2.Fullmark < 0.33 ) GROUP BY id ORDER BY TOTALSCORE DESC ) t ) r ;
{ "domain": "codereview.stackexchange", "id": 6362, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, mysql, sql", "url": null }
python, beginner, symbolic-math print("The answer is:", abs(exp*cf), "x^", (exp-1)) elif cf==0: print("The answer is:", 0) elif cf<0: print("THe answer is:", cf*exp, "x^", (exp-1)) derivative() Trust the math. If exp<0 and cf<0, their product will be positive, so abs is redundant. BTW, in case of elif exp < 0, call to abs leads to an incorrect answer. In any case, \$(ax^n)'\$ always equals to \$anx^{n-1}\$. Mathematically speaking there are no special cases. There are special cases when it comes to printing:
{ "domain": "codereview.stackexchange", "id": 25485, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, symbolic-math", "url": null }
ros, ecto Title: How to detect mouse input in ecto? Hello Ecto Gurus, I have run through the various parts of the Ecto Kitchen (very cool!) and have succeeded in getting basic feature detection to work using both a webcam and a Kinect. I would like to be able to select rectangular regions on an imshow window with a mouse and use the selected region as a mask for feature detection. This is something that can be done with OpenCV using the SetMouseCallback() function. I tried that alongside the ecto code in my Python script, but it doesn't seem to fire when clicking and dragging on the ecto imshow window. Is there a way to do this? I see the 'trigger' parameter for keyboard input but I'm not sure if this can be adapted for mouse input. Thanks! patrick
{ "domain": "robotics.stackexchange", "id": 8396, "lm_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, ecto", "url": null }
php, mvc, template, url-routing, mustache Properties This is not a functionality suggestion, but one of legibility, which is equally important, if not more so. If you group like properties/methods together and use whitespace to separate them then it will make it much easier to find what you are looking for. For instance: protected $info; //etc... private $is_routed; //etc... public $data //etc... Going along with the above suggestion, you can then also reuse an access modifier. Though I seem to be one of the minority in this regard. So this is subjective. protected /*Also, doccomments*/ $ifo = array(), /*are fine here too*/ $cli = FALSE, //etc... ;
{ "domain": "codereview.stackexchange", "id": 2572, "lm_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, mvc, template, url-routing, mustache", "url": null }
ros, rosbag, images Originally posted by Daniel Stonier with karma: 3170 on 2013-11-24 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by thesir on 2013-11-24: Muchas Gracias, amigo! I should have looked inside the launch file before I came in here, haha. I also set the argument depth_registration to true, because I needed it as well. Now everything's working just fine! Thank you so much! Comment by Henschel.X on 2016-04-06: I followed the answer to copy code from amcl_demo.launch and set false to true, but when I roslaunch my new launch file, it just gives me warnning, "waiting transform from......". Have you met this situation?
{ "domain": "robotics.stackexchange", "id": 16158, "lm_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, rosbag, images", "url": null }
quantum-mechanics, atomic-physics, schroedinger-equation, dimensional-analysis, hydrogen Title: Hydrogen atom and scale transformation for radial variable While solving Schrödinger equation for Hydrogen atom we make a scale transformation for radial variable ($r=\frac{ax}{Z}$; where $a=$ Bohr radius, $x=$ dimensionless variable and $Z=$ atomic number), this turns out to be a very good scale transformation. But my question is how do we know value of Bohr radius in advance, before solving Schrödinger equation? Do we just use Bohr radius that we got from Bohr theory? If we do use Bohr radius from Bohr theory then why is so because it is a classical theory? this turns out to be a very good scale transformation.
{ "domain": "physics.stackexchange", "id": 68257, "lm_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, atomic-physics, schroedinger-equation, dimensional-analysis, hydrogen", "url": null }
javascript, jquery, performance, plugin // Show the slider if hidden $element.css({ opacity : 1 }); could be // Apply the height to the UL and show the slider $element.css({ height : ulH + "px", opacity : 1 });
{ "domain": "codereview.stackexchange", "id": 10054, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, performance, plugin", "url": null }
classical-mechanics, lagrangian-formalism, coordinate-systems, constrained-dynamics Is it always possible to choose initial coordinates in such a way that all constraints satisfy the conditions of the implicit function theorem? If so, is there a systematic way of finding them? If not, is it still possible to describe the global motion of the system using the Lagrangian? Generally speaking, given a set of coordinates $x_1,\ldots,x_N$ under a set of $h=N-n$ holonomic constraints of the form $F_j(x_1,\ldots,x_N)=0$, you won't be able to find a subset $x_1,\ldots,x_n$ of your original coordinates that will function globally as generalized coordinates: the implicit-function theorem tells you that locally you are guaranteed such a subset, but in general that subset won't work everywhere.
{ "domain": "physics.stackexchange", "id": 45898, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, lagrangian-formalism, coordinate-systems, constrained-dynamics", "url": null }
quantum-field-theory, special-relativity, vectors, invariants $$ \int \mathrm d^4p \delta^4(p^\mu - q^\mu) f(p^2) = f(q^2)$$ The cheapskate explanation is that since $\mathrm d^4p$ and $f(p^2)$ are invariant, as is $f(q^2)$, so must be $\delta^4(p^\mu - q^\mu)$. But this can be seen more explicitly as well. Let us perform a Lorentz transformation on the left hand side of the above equation: $$\int\mathrm d^4p \delta^4(p^\mu - q^\mu) f(p^2) \to \int \mathrm d^4 p' \delta^4({\Lambda^\mu}_\nu (p^\nu - q^\nu)) f(p^2)$$ Here I already used that the measure picks up a factor of the determinant of the transformation but $\vert \Lambda \vert = 1$ for Lorentz transformations. We can then use that $\delta(\alpha x) = \delta(x) \frac{1}{\vert \alpha \vert}$, which also works for matrices (check that, it's a good excercise!) - where for matrices the $\vert \cdot \vert$ is the determinant. So $\delta^4({\Lambda^\mu}_\nu (p^\nu - q^\nu)) = \frac{1}{\vert \Lambda \vert} \delta^4(p^\nu - q^\nu) = \delta^4(p^\mu - q^\mu)$.
{ "domain": "physics.stackexchange", "id": 17874, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, special-relativity, vectors, invariants", "url": null }
c++, algorithm, c++20 NelderMead(ErrorFunction errorFunction, FunctionParameters initial, double minError, double initialEdgeLength, double shrinkCoeff = 1, double contractionCoeff = 0.5, double reflectionCoeff = 1, double expansionCoeff = 1) : errorFunction(errorFunction), minError(minError), shrinkCoeff(shrinkCoeff), contractionCoeff(contractionCoeff), reflectionCoeff(reflectionCoeff), expansionCoeff(expansionCoeff), worstValueId(-1), secondWorstValueId(-1), bestValueId(-1) { this->errors = std::vector(nDims + 1, std::numeric_limits<double>::max()); const double b = initialEdgeLength / (nDims * SQRT2) * (sqrt(nDims + 1) - 1); const double a = initialEdgeLength / SQRT2; this->values = initial.replicate(nDims + 1, 1);
{ "domain": "codereview.stackexchange", "id": 42713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, c++20", "url": null }
moveit Comment by AndyZe on 2021-10-20: They are making some suggestions. Removing CLANG_TIDY: pedantic does fix it. I'll try a better way. We finally found a solution that works for the clang compiler. It involved:
{ "domain": "robotics.stackexchange", "id": 37016, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "moveit", "url": null }
Prove it is a circle So I have this question: Let $Q = (4, 8)$, $R = (6, 8)$ and $P = (a, b)$. Let $\lambda\in\mathbb R$ with $0 < \lambda < 1$. Consider $C =\{P: |QP| = \lambda|RP|\}$ Give an equation to $C$ and prove its a circle. I'm trying to figure out how to interpret the $\lambda$ symbol to come up with the an expression for $C$, which I have to prove is a circle. I did work out the distances $PQ$ and $QR$, the $\lambda$ symbol is just puzzling me. I tried to fix $\lambda$ and divide the two distance equations, but it leads me nowhere. Can anyone give me some directions?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676454700793, "lm_q1q2_score": 0.8054720853611917, "lm_q2_score": 0.8221891261650247, "openwebmath_perplexity": 257.8309468036801, "openwebmath_score": 0.8260721564292908, "tags": null, "url": "http://math.stackexchange.com/questions/316708/prove-it-is-a-circle" }
python Here's another example: if dir != 'n': if cursor_pos[0] != 0 and dir == 'L': cursor_pos[0] -= 1 elif cursor_pos[0] != 9 and dir == 'R': cursor_pos[0] += 1 elif cursor_pos[0] == 0 and dir == 'L': cursor_pos[0] = 9 elif cursor_pos[0] == 9 and dir == 'R': cursor_pos[0] = 0 This just isn't very good code. First, you're checking if dir != 'n' but inside the block, every conditions checks the value of dir again! So that outer check isn't needed. Second, you have two different cases for handling the L and R directions, and the two cases are separate. Finally, you have just enough complexity that it deserves some functions: if dir == 'L': cursor_pos = move_l(cursor_pos) elif dir == 'R': cursor_pos = move_r(cursor_pos) 3. Don't use built-in functions or types as variable names: Don't do this: def changeVal(dir, cursor_pos, cs, vs): ch = (len(cs) - 1) - cursor_pos[0] if dir == "D":
{ "domain": "codereview.stackexchange", "id": 33615, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
quantum-mechanics, hilbert-space, quantum-information, hamiltonian, interactions Title: Can any Hamiltonian be expressed as a sum of free and pair-interaction terms? Consider a number of systems $\{S_i\}$ with a Hilbert space $\mathcal{H}=\otimes_i\mathcal{H}_{S_i}$. Consider an arbitrary Hamiltonian $H$ defined on this Hilbert space. Can this arbitrary Hamiltonian be defined as a sum of free and pair-interaction terms? A free term is one which acts as the identity on all Hilbert subspaces $\mathcal{H}_i$ but one $\mathcal{H}_k$: $$H_{free}= \otimes_{i\neq k} 1_{S_i} \otimes H_{S_k}$$ An interaction term is one which as the identity on all Hilbert subspaces, but two subspaces ($\mathcal{H_j \otimes H_k}$), and cannot be written as a sum of free terms: $$H_{int}= \otimes_{i\neq j, k} 1_{S_i} \otimes H_{S_j \cup S_k}$$ Note: I am only interested in non-relativistic Quantum Mechanics. No, this is not possible, as can be seen immediately by parameter counting.
{ "domain": "physics.stackexchange", "id": 97870, "lm_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, hilbert-space, quantum-information, hamiltonian, interactions", "url": null }
ros, python, gui What I would really appreciate is to have all the callbacks to the GUI elements in a separate class. If there is a possible to mix the functionalities of the Node class and the QMainWindow together, I would love it the most.
{ "domain": "robotics.stackexchange", "id": 37275, "lm_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, python, gui", "url": null }
c++, algorithm, c++11, time-limit-exceeded, k-sum But I slightly modified the main function for you to know what the program is trying to achieve. Not quite right First off, you're checking every cross pair of indices against each other. But that means that findTwoSum({1, 3, 4}, 6) will succeed, even though there is no pair of elements that sum to 6 - because you count the 3 twice. You need: "any two distinct elements". Iterating over vectors list is a confusing name for a vector. increment is a poor variable name for this - since it's not incrementing anything, it's just another index, so you really should use i and j instead. Also you don't need at() - that member function does range checking. But your indices will all definitely be in range, so you could simply write: for (size_t i = 0; i < v.size(); ++i) { for (size_t j = i+1; j < v.size(); ++j) { // correcting initial bug if (v[i] + v[j] == target) { return std::make_pair(i, j); } } } return std::make_pair(-1, -1);
{ "domain": "codereview.stackexchange", "id": 19911, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, c++11, time-limit-exceeded, k-sum", "url": null }
c++, c++11, adventure-game struct LocationData { Plane plane; std::string description; // ... }; std::map<Location, LocationData> locData = { { FORGOTTEN_REALMS, { MATERIAL_PLANE, "You wander in the Forgotten Realms." } }, { FAERUN, { MATERIAL_PLANE, "You are welcomed in Faerun." } }, { WATERDEEP, { MATERIAL_PLANE, "You explore Waterdeep." } }, { PAZUNIA, { ABYSS, "You climb among the crags of Pazunia." } }, { DRILLERS_HIVES, { ABYSS, "You skulk among the Drillers' Hives." } }, { FORGOTTEN_LAND, { ABYSS, "You search the Forgotten Land." } }, { GRAND_ABYSS, { ABYSS, "You fall swiftly through the Grand Abyss." } }, }; Now we can express things such as newGame(); assert(player.location == GRAND_ABYSS); assert(locData[player.location].plane == ABYSS); player.location = FAERUN; // travel to a new location assert(locData[player.location].plane == MATERIAL_PLANE);
{ "domain": "codereview.stackexchange", "id": 15238, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, adventure-game", "url": null }
discrete-signals, estimation Title: Deriving the CRLB for an active system with non-square shaped bandwidth I'm attempting to calculate the CRLB for a bandlimited time-delay system which has a triangular shaped signal spectrum, instead of the usual square one. Currently I'm working on an active system. Following the procedures done by Quazi et al. in "An overview on the time delay estimate in active and passive systems for target localization", I can reach two different results. The first one, using his calculations for a High SNR, active system, don't really match my data, while the second one, computing for a Passive system and considering a $2$ factor (as he explains after equation 23) due to only one of the sources being contaminated by noise (which makes intuitive sense to me, as long as the SNR is high), actually fits my data very well. As such, I am assuming I'm doing the first set of calculations wrong, and I was hoping some of you could help me spot my mistake. So here goes, for both the calculations
{ "domain": "dsp.stackexchange", "id": 5961, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, estimation", "url": null }
c#, design-patterns /// <summary> /// Inserts the specified entity. /// </summary> /// <param name="entity">The entity.</param> void Save( T entity ); /// <summary> /// Inserts the entity or updates it if it already exists. /// </summary> /// <param name="entity">The entity.</param> T SaveOrUpdate( T entity ); /// <summary> /// Updates the specified entity. /// </summary> /// <param name="entity">The entity.</param> /// <returns></returns> T Update(T entity); /// <summary> /// Deletes the specified entity from the data source. /// </summary> /// <param name="entity">The entity.</param> void Delete(T entity); /// <summary> /// Deletes the entity with the specified id. /// </summary> /// <param name="id">The id.</param> void Delete(TId id); }
{ "domain": "codereview.stackexchange", "id": 460, "lm_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#, design-patterns", "url": null }
entropy Title: Entropy as Sum of Kinetic Energy? Is it possible to view entropy as the sum of the kinetic energy of all molecules in the system? Since a system with 0 entropy would have 0 motion, and as you increase the motion of the molecules, entropy increases as well. If not, could you provide a simple counterexample in which entropy does not make sense as the sum of kinetic energy? In a crystal lattice, there are two contributions to the entropy: the vibrational entropy and the configurational entropy. The first is related to the kinetic energy; atoms with higher kinetic energies have tend to have larger displacements from equilibrium, and have a larger "footprint" in phase space, resulting in a higher entropy. The second contribution, configurational entropy, arises from disorder in the crystal lattice, namely the number of ways of arranging the atoms. In a perfect crystal, there is only one way, so the configurational entropy ($k\ln W$) will be 1.
{ "domain": "chemistry.stackexchange", "id": 7418, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "entropy", "url": null }
quantum-field-theory, particle-physics, experimental-physics You mainly get jets with more massive particles decaying, since there has to be enough energy available to produce multiple hadrons. Decay modes that produce jets will have either free quarks or free gluons listed in the final state. Since colored is confined, this always implies the formation of a jet. For instance, the top quark decays like $\rm t\rightarrow bW$, which will be observed as a jet and whatever the $\rm W$ decays into.
{ "domain": "physics.stackexchange", "id": 45968, "lm_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, particle-physics, experimental-physics", "url": null }
newtonian-mechanics, rotational-dynamics, reference-frames, rigid-body-dynamics, moment-of-inertia For an example, consider a uniform solid cylinder (radius $r$, height $h$) rolling without slipping at a constant velocity $v > 0$. I could consider the axis along the axial direction of the cylinder through the center of mass and obtain $$ I = \frac{1}{2}mr^{2}. $$ We can consider $(1)$ with $\omega = v/r\ne 0$ with no issues. But couldn't I also consider a perpendicular axis oriented, say, vertically and through the center of mass? In that case, $$ I' = \frac{1}{12}m(3r^{2} + h^{2}). $$ This is clearly different, and as the cylinder rolls, I would expect the angular velocity to be $\omega\,' = 0$. Wouldn't this change the result in $(1)$? The expression you chose has a scalar $\omega$ as opposed to the (bi)vectorial quantity $\vec\omega$. Now, since you have stated that it is $I$ is the moment of inertia about its centre of mass
{ "domain": "physics.stackexchange", "id": 95330, "lm_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, rotational-dynamics, reference-frames, rigid-body-dynamics, moment-of-inertia", "url": null }
gazebo, ros-melodic Title: Changing Joint from Fixed to Revolute Breaks TF Hello guys, I'm fairly new to ROS and still learning. I've been struggling with this problem for a while, and I can't seem to solve it. I've dug through countless ROS Answers, but can't seem to find the solution. I'm running through the URDF Tutorial and finished it. This is as in, if I run the last 13-diffdrive.launch all starts up correctly. To prove to myself that I know how it works, I attempted to make R2D2's legs also rotate at his shoulders, by changing the joint from fixed to revolute, which also requires a few additional changes as well. So first what I did was change the following in the *.urdf.xacro file: <joint name="base_to_${prefix}_leg" type="fixed"> <parent link="base_link"/> <child link="${prefix}_leg"/> <origin xyz="0 ${reflect*(width+.02)} 0.25" /> </joint>
{ "domain": "robotics.stackexchange", "id": 34700, "lm_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, ros-melodic", "url": null }
java, game, android public final String symbol; public Field(String symbol) { this.symbol = symbol; } } Why are Enums awesome? They are fully comparable. We can now have a Field[][] instead of an char[][] for our board – but with full type safety! When coerced to a string, it produces its name: System.out.println(Field.EMPTY) is EMPTY. When printing out the Board, we can directly access the symbol in each instance: for (Field[] row : board) { for (Field f : row) { sb.append(f.symbol).append(" "); } sb.append("\n"); } This is nicer than your Location.isEmpty(board[y][x]) test – which by the way is now boardInstance.at(someLocation) == Field.EMPTY. You will probably also want enum Side { BLACK(Field.BLACK), WHITE(Field.WHITE); public final Field field; public Side(Field f) { field = f; } public Side otherSide() { switch (this) { case BLACK: return WHITE; default: return BLACK; } } }
{ "domain": "codereview.stackexchange", "id": 4927, "lm_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, game, android", "url": null }
# iterated harmonic numbers vs Riemann zeta Define the $m$-th iterated harmonic sums in the manner: $\bar{H}_0(n):=1$ and for $m\geq1$ by $$\bar{H}_m(n):=\sum_{k=1}^n\frac{\bar{H}_{m-1}(k)}k.$$ For example, $\bar{H}_1(n)=\sum_{k=1}^n\frac1k$ are the familiar harmonic numbers. Euler proved that $$\frac12\sum_{n\geq1}\frac{\bar{H}_1(n)}{n^2}=\zeta(3).$$ Hoping for a natural generalization, I ask: Question 1. Is this true? If so, any proof? $$\frac1{m+1}\sum_{n\geq1}\frac{\bar{H}_m(n)}{n^2}=\zeta(m+2).$$ Of course, this works for $m=0$ as well: $\frac1{0+1}\sum_{n\geq1}\frac{\bar{H}_0(n)}{n^2}=\zeta(2)$. Question 2. This might be of auxiliary interest. Any proof? $$\bar{H}_m(n)=\sum_{k=1}^n\frac{(-1)^{k-1}}{k^m}\binom{n}k.$$
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137910906878, "lm_q1q2_score": 0.8246303331627589, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 610.7063240209214, "openwebmath_score": 0.8738951683044434, "tags": null, "url": "https://mathoverflow.net/questions/272492/iterated-harmonic-numbers-vs-riemann-zeta" }
go, web-services That's it, all done. 2. Marshalling unexported fields. Yes, this is possible, but I'd strongly advise against it. However, here's a couple of ways to do it. In both cases, we're relying on the fact that golang supports a JSON Marshaller and Unmarshaller interface out of the box. type User struct { id string name string country string score int } // manually creating a map func (u User) MarshalJSON() ([]byte, error) { data := map[string]interface{}{ "id": u.id, "name": u.name, "country": u.country, "score": u.score, } return json.Marshal(data) } // now with some pointer magic... mimics the omitempty tag func (u User) MarshalJSON() ([]byte, error) { data := map[string]interface{}{ "id": &u.id, "name": &u.name, "country": &u.country, "score": &u.score, } return json.Marshal(data) }
{ "domain": "codereview.stackexchange", "id": 34500, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "go, web-services", "url": null }
This was my approach to solve this problem x y z is the three digit number. Unit digit z has 4 choices (1, 3, 5 and 7), y has 7 choices (0, 1, 3, 5, 2, 4, 6 leaving out 7 with the assumption that it is the number chosen for the unit digit.) and x has 2 choices (8 and 9). Of course multiplying these choices does not lead to any of the answer choice. _________________ Support GMAT Club by putting a GMAT Club badge on your blog Math Expert Joined: 02 Sep 2009 Posts: 34112 Followers: 6106 Kudos [?]: 76860 [0], given: 9992 Re: odd 3 digit integers [#permalink] ### Show Tags 24 Aug 2010, 06:07 Expert's post ezhilkumarank wrote: Bunuel, Why did you split up the three digit number into two different subsets and then proceed to solve the problem. Is there some subtle logic behind this. This was my approach to solve this problem
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9343951698485603, "lm_q1q2_score": 0.8118275415652301, "lm_q2_score": 0.8688267745399465, "openwebmath_perplexity": 3002.4441263741774, "openwebmath_score": 0.5458068251609802, "tags": null, "url": "http://gmatclub.com/forum/how-many-odd-three-digit-integers-greater-than-800-are-there-94655.html" }
homework-and-exercises, electric-circuits, electrical-resistance Another thing I remember is adding inverses always amounts to the product over the sum: (1/R1 + 1/R2 + 1/R3 + ...)^-1 = R1R2R3.../R1+R2+R3... } this is a relationship seen in many areas of physics, most notably (imo) for the reduced mass of a system, which can make many calculations much simpler. Since other people have basically already answered your question (the angle reveals the length), I thought I would give my two cents, I hope it moves your studying along a bit faster. Also, unless I missed something too, I think the lower length should be 5 pi/3. If the path from A to B is a circle, then depending on how you write your fractions, the sum should be 6 pi / 3 or 2 pi. Does this also suggest how, simple as it may be, one of my suggestions might speed things up?
{ "domain": "physics.stackexchange", "id": 9867, "lm_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, electric-circuits, electrical-resistance", "url": null }
object-oriented, vba, error-handling, vb6, meta-programming Can turn into that: Public Property Get Lines() As String ValidateIsInitialized Lines = Me.ParentModule.Lines(Me.StartLine, Me.CountOfLines) End Property The Name property setter (letter?) can simply throw an error if the new value is vbNullString, as part of regular value validation. I'm surprised this works: Public Property Let ParentModule(ByRef vNewValue As CodeModule) CodeModule being an object, the property should have a setter: Public Property Set ParentModule(ByRef vNewValue As CodeModule) I like that you're using a procedure attribute to enable For Each iteration: Public Function NewEnum() As IUnknown Attribute NewEnum.VB_UserMemId = -4 Set NewEnum = mCollection.[_NewEnum] End Function ...but then Item should be a parameterized, default property (with procedure attribute 0): Attribute Item.VB_UserMemId = 0
{ "domain": "codereview.stackexchange", "id": 7872, "lm_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, vba, error-handling, vb6, meta-programming", "url": null }
javascript, array, lodash.js The indenting is poor and obscuring the logic. You have redundant code. Unneeded brackets () in headersMap. Poor naming of the _.reduce callbacks arguments Rewrite Using your algorithm and rewriting into a named function your code is more readable, reusable, and cleaner (name space wise) as function namedEvents(eventList) { const map = ({onClick, children}) => onClick ? {onClick} : _.map(children, map); const reduce = (result, child) => ({...result, [child]: null}); return _.reduce( _.map(_.flatMap(eventList, map), 'onClick'), reduce, {} ); } Avoiding the needless re-creation of results for each entry you get function namedEvents(eventList) { const map = ({onClick, children}) => onClick ? {onClick} : _.map(children, map); const reduce = (result, child) => (result[child] = null, result); return _.reduce( _.map(_.flatMap(eventList, map), 'onClick'), reduce, {} ); }
{ "domain": "codereview.stackexchange", "id": 36300, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, array, lodash.js", "url": null }
quantum-mechanics, quantum-field-theory, special-relativity On the other hand, if you're working with an $n$-body nonrelativistic system where $n$ is reasonably small (like, say, five), then you can describe the system using the usual many-body Hilbert space $(\mathbb{R}^{d})^n$. Since the system is nonrelativistic, the particle number won't change, so you can get away with just using a fixed-particle-number Hilbert space. If you want to tackle a truly many-body nonrelativistic condensed-matter system, where $n \sim 10^{23}$, then particle number will be conserved but the Hilbert space will be completely intractably gigantic. So in practice you restrict yourself to the lowest few excited states which only have a few quasiparticles, and you work in the many-quasiparticle Hilbert space (where now "many" means "more than one, but not a huge number"). However, empirically, quasiparticle number can change in many condensed-matter systems (most notably superconductors), so you again need to work in the indefinite-particle-number Hilbert space.
{ "domain": "physics.stackexchange", "id": 32115, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-field-theory, special-relativity", "url": null }
entanglement, measurement Example Suppose that three subsystems $ABC$ are in a state where $A$ is not entangled with the other subsystems and $B$ and $C$ are entangled with each other, e.g. $|0_A\rangle\otimes(|0_B0_C\rangle+|1_B1_C\rangle)/\sqrt{2}$. If we measure the subsystems $AB$ in the Bell basis, then we create entanglement between $A$ and $B$ and destroy the entanglement between $B$ and $C$. Indeed, the post-measurement state of $AB$ is a Bell state and the post-measurement state of $C$ is a computational basis state.
{ "domain": "quantumcomputing.stackexchange", "id": 3172, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "entanglement, measurement", "url": null }
special-relativity, mathematical-physics, group-theory, topology, poincare-symmetry The latter is the topological structure of the set of all Poincaré transformations. Specializing on restricted Lorentz transformations, we have $$ \left(P_5\right)_{+}^{\uparrow} = \mathcal P_{+}^{\uparrow} (1,3) = \mathbb R^4 \times \text{SO} (3) \times \mathbb R^3. $$ By this topological decomposition we obtain that the restricted Poincaré group is double-connected (its fundamental group has two elements, $\pm \bf{I}_{2\times 2}$), hence its universal covering group $\widetilde{\mathcal{P}_{+}^{\uparrow}} $ is a double cover.
{ "domain": "physics.stackexchange", "id": 44177, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, mathematical-physics, group-theory, topology, poincare-symmetry", "url": null }
Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. It is part of systematic error in the model. Best statistic for measuring prediction accuracy: Std Error and R2 VS MAE and RMSE? The following figure is a graphical representation of that fact. Often this will mean rank-ordering the predictions from highest to lowest, and then selecting the top N% of the list (marketing folks often use Lift, radar and sonar folks like ROC curves to trade off false alerts with hits--these are nearly identical ways of viewing the model predictive results).Many data mining software packages now allow you to rank models by some criterion like this (ROC, Lift, Gains, etc. However since the model is evaluated on its predictive ability on unseen observations, there is no guarantee that the closest model to the observed data will have the highest predictive accuracy for future data!
{ "domain": "abogadoszaragoza.eu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407230237445, "lm_q1q2_score": 0.8045895883488143, "lm_q2_score": 0.8267117983401363, "openwebmath_perplexity": 2601.062444937195, "openwebmath_score": 0.3802022635936737, "tags": null, "url": "https://abogadoszaragoza.eu/borise301/italian1ad5/7753236763c8bb" }
homework-and-exercises, magnetic-fields, induction, electromagnetic-induction You did not go wrong; all you did was to identify another set of forces originating from the interaction of the moving magnet and the induced current in the loop. Lenz's law tries to negate the change producing the induced current. In the analysis above the induced current direction was in such a direction as to reinforce the ever decreasing magnetic field due to the receding magnet so as to reduce the rate at which the magnetic flux linked with the loop is decreasing. However there is another way this could be done and that is by increasing the area of the loop and that is what those outward radial forces are trying to do. So although the net force on the loop is zero you could imagine those radial forces making the area of a loop made of a "springy/rubbery" conductor larger thus again trying to reduce the rate at which the magnetic flux linked to the loop is decreasing.
{ "domain": "physics.stackexchange", "id": 39981, "lm_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, magnetic-fields, induction, electromagnetic-induction", "url": null }
javascript, timer <button type="button" id="start">Start</button> <button type="button" id="pause">Pause</button> <button type="button" id="reset">Reset</button> Lastly, one minor flaw in your countdown timer is that your start button doesn't check if the timer is already running. This causes it to spawn another JS timer, doubling the decrement.
{ "domain": "codereview.stackexchange", "id": 29365, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, timer", "url": null }
ros, navigation, gps, navsat-transform, robot-localization Originally posted by dan on ROS Answers with karma: 875 on 2015-08-15 Post score: 0 Original comments Comment by Tom Moore on 2015-08-17: I'll look into this tonight. Just looking at the error makes me wonder if you turned on differential mode for odom0. Did you? Comment by dan on 2015-08-18: No, odom0 (the gps feed) has both differential and relative = false Comment by dan on 2015-08-19: I am also sometimes seeing vy run away to large values after a while. There are no vy inputs coming into the filter, so I don't know where it is coming from. The odom1 input (from the first robot_localization) has differential set to true. Bag file with "large_vy_component" is in the same folder. I pulled down your launch and bag file while I had DropBox access the other day, and am just now looking at them. Here are the problems I see. Note that I don't think I have your latest launch file, as the topic names appear to be very different.
{ "domain": "robotics.stackexchange", "id": 22454, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, navigation, gps, navsat-transform, robot-localization", "url": null }
macos, macos-lion, osx self.gui.Show() - Thread(target=app.MainLoop).start() else: self.gui = None @@ -200,7 +203,8 @@ try: rospy.init_node('joint_state_publisher') jsp = JointStatePublisher() - jsp.loop() + Thread(target=jsp.loop).start() + jsp.app.MainLoop() except rospy.ROSInterruptException: pass
{ "domain": "robotics.stackexchange", "id": 9130, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "macos, macos-lion, osx", "url": null }
c#, sorting, geospatial It works, but is there a more elegant way to do it? I'm not sure if adding another class might be a bit redundant since all it does is just adding a property for sorting, but adding the distance property to the Agent class, doesn't make so much sense. var agents = db.GetAgents(); if(agents == null || agents.Count == 0) { Console.WriteLine("No Results"); }
{ "domain": "codereview.stackexchange", "id": 34563, "lm_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#, sorting, geospatial", "url": null }
point illustrate the partial derivatives. At zero, the function is continuous but not differentiable. Another way to prevent getting this page in the future is to use Privacy Pass. • Derivative vs Differential In differential calculus, derivative and differential of a function are closely related but have very different meanings, and used to represent two important mathematical objects related to differentiable functions. Despite this being a continuous function for where we can find the derivative, the oscillations make the derivative function discontinuous. Its derivative is essentially bounded in magnitude by the Lipschitz constant, and for a < b , … If it exists for a function f at a point x, the Frechet derivative is unique. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. f(x)={xsin⁡(1/x) , x≠00 , x=0. MADELEINE HANSON-COLVIN. But a function can be continuous but not
{ "domain": "misscarrington.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759621310288, "lm_q1q2_score": 0.8297646021024566, "lm_q2_score": 0.8459424373085145, "openwebmath_perplexity": 284.12264156151207, "openwebmath_score": 0.8485810160636902, "tags": null, "url": "https://www.misscarrington.com/28q0pdz3/fec186-differentiable-vs-continuous-derivative" }
optics, diffraction, lenses The Strehl ratio is the max intensity of the spot relative to the intensity of the perfect spot. This is found by a diffraction calculation. For visual instruments used in daylight, this criterion has good correlation with subjective experience of image sharpness. The optical transfer function is often used for photographic lenses. This must be computed from the wave-aberrations of the lens found by raytracing. This is connected to the "resolving power" sometimes given for the lens.
{ "domain": "physics.stackexchange", "id": 35435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, diffraction, lenses", "url": null }
organic-chemistry, carbonyl-compounds Aldehydes are not only able to be oxidized to acids, they are quite reactive towards this oxidation. Exposure to air would be enough to trigger enough oxidation and acid formation to get litmus to react, especially if the litmus is moist. Aldehydes are not alone in this respect; for example iron(ii) salts can be oxidized by air too, especially if you try to store them as a solution or after breaking the original seal on the bottle. Moist litmus paper is a good qualitative test for acidity or basicity because it is highly sensitive to small amounts of acid or base. Reaction with sodium carbonate might not be as sensitive if you are looking for enough carbon dioxide to visibly form bubbles, especially as carbon dioxide has some solubility in most solvents. Yes, you need to follow good practices inspecting, testing and if necessary, purifying sensitive chemicals if you want high precision or accuracy.
{ "domain": "chemistry.stackexchange", "id": 15055, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, carbonyl-compounds", "url": null }
forces, rotational-kinematics, coriolis-effect the earth rotating frame it has velocity in the x and y directions but in the rest frame outside earth it never has velocity in x or y direction. So should I put $\vec v$ =$0\hat{i} +0\hat{j} + \dot z\hat{k}$ ? Show my exact question is that what should I take as the velocity to detect the velocity as the perception as in perception of a rest frame outside Earth or should I take the velocity of a observer who is in the earth frame who can't perceive his own rotation so sees the ball shifting. The equivalent of the Newton's second law in the noninertial frame is expressed as
{ "domain": "physics.stackexchange", "id": 54071, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, rotational-kinematics, coriolis-effect", "url": null }
turing-machines, undecidability, halting-problem, check-my-answer Title: Disprove: if L is decidable then Prefix(L) is decidable The following question was sent to me by a friend and I didn't really ask him about its source so I couldn't provide the source of it. I solved the question and I need to ensure my answer not just for him but also for myself since it's important to me too. Question: Prove or Disprove: if $L$ is a decidable language, so is $\text{Prefix}(L)$. My Answer: I think that the claim is wrong. I used the language: $$L=\{\langle M,x,t\rangle\ |\ M\text{ halts on }x\text{ within }t\text{ steps}\}$$ It's clear that $L$ is decidable. I assume by contradiction that $\text{Prefix}(L)$ is decidable also. Claim: $\text{Prefix}(L)$ is decideable $\iff \text{HALT}$ is decidable. $(\Longrightarrow)$: Let $\langle M,x,t\rangle\in L$ so $M$ halts on $x$ within $t$ steps therefore $\langle M,x\rangle\in \text{HALT}$.
{ "domain": "cs.stackexchange", "id": 19995, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, undecidability, halting-problem, check-my-answer", "url": null }
applied-mechanics Title: Is dimension of angular displacement never degree? Is units of angular displacement never a degree and is always a radian ? I suspect this book is related to motion dynamics. The reason why it states that angular measurements are in radians only, is probably because it tries to avoid confusion and ambiguity. The problem is that in most technical subjects degrees are used for angular measurements. However, when you start delving into physics and calculus- which are a prerequisite in your case since you are probably reading about dynamics- using radians make more sense. There are two main reasons (+1 which some times is as important) for that. There is very straight forward relationship between the arc of a circle $L$ and the angle $\theta$ when it is represented in radians. $$L = r\cdot \theta[rad]$$ The same equation in degrees would be: $L = r\cdot \theta[deg] \cdot\frac{\pi}{180}$. Notice the extra factor $\frac{\pi}{180}$
{ "domain": "engineering.stackexchange", "id": 3796, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "applied-mechanics", "url": null }
vectors Title: Criterion for being a Vector Quantity In the order to a vector quantity, we say the quantity must have a magnitude and a certain direction only. But I think one more criteria should have been added is that, the quantity must have to follow the vector sum rule (like Triangle rule/parallelogram rule), i.e. if a quantity have a magnitude, and we can clearly associate or define a direction to this quantity, but this quantity do not follow the vector sum law (Triangle law), then it will certainly not be a vector quantity. For example electricity, it has a magnitude and we can associate a direction with it (say the conventional direction).
{ "domain": "physics.stackexchange", "id": 82979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vectors", "url": null }
c, parsing, functional-programming omitted for size Makefile CFLAGS= -std=c99 -g -Wall -Wpedantic -Wextra -Wno-unused-function -Wno-unused-parameter -Wno-switch -Wno-return-type -Wunused-variable CFLAGS+= $(cflags) test : pc11test ./$< pc11test : pc11object.o pc11parser.o pc11io.o pc11test.o $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS) pc11object.o : pc11object.[ch] pc11parser.o : pc11parser.[ch] pc11object.h pc11io.o : pc11io.[ch] pc11object.h pc11parser.h pc11test.o : pc11test.[ch] pc11object.h pc11parser.h pc11io.h clean : rm *.o pc11test.exe count : wc -l -c -L pc11*[ch] ppnarg.h cloc pc11*[ch] ppnarg.h ppnarg.h omitted for size pc11object.h #define PC11OBJECT_H #include <stdlib.h> #include <stdio.h> #if ! PPNARG_H #include "ppnarg.h" #endif /* Variant subtypes of object, and signatures for function object functions */ #define IS_THE_TARGET_OF_THE_HIDDEN_POINTER_ * typedef union object IS_THE_TARGET_OF_THE_HIDDEN_POINTER_ object;
{ "domain": "codereview.stackexchange", "id": 43487, "lm_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, parsing, functional-programming", "url": null }
kinematics, dh-parameters Title: How to convert between classic and modified DH parameters? I currently have a description of my 22 joint robot in "classic" DH parameters. However, I would like the "modified" parameters. Is this conversion as simple as shifting the $a$ and $alpha$ columns of the parameter table by one row? As you can imagine, 22 joints is a lot, so I'd rather not re-derive all the parameters if I don't have to. (Actually, the classic parameters are pulled out of OpenRave with the command: planningutils.GetDHParameters(robot). Unfortunately it is not as simple as just shifting the a and alpha columns, as the locations of the frames and the directions of their axes can also change when moving from one DH formulation to another. As you can see in the Wikipedia entry on Modified DH Parameters, these key differences result in a number of changes to how the overall transformation matrix is built.
{ "domain": "robotics.stackexchange", "id": 816, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, dh-parameters", "url": null }
My Solution: If $f(x)=\lambda e^{-\lambda x}$, the memorylessness of exponential random variables makes this problem equivalent to a symmetric random walk, then we can find the survival probability of a random walk and use the Brownian motion limit to prove this (see Survival Probability in here). How about the general $f(x)$? I think we make it equivalent to another Brownian motion, I don't know how to find the parameters of that Brownian motion.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429575500228, "lm_q1q2_score": 0.8107288354324477, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 179.77999658176367, "openwebmath_score": 0.9980300664901733, "tags": null, "url": "https://math.stackexchange.com/questions/2460789/jump-process-random-walk" }
string-theory, conformal-field-theory, operators However, even if $O(0)$ is a tensor field and the $1/z^2$ and $1/z$ are the only ones that appear in the OPE, it doesn't mean that $O(0)$ is a primary operator. Quite likely, it is not one. What the primary operator Ansatz requires that the term going like $1/z^2$ is a multiple of the original operator $O(0)$, the same one!
{ "domain": "physics.stackexchange", "id": 6980, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "string-theory, conformal-field-theory, operators", "url": null }
python, beginner, python-3.x, game, hangman # Winning Loop if "".join(spaces) == word: print(f"YOU WIN! The word was: {word}") break # Choose Letters player_guess = input("\n\nPlease choose a letter: \n\n\n\n").lower() guessed_letters.append(" " + player_guess) if player_guess in ill_chars: print(f"\nError: It must be a letter. No symbols, numbers or spaces allowed. \n\n '{player_guess}' is not allowed\n") elif len(player_guess) > 1: print("\nError: You must use one letter.\n") elif player_guess == "": print("\nError: No input provided.\n") # Wrong Letter elif player_guess not in word_list: bad_letter += 1 if bad_letter == 1: hangman_final.append(hangman_progress[1] + head) elif bad_letter == 2: hangman_final.append(hangman_progress[2] + " " + torso) elif bad_letter == 3: hangman_final.pop(2) hangman_final.append(hangman_progress[2] + armL + torso)
{ "domain": "codereview.stackexchange", "id": 36026, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, game, hangman", "url": null }
cosmology, cosmological-inflation We will observe that the speed of light is decreasing, as light usually travels $3*10^8$m, in a second, but now since the universe is inflating, it will travel something lesser then that for instance $1.5*10^8$ As far as observation is considered, I dont think we will see any changes, since the retina of our eyes would then also have enlarged, As far as physics of the universe is considered I think the planets will keep to their orbits as their mass has not changed a bit and they maintain same distance with other celestial bodies as they used to, See spacetime expansion and universe expansion?, which addresses some of your questions. In particular the planetary orbits won't change because on the scale of the solar system the gravitational force between the planets far outweighs the expansion of the universe. The retinas in our eyes also don't expand, again because the intermolecular forces holding them together are far stronger than the forces caused by the expansion.
{ "domain": "physics.stackexchange", "id": 2870, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, cosmological-inflation", "url": null }
cosmology, temperature, cosmic-microwave-background This curvature-induced magnification or demagnification applies to hot spots of all sizes and therefore shifts all of the peaks. The fact that the first peak is expected near $l=200$ if the curvature is zero comes from a calculation of the size of the horizon at recombination. One finds that the horizon at that time has an angular size of about 0.9 degrees of arc in the sky today, corresponding to $l=180/0.9=200$. See http://background.uchicago.edu/~whu/intermediate/clcurvature.html and http://folk.uio.no/hke/AST5220/v11/AST5220_2_2011.pdf, both of which are credible sources.
{ "domain": "physics.stackexchange", "id": 53230, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, temperature, cosmic-microwave-background", "url": null }
electromagnetism, symmetry \begin{align} \Delta(u\circ R)=(\Delta u)\circ R. \end{align} So, it doesn’t matter if you rotate arguments first, and then apply Laplacian, or the other way around. In general, the same statement holds for any isometry of $\Bbb{R}^n$ (i.e for translations+rotations as well). This has ‘underlying’ reason because the Laplacian $\Delta$ is really a differential operator which comes from Euclidean geometry (with the metric tensor $\delta_{ij}$)… anyway this last bit was just mumbo jumbo so feel free to ignore.
{ "domain": "physics.stackexchange", "id": 98510, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, symmetry", "url": null }
metabolism, food, digestive-system I hope I didn't get it too wrong. Now my question is this: Would it be possible to somehow "rig" the human body to change the metabolism and make it fit to a rather sedentary lifestyle? For example: Instead of storing surplus food / energy within the body, it could be excreted, thus keeping humans at their weight even when eating a lot more than they need. Could this be possible? Which organs/hormones control the utilization of food within the human body and can they be influenced in such a way? Yes, you got it right. The theory you're referring to is called the thrifty gene hypothesis. There have been several attempts at "rigging" metabolism to reduce the amount of surplus calories stored as fat, as you suggest, and some of them have gone all the way to approved drugs.
{ "domain": "biology.stackexchange", "id": 6029, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "metabolism, food, digestive-system", "url": null }
astrophysics, stellar-physics, white-dwarfs Finally why is it not emitting light? The paper being referenced is Gvaramadze et al. 2019; they note that the observations agree with models of super-Chandrasekhar mass remnants of carbon-oxygen white dwarf collisions, carried out by Schwab et al. 2016. Schwab et al.'s models predict that post-collision, slightly off-center carbon fusion will occur in the remnant. This fusion leads to a so-called "carbon flame", a deflagration (note: not a detonation) wave that travels towards the remnant's center, over the course of about $2\times10^4$ years.
{ "domain": "physics.stackexchange", "id": 60478, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, stellar-physics, white-dwarfs", "url": null }
python, object-oriented, linked-list Would appreciate if anyone could shed some light on my doubts. To answer your first question: Each node in the list has a data and next attribute and we wish to print all the data attribute values by walking through the list. We have a choice in how we can design function printLinkedList to be called: (1) We pass it a SinglyLinkedList instance such as llist or the first node of llist, namely llist.head. The second option was chosen. If we printed head instead of head.data, it would be printing out a SinglyLinkedListNode instance and the output would look something like <__main__.SinglyLinkedListNode object at 0x000001D5FCB4F820. But since we wish to print out the data attribute values, we print head.data instead. I do think a better design would be to pass instead the linked list instance itself: def printLinkedList(linked_list): node = linked_list.head while node: print(node.data) # end='\n' is not required node = node.next print()
{ "domain": "codereview.stackexchange", "id": 44799, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, object-oriented, linked-list", "url": null }
general-relativity, special-relativity, relative-motion Now, if another of your friend went into another spaceship that is moving relative to your ship, they would be able to play tennis in their ship just as well too. So, here, even though you both are moving at different velocities, you both experience the same laws of physics. If the laws of physics were different in one of the ships, then that person would not be able to play tennis like they are used to. If the above example does not do it for you, then just think of when you travel on a plane flying at hundreds of kilometers per hour. If you pour a cup of water on the plane, do you have to adjust for the fact that the plane is going at such a huge velocity?
{ "domain": "physics.stackexchange", "id": 81848, "lm_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, relative-motion", "url": null }
quantum-information, linear-algebra The partial trace of $\rho$ must be a partial trace over some part of a splitting of the Hilbert space. If $\mathcal{H}=\mathcal{H_1}\otimes\mathcal{H_2}$, you take the partial trace over $\mathcal{H}_2$ to get the reduced density matrix $\rho_1$, which is an operator on $\mathcal{H}_1$. If $\{e_i\}$ is an orthonormal basis for $\mathcal{H}_2$, and $I_1$ the identity operator on $\mathcal{H}_1$, this is: $$ \rho_1=\mathrm{tr}_2(\rho)=\sum_i(I_1\otimes\langle e_i|)\rho(I_1\otimes|e_i\rangle ) $$ or just $\sum_i\langle e_i|\rho|e_i\rangle$ for short, with the understanding that the $e_i$ do nothing to the $\mathcal{H}_1$ part of the matrix. If it helps, $\rho$ 'has indicies' for both halves of the Hilbert space decomposition, and we sum over only one half of the indicies. If your original Hilbert space is two-dimensional, there is no nontrivial way of splitting it in two, so none of this will do anything. Try it instead for a tensor product of a pair of 2-state systems.
{ "domain": "physics.stackexchange", "id": 15931, "lm_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-information, linear-algebra", "url": null }
c++, game This is not doing what you think it is doing. I am surprised if this even works as it should always return true. string inc; cin >> inc; if (inc == "strength" or "agility" or "perception" or "endurance" or "intelligence") // what you really want is: if (inc == "strength" || inc == "agility" || inc == "perception" ... etc The comment at the end: /* Some one told me once that is was bad to use alot of goto statements, * however, I can not see what damage they are causing here. I can. You are tightly binding your control flow logic. This makes it hard to introduce new steps or alter the logic. Following the logic in this code is even worse. It is the perfect example of spaghetti. If it works fine then great. But try following the logic when something breaks. This becomes a maintenance nightmare. * Then again, I am not familiar with any alternatives for goto and labels, * so I am forced to use goto!
{ "domain": "codereview.stackexchange", "id": 30097, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game", "url": null }
c, generics, collections, hash-map, set /* PRIVATE *******************************************************************/ #define HASHSET_GENERATE_HEADER_PRIVATE(PFX, SNAME, FMOD, K, V) \ HASHSET_GENERATE_HEADER(PFX, SNAME, FMOD, V) #define HASHSET_GENERATE_SOURCE_PRIVATE(PFX, SNAME, FMOD, K, V) \ HASHSET_GENERATE_STRUCT(PFX, SNAME, FMOD, V) \ HASHSET_GENERATE_SOURCE(PFX, SNAME, FMOD, V) /* PUBLIC ********************************************************************/ #define HASHSET_GENERATE_HEADER_PUBLIC(PFX, SNAME, FMOD, K, V) \ HASHSET_GENERATE_STRUCT(PFX, SNAME, FMOD, V) \ HASHSET_GENERATE_HEADER(PFX, SNAME, FMOD, V) #define HASHSET_GENERATE_SOURCE_PUBLIC(PFX, SNAME, FMOD, K, V) \ HASHSET_GENERATE_SOURCE(PFX, SNAME, FMOD, V) /* STRUCT ********************************************************************/ #define HASHSET_GENERATE_STRUCT(PFX, SNAME, FMOD, V) \ \ struct SNAME##_s \
{ "domain": "codereview.stackexchange", "id": 34165, "lm_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, collections, hash-map, set", "url": null }
gazebo Title: How to set up another simulation more conveniently? This is the scenario. I open a gzserver and then a gzclient. Now if I want to open another simulation, that is, another gzserver and I want to clear out the previous simulated robot. How should I do? I will shutdown gzserver and gzclient and open another gzserver and gzclient but it is not very convenient. Any suggestions? Originally posted by winston on Gazebo Answers with karma: 449 on 2015-03-03 Post score: 0 You can start multiple gzserver instances on the same machine using the GAZEBO_MASTER_URI environment variable. Here is an example Start gzserver and gzclient. By default they operate on localhost:11345 Terminal 1: gzserver Terminal 2: gzclient Start a gzserver and gzclient on a different port Terminal 3: GAZEBO_MASTER_URI=localhost:11346 gzserver Terminal 4: GAZEBO_MASTER_URI=localhost:11346 gzclient Here is a shorter version: Terminal 1: gazebo Terminal 2: GAZEBO_MASTER_URI=localhost:11346 gazebo
{ "domain": "robotics.stackexchange", "id": 3720, "lm_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", "url": null }
- Example 1 Discuss the formula for degrees... Is the radius of the central angle of a circle in radians with an length! Is in radians. length 2πR/360: Reduce the fraction the fraction angle is in black s = 3! Your formula looks like this: Reduce the fraction the arc ( central.
{ "domain": "calcigarro.cat", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534398277177, "lm_q1q2_score": 0.8091709915327061, "lm_q2_score": 0.8244619242200081, "openwebmath_perplexity": 497.4108081609029, "openwebmath_score": 0.9313715100288391, "tags": null, "url": "http://booking.calcigarro.cat/restaurants-in-decuvlq/1e8d7d-how-to-find-arc-length-with-radians" }
g: Y → X Step 2 : Prove gof = I X Step 3 : Prove fog = I Y Example Let f : N → Y, f (x) = 2x + 1, where, Y = {y ∈ N : y = 4x + 3 for some x ∈ N }. We use the symbol f − 1 to denote an inverse function. A relation maps to multiple values. If a function is even, it’s automatically out. The inverse of a function is a function which reverses the "effect" of the original function. STEP 1: Plug. * Just graph it A function is called one-to-one if no two values of $$x$$ produce the same $$y$$. This would be easier to do on a graph, but you can still do it with the function alone. Furthermore, the inverse demand function can be formulated as P = f-1 (Q). Practice: Restrict domains of functions to make them invertible. We use first party cookies on our website to enhance your browsing experience, and third party cookies to provide advertising that may be of interest to you. Show that f is invertible Checking by One-One and Onto Method Checking one-one f(x 1 ) = 2x 1 + 1 Replace y with "f-1(x)."
{ "domain": "sieradskillc.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399034724604, "lm_q1q2_score": 0.820767112485837, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 497.20810804489844, "openwebmath_score": 0.5982497334480286, "tags": null, "url": "http://sieradskillc.com/9r3k1o2h/di466.php?358081=how-to-determine-if-a-function-is-invertible" }
photons, interference However if only 2 photons in opposite phase "combine" then how can we explain conservation of energy? when we have two photons we do not have a beam of light carrying energy, we have two elementary particles which can only interact very weakly through higher order diagrams. . Each photon will be carrying the energy $E=h\nu$ and there is no problem with conservation of energy. If we have a beam of light falling on two slits, we will see an interference phenomenon, and this interference is seen in the energy carried by the beam and impinging on the screen. If we send individual photons at a time, we will see individual spots on the screen, depositing their energy; it is the accumulation which will show the interference pattern of the wave. Could it be that if we think from wave view-point then we'll find nothing and if we think from particle view-point then there will be 2 photons?
{ "domain": "physics.stackexchange", "id": 91614, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photons, interference", "url": null }
Rewrite expressions involving radicals and rational exponents using the properties of exponents. This site was designed with the. PRODUCT PROPERTY OF SQUARE ROOTS For all real numbers a and b , a ⋅ b = a ⋅ b That is, the square root of the product is the same as the product of the square roots. Answers To Radical Expressions Answers To Radical Expressions If you ally craving such a referred Answers To Radical Expressions ebook that will find the money for you worth, get the entirely best seller from us currently from several. Solve an equation with a single square root using the squaring property of equality. 63 MB: Printer-friendly version; Chapter 11 Rational Expressions and Equations;. Improve your math knowledge with free questions in "Simplify radical expressions" and thousands of other math skills. C 1213 7xy ˜ 815 7xy The indexes are different. com 1 Algebra: Simplifying Algebraic Expressions, Expanding Brackets, Solving Linear Equations, Applications. Specifically, we are now
{ "domain": "scanjetviaggi.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975576912076157, "lm_q1q2_score": 0.8108439660829655, "lm_q2_score": 0.8311430457670241, "openwebmath_perplexity": 1737.6890247971703, "openwebmath_score": 0.7300655841827393, "tags": null, "url": "http://basu.scanjetviaggi.it/radical-expressions-pdf.html" }
special-relativity, experimental-physics, speed-of-light, inertial-frames, observers The most famous of these was the Michaelson-Morley experiment, which showed that the speed of light did not vary with direction or velocity by using the earth's own motion and rotation. These interference experiments could be though of a a single observer showing that difference in reference frame velocities do not change the velocity of light. If you want it proven with two observers, it may be easier to instead focus on proving that time dilation occurs. That is another expected outcome of relativity. For that, you need to go no further than your local GPS receiver in your phone. Your phone actually has to account for relativistic effects such as time dilation when it is calculating your location. It can be shown that, without that correction, your GPS would be more inaccurate than it is today!
{ "domain": "physics.stackexchange", "id": 34323, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, experimental-physics, speed-of-light, inertial-frames, observers", "url": null }
Re: Quick Way to Graph Inequalities [#permalink]  31 May 2009, 07:34 Thanks a lot.. very useful indeed Manager Joined: 08 Feb 2009 Posts: 147 Schools: Anderson Followers: 3 Kudos [?]: 34 [0], given: 3 Re: Quick Way to Graph Inequalities [#permalink]  01 Jun 2009, 15:48 It is useful indeed ! Senior Manager Joined: 16 Jan 2009 Posts: 361 Concentration: Technology, Marketing GMAT 1: 700 Q50 V34 GPA: 3 WE: Sales (Telecommunications) Followers: 3 Kudos [?]: 92 [0], given: 16 Re: Quick Way to Graph Inequalities [#permalink]  03 Jun 2009, 10:19 Thanks a lot.. very useful _________________ Lahoosaher Senior Manager Joined: 16 Jan 2009 Posts: 361 Concentration: Technology, Marketing GMAT 1: 700 Q50 V34 GPA: 3 WE: Sales (Telecommunications) Followers: 3 Kudos [?]: 92 [0], given: 16 Re: Quick Way to Graph Inequalities [#permalink]  03 Jun 2009, 10:38 Nach0 wrote: Here's a link where you can test out what you've just learned: In "Type of Region" select Linear I or Linear II.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214460461698, "lm_q1q2_score": 0.8177134894019498, "lm_q2_score": 0.8479677526147223, "openwebmath_perplexity": 4364.311934759316, "openwebmath_score": 0.4746108055114746, "tags": null, "url": "http://gmatclub.com/forum/quick-way-to-graph-inequalities-76255.html?fl=similar" }
java, game, android ParallaxView.bombed--; missileOffSetY = 0; wasHit = true; view.recent = true; Handler handler = new Handler(Looper.getMainLooper()); handler.postDelayed(new Runnable() { @Override public void run() { setRecent(); waitForTimer = false; wasHit = false; } }, 7000); waitForTimer = true; } else { // buggy was not hit so UFO fires more missiles //TODO: check if the movements are realistic if (!waitForTimer && !waitForUfoTimer && Background.checkpoint >= 'A') { if (startMissile) { startMissile = false; missileYstart = ufoY; } canvas.drawText("●", missileX + alien.getWidth() / 2, missileYstart + screenHeight / 100 * 25 + alien.getHeight() + missileOffSetY, paint);
{ "domain": "codereview.stackexchange", "id": 31145, "lm_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, game, android", "url": null }
ros, ur-modern-driver, ros-kinetic Title: ROS Answers SE migration: UR10e status What will is to get the status of the ur10e. When it is in some kind of stop for for instance protected stop or when the emergency button is press. I use now the ur_modern_driver and i subscribe to the /robot_status and get: header: seq: 6566 stamp: secs: 0 nsecs: 0 frame_id: '' mode: val: 2 e_stopped: val: 0 drives_powered: val: 1 motion_possible: val: 1 in_motion: val: -1 in_error: val: 0 error_code: 0 but here i can only see if it is in error not if it is a protected stop of emergency button was press. Is there a anther topic where this status is shown or? Originally posted by JoeryTemmink on ROS Answers with karma: 18 on 2019-04-08 Post score: 0 Original comments Comment by gvdhoorn on 2019-04-08: Could you please reference ros-industrial/ur_modern_driver#285? It's almost a duplicate and provides more context.
{ "domain": "robotics.stackexchange", "id": 32835, "lm_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, ur-modern-driver, ros-kinetic", "url": null }
physical-chemistry, atoms, quantum-chemistry, orbitals of functions of the radial variable r. You can get them via \begin{align} \langle r \rangle_{n, \ell} &= \int_{0}^{\infty} r D_{n, \ell}(r) \, \mathrm{d} r \ . \end{align} If you evaluate this integral for the $2\ce{s}$ and $2\ce{p}$ orbitals you get \begin{align} \langle r \rangle_{2\ce{s}} = \langle r \rangle_{2, 0} &= \frac{6 a_{0}}{ Z } \\ \langle r \rangle_{2\ce{p}} = \langle r \rangle_{2, 1} &= \frac{5 a_{0}}{ Z } \ . \end{align} You find that the $2\ce{s}$ electrons are on average further away from the nucleus than the $2\ce{p}$ electrons.
{ "domain": "chemistry.stackexchange", "id": 1668, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, atoms, quantum-chemistry, orbitals", "url": null }
pushdown-automata, nondeterminism Title: What can be said about the given language? $L = \left \{ ab^{n}a^{n}|n>0 \right \} \bigcup \left \{ aab^ka^{2k} | k>0 \right \}$ What can be said about the given language L ? According to me, I think it is CFL and not DCFL as I tried to somehow parse it through a NPDA but not sure though. The words in the first part start with $ab$, those in the second part start with $aa$. That should help.
{ "domain": "cs.stackexchange", "id": 7965, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pushdown-automata, nondeterminism", "url": null }
of the. Unknown values are treated correctly only by Euclidean and Relief distance. The Mahalanobis distance is a good way to detect outliers in multivariate normal data. 3) C x-1 = VA-1 V '. (15/15) Based on the means and covariance matrix, plot the contour maps of the. Use pdist2 to find the distance between a set of data and query. If this outlier score is higher than a user-defined threshold, the observation is flagged as an outlier. The cluster analysis literature contains scores of other ideas for determin. Learn Math Tutorials Bookstore http://amzn. σnoise Smooth Structural Textural MD ED MD ED MD ED σ = 35 6. , we want to compare the clustering results between Euclidean distance and Mahalanobis distance. , each cluster has its own general covariance matrix, so I do not assume common variance accross clusters unlike the previous post. sqeuclidean (u, v[, w]) Compute the squared Euclidean distance between two 1-D arrays. uni-bielefeld. distortions, occlusions, and importance of
{ "domain": "assaggidopera.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765604649332, "lm_q1q2_score": 0.8123406022147215, "lm_q2_score": 0.8289388083214156, "openwebmath_perplexity": 1130.1714091008055, "openwebmath_score": 0.7432230710983276, "tags": null, "url": "http://ofts.assaggidopera.it/mahalanobis-distance-vs-euclidean-distance.html" }
javascript, performance, programming-challenge, ecmascript-6 Declaring variables inside a loop ... I am under the impression that declaring any higher up than necessary in a scope is discouraged. That is generally true but inside loops... Well, for compiled languages there is valid reasoning not doing this but a brief browse is telling me it's not an issue in JS. And when creating closures in that loop/block-scope (not applicable here) you need to do this. end Edit
{ "domain": "codereview.stackexchange", "id": 30729, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance, programming-challenge, ecmascript-6", "url": null }
tangent lines to the curve always lie below the curve itself and that, as we move from left to right, the slope of the tangent line is increasing. Second Derivative. On what intervals is the position function $$y=s(t)$$ increasing? Suppose is a positive integer. It also makes sense to not only ask whether the value of the derivative function is positive or negative and whether the derivative is large or small, but also to ask “how is the derivative changing?”. We state these most recent observations formally as the definitions of the terms concave up and concave down. Why? In this case, the derivative is a vector, so it … Vector derivatives September 7, 2015 Ingeneralizingtheideaofaderivativetovectors,wefindseveralnewtypesofobject. A differentiable function is concave up whenever its first derivative is increasing (or equivalently whenever its second derivative is positive), and concave down whenever its first derivative is decreasing (or equivalently whenever its second derivative is
{ "domain": "thekineticist.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.969785412932606, "lm_q1q2_score": 0.8223467608489848, "lm_q2_score": 0.8479677564567913, "openwebmath_perplexity": 460.6958636841244, "openwebmath_score": 0.8535654544830322, "tags": null, "url": "http://thekineticist.com/saloon-or-ygi/m8p6n.php?page=second-derivative-of-norm-081f8f" }
reinforcement-learning, python, q-learning, hyperparameter-optimization, learning-rate However, this is something that is harder to manage than in supervised learning, and might not be as useful or necessary. The issues you need to be concerned about are: Non-stationarity The target values in value-based optimal control methods are non-stationary. The TD target derived from the Bellman equation is never quite a sample from the optimal action value until the very final stages of learning. This is an issue both due to iterative policy improvements and the bootstrap nature of TD learning. Reducing learning rate before you reach optimal control could delay finding the optimal policy. In general you want the learning rate to be just low enough that inaccuracies due to over/undershooting the correct value don't prevent or delay differentiating between actions for whatever the interim policy is. Policy indifference to accurate action values
{ "domain": "ai.stackexchange", "id": 1132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, python, q-learning, hyperparameter-optimization, learning-rate", "url": null }
python, template, tkinter, gui, factory-method "density": 15.37, "electronegativity": 1.5 }, { "symbol": "U", "name": "Uran", "number": 92, "category": "Actinoide", "group": "Ac", "period": 7, "block": "f", "mass": 238.03, "phase": "fest", "density": 19.16, "electronegativity": 1.38 }, { "symbol": "Np", "name": "Neptunium", "number": 93, "category": "Actinoide", "group": "Ac", "period": 7, "block": "f", "mass": 237.05, "phase": "fest", "density": 20.45, "electronegativity": 1.36 }, { "symbol": "Pu", "name": "Plutonium", "number": 94, "category": "Actinoide", "group": "Ac", "period": 7, "block": "f", "mass": 244.06, "phase": "fest", "density": 19.82, "electronegativity": 1.28 }, { "symbol": "Am", "name": "Americium", "number": 95, "category": "Actinoide", "group": "Ac", "period": 7, "block": "f", "mass": 243.06, "phase": "fest",
{ "domain": "codereview.stackexchange", "id": 42621, "lm_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, template, tkinter, gui, factory-method", "url": null }
python, beginner, python-3.x listing_as_embed = Embed( title=self.title, description=listing_description, color=Colour(randint(0, 16777215)), url=f'https://www.kijiji.ca{self.url}') listing_as_embed.add_field(name='Location', value=self.location, inline=True) listing_as_embed.add_field(name='Price', value=self.price, inline=True) # This url might contain a tilde which Discord will have an issue with # Replace the tilde with a URL encoded version listing_as_embed.set_image(url=self.imageurl.replace('~', '%7E')) listing_as_embed.set_footer(text='Listed: {}'.format(self.posted)) if 'thumbnail' in kwargs: listing_as_embed.set_thumbnail(url=kwargs.get('thumbnail')) return listing_as_embed
{ "domain": "codereview.stackexchange", "id": 31044, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x", "url": null }
java, mathematics for (int l = 0; l < sum.size(); l++) { a = (int)x.get(l); b = (int)y.get(l); if(cubeSum.compareTo(sum.get(l))==0) { if (a != j && a != k && b != j && b != k) { c=j; d=k; System.out.println("The first positive integer " + "expressible as the sum\nof 2 different positive" + " cubes in 2 different ways\nis " + cubeSum + " = " +a+"^3 + "+b+"^3 = " + c+"^3 + "+d+"^3"); found=true; } } }
{ "domain": "codereview.stackexchange", "id": 4960, "lm_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, mathematics", "url": null }
coordiates would be. I am computing the $\hat{I}$ - moment of inertia tensor - of a cylinder with height 2h and radius R, about its axis of symmetry at the point of its centre of mass. Polar Moment of Inertia vs. In the problem we are required to find moment of inertia about transverse (perpendicular) axis passing through its center. Find moment of inertia of a uniform hollow cylinder Home Problems and Answers Classical Mechanics Find moment of inertia of a uniform hollow cylinder We know that the moment of inertia for hoop with radius R is mR2. So in particular, I've got for you a cylinder. (Use any variable or symbol stated above as necessary. Perform the following analysis to determine the moment of inertia of the platter. It suggests that to turn the shaft at an angle, more torque is required, which means more polar moment of inertia is required. $$I_{xx} = \int_m \left( y^2 + z^2 \right) \, dm$$ Where $I_{xx}$ is the moment of inertia of a continuous body about the $x$ axis in a.
{ "domain": "shakemymag.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9911526430876969, "lm_q1q2_score": 0.8424511773013624, "lm_q2_score": 0.8499711756575749, "openwebmath_perplexity": 269.5253189201774, "openwebmath_score": 0.7079548239707947, "tags": null, "url": "http://bfqw.shakemymag.it/moment-of-inertia-cylinder.html" }
coordinate, size Title: How big is one arcsecond at various distances? I've been reading this article https://en.wikipedia.org/wiki/Celestial_coordinate_system and a question came to my mind. The minimum units are seconds ( ″ ). I picture an angle of 1 second as being like a "cone" going out from Earth. It's really small at the beginning but as you go further its width increases. How wide does this cone get as you get further into the universe? How big is an arcsecond on different astronomical bodies? How big is one arcsecond at various distances? An arcsecond is a small angle, 1/3600 of a degree or about 5 millionths of a radian ($4.85\times10^{-6}$). To estimate the size of something that appears 1 arcsecond across you can use the small angle approximation to trigonometry: Multiply the distance to the object by $4.85\times10^{-6}$ Examples:
{ "domain": "astronomy.stackexchange", "id": 2221, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "coordinate, size", "url": null }
homework-and-exercises, newtonian-mechanics, kinematics, string EDIT :Can I use the method in the answer in this post to solve this problem ? If yes , then how and if no then why not ? I tried but I couldn't solve it by this . Finding the acceleration of Block attached using tricky string setup Given that all three blocks $A, B, C$ are moving left with the same velocity, and that the string attached to $C$ is fixed at the other end to $B$, and that all of the pulleys are fixed to blocks $A$ and $B$, the only way block $C$ could have a vertical velocity would be if blocks $A$ and $B$ had differing velocities (changing separation). We know that $A$ and $B$ are moving with the same velocity, which means that the string cannot love around any of the pulleys. Therefore, $C$ has no vertical component of its velocity.
{ "domain": "physics.stackexchange", "id": 44167, "lm_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, kinematics, string", "url": null }
*.kastatic.org *... Is any number that has exactly 2 factors Dictionary, questions, discussion and forums having loading! Eratosthenes sieve on pronouncekiwi the primes ( link to Wikipedia ) 0 since is... Once complete, the circled were asked to find small prime numbers between any two numbers mathematician Erastosthenes, sieve... That are not read input or print anything ( link to Wikipedia ) Task: do... For finding prime numbers the number you circled in step 1: Fill an array of N. And Fill it with 1 the Cambridge English sieve of eratosthenes pronunciation, questions, discussion and forums out. In step 1 except the circled numbers you are left with are the primes to read input or print.... Algorithm is described in full on Wikipedia, and you might like to a... Numbers are prime, and you might like to take a look the. Learn this method message, it means we 're having trouble loading resources! Practice ” first, before moving on to the next non-zero element and set all its multiples
{ "domain": "whitewolfcreative.tv", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347868191549, "lm_q1q2_score": 0.8262892874801815, "lm_q2_score": 0.847967764140929, "openwebmath_perplexity": 612.2723183523948, "openwebmath_score": 0.6113751530647278, "tags": null, "url": "http://whitewolfcreative.tv/cskx0r4/sieve-of-eratosthenes-pronunciation-20dc31" }
# Antiderivative and definite integral If $f$ is a continuous, real-valued function on interval $[a,b]$, then the fundamental theorem of calculus tells us that $$\int_a^x f(t)dt=F(x)$$ where $F(x)$ is antiderivative, i.e. $F(x)'=f(x)$. If so, why I can't find the equality $\int f(x)dx=\int_a^x f(t)dt=F(x)$ anywhere? It expresses the relationship between definite and indefinite integral in such a straightfoward way (assuming this equality is true). So it it true and can I use $\int$ and $\int_a^x$ interchangeably?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102580527664, "lm_q1q2_score": 0.8123672601816389, "lm_q2_score": 0.8397339736884712, "openwebmath_perplexity": 245.71138200926248, "openwebmath_score": 0.9863078594207764, "tags": null, "url": "https://math.stackexchange.com/questions/1551957/antiderivative-and-definite-integral" }
java, game, console, minesweeper Next we might as well look at weHaveNotGotAnyEmptyAreaThatNotCheckedAndWeMarkedOnlyBombs. This function's name is describing what it does (which we can figure out by reading its code) but not what it means (which tells callers how to use it). isWinningBoard seems like a much more accurate name cell.getValueOfArea() != ValueOfArea.BOMB /* is not a bomb */ is not a useful comment, since it's repeating what the code does. We can simplify to: private static boolean isWinningBoard(Area[][] area) { for (int y = 0; y < area.length; y++) { for (int x = 0; x < area[0].length; x++) { Area cell = area[y][x]; if (cell.getValue() != ValueOfArea.BOMB && cell.getStatus() != StatusOfArea.OPENED) { return false; } } } return true; }
{ "domain": "codereview.stackexchange", "id": 36424, "lm_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, game, console, minesweeper", "url": null }
ros, pi-tracker, quaternion, skeleton, skeletal-tracker Title: pi_tracker/Skeleton.msg message interpretation Hello all, I am using using ROS Electric, and pi_tracker package for skeletal tracking. The launch file "skeleton.launch" publishes "/skeleton" topic, which is a "pi_tracker/Skeleton.msg" message. Using "rosbag -record", I recorded the "/skeleton" topic. The message definition is: Header header int32 user_id string[] name float32[] confidence geometry_msgs/Vector3[] position geometry_msgs/Quaternion[] orientation
{ "domain": "robotics.stackexchange", "id": 13509, "lm_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, pi-tracker, quaternion, skeleton, skeletal-tracker", "url": null }
java, beginner, array, homework, swing if (i < counter) { counter--; for (; i < counter; i++) { numbers[i] = numbers[i + 1]; } } This only removes the first match. Consider using a List instead of an array Or if you change numbers to a List rather than an array, you could do away with counter altogether. numbers.remove(Integer.parseInt(inputField.getText())); This would replace the last option above, removing just the first match. Or Integer needle = Integer.parseInt(inputField.getText()); while (numbers.remove(needle)) ; To remove all occurrences. Or more fancily but briefly numbers.removeAll(Arrays.asList(Integer.parseInt(inputField.getText()))); A List would also allow us to change things like for (int i = 0; i <= counter; i++) { sum += numbers[i]; }
{ "domain": "codereview.stackexchange", "id": 22552, "lm_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, array, homework, swing", "url": null }
pavement National Cooperative Highway Research Program, “Guide for Mechanistic-Empirical Design of New and Rehabilitated Pavement Structures, Part 3, Chapter 4 - Design of New & Reconstructed Flexible Pavements.” NCHRP Project 1-37A Final Report, Washington, D.C. (2004). [Contains definition of critical strain computation locations] American Association of State Highway and Transportation Officials, “Mechanistic-Empirical Pavement Design Guide - A Manual of Practice”, 2nd edition, Washington D.C. (2015)
{ "domain": "engineering.stackexchange", "id": 2907, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pavement", "url": null }
computational-chemistry, software, symmetry Now, I have got the following two questions: What is the rotational symmetry number $s_n$, i.e. how is it defined? What symmetry number $s_n$ would a molecule with no symmetry, i.e. $C_1$ point group have? The way I understand it, the rotational symmetry number reflects the rotational symmetry, e.g. $\ce{CHCl3}$ would have $s_n=3$ as there are three equivalent structures superimposed by the $C_3$ symmetry element. So that my guess is that $s_n = 1$ in that case. Is that correct? Your #2 is exactly right, as far as I know, which answers your #1. A key thing to remember is that the rotational symmetry number doesn't include reflections, so molecules in groups like $C_s$ still have $s_n = 1$ since there are no superimposable orientations achievable only with rotations. For reference: Table II of the NIST CCCBDB introduction to thermochemistry is a nice, concise summary of the symmetry numbers for the common point groups observed in chemistry.
{ "domain": "chemistry.stackexchange", "id": 6792, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computational-chemistry, software, symmetry", "url": null }
electromagnetism, electrostatics, magnetic-fields, electric-fields Now take a copper wire and touch the opposite ends of the wire to the two ends of the battery. Due to the electric field between the two ends of the battery, an electric current will flow through the wire. This electrical current is essentially no different from that of the electrical current flow though a copper wire in your example. In both cases there is current flow due in response to an electric field. The only basic difference is that in one case the electric field is induced by a changing magnetic field, while in the other the electric field is due to the electrochemistry of a AA-battery.
{ "domain": "physics.stackexchange", "id": 46842, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electrostatics, magnetic-fields, electric-fields", "url": null }
spacetime, group-theory, representation-theory, qft-in-curved-spacetime, poincare-symmetry The only other answer I could find on the topic suggests the opposite, that the little group is unchanged in curved space because one can always go to a locally flat reference frame. But if this is the case, how do you deal with the pairwise little group for two particles, which may not be located at the same point; shouldn't spacetime curvature matter then? I could rephrase my question, then, as follows: do particles lie in irreps of the Poincare group because Minkowski space has a global Poincare symmetry, or because it has a local Poincare symmetry? What is a particle? Before we worry about how to classify particles, we should try to be clear about what "particle" means. Ideally, we would like the definition to have these features:
{ "domain": "physics.stackexchange", "id": 73263, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spacetime, group-theory, representation-theory, qft-in-curved-spacetime, poincare-symmetry", "url": null }
This is a great question. Unfortunately, this is an incomplete answer. But I thought about this a bit and I noticed something interesting, but which I do not know how to explain. With $$S_n = \sum_{k \leq n} (-1)^k p_k,$$ where $p_n$ is the $n$th prime, some patterns are immediately clear. It is obvious that the sequence of $S_n$ alternates in sign for example. But some patterns are not obvious or clear. By the prime number theorem, we expect that $p_n \approx n \log n$. If we plot $\sum_{k \leq n} (-1)^k k \log k$ against $S_n$ for all primes up to one million, we get This is apparently a bit too small, it seems. This sort of makes sense, as deviations from the approximation $p_n \approx n \log n$ compound here. However, I noticed that $$1.12 \sum_{k \leq n} (-1)^k k \log k$$ is actually a very good (experimental) estimate of what's going on, as can be seen in the following plot.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241947446617, "lm_q1q2_score": 0.8794796907817736, "lm_q2_score": 0.9073122238669026, "openwebmath_perplexity": 351.93902487681754, "openwebmath_score": 0.9954421520233154, "tags": null, "url": "https://math.stackexchange.com/questions/2314467/on-the-regularity-of-the-alterning-sum-of-prime-numbers" }
• Given a vertex $v$ and all its neighbours $u_1, \dots, u_k$, and assuming that in fact $d(v) = delta(s, v)$, what can you say about $d(v)$ and (some of) the values $d(u_1), \dots, d(u_k)$? – j_random_hacker Mar 29 '19 at 14:52 • Sorry, I still can't figure it out. assuming 𝑑(𝑣)=𝑑𝑒𝑙𝑡𝑎(𝑠,𝑣) for all v, it means 𝑑(𝑢) is greater than each "incoming" vertex 𝑑(𝑢). is that you intent? – Keren Mar 29 '19 at 15:27 • We don't know (or at least don't assume that we know) which vertices are incoming. But we still know that for at least one neighbour $u_i$ of $v$, either ____ or ____. – j_random_hacker Mar 29 '19 at 15:57 • (I'm not yet sure that this is "the right" way to go about this, but it seems likely that the property I have in mind will turn out to be useful.) – j_random_hacker Mar 29 '19 at 15:58
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970687770944576, "lm_q1q2_score": 0.8002951158231909, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 252.35505241298242, "openwebmath_score": 0.8248656988143921, "tags": null, "url": "https://cs.stackexchange.com/questions/106222/given-directed-connected-weighted-graph-check-if-dv-deltas-v" }
ros, ros-melodic, nav-msgs This is 7 floats, a string, a uint32 and a time object per data point. Assuming your mission isn't just a few meters, this will be a lot of data. Except for the position object (three floats), the others are (most probably) unnecessary. (Most probably, because if you want to drive using the same orientation, you'd have to store the orientation as well, obviously. I'm assuming you are not). The way you describe your "recording" of data, seems to be a path (actual path), where start and end points are pretty far apart. Otherwise you probably wouldn't suggest to artificially add another "end point" close to the start point. You should probably check if your end point and start point are sufficiently close to each other. Same holds for all other solutions.
{ "domain": "robotics.stackexchange", "id": 34854, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-melodic, nav-msgs", "url": null }
time-complexity, recursion, big-o-notation, master-theorem Title: How can we get upper bound in terms of Big Oh notation using Master theorem? The recursion is: T(n) = 5T(n/2) + O(n) I solved for the time complexity using Master theorem and found Θ(n^2). but, the question has asked to find the upper bound in terms of Big Oh. Is there any principle to convert it into Big Oh form? I read some examples where they substituted some values and deduced but I couldn't understand. Update: I apologize for writing the recursion equation wrong. The actual recursive equation for this question is: T(n) = 2(n-1) + O(n) Your reasoning is wrong. It is in $\Theta(n^{\log_2(5)})$. Hence, it is also in $O(n^{\log_2(5)})$. Answer to the update: Also, for the update part, it is wrong. You can find it by a straightforward expansion (no need to master theorem): $$ T(n) = 2T(n-1) + O(n) = 2(2T(n-2) + O(n-1)) + O(n) \\ = 2^2T(n-2) + O(n-1) + O(n) = \cdots = \\ 2^n * T(0) + O(1) + O(2) + \cdots + O(n) \in O(2^n) $$
{ "domain": "cs.stackexchange", "id": 18996, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time-complexity, recursion, big-o-notation, master-theorem", "url": null }
c#, regex, rubberduck, i18n public enum QuantifierKind { None, Expression, Wildcard } } Now all of this must critically support internationalization. That's why each of these is inherently coupled with some internationalization. I'm aware that this could be somewhat avoided with extension methods or by introducing a separate class to handle the mess. I decided against that to keep the simplicity of the design. Last but not least, we'll need to actually build a tree from these "data holders". That's done ... well I have a big comment there, it explains how it works: internal static class RegularExpression {
{ "domain": "codereview.stackexchange", "id": 31918, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, regex, rubberduck, i18n", "url": null }
python, object-oriented, pygame def move(self): if self.dead: # dead bird self.sprite = 2 # change to dead.png # keeps falling until it hits the ground if self.y < SIZE[1] - 30: self.y += self.gravity elif self.y > 0: # handling movement while jumping if self.jump: self.sprite = 1 # change to 2.png self.jump_speed -= 1 self.y -= self.jump_speed else: # regular falling (increased gravity) self.gravity += 0.2 self.y += self.gravity else: # in-case where the bird reaches the top # of the screen self.jump = 0 self.y += 3 def bottom_check(self): # bird hits the bottom = DEAD if self.y >= SIZE[1] - 30: self.dead = True
{ "domain": "codereview.stackexchange", "id": 27140, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, object-oriented, pygame", "url": null }
left-hand midpoint of the subinterval [a i-1, a i] is. Riemann sums, summation notation, and definite integral notation Math · AP®︎ Calculus AB · Integration and accumulation of change · Approximating areas with Riemann sums Left & right Riemann sums. Find the height of each rectangle. Estimate using four subintervals with (a) right endpoints, (b) left endpoints, and (c) midpoints. Using correct units, explain the meaning of v(t) dt in terms of the plane's flight. Selected values of the velocity, !!, in ft/sec, of a car travelling on a straight road for 0≤!≤50 are listed in the table below. ) (𝑥=16−𝑥2 on [2, 5] Midpoint with 6 equal subintervals. Calculus Q&A Library Approximate the integral below using a Right Riemann sum, using a partition having 20 subintervals of the same length. Use a left Riemann Sum with the four subintervals indicated by the data in the table to approximate ∫ (𝑥) 𝑥 8 1 c. The partition points x0 x1 x2 …. (d) Estimate 2. b)Estimate the number of gallons of oil
{ "domain": "sicituradastra.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9865717456528508, "lm_q1q2_score": 0.8019519197982119, "lm_q2_score": 0.8128673087708699, "openwebmath_perplexity": 483.8687698821752, "openwebmath_score": 0.8928297162055969, "tags": null, "url": "http://kqbk.sicituradastra.it/use-a-midpoint-riemann-sum-with-four-subintervals.html" }
c++, performance, algorithm, computational-geometry point_list outside_set_; for (size_type const v : visible_facets_) { auto const visible_facet = facets_.find(v); assert(visible_facet != fend); facet const & visible_facet_ = visible_facet->second; outside_set_.insert(outside_set_.cend(), visible_facet_.outside_set_.cbegin(), visible_facet_.outside_set_.cend()); facets_.erase(visible_facet); unrank(v); } for (size_type const n : newfacets_) { rank(partition(facets_.at(n), outside_set_), n); } internal_set_.splice(internal_set_.cend(), outside_set_); } }
{ "domain": "codereview.stackexchange", "id": 7986, "lm_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, algorithm, computational-geometry", "url": null }