text
stringlengths
1
1.11k
source
dict
electromagnetism, electric-fields, maxwell-equations $$ Since we are dealing with a point-charge, the charge density can be expressed in terms of the Dirac delta function: $$ \rho(\mathbf r)=q\delta(\mathbf r-\mathbf r')=q\delta(\mathbf r)\tag{2} $$ where we assume that $\mathbf r'=O$ (the origin) and ignore it in the delta function. This can be done because the volume integral of $\rho$ should give the total charge $q$: $$ \int\rho\,dV=\int q\delta(\mathbf r)\,dV=q\int\delta(\mathbf r)\,dV=q $$ where use used the property $\int\delta(x-x')\,dx=1$ when $x'$ is in the integral range. Inserting (2) into (1), we get $$ \frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial u}{\partial r}\right)=-\frac{q}{\varepsilon_0}\delta(\mathbf r) $$
{ "domain": "physics.stackexchange", "id": 15372, "lm_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, electric-fields, maxwell-equations", "url": null }
telescope, optics, binoculars Title: Why different specifications for telescopes and binoculars? Sorry for the noob question but I don't seem to be able to find the answer on the internet. I've been looking through some telescopes and binoculars and noticed that shops typically give different specifications for the two groups. For example, for telescopes I'll often see focal length, aperture ratio, or limit value, but I haven't seen any of those for binoculars; for binoculars, on the other hand, they'll mention exit pupil, field of view, or glass material, none of which I've seen given for a telescope. Why is that? Are the two devices so different as to be incomparable? With a binocular, all its optical components are fixed - the user can't change them. What's important for the user to know is the size of the front lens, which determines the brightness (and in theory sharpness) of the image, the magnification, and the field of view. These are all useful things to know.
{ "domain": "astronomy.stackexchange", "id": 3822, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "telescope, optics, binoculars", "url": null }
ros, pose if ((map_y + length) >= map_height) cones[i].y3 = map_height; // p_mid else cones[i].y3 = map_y + length; // p_mid if ((map_x - radius) < 0) cones[i].x2 = 0.0; // p2 else cones[i].x2 = map_x - radius; // p2 if ((map_y + length) >= map_height) cones[i].y2 = map_height; // p2 else cones[i].y2 = map_y + length; // p2 if ((map_x - radius) >= map_width) cones[i].x4 = map_width; // p3 else cones[i].x4 = map_x + radius; // p3 if ((map_y + length) >= map_height) cones[i].y4 = map_height; // p3 else cones[i].y4 = map_y + length; // p3 cones[i].radius = radius; //fixed radius cones[i].height = length; //fixed length cones[i].id = i; cones[i].probability = 0.0; }} Cones[i] has just (x,y) values... Now i need to rotate each cone according to the orientations in poseArray Originally posted by kk on ROS Answers with karma: 225 on 2013-08-21 Post score: 1
{ "domain": "robotics.stackexchange", "id": 15325, "lm_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, pose", "url": null }
ruby, ruby-on-rails Title: DRY up ivar assignment in Rails new and create controller actions When creating a new model in Rails, I need to pass a bunch of other models into the view so I can define the correct associations. All I’m really doing here is querying the persistence layer for models and assigning them to instance variables, but I’m having to do it twice. What’s the best way of extracting the assignment? Just creating a controller method and calling it? I’m not sure. class ProjectsController < ApplicationController def new @project = Project.new @companies = Company.as_select_options @project_varieties = ProjectVariety.as_select_options @prices = Price.as_select_options @users = User.as_select_options end
{ "domain": "codereview.stackexchange", "id": 12561, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby, ruby-on-rails", "url": null }
ros, ros2, transform, tf2 Thanks, that worked. Still not able to broadcast the transform as the tf2_ros package is not available for ROS2. Any tips as for what I should do instead? Comment by tfoote on 2020-04-28: Have you installed the package? It's available in all the indexed versions of ROS 2 https://index.ros.org/p/tf2_ros/#eloquent Comment by svintissen on 2020-04-28: So it is not supported in Dashing, but in eloquent? Comment by tfoote on 2020-04-28: No, it's available in all ROS 2 versions including Dashing: https://index.ros.org/p/tf2_ros/#dashing I just linked to the default/latest version there are tabs across the top for all the different versions. Comment by svintissen on 2020-04-29: Thanks again - Ive installed the package, but I can still not "import tf2_ros" to my python node. Keep gettign "no module named tf2_ros" - any idea what may cause this? Comment by tfoote on 2020-04-29:
{ "domain": "robotics.stackexchange", "id": 34845, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2, transform, tf2", "url": null }
0 votes 0 answers $F(t)$ is a periodic square wave function as shown. It takes only two values, $4$ and $0$, and stays at each of these values for $1$ second before changing. What is the constant term in the Fourier series expansion of $F(t)$? $1$ $2$ $3$ $4$ 0 votes 0 answers Consider a cube of unit edge length and sides parallel to co-ordinate axes, with its centroid at the point $(1, 2, 3)$. The surface integral $\int _{A} \vec{F}.d\vec{A}$ of a vector field $\vec{F} = 3x\hat{i} + 5y\hat{j} + 6z\hat{k}$ over the entire surface $A$ of the cube is _____________. $14$ $27$ $28$ $31$ 0 votes 0 answers Consider the definite integral $\int_{1}^{2} \left ( 4x^{2} + 2x + 6 \right )dx.$ Let $I_{e}$ be the exact value of the integral. If the same integral is estimated using Simpson’s rule with $10$ equal subintervals, the value is $I_{S}$. The percentage error is defined as $e = 100\times \left ( I_{e} - I_{S}\right )/I_{e}$. The value of $e$ is $2.5$ $3.5$ $1.2$ $0$ 0 votes 0 answers
{ "domain": "gateoverflow.in", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407183668539, "lm_q1q2_score": 0.802399923789417, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 620.221937031526, "openwebmath_score": 0.7819016575813293, "tags": null, "url": "https://me.gateoverflow.in/questions/others" }
human-biology, biochemistry, saliva Title: How can saliva neutralise acids produced by bacterial cells in our mouth if it is itself acidic in nature? My school textbook makes the following claim: This means that saliva must be basic. However, I learnt that the pH value of saliva is about 6.8, which would surely make it acidic. How can the above point be correct then? Saliva is neutral, not acidic (6.8 is very barely acidic), and is a means to carry the acid away physically, and is also much less acidic than acid produced by bacteria, so is still effective in neutralizing.
{ "domain": "biology.stackexchange", "id": 12310, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, biochemistry, saliva", "url": null }
c++, algorithm, image, pathfinding, dijkstra ... to = (1, 3), from = (0, 2). total_cost = 4 ... to = (1, 4), from = (0, 3). total_cost = 5 ... to = (2, -1), from = (1, -1). total_cost = 3 ... to = (2, 0), from = (1, 0). total_cost = 2 ... to = (2, 1), from = (1, 0). total_cost = 3 ... to = (2, 2), from = (1, 1). total_cost = 4 ... to = (2, 3), from = (1, 2). total_cost = 5 ... to = (2, 4), from = (1, 3). total_cost = 6 ... to = (3, -1), from = (2, -1). total_cost = 4 ... to = (3, 0), from = (2, 0). total_cost = 3 ... to = (3, 1), from = (2, 0). total_cost = 4 ... to = (3, 2), from = (2, 1). total_cost = 5 ... to = (3, 3), from = (2, 2). total_cost = 6 ... to = (3, 4), from = (2, 3). total_cost = 7 ... to = (4, -1), from = (3, -1). total_cost = 5 ... to = (4, 0), from = (3, 0). total_cost = 4 ... to = (4, 1), from = (3, 0). total_cost = 5 ... to = (4, 2), from = (3, 1). total_cost = 6 ... to = (4, 3), from = (3, 2). total_cost = 7 ... to = (4, 4), from = (3, 3). total_cost = 8
{ "domain": "codereview.stackexchange", "id": 43480, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, image, pathfinding, dijkstra", "url": null }
java, algorithm, search alpha = Math.max(alpha, tentativeValue); if (alpha >= beta) { return bestState; } } } else { // Here, 'initialPlayer == minimizingPlayer'. double tentativeValue = Double.POSITIVE_INFINITY; for (S childState : state.children()) { double value = makePlyImpl(childState, depth - 1, alpha, beta, minimizingPlayer, maximizingPlayer, minimizingPlayer); if (tentativeValue > value) { tentativeValue = value; bestState = childState; } beta = Math.min(beta, tentativeValue);
{ "domain": "codereview.stackexchange", "id": 35957, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, search", "url": null }
javascript, jquery, html </ul> </li> <li class=""><a data-icount="2" href="/some/thing/37" >Clothes</a></li> </ul> </li> </ul> Here are some tips: 1) Don't create variables if they're only used once or are a don't perform complex operations. Old Code: var num_sub_uls = $sub_uls.length; var count_icount = 0; if(num_sub_uls > 0) {
{ "domain": "codereview.stackexchange", "id": 2427, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, html", "url": null }
java, linked-list, unit-testing, iterator, priority-queue Node<E, P> node = map.get(element); You can simply write Node<E, P> node = map.get(element); and check if node is null. This increases performance and atomicity. Design issue I think you could improve readability if you split the implementation to a Doubly-Linked-List ("DLL") inside the priority queue. This way, you could have the following code encapsulated in your DLL // Comparator operator <= instead of < guarantees stability: while (currentNode != null && currentNode.priority.compareTo(node.getPriority()) <= 0) { currentNode = currentNode.getNextNode(); } You could gain a better separation of concerns. Tests could also improve this way. Small implementation issue As for your implementation of the DLL, perhaps you could consider using a sentinel rather than check for null for the head/tail operations.
{ "domain": "codereview.stackexchange", "id": 36150, "lm_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, linked-list, unit-testing, iterator, priority-queue", "url": null }
- I am not sure I follow exactly. Your second equation says $x=\tan v$ and then you follow by saying $x' =\frac{1}{(\tan v)'}$... Maybe I am missing something –  Slugger Nov 28 '13 at 15:27 Sir, my solution is correct, You can also use the Inverse Derivative Formula, –  Madrit Zhaku Nov 28 '13 at 15:31 Oh, it seems this is essentially what I did, but I posted a few minutes later. I didn't see your post when I posted, so it's not that I copied. Should I delete my post? –  Ahaan S. Rungta Nov 28 '13 at 15:32 @MadritZhaku When somebody asks you to explain what you did, "it is correct" is not as helpful as actually explaining what you did. If you don't have the patience to elaborate, don't respond at all. Your comment came off quite rude. –  Ahaan S. Rungta Nov 28 '13 at 15:33 all is well that ends well :) –  Slugger Nov 28 '13 at 15:37
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918487320493, "lm_q1q2_score": 0.8570577828217518, "lm_q2_score": 0.8670357615200474, "openwebmath_perplexity": 558.4447670146069, "openwebmath_score": 0.9461610317230225, "tags": null, "url": "http://math.stackexchange.com/questions/584655/what-is-fracd-arctanxdx" }
forces, work, potential-energy, conventions Title: Question About Potential Energy I'm confused about how the energy is conserved and the signs of the works are also confusing for me. I have an example on my mind I would like to ask. Imagine a book on the ground. We want to lift this book and the velocity is zero initially. To accelerate the book, I apply force on the book a little more than the gravitational field force and then for the rest of the path I apply force equal to the magnitude of the gravitational field force to keep it's velocity constant. So the net work done on the book by me and the gravitational field equals to zero. Now my question is that even though there is zero work done on the book(net work is zero after all) ,we say that the potential energy is increased for the book.How can we give energy to something when there is no net work done on it?I feel I'm making some logical mistake... There is a difference between work and energy
{ "domain": "physics.stackexchange", "id": 38960, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, work, potential-energy, conventions", "url": null }
# Why do prime factors of odd term Lucas numbers only end in 1 or 9? I'm working on a problem, which I've eventually reduced to the following question: show that every odd term Lucas number has a prime factor that ends with either 1 or 9. Here the Lucas sequence is defined by the recursion: $$a_0=2, a_1=1, a_{n+1}=a_n+a_{n-1}.$$ I looked up a list of prime factorizations of Lucas numbers on the following page: https://r-knott.surrey.ac.uk/Fibonacci/lucas200.html
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446448596305, "lm_q1q2_score": 0.804923509060739, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 270.29528071249075, "openwebmath_score": 0.8242723941802979, "tags": null, "url": "https://math.stackexchange.com/questions/4483915/why-do-prime-factors-of-odd-term-lucas-numbers-only-end-in-1-or-9" }
• The function $f(x)=\sqrt{|1-2x|}$ doesn't satisfy the assumption that $\sqrt{|1-2x|\cdot|1-2y|}\ge |x-y|$ for all $x,y\in[0,1]$ since you could choose $x=1/2$ and $y = 1$, and you would find $f(1/2)f(1) = 0 < |1/2-1| = 1/2$. – Alex Ortiz Nov 11 '17 at 3:01 • Any response to @AOrtiz's objection? – Hans Nov 11 '17 at 18:09 • @Hans: kimchi lover's argument is a correct proof that the minimum in question is $\geq{2\over3}$. He/She didn't state that $f(x)=\sqrt{|1-2x|}$ is optimal, or even admissible. – Christian Blatter Nov 11 '17 at 18:34 • @ChristianBlatter: I am well aware of that it is only a lower bound, just like Guy Fsone's but tighter. I want to ascertain if he is aware of it and whether he has any further idea on finding the minimum. – Hans Nov 11 '17 at 18:45 • It's an interesting problem, and I've not given up on it. – kimchi lover Nov 11 '17 at 18:57
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308807013051, "lm_q1q2_score": 0.8359018513570515, "lm_q2_score": 0.8459424431344437, "openwebmath_perplexity": 401.4454213626343, "openwebmath_score": 0.998802125453949, "tags": null, "url": "https://math.stackexchange.com/questions/2514441/minimize-min-f-in-e-left-int-01fx-dx-right" }
genetics no differentiation above background levels. These results suggest that an approximately 23-kb intergenic region upstream of Pitx1 controls pelvic development. This region is conserved among zebrafish and other teleosts (Fig. 2A), suggesting that it may contain ancestrally conserved regulatory enhancers."
{ "domain": "biology.stackexchange", "id": 3844, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics", "url": null }
quantum-mechanics, quantum-information, density-operator When he's discussing $E$ with no subscript, he's talking about a measurement in the abstract. When he talks about $E_i$, he's specifically making reference to the idea of drawing a bunch of $E_i$s from the distribution $\mathcal{D}$ in the sense of the set $\mathcal{E} = \{E_i\}$ that's used in this theorem. This set $\mathcal{E}$ is a set of measurements (i.e. two-outcome POVMs), not real-number results or expectations of measurements; the expectation of the measurement $E_i$ is $\mathrm{Tr}(\rho E_i)$. The $E$ in the second equation is parameterized by the $\mathrm{Pr}_{E\in\mathcal{D}}$, which is the probability of the event in square brackets occuring when $E$ is sampled from the distribution $\mathcal{D}$.
{ "domain": "physics.stackexchange", "id": 99426, "lm_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, density-operator", "url": null }
tip of a triangle to you right here shape! A vertical pointed edge informally, it is important to mention that centroids of areas lines. Private tutoring student of Civil Engineers want to know the centroid of shape. And AY of each side zero, that if you were … Looking for of! Edges of the triangle 's medians intersect to the centroid of a line as... 25 cm shape could be perfectly balanced on the tip of a pin )! Balancing point for the triangle 's medians intersect point locations center '' is where special lines,. Gravity ) of straight line lies at a distance L/2 = 50/2 = 25 cm be the average that! Point where the pipe is need to transferred from store to ship with the help of crane 100... The point at which a cutout of the shape could be perfectly balanced on both will... Months ago ( just by eye is OK ) shown in diagram above, the amoeba shown... Where load balanced on the tip of a triangle intersect at its centroid on those lines from to..., it is important to mention that
{ "domain": "vidyaxpert.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464520028357, "lm_q1q2_score": 0.8314603088520551, "lm_q2_score": 0.8519527963298946, "openwebmath_perplexity": 668.2425749367483, "openwebmath_score": 0.5760510563850403, "tags": null, "url": "https://www.vidyaxpert.com/institute-of-jkwhb/9efe32-centroid-of-lines" }
turing-machines, turing-completeness, digital-circuits We can convert a program $P$ into a circuit $P_n$ that simulates $P$ on inputs of length $n$. The corresponding sequence of circuits $P_0,P_1,P_2,\ldots$ is not arbitrary – they can all be constructed by a program that given $n$ outputs $P_n$. We call such a sequence of circuits a uniform circuit (confusingly, we often think of the sequence as a "single" circuit $P_n$ for an indefinite $n$).
{ "domain": "cs.stackexchange", "id": 21443, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, turing-completeness, digital-circuits", "url": null }
c++, tree, interface, qt In order to improve my understanding of how interfaces should be designed I'm looking for a critique, if possible, of the functionality of this interface. My general target was to include a useful set of basic tree-related functions - obviously the bare minimum would be simply adding/removing/getting children, but I also felt as though automating potentially useful processes such as removing all children (pruneSubtree() - thinking recursive deletion) and removing a node from a given tree structure to leave a forest might help make future tasks easier. I'm also torn on whether it's better to pass a node pointer in when adding a child (the method Valve used, where the node takes ownership of the child being added) or to have the add method not require a pointer and simply have the node create and manage its own children - I'm not clued up on the relative merits of these two choices, so arguments for and against would be helpful. So basically:
{ "domain": "codereview.stackexchange", "id": 7693, "lm_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++, tree, interface, qt", "url": null }
slam, navigation, ros-melodic, rtabmap Originally posted by PeteBlackerThe3rd with karma: 9529 on 2019-01-30 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by gvdhoorn on 2019-01-31: Link to (one of the) package(s) that provides such a plugin: rviz_plugin_covariance. Apparently part of RViz since ros-visualization/rviz#1099.
{ "domain": "robotics.stackexchange", "id": 32377, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, ros-melodic, rtabmap", "url": null }
solid-state-physics, semiconductor-physics, electronic-band-theory Title: Why Silicon band gap energy is more than germanium? The question is very simple.Why silicon band gap energy is more than germanium at Ok? I know the equation $$EG(Si) = 1.21−(3.6×10-4 )⋅T$$ and $$EG(Ge) = 0.77−(3.6×10-4 )⋅T$$ But what is the physical (atomic) phenomenon behind these features? Thanks for your time For most common elemental and compound semiconductor materials, there is a trend that larger lattice constants coincide with smaller bandgaps. In a strongly simplified picture, the crystal lattice resembles a one dimensional superlattice, where the nuclei represent electronic barriers and the "empty space" in between, where the electron orbitals are located, corresponds to quantum wells. Now, if you increase the lattice-constant and therefore the superlattice period in a gedankenexperiment, the energy difference between the subbands of the superlattice will decrease.
{ "domain": "physics.stackexchange", "id": 47491, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solid-state-physics, semiconductor-physics, electronic-band-theory", "url": null }
# Examples We can use Pandoc fenced div syntax now ::: {.definition} The characteristic function of a random variable $X$ is defined by $$\varphi _{X}(t)=\operatorname {E} \left[e^{itX}\right], \; t\in\mathcal{R}$$ ::: ::: {.example} We derive the characteristic function of $X\sim U(0,1)$ with the probability density function $f(x)=\mathbf{1}_{x \in [0,1]}$. \begin{equation} \begin{split} \varphi {X}(t) &= \operatorname {E} \left[e^{itX}\right]\ & =\int e^{itx}f(x)dx\ & =\int{0}^{1}e^{itx}dx\ & =\int_{0}^{1}\left(\cos(tx)+i\sin(tx)\right)dx\ & =\left.\left(\frac{\sin(tx)}{t}-i\frac{\cos(tx)}{t}\right)\right|_{0}^{1}\ & =\frac{\sin(t)}{t}-i\left(\frac{\cos(t)-1}{t}\right)\ & =\frac{i\sin(t)}{it}+\frac{\cos(t)-1}{it}\ & =\frac{e^{it}-1}{it} \end{split} \end{equation} Note that we used the fact $e^{ix}=\cos(x)+i\sin(x)$ twice. ::: We can include some Mardown syntax and R code ::: {.lemma #chf-pdf} For any two random variables x, y, you can add then using +, and for example
{ "domain": "rdrr.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9585377296574668, "lm_q1q2_score": 0.8008424947845727, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 643.7136995512707, "openwebmath_score": 0.965094268321991, "tags": null, "url": "https://rdrr.io/cran/bookdown/f/tests/rmd/custom-environments.Rmd" }
machine-learning, pytorch, hyperparameter-tuning, metric Title: Metric to use to choose between different models - Hyperparameters tuning I'm building a Feedforward Neural Network with Pytorch and doing hyperparameters tuning using Ray Tune. I have train, validation and test set, train and validation used during the training procedure. I have different versions of the model (different learning rates and numbers of neurons in the hidden layers) and I have to choose the best model. But I'm unsure on which metric should I use to choose the best model. Basically I don't know the XXXX in this line of code: analysis.get_best_config(metric='XXXX', mode='min')
{ "domain": "datascience.stackexchange", "id": 8614, "lm_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, pytorch, hyperparameter-tuning, metric", "url": null }
time-complexity, probability-theory What is the expected time complexity of this algorithm? When $m$ is much larger than $n$, the expected number of trials is basically linear in $n$. We can make this more precise, as shown below. Let $T_n$ be the random variable which counts the number of trials up to seeing $n$ different elements, where the elements are picked uniformly at random from a set of size $m$. You can write $T_n$ as the sum of geometric random variables $$T_n=1+G\left(1-\frac{1}{m}\right)+G\left(1-\frac{2}{m}\right)+...+G\left(1-\frac{n-1}{m}\right)$$ where $G(p)$ is a geometric random variable with parameter $p$ (number of trails up to the first success, where success happens with probability $p$ (I leave it to you to prove the equivalence). Using linearity of expectation: $$\begin{align*} \mathbb{E}\left[T_n\right]&=\sum\limits_{i=0}^{n-1}\mathbb{E}\left[G\left(1-\frac{i}{m}\right)\right]\\ &=\sum\limits_{i=0}^{n-1}\frac{m}{m-i}\\ &=m\left(\frac{1}{m}+\frac{1}{m-1}+...+\frac{1}{m-n+1}\right)\\
{ "domain": "cs.stackexchange", "id": 7725, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time-complexity, probability-theory", "url": null }
forces, space, rocket-science Can you help either to prove me wrong or provide a better explanation to my argument. (Additional info): - We are assuming a cylinder-like ship with perfect weight distribution , an even number of equidistant thrusters for rotation
{ "domain": "physics.stackexchange", "id": 17763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, space, rocket-science", "url": null }
ros Please edit your description and copy/paste the output of the lsusb command (please do not give me a screenshot.) You edit using the "edit" button near the end of the description. Comment by kowais915 on 2023-05-04: Thank you so much already for help. I have added the output to the description please check. Furthermore, I only get the first error message now: The TImeout Error. "[ERROR] [1683048712.103957025]: Error, operation time out. RESULT_OPERATION_TIMEOUT! [rplidarNode-1] process has died [pid 3196, exit code 255, cmd /home/ubuntu/catkin_ws/devel/lib/rplidar_ros/rplidarNode __name:=rplidarNode __log:=/home/ubuntu/.ros/log/690e8cb0-e90e-11ed-8367-b827ebea13cf/rplidarNode-1.log]. log file: /home/ubuntu/.ros/log/690e8cb0-e90e-11ed-8367-b827ebea13cf/rplidarNode-1*.log" Comment by Mike Scheutzow on 2023-05-04:\
{ "domain": "robotics.stackexchange", "id": 38363, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
machine-learning, scikit-learn, cross-validation in short this is what I need to know: scores = cross_val_score(t, d_att,d_pass, cv=5) print ('Acuracy %0.2f (+/- %0.2f)' % (scores.mean(), scores.std() *2)) one more thing, am I suppose to get the same score as in the original code publisher? because I didn't. The source, around line 274 is where the default scoring for cross_validation_score gets set, if you pass in None for the scorer argument. For classifiers, the usual default score is accuracy. For regression, it's rmse, IIRC. So, since you're applying a decision tree classifier, cross_val_score splits the data into 5 equalish sized pieces, trains on each combination of 4 and gives back the accuracy of the estimator on the 5th. The mean and std of these accuracies presumably tells one something about the performance of the family of decision tree classifiers on your dataset, but I would take it with a grain of salt.
{ "domain": "datascience.stackexchange", "id": 3389, "lm_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, scikit-learn, cross-validation", "url": null }
c#, entity-framework Then I just assign this list to my Model property and insert. Can I avoid this trip to the database? If you need anything else from my code ask for it and I can post it or you can check it all at https://github.com/tellez12/Classifieds/ UPDATE: This is my ViewModel where I get the itemTypes and call my repository to do the insert : public class FeatureTypeViewModel { public int Id { get; set; } public string Name { get; set; } public bool Required { get; set; } public string RequiredText { get; set; } public int ControlType { get; set; } public int Order { get; set; } public int SectionId { get; set; } public int[] ItemTypes { set; get; } public SelectList SectionSelect { get; set; } public SelectList ControllerTypeSelect { get; set; } public SelectList ItemTypeSelect { get; set; } private IUnitOfWork unitOfWork; public FeatureTypeViewModel() { }
{ "domain": "codereview.stackexchange", "id": 5385, "lm_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#, entity-framework", "url": null }
java, statistics You compute the min and max values while adding samples, but compute the other values in setValues(). The mean() method returns a Float object, while the others return simple float primitives. You have public methods that require your user to pass in an ArrayList. You should change that to List, thus allowing for arbitrary List implementations. I don't understand why you made size a float insted of an int. It can never be fractional, and if it's for performance reasons, it's "premature optimization". And may I suggest to rename the class to XYSamples, as XYSample to me sounds like one x/y pair only, and to use a package name beginning with some reverse domain name you are associated with, like com.glass.wood.statistics or similar, so you don't risk collision with some other library.
{ "domain": "codereview.stackexchange", "id": 28624, "lm_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, statistics", "url": null }
complexity-theory, computability, np-complete, reductions I can not find the answer. I can not find a relationship between m and h and the size of the number of verses This question refers to a specific transformation that you have seen during the course but we are not given, so we can only guess. A standard transformation from a SAT clause $C$ to a collection of 3-SAT clauses is as follows: If $C$ already contains $3$ literals, then $C$ is left unchanged. If $C$ contains $1$ (resp. $2$) literals, then add $2$ (resp. $1$) copies of a literal from $C$ to $C$ itself. If $C$ contains $k \ge 4$ literals, then let $C = \ell_1 \vee \ell_2 \vee \dots \vee \ell_k$. Add $k-3$ new variables $x_3, \dots, x_{k-1}$ andeplace $C$ with: $$ (\ell_1 \vee \ell_2 \vee x_3) \wedge \left( \bigwedge_{i=3}^{k-2}(\overline{x}_i \vee \ell_i \vee x_{i+1}) \right) \wedge (\overline{x}_{k-1}, \ell_{k-1}, \ell_k) $$
{ "domain": "cs.stackexchange", "id": 18717, "lm_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, computability, np-complete, reductions", "url": null }
If you differentiate, you find for $$x\in (n,n+1)$$, where $$n>1$$: $$f'(x) = \sum_{k=1}^{n+1} \frac{(x-k+1)^{k-1}}{(k-1)!} =\sum_{j=0}^{n} \frac{(x-j)^{j}}{j!}= f(x-1)$$ so to the right of 1, it solves a delay ODE with initial data prescribed on $$x\in(0,1]$$ above. $$f'$$ is clearly discontinuous at $$0$$, but $$\left.\frac{d}{dx}\frac{(x-1)^2}{2!}\right|_{x=1} = 0$$ so the derivative is continuous at $$x=1$$. In general, for any integer $$n\ge 2$$, near $$x=n-1$$, all the terms $$\frac{(x-h+1)^h}{h!}$$ for $$h are smooth, and the newly added term $$T_n$$, $$T_n(x) := \begin{cases} \frac{(x-n+1)^n}{n!} & x>n-1,\\ 0 & x\le n-1\end{cases}$$ is $$C^1$$. Conclusion - $$f \in C^0(\mathbb R)\cap C^1(\mathbb R\setminus \{0\}).$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8344632012045484, "lm_q2_score": 0.8577681013541611, "openwebmath_perplexity": 207.70384663766873, "openwebmath_score": 0.9822348952293396, "tags": null, "url": "https://math.stackexchange.com/questions/3358361/construct-a-function-with-each-derivative-being-non-differentiable-at-a-distinct" }
kinematics, velocity, vectors, differentiation Title: Direction of velocity vector in 3D space According to a well-known textbook (Halliday & Resnick), the direction of a velocity vector, $\vec v$, at any instant is the direction of the tangent to a particle's path at that instant, as is illustrated below in 2D. According to the same textbook, the same holds for 3D. However, the tangent to a curve in 3D is not a line, but a plane! A vector could be in a plane and still take on any direction betwen $0^{\circ}$ and $360^{\circ}$ within that plane. How do we define and determine the direction of $\vec v$ given a particle's path in 3D? (If possible, include illustrations in your answers). Example with Figures on @JEB 's answer.
{ "domain": "physics.stackexchange", "id": 44577, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, velocity, vectors, differentiation", "url": null }
+ = the rest of the keyboard shortcuts can incorporate formulations. 9 Joined: Thu Aug 26, 2010 8:39 pm discussion about 's... Create a fraction object of fractions is quite flexible, they can be nested to more... Of code phrases ) i would like to render a fraction multiplied by an integral by the next expression \! By placing them between Dollar signs on top of another and mathematical fraction terms, les se... Pair is the numerator and ' b ' to denominator négation d'un opérateur en utilisant \not\opérateur specific... Of braces is the numerator and in the text size of the fraction as if it were mathematical... Fraction changes according to the numerator above the denominator, separated by a line complex expressions we will you. • Page 1 of 1. xbender posts: 9 Joined: Thu Aug,! Your equation using Alt + = elements in mathematical display mode using these different formats with subscript Enter... Est obtenu avec \dfrac fraction would be illegible, each of which using specific commands
{ "domain": "hamnvag.no", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9136765328159727, "lm_q1q2_score": 0.8253187165153385, "lm_q2_score": 0.9032942041005328, "openwebmath_perplexity": 3931.995740765869, "openwebmath_score": 0.9558112621307373, "tags": null, "url": "https://hamnvag.no/9xl9pip/8159ac-fraction-in-latex" }
molecular-genetics, human-genetics, allele Title: How to determine if two mutations in a gene are on the same or different alleles? I would like to know, except a familial study, is there another way to determine if a mutation/variation is cis or trans (i.e. on the same or different alleles)? For example by sequencing technique or other molecular biology procedure. CIS TRANS + + + + | | | | A | A | | | | | B | | B | | | | + + + +
{ "domain": "biology.stackexchange", "id": 9797, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "molecular-genetics, human-genetics, allele", "url": null }
newtonian-mechanics, forces, energy, work Title: Does the Work-Energy Theorem still apply when an object, starting at rest, moves and is still at rest? The Work-Energy Theorem as described in my physics learning module is "The Work-Energy Theorem states that the net mechanical work done on an object is equal to the change in the object's kinetic energy." But, I was wondering, if the work energy theorem applies universally (or that is what I am assuming), then how would it apply if I lift a book at rest from the ground, and set it atop a bookshelf. Work (by the definition W=fd) is being done, but by the work-energy theorem, work is not being done.
{ "domain": "physics.stackexchange", "id": 93610, "lm_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, forces, energy, work", "url": null }
navigation, move-base Originally posted by ganhao89 on ROS Answers with karma: 21 on 2017-05-15 Post score: 1 Part of the problem may be from looping for 5.0 seconds and waiting for 1.0 second in the callback Usually, you want your callbacks to execute quickly and six seconds is not quick. I also notice that you're instantiating the action client in your callback too. You should probably make a class and have the callback manipulate the class attributes. That way, you don't have to have the waiting and instantiation in your callback. http://wiki.ros.org/actionlib_tutorials/Tutorials/Writing%20a%20Callback%20Based%20Simple%20Action%20Client#But_I_want_to_use_Classes.21 Originally posted by jayess with karma: 6155 on 2017-06-21 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 27906, "lm_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, move-base", "url": null }
can be written as. Algorithms. Consider the rank-deficient linear least-squares problem: For r=n, the optimal solution, , is unique; however, for r> help qr QR Orthogonal-triangular decomposition. Consider the least squares problem with A = 1 3 1 1 3 7 1 −1 −4 1 −1 2 and b = 1 1 1 1. For a singular or non-square matrix A the QR-decomposition of A is not unique. Las funciones incluyen una gran variedad de factorizaciones de matrices, resolución de ecuaciones lineales y cálculos de valores propios o valores singulares, entre otras. qr, but if a is a rectangular matrix the QR decomposition is computed first. Cosine-Sine Decomposition: LAPACK Computational Routines?bbcsd?orbdb/?unbdb; LAPACK Least Squares and Eigenvalue Problem Driver Routines. The default value is 2. One of the applications of QR factorization is solution of linear least squares. In that case we revert to rank-revealing decompositions. 1 Formulation of Least-Squares Approximation Problems. then after the QR decomposition,
{ "domain": "bonref.fr", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9916842205394513, "lm_q1q2_score": 0.8368774511537687, "lm_q2_score": 0.8438950966654772, "openwebmath_perplexity": 697.4457137616795, "openwebmath_score": 0.6584647297859192, "tags": null, "url": "http://hcxu.bonref.fr/qr-decomposition-least-squares.html" }
python, performance, primes, sieve-of-eratosthenes j, pbase = ibase, p # add(mults, NEXT c, ibase, p) p = next(ps) ; psq = p*p m = c + pbase*wheel[j] ; j = (j+1) % wsize # mults(p) = map (*p) while m in mults: # roll(wheel,ibase,p) m += pbase*wheel[j] ; j = (j+1) % wsize mults[m] = (j,pbase)
{ "domain": "codereview.stackexchange", "id": 13975, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, primes, sieve-of-eratosthenes", "url": null }
quantum-mechanics, operators, hamiltonian, mathematics, eigenvalue Title: Property of the Hamiltonian's discrete spectrum I have found a statement online saying that there must be an eigenvalue of the Hamiltonian inside the range $(E-\Delta H,E+\Delta H)$. Where the mean value and variance are defined for a random (normalized) wave function $| \psi \rangle $, so $E \equiv \langle \psi |H|\psi \rangle$ and $\Delta H \equiv \sqrt{\langle \psi |H^2|\psi \rangle-E^2}$. Although this seems intuitively correct, I wanted to prove it. My limited experience in such cases is that firstly we expand $|\psi \rangle$ in the base defined by the eigenkets of $H$ meaning $$|\psi \rangle =\sum\limits_n c_n \;|\psi_n \rangle \text{ where } c_n=\langle \psi_n|\psi\rangle\text{ complex numbers.} $$ We then have the expressions for $E,\;\Delta H$: \begin{align} E &=\sum\limits_n |c_n|^2 E_n\\ (\Delta H)^2&=\sum\limits_n |c_n|^2 E^2_n-\left(\sum\limits_n |c_n|^2 E_n \right)^2. \end{align}
{ "domain": "physics.stackexchange", "id": 100019, "lm_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, operators, hamiltonian, mathematics, eigenvalue", "url": null }
when a linearly recursive method makes its recursive call as its last step. RLS algorithm has higher computational requirement than LMS , but behaves much better in terms of steady state MSE and transient time. Some other uses of pseudocode include the following: Describing how an algorithm should work. The recursive call must be absolutely the last thing the method does. Recursion in C. The purpose of this Python challenge is to demonstrate the use of a backtracking algorithm to find the exit path of Maze. Enqueue the unvisited neighbor nodes: 1, 3, 8. GitHub Gist: instantly share code, notes, and snippets. algorithm synonyms, algorithm pronunciation, algorithm translation, English dictionary definition of algorithm. next, prevNode = null. Recursion is used in this algorithm because with each pass a new array is created by cutting the old one in half. Why we Use Recursion In JavaScript Written by Akram Posted on May 6, 2020 May 6, 2020 Less than 0 min read Saving Bookmark this article
{ "domain": "angolodeisaporifirenze.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9637799441350252, "lm_q1q2_score": 0.8266996963081685, "lm_q2_score": 0.8577681049901037, "openwebmath_perplexity": 806.9678291076392, "openwebmath_score": 0.4165516495704651, "tags": null, "url": "http://angolodeisaporifirenze.it/qjxw/recursion-pseudocode.html" }
acceleration, vectors, rotational-kinematics, centripetal-force But why then if you let the ball free it moves outward? The answer is that it doesn't really move outward, it simply begins moving in a straight line again since you are no longer applying force to it, as the first principle of dynamics states. Everything is consistent. Of course moving in a straight line in this context means moving away from the previous location of the rotational motion, so an observer has the impression of the ball moving away from the center, when the ball is as stated simply continuing his motion with the velocity it had at the time of release.
{ "domain": "physics.stackexchange", "id": 74050, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acceleration, vectors, rotational-kinematics, centripetal-force", "url": null }
Define $$z = sx + (1-s)y$$. $$\exists z_1 \in (x, z), \quad\text{s.t.}\quad f(z) - f(x) = (z-x)f'(z_1)$$ $$\exists z_2 \in (z, y), \quad\text{s.t.}\quad f(y) - f(z) = (y-z)f'(z_2)$$ so \begin{aligned} sf(x) + (1-s)f(y) = & s[f(z) - (z-x)f'(z_1)] + (1-s)[f(z) + (y-z)f'(z_2)] \\ = & s[f(z) - (1-s)(y-x)f'(z_1)] + (1-s)[f(z) + s(y-x)f'(z_2)] \\ = & [s+(1-s)]f(z) + s(1-s)(y-x)[f'(z_2) - f'(z_1)]\\ = & f(z) + s(1-s)(y-x)[f'(z_2) - f'(z_1)] \end{aligned} Apparently $$s>0, 1-s>0, y-x>0$$ and also $$f'(z_2) \leq f'(z_1)$$ because $$f''(x)$$ always negative. So $$[sf(x) + (1-s)f(y)] - f(z) = s(1-s)(y-x)[f'(z_2)-f'(z_1)] \leq 0$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429634078179, "lm_q1q2_score": 0.8151311359474148, "lm_q2_score": 0.8289387998695209, "openwebmath_perplexity": 2023.0949744300533, "openwebmath_score": 0.9999741315841675, "tags": null, "url": "https://math.stackexchange.com/questions/3025871/fx-leq-0-implies-f-concave/3025892" }
filter-design, lowpass-filter, finite-impulse-response, interpolation Lets calculate for $y[2.5]=h(0)x(2.5)+h(1)x(1.5)+h(2)x(0.5)+h(3)x(-0.5)$ so here $x(2.5)=x(1.5)=x(0.5)=0$ Please answer this to clear my confusion??? The interpolation lowpass filter computes a weighted sum of input samples, which results in the zero input samples being interpolated using the non-zero samples of the input signal. The $*$ sign is NOT multiplication but convolution! EDIT: I'm adding a simple example to clear things up a bit. Let's consider the impulse response $h = [0.5, 1, 0.5]$ and a zero-padded input signal $x=[1,0,3,0,5,0,3,0,1]$. The time index is denoted by $n$, and $n=0$ corresponds to the left-most values of $h$ and $x$. The output $y$ is the convolution of $(x*h)(n)$: $$y(0) = h(0)x(0) = 0.5\\ y(1) = h(0)x(1) + h(1)x(0) = 1\\ y(2) = h(0)x(2) + h(1)x(1) + h(2)x(0) = 2\\ y(3) = h(0)x(3) + h(1)x(2) + h(2)x(1) = 3\\ y(4) = h(0)x(4) + h(1)x(3) + h(2)x(2) = 4\\ y(5) = h(0)x(5) + h(1)x(4) + h(2)x(3) = 5\\\vdots$$
{ "domain": "dsp.stackexchange", "id": 878, "lm_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, lowpass-filter, finite-impulse-response, interpolation", "url": null }
python, pandas, dataframe File "/usr/local/lib/python3.6/site-packages/pandas/core/indexing.py", line 599, in _setitem_with_indexer raise ValueError('Must have equal len keys and value ' ValueError: Must have equal len keys and value when setting with an iterable
{ "domain": "datascience.stackexchange", "id": 2786, "lm_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, dataframe", "url": null }
python, python-3.x, random, playing-cards, bitcoin Every card should be a rank character followed by a suit character. """ for i in listOfCards: if i[0] not in cardRanks: message = ( "'" + str(i) + "' is not a recognised card rank.\n" "A valid rank is a single character as follows:\n" "'A' (ace)\n" "'2' (two)\n" "'3' (three)\n" "'4' (four)\n" "'5' (five)\n" "'6' (six)\n" "'7' (seven)\n" "'8' (eight)\n" "'9' (nine)\n" "'T' (ten)\n" "'J' (jack)\n" "'Q' (queen)\n" "'K' (king)" ) raise UnrecognisedCardRankError(message) if i[1] not in cardSuits: message = ( "'" + str(i) + "' is not a recognised card suit.\n" "A valid suit is a single character as follows:\n" "'S' (spades)\n"
{ "domain": "codereview.stackexchange", "id": 6235, "lm_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, random, playing-cards, bitcoin", "url": null }
biochemistry, enzymes, enzyme-kinetics, definitions Title: Meaning of some unit of measurement of kinase activity I need help knowing what $cpm \times 10^3$ means in Figure 4(C) of this paper (https://www.sciencedirect.com/science/article/pii/S0022202X15323149#f0010). It appears to be a unit of kinase activity. It is not a specific unit of kinase activity, rather a general approach taken for following reactions where there is no change of colour. The abbreviation cpm stands for counts per minute and is a measure of radioactivity. In this particular example a radioactive phosphate has been incorporated in the ATP of the protein kinase assay. If the protein kinase is active with the substrate, the phosphate will be transferred from the ATP to the substrate peptide/protein. If the sample mix is loaded on a SDS-PAGE gel, a scintillation counter can be used to measure the radioactivity of each band and one will be able to show how active the protein kinase has been in phosphorylating it's substrate.
{ "domain": "biology.stackexchange", "id": 10968, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "biochemistry, enzymes, enzyme-kinetics, definitions", "url": null }
• that sounds right, the rod is radial, and constraints the mass radially, therefore the force it exerts are in the radial direction. Why do you think it is wrong? (btw I haven't checked you maths) – JMLCarter Dec 24 '16 at 20:10 • @JMLCarter I think it is wrong because N points inward toward the center of the rod just like the radial component of the gravity force does. If both radial forces point towards the center, I think the particle could not stay on the circle but would move towards the center. – user2175783 Dec 24 '16 at 20:18 • Your first integration is wrong because you integrated the left side with respect to $\theta$ and the right side with respect to time, $t$, but you didn't coordinate the two variables. There isn't any differential relationship specified that justifies that integral. – Bill N Dec 25 '16 at 2:16
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995733060719, "lm_q1q2_score": 0.8028007112426987, "lm_q2_score": 0.8311430436757312, "openwebmath_perplexity": 224.03300833091134, "openwebmath_score": 0.7658323645591736, "tags": null, "url": "https://physics.stackexchange.com/questions/300748/a-sign-problem" }
spectroscopy, radial-velocity Orbital Parameters $m_p$        Sec.2        Planet mass $m_s$        Sec.2        Stellar mass $a$          Fig.1       Semimajor axis $e$          Fig.1        Eccentricity of planetary orbit $\varpi$         Fig.1       Negative longitude of the line of sight $i$           Fig.2        Inclination between normal direction of orbital plane and y-axis $r_p$         Eq.[1]       Distance between star and planet (see Fig.1) $f$          Eq.[2]        True anomaly (see Fig.1) $E$         Eq.[2]       Eccentric anomaly $n$          Eq.[3]       Mean motion $M$        Eq.[4]       Mean anomaly Internal Parameters of Star and Planet $Is$        Fig.2         Inclination between stellar spin axis and y-axis $λ$          Fig.3         Angle between $z$-axis and normal vector $\hat{n}_p$ on $(x, z)$-plane $Ω_s$         Eq.[12]       Annular velocity of star (see Fig.2) $R_s$         Sec.4      Stellar radius $R_p$         Sec.4      Planet radius
{ "domain": "astronomy.stackexchange", "id": 7153, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectroscopy, radial-velocity", "url": null }
special-relativity, electromagnetic-radiation, accelerator-physics $q = 1.6 \times 10^{-16}\text{ C}$ $\epsilon_0 = 8.8 \times 10^{-12} \text{ m}^{-3} \text{ kg}^{-1} \text{ s}^2 \text{ C}^2$ $c = 3\times10^8\text{ m/s}$ $t = 6\times10^{-6}\text{ s}$ $$E_l \approx 1.2\times 10^{-28}\text{ J} = 7 \times 10^{-10}\text{ eV}$$. So the losses are trivial. This isn't surprising since a typical CRT runs at 10+ keV over a few centimeters and doesn't spew lots of x-rays around the room.
{ "domain": "physics.stackexchange", "id": 4970, "lm_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, electromagnetic-radiation, accelerator-physics", "url": null }
zoology Title: Where I can find information about the study of animal vision? I read a lot of articles on the internet about how dog see the the world. But I can't find the source of these study. I want to know how did scientist setup the experiment to find out animal vision. I don't know which keyword should I use to search for the information on the internet. Can anybody please send me some research paper about the problem? While their work was in the cat rather than the dog, your starting point should be the work of Hubel and Wiesel. They are the indisputable pioneers for vision research in general. They won the Nobel Prize in 1981 for Physiology and Medicine. See their Wikipedia entries (Hubel and Wiesel), the original 1962 paper, their popular press book, the Nobel Prize speech about their work and Roger Sperry's, and Wurtz's review (cited below).
{ "domain": "biology.stackexchange", "id": 2663, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "zoology", "url": null }
condensed-matter, material-science, stress-energy-momentum-tensor, continuum-mechanics, stress-strain $$\sigma_0=\frac13\text{tr} \,\sigma= \frac13\left(\sigma_1+\sigma_2+\sigma_3\right)$$ (To see this, note that the trace is basis-independent and consider a diagonal $\sigma$.) If you again consider the cube-shaped volume element, $\sigma_0$ tells you how much overall pressure the element feels, i.e. the mean value of the stress from all sides. One use isotropic stress is that you can decompose the stress tensor in the isotropic and deviatoric parts, $$\sigma=\sigma^\text{d} +\sigma_0 \mathbb{1}\,,$$ and many processes respect this split (i.e. volumetric vs. shear deformations).
{ "domain": "physics.stackexchange", "id": 62968, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, material-science, stress-energy-momentum-tensor, continuum-mechanics, stress-strain", "url": null }
filters, decimation, synchronization How does this result in timing adjustment ? The phases of a polyphase filter can be interpreted as a fractional delays. Consider your filter with $8\cdot 256$ taps in the up-sampled domain. In order to avoid aliasing the filter needs to be a low pass that doesn't allow any content above $1/256$ of the sample rate. Since there is no energy above $1/256\cdot f_s$ in the transfer function you can actually down-sample the impulse response by a factor of $256$ without aliasing. That means that all phases have the same magnitude response in the down-sampled domain. The only difference between the phases is a linear phase that corresponds to a fractional delay. If phase $0$ has a delay of "$0$" samples, then phase $1$ will have a delay of $1/256$ samples etc. in the down sampled domain.
{ "domain": "dsp.stackexchange", "id": 392, "lm_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, decimation, synchronization", "url": null }
control, ros, usb, dynamixel-motor, robotis Original comments Comment by dylanvaughn on 2014-12-31: Sorry for the off-topic comment but I'm building the clamarm and the road narrows kit doesn't exist anymore: http://www.roadnarrows-store.com/clam-arm-servo-kit.html I think I have found all the servos but am unsure on the brackets - if you have a chance could you let me know what you ordered? Comment by Dave Coleman on 2015-01-09: Hey there, I'm the creator the ClamArm website. I don't have time to maintain the project anymore, but if any of you guys figured out problems or made improvements, I'd be happy to improve the documentation. I've bought CLAM arm too, but you've gotten further along than me in assembly.
{ "domain": "robotics.stackexchange", "id": 15415, "lm_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, ros, usb, dynamixel-motor, robotis", "url": null }
telescope, newtonian-telescope In the mid 19th century, the process of depositing a thin layer of metal, originally silver, but now usually aluminum, onto glass was developed. Glass, while heavy, is much easier to configure into a precise shape. Once done, the reflective coating could be deposited onto the glass mirror blank. Because the coating is on the front-side of the mirror, light doesn't pass through the glass, just bounces off the coating. This made Newtonian reflecting telescopes much easier to produce. Only the one surface, the primary mirror, has to be precisely configured, and this made them more cost-effective. And the weight and balance issues made making larger and larger telescopes easier.
{ "domain": "astronomy.stackexchange", "id": 4902, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "telescope, newtonian-telescope", "url": null }
c++, performance, c++11, collections, skip-list and then adding: a typedef for difference_type (set to std::ptrdiff_t) a typedef for reference (set to value_type&) a typedef for pointer (set to value_type*) a typedef for iterator_category (set to std::forward_iterator_tag) operator++(int) and all that will make iterator_base a standard-library conforming iterator. Note that if you think you can implement iterator_base with an operator--, then maybe you could make it a bidirectional iterator. Maybe even random access. But if you can't do those things, don't bother. In particular, the way you've implemented operator+/operator+=, it's really just looping over operator++, which is not the point of operator+/operator+=. I can do that myself with std::next() or std::advance(). Alright, that's enough iterator evangelizing, back to the code.... iterator_base& operator++() // if next element is empty dont increase more { if (curr == nullptr) return *this; curr = curr->next[0]; return *this; }
{ "domain": "codereview.stackexchange", "id": 31334, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, c++11, collections, skip-list", "url": null }
gazebo, turtlebot, transform Here is the launch files I use to put many robot in Gazebo and to view it with Rviz correctly. Environment : <launch> <!-- Gazebo config --> <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="debug" value="false"/> <arg name="gui" value="false"/> <arg name="world_name" value="$(find exploration)/worlds/gazebo_z.world"/> <!-- <arg name="world_name" value="worlds/willowgarage.world"/> --> </include> <!-- Launch for multi robots --> <include file="$(find exploration)/config/robot/robots.launch.xml" /> </launch>
{ "domain": "robotics.stackexchange", "id": 16590, "lm_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, turtlebot, transform", "url": null }
c++, ai, chess return true; } return false; } void undoMove() { Index fromIndex = board->positionToIndex(this->position); Index toIndex = board->positionToIndex(this->previousPosition); this->setPosition(this->previousPosition); this->board->pieceArray[toIndex.y][toIndex.x] = this->board->pieceArray[fromIndex.y][fromIndex.x]; this->board->pieceArray[fromIndex.y][fromIndex.x] = this->destinationPiece; } bool canCheck(Position position) { return this->pieceStrategy->move(this->position, position); } bool moveKingSideRook() { return this->pieceDelegate->moveKingSideRook(); } bool moveQueenSideRook() { return this->pieceDelegate->moveQueenSideRook(); }
{ "domain": "codereview.stackexchange", "id": 19291, "lm_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++, ai, chess", "url": null }
python, python-3.x, iterator And using it as follows: def dict_combinations(d): keys, values_list = zip(*d.items()) for values in itertools.product(*map(iter_safe, values_list)): yield dict(zip(keys, values)) To me this is cleaner, having separated out the iter_safe logic from the dicts. Though merely theoretical, I think this should save on memory usage due to there not being as much key-value pairs in memory all the time. Of course, if you still want pair_iter_safe, you should be able to do something like def pair_iter_safe(kv_pair): key, value = kv_pair for v in iter_safe(value): yield key, v
{ "domain": "codereview.stackexchange", "id": 19925, "lm_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, iterator", "url": null }
experimental-chemistry Oil for the oil bath is often available commercially, every batch has the same properties and is arguably easier to store and transport; sand bath requires sifted and refined sand (quartz sand, ideally). It all depends on what's easier to find a good supplier and storage for. Oil bath heats up relatively quickly, especially if the oils isn't very viscous; sand bath heats up very slowly due to slow heat transfer in powdered/granulated material. As a consequence of the former statement, oil bath is uniformly heated, whereas sand bath always has a temperature gradient with the maximum temperature at the bottom and minimum on top layer. This requires that the tip of the thermal sensor is located at the same depth as chemicals in the reactor. Oil bath can usually only be heated up to approx. 250 °C max depending on the oil used; sand bath can be heated up to 400 °C (provided a ceramic pod is used).
{ "domain": "chemistry.stackexchange", "id": 11848, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "experimental-chemistry", "url": null }
quantum-mechanics, interference, quantum-interpretations Title: What does Copenhagen interpretation tell about Mach-Zehnder interferometer with single photons? Reading many sources on the net it is not clear what Bohr et al. says concretely about MZI. Maybe they say that the particle doesn't exist during this flight and appears only on the detectors? Maybe they say that the particle splits somehow and goes two ways? Maybe the particle goes one way and the wavefunction goes both ways but only as information (ghost as Einstein would put it)? Are there some rules for the particle in the MZI at all like that it must not disentegrate, be in two places (or all places) at once, follow a continuos path or it can do any nonphysical things? The Copenhagen Interpretation introduces the notion of a 'classical apparatus'. A classical apparatus is something like a measuring device, or a permanent mark, or an irreversible process like an avalanche in a gas, etc. One asserts that a quantum amplitude is a quantity whose modulus squared gives the probability
{ "domain": "physics.stackexchange", "id": 91720, "lm_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, interference, quantum-interpretations", "url": null }
newtonian-mechanics, momentum, rotation Thanks in advance! Any help is greatly appreciated! Congratulations! You have just discovered the inertia tensor. As a general rule, the angular velocity is related to the angular momentum not simply by $\vec{L} = I \vec{\omega}$, but by the matrix equation $$ \begin{bmatrix} L_x \\ L_y \\ L_z \end{bmatrix} = \underbrace{\begin{bmatrix} I_{xx} & I_{xy} & I_{xz} \\ I_{yx} & I_{yy} & I_{yz} \\ I_{zx} & I_{zy} & I_{zz} \end{bmatrix}}_{\equiv \mathbf{I}}\begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}, $$ where the on-diagonal components of the matrix $\mathbf{I}$ are called the moments of inertia and are given by $$ I_{zz} = \sum_i m_i (x_i^2 + y_i^2) $$ (and similarly for $I_{xx}$ and $I_{yy}$), and the off-diagonal components are called the products of inertia are given by $$ I_{xy} = -\sum_i m_i x_i y_i $$ (and similarly for $I_{yx}$, $I_{xz}$, etc.) Note that this latter definition implies that this matrix is symmetric.
{ "domain": "physics.stackexchange", "id": 78344, "lm_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, momentum, rotation", "url": null }
\begin{align} T(n) &= 2T(n - 1) + a \\[1em] T(n - 1) &= 2T(n - 2) + a \\[1em] T(n - 2) &= 2T(n - 3) + a \\[1em] &\vdots \end{align} Thus, we can re-write the equation for $T(n)$ as follows \begin{align*} T(n) &= 2 \Bigl [ 2T(n - 2) + a \Bigr ] + a &= 4T(n - 2) + 2a + a \\[1em] &= 4 \Bigl [ 2T(n - 3) + a \Bigr ] + 3a &= 8T(n - 3) + 4a + 2a + a \\[1em] &\vdots \\[1em] &= 2^k T(n - k) + (2^k - 1) a \end{align*} On Substituting Limiting Condition $$T(1) = 1 \\ \implies n - k = 1 \\ \implies k = n - 1$$ Therefore, our solution becomes $$2^{n - 1} + \Bigl ( 2^{n - 1} - 1 \Bigr ) a \\ = O(2^n)$$ edited 2 You explain well - all points included :) HTML spacing for alignment is bad- even if we align spaces properly when the screen resolution changes it becomes bad. Latex is better :) 1 Thank you sir :) . I will try to improve next time. 0 It will be (2^k)-1 Its similar to tower of hanoi problem $$T(n)=2T(n-1) + 1$$ T(1)=1 T(2)=2.1 + 1 =3 T(3)=2.3 +1 =7 T(4)=2.7 +1 =15 .... .....
{ "domain": "gateoverflow.in", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854146791213, "lm_q1q2_score": 0.8390816923420548, "lm_q2_score": 0.8652240791017535, "openwebmath_perplexity": 1609.4984816655615, "openwebmath_score": 0.9701326489448547, "tags": null, "url": "https://gateoverflow.in/1077/gate2004-83-isro2015-40" }
quantum-mechanics, quantum-information, quantum-eraser The important thing to realize here is that erasure requires an interaction between the two entangled qubits. That interaction can be blatant, as in the first circuit, or kind of subtle, as in the last circuit where we throw away whole runs after the fact but don't really talk about how this requires coordination and ultimately is just an obfuscated conditioning of the first qubit on the second qubit. Does that clear things up?
{ "domain": "physics.stackexchange", "id": 61956, "lm_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-eraser", "url": null }
python, tkinter root = Tk() e = Entry(root, width=10, borderwidth=5) my_label = Label(root, text='How many variables?') my_button = Button(root, text='Submit', command=submit) def main() -> None: root.resizable(width=False, height=False) # not resizable in both directions root.title('Simultaneous linear equation Solver') my_label.grid(row=0, column=0) e.grid(row=0, column=2) my_button.grid(row=0, column=3) root.mainloop() if __name__ == '__main__': main() With all suggestions, a refactor looks like from fractions import Fraction from string import ascii_lowercase from typing import List, Optional, Callable, Dict from sympy import Matrix, linsolve, FiniteSet import tkinter as tk MAX_VARS = len(ascii_lowercase) ComplainCB = Callable[[str, Optional[str]], None]
{ "domain": "codereview.stackexchange", "id": 42052, "lm_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, tkinter", "url": null }
quantum-field-theory, standard-model, weak-interaction Title: Rule of thumb for identifying dominant quark contribution in loop calculations I am trying to understand some calculations of $B$ meson decays and just stumbled upon the low energy effective weak Hamiltonian describing $\Delta S = 1$ $B$ decays: $$\mathcal{H}_\text{eff} = \frac{G_F}{\sqrt 2} \left[ V_{ub}^* V_{us} \left( \sum_1^2 c_i Q_i^{us} + \sum_3^{10} c_i Q_i^s \right) \; + \; V_{cb}^* V_{cs} \left( \sum_1^2 c_i Q_i^{cs} + \sum_3^{10} c_i Q_i^s \right) \right],$$ where $c_i$ are scale-dependent Wilson coefficients and the flavor structure of the various four-quark operators is $Q_{1,2}^{qs} \sim \overline{b}q\overline{q}s$, $Q_{3,\ldots,6}^s \sim \overline{b}s \sum \overline{q}{}'q'$, $Q_{7,\ldots,10}^s \sim \overline{b}s \sum e_{q'} \overline{q}{}'q'$ ($q' = u,d,s,c$).
{ "domain": "physics.stackexchange", "id": 51561, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, standard-model, weak-interaction", "url": null }
statistical-mechanics, stochastic-processes $$ \langle x(t_1)x(t_2)\rangle= Dt_1$$ But now lets say we know that $A(t)\neq 0$ and $B(t)\neq 0$. If we now calculate $\langle x(t_1)x(t_2)\rangle$ we have $$\langle x(t_1)x(t_2)\rangle = \int_{0}^{t_1}\int_{0}^{t_2}\Big\langle(A(t'_1) + B(t'_1) + \eta(t'_1))(A(t'_2) + B(t'_2) + \eta(t'_2))\Big\rangle dt'_1dt'_2$$ And we find we have ensemble average terms where we mix random and non-random terms for example $$\langle A(t'_1)\eta(t'_2)\rangle$$ My question is: how do you deal with these terms? In the case of only random terms, only one term $\langle\eta(t_1)\eta(t_2)\rangle = D\delta(t_1-t_2)$ appears under the integral which we've defined before. But how do we deal with the ensemble average terms with both random and non-random terms in it? A non-random function behaves as a constant in respect to statistical averaging, that is $$ \langle A(t_1)\eta(t_2)\rangle=A(t_1)\langle \eta(t_2)\rangle=0 $$
{ "domain": "physics.stackexchange", "id": 90498, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, stochastic-processes", "url": null }
Before we begin this week's assignment, there are some advice that we would like to give for writing functions that work with numerical data. They are useful for finding bugs in your implementation. Testing machine learning algorithms (or numerical algorithms in general) is sometimes really hard as it depends on the dataset to produce an answer, and you will never be able to test your algorithm on all the datasets we have in the world. Nevertheless, we have some tips for you to help you identify bugs in your implementations. 1. Test on small dataset Test your algorithms on small dataset: datasets of size 1 or 2 sometimes will suffice. This is useful because you can (if necessary) compute the answers by hand and compare them with the answers produced by the computer program you wrote. In fact, these small datasets can even have special numbers, which will allow you to compute the answers by hand easily. 2. Find invariants
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995723244552, "lm_q1q2_score": 0.8049078622228724, "lm_q2_score": 0.8333245870332531, "openwebmath_perplexity": 1298.427476810883, "openwebmath_score": 0.682066798210144, "tags": null, "url": "https://goodboychan.github.io/python/mathematics/icl/2021/03/14/Orthogonal-Projection.html" }
python, beginner, game, pygame def hole_create(x, y): hole = ItemInSpace() hole.image = pygame.image.load("images/black_hole.jpg").convert() hole.image.set_colorkey(black) posx, posy = x, y # bootstrap while loop while (x - 200) < posx < (x + 200) and (y - 200) < posy < (y + 100): # We were too close, chose another position posx = randint(5, 845) posy = randint(5, 645) hole.posx = posx hole.posy = posy return hole def nyan_create(): nyan = ItemInSpace() nyan.image = pygame.image.load("images/nyan.png").convert() nyan.image.set_colorkey(black) nyan.posx = choice([NYAN_START_BEFORE, NYAN_START_AFTER]) nyan.posy = randint(5, 645) if nyan.posx == NYAN_START_BEFORE: nyan.dx = 6 else: nyan.dx = -6 nyan.image = pygame.transform.flip(nyan.image, True, False) return nyan def game(): # starting pygame pygame.init()
{ "domain": "codereview.stackexchange", "id": 20840, "lm_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, game, pygame", "url": null }
quantum-algorithms, grovers-algorithm, oracles, amplitude-amplification, state-preparation Remarks: My question could be seen as how one can make this fit into the amplitude amplification scheme. One can see that this is a generalization of the typical quantum search, since if $p(x)=\delta_{x,y}$ (the distribution that is $1$ if $x=y$ and 0 if $x\neq y$) then $U_p$ is the quantum black-box for one marked item quantum search, and therefore preparing the state $|y\rangle$ can be done with $\Theta(\sqrt{n})$ queries to $U_{\delta(x,y)}$.
{ "domain": "quantumcomputing.stackexchange", "id": 1577, "lm_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-algorithms, grovers-algorithm, oracles, amplitude-amplification, state-preparation", "url": null }
Where $\displaystyle u(t)=\begin{cases}0, \text{ if } t < 0 \\ 1, \text{ if } t \ge 0 \end{cases}$ the Heaviside function. 3. You have $\displaystyle \displaystyle Y(s) = \frac{1}{s^2 + 4}\sum_{k = 1}^{\infty}e^{-sk\pi} = \sum_{k = 1}^{\infty}e^{-sk\pi}\left(\frac{1}{s^2 + 4}\right)$. Now recall that $\displaystyle \displaystyle \mathcal{L} ^{-1}\left[e^{-as}F(s)\right] = f(t-a)H(t-a)$, and the laplace transform of a sum is the sum of the laplace transforms. 4. Oh! Nice idea guys! I don't know why I missed that Thanks both of you
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707999669627, "lm_q1q2_score": 0.8508963601585238, "lm_q2_score": 0.8705972801594706, "openwebmath_perplexity": 259.21784723863004, "openwebmath_score": 0.952051043510437, "tags": null, "url": "http://mathhelpforum.com/differential-equations/176023-dirac-delta-laplace-transform.html" }
thermodynamics, kinetics $T_e$ is the isothermal temperature of the experiment. $T_r$ is the temperature at the point of reaction. If $T_e$ is 10°C, 20°C, 30°C and $T_r$ is 9°C, 18°C, and 29°C then the temperature change can be assumed to have a negligible effect. (You would want to use $T_r$ in the kinetics calculations.) If $T_e$ is 10°C, 20°C, 30°C and $T_r$ is 4°C, 6°C, and 8°C then the effect is not negligible. Accounting for the endothermic temperature change in the calculations is a poor option because it would add needless complication. A better approach is to keep things simple by revisiting the controls in the experimental design to see what can be done to minimize the endothermic effect. One possibly would be using less reactants.
{ "domain": "chemistry.stackexchange", "id": 6264, "lm_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, kinetics", "url": null }
gravity, astrophysics, gravitational-redshift, relativistic-jets \begin{equation} 1+z = \left(1-\frac{R_s}{R_{\rm NS}}\right)^{-1/2} \end{equation} where $R_{\rm NS}=10{\ \rm km}$ is the radius of the neutron star, and \begin{equation} R_s = \frac{2GM}{c^2} = 4.1\ {\rm km} \end{equation} is the Schwarzschild radius of a $1.4$ solar mass object. Plugging in the numbers we find that $z=0.3$. In other words, if the energy of the emitted gamma ray was $100\ {\rm keV}$ (a typical scale associated with the gamma rays observed from 170817, a collision of two neutron stars), then the energy of the gamma ray that is observed far away from the neutron star is $100{\ \rm keV}/(1.3)=77\ {\rm keV}$. So, there is some effect from gravitational redshift, but it is not enough to make a qualitative difference. (note that the exact boundaries between what is called a gamma ray, vs an X-ray, are somewhat fuzzy, and in astronomy what typically matters more is the process producing the radiation more than the radiation itself)
{ "domain": "physics.stackexchange", "id": 78599, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity, astrophysics, gravitational-redshift, relativistic-jets", "url": null }
newtonian-mechanics, momentum, collision, spring Title: Are springs compressed by energy, or by momentum? An object is headed towards a spring at a constant velocity, no external force will act upon it, except for any force applied by the spring itself after the collision. Let's say the spring is of arbitrary tension and arbitrary length. My question is whether the kinetic energy of object will make a difference in how far the spring is compressed, or whether it is only a matter of momentum? For example, below, Object1 and Object2 have the same momentum, but Object2 has twice the kinetic energy. Would they compress the spring the same distance, or would Object2 compress it further? Object1 has a mass of 1kg and a velocity of 1m/s. Object2 has a mass of .25kg and a velocity of 4m/s. |============================== |////Spring////| <---|Object| |==============================
{ "domain": "physics.stackexchange", "id": 85182, "lm_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, momentum, collision, spring", "url": null }
functions on the interval [0,l] that satisfy boundary conditions at the endpoints. Eigenvalues and eigenfunctions In the previous lecture I gave four examples of different boundary value problems for a second order ODE that resulted in a countable number of constants (lambdas) and a countable number of corre-. Or if you would like to think of it in terms of matrices it is the number for which a c. This is discussed in Section 2 for the rst eigenvalue and eigenfunction and it is stated that a maximum principle holds if the rst eigenvalue is positive. 1 An Electric Circuit - Equations Consider the electric circuit V, C R 2 L R 1 I 1 I The following are the experimental facts of life that determine the voltages across and currents through. Note that eigenvalue is simple. Eigenvalues and Eigenvectors week 11-12 Fall 2006 1 Eigenvalues and eigenvectors The eigenvalues of a triangular matrix are the entries on its main diagonal. This matrix calculator computes determinant, inverses, rank,
{ "domain": "desdeelfondo.mx", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683473173829, "lm_q1q2_score": 0.8250971020162651, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 629.0544501096225, "openwebmath_score": 0.9012609124183655, "tags": null, "url": "http://desdeelfondo.mx/44n7a4l/q8efnp.php?sl=eigenvalue-and-eigenfunction-pdf" }
navigation, turtlebot, costmap Title: How does costmap determine its orientation? Hi, I have tried to publish a frame specifically to make a costmap be oriented in the way that I want, but it seems that the costmap is always oriented to the "map" tf, even when I specify a different global frame in the costmap's yaml file. In the image below, you can see that the costmap is aligned with map: However, in the yaml file, I do not have "map" as the global frame. I specify "map_new" as the global frame. This frame is one that I publish specifically for the costmap to have a different orientation. In this image, you can see that "map_new" is significantly different than "map", and that the costmap is not aligned with "map_new" at all:
{ "domain": "robotics.stackexchange", "id": 27504, "lm_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, turtlebot, costmap", "url": null }
electromagnetism, calculus \end{align} Now we can go back to dealing with the full vector, \begin{align} \nabla t_r &= -\frac{1}{c}\frac{\textbf{r} - \textbf{r}'(t_r)}{|\textbf{r} - \textbf{r}'(t_r)|} + \frac{1}{c} \left( \frac{\textbf{r} - \textbf{r}'(t_r)}{|\textbf{r} - \textbf{r}'(t_r)|} \cdot \textbf{v}' \right) \nabla t_r\\ \nabla t_r &= -\frac{1}{c}\hat{\textbf{n}} + \frac{1}{c} \left( \hat{\textbf{n}} \cdot \textbf{v}' \right) \nabla t_r\\ \nabla t_r &= -\frac{\hat{\textbf{n}}}{c\left(1 - \frac{\hat{\textbf{n}}\cdot\textbf{v}'}{c} \right)}. \\ \end{align} As a side note, you can think of the spacetime derivative of $t_r$ as being a light-like covector meaning $(\partial^\mu t_r)(\partial_\mu t_r) = 0$. This gives, $$ \frac{1}{c^2}\partial^0 t_r \partial_0 t_r = \nabla t_r \cdot \nabla t_r.$$ The fact that it is a covector describes the relative minus sign for the spatial component, and we can see that, $$\frac{1}{c}\partial_0 t_r = -|\nabla t_r| $$
{ "domain": "physics.stackexchange", "id": 58974, "lm_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, calculus", "url": null }
quantum-state, density-matrix, linear-algebra, projection-operator It is easy to see that any linear combination like $$ \rho = \sum_i \alpha_i |\phi_i\rangle\langle \phi_i|, $$ where each $|\phi_i\rangle \in V^{n}(\mathbb{C}^{d})$ and the $\alpha_i$s are arbitrary complex numbers is an $n$ exchangeable state. I could not prove the converse, however. Is it true that any $n$ exchangeable state is a linear combination of density matrices of states in the symmetric subspace? If not, what is an example to the contrary? The answer is: no, it is not true that any $n$ exchangeable state is a linear combination of density matrices of states in the symmetric subspace (that is supported on the symmetric subspace). Actually, there are even pure state counterexamples when $n=2$. Consider the state $$ \rho = |\phi\rangle\langle \phi|, $$ where $$ |\phi\rangle = \frac{1}{\sqrt{2}}(|0 \rangle \otimes |1 \rangle - |1 \rangle \otimes |0 \rangle). $$
{ "domain": "quantumcomputing.stackexchange", "id": 3113, "lm_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-state, density-matrix, linear-algebra, projection-operator", "url": null }
algorithms, set-cover Richard M. Karp (1972). "Reducibility Among Combinatorial Problems" (PDF). In R. E. Miller and J. W. Thatcher (editors). Complexity of Computer Computations. New York: Plenum. pp. 85–103. As the unweighted version is already NP-hard, your weighted version is too, so it's unlikely that any algorithm will solve every instance of it in polynomial time.
{ "domain": "cs.stackexchange", "id": 10573, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, set-cover", "url": null }
c++, algorithm, simd return nullptr; } template <std::contiguous_iterator ITERATOR_T> [[nodiscard]] ITERATOR_T find(ITERATOR_T begin_it, ITERATOR_T end_it, const typename std::iterator_traits<ITERATOR_T>::value_type& value) { using value_t = typename std::iterator_traits<ITERATOR_T>::value_type; static_assert(std::is_scalar_v<value_t>); constexpr auto WIDTH{sizeof(value_t)}; const value_t* const begin{std::to_address(begin_it)}; const value_t* const end{std::to_address(end_it)}; const value_t* current{std::to_address(begin_it)}; // Scalar comparison until the pointer is aligned to 32 bytes. while (current != end && reinterpret_cast<std::uintptr_t>(current) % 32 != 0) { if (*current == value) { return begin_it + (current - begin); } ++current; }
{ "domain": "codereview.stackexchange", "id": 44653, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, simd", "url": null }
organic-chemistry, radicals classical Latin abstract-, past participial stem of abstrahere to drag away, to appropriate, take away, to set free, to separate, to deduct, subtract, to exclude, to turn aside, divert, in post-classical Latin also to summarize (from the subscribed version of the Oxford English Dictionary). When we say the radical abstracts a proton from a certain compound, it simply means that the radical took away (dragged away) a proton from that neutral or even charged compound. Although, I do not like this anthropomorphism at atomic or molecular scale. This "abstraction" can be classically seen in gas phase reactions of alkanes with chlorine in the presence of light.
{ "domain": "chemistry.stackexchange", "id": 17381, "lm_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, radicals", "url": null }
ros, rviz, ogre, rviz-plugins So much is abstracted away from the user in these plugins (it's actually extremely frustrating!) that I really do not have a good grasp on how the painting occurs. And there is little to no documentation on these things. I'm looking for an explanation as to how the painting actually occurs, and possibly a suggestion on how to do animations correctly?
{ "domain": "robotics.stackexchange", "id": 17562, "lm_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, rviz, ogre, rviz-plugins", "url": null }
python, performance, algorithm, python-3.x self.starttime = time() self.prevtime = self.starttime self.dlx_alg(self.llist, self.start_board) # Converts a one dimensional's element index to two dimensional's coordinates def num_to_coords(self, num): row = num // self.cols col = num - row * self.cols return row, col def delete_filled_on_start_cells(self, llist): for col_head_node in llist.row_nonzero_nodes(llist.head): row, col = self.num_to_coords(col_head_node.value - 1) if self.start_board[row][col]: llist.delete_col(col_head_node) def print_progress(self, message, interval): new_time = time() if (new_time - self.prevtime) >= interval: print(message) print(f"Time has elapsed: {timedelta(seconds=new_time - self.starttime)}") self.prevtime = new_time
{ "domain": "codereview.stackexchange", "id": 37699, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, algorithm, python-3.x", "url": null }
electromagnetism, electric-circuits, electric-current, electromagnetic-induction There need not be any loop, induced EMF is defined as integral of induced electric field over some path; this path need not be closed. If the straight wire is finite, it has two ends not connected to anything, and there will still be induced EMF in the straight wire. Current will be almost zero, because the ends are open and allow for redistribution of charge in such a way that it almost cancels the effect of the EMF. Potential difference and induced EMF will cancel each other.
{ "domain": "physics.stackexchange", "id": 95618, "lm_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, electric-circuits, electric-current, electromagnetic-induction", "url": null }
java, strings, programming-challenge This statement summarizes your strategic error: candidateReversedWordsString[0] = new StringBuilder(). append(candidateReversedWordsString[0].substring(0, wordStartIndex)). append(reverseWordStringBuilder.reverse().toString()). append(candidateReversedWordsString[0].substring(stringCharacterIndex)).toString();
{ "domain": "codereview.stackexchange", "id": 17025, "lm_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, strings, programming-challenge", "url": null }
$$c_0=\hat{f}(0)=\int_{-\infty}^{+\infty}f(x)dx=\sqrt{2\pi}.$$ • ok thks! I calculated that as well so I know the author is correct, however, he then goes on and does something slightly different to determine the actual value of $c_0$. Hence I was wondering whether I am actually missing something within the lines I gave above that should tell me $c_0$ is non-negative .. – harlekin Jan 31 '12 at 1:05 • @harlekin: Without the notes in front of me it's impossible to tell. – anon Jan 31 '12 at 1:07 • hm .. I understand, thanks for your answer anyways ! – harlekin Jan 31 '12 at 1:19 • @harlekin: even without the final "$=\sqrt{2\pi}$" in anon's computation (which is not obvious enough to be left to the reader) it should be clear that the integral is at least positive because the integrand is positive everywhere. – hmakholm left over Monica Jan 31 '12 at 1:21 • yes that's right! – harlekin Jan 31 '12 at 1:48 You might want to have another proof. Well, it does not hurt.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446448596305, "lm_q1q2_score": 0.8155441897536446, "lm_q2_score": 0.837619961306541, "openwebmath_perplexity": 182.21205012290326, "openwebmath_score": 0.8905001878738403, "tags": null, "url": "https://math.stackexchange.com/questions/104112/quick-question-on-fourier-transform-of-exp-fracx22?noredirect=1" }
ros I think that you're going to find that there really aren't any great books available for ROS and Python, or really ROS in general ? Comment by gvdhoorn on 2017-08-12:\ I've found that reading the source code of ROS and others' packages to be more beneficial (and economical) this I do agree with, but is probably very much subjective. Some people just prefer to have a book that guides them. Comment by gvdhoorn on 2017-08-12: @pitosalas: yes, they are rather expensive unfortunately :( I don't really understand why either. I would definitely want to preview them before spending the money.
{ "domain": "robotics.stackexchange", "id": 28584, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
rviz, ros-melodic Title: Colour coding in RViz Is it possible to place some kind of 2D rectangular shape in RViz that is colour coded according to some data value subscribed to and positioned wherever the robot is at the time the data was read? If so, how might I go about implementing this? Originally posted by Py on ROS Answers with karma: 501 on 2021-03-11 Post score: 0 Rviz is only a data visualizer. As such, you cannot "place" a shape in rviz, but if the shape is being published somewhere, you can subscribe to it and visualize it! There are two easy ways to go about your problem: Work with gazebo and place an object wherever you want. You can then visualize in either a camera pointed towards it or using some lidar scan. Generate markers in code and publish them. This tutorial will show you how to. I'd recommend this method since it sounds like you want it based on the robot position and you can just keep changing the marker pose in code.
{ "domain": "robotics.stackexchange", "id": 36188, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, ros-melodic", "url": null }
java, game, multithreading switch (p.id) { case 10: { //match list request for (ServerMatch match : ServerMatch.matchList) { if (!match.ingame) { p.user.sendPacket(10, Integer.toString(match.id), match.name, match.host.username, match.password.equals("") ? "false" : "true", match.userList.size() + "/" + match.maxplayers, Integer.toString(match.time), Integer.toString(match.maxquestions), match.topics.toString()); } } p.user.sendPacket(11); break; } case 15: { //match connect request if (p.content[0].matches("^[0-9]*$")) { ServerMatch m = ServerMatch.getMatch(Integer.parseInt(p.content[0])); if (m != null && !m.ingame) { if (m.password.equals("")) { p.user.connectMatch(m);
{ "domain": "codereview.stackexchange", "id": 15245, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game, multithreading", "url": null }
Spring constant kspecifies the intensity of load (force or torque) which causes unit deformation (shift or turning) of the spring. Structural Dynamics prototype single degree of freedom system is a spring-mass-damper system in which the spring has no damping or mass, the mass has no stiffness or damp-ing, the damper has no stiffness or mass. Step 1: Euler Integration We start by specifying constants such as the spring mass m and spring constant k as shown in the following video. Because it is impossible to show animation on paper, the animation figures shows 4 consecutive frames. No damping in the system. · Uniform Boundedness for Reaction-Diffusion Systems with Mass Dissipation, with B. 1 – Mechanical model of the CMSD system The second mass m 2 only feels the nonlinear restoring force from the elongation, or compression, of the second spring. Element types SPRING1 and SPRING2 can be associated with displacement or rotational degrees of freedom (in the latter case, as torsional
{ "domain": "acpm.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109081214212, "lm_q1q2_score": 0.8329956528383808, "lm_q2_score": 0.8418256393148982, "openwebmath_perplexity": 937.6084491184243, "openwebmath_score": 0.5827639102935791, "tags": null, "url": "http://iquk.acpm.it/nonlinear-spring-mass-system.html" }
java, swing, audio @Override public String toString() { return "InstrumentMismatchContext[" + "beatBox=" + beatBox() + ", " + "name=" + name + ", " + "beats=" + Arrays.toString(beats()) + ", " + "checkMark=" + checkMark() + ']'; } } ManifestComponent package org.example.demos.sequencer.beatBox; import lombok.Getter; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor @Getter public enum ManifestComponent { SEPARATOR("SEPARATOR", ".+"), CHECK_MARK("CHECK MARK", ".{1}"), BLANK_MARK("BLANK MARK", ".{1}"); private final String manifestName; private final String regex; @Override public String toString() { return manifestName; } } ManifestParser package org.example.demos.sequencer.beatBox; import org.example.demos.sequencer.beatBox.exceptions.IllegalPatternException;
{ "domain": "codereview.stackexchange", "id": 44996, "lm_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, swing, audio", "url": null }
(Lengthy method)$$\angle EDA, \angle ADB, \angle BDC= 36^{\circ}$$ Since, $$ADB$$ is isosceles you can find $$\angle ABD$$ as well and then $$\angle TBK$$. You may see $$\angle TBK=\angle BCD$$. Let the side length of pentagon be $$a$$ and find $$BC$$ in terms of $$a$$ and apply cosine rule to $$TBK$$ and $$BCD$$ to find $$a$$. Then you can find $$CH$$. • Is there any way to solve it without trigonometry?...these Peruvian problems are usually solved by auxiliary lines Aug 11, 2021 at 19:47 • We won't have remarkable angles Aug 11, 2021 at 20:06 I will compute $$BH$$ (instead, since we can forget about the point $$C$$ now). The following solution is purely geometric, and generalizes the given situation. All we need from the regular pentagon $$ABCDE$$ is the starting triangle $$ABD$$, which can be arbitrary. (No need for the special situation of an isosceles triangle with very particular angles.) The generalization works in the following picture.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693242009478238, "lm_q1q2_score": 0.8119253055851379, "lm_q2_score": 0.8376199673867852, "openwebmath_perplexity": 453.37629019363277, "openwebmath_score": 0.9979856610298157, "tags": null, "url": "https://math.stackexchange.com/questions/4222361/what-is-the-value-of-the-ch-segment-in-the-figure-below" }
general-relativity, cosmology, history, specific-reference, cosmological-constant In what paper did he posit the existence of a cosmological constant, in order to counteract the universal contraction that GR implies? The title of the paper in German, in which Einstein posits the existence of a cosmological constant, is "Kosmologische Betrachtungen zur allgemeinen Relativitätstheorie", and its translation in English is: "Cosmological Considerations in the General Theory of Relativity". This paper was first published in 1917, in Sitzungsberichte der Preussischen Akad d. Wissenschaften$^1$ (Berlin) (1917) 142-152, in order to find a static universe model by use of the gravitational field equations of general relativity. This paper actually was a report to the Prussian Academy of Sciences (the same place where Albert Einstein presented his field equations of general relativity on 25 November 1915). In Einstein's paper, we see in German (Deutsch):
{ "domain": "physics.stackexchange", "id": 80288, "lm_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, cosmology, history, specific-reference, cosmological-constant", "url": null }
neural-networks, machine-learning, training, datasets NOTE: As @NeilSlater pointed out, if you need the model for reporting purposes you should only use 80% of the data-set, otherwise you'll lose your only source for unbiased model verification. But if you are looking to deploy the model on field you can use 100% of the data-set.
{ "domain": "ai.stackexchange", "id": 678, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, machine-learning, training, datasets", "url": null }
Of course, we can continue until we arrive at $$T_n=0$$ and the theorem always holds. I hope this makes intuitive sense to you. I like saulspatz' answer because it is very hands-on. I would like to offer another perspective, one based on the fact that linear transformations are characterized by their ranks, up to choice of bases in domain and codomain. The key is in this proposition:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.972830768464319, "lm_q1q2_score": 0.8085615360552044, "lm_q2_score": 0.831143054132195, "openwebmath_perplexity": 137.36559808018205, "openwebmath_score": 0.9023981094360352, "tags": null, "url": "https://math.stackexchange.com/questions/3193933/intuitive-explanation-of-the-rank-nullity-theorem" }
gazebo, rviz, rqt-gui, tum-ardrone, librviz Title: Creating interactive image display(in rviz?) Hi, I am a total ROS/gazebo noob. I recently installed groovy on ubuntu 12.10 and I am running the TUM's gazebo simulator for a quadrotor. My question - There is an image topic being published by the simulator(which is the 2D image of the world that the quadrotor sees using its camera). I can view this image in rviz or using image_view package. How do I create a gui window where I can display this image and when I click at a location in the image, I get the mouse click event(location of the click within the image window)? I would appreciate if the solution is a bit more detailed or guiding as I am a total noob to ROS itself.(the solution need not be related to rviz)
{ "domain": "robotics.stackexchange", "id": 13043, "lm_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, rviz, rqt-gui, tum-ardrone, librviz", "url": null }
algorithms, dynamic-programming, greedy-algorithms If OPTS fuels up more than GS at this point, then that means that GS fueled up just enough to reach the next cheapest city C'. It is clear that OPTS will arrive in C' with more fuel than GS (more than 0). But GS can then fill its tank up to as much as OPTS (for cheaper than OPTS could have at any point between C and C'). We can thus construct an optimal strategy OPTS' which does what GS does up to C' and then copies OPTS. But OPTS' is optimal and "agrees with GS" for longer than OPTS, which is impossible by definition of OPTS. So it is impossible that OPTS fuels up more than GS in C.
{ "domain": "cs.stackexchange", "id": 14399, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, dynamic-programming, greedy-algorithms", "url": null }
python, numpy, machine-learning def cv_boost_estimate(X,y,model,n_folds=3): cv = cross_validation.StratifiedKFold(y, n_folds=n_folds, shuffle=True, random_state=11) val_scores = np.zeros((model.get_params()["n_estimators"],), dtype=np.float64) t = time() i = 0 for train, test in cv: i = i + 1 print('FOLD : ' + str(i) + '-' + str(n_folds)) model.fit(X.iloc[train,], y.iloc[train]) val_scores += heldout_auc(model, X.iloc[test,], y.iloc[test]) val_scores /= n_folds return val_scores,(time()-t) Then I can look for the optimal number of trees with the following: print('AUC : ' + str(max(auc)) + ' - index : ' + str(auc.tolist().index(max(auc)))) Everything is working, but the syntax feels uneasy and "not Pythonic". Does someone have improvements to suggest? You didn't use enumerate for your cv loop, I assume you tried this and found it didn't work: for i, train, test in enumerate(cv):
{ "domain": "codereview.stackexchange", "id": 16777, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, numpy, machine-learning", "url": null }
special-relativity, angular-momentum, conservation-laws, hamiltonian-formalism, poisson-brackets Title: Commutation of the Hamiltonian with the generator of boost Consider the Hamiltonian $H = (\textbf{P}^2+m^2)^{1/2}$ the generators of rotation and and boost given by $$M^{0i} = tP^i-x^iH \\ M^{ij} = x^iP^j-x^jP^i$$ where $x^i$ and $P^j$ satisfy $\{x^i, P^j\} = \delta^{ij}$. From the above, we see that $$\{M^{0i}, H\} = P^i$$ However, explicit time derivative of $M^{0i}$ leads to $$\frac{d}{dt}M^{0i} = P^i-\dot{x}^i H$$ And since $\dot{x}^i = \{x^i, H\} = P^i/H$, we have $$\frac{d}{dt}M^{0i}= 0$$Why is it that $\frac{d}{dt}M^{0i}\neq \{H, M^{0i}\}$? Can someone please explain? ...From the above, we see that $$\{M^{0i}, H\} = P^i$$ No, you should have: $$ \{M^{0i}, H\} = -P^i $$ ...Why is it that $\frac{d}{dt}M^{0i}\neq \{H, M^{0i}\}$? Can someone please explain?
{ "domain": "physics.stackexchange", "id": 98231, "lm_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, angular-momentum, conservation-laws, hamiltonian-formalism, poisson-brackets", "url": null }
everyday-chemistry, melting-point Title: Melting ice with salt - how does it start? I know that salt reduces the melting point of ice. I can see how a little bit of salty water can melt ice to water which can dissolve even more salt. But how does it even start? There is ice, which is hard. There are grains of salt, which are hard. So how does the salt enter the ice, to begin with? I believe that Ivan's comments are on the right track. Generally any melting phenomenon to do with ice begins with the fact that the surface of ice is disordered. By this I mean that ice on the whole is a periodic crystal like other solids, but at the surface there are imperfections, primarily due to the extra conformational freedom afforded to the surface molecules. This distortion then propagates down quite a few layers [1]. Ref. [1] discusses the properties of this surface layer which is liquid-like, and points out that this layer exists even down to quite low temperatures.
{ "domain": "chemistry.stackexchange", "id": 9286, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "everyday-chemistry, melting-point", "url": null }