text
stringlengths
1
1.11k
source
dict
strings, kotlin could be better written as val length = maxOf(str1.length, str2.length) People often talk in circles about this thinking about efficiency, but that's generally a red herring. Modern compilers are pretty good at optimising, and the differences are likely to be minimal if they exist at all. Instead, the number one reason for using a named function is readability. In the former example, I have to stop and piece together what it's actually doing. In the latter, I can see at a glance and continue to read the code fluently. Following on from that, I can now see that it's the wrong check. Logically, a common prefix cannot be longer than the shorter of the two strings. So now that I can clearly see that the existing code is equivalent to a maxOf call, I realise it should probably instead be a minOf call.
{ "domain": "codereview.stackexchange", "id": 40781, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "strings, kotlin", "url": null }
python, beginner, python-3.x, object-oriented def __repr__(self) -> str: return f"{self._name.capitalize()} teaches {self._subject} in room {self._room_number}." print("Please enter the name of 10 teachers, the subject they teach, and the room they teach that subject in.") teachers = [Teacher() for _ in range(10)] print("\n") for teacher in teachers: print(teacher)
{ "domain": "codereview.stackexchange", "id": 37533, "lm_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, object-oriented", "url": null }
We condlude, that $\overline{Y}^c=\bigcup_{x\in\overline{Y}^c} U_x$ open. Hence $\overline{Y}$ is closed. Here, I'd just say (if you lead off as I did by announcing your intention) something like: "We conclude that $$X\setminus\overline Y\subseteq\bigcup_{x\in X\setminus\overline Y}U_x\subseteq(X\setminus Y)\cap(X\setminus\partial Y)=X\setminus\overline Y,$$ so that $X\setminus\overline Y=\bigcup_{x\in X\setminus\overline Y}U_x.$ As a union of the open sets $U_x,$ we have that $X\setminus\overline Y$ is open, as we set out to show." Let me know if you have any questions about my answer, or if you just want to bounce your phrasing adjustments off somebody. • Thank you for this answer. I appreciate your comments very much. At the moment I do not have an open question. – Cornman Jul 15 '18 at 19:04
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773708045809529, "lm_q1q2_score": 0.8165772248802379, "lm_q2_score": 0.8354835452961425, "openwebmath_perplexity": 119.38959124683706, "openwebmath_score": 0.967816174030304, "tags": null, "url": "https://math.stackexchange.com/questions/2850468/overliney-is-closed" }
ros, irobot-create, navigation, odometry Originally posted by clark on ROS Answers with karma: 393 on 2011-12-13 Post score: 1 In general, dead reckoning style odometry on the Create is... definitely not good. Implementations do of course vary. For the most part this seems to have to do with both hardware limitations and the limitations of building a driver that doesn't run directly on the bot but on top of a serial connection to the Open Interface. I posted a few thoughts that might help in this thread. This is not to knock the Create because it is cheap and tough and pretty much my favorite platform. That said, it only really comes into its own with some kind of navigational aid like a laser scanner, Kinect, or just a web-cam. You aren't alone in reporting problems with X being absolute across multiple drivers. Can you provide a few more details about your setup? Do you have more than one Create for which this seems to be a problem?
{ "domain": "robotics.stackexchange", "id": 7633, "lm_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, irobot-create, navigation, odometry", "url": null }
homework-and-exercises, fluid-dynamics Title: Time needed to empty a syringe A) a syringe is filled with 10mL water. The diameter of the barrel of the syringe is 15.9 mm and the diameter of the tip is 1.2mm. With how much force do we need to push on the plunger to empty the syringe from water in 10 seconds? Neglect friction of the plunger and the waters viscosity. B)Now we add a needle to the syringe, with a length of 25mm and diameter 0.210 mm. If you push on the plunger with a force 0.10 N, how much time will it take to empty the syringe? Now we should consider the viscosity of water: 0.0010Pas For the first case: Neglect friction of the plunger and the waters viscosity.
{ "domain": "physics.stackexchange", "id": 68063, "lm_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, fluid-dynamics", "url": null }
• When you do $\dfrac{\mathrm du}{\mathrm dx}\dfrac{\mathrm dy}{\mathrm du}\mathrm dx=\dfrac{\mathrm dy}{\mathrm du}\mathrm du$, aren't you too treating the $\dfrac{\mathrm du}{\mathrm dx}$ as a fraction since you cancel out the $\mathrm dx$'s ? – Prasun Biswas Oct 7 '17 at 12:35 • This answer to a similar question has some links that may help: : math.stackexchange.com/q/2009181 – Ethan Bolker Oct 7 '17 at 12:37 • It's actually rigorous enough to treat it as a fraction. In fact, that is one of the advantages of Leibniz's notation for derivative. – Prasun Biswas Oct 7 '17 at 12:38 • @PrasunBiswas, 'canceling out' the dx's is not how the chain rule is derived, the fact that they cancel out is merely a coincidence of the notation. – Joe Oct 7 '17 at 12:41 • $\int x(2-3x)^{11}\times dx$ If substituting u then =$\int \dfrac{2-u}{3}\times u^{11}\times\dfrac{du}{-3}$ – Fawad Oct 7 '17 at 12:42
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241982893259, "lm_q1q2_score": 0.8258184631046422, "lm_q2_score": 0.8519527982093666, "openwebmath_perplexity": 411.06615481352054, "openwebmath_score": 0.8568940162658691, "tags": null, "url": "https://math.stackexchange.com/questions/2461461/why-treating-dfrac-mathrm-d-y-mathrm-dx-as-a-fraction-gives-correct-answe" }
ros, fedora CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message): Could NOT find Boost (missing: python) (found version "1.69.0") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindBoost.cmake:2166 (find_package_handle_standard_args) CMakeLists.txt:14 (find_package) -- Configuring incomplete, errors occurred! See also "/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeOutput.log". See also "/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeError.log". <== Failed to process package 'cv_bridge':
{ "domain": "robotics.stackexchange", "id": 35456, "lm_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, fedora", "url": null }
graph-theory, matching, bipartite-graphs, examples Title: Do such instances always admit a 3D matching? I want to know whether the following kinds of special instances of the 3D Matching problem are ``yes" instances, i.e., admit a 3D matching. We are given 3 sets $A,B,C$ containing $m$ elements each, and $n$ tuples $\{T_i\}_{i\in [n]}$ where $T_i \in A\times B\times C$. We further know: (i) Each element of $A\cup B \cup C$ occurs exactly in two tuples. Simple counting shows $n = 2m$. (ii) The elements of $A\cup B \cup C$ can be partitioned into $m$ singleton elements, and $m$ pairs $(x,y)$ where $\{x,y\} \subset T_i$ for some $i\in [n]$. I want to know if such an instance admits a 3D matching. Is there a simple counter-example? How about the following counter-example? $m=2$, $n=4$. $A=\{a_1,a_2\}$, $B=\{b_1,b_2\}$, $C=\{c_1,c_2\}$. $T=\{(a_1,b_1,c_1), (a_1,b_2,c_2), (a_2,b_1,c_2), (a_2,b_2,c_1)\}$. With the partition $A\cup B\cup C = \{a_1,b_1\}\cup\{a_2,b_2\}\cup\{c_1\}\cup\{c_2\}$.
{ "domain": "cstheory.stackexchange", "id": 5225, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory, matching, bipartite-graphs, examples", "url": null }
cosmology, black-holes, event-horizon, cosmological-constant, anti-de-sitter-spacetime Also, is AdS's inability to admit global Cauchy slices is relavent to my question? Because of the lack of Cauchy slices, even if one were to perturb an entire spatial slice of pure AdS with dust that alone is not enough to determine the future of the manifold. Independent boundary conditions need to be applied. I found an answer to a variation to my own question in an article from 1997 by Jose P.S. Lemos called "Gravitational collapse to toroidal, cylindrical and planar black holes", arXiv:gr-qc/9709013. Lemos patches a dust filled, $k=0$, $-\Lambda$ FLRW metric to an exterior AdS-Vaidya BH metric with a flat horizon that can have the topology of a plane, a cylinder, or a flat-torus. Below is the BH metric re-formulated to emphasize the planar case: $$ ds^2 = -(\alpha z^2 - \frac{2 m(v)}{\alpha z})dv^2 + 2dvdz + z^2(dx^2+dy^2)$$ $\alpha = \frac{-\Lambda}{3}, -∞<v<∞, -∞<x<∞ ,-∞<y<∞ ,0<z<∞$ Lemos then matches that AdS-Vaidya metric to a flat interior FLRW metric:
{ "domain": "physics.stackexchange", "id": 99234, "lm_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, black-holes, event-horizon, cosmological-constant, anti-de-sitter-spacetime", "url": null }
nuclear-physics, atomic-physics OTOH you could just transmute long lived nuclear isotopes by irradiating them with neutrons into isotopes that undergo radioactive decay (alpha, beta, etc, which is different than fission) in a short time into stable isotopes. It would have to be researched which isotopes are best suited for trarnsmutation as there is only a limited amount of excess neutrons available in a nuclear reactor, as some neutrons are required to keep up the chain reaction. Actually, the fission products are relatively short lived compared to actinides produced by neutron capture of reactor fuel without fissioning them. These could be bred to fissile material.
{ "domain": "physics.stackexchange", "id": 22559, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nuclear-physics, atomic-physics", "url": null }
fl.formal-languages, tree, grammars, context-free $S_t\Rightarrow F(a,b,c)$, $yield(F(a,b,c))=abc$ $S_t\Rightarrow F(a,b,c)\Rightarrow F(A(a,a),B(b,b),C(c,c))$, $yield(F(A(a,a),B(b,b),C(c,c)))=aabbcc$ $S_t\Rightarrow F(a,b,c)\Rightarrow F(A(a,a),B(b,b),C(c,c))\Rightarrow F(A(a,A(a,a)),B(b,B(b,b)),C(c,C(c,c)))$, and so on.
{ "domain": "cstheory.stackexchange", "id": 3855, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fl.formal-languages, tree, grammars, context-free", "url": null }
(I type with 2 x 1.5 fingers and still one hand is often too quick for the other one) . So all's good that ends good. That 216 = 144 + 72 Is a nice reassurance in this exercise ! Well done! 14. Apr 26, 2015 ### uzman1243 where are you getting the 144 from? 15. Apr 26, 2015 ### BvU A most reliable source: post #8. And it's not a difficult calculation, so I did it too. 16. Apr 26, 2015 ### uzman1243 I don't get it. using divergence theorem I get 216pi. Using the surface integrals I get 72pi. The answer to solving using surface integrals should give me the same answer as using divergence theorem (provided it's a close surface). 17. Apr 26, 2015 ### BvU Using the divergence theorem you get 216$\;\pi$. The top and bottom surface give 144$\;\pi$. The exercise wants only the side surface (although it doesn't state that all too explicitly, I must admit).
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241982893258, "lm_q1q2_score": 0.8180079494323838, "lm_q2_score": 0.8438951084436077, "openwebmath_perplexity": 1277.931259700832, "openwebmath_score": 0.8698258996009827, "tags": null, "url": "https://www.physicsforums.com/threads/using-divergence-theorem.810435/" }
gkx9drym2122, 71p7u2rfnhfoq, z588pctnzyn, ju4rc0hx0icvwq, jsqbutz93yg, b734tut6fr7b, 9mt38odzw9, o0ztx3luk08i, ex9qs8j3jwxb, 7xuti72p5nncg, yhi81w9vfgqph, olncandzx5, p90msbj6xf, nopeovk3om, k9glcwy2gk2d9, kb18144onlz, v1ca5jaxdlvf, c347o2sn39yy1, kynj6wparu1t2w, lweioejt5mfju, ta37zvtfsdx4d, mzhijuetgfg, bdzc5hxfqml5, 23y4pl4t3pz, 7nk7dlwgt8h2j, bvqvq9hd24, a514vkbjdsg, t8ilza3p6j, srsufatq7rboz
{ "domain": "tuningfly.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.988491850596674, "lm_q1q2_score": 0.8673786582643681, "lm_q2_score": 0.8774767922879693, "openwebmath_perplexity": 521.5547638858176, "openwebmath_score": 0.8494910001754761, "tags": null, "url": "http://tuningfly.it/ikjw/cosine-function.html" }
that evening, what was the average speed for the entire trip? Distance/Time = average speed D/T = 40 (1) The trip from Townsend to Smallville took 50% longer than the trip from Smallville to Townsend. We're looking for the total time here. In other words, we want to know the total distance/total time (the distance to and from and the speed to and from) We know that the distance is the same for both trips so that can be represented as 2d. Because we don't know the distance, to find time we will have to get distance/speed = time. Total distance = 2d Total time = time from T to S = time from S to T. Time = distance/speed. We know that the speed from T to S was 50% more than from S to T which means that the speed from S to T was 50% greater (i.e. 40 + 40*.5 = 60MPH) Total Distance/Total Time = total average 2d/([d/40] + [d/60]) = total average 2d/([3d/120 + [2d/120]) = total average 2d/(5d/120) = total average 2d * 120/5d 240d/5d d=48 If we plug 48 into d/t = 40 then we can get a value for
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8104789155369047, "lm_q2_score": 0.8104789155369047, "openwebmath_perplexity": 7161.611365800858, "openwebmath_score": 0.675899088382721, "tags": null, "url": "https://gmatclub.com/forum/if-a-car-traveled-from-townsend-to-smallville-at-an-average-122843.html" }
meteorology, models, atmosphere-modelling, wrf Title: Running WRF with ECMWF GRIB2 model levels ECMWF model data comes in a hybrid GRIB format, that is, model level output is stored in GRIB2 messages, whereas surface data still uses GRIB1 format. Ungrib is unable to understand this hybrid GRIB format. Previous posts referred to ECMWF's grib-api which should be able to convert GRIB2 to GRIB1, but this doesn't seem to work since the 2013 update when 137 model levels were introduced. So my question is, how to get it working again? I finally solved this problem with the following steps:
{ "domain": "earthscience.stackexchange", "id": 984, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "meteorology, models, atmosphere-modelling, wrf", "url": null }
c#, beginner, classes, math-expression-eval, calculator This method should just return a boolean. So we still need to parse the given input into a string array, to get the same result which the original code did return. The flow can be like If the current char is an operator, it can be added to the array (or better use a IList respective List). If the char is either a number or a decimal separator it can be added to a separate array/List<T> until the current char is an operator. Then it can be added to the former array/List<T> and gets cleared afterwards. The last step is after the e.g loop to add the remaining number or a decimal separator to the result value. Please check your other methods also regarding SRP. Like e.g solveAndPrint().
{ "domain": "codereview.stackexchange", "id": 10155, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner, classes, math-expression-eval, calculator", "url": null }
organic-chemistry, reaction-mechanism Title: Mechanism of rearrangement reaction found in synthesis of retinol Today I was solving a problem that was about the synthesis of retinol. This is a step I didn't understand: In the solution, it's written that the mechanism goes through this intermediate: I have not seen anything like this yet. When trying to propose a mechanism, especially one where the bond changes are not obvious, I like to start by numbering the atoms of the product and trying to map them to the reactants. Here, I've taken the numbering given by ChemDraw for the product and translated it to the reactant.
{ "domain": "chemistry.stackexchange", "id": 7989, "lm_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, reaction-mechanism", "url": null }
c#, asp.net-mvc-4 Title: Setting new lines and adding them to a list to be drawn I have a method that basically passes in a known drawn line segment in my view and then draws parallel lines n distances away from the passed in original line. This one in particular draws two parallel lines on either side. It seems to be a lot of repeat code here, so how can I refactor it to a smaller method and avoid redundancy? public List<Line> DrawTwoParallelLines(Line line) { List<Line> listOfParallelLines = new List<Line>(); Line parallelLine1 = new Line(); Line parallelLine2 = new Line(); Line parallelLine3 = new Line(); Line parallelLine4 = new Line(); parallelLine1.point1.x =(float)(line.point1.x + 50 * Math.Cos(90)); parallelLine1.point1.y = (float)(line.point1.y + 0 * Math.Cos(90)); parallelLine1.point2.x = (float)(line.point2.x + 50 * Math.Cos(90)); parallelLine1.point2.y = (float)(line.point2.y + 0 * Math.Cos(90));
{ "domain": "codereview.stackexchange", "id": 13687, "lm_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#, asp.net-mvc-4", "url": null }
c++, object-oriented, game, sfml, snake-game //Check if the snake has collided with something: for (int i = signed(snakeBodyPartLocations.size() - 1); i >= 0; --i) { //If any of the body parts collide with the border: if ((snakeBodyPartLocations.at(i).x < 1) || (snakeBodyPartLocations.at(i).x > 38) || (snakeBodyPartLocations.at(i).y < 1) || (snakeBodyPartLocations.at(i).y > 38)) { reset(); //Reset the grid } //If any of the body parts collide with the snake's head: if ((i != 0) && (snakeBodyPartLocations.at(0).x == snakeBodyPartLocations.at(i).x) && (snakeBodyPartLocations.at(0).y == snakeBodyPartLocations.at(i).y)) { reset(); //Reset the grid } }
{ "domain": "codereview.stackexchange", "id": 14839, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, game, sfml, snake-game", "url": null }
organic-chemistry, inorganic-chemistry, ions, organosulfur-compounds Recently, we have succeeded in the first isolation and structural determination of bis(2,2′-biphenylylene)sulfurane [10-S-4(C4)] (1) as a stable sulfurane(IV) having only carbon ligands.[…] We considered that this sulfurane would be a suitable precursor to provide the desired dication. Therefore, we tried the reaction of bis(2,2′-biphenylylene)sulfurane (1) with xenon difluoride ($\ce{XeF2}$) in the presence of $\ce{BF3 * OEt2}$ and indeed obtained the bis(2,2′-biphenylylene)sulfurane dication, [8-S4(C4)]²⁺ (2) as an amazingly stable bis(tetrafluoroborate) salt.[…] Here, we communicate the first isolation and structural determination of bis(2,2′-biphenylylene)sulfurane dication (2) having only carbon ligands. […]
{ "domain": "chemistry.stackexchange", "id": 11908, "lm_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, inorganic-chemistry, ions, organosulfur-compounds", "url": null }
complexity-theory, space-complexity, nondeterminism, kleene-star Given a directed graph $G$, we can encode it as a list of edges in the following way: $$ (x_1,y_1)(x_1,y_1)|(x_2,y_2)(x_2,y_2)|\cdots|(x_m,y_m)(x_m,y_m) $$ where $x_i,y_i$ are vertex numbers encoded in binary. Furthermore, this string, which we denote by $\langle G \rangle$, can be output by a logspace machine. Suppose now that we are given two vertices $s,t$, and that there is an $s$-$t$ path of length $\ell$ of the form $(s,x),\ldots,(y,t)$ in $G$. Then I claim that for all $L \geq \ell$, $$ (s,x)|\langle G \rangle^L|(y,t) \in A^*. $$ Conversely, if such a string belongs to $A^*$ then there is an $s$-$t$ path in $G$. In other words, $$ \exists \text{$s$-$t$ path in $G$} \longleftrightarrow (s,t) \in G \lor \exists x,y \text{ s.t. } (s,x)|\langle G \rangle^n|(y,t) \in A^*. $$
{ "domain": "cs.stackexchange", "id": 9560, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, space-complexity, nondeterminism, kleene-star", "url": null }
machine-learning, gradient-descent, cost-function Title: Reason for capping Learning Rate (alpha) up to 1 for Gradient Descent I am learning to implement Gradient Descent algorithm in Python and came across the problem of selecting the right learning rate. I have learned that learning rates are usually selected up to 1 (Andrew Ng's Machine Learning course). But for curiosity reasons, I have tried alpha = 1.1 and alpha = 1.2.
{ "domain": "datascience.stackexchange", "id": 7352, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, gradient-descent, cost-function", "url": null }
navigation, rviz, move-base, amcl Title: displaying the robot's actual trajectory in RViz Hi all, I have a mobile robot which is navigating around a room, I already have the map of the room. I am using rotary encoders for odometry. I am fusing the data from Rotary encoders and IMU using robot_pose_ekf. I am using amcl for localization and move_base for planning with SBPL Lattice Planner as the global planner and Trajectory Planner as the local planner. Now when I run RViz, I can visualize the global plan (desired trajectory) generated by move_base but I would also like to visualize the actual trajectory (based on odometry data and amcl) followed by the robot in RViz. I want to do this so that I can see how much is the actual trajectory different from the desired trajectory. Is there any package in ROS which does this (I am not able to find any such package)? If not, what is the best way to visualize the robot's actual trajectory in RViz? Any help will be appreciated. Thanks in advance. Naman Kumar
{ "domain": "robotics.stackexchange", "id": 22111, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, rviz, move-base, amcl", "url": null }
python, pandas CARDINALITY_THRESHOLD = 2 breached = df.columns[df.nunique() > CARDINALITY_THRESHOLD] df[breached] = df[breached].apply(pd.to_numeric, errors='coerce') >>> df.dtypes # col1 int64 # col2 object # dtype: object I think it would be good to check if column values are numeric though. Note that to_numeric already skips numeric columns, so it's simplest to just let pandas handle it. If you still want to explicitly exclude numeric columns: Use DataFrame.select_dtypes to get the non-numeric columns Use Index.intersection to get the non-numeric breached columns breached = df.columns[df.nunique() > CARDINALITY_THRESHOLD] non_numeric = df.select_dtypes(exclude='number').columns cols = non_numeric.intersection(breached) df[cols] = df[cols].apply(pd.to_numeric, errors='coerce')
{ "domain": "codereview.stackexchange", "id": 43096, "lm_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, pandas", "url": null }
electrons, measurements Title: How accurately can you count electrons? I read that with modern technology they can now shoot one electron at a time. Can you tell me how accurately it is possible to count charges, how it is made and how they did this in the past? How do you determine a statcoulomb ($2 \times 10^8$) static charges or a Coulomb ($6.24 \times 10^{18}$) moving charges? You are probably referring to the Feynman-style double-slit experiment, done with individual electrons. A recent experimental realization of this was reported in Controlled double-slit electron diffraction. R Bach et al. N. J. Phys. 15 033018 (2013) (open access). and it is described in more readable detail in Feynman's double-slit experiment gets a makeover. H Johnston, Physics World, 14 March 2013. The experimental data looks like this, which you might recognize:
{ "domain": "physics.stackexchange", "id": 25006, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrons, measurements", "url": null }
quantum-mechanics, path-integral Anyway, to make the Wick rotation a bit clearer, recall that Schrödinger equation is a kind of diffusion equation but for an introduction of complex numbers. And then just come back to the beginning and note that diffusion equation is macroscopic equation that captures the mean behavior of the random walk. (But this is not to say that path integral in any way depends on the Schrödingerian, non-relativistic physics) Others There were other approaches to define the path-integral rigorously. They propose some set of axioms that path-integral has to obey and continue from there. To my knowledge (but I'd like to be wrong), all of these approaches are too constraining (they don't describe most of physically interesting situations). But if you'd like I can dig up some references.
{ "domain": "physics.stackexchange", "id": 22806, "lm_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, path-integral", "url": null }
semiconductor-physics, electronic-band-theory To be strictly correct, it is more appropiate to say that the semiconductor "has degenerate electron statistics" when said statistics are only appropiately described by a Fermi-Dirac distribution at thermal equilibrium, which is the case when the semiconductor is highly doped. However, the phrase "degenerate semiconductor" is considered acceptable shorthand for the term "semiconductor with degenerate electron statistics".
{ "domain": "physics.stackexchange", "id": 45694, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "semiconductor-physics, electronic-band-theory", "url": null }
control, wifi, teleop, robot, keyboard-teleop Originally posted by Peter Listov with karma: 338 on 2012-12-19 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by SL Remy on 2012-12-20: You can choose to update only two of the 6 geometry_msgs/Twist parameters (the angular z for the "left and right" and the linear x for the "forward and back")
{ "domain": "robotics.stackexchange", "id": 12165, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "control, wifi, teleop, robot, keyboard-teleop", "url": null }
terminology, computer-architecture, memory-management, memory-access Main question: What is the precise term for the smallest addressable memory block? Side question: What is the antonym to this word I'm looking for (e.g. used in NAND-flash)? Page-addressable, block-addressable? Are both correct or is one inprecise? From a computer architecture point of view, and with the caveat that nomenclature sometimes varies, especially when there is a family of related architectures which has evolved for a long time, or when the marketing department decides to that the usual terms have to used in another way (either to put the product in better light by using a bigger number, or to have a simple number to differentiate more or less related products).
{ "domain": "cs.stackexchange", "id": 7974, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "terminology, computer-architecture, memory-management, memory-access", "url": null }
c++, collections, c++17, circular-list, constant-expression const T * ptr() const noexcept { return reinterpret_cast<const T*>(raw_buffer.get()); } T& operator[](size_t pos) noexcept { return ptr()[pos]; } }; template <class T, bool reverse = false, bool const_iter = false> class ring_buffer_iterator { T *ptr; ring_buffer_index index; size_t N; public: PROVIDE_CONTAINER_TYPES(T); using iterator_category = std::random_access_iterator_tag; ring_buffer_iterator(T *ptr, ring_buffer_index index, size_t N) : ptr{ ptr }, index{ index }, N{ N } {} ring_buffer_iterator& operator++() { if constexpr (!reverse) ++index; else --index; return *this; } ring_buffer_iterator& operator+=(size_t n) { index += n; return *this; } ring_buffer_iterator& operator-=(size_t n) { return operator+=(-n); }
{ "domain": "codereview.stackexchange", "id": 45178, "lm_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++, collections, c++17, circular-list, constant-expression", "url": null }
# Length of the curve $\displaystyle 3ay^2=x(x-a)^2$ I'm working on finding out the length of the curve $$3ay^2=x(x-a)^2 \tag{1}$$ I ran into a small problem, but was able to end up with an answer that looks right but I'm not entirely sure about it. Here's my approach: The length of a curve $$f(x)$$ between $$x=a$$ and $$x=b$$ where $$b>a$$, is given by $$L=\int_a^b\sqrt{1+\big[f'(x)\big]^2}dx$$ where $$f'(x)$$ is continuous in $$[a,b]$$. In our case $$L=\int_0^x\sqrt{1+\big[y'\big]^2}dt \tag{2}$$ Curve $$(1)$$ is symmetric about the $$x$$-axis. Hence I'll just work on the length of the part that is above the $$x$$-axis and then double that to obtain the entire length. $$y=(x-a)\sqrt{\frac{x}{3a}} \text{ (One half of the curve, the other half being the negative multiple)}$$ Note that $$(1)$$ is defined for $$x\geq0$$ and $$a>0$$. That is why I've taken the limits of integration as $$0$$ to $$x$$. Therefore, $$y'=\frac{3x-a}{\sqrt{12ax}}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226267447513, "lm_q1q2_score": 0.8825388702906747, "lm_q2_score": 0.9032941982430048, "openwebmath_perplexity": 230.72393468313726, "openwebmath_score": 0.9836865067481995, "tags": null, "url": "https://math.stackexchange.com/questions/4267377/length-of-the-curve-displaystyle-3ay2-xx-a2" }
general-relativity, black-holes, gravitational-waves, event-horizon The question is how did the BHs mass get reduced? The system of two black holes has a mass parameter that is not the sum of the parameters of the parts. No real system has a mass parameter that is exactly the sum of the parameters of the parts. The system has some parts that get closer and that move. By slowing them down relative to each other you can reduce the parameter of the system. And that is what happens. Sure, they speed up. But they get slowed down compared to how much they would have sped up without the waves. Did some virtual negative mass particles fall into the BH No. And mass isn't the sum of the masses of the parts, so negative mass particles and a conserved additive mass isn't the way to think about anything. So, if not that, how does the negative potential binding mutual gravitational energy of the two BHs steal mass from the binaries?
{ "domain": "physics.stackexchange", "id": 28651, "lm_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, black-holes, gravitational-waves, event-horizon", "url": null }
javascript, time-limit-exceeded, adobe-illustrator start(); function start() { try { recurseLayers ( docLayers ); var result = currentLayers.sort( function(a,b) { return a > b } ); sortLayer(allLayers, result); alert("Done sorting!"); } catch (error){ logger(error); } } function addLayer(currentLayer) { var layerName; if (currentLayer.typename == 'TextFrame') { layerName = currentLayer.contents; } else { layerName = currentLayer.name; } currentLayers.push(layerName); allLayers.push(currentLayer); return currentLayers; } function sortLayer (obj, array) { try { var length = array.length; for (var i=length; i--;) { var name = array[i]; var item = search(obj, name);
{ "domain": "codereview.stackexchange", "id": 24012, "lm_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, time-limit-exceeded, adobe-illustrator", "url": null }
objective-functions, gradient-descent, regularization, gradient-clipping I should also note: there is an entirely different approach to multi objective optimization called Pareto Optimality, where instead of simply combining the losses in one particular way, we analyze a set of different ways of combining the objectives and their trade-offs. For more info, this is a good starting point: https://en.wikipedia.org/wiki/Pareto_front
{ "domain": "ai.stackexchange", "id": 3821, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-functions, gradient-descent, regularization, gradient-clipping", "url": null }
ds.algorithms, greedy-algorithms Title: Is it possible to prove that, for a given problem, no optimal greedy algorithms exist? Greedy is a non-formal term, but it could be (not sure, that's why I'm asking) that for certain problems, greediness can be mathematically formulated and thus be proven that no optimal greedy algorithm exist. Is this possible? The simplest thing to do would be to set up the greedy algorithm for the problem, and then look for a counter-example. If you find one, you've got your answer. Otherwise there are many ways of proving that greed works. There are some issues with this, of course (such as how specifically to formulate the greedy algorithm). As for characterizing which problems can and which problems can't be solved greedily, there is a general answer to that, too.
{ "domain": "cstheory.stackexchange", "id": 865, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ds.algorithms, greedy-algorithms", "url": null }
newtonian-mechanics, newtonian-gravity, pressure, fluid-statics Title: Is force of gravity the same in the water? We know that $$ F_n = m*a $$ where $F$ is a net force. From this equation and gravity law, we can get $a = g=9.8$ for which case we mention $F = m*g$. But This is only true when an object is falling and there's no upward force exerting on it. The reason I'm saying this is we derive it from the following: $$\large m * a = \frac{G * M * m}{r^2}$$ Note that if there was any other force exerting on an object upward, the above equation wouldn't be true, as the left side of the equation is the net force, while the right side is only downard force. So we conclude that F = mg is only true when there's only gravity force exerting on an object downward
{ "domain": "physics.stackexchange", "id": 94790, "lm_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, newtonian-gravity, pressure, fluid-statics", "url": null }
and thus always zero except for the constant $$P_{0}(x)=1$$. For further mathematical properties of the Legendre polynomials see for example the Wikipedia page. Examples Here we employ a Legendre expansion of order 20 over the interval -4.0 to 8.0. This results in a total number of 21 basis functions. The label used to identify the basis function action can then be referenced later on in the input file. Click on the labels of the actions for more information on what each action computes bf_leg: BF_LEGENDRE MINIMUMcompulsory keyword The minimum of the interval on which the basis functions are defined. =-4.0 MAXIMUMcompulsory keyword The maximum of the interval on which the basis functions are defined. =8.0 ORDERcompulsory keyword The order of the basis function expansion. =20
{ "domain": "plumed.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682451330957, "lm_q1q2_score": 0.8217247447834388, "lm_q2_score": 0.831143054132195, "openwebmath_perplexity": 452.9429762851202, "openwebmath_score": 0.995615541934967, "tags": null, "url": "https://www.plumed.org/doc-master/user-doc/html/_b_f__l_e_g_e_n_d_r_e.html" }
javascript, css, html5, canvas, snake-game let generateApple = function() { .. } when you put that code in the global scope it is the same like function generateApple() { .. } Where the latter is a bit more readable in my opinion. 2) Global functions 2 You are using global functions most of the time - that allows you to call everything from everywhere and makes your program look like a bow of spaghetti. No offense I love it .. however in the long term makes your code hard to read and maintain. I'd suggest you to keep your code separated in namespaces classes at least. var Core={}; Core.prototype.generateApple = function() { .. } Core.prototype.checkForCollisions = function() { .. } var UI = {}; UI.prototype.draw = function() { .. } This will allow you to have separation of concerns and will help you understand and maintain your own code better. 3) Naming conventions function loop() { .. } // Is expected to have a loop inside
{ "domain": "codereview.stackexchange", "id": 21057, "lm_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, css, html5, canvas, snake-game", "url": null }
python, optimization, python-2.x, networking, twisted Title: Decoding custom packets with Python using Twisted This server require fast decoding of packets from clients, as I am expecting 5000 concurrent clients that is sending packets possibly every second. This is a game server (5000 players walking send packets each n every step). I want to see if my implementation is fast enough or there are still room for improvements. The encryption isn't on this code as I only want to tackle the decryption for now. The decode function is taken from a JavaScript implementation, This is the best output I got after trying to translate it. (though the translation is correct because the results are same from JavaScript and now Python) def dataReceived(self, data): packet = decode(data) (counter, packet_id, username, password, unknown) = unpack('<B H 16s 16s 16s', packet) print counter print packet_id print username print password print unknown
{ "domain": "codereview.stackexchange", "id": 17227, "lm_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, optimization, python-2.x, networking, twisted", "url": null }
convolution or, using perhaps better "variable names" $$h(t) \propto f(t_d-t) \text{where} \ \ t \ \ \text{is time and} \ \ t_d \ \ \text{is the delay}$$ That is, if we want to maximize the correlation between our signal detector with impulse h(t), we better pick h(t) to be a time-reversed and time-shifted version of our signal of interest. In practice $t_d$ would probably be set to zero, as it just represents whenever the $f$ part that you're looking for finally arrives. Under this chosen $h(t) \propto f(t_d - t)$, your original question makes more sense. The autocorrelation signal becomes proportional to the accumulated energy of $f(t)$ that is seen by your filter. $y(t) = f(t) \ast h(t)$ $y(t) \propto \int f(\tau) h(t-\tau)d\tau$ $y(t) = \int f(\tau) f(t_d-(t+\tau))d\tau$ $y(t) = \int f(\tau) f(\tau + t_d - t)d\tau$ $y(t) = \int P_f(\tau + t_d - t)d\tau$
{ "domain": "dsp.stackexchange", "id": 2577, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "convolution", "url": null }
javascript const reduced = dbData.reduce((acc, row) => { const { studyId, siteId, status, current, total } = row; const idx = acc.findIndex(x => studyId === x.studyId && siteId === x.siteId); const item = idx === -1 ? { studyId, siteId, currents: {}, totals: {} } : { ...acc[idx] }; item.currents[status] = item.currents[status] ? item.currents[status] + current : current; item.totals[status] = item.totals[status] ? item.totals[status] + total : total; if (idx === -1) { acc.push(item); } else { acc[idx] = item; } return acc; }, []); console.log(reduced); A couple of things that can be simplified/refactored: Conditionals can be reduced to improve code readability. No need to clone an object if it already exists. Instead, we can just update the currents and totals properties.
{ "domain": "codereview.stackexchange", "id": 43327, "lm_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", "url": null }
formatting, postscript % "hard" return /heol { ( ) setword } % type the daughter line unjustified /blank { justblank not { [ /eol cvx /justify? justify? /store cvx ] cvx /justify? false store exec /Y lead .5 mul -= /justblank true store } if } /countspaces { 0 currentline first 0 get 0 exch getinterval { 0 get %( ) eq { 1 add } if { 32 eq { 1 add } if } forall } forall %spacecount = %dup = /spacecount exch store } /countchars { 0 currentline first 0 get 0 exch getinterval { 0 get length add } forall /charcount exch store }
{ "domain": "codereview.stackexchange", "id": 42685, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formatting, postscript", "url": null }
lies in given range. close, link Experience. Attention reader! Check if it is possible to create a polygon with a given angle, Data Structures and Algorithms – Self Paced Course, Ad-Free Experience – GeeksforGeeks Premium, We use cookies to ensure you have the best browsing experience on our website. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. Between every two hours they are perpendicular to each other two times except between 2, 3 and 3, 4 and 8, … Find minimum angle between minute hand and hour hand of analog clock. Learn new things. C. 5° D. 20° Find the number of times the hour hand and the minute hand of a clock are at right angle in a day. In this Video Cover, Basic Information Angle Between Min Hand and Hour Hand (Hindi) Problems on Clocks - NTSE. brightness_4 So,angle between them =300-205=95 degrees ), If  θ degrees is the angle between minutes and hours clock,then, θ= |30*x-11*y/2|
{ "domain": "wefaak.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9511422186079557, "lm_q1q2_score": 0.8006959175823859, "lm_q2_score": 0.8418256512199033, "openwebmath_perplexity": 1103.8116172807556, "openwebmath_score": 0.4751553237438202, "tags": null, "url": "https://www.wefaak.com/cyberpunk-secrets-crcshjx/d977a5-shortcut-to-find-angle-between-hour-and-minute-hand" }
java, sorting Comments Commenting the code is good, but too many comments can make a simple function look complicated. The general rule is that code tells you how, comments tell you why. For example, I think int min = this.num_sort.get(i); does not need to be commented; it's pretty clear that you are getting the i-th item of the list. Also, leave a whitespace between // and the text, it's more readable. Code structure It does not make sense to have this in a class; new SelectionSort(userlist) is not the way someone would expect to sort a list. I am going to make some recommendations that for the class design, but for the rest of the review I will restructurate the code so that it is more conventional. As a user I expect select_sort to sort the list and that's all; I decide whether I want to print the list or not (what if I want to print it differently to you?). So you should move the printing code to the main function. Class design
{ "domain": "codereview.stackexchange", "id": 35521, "lm_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, sorting", "url": null }
for solving a problem governed by Navier-Stokes and heat equations. Solving the 2D heat equation with inhomogenous B. Back to Laplace equation, we will solve a simple 2-D heat conduction problem using Python in the next section. Suppose heat is lost from the lateral surface of a thin rod. 5 6 FEM in 2-D: the Poisson equation. 0%; Branch: master. 4 5 FEM in 1-D: heat equation for a cylindrical rod.
{ "domain": "lasalsese.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631623133666, "lm_q1q2_score": 0.8087125814009092, "lm_q2_score": 0.8198933337131076, "openwebmath_perplexity": 703.8732531495101, "openwebmath_score": 0.6489722728729248, "tags": null, "url": "http://ygig.lasalsese.it/2d-heat-equation-solver.html" }
python, python-3.x, file if searcrhForStartString: while not any(keyword in line for keyword in startStrings): lineNumber += 1 if lineNumber == len(lines): if errorOnEndOfLines: result.clear() return result line = lines[lineNumber] #serach string matched, if requested, so advance one line to skip it lineNumber += 1 line = lines[lineNumber] # Line number now indexes the first line of what we want to return while lineNumber < len(lines): if any(keyword in line for keyword in endStrings): return result result.append(line) lineNumber += 1 if not lineNumber == len(lines): line = lines[lineNumber] if lineNumber == len(lines): if errorOnEndOfLines: result.clear() return result
{ "domain": "codereview.stackexchange", "id": 33586, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, file", "url": null }
javascript, comparative-review console.log(step); } } numberStepper(4) // Gives desired output How can I refactor this function to have a clean implementation? Any ideas on the first implementation? where the argument determines the numbers displayed in the steps instead of using the number of steps as the determinant of the numbers displayed? functions should return a value It's unprofessional to use console.log for the output of a function. It's better to think of functions as a blackbox where you give it an input and it spits back an output. If you were to write unit tests for your function, you would have to go out of your way to either mock console.log to see if it's used properly or to read directly from stdout. Those aren't the easiest options. give meaningful variable and function names It's not intuitively easy to understand what the variable names are intended to represent. For example, step should probably be renamed to row or numbersOnRow or even rowString.
{ "domain": "codereview.stackexchange", "id": 43531, "lm_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, comparative-review", "url": null }
security, bash, linux, unix, macos } # Linux install, Pt. 0 function linuxInstallPt0() { $white; $bold; echo echo "[*] $($stopAllFX; $bgBlack; $white)Is $($bold)macchanger$($stopAllFX; $bgBlack; $white) installed on this device?:" $yellow; $bold; echo " [$($white)0$($yellow)] $($stopAllFX; $bgBlack; $white)Yes" $yellow; $bold; echo " [$($white)1$($yellow)] $($stopAllFX; $bgBlack; $white)No" $yellow; $bold; echo " [$($white)2$($yellow)] $($stopAllFX; $bgBlack; $white)IDK" read -p ">>> " macchangerInstalled if [[ "$macchangerInstalled" == "0" ]]; then macchangerInstalled="Yes" linuxInstallPt1 elif [[ "$macchangerInstalled" == "1" ]]; then macchangerInstalled="No" linuxInstallPt1 elif [[ "$macchangerInstalled" == "2" ]]; then macchangerInstalled="IDK" linuxInstallPt1 else macInstallPt0 fi } # MacOS install, Pt. 3 function macInstallPt3() { $white; $bold; echo
{ "domain": "codereview.stackexchange", "id": 25693, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "security, bash, linux, unix, macos", "url": null }
bool neg_flag = true;//是否全部是负数 for(int i = 0; i < n; i ++) if(buf[i] >= 0) { neg_flag = false; break; } if(neg_flag) { printf("0 %d %d\n", buf[0], buf[n-1]); return 0; } int start, end; int max = -1, tmp_sum = 0; for(int i = 0; i < n; i ++) { tmp_sum += buf[i]; if(tmp_sum > max) { max = tmp_sum; end = i; } else if(tmp_sum < 0) tmp_sum = 0; } max = -1, tmp_sum = 0; for(int i = end; i >= 0; i --) { tmp_sum += buf[i]; if(tmp_sum > max) { max = tmp_sum; start = i; } } printf("%d %d %d\n", max, buf[start], buf[end]); return 0; } • 本文已收录于以下专栏: ## pat PAT (Advanced Level) Practise 1007. Maximum Subsequence Sum (25) 1007. Maximum Subsequence Sum (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 ... ## 【PAT Advanced Level】1007. Maximum Subsequence Sum (25) • gzxcyy • 2013年10月14日 14:23 • 828 ## PAT - 甲级 - 1007. Maximum Subsequence Sum (25) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, ... ## 1007.Maximum Subsequence Sum
{ "domain": "csdn.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9381240177362488, "lm_q1q2_score": 0.8010760573637591, "lm_q2_score": 0.853912747375134, "openwebmath_perplexity": 5419.411773715861, "openwebmath_score": 0.3704994320869446, "tags": null, "url": "http://blog.csdn.net/caicai_zju/article/details/49947817" }
organic-chemistry, acid-base, carbonyl-compounds, tautomer Title: Why are the secondary alpha hydrogens more acidic than primary alpha hydrogens (keto-enol tautomerization)? I learned in organic chemistry that secondary/tertiary carbanions are less stable than primary carbanions and therefore primary hydrogens are MORE acidic than secondary/tertiary hydrogens. But lets take 3-methyl-2-butanone as an example. It seems that the more substituted alpha carbon is more acidic than the nearby primary carbon. In other words, it seems that the keto-enol tautomerization prefers to form a C=C with the secondary carbon over the primary carbon.
{ "domain": "chemistry.stackexchange", "id": 6497, "lm_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, acid-base, carbonyl-compounds, tautomer", "url": null }
python This saves you one block of nesting at least. You could also combine your two range calls with itertools.product. product performs a nested loop based on the two iterables it's passed. It essentially creates the exact nested loop you have with just one line: for i, j in itertools.product(range(-index,index+1), range(-index,index+1)): for line in in_file: if not string in line: continue En = line.split().pop(4) for line in in_file: current_line += 1 if current_line == 2*(n+1)+2: x = line.split().pop(10) elif current_line == 3*(n+1)+2: y = line.split().pop(10) elif current_line == 4*(n+1)+2: z = line.split().pop(10) current_line = 0 break print i, j, En, x, y, z data = "%d %d %s %s %s %s\n" % (i,j,En,x,y,z) out_file.write(data) break
{ "domain": "codereview.stackexchange", "id": 16176, "lm_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 }
electromagnetism, electrostatics, electric-fields, conductors Please tell how exactly the $(1)$ comes. $\sigma = dq/dxdy$ and so $\sigma dx = dq/dy$. But the $dq$ here is not the charge over the line of length dy but rather the charge in the rectangle of area dxdy. So the only time $\sigma dx = \lambda$ is when you take the limit that dx approaches zero and then you can add the contribution from each line seperately which is exactly what you did when you performed the integration.
{ "domain": "physics.stackexchange", "id": 79177, "lm_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, electric-fields, conductors", "url": null }
newtonian-mechanics, friction, velocity, angular-velocity A ring of mass $M$, radius $R$, and rotational inertia $MR^2$ is initially sliding on a frictionless surface at a constant velocity $v_0$ to the right. At time $t = 0$ it encounters a surface with coefficient of friction $\mu$ and begins sliding and rotating. After traveling a distance $L$, the ring begins rolling without sliding.
{ "domain": "physics.stackexchange", "id": 21241, "lm_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, friction, velocity, angular-velocity", "url": null }
thermodynamics, temperature, entropy, equilibrium, stability I don't understand...Why would there be a run-away effect? When there's a flow of energy from B to A, the temperature of B increases, which by then means the internal energy of B increases as well. But how can B has its internal energy increases when it is losing some of its energy?? The curve shown in the picture has the property $$\frac{\partial^2 S}{\partial U^2} > 0 $$ so that $$\frac{\partial^2 S}{\partial U^2} = - \frac 1 {T^2} \frac{\partial T}{\partial U} > 0$$ Since $T^2>0$, this means that $$\frac{\partial T}{\partial U} < 0$$ This means that, in this particular system, if we decrease the energy the temperature increases and if we increase the energy the temperature decreases. Let's say that B and A are initially at the same temperature, and that a fluctuation makes a quantity $\delta Q$ of heat flow from B to A. Since B has lost some energy, its temperature will rise. Since A has gained some energy, its temperature will decrease.
{ "domain": "physics.stackexchange", "id": 41000, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, entropy, equilibrium, stability", "url": null }
pcr, coronavirus, primer, covid If that is correct, how do we know that those regions are highly conserved? Mostly by sequence similarity. Regions that have the same sequence in all the individuals of a species and in related (or distant) species are conserved.
{ "domain": "biology.stackexchange", "id": 11223, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pcr, coronavirus, primer, covid", "url": null }
gazebo-ignition Title: Ignition-Physics: Bullet physics engine support? On the Ignition Robotics Roadmap it is mentioned that support for Bullet (Physics Engine) is planned. Is there a timeline for this? Originally posted by Jaldert on Gazebo Answers with karma: 1 on 2020-02-11 Post score: 0 There isn't a fixed timeline yet. We did a good push a while back but now that's on hold given other priorities. You can find the current progress on the following pull requests. If I recall correctly, the main missing piece is mesh support. https://bitbucket.org/ignitionrobotics/ign-physics/pull-requests/99/ https://bitbucket.org/ignitionrobotics/ign-gazebo/pull-requests/421/ Originally posted by chapulina with karma: 7504 on 2020-02-11 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 4474, "lm_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-ignition", "url": null }
general-relativity, black-holes, time, event-horizon, causality For an outside observer the time seems to stop at the event horizon. My intuition suggests, that if it stops there, then it must go backwards inside. Is this the case? But your intuition doesn't seem to take into account that, for an observer falling into the hole, time doesn't stop at the event horizon. The point is that one must be much more careful in their thinking about time within the framework of general relativity where time is a coordinate and coordinates are arbitrary. In fact, within the event horizon, the radial coordinate becomes time-like and the time coordinate becomes space-like. This simply means that, to "back up" inside the event horizon is as impossible as moving backwards in time outside the event horizon. In other words, the essential reason it is impossible to avoid the singularity once within the horizon is precisely that one must move forward through time which, due to the extreme curvature within the horizon, means moving towards the central singularity.
{ "domain": "physics.stackexchange", "id": 99537, "lm_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, black-holes, time, event-horizon, causality", "url": null }
geophysics, models, planetary-science https://www.youtube.com/channel/UCHZ2fjTguMMT0EDGSCcPoEw I'm guessing I'm being sold a bridge with his numbers, but can't tell for sure. You're being sold a bridge with his numbers. If he had done the math correctly he would have obtained a deflection of 33.58 cm at 45° geocentric latitude rather than 17.245 cm. The youtube comments show a number of errors. Two key errors are that the commenter assumes that Local vertical points directly toward the center of the Earth. Gravitational acceleration due to the Earth's mass points in the same direction. What those youtube comments do show is that the Earth is not quite a sphere. A closer approximation is an oblate spheroid. That said, his comments fall into the wronger than wrong category. Quoting Isaac Asimov,
{ "domain": "earthscience.stackexchange", "id": 1855, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geophysics, models, planetary-science", "url": null }
quantum-mechanics Title: Frank Hertz experiment and different jumps Why is it assumed that in this experiment, the jump will be between the second and the first states. Couldn't it be that when the electrons have enough energy, an atom absorbs enough to get to the third state and then jumping only to the second, emiting less energetic light? Isn't this right? Or is it just that the number of electrons that do this is very small compared to the ones that excite the atom to only the second level? I am saying this because I've seen the experiment, and a blue-violet glow is clearly visible when the potential is very high. Unless I have super powers, I cannot explain this, because the light emited from the second to the first level is 4.9 eV is equivalent to light of $\lambda \approx$ 250 nm, clearly out of the visible spectrum. You might be interested in this article, that goes into some detail on what actually happens in the Frank Hertz experiment.
{ "domain": "physics.stackexchange", "id": 7858, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics", "url": null }
filters, frequency, lowpass-filter, continuous-signals, poles-zeros and $20n\textrm{ dB}/\textrm{dec}$, respectively, are asymptotic slopes for large frequencies. So you have to extrapolate the lines that are approximated by the magnitude responses at large frequencies.
{ "domain": "dsp.stackexchange", "id": 6589, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, frequency, lowpass-filter, continuous-signals, poles-zeros", "url": null }
quantum-mechanics, energy, statistical-mechanics, density-of-states \begin{align} H = \begin{pmatrix} \varepsilon & 0 &0\\ 0 & 3\varepsilon &0\\ 0 & 0 & 3\varepsilon \end{pmatrix} \end{align} The partition function in the canonical ensemble is \begin{align} Z &= \text{Tr}\,e^{-\beta H}\\ &= e^{-\beta \varepsilon} + e^{-3\beta \varepsilon} + e^{-3\beta \varepsilon}\\ &= \sum_{i=1}^3e^{-\beta \varepsilon_i},\\ \end{align} where the sum is over all energy eigenvalues. However, we could also write this as a sum over distinct energy eigenvalues \begin{align} Z &= e^{-\beta \varepsilon} + 2e^{-3\beta \varepsilon}\\ &= \sum_{i=1}^2g(\varepsilon_i) e^{-\beta \varepsilon_i},\\ \end{align}
{ "domain": "physics.stackexchange", "id": 78267, "lm_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, energy, statistical-mechanics, density-of-states", "url": null }
rosbag Title: bag migration, fill new field with incrementing counter Is it possible to fill a new message field in an old bag data with an incrementing counter using a bag migration rules file (http://wiki.ros.org/rosbag/migration) and rosbag fix? Originally posted by Wolf on ROS Answers with karma: 7555 on 2015-03-06 Post score: 0 Yep it is (as simple as it should be)! Just create a counter and increment and assign it i update() Snippet of the migration rules class, ( see http://wiki.ros.org/rosbag/migration ) : migrated_types = [ ] valid = True counter = 0 def update(self, old_msg, new_msg): self.counter += 1 new_msg.obj_id = self.counter Originally posted by Wolf with karma: 7555 on 2015-03-06 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 21068, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosbag", "url": null }
python, python-3.x, numpy, clustering You can just use x1, y1 = ref. Put that all together and you get something like: def group_points(points): groups = [] while points: far_points = [] ref = points.pop() groups.append([ref]) for point in points: d = get_distance(ref, point) if d < 30: groups[-1].append(point) else: far_points.append(point)
{ "domain": "codereview.stackexchange", "id": 35324, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, numpy, clustering", "url": null }
@Deepak It seems like you are confusing logical equivalence with equality. The OP is asking about a proof that two things are equal. –  Trevor Wilson Jun 30 '14 at 5:39 OP: What Trevor and David mean is that, when you prove $a = b$ by finding intermediate $c$s, you don't have to worry about "reversible steps", because if $b = c$, then $c = b$. But if you want to prove $a = b$, and you want to "reverse engineer" it by messing with both sides of the equation, and deriving a truth, then you worry about reversibility, because $P \implies Q$ isn't the same as $Q \implies P$. –  Henry Swanson Jun 30 '14 at 14:05
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.971129090546975, "lm_q1q2_score": 0.8488418431955752, "lm_q2_score": 0.8740772482857833, "openwebmath_perplexity": 345.40709498610687, "openwebmath_score": 0.8500893712043762, "tags": null, "url": "http://math.stackexchange.com/questions/851830/is-it-okay-to-reverse-engineer-proofs-in-homework-questions" }
fft, amplitude The question as posted seems to be based on a misleading model of how this actually works. The Discrete Fourier Transform (DFT), which is what Goertzel is implementing, expresses a time domain signal as the sum of weight complex sine waves. The Fourier coefficients are complex too: the have magnitude and a phase, i.e. $$X[k] = A_k \cdot e^{j\varphi}, X[k] \in \mathbb{C}, A_k \in \mathbb{R}, A_k \ge 0, \varphi \in \mathbb{R}$$ The magnitude is always positive and the phase is an angle (typically from $[-\pi, \pi]$) and not just a binary plus/minus. Disclaimer: for the rest of the discussion we'll ignore spectral leakage. For a cosine the phase of the DFT will simply be zero. For a sine it's $-\pi/2$ for a negative sine it's $-\pi/2$ and for a negative cosine it's $-\pi$ or $+\pi$ (which is the same angle). This is simply a consequence of $$ \cos(\omega t) = -\cos(\omega t - \pi) = \sin(\omega t - \pi/2) = -\sin(\omega t + \pi/2) $$
{ "domain": "dsp.stackexchange", "id": 12180, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, amplitude", "url": null }
thermodynamics The equation in question is shown below: So here's what I know: D refers to the outer diameter of the inner pipe (r2*2) L refers to the length of your pipe $h_o$ is the overall heat transfer coeffcient $deltaT_{lm}$ refers to the log-mean temperature difference We need the log mean temperature difference because we are dealing with cylindrical coordinates (similar to normal temperature difference for Cartesian coordinates). Derivation is in the article We are defining an overall heat transfer coefficient as we see fit and people just happen to use the outer surface area of the inner pipe for the area when defining the overall heat transfer coefficient Here's what I don't know:
{ "domain": "physics.stackexchange", "id": 42107, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics", "url": null }
(b) Show that if $\sum a_n$ converges, then $$\lim_{n \rightarrow \infty} \frac{1}{n} \sum_{k=1}^n ka_k = 0.$$ Unfortunately I am having trouble proving part (b). I believe that the assumption that the series $\sum a_n$ converges tells us that the sequence $na_n \rightarrow 0$, i.e. that the sequence $a_n$ converges fairly quickly to zero. If this is the case, I can invoke the result in part (a) and conclude but I am not sure how to proceed. I've seen an extremely similar question asked here: Series converges implies $\lim{n a_n} = 0$ but this question does not place any assumptions on the monotonicity on the sequence $a_n$. • I think that part b) can be solved with summation by parts (not totally sure). The derived sequence of part a) is named Césaro sum. – Masacroso Apr 30 '17 at 0:28 For part (b), assume $S_n = \sum_{j=1}^n a_j \to S$ as $n \to \infty.$ We have
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713865827591, "lm_q1q2_score": 0.821050877457385, "lm_q2_score": 0.8333245932423308, "openwebmath_perplexity": 244.6354927929382, "openwebmath_score": 1.0000075101852417, "tags": null, "url": "https://math.stackexchange.com/questions/2258370/convergence-of-series-implies-convergence-of-related-series" }
special-relativity, spacetime, speed-of-light, history, lorentz-symmetry For sure, Einstein didn't discover (invent) the transformations. He "only" showed that they follow from the constancy of the speed of light in every inertial frame. There's indeed some controversy over exactly how much credit to give, but Einstein really did make an important independent contribution. Lorentz thought about the transformations as being due to ether: in his model the ether physically squeezed objects smaller and interfered with measurements of time. Einstein just postulated that space and time simply behaved that way, i.e. that there wasn't a "true" length and time that the ether "distorted". Though the equations look similar, the interpretation is radically different.
{ "domain": "physics.stackexchange", "id": 58985, "lm_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, spacetime, speed-of-light, history, lorentz-symmetry", "url": null }
thermodynamics, thermal-radiation, convection To follow up, if instead of a room I was in a glass box exposed to the coldness of space but with an air temperature of 23C, would it feel much colder than in the room? Yes! Definitely. Let's assume glass (and air in the box) is a very poor absorber of thermal radiation (which it is) that transmits all the radiation (no reflection back to your body), and that the radiation from the air and glass itself (it will emit some since it has a temperature) is negligible (does not hit you). You still emit radiation with the above intensity, but now nothing is emitting anything onto you. You are not in equilibrium, and: $$I_{net}=I_{received}-I_{emitted}=-I_{emitted}=-I_{body}$$ Every second you loose the above amount of heat in Joules (per square meter of your body). Loosing heat equals feeling cold. And as far as I have heard the decrease in temperature is quite rapid.
{ "domain": "physics.stackexchange", "id": 19245, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, thermal-radiation, convection", "url": null }
electrostatics So - a point-anything is a theoretical or mathematical but essentially non-existant construct used because it is useful.
{ "domain": "physics.stackexchange", "id": 22564, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics", "url": null }
Evaluate integral $\int (x^2-1)(x^3-3x)^{4/3} \mathop{dx}$ How can I evaluate this integral $$\int (x^2-1)(x^3-3x)^{4/3} \mathop{dx}=\;\;?$$ My attempt: I tried using substitution $$x=\sec\theta$$, $$dx=\sec\theta\ \tan\theta d\theta$$, $$\int (\sec^2\theta-1)(\sec^3\theta-3\sec\theta)^{4/3} \sec\theta\ \tan\theta d\theta$$ $$=\int \tan^2\theta \sec^4\theta(1-3\cos^2\theta)^{4/3} \sec\theta\ \tan\theta d\theta$$ $$=\int \tan^3\theta \sec^5\theta(1-3\cos^2\theta)^{4/3}\ d\theta$$ $$=\int\dfrac{ \sin^3\theta}{ \cos^8\theta}(1-3\cos^2\theta)^{4/3}\ d\theta$$ I can't see if this substitution will work or not. This has become so complicated. • I upvoted to reverse someone's downvote. The OP clearly made a serious effort to solve the problem and included the details of his work in the query. It is not the OP's fault that he doesn't know which substitution to use. – user2661923 Jul 29 at 11:52 I agree with the other answers. My response is long-winded so...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992895791291, "lm_q1q2_score": 0.8107317674475867, "lm_q2_score": 0.8376199633332891, "openwebmath_perplexity": 547.5320372082347, "openwebmath_score": 0.9127274751663208, "tags": null, "url": "https://math.stackexchange.com/questions/3773220/evaluate-integral-int-x2-1x3-3x4-3-mathopdx" }
general-relativity, spacetime, acceleration, coordinate-systems, projectile The brown one is the vertical worldline of the thrown ball. That is what I am confused of. The red hyperbolas are the worldlines of the rocket frame. The two blue slant lines are asymptotes of rocket frames. The coordinates represented by the axis belong to an inertial frame. For this frame, all the hyperbolas are accelerated frames, which are momentarily at rest in $t=0$, separated by the distances corresponding to the interception with the x-axis. If an object is free from its accelerated frame exactly at $t=0$ and without relative velocity with respect to this frame, its worldline is vertical. In a more general situation it is a straight line, with an angle proportional to the initial velocity with respect to the inertial frame which made the chart.
{ "domain": "physics.stackexchange", "id": 87222, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, spacetime, acceleration, coordinate-systems, projectile", "url": null }
organic-chemistry, organic-reduction, pericyclic, chemoselectivity Abstract of Ref.5: A one-pot protocol for the formation of 2-nitrobenzenesulfonylhydrazide (NBSH) from commercial reagents and subsequent alkene reduction is presented. The transformation is operationally simple and generally efficient for effecting diimide alkene reductions. A range of 16 substrates have been reduced, highlighting the unique chemoselectivity of diimide as a reduction system.
{ "domain": "chemistry.stackexchange", "id": 13576, "lm_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, organic-reduction, pericyclic, chemoselectivity", "url": null }
planet, orbit, solar-system, astrophysics The main source of instability is resonances. A resonance is where two planets are in orbits where the ratio of their periods is a simple fraction like 1/2 or 2/3 or 5/3 or whatever. Because of the simple relationship between periods, planets repeat the same configuration in space repeatedly, and gravitational interactions can build up. (Without the resonance, the interactions are just as strong, but in random directions and thus mostly cancel.) Resonances can disrupt an orbit or can stabilize it. The Hilda group of asteroids are in a stable 3:2 resonance with Jupiter, for example, and Pluto is in a 2:3 resonance with Neptune. Both of these resonances act to stabilize the orbits. But the Kirkwood Gap in the asteroid belt is a 2:1 resonance with Jupiter which tends to keep the gap empty by disrupting the orbits of any asteroids that stray into the gap.
{ "domain": "astronomy.stackexchange", "id": 2965, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "planet, orbit, solar-system, astrophysics", "url": null }
f-1 step 1: Sketch both on. Yield a streamlined method that can often be used for proving that function! Opening parabola contains two outputs for the function g ( x ) we prove that our.! Written ( –4, –11 ) most general sense, are functions that “ reverse ” each other values x! Y-Intercept at ( 0, –2 ) and B: R – { 1 } f-1, take! In the terms of x and y ’ s and y co-ordinates to pick from their domain and.! Now if we start with a set of numbers provide any graphs to pick from these theorems yield a method... Only we have to divide and multiply by 2 with second term of the is... Means the inverse function first whether the function g ( –11, –4,! Sine and inverse cosine are rather abrupt and disjointed image in invertible function graph codomain between and... Yield a streamlined method that can often be used for proving that a function having and! Function are reflections of each function convert the equation in the below and... Need to find the inverse function property:: this says
{ "domain": "jelenamrkich.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970239907775086, "lm_q1q2_score": 0.8285002252612202, "lm_q2_score": 0.853912747375134, "openwebmath_perplexity": 568.4753764959629, "openwebmath_score": 0.6645047664642334, "tags": null, "url": "http://jelenamrkich.com/pineapple-cake-jwi/invertible-function-graph-7407c3" }
4. Originally Posted by lp_144 So it would be $\displaystyle (2x+1)(x-3)$? yes, very good now finish the problem. what about the first problem? 5. Originally Posted by Jhevon yes, very good now finish the problem. what about the first problem? 6. Originally Posted by lp_144 when you have a common term, you can factor it out example: factorize $\displaystyle 3xy + 5xy^2$ we want to factor out the lowest powers of all things common. i have $\displaystyle x$ common to both terms, and i have $\displaystyle y$ common to both terms. there is a $\displaystyle y^2$ in the second term, but i can't factor that out, because i only have $\displaystyle y$ in the first term. so $\displaystyle x$ and $\displaystyle y$ are common to both terms, both terms have them, so i will factor out $\displaystyle xy$, to get: $\displaystyle xy(3 + 5y)$
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806512500486, "lm_q1q2_score": 0.8315007692142552, "lm_q2_score": 0.8479677506936878, "openwebmath_perplexity": 369.18721281965793, "openwebmath_score": 0.7853143215179443, "tags": null, "url": "http://mathhelpforum.com/trigonometry/48402-factoring-equation.html" }
# Proving that $H\cap K = \{e_G\}$ given $|H|=3$ and $|K|=5$ I found the following question in an old test paper: Suppose $H$ and $K$ are two subgroups of $G$ such that $|H|=3$ and $|K|=5$. Prove that $H\cap K = \{e_G\}$ where $e_G$ is the identity of $G$. My attempt: Every group of prime number order is isomorphic to $\Bbb Z_{p}$ ($p$ being the prime number) and thus they are necessarily cyclic. Thus, $H$ is isomorphic to $\Bbb Z_3$ and $G$ is isomorphic to $\Bbb Z_5$. After this I'm not sure how to proceed. I thought $\Bbb{Z_3}$ and $\Bbb{Z_5}$ have no element in common since the elements of $\Bbb{Z_3}$ are $\{\bar{0}_3,\bar{1}_3,\bar{2}_3\}$ while the elements of $\Bbb{Z_5}$ are $\{\bar{0}_5,\bar{1}_5,\bar{2}_5,\bar{3}_5,\bar{4}_5\}$. But again, I'm confused because since $H$ and $K$ are subgroups they must be sharing the identity element of $G$. Questions:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138125126403, "lm_q1q2_score": 0.8082875421171593, "lm_q2_score": 0.8267117962054048, "openwebmath_perplexity": 96.4444038066197, "openwebmath_score": 0.8239097595214844, "tags": null, "url": "https://math.stackexchange.com/questions/2790271/proving-that-h-cap-k-e-g-given-h-3-and-k-5/2790276" }
and maximum values that can be calculated by summing exactly four of the five integers. The program allocates 2 one-dimentional arrays using malloc() call and then does the addition and stores the result into 3rd array. Method since it requires contiguous, it means that for each element, it has two situations that are in the subarray or not. Join 124,729,115 Academics and Researchers. You are given an array of integers with both positive and negative numbers. Subarr2[] = {3, 3, 12. Find the sum of numbers and represent it in array. The maximum special sum considering all non-empty subarrays of the array. In the Java programming language, a multidimensional array is an array whose components are themselves arrays. For example,$ \{35, 42, 5, 15, 27, 29\} $is a sorted array that has been circularly shifted$ k=2 $positions, while$ \{27, 29, 35, 42, 5, 15\} $has been shifted$ k=4 \$ positions. If only one array is supplied, SUMPRODUCT will simply sum the items in the array. C++ code to
{ "domain": "lampedusasiamonoi.it", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97594644290792, "lm_q1q2_score": 0.8963875270376713, "lm_q2_score": 0.9184802440252811, "openwebmath_perplexity": 681.2426012969111, "openwebmath_score": 0.3012574017047882, "tags": null, "url": "http://lampedusasiamonoi.it/yvgr/max-sum-of-2-arrays.html" }
inorganic-chemistry, bond, periodic-trends This all is quite good evidence that the monomer of boron chloride should be more stable towards dimerisation than the monomer of aluminium. The Dimers $\ce{(XCl3)2; X{=}\{B,Al\}}$. The obvious change is that the co-ordination of the central elements goes from trigonal planar to distorted tertrahedral. A look at the geometries will give us something to talk about. \begin{array}{llrrr}\hline &\ce{X{=}}& \ce{Al} &\ce{B} &\ce{Cl}\\\hline \mathbf{d}(\ce{X-Cl})&/\pu{pm} & 206.7 &175.9&--\\ \mathbf{d}(\ce{X-{\mu}Cl})&/\pu{pm} & 226.1 &198.7&--\\ \mathbf{d}(\ce{Cl\bond{~}{\mu}Cl})&/\pu{pm} & 354.1 & 308.0 & --\\ \mathbf{d}(\ce{{\mu}Cl\bond{~}{\mu}Cl'})&/\pu{pm} & 323.6 & 287.3 & --\\ \mathbf{d}(\ce{B\bond{~}B'})&/\pu{pm} & 315.7 & 274.7 & --\\\hline \mathbf{r}_\mathrm{vdW}&/\pu{pm} & 240 & 205 & 205\\ \mathbf{r}_\mathrm{sing}&/\pu{pm} & 126 & 85 & 99\\ \mathbf{r}_\mathrm{doub}&/\pu{pm} & 113 & 78 & 95\\\hline \end{array}
{ "domain": "chemistry.stackexchange", "id": 7005, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, bond, periodic-trends", "url": null }
1. 👍 2. 👎 3. 👁 1. You posted this questin twice. 1. 👍 2. 👎 2. 1/2=0.5 1/3=0.333333333333333 1/4=0.25 1/5=0.2 1/6=0.166666666666667 1/7=0.142857142857143 1/8=0.125 1/9=0.111111111111111 1/10=0.1 1/11=0.090909090909091 1/12=0.083333333333333 1. 👍 2. 👎 3. 1/2=0.5 1/3=0.333333333333333 1/4=0.25 1/5=0.2 1/6=0.166666666666667 1/7=0.142857142857143 1/8=0.125 1/9=0.111111111111111 1/10=0.1 1/11=0.090909090909091 1/12=0.083333333333333 fractions with denominators of 3,6,7,9,11,12 (or multiples of these numbers) have decimal forms that repeat, while fractions with denominators of 2,4,5,8,10 (or multiples of these numbers)have decimal forms that terminate.
{ "domain": "jiskha.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9626731126558704, "lm_q1q2_score": 0.812395128910723, "lm_q2_score": 0.8438951064805861, "openwebmath_perplexity": 1697.1196801994338, "openwebmath_score": 0.8104286789894104, "tags": null, "url": "https://www.jiskha.com/questions/55003/every-fraction-has-a-decimal-equivalent-that-either-terminates-for-example-1-4-0-25-or" }
quantum-mechanics, quantum-information, quantum-entanglement, density-operator, quantum-states Title: Is a state being unentangled equivalent to statistical independence for all pairs of subsystem observables? I imagine the answer is yes since, if so, the definition of unentangled is rather non-obvious and yet it gives an operational way to check for statistical independence.
{ "domain": "physics.stackexchange", "id": 93866, "lm_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-information, quantum-entanglement, density-operator, quantum-states", "url": null }
quaternion Title: quaternion_actionlib Hi every body. I am trying to run a small application using actionlib. I convert in a callback function, degrees to quaternions, as it is shown in the following piece of code: double th=D2R*(atan2( msg.pose.pose.orientation.y, msg.pose.pose.orientation.y)); geometry_msgs::Quaternion gth = tf::createQuaternionMsgFromYaw(th); Then, I am trying to assign that quaternion as it follows: move_base_msgs::MoveBaseGoal goal; goal.target_pose.pose.orientation.w =gth; Then I get the error: cannot convert ‘geometry_msgs::Quaternion’ to ‘geometry_msgs::Quaternion_<std::allocator<void> >::_w_type {aka double}’ in assignment Can anybody give me a clue, in advance thank you
{ "domain": "robotics.stackexchange", "id": 14418, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quaternion", "url": null }
Random Slopes In Multilevel Models, Introduction to R: A Step-by-Step Approach to the Fundamentals (Jan 2021), Analyzing Count Data: Poisson, Negative Binomial, and Other Essential Models (Jan 2021), Effect Size Statistics, Power, and Sample Size Calculations, Principal Component Analysis and Factor Analysis, Survival Analysis and Event History Analysis. One of the key concepts in Survival Analysis is the Hazard Function. One of the key concepts in Survival Analysis is the Hazard Function. The assumption of constant hazard may not be appropriate. We can then calculate the probability that any given student will finish in each year that they’re eligible. Definition of Survival and hazard functions: ( ) Pr | } ( ) ( ) lim ( ) Pr{ } 1 ( ) 0S t f t u t T t u T t t S t T t F t. u. λ. This is just off the top of my head, but fundamentally censoring does not change the relationship between the hazard function and the survival function if censoring is uninformative (which it is usually assumed
{ "domain": "glassbox.tv", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540698633748, "lm_q1q2_score": 0.8161198298821561, "lm_q2_score": 0.8333245911726381, "openwebmath_perplexity": 1791.3014604621967, "openwebmath_score": 0.5784587860107422, "tags": null, "url": "https://glassbox.tv/south-river-isfwre/3ae2aa-survival-function-and-hazard-function" }
java, performance, mathematics, floating-point, rational-numbers public static Rational valueOf(double value) { long mantissa = getMantissa(value); long exponent = getExponent(value) - 52; int numberOfTrailingZeros = Long.numberOfTrailingZeros(mantissa); mantissa >>= numberOfTrailingZeros; exponent += numberOfTrailingZeros; // apply the sign to the numerator long numerator = (long) Math.signum(value) * mantissa; if(exponent < 0) return new Rational(numerator, 1L << -exponent); else return new Rational(numerator << exponent, 1); }
{ "domain": "codereview.stackexchange", "id": 7346, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, mathematics, floating-point, rational-numbers", "url": null }
java, performance, object-oriented, multithreading, concurrency @Override public String toString () { return name; } /** * When an object implementing interface <code>Runnable</code> is used * to create a thread, starting the thread causes the object's * <code>run</code> method to be called in that separately executing * thread. * <p> * The general contract of the method <code>run</code> is that it may * take any action whatsoever. * * @see Thread#run() */ @Override public void run () { long currentMilliseconds = 0; while (currentMilliseconds <= room.getDuration()) { try { Thread.sleep(1000); currentMilliseconds += 1000; } catch (InterruptedException e) { System.out.println(this + " is interrupted"); } } leaveRoom(); }
{ "domain": "codereview.stackexchange", "id": 20033, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, object-oriented, multithreading, concurrency", "url": null }
control, sensors, pid, kalman-filter Title: Improving Velocity estimation I have a sensor reduction model which gives me a velocity estimate of a suspension system(velocity 1) . This suspension system estimate velocity is used to calculate another velocity(velocity 2) via a transfer function/plant model. Can I use velocity 2 to improve my velocity estimate (velocity 1) through Kalman filtering or through some feedback system.??
{ "domain": "robotics.stackexchange", "id": 732, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "control, sensors, pid, kalman-filter", "url": null }
filter-design, digital-filters, optimization, fixed-point Title: Optimization of Filter Coefficients to Given Word Length It seems to me that this is a difficult mathematical problem where research is still carried on: Is there an efficient way to find fixed-point coefficients whose zeros are closest to those calculated from the given floating-point coefficients? It is definitely a difficult mathematical problem (integer programming), but I don't see much research going on in the DSP community. I do not know about the maths community. There were some important papers in the early 1980's on the optimum design of FIR filters with quantized coefficients: D. M. Kodek, "Design of Optimal Finite Wordlength FIR Digital Filters Using Integer Programming Techniques," IEEE Trans. ASSP 28, 304-308 (1980). D. M. Kodek and K. Steiglitz, "Comparison of Optimal and Local Search Methods for Designing Finite Worldlength FIR Digital Filters," IEEE Trans. Circuits Systems 28, 28-32 (1981).
{ "domain": "dsp.stackexchange", "id": 4803, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filter-design, digital-filters, optimization, fixed-point", "url": null }
complexity-theory, reductions, polynomial-time Note that you only need to show that you can generate $\langle M \rangle$ in polynomial time, which does not necessarily mean it has to have a constant size. Suppose e.g. that we want to show that $L=\{\langle M\rangle | \text{M halts on input $\epsilon$}\}$ is NP hard. In that case, the reduction $\varphi\mapsto \langle M_{\varphi}\rangle$ does the trick, where $M_{\varphi}$ is the machine which ignores its input, iterates over all possible assignments for $\varphi$, and enters a loop if no satisfying assignment was found. $M_{\varphi}$ does not have a constant size description, since you have to hardcode $\varphi$ into it. However, you can still generate $\langle M_{\varphi}\rangle$ in polynomial time, which makes the reduction polynomial.
{ "domain": "cs.stackexchange", "id": 10749, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, reductions, polynomial-time", "url": null }
harmonic-oscillator Title: Conceptual Doubt regarding Simple Harmonic Motion While studying about a simple pendulum, I came across the following line. At the bottom of the swing the tension will actually be greater than the weight, causing the bob to move in a circle.
{ "domain": "physics.stackexchange", "id": 27476, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "harmonic-oscillator", "url": null }
For example, if x is a 2-by-3-by-3 array, then rms(x,[1 2]) returns a 1-by-1-by-3 array whose elements are the RMS values over each page of x. NaN condition, specified as one of these values: • "includenan" — Include NaN values when computing the RMS values, resulting in NaN. • "omitnan" — Ignore all NaN values in the input. If all elements are NaN, the result is NaN. ## Output Arguments collapse all Root-mean-square value, returned as a scalar, vector, or N-D array. • If x is a row or column vector, then y is a scalar. • If x is a matrix, then y is a vector containing the RMS values computed along dimension dim or dimensions vecdim. • If x is a multidimensional array, then y contains the RMS values computed along the dimension dim or dimensions vecdim. The size of this dimension is 1 while the sizes of all other dimensions remain the same as x. ## More About collapse all ### Root-Mean-Square Value The root-mean-square value of a vector x is
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534392852384, "lm_q1q2_score": 0.8091709953185839, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 1731.7111792627854, "openwebmath_score": 0.7343220114707947, "tags": null, "url": "https://nl.mathworks.com/help/matlab/ref/rms.html" }
ros, ros-melodic, ubuntu, lsd-slam Originally posted by MrMinemeet on ROS Answers with karma: 41 on 2019-07-16 Post score: 0 Ok fixed it myself :D it worked I as stated in the comment on the other answer I wasn't able to compile it on another version because g2o didn't like eigen 3.2.5. But when only using Eigen 3.2.5 on catkin_make for LSD_SLAM without a problem. Here's what I did. I just sed the variable EIGEN3_INCLUDE_DIR to the path of the downloaded 3.2.5 one line above the include_directories hope this helps someone. Originally posted by MrMinemeet with karma: 41 on 2019-07-18 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by bas on 2019-10-30: This worked for me. Thanks a lot!
{ "domain": "robotics.stackexchange", "id": 33437, "lm_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, ubuntu, lsd-slam", "url": null }
navigation, gmapping Originally posted by mgruhler with karma: 12390 on 2016-08-18 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 25539, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, gmapping", "url": null }
c#, beginner, .net, winforms, .net-datatable Title: Dataset with optional addition to where statement I am trying to generate a dataset from a query that has a where statement. If the user passes a value additional things need to be added to the where statement. Is this the best way to go about this? class TableAdapters { public class FindScriptByTargetVDN { public static DataSet Fill(SqlConnection connection, string parameter) { string conditional = string.Empty; if (parameter.Length > 0) { conditional = "and svce.PeripheralNumber= " + parameter + " "; } string query = "select svce.PeripheralNumber AS Service, " + "ms.EnterpriseName AS [Script Name], " + "p.EnterpriseName AS Peripheral, " + "sg.PeripheralNumber AS [Skill Mapping], " + "s.Version AS [Latest Version], " + "s.DateTime AS Created, " + "s.Author "
{ "domain": "codereview.stackexchange", "id": 8307, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner, .net, winforms, .net-datatable", "url": null }
fluid-dynamics Title: Does blowing bubbles at the front of a ship increase efficiencies? Would this make an air envelope that the hull could smooth past with less friction? This technique is called supercavitation. So far it has only been applied to objects no larger than, say, a torpedo, because it not easy to produce a stable bubble the size of a ship when moving at high velocities.
{ "domain": "physics.stackexchange", "id": 16725, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics", "url": null }
python, minecraft mc.postToChat("Found it in " + str(timer-1) + " seconds!") Relying on timer is not so bad. But if we cared about accumulated sleep timing error, or wanted to report the result in tenths of a second for tie-breaking on some leader-board, then asking for the current time() would make sense. Plus we'd want to sleep much less than one second for each time through the loop. You might choose to update at a higher rate, say FPS = 10 ten frames per second. Sleep for ~ 100 msec each time through the loop, and produce a combined time and distance message, outputting it with if prev_msg != current_msg: mc.postToChat(current_msg) prev_msg = current_msg Higher frame rates offer a better opportunity for breaking leader-board tie scores. This code mostly accomplishes its design goals, and suggests avenues for exploration. I would be willing to delegate or accept maintenance tasks on this codebase.
{ "domain": "codereview.stackexchange", "id": 44767, "lm_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, minecraft", "url": null }
What you gave is actually a nice representation for one of my favorite examples of semigroup rings. You take the semigroup $S=\{a,b\}$ with multiplication defined by $a^2=ba=a$ and $b^2=ab=b$, and make the semigroup ring $F_2[S]$. I think this is the same ring as if we had taken $a=\begin{bmatrix}1&0\\0&0\end{bmatrix}$ and $b=\begin{bmatrix}1&1\\0&0\end{bmatrix}$. • So the question should be asked what is the order of smallest non-commutative "rng"? Right? – Seeker Nov 29 '17 at 14:41 • @user378511 "rng=ring possibly without identity". If I was given free reign with the question I would pose it as "what's the smallest ring that isn't commutative and doesn't have identity?" but that's just me. How you wrote it is understandable. – rschwieb Nov 29 '17 at 14:44 • Oh yeah!This sounds more understandable to me. Next time I'll be more precise with the language ;) – Seeker Nov 29 '17 at 14:49
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639636617014, "lm_q1q2_score": 0.8158552562078536, "lm_q2_score": 0.8397339616560072, "openwebmath_perplexity": 468.5873069241437, "openwebmath_score": 0.7381492257118225, "tags": null, "url": "https://math.stackexchange.com/questions/2542824/non-commutative-ring-without-unity" }
$S={2}^{99}·{3}^{98}·{4}^{97}\dots {99}^{2}·100=\left(2·4\dots 50\right)\left({2}^{49}·{3}^{49}·{4}^{48}\dots 99\right){}^{2}=50!·{2}^{50}\left(\dots \right){}^{2} ,$ $S/50!$ is a square, and so $S/51!=\left(S/50!\right)÷\left(51\right)$ is not a square. The result follows. Solution 3. As above, $S/\left(50!\right)$ is a square. Suppose that $53\le k\le 100$. Then 53 divides $k!/50!$ to the first power, and so $k!/50!$ cannot be square. Hence $S/k!=\left(S/50!\right)÷\left(k!/50!\right)$ cannot be square. If $k=51$ or 52, then $k!/50!$ is not square, so $S/k!$ cannot be square. Suppose that $k\le 46$. Then 47 divides $50!/k!$ to the first power, so that $50!/k!$ is not square and $S/k!=\left(S/50!\right)×\left(50!/k!\right)$ cannot be square. If $k=47,48$ or 49, then $50!/k!$ is not square and so $S/k!$ is not square. Hence $S/k!$ is square if and only if $k=50$ when $k\le 100$.
{ "domain": "math.ca", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471618625457, "lm_q1q2_score": 0.8817743718177234, "lm_q2_score": 0.8962513752119936, "openwebmath_perplexity": 2883.047276497813, "openwebmath_score": 0.9988901019096375, "tags": null, "url": "http://cms.math.ca/Competitions/MOCP/2001/sol_feb.mml" }
# Prove the alternating sum of a decreasing sequence converging to $0$ is Cauchy. Let $$(x_n)$$ be a decreasing sequence with $$x_n > 0$$ for all $$n \in \mathbb{N}$$, and $$(x_n) \to 0$$. Let $$(y_n)$$ be defined for all $$n \in \mathbb{N}$$ by $$y_n = x_0 - x_1 + x_2 - \cdots + (-1)^n x_n \ .$$ I want to show, using the $$\varepsilon$$ definition, that $$(y_n)$$ is Cauchy. I am trying to find, given $$\varepsilon > 0$$, a real number $$N$$ such that for all $$m$$ and $$n$$ with $$m > n > N$$, $$|y_m - y_n| < \varepsilon$$. I have been going backwards to try and find $$N$$, and have \begin{align*} |y_m - y_n| & = \left| (x_0 - x_1 + \cdots \pm x_m) - (x_0 - x_1 + \cdots \pm x_n) \right| \\ |y_m - y_n| & = \left| x_{n + 1} - x_{n + 2} + \cdots \pm x_{m} \right| \\ |y_m - y_n| & \leq | x_{n + 1} | + | x_{n + 2} | + \cdots + | x_{m} | \\ |y_m - y_n| & \leq \ ? \end{align*}
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9572778073288127, "lm_q1q2_score": 0.8317085978085914, "lm_q2_score": 0.8688267830311354, "openwebmath_perplexity": 201.88316389627872, "openwebmath_score": 0.9975029230117798, "tags": null, "url": "https://math.stackexchange.com/questions/3201256/prove-the-alternating-sum-of-a-decreasing-sequence-converging-to-0-is-cauchy" }
i chooses a mixed strategy sj from a given set Si of possible mixed strategies The utility of the player i depends on the mixed strategy chosen by i and on the mixed strategies chosen by all the other players, that is ui(si,s-i) where s-i denotes the n-1 vector of the respective mixed. and Sheldon, D. Setting the differ­ enced equation to zero (1 -2x = 0), x = 112 and y = 1/2 result. There is also a mixed strategy equilibria. (a) Represent in a diagram the two-player extensive game with perfect information in which the terminal histories are (C, E),(C, F),(D, G), and (D, H), the player function is. October 2008 gives a nice interpretation of link creation process and Pagerank score as a game with Nash equilibrium. 6 Rock, Paper, Scissors game. Once in these equilibria, neither side has an incentive to change. Normal form games help in identifying the dominated strategies and Nash equilibrium. 2 Infinitely repeated games with discounting § 5. Mixed strategy Nash equilibrium • A mixed
{ "domain": "ammastyle.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241982893259, "lm_q1q2_score": 0.807761693259401, "lm_q2_score": 0.8333245932423308, "openwebmath_perplexity": 1529.9747295969532, "openwebmath_score": 0.6077271103858948, "tags": null, "url": "http://ammastyle.it/zpft/mixed-strategy-nash-equilibrium-3x2.html" }
mechanical-engineering, design, centre-of-gravity, rolling Title: How to build a winning Pumpkin Derby racer? At the large hotel where I work in the engineering department the big Halloween event is the annual Pumpkin Derby...and we've lost every year to the culinary department. It's embarrasing! This year, though, we caught them in the act. Since they're in charge of distributing the pumpkins, they kept a half dozen or so for themselves, tricked them out, and we caught them testing the racers to select the best one. We, on the other hand, are limited to a single pumpkin. So I'm soliciting advice for building a hot-rod pumpkin!
{ "domain": "engineering.stackexchange", "id": 4944, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, design, centre-of-gravity, rolling", "url": null }