text
stringlengths
1
1.11k
source
dict
nuclear-physics, atomic-physics why in center? Given that the positive charge is an indivisible unit and very small, we have the planetary model, in which the atom is like a little solar system. The nucleus is much heavier than the electrons, so it would stay near the center due to conservation of momentum, just as the sun does.
{ "domain": "physics.stackexchange", "id": 48663, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nuclear-physics, atomic-physics", "url": null }
Explain how to diagonalize a matrix if it is [ math. ] sides, you will be to... Can not draw a line segment that goes from one corner to,. If the product of two is slopes is -1 then the lines then you would be:... Their own posters to teach others about different types of mass which can be very hard, then the are! Page is not only relatable and easy to grasp, but also will stay with forever! Easily count them, Formulae, Derivation, Solved examples and FAQs for better understanding and. Digits and arrange them to make their own posters to teach others different. Such letter matrix topic of maths in details explained by subject experts on vedantu.com only and. The definition and meaning for various math words from this math dictionary not the edges ), July. A, K, M, W, X and Y all have diagonal. Be a mind game that is true ↳ math dictionary ↳ K ↳ word. An edge difference between an apple and a cucumber the amount ( as... Of math what is diagonal in maths will be two diagonals another,
{ "domain": "rnr.rs", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639686018702, "lm_q1q2_score": 0.8888848032742066, "lm_q2_score": 0.9149009555730611, "openwebmath_perplexity": 967.1789921405452, "openwebmath_score": 0.5840011835098267, "tags": null, "url": "http://rnr.rs/eau-de-acpo/e3d36a-what-is-diagonal-in-maths" }
algorithms, computational-geometry, searching I'm trying to find all points that are within a radius from main point (neighbors). algorithm(main_point, collection_of_points, radius) --> neighbors Obvious solution is to calculate distances and select those points, where distance is equal or smaller than R, but I believe there are better options with better performance. Do you know any possible solutions? I'm open for every idea (not only the best one). EDIT: I should add that I'm looking for solution where points are strongly dynamic (every point is mobile phone or car). I'd like to update point when it's neccessary (it has been moved) so frequency of updates depends on amount of connected devices (so as queries). Let's say that server will get update request every 5 second and query request every 20 second.
{ "domain": "cs.stackexchange", "id": 7466, "lm_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, computational-geometry, searching", "url": null }
fluid-dynamics, projectile, drag, aerodynamics Title: Would a projectile (arrow, bullet) with holes drilled in its length be faster and have greater range? If any arrow tip or the round of a gun had holes drilled from the front pointy part through the back would it help? It would be lighter for sure. For an arrow you could just fire a hollow tube with a sharpened front? I'd think there would be less drag too? Wouldn't this make the round faster, and make it travel farther? Would it be stable? Why are things like this made? Drag will be higher, and the ratio of mass versus drag would become worse on both sides of the fraction.
{ "domain": "physics.stackexchange", "id": 57441, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, projectile, drag, aerodynamics", "url": null }
tropical-cyclone, weather-satellites Title: The motion of the upper-level outflow of a typhoon I was taught that while the motion of a tropical cyclone is mostly cyclonic, there is an outflow at the top whose motion is anticyclonic. So I expected an animated satellite image of a typhoon to look like a spiral spinning clockwise. However, it appeared to spin counterclockwise(Example). Why is that? Is it because the clouds generated by the outflow are too thin that they are not visible in the satellite image, even in the infrared image? It's hard to see but it's definitely there in your example. You can see some upper-level clouds in the South-Southeast quadrant of the storm moving away from the center in somewhat of an anticyclonic manner. There's also some upper-level clouds at the left most part of the animation that are also migrating away from the storm center.
{ "domain": "earthscience.stackexchange", "id": 2645, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "tropical-cyclone, weather-satellites", "url": null }
edges (green). Yen’s algorithm is one of the fundamental works dealing with the -shortest-path problem. If there are turn-restriction paths including a path 210 along nodes 6-5-8 and a path 211 along nodes 3-4-7, a shortest path is a path along nodes 3-6-7-10-9-8-11 and an optimal total travel time along the shortest path is 14, wherein 14 equals a sum of travel times on each path, that is, 3+2+4+2+1+2. Therefore, the proposed protocol is outlined as a weighted graph problem where the weight for an edge is measured based on a parameter termed as NHDF (Next-hop Determination Factor). Cost of path = sum of arc costs in path. In this paper we focus mainly on the end to end per packet energy consumption. Note that because SGraph is directed, shortest paths are also directed. proceed to find the shortest path tree rooted at each of the source nodes to the set of receiver nodes. The single-source shortest-path problem is to find a shortest path from a source vertex to every other vertex in
{ "domain": "calcolailtuomutuo.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180685922241, "lm_q1q2_score": 0.8058979314131833, "lm_q2_score": 0.8175744739711883, "openwebmath_perplexity": 468.0280469654051, "openwebmath_score": 0.42271119356155396, "tags": null, "url": "http://calcolailtuomutuo.it/eapk/shortest-path-from-source-to-destination-in-graph.html" }
image-processing Title: Detecting the rotation of digits in an image I am trying to find the rotation of a given set of digits from the image. For example: There is no additional background information, only the digits are given in the input. I have tried using methods as described: 1 , which uses the Tesseract library to solve for the rotation, but it does not work well in this case as there are no multiple lines (of text) involved in this scenario. For this purpose, it can be assumed that the decimal point and the "mm" are always present in the inputs. Are there any other methods or any additional features that I can exploit to solve this problem? You can use Hough Transform to find dominant lines in the image and then based on rho & theta parameters of the Hough transform, align your text. First you need to remove unnecessary details from your image through closing as below: binTextImage=TextImage<30; close=imclose(binTextImage,strel('disk',20)); Then extract edges, edges=edge(close)>0;
{ "domain": "dsp.stackexchange", "id": 4350, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing", "url": null }
optimization, ruby-on-rails, sass #examples img { width: 150px; } #examples td { padding-left: 70px; padding-right: 70px; } } @media screen and (max-width: 1199px) { #examples { float: right; margin-right: 7.5%; margin-top: 10.5%; text-align: center; } #examples img { width: 150px; } #examples td { padding-left: 25px; padding-right: 25px; } } #examples img { box-shadow: 6px 6px 20px 0; } #examples p { font-family: "baskerville_old_faceregular"; font-size: 20px; font-weight: 700; } #footer { text-align: center; } #footer #footer_links { list-style: none; margin-bottom: 0; } #footer #footer_links li { display: inline-block; font-family: "copperplate_gothic_boldRg"; font-size: 20px; }
{ "domain": "codereview.stackexchange", "id": 17797, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optimization, ruby-on-rails, sass", "url": null }
energy, energy-conservation, work I have not neglected friction between man and boat. But in boat+man system, its not an external force. Gravity does not do any work since displacement of boat is perpendicular to force due to gravity. It does not matter that there is no external force acting on the system. The kinetic energy comes from the man running on the boat. He is turning the chemical energy in his muscles into kinetic energy. If we have an isolated system (i.e. one with no external forces and where nothing leaves or enters the system), we require energy to be conserved within that system but not the conservation of kinetic energy, which I think is what you have assumed.
{ "domain": "physics.stackexchange", "id": 24729, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, energy-conservation, work", "url": null }
c++, game, classes, adventure-game it's clearer to let main() terminate the program whenever possible it could be hard to tell where the player's death is determined You would then need to change main()'s loop to handle this. You could even have battle() return a bool to indicate the battle outcome (the player has won or has lost). Try this at the end: account = calcEXP(account, monster); if (account.getHealth() <= 0) return false; return true; You could even create a bool member function for determining if the player's health was depleted: bool healthDepleted() const {return playerHealth <= 0;}
{ "domain": "codereview.stackexchange", "id": 4075, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game, classes, adventure-game", "url": null }
general-relativity, tensor-calculus Title: Tensor and tensor field differences I have recently tried to understand the differences between tensors and tensor fields. Am I correct in the statement that a tensor is defined as a linear multilinear map on a set of vector spaces and/or dual vector spaces to a field $\mathbb{R}$ or $\mathbb{C}$ (as is written in wikipedia). On the other hand a tensor field is defined as a linear multilinear map on a set of tangent vector spaces and/or dual tangent vector spaces to a field $\mathbb{R}$ or $\mathbb{C}$ (as is written in wikipedia). If this is correct does that mean that a tensor gives as an output a global property of the vector space we put in and sharing all symmetries of the vector space? And on the other hand the tensor field tells us a local property (such as curvature at point x) of the manifold? A $(p,q)$ tensor field $T$ on a smooth manifold $M$ is defined as a multilinear map:
{ "domain": "physics.stackexchange", "id": 82575, "lm_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, tensor-calculus", "url": null }
quantum-mechanics, homework-and-exercises, hilbert-space, operators, notation 0 & 1 & 0 & 0 & ...\\ 0 & 0 & 2 & 0 & ... \\ 0 & 0 & 0 & 3 & ... \\ \vdots & \vdots & \vdots & \vdots & \ddots \end{bmatrix} $$ Additionally, the $i$ "part" of the $N_i$ index indicates the subspace in which you're acting on, loosely speaking it's only a label. It can be an integer if you're looking at the EM excitations of a box, for example, in which case it will label the mode number of the box. Or it can be a real number indexing the momenta of phonons for example in a (infinite) crystal. So what we mean when we write down $\hat{a}_i$ (for an integer index) is a tensor product: $$ \hat{a}_i = 1 \otimes ... \otimes 1 \otimes \hat{a} \otimes 1 ... $$ Where the annihilation operator is at the $i$-th place. In principle there's a way to write down the matrix form of tensor product of multiple finite matrices (see Kronecker product) but for bosonic operators you can see it would not be possible as they are represented by infinite matrices.
{ "domain": "physics.stackexchange", "id": 91499, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, hilbert-space, operators, notation", "url": null }
c++, game, console, c++17, rock-paper-scissors Don't use std::endl if you don't really need it The difference betweeen std::endl and '\n' is that '\n' just emits a newline character, while std::endl actually flushes the stream. This can be time-consuming in a program with a lot of I/O and is rarely actually needed. It's best to only use std::endl when you have some good reason to flush the stream and it's not very often needed for simple programs such as this one. Avoiding the habit of using std::endl when '\n' will do will pay dividends in the future as you write more complex programs with more I/O and where performance needs to be maximized. Check return values and handle errors The code calls getline but never checks for error return values. If getline encounters a problem, it sets the failbit. It's easy to check for this in C++, because of operator overloading. That is, one could do this: getline(cin, input) if (cin) { // if getline was OK /// }
{ "domain": "codereview.stackexchange", "id": 36751, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game, console, c++17, rock-paper-scissors", "url": null }
php, array, mysqli return $clmNames; } The above returns the data correctly. However, I would like to be able to remove the entire foreach dealing with $tmp and $clmNames if possible. First off, there is no need to check if $conn is an object, simply use the proper procedure for checking if the connection was successful. if( ! $conn ) {//MySQL if( $conn->connect_error ) {//MySQLi try { $conn = new PDO( $dsn, $user, $pass ); } catch( PDOException $e ) { die( $e->getMessage() ); }
{ "domain": "codereview.stackexchange", "id": 12109, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, array, mysqli", "url": null }
algorithms, operating-systems, deadlocks 3>2 so P3 can run now available is 6 6>5 so P1 can run now availabl 9 9>6 so P2 can run System is safe state,Hence P1 will be granted. But I'm not sure if my solution is true. you can say there is no deadlock if there is a safe sequence for the completion, after $P1$ request is granted there must be a safe sequence where by which every process is completed. After P1 request is granted | P1 | P2 | P3 | Max Requirement | 8 | 7 | 5 | Current Allocation | 4 | 1 | 3 | Balance Requirement | 4 | 6 | 2 | now the resources left over are 10-4-1-3=2
{ "domain": "cs.stackexchange", "id": 8252, "lm_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, operating-systems, deadlocks", "url": null }
channelcoding $$\begin{array}{c|c|cl} L & 2^{L}\cdot T \,\text{(words)} & 2^{L} \cdot T \cdot 4 \,\text{(bits)} \\ \hline 0 & 256 & 1024 &\text{not really a convolutional code}\\ 1 & 512 & 2048\\ 2 & 1024 & 4096\\ 3 & 2048 & 8192\\ 4 & 4096 & 2^{14}\\ 5 & 8192 & 2^{15}\\ 6 & 2^{14} & 2^{16}\\ 7 & 2^{15} & 2^{17}\\ 8 & 2^{16} & 2^{18}& \text{smallest 5G Tailbiting convolutional code, far from $C$}\\ 9 & 2^{17} & 2^{19}\\ 10 & 2^{18} & 2^{20}\\ 11 & 2^{19} & 2^{21} & \text{first URLLC TB-CC to perform potentially close enough at rate 1/2} \\ \vdots&\vdots&\vdots\\ 14 & 2^{22} & 2^{24} & \text{[3, Fig. 5]: at a 256 bit length, the three additional bits constraint length pay}\\ \vdots&\vdots&\vdots&\text{need more constraint length to compensate for not tail-biting}\\[-0.3em] &&&\text{which means at this point we're throwing away roughly half}\\[-0.3em] &&&\text{a constraint length in error-correction information.}\\ 21 & 2^{29} & 2^{31} &\text{My wild guess what compensates for not TB'ing}\\[-0.3em]
{ "domain": "dsp.stackexchange", "id": 11576, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "channelcoding", "url": null }
ros, ros-melodic, ros-canopen EDS file I'm using attached as a github gist I see this github issue here with the same error code, but that's not very useful and I doubt the issues are related. Any help would be appreciated!
{ "domain": "robotics.stackexchange", "id": 34151, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-melodic, ros-canopen", "url": null }
algorithms, counting, assignment-problem Which holds for all edges $(c, y)$. Note that given any $(c, y)$, there is only one such pair of $(a, y, b)$ and $(c, x, d)$, because the positions $c$ and $y$ are fixed. We know that the value of $Opt$ is equal to the sum of all it's edges $(v_1, v_2)$, $(v_2, v_3)$, ..., $(v_{n-1}, v_n)$, $v_n, v_1)$ (where $v_i$ is some professor), so for each of these, we get a single inequality. Consider the edge $(a, y)$. $|(a, y)|$ will only appear in an inequality if $a$, $y$, or the professor before $a$ is contained in the edge in Opt. Thus, worst case $(a, y)$ is counted 8 times, because each variable can be in at most two edges, by definition. If we sum all of the edges on both sides, we get $$8*Val\geq Opt$$ Thus $$(8 \geq \frac{Opt}{Val})$$ which is a factor 8 approximation, as desired.
{ "domain": "cs.stackexchange", "id": 20970, "lm_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, counting, assignment-problem", "url": null }
quantum-field-theory, lagrangian-formalism, gauge-theory, degrees-of-freedom, gauge Title: Counting massive degrees of freedom after gauge fixing Consider the theory of scalar QED with the Lagrangian $$\mathcal{L} = - \frac14 F^{\mu\nu} F_{\mu\nu} + (D^\mu \phi)^* (D_\mu \phi) - m^2 \phi^* \phi \tag{1}$$ where $\phi$ is a complex scalar field with mass $m$. Counting the degrees of freedom, we have two massless real degrees of freedom from $A_\mu$ two massive real degrees of freedom from $\phi$ Now, even though there's no symmetry breaking going on here we can still choose to go to unitary gauge, i.e. fixing the gauge so that $\phi$ is real. We now have the gauge-fixed Lagrangian $$\mathcal{L} = - \frac14 F^{\mu\nu} F_{\mu\nu} + (D^\mu \varphi) (D_\mu \varphi) - \frac12 m^2 \varphi^2\tag{2}$$ where $\varphi$ is a canonically normalized real scalar field, and there is no gauge symmetry. Then we have three real degrees of freedom from $A_\mu$ one massive real degree of freedom from $\phi$
{ "domain": "physics.stackexchange", "id": 46849, "lm_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, lagrangian-formalism, gauge-theory, degrees-of-freedom, gauge", "url": null }
seismology, earthquakes, glaciology, ice-sheets, antarctic Tsunamis reaching Antarctica could conceivably cause break off of larger ice bergs or larger numbers of ice bergs at the fringes of the ice sheet. Ice berg calving in Antarctica is largely through ice shelves, which are floating parts of the ice sheet. These ice shelves are part of the natural way in which the ice sheet looses mass so a momentary acceleration due to tsunami-type waves is conceivable. But, the main question will be of this momentary acceleration of calving simply causes ice that would calve anyway within some period is shed more quickly resulting in a period of quiescence as the shelf recuperates and resumes normal "operations*. This is unclear because we are dealing with processes that have to be seen over long time spans. The loss of an immense ice berg, such as occasionally reported in media, may not have that much significance in the long-term.
{ "domain": "earthscience.stackexchange", "id": 197, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "seismology, earthquakes, glaciology, ice-sheets, antarctic", "url": null }
In some contexts, one may work with graphs that have multiple edges between the same pair of nodes. Introduction to Graphs: Breadth-First, Depth-First Search, Topological Sort Chapter 23 Graphs So far we have examined trees in detail. This figure shows a simple directed graph with three nodes and two edges. In this video we will learn about adjacency matrix representation of weighted directed graph. In this work, we first propose how to represent textual data as a directed, weighted network by the text2net algorithm. Is there a community detection algorithm for weighted directed graphs where I can pre-specify the number of communities I will be looking to get as output. EdgeWeightedDigraph. Graph Type Morphisms weighted graph add weight attribute … Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. In particular, if a vertex is not in a strongly connected component of size at least 2, or in the out-component of such a
{ "domain": "incommunity.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982287698185481, "lm_q1q2_score": 0.8185645006034283, "lm_q2_score": 0.8333245973817158, "openwebmath_perplexity": 763.2774657729245, "openwebmath_score": 0.5039048194885254, "tags": null, "url": "http://ouzp.incommunity.it/weighted-directed-graph.html" }
aerospace-engineering, vibration (3) it may also be that with increasing distance and therefore increasing travel time in a real medium like air, sharp frequency distributions naturally get smoothed out over time. Can/Does the noise of propeller planes change like this? If yes, why does that happen? As noted in the comments, what you hear is a combination of engine noise as well as the sound of air over the aircraft and propeller. This will slightly complicate the circumstances, but only slightly. The movement of the aircraft results in a doppler effect. Sound is compression and rarefaction of air and travels in waves. There is a YouTube video explaining that the waves will be subjectively compressed when the source is traveling towards you and will be expanded/rarefied when traveling away from you. This change in frequency means a change in pitch. The complication arises from the multiple sources of the sound, unlike the automobile horn sound in the video.
{ "domain": "engineering.stackexchange", "id": 4837, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "aerospace-engineering, vibration", "url": null }
c++, algorithm arr[*str] = 1; } I would also change array<char,255> to array<bool,255> which expresses intend better as you only use values of 0 and 1 anyway. Edit: As pointed out in this answer the OPs code (and mine aswell) is vulnerable to buffer overruns. Although OP stated that input will be ASCII only (which is in the range of 0..127), if the string is user input then it shouldn't be trusted. One way the vulnerability could be mitigated would be a range check of the input characters. If they are out of the ASCII range, discard them, replace them by a "dummy" value or do whatever fits your situation.
{ "domain": "codereview.stackexchange", "id": 26006, "lm_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", "url": null }
or impossible (the function only existing as a table of values). Padeepz Comment(0) Ma8452 Question Bank STATISTICS AND NUMERICAL METHODS. FP1 NUMERICAL METHODS PAST EXAM QUESTIONS Questions 1-6 and Q. This website and its content is subject to our Terms and Conditions. GATE Questions & Answers of Numerical Methods Civil Engineering Numerical Methods 16 Question(s) Numerical solutions of linear and non-linear algebraic equations , Integration by trapezoidal rule , Integration by Simpson's rule , Single-step methods for differential equations , Multi-step methods for differential equations. MA8452 - Statistics and Numerical Methods is the Anna University Regulation 2017 04th Semester and 2nd-year Mechanical Engineering subject. com View Our Frequently Asked Questions. / Exam Questions - Numerical integration. Equations don't have to become very complicated before symbolic solution methods give out. Numerical Analysis and Applications exists for the discussion and dissemination of
{ "domain": "sicituradastra.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534349454033, "lm_q1q2_score": 0.8262126789622931, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 1277.6425196467615, "openwebmath_score": 0.262675940990448, "tags": null, "url": "http://sicituradastra.it/ieih/questions-on-numerical-methods.html" }
electrostatics, boundary-conditions $$ G_\ell = -\frac{2\ell+1}{2} \frac{Q}{2\pi D^2} \int_0^\pi P_\ell(\cos\theta) \sin\theta \, \delta'(\theta) \, \mathrm{d}\theta $$ Using integration by parts, we find that the value of the integral is -1 times the derivative of $P_\ell(\cos\theta)\sin\theta$ evaluated at $\theta=0$. To evaluate that derivative, we can use the product rule. One of the terms has $\sin\theta$ left undifferentiated, evaluating to zero. The other term is $P_\ell(\cos\theta)$ evaluated at $\theta=0$, multiplied by the derivative of $\sin\theta$ at $\theta=0$, which is just $\cos 0 = 1$. And since $P_\ell(\cos\theta)$ at $\theta=0$ is just $P_\ell(1)$, which is 1, we conclude that the entire integral is -1. Therefore $$ G_\ell = \frac{(2\ell+1)Q}{4\pi D^2} $$ And substituting these values of $G_\ell$ back into the general solution for arbitrary $\sigma$, and putting the factor of $1/\epsilon_0$ back in, we finally obtain \begin{align}
{ "domain": "physics.stackexchange", "id": 95742, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, boundary-conditions", "url": null }
string-theory, compactification, calabi-yau, algebraic-geometry, cohomology $\begin{equation} G_{MN} = G_{\mu \nu} \oplus G_{ij} \oplus G_{i \bar{\jmath}} \end{equation}$ In the result of the exercise, it is stated that the first of the above is associated to $1$ which is the $b_0$ and makes sense, the third is related to the $h^{1,1}$ which is the result of $b_1$ and also makes sense but the term $G_{ij}$ is said to be related to $h^{2,1}$. The only Betti number on a CY$_3$ related to that Hodge number is $b_{3}$. This is precisely what does not make any sense to me. The term $G_{ij}$ has two indices on CY$_3$ and is thus a two-form so I was expecting that we would seek the $b_2$ number. Of course, I have similar questions with the indices in the rest of the $p$-forms in that exercise; I just wanted to give a simple example. Can someone explain what I am missing or misunderstood?
{ "domain": "physics.stackexchange", "id": 66218, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "string-theory, compactification, calabi-yau, algebraic-geometry, cohomology", "url": null }
python, python-3.x, error-handling, logging, decorator-pattern if TYPE_CHECKING: reveal_type(foo) reveal_type(bar) if __name__ == "__main__": print(inspect.signature(foo)) foo("test") print(inspect.signature(bar)) bar("test") $ python foo.py (bar: str, /) -> int (<Logger 1>, 'test') {} (bar: str, *, logger: __main__.Logger = <Logger 0>) -> int ('test',) {'logger': <Logger 2>} $ mypy --strict foo.py foo.py:73: note: Revealed type is "def (bar: builtins.str) -> builtins.int" foo.py:74: note: Revealed type is "def (bar: builtins.str, *, logger: foo.Logger =) -> builtins.int" Review Your existing code doesn't really support type hints. @wiretap.telemetry(on_started=lambda p: {"value": p["value"], "bar": p["bar"]}, on_completed=lambda r: {"count": r}) def foo(value: int, logger: wiretap.Logger = None, **kwargs) -> int:
{ "domain": "codereview.stackexchange", "id": 44545, "lm_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, error-handling, logging, decorator-pattern", "url": null }
objective-c, ios [requestsView addSubview:denyButton]; userNameLabel.frame = CGRectMake(82, 0, 167, 68); NSInteger row = (NSInteger)[indexPath row]; NSArray *keys = [self.tableDataSource objectForKey:@"Requests"]; id aKey = [keys objectAtIndex:row]; userNameLabel.text = [aKey objectForKey:@"User"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[aKey objectForKey:@"URL"]]]; request.cachePolicy = NSURLRequestReloadIgnoringLocalAndRemoteCacheData; request.timeoutInterval = 5.0;
{ "domain": "codereview.stackexchange", "id": 6115, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c, ios", "url": null }
quantum-field-theory And this is the point. A massive particle of spin $\ge$ 1 (or a massless particle of spin > 1) will be non-renormalisable unless some other physics intervenes before the interactions become infinite. In the case of the W boson the Higgs mechanism intervenes. For a massive spin 2 composite particle there will be some energy at which the particle breaks up. For an elementary spin 2 particle (massive or otherwise) a QFT description will never be renormalisable.
{ "domain": "physics.stackexchange", "id": 3479, "lm_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", "url": null }
We note that $r$ cannot be zero for otherwise we would have $b = n a = q(m a) = q c \in \langle c \rangle\text{.}$ Therefore, $r a = n a - (q m) a \in H\text{.}$ This contradicts our choice of $m$ because $0 < r < m\text{.}$
{ "domain": "discretemath.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9919380101400315, "lm_q1q2_score": 0.8200468456171953, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 1615.108769389095, "openwebmath_score": 0.9999842643737793, "tags": null, "url": "https://discretemath.org/ads/s-cyclic-groups.html" }
python-3.x, numpy, pandas 725mb 0.21 -1.01 -3.23 -4.46 -7.68 -11.90 -16.12 -18.00 -19.00 -20.0 750mb 2.74 -0.49 -1.71 -3.93 -7.15 -11.37 -14.60 -16.00 -17.00 -18.0 775mb 4.26 1.04 -1.18 -4.40 -6.63 -10.85 -12.07 -15.00 -15.00 -16.0 800mb 5.79 3.57 -0.65 -3.88 -6.10 -9.32 -10.54 -12.77 -13.00 -15.0 825mb 8.32 5.09 0.87 -2.35 -4.57 -6.80 -9.02 -10.24 -12.00 -15.0 850mb 8.84 6.62 3.40 -0.82 -3.05 -5.27 -6.49 -8.71 -10.00 -14.0 875mb 8.37 7.15 5.92 1.70 -1.52 -2.74 -4.96 -6.19 -8.00 -12.0 900mb 7.89 7.67 6.45 4.23 0.01 -1.22 -3.44 -4.66 -6.88 -10.0 925mb 8.42 8.20 6.98 5.75 1.53 0.31 -0.91 -3.13 -4.36 -8.0 950mb 8.95 7.73 6.50 6.28 3.06 1.84 0.61 -0.61 -2.83 -6.0 975mb 9.47 8.25 8.03 6.81 5.58 4.36 3.14 0.92 -0.30 -4.0
{ "domain": "codereview.stackexchange", "id": 43049, "lm_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-3.x, numpy, pandas", "url": null }
java, beginner int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; char words; //Get user input Scanner keyboard = new Scanner(System.in);
{ "domain": "codereview.stackexchange", "id": 35829, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner", "url": null }
Here's a thought. (Not a very general method, but still useful, I hope.) Rewrite the equation as follows \begin{align}\frac3y &= \frac5z - \frac2x\\\frac3y &= \frac{5x-2z}{xz}\\y&=\frac{3xz}{5x-2z}\tag{*}\end{align} Note that in case where $x,z$ are integers such that $5x-2z=1$, we have that $y$ is automatically an integer. But this means that in this case $5x=2z+1$, so $2z+1$ is an odd multiple of $5$. In other words, every solution of $5x=2z+1$ is of the form \begin{align}x&=2k+1\\z&=5k+2\end{align} for some integer $k\in\mathbb Z$. Note that $z>x$ iff $k\in\mathbb N_0$. This yields an infinite family of solutions: \begin{align}x&=2k+1\\y&=3(2k+1)(5k+2)\\z&=5k+2\end{align} where $k\in\mathbb N_0$ is arbitrary.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517450056273, "lm_q1q2_score": 0.8351708562889155, "lm_q2_score": 0.8539127510928476, "openwebmath_perplexity": 218.1645002992438, "openwebmath_score": 0.9599024057388306, "tags": null, "url": "http://math.stackexchange.com/questions/370470/prove-that-solving-equation-is-possible" }
ruby, ruby-on-rails, validation Title: Refactoring complex phone validations I have a complex phone validation that does the following: First, check if either a home phone, mobile phone or work phone is provided (there will be 3 text fields in form and at least one type of phone number is required). Strip out any characters from the phone number that is not a digit except 'x' and '+', since those represent extensions and are valid. Make sure that the phones that were provided actually pass the phone number regex test. And this is how I implemented the 3 steps above: VALID_PHONE_FORMAT = /\A(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?\z/
{ "domain": "codereview.stackexchange", "id": 9077, "lm_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, validation", "url": null }
ros, gazebo, moveit, follow-joint-trajectory Title: Integrating Gazebo and MoveIt for trajectory execution for YuMi Hi, I am in the process of integrating Gazebo to view the trajectory generated by MoveIt! for ABB YuMi robot in ROS Kinetic. I am using these packages as a starting point: https://github.com/OrebroUniversity/yumi Apart from the two controllers.yaml files, [https://github.com/OrebroUniversity/yumi/blob/master/yumi_control/config/controllers.yaml and https://github.com/OrebroUniversity/yumi/blob/master/yumi_moveit_config/config/controllers.yaml ] I have the controllers for Gazebo and the overall graph that can be found here: https://drive.google.com/drive/folders/0Bx0AJvW-lbnBUjUwdE80R1Fxa00 As seen from the graph, the FollowJointTrajectory Action is not attached to either Gazebo or MoveIt. I am trying to better understand the implementation of various controller configurations.
{ "domain": "robotics.stackexchange", "id": 28213, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo, moveit, follow-joint-trajectory", "url": null }
Hence we have the attainable inequality $\notag |x^*y| \le \|x\| \, \|y\|^D, \qquad\qquad (2)$ which is the generalized Hölder inequality. The dual of the $p$-norm is the $q$-norm, where $p^{-1} + q^{-1} = 1$, so for the $p$-norms the inequality (2) becomes the (standard) Hölder inequality, $\notag |x^*y| \le \|x\|_p \, \|y\|_q, \quad \displaystyle\frac{1}{p} + \frac{1}{q} = 1.$ An important special case is the Cauchy–Schwarz inequality, $\notag |x^*y| \le \|x\|_2 \, \|y\|_2.$ The notation $\|x\|_0$ is used to denote the number of nonzero entries in $x$, even though it is not a vector norm and is not obtained from (1) with $p = 0$. In portfolio optimization, if $x_k$ specifies how much to invest in stock $k$ then the inequality $\|x\|_0 \le k$ says “invest in at most $k$ stocks”. In numerical linear algebra, vector norms play a crucial role in the definition of a subordinate matrix norm, as we will explain in the next post in this series.
{ "domain": "nhigham.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9945307248339315, "lm_q1q2_score": 0.8060461787788519, "lm_q2_score": 0.8104789109591832, "openwebmath_perplexity": 495.1040687882936, "openwebmath_score": 0.9643710255622864, "tags": null, "url": "https://nhigham.com/2021/09/" }
continuous-signals, phase $$H(e^{j\omega})=A(\omega)e^{j\phi(\omega)}\tag{1}$$ then $A(\omega)$ is the magnitude and $\phi(\omega)$ is the phase, only if $A(\omega)$ is real-valued and non-negative. So in your example $H(e^{j\omega})=2\cos(\omega)e^{-j\omega}$, the phase equals $-\omega$ only in the interval $[-\pi/2,\pi/2]$, because otherwise $\cos(\omega)$ is negative. For $\pi/2<|\omega|<\pi$, you have to add $\pm\pi$ to the phase to compensate for the sign inversion of the cosine. Hence, the phase is given by $$\phi(\omega)=\begin{cases}-\omega,&0\le|\omega|\le\pi/2\\-\omega\pm\pi,&\pi/2<|\omega|<\pi\end{cases}\tag{2}$$ With the phase defined in that way, we can rewrite the given frequency response in terms of magnitude and phase: $$H(e^{j\omega})=2|\cos(\omega)|e^{j\phi(\omega)}\tag{3}$$
{ "domain": "dsp.stackexchange", "id": 10994, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "continuous-signals, phase", "url": null }
# Evaluating Double Integrals ## Evaluating Iterated Integrals Evaluating a multiple integral involves expressing it as an iterated integral, which can then be evaluated either symbolically or numerically. We begin by discussing the evaluation of iterated integrals. ## Example 1 We evaluate the iterated integral To evaluate the integral symbolically, we can proceed in two stages. syms x y firstint=int(x*y,y,1-x,1-x^2) firstint = (x^2*(x - 1)^2*(x + 2))/2 1/24 We can even perform the two integrations in a single step: int(int(x*y,y,1-x,1-x^2),x,0,1) ans = 1/24 There is, of course, no need to evaluate such a simple integral numerically. However, if we change the integrand to, say, exp(x^2 - y^2), then MATLAB will be unable to evaluate the integral symbolically, although it can express the result of the first integration in terms of erf(x), which is the (renormalized) antiderivative of exp(-x^2). int(int(exp(x^2-y^2),y,1-x,1-x^2),x,0,1)
{ "domain": "umd.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517501236461, "lm_q1q2_score": 0.8171461356635106, "lm_q2_score": 0.8354835371034368, "openwebmath_perplexity": 908.7876966704341, "openwebmath_score": 0.875399112701416, "tags": null, "url": "http://www2.math.umd.edu/~jmr/241/doubleint.html" }
So what have we done? We've got a sequence containing all the positive rational numbers, and so this "box" has a countable number of elements. We've actually got more than just the positive rational numbers, since for example, $\frac11 = \frac22 = \frac33 = \cdots$ and a lot of cancellation is occuring, but that doesn't really matter, because it means the positive rationals are contained in a countable set, and so must be countable. I suppose I can mention, if you look along any of the diagonals, all the fractions have the same sum of numerator and denominator, which is how Andrea Mori suggested you count them. This is just a fun way of looking at things :) Now, adding the negative of each element just "doubles the size" (just like going from natural numbers to the integers), and so is a way to see the rational numbers are countable.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936078216782, "lm_q1q2_score": 0.8022650838686942, "lm_q2_score": 0.8152324915965392, "openwebmath_perplexity": 255.7745086898805, "openwebmath_score": 0.8422219753265381, "tags": null, "url": "http://math.stackexchange.com/questions/188078/how-do-we-determine-if-the-set-of-rational-numbers-and-the-set-of-all-english-se" }
filters, transfer-function, fixed-point %Display DC-Gain of Bode-Plot and Step-Response settling value DC_Gain_FP_Tf = mag_fixed(1) DC_Gain_FP_Step = double(out(end)) / stepHight Nice job thus far. It's really quite simple: Do not change anything with the approach with regards to using $e^{j2\pi f/ f_s}$ to determine the magnitude and phase. The effect of fixed point is to quantize the coefficients in the polynomial only, and then proceed exactly as before. The frequency response itself is still computed as a continuous function along the unit circle, but the result will be effected by the quantization of the polynomial coefficients. Given the resulting polynomial as $H(z)$, proceed exactly as the math dictates with $z=e^{j\omega}$ with $\omega = 2\pi f/f_s$, which is $H(e^{j\omega})$, a continuous function over $\omega$.
{ "domain": "dsp.stackexchange", "id": 11089, "lm_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, transfer-function, fixed-point", "url": null }
Let $x$ be a point of $X$, $X-\{x\}$ is closed so its complementary subset $\{x\}$ is open. Thus every subset is open since it is the union of its elements. Why wouldn't the proof work for infinite sets/spaces? Take any subset $\;A\subset X\;$, then $\;X\setminus A\;$ is closed and thus $\;A\;$ is open, and thus any subset of $\;X\;$ is open and we have the discrete topology...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575193498701, "lm_q1q2_score": 0.8409229871220522, "lm_q2_score": 0.8558511543206819, "openwebmath_perplexity": 199.4164536352394, "openwebmath_score": 0.9275720715522766, "tags": null, "url": "https://math.stackexchange.com/questions/2268425/proof-verification-let-x-tau-be-a-topological-space-such-that-every-subset" }
gazebo-ignition, sdformat <sim_time>true</sim_time> <real_time>true</real_time> <real_time_factor>true</real_time_factor> <iterations>true</iterations> <topic>/world/world_demo/stats</topic> </plugin> <!-- Entity tree --> <plugin filename="EntityTree" name="Entity tree"> </plugin> </gui> <!--light--> <light type="directional" name="sun"> <cast_shadows>true</cast_shadows> <pose>0 0 10 0 0 0</pose> <diffuse>0.8 0.8 0.8 1</diffuse> <specular>0.2 0.2 0.2 1</specular> <attenuation> <range>1000</range> <constant>0.9</constant> <linear>0.01</linear> <quadratic>0.001</quadratic> </attenuation> <direction>-0.5 0.1 -0.9</direction> </light> <include> <uri> model://goat.dae </uri> </include> </world> </sdf>
{ "domain": "robotics.stackexchange", "id": 4585, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo-ignition, sdformat", "url": null }
javascript, angular.js, underscore.js, lodash.js What works: var defaultOptions = { key1: false, key2: false, key3: null }; var intersection = _.intersection(_.pluck(array1, 'id'), _.pluck(array2, 'name')); var intersectionArr1 = _.sortBy(_.filter(array1, function(person) { return intersection.indexOf(person.id) >= 0; }), 'id'); var intersectionArr2 = _.sortBy(_.filter(array2, function(person) { return intersection.indexOf(person.name) >= 0; }), 'name'); _.each(intersectionArr1, function(person, idx) { _.assign(person, _.pick(intersectionArr2[idx], ['key1', 'key2', 'key3'])); _.defaults(person, { new_id: intersectionArr2[idx].id }); }); var diff = _.difference(_.pluck(array1, 'id'), _.pluck(array2, 'name')); var leftoverArr1 = _.filter(array1, function(person) { return diff.indexOf(person.id) >=0; }); _.each(leftoverArr1, function(person) { _.defaults(person, defaultOptions); }); $scope.newOutputArray = array1;
{ "domain": "codereview.stackexchange", "id": 15701, "lm_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, angular.js, underscore.js, lodash.js", "url": null }
c++, programming-challenge, chess, backtracking, c++03 chess.find_solutions(); chess.print_solutions(); if ( t < T ) std::cout << std::endl; } return 0; } What are the possible way to improve: on quality-wise to make it more readable so that someone can understand 6 months down the road to make it more C++-like Besides what Hosch250 said, with all of which I agree, here are a few more C++ style points: #include <cmath> You don't use anything from <cmath>, but you do use std::abs, which is located in <cstdlib>. const int row_size, col_size; const int row_queen, col_queen; It is generally considered bad style to declare multiple entities on the same line. Consider: int const *a, b; // what is the type of "b"? Also, I see you're declaring these non-static data members as const. This is mostly harmless in C++03, but I strongly advise you to break the habit now.
{ "domain": "codereview.stackexchange", "id": 23542, "lm_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++, programming-challenge, chess, backtracking, c++03", "url": null }
# Initial value problem and grönwall's inequality I have the following problem: Consider the Initial Value Problem $$x'=f(t,x), \; x(t_0)=x_0$$, where $$f:I\times \mathbb{R}^n \to \mathbb{R}^n$$ is locally lipschitz with respect to $$x$$. Suppose that exists $$c_1,c_2 \geq 0$$ such that $$\| f(t,x) \| \leq c_1 \|x\| + c_2 , \; \forall (t,x)\in I \times \mathbb{R}^n$$ Prove that the maximal solution $$\varphi(t)$$ of the IVP is defined $$\forall t\in I$$. Hint: Use the Grönwall's inequality. I have done this: If $$\| f(t,x) \| \leq c_1 \|x\| + c_2 , \; \forall (t,x)\in I \times \mathbb{R}^n$$, in particular: $$\| f(t,\varphi(t)) \| =\|\varphi'(t) \|\leq c_1 \|\varphi(t)\| + c_2= c_1\left\|x_0+\int_{t_0}^tf(t,\varphi(s))ds \right\|+c_2 =c_2+c_1\|x_0\|+c_1 \int_{t_0}^t \left\| f(t,\varphi(s)) \right\|ds$$ Then, by the Grönwall's inequality, $$\|\varphi'(t) \| \leq e^{c_1 |t-t_0|}\left( c_2+c_1 \|x_0 \| \right)$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429107723175, "lm_q1q2_score": 0.8098915657511854, "lm_q2_score": 0.822189121808099, "openwebmath_perplexity": 137.91606143537177, "openwebmath_score": 0.9738373160362244, "tags": null, "url": "https://math.stackexchange.com/questions/2958805/initial-value-problem-and-gr%C3%B6nwalls-inequality" }
php, html, classes, form, php7 * Should output something like: * * <form name='myform' action='destination.php' method='post'> * <input type='text' name='mytext' value='bool(true)' required> * <input type='text' name='myothertext' value='cheese tax' required> * </form> * * This example below should render something like the example above. Notice the add_field() method: * * $form = new Form(["name"=>"myform", "method"=>"post", "action"=>"destination.php"]); * $form->add_field(["text", ["name"=>"mytext", "required"=>""], "value"=>"string(0)"]); * $form->add_field(["text", ["name"=>"myothertext", "required"=>null, "value"=>null]]); * echo $form->render(); * * Output: * * <form name='myform' action='destination.php' method='post'> * <input type='text' name='mytext' value='string(0)' required> * <input type='text' name='myothertext' value='' required> * </form>
{ "domain": "codereview.stackexchange", "id": 44614, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, html, classes, form, php7", "url": null }
c#, object-oriented, winforms Title: Project Euler problem solver in windows forms I've programmed a few Project Euler problem but they are all separated in different solutions so I decided to group them all together in a nice Windows forms application. Here's how it looks like : You can select any of the available problems from the list check the answer and the execution time. I'm looking primarly for code style review or maybe a better way of separating classes and the overall architecture. Main form class public partial class Form1 : Form { private readonly Dictionary<string, IProblem> problems = new Dictionary<string, IProblem>(); private readonly Dictionary<int, ProblemOutput> solvedProblems = new Dictionary<int, ProblemOutput>(); private IProblem currentProblem; public Form1() { InitializeComponent(); LoadProblems(); }
{ "domain": "codereview.stackexchange", "id": 23328, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, object-oriented, winforms", "url": null }
And e seems even more common and comes up in many situations, such as: I'd really like to have some light shed on the matter. How do I begin to form an intuitive grasp of $e^i$ ? - I really like this explanation. betterexplained.com/articles/… –  in_wolframAlpha_we_trust Feb 18 '13 at 8:34 @in_wolfram_we_trust: Great explanaition. Should be an answer. I'll add it as community wiki. –  Macke Feb 18 '13 at 8:41 Intuition comes from knowledge and experience! Learning facts about complex exponentiation then making use of those facts to solve problems will build your experience. –  Hurkyl Feb 18 '13 at 9:49 Think of the exponential as the map from the tangent space to the base manifold, where the tangent space is the real line at $\{\Re = 1\}$ and the manifold is the unit circle. –  Kerrek SB Feb 18 '13 at 13:29 Take also a look at this answer to a related question at mathoverflow. –  j.p. Feb 18 '13 at 16:41
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211597623863, "lm_q1q2_score": 0.8080670946194755, "lm_q2_score": 0.8289388125473628, "openwebmath_perplexity": 222.01360967114383, "openwebmath_score": 0.9164613485336304, "tags": null, "url": "http://math.stackexchange.com/questions/306924/how-do-i-understand-ei-which-is-so-common/307532" }
type-theory Product type Intro: given $a:A,b:B$ an instance of $A \times B$ can be uniquely constructed Unique: given an instance of $A \times B$, it is uniquely constructed by some $a:A,b:B$ Elim (I'm just using the non-dependent version to make it simple): providing a function $A \to B \to C$, we could feed it with an instance of $A \times B$ and we could obtain an instance of $C$ Identity type a la Martin-Löf Intro: given $x:A$ an instance of $\sum_{x:A}{x=_A x}$ can be uniquely constructed Unique: given an instance of $\sum_{y:A}{x=_A y}$ must be uniquely constructed from some $x:A$ Elim: omitted I'm asking to look for criticisms on my pov. Uniqueness is not converse to introduction. Uniqueness rules in type theory are components of isomorphisms. If a type former is specified with an isomorphism, then Constructors form one map Eliminators form the inverse map β-rules express elim ∘ con = id η-rules (uniqueness) express con ∘ elim = id
{ "domain": "cstheory.stackexchange", "id": 5201, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "type-theory", "url": null }
newtonian-mechanics, classical-mechanics, rotational-dynamics, reference-frames, coordinate-systems &&\text{homogeneity} \\ & = \sum_j \left(\dot{A'}_j\mathbf{e}'_j\right) +\boldsymbol{\omega}\times\mathbf{A}. &&\text{linearity} \end{align} Thus, we write that $$ \left(\frac{\text{d}\mathbf{A}}{\text{d}t}\right)_{K'} = \left(\frac{\text{d}\mathbf{A}}{\text{d}t}\right)_{K} - \boldsymbol{\omega}\times\mathbf{A}. \tag{2} $$ This is the crux of the problem: to an observer in the moving frame, every vector appears to have an additional term in its time derivative, when, in fact, it is the frame itself that is changing.
{ "domain": "physics.stackexchange", "id": 70819, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, classical-mechanics, rotational-dynamics, reference-frames, coordinate-systems", "url": null }
1. ## Population Growth It is projected that, t, years from now, the population of a certain country will become $P(t) = 50e^{0.002t}$ million. a) At what rate will the population be changing with respect to time 10 years from now? ...I thought taking the first derivative of the equation would give me the rate of change... and it did... but it's not the answer the question is looking for. $P'(t) = e^{0.02t}$ ...and I solved for 10 years and compared the population to the present... $P(10) = 61$ million $P(0) = 50$ million $P(10) - P(0) = 11$ million rate of change $= \frac{P(10) - P(0)}{10 - 0}$ rate of change $= 1.1$ ...and that's also not the right answer... So... now I don't know what to do. 2. Originally Posted by Macleef It is projected that, t, years from now, the population of a certain country will become $P(t) = 50e^{0.002t}$ million. a) At what rate will the population be changing with respect to time 10 years from now?
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575116884778, "lm_q1q2_score": 0.8209106192356873, "lm_q2_score": 0.8354835309589074, "openwebmath_perplexity": 706.241749082538, "openwebmath_score": 0.5838194489479065, "tags": null, "url": "http://mathhelpforum.com/calculus/69835-population-growth.html" }
turing-machines, mu-recursion So, my question is : Are the partial recursive functions (with unsafe operator $\mu$) equivalent to partial functions computable by Turing machines? Unsafe $\mu$ is strictly stronger than partial TMs. Indeed, define $f$ such that $f(x,0)=1$ if the $x$-th Turing machine halts on empty input, let $f(x,0)$ be undefined otherwise, and let $f(x,n)=1$ for all $n>0$. Then $f$ is a computable partial function. Let $g:=\mu(f)$. Then $g(x)=0$ if the $x$-th Turing machine halts and $g(x)=1$ otherwise. Hence $\mu(f)$ is not computable. [EDIT] The closure of partial recursive functions under unsafe $\mu$ seems to be the arithmetical hierarchy. (In order to make that statement precise, we have to translate between partial functions and subsets of $\mathbb N$.)
{ "domain": "cs.stackexchange", "id": 11345, "lm_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, mu-recursion", "url": null }
c++, matrix, pathfinding for (size_t y = 0; y < ROW; ++y) { for (size_t x = 0; x < COL; ++x) { matrix[y][x] = 1; } } matrix[ROW / 2][COL / 2] = 0; matrix[2][3] = 0; long long ta = get_milliseconds(); int path_count = pathCount(matrix, ROW, COL); long long tb = get_milliseconds(); std::cout << "Paths: " << path_count << " in " << tb - ta << " ms." << std::endl; path_count = 0; ta = get_milliseconds(); int path_count2 = pathCountV2(matrix, ROW, COL); tb = get_milliseconds(); std::cout << "Paths: " << path_count2 << " in " << tb - ta << " ms." << std::endl; return 0; } The space complexity of the above algorithm is also \$\Theta(MN)\$, but it can be easily improved to \$\Theta(\min\{M, N\})\$ by processing one column or row at a time.
{ "domain": "codereview.stackexchange", "id": 13363, "lm_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++, matrix, pathfinding", "url": null }
# isstable Determine if dynamic system model is stable ## Syntax ``B = isstable(sys)`` ``B = isstable(sys,'elem')`` ## Description example ````B = isstable(sys)` returns a logical value of `1` (`true`) if the dynamic system model `sys` has stable dynamics, and a logical value of `0` (`false`) otherwise. If `sys` is a model array, then the function returns `1` only if all the models in `sys` are stable.`isstable` returns a logical value of `1` (`true`) for stability of a dynamic system if: In continuous-time systems, all the poles lie in the open left half of the complex plane.In discrete-time systems, all the poles lie inside the open unit disk. `isstable` is supported only for analytical models with a finite number of poles.``` example ````B = isstable(sys,'elem')` returns a logical array of the same dimensions as the model array `sys`. The logical array indicates which models in `sys` are stable.``` ## Examples collapse all
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147169737826, "lm_q1q2_score": 0.8103371004976331, "lm_q2_score": 0.8333245953120233, "openwebmath_perplexity": 1107.0387063561216, "openwebmath_score": 0.6336947083473206, "tags": null, "url": "https://it.mathworks.com/help/control/ref/dynamicsystem.isstable.html;jsessionid=9592fb44152b7f4a461b1ea5e3be" }
moving-average As you can see, the filter does get wider, but it also changes form as you convolve it more times. As Libor mentioned, as $n$ gets large it starts to approximate a gaussian filter according to the central limit theorem.
{ "domain": "dsp.stackexchange", "id": 416, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "moving-average", "url": null }
python, sqlalchemy def export_moneyline(self): self.moneyline = Moneyline().to_dict(self.categories) MoneylineControl(BOOK,self.db_control).commit_entry(self.moneyline) def export_total(self): self.total = Total().to_dict(self.categories) TotalControl(BOOK,self.db_control).commit_entry(self.total) def export_propshomeruns(self): self.propshomeruns = PropsHomeruns().to_dict(self.categories) PropsControl(BOOK,self.db_control,'homeruns').commit_entry(self.propshomeruns) def export_propshits(self): self.propshits = PropsHits().to_dict(self.categories) PropsControl(BOOK,self.db_control,'hits').commit_entry(self.propshits) def export_propstotalbases(self): self.propstotalbases = PropsTotalBases().to_dict(self.categories) PropsControl(BOOK,self.db_control,'totalbases').commit_entry(self.propstotalbases)
{ "domain": "codereview.stackexchange", "id": 43739, "lm_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, sqlalchemy", "url": null }
quantum-mechanics, homework-and-exercises, measurement-problem Title: Probability of finding a particle with a particular value of momentum Given a particle's wave function, what is the general method of finding the probability distribution of momentum (i.e., the probability of finding that particle with a particular value of momentum)? For example, given $$ \psi(x) = a e ^ { ikx } + b e ^ { -ikx }, $$ what is the probability of measuring $ p_x = \hbar k $ ? First of all, I assume that you know that the probability (density) distribution is given by the squared amplitude of the wavefunction. In your example, you are given the wavefunction in the position basis, so it gives you the position probability density. If you want the momentum probability density, you have to change basis to get $\psi(p)$. The standard way to change basis is to use a "resolution of the identity". The manipulation is easiest in bra-ket notation. You start out with \begin{equation} \psi(x) = \langle x | \psi \rangle = a\, e^{i k x} + b\, e^{-i k x}. \end{equation}
{ "domain": "physics.stackexchange", "id": 46132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, measurement-problem", "url": null }
quantum-mechanics, operators, wavefunction, schroedinger-equation Title: Schrodinger Equation: Is this derivation allowed? In reading material given for a course, I saw the following two statements: $$H\psi_n = E_n \psi_n$$ Where all the $\psi_n$ are eigenfunctions of $H$. The next step given is $$e^{\frac{iHt}{h}}\psi_n = e^{\frac{iE_nt}{h}}\psi_n.$$ Does the second statement follow naturally from the first one? Am I allowed to raise the operators to the power as shown? Or is there some derivation missing? Yes this is allowed. One can define $e^H = \sum_{n=0}^\infty \frac{H^n}{n!}$. Since H is diagonal, it can be replaced by its eigenvalues giving the identity.
{ "domain": "physics.stackexchange", "id": 51844, "lm_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, wavefunction, schroedinger-equation", "url": null }
ekf, gps, navsat-transform-node, navsat-transform, ekf-localization Until that change is applied you will need to patch the driver yourself, which requires adding a local copy of it to your workspace to override the version installed with ROS. In your workspace's src directory, clone a copy of the driver's source: git clone https://github.com/ros-drivers/nmea_navsat_driver.git
{ "domain": "robotics.stackexchange", "id": 27673, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ekf, gps, navsat-transform-node, navsat-transform, ekf-localization", "url": null }
The time value of money is a financial concept that basically says money at hand today is worth more than the same amount of money in the future. Default risk arises when the borrower does not pay the money back to the lender. To calculate this, you would take the $10,450 and multiply it again by 1.045 (0.045 +1). When a future payment or series of payments are discounted at the given interest rate to the present date to reflect the time value of money, the resulting value is called present value. In the above equation, the two like terms are (1+ 0.045), and the exponent on each is equal to 1. But why is this? A value at some future date called future value (FV). Back to our example: By receiving$10,000 today, you are poised to increase the future value of your money by investing and gaining interest over a period of time. Simple interest is Initial invest x Interest rate x Number of Periods. Let's up the ante on our offer. If you were to receive $10,000 in one year, the present value
{ "domain": "saberion.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984093606422157, "lm_q1q2_score": 0.8045698082347964, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 844.4499617236826, "openwebmath_score": 0.8469468355178833, "tags": null, "url": "http://cloverepublic.saberion.org/u33uz45q/y2n2f.php?page=2545aa-time-value-of-money-concept" }
performance, strings, typescript And with this little "library" of pretty generic functions your original code can be expressed like this: export function getMissingItemsIgnoreCase( sourceList: string[], otherList: string[], ): string[] { return getMissingItems( trim(sourceList), trim(otherList), x => x.toLowerCase() ); } Please be careful, here starts the domain of functional programming, composition, and many other interesting things which might drastically change your approach to solving problems. Jokes aside, that's where people usually start to over-optimize, over-abstract, over-generalize, and many other "over-" things that hurt productivity.
{ "domain": "codereview.stackexchange", "id": 43747, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, strings, typescript", "url": null }
quantum-mechanics, quantum-entanglement, faster-than-light, bells-inequality [2] about super-determinism is exactly that RSA token explanation? If so, I don't get it, the fact we have deterministic RSA tokens doesn't imply we have no free will, it just implies that the RSA has a pseudo-random number generator, it doesn't negate the fact our brains might have "true" randomness, so can't there be a coesistence of determinism in quantum entanglement but no determinism in our own mind? why are they necessarily related? References: [1] Hensen, B; Bernien, H; Dréau, AE; Reiserer, A; Kalb, N; Blok, MS; Ruitenberg, J; Vermeulen, RF; Schouten, RN; Abellán, C; Amaya, W; Pruneri, V; Mitchell, MW; Markham, M; Twitchen, DJ; Elkouss, D; Wehner, S; Taminiau, TH; Hanson, R. "Loophole-free Bell inequality violation using electron spins separated by 1.3 kilometres". Nature. 526: 682–686. arXiv:1508.05949 Freely accessible. Bibcode:2015Natur.526..682H. doi:10.1038/nature15759. PMID 26503041.
{ "domain": "physics.stackexchange", "id": 89441, "lm_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-entanglement, faster-than-light, bells-inequality", "url": null }
complexity-theory, graphs, reductions Also, Clique and Independent Set are really the same problem — you get one from the other by complementing the graph. Finally, let me stress that Independent Set is NP-complete, but it is not known to be in coNP or to be coNP-hard; indeed, it is conjectured not to be in coNP and not to be coNP-hard (otherwise NP=coNP).
{ "domain": "cs.stackexchange", "id": 14128, "lm_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, graphs, reductions", "url": null }
python, nlp, k-means, word2vec, sentiment-analysis Title: Differentiate between positive and negative clusters I have applied k-means clustering on my dataset of Amazon Alexa reviews. model = KMeans(n_clusters=2, max_iter=1000, random_state=True, n_init=50).fit(X=word_vectors.vectors.astype('double'))
{ "domain": "datascience.stackexchange", "id": 8655, "lm_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, nlp, k-means, word2vec, sentiment-analysis", "url": null }
print("\nDimensions...\n",arr.ndim) Get the shape − print("\nShape...\n",arr.shape) Get the number of elements − print("\nNumber of elements...\n",arr.size) ## Example import numpy as np # To return evenly spaced numbers over a specified interval, use the numpy.linspace() method in Python Numpy # The 1st parameter is the "start" i.e. the start of the sequence # The 2nd parameter is the "end" i.e. the end of the sequence # The 3rd parameter is the num i.s the number of samples to generate. Default is 50. arr = np.linspace(10, 20) print("Array...\n", arr) # Get the type print("\nType...\n", arr.dtype) # Get the dimensions print("\nDimensions...\n",arr.ndim) # Get the shape print("\nShape...\n",arr.shape) # Get the number of elements print("\nNumber of elements...\n",arr.size) ## Output
{ "domain": "tutorialspoint.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561694652216, "lm_q1q2_score": 0.8291966674453197, "lm_q2_score": 0.8558511506439707, "openwebmath_perplexity": 2909.398315613411, "openwebmath_score": 0.39552441239356995, "tags": null, "url": "https://www.tutorialspoint.com/return-evenly-spaced-numbers-over-a-specified-interval-in-numpy" }
image-processing, computer-vision, camera-pose This intuition would be very useful to accordingly choose the physical tag size, the focal length, the image resolution to ensure or at least maximize the probability to have a given translation pose error. The size of the tag is an important parameter. But it is a secondary parameter. The key parameter that we are looking at here (and one that is not easy to estimate) is Signal to Noise Ratio (SNR). So, very very briefly: The bigger the tag, the more data we obtain from the tag, the better the position of the estimate will be.
{ "domain": "dsp.stackexchange", "id": 9059, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, computer-vision, camera-pose", "url": null }
thermodynamics, water, freezing Title: Why does freshwater freeze from top to bottom? I was wondering why freshwater freezes from up to bottom and not the other way around. The reason I question this is because in a Video I came across, I discovered water freezes from top but surely with the current knowledge I would say it should be opposite because we know cool air drifts down while hot air drifts up so similarly the heat should fall down and this that the freezing should start from bottom and not up? Unless my knowledge applied is wrong and potentially stupid so I want to ask: Why does water freeze from top to bottom? The density of water rises from 0 to 4 degrees celsius. So you would have a gradient of water temperatures. On the bottom 4 degrees celsius and colder water above it. This is also the reason why fish survive in winter, they just dive to the bottom where the temperature stays warm longer. Also the density of ice is smaller than water so it will float.
{ "domain": "physics.stackexchange", "id": 42477, "lm_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, water, freezing", "url": null }
visible-light, laser, sun The laser medium will only amplify a certain wavelength range of the sun light so the amplfied sun light would basically mimic the gain profile of the laser medium. The output would just be an spatially and temporally incoherent reddish beam. In the second figure you can see the solar spectrum after amplification with the toy gain profile for various thicknesses of the laser medium.
{ "domain": "physics.stackexchange", "id": 97766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, laser, sun", "url": null }
ros-kinetic /home/quanfayan/autoware.ai/src/autoware/core_perception/pcl_omp_registration/src/ndt.cpp:49:37: required from here /home/quanfayan/autoware.ai/src/autoware/core_perception/pcl_omp_registration/include/pcl_omp_registration/ndt.h:234:53: error: no members matching ‘pcl_omp::Registration<pcl::PointXYZ, pcl::PointXYZ, float>::update_visualizer_’ in ‘class pcl_omp::Registration<pcl::PointXYZ, pcl::PointXYZ, float>’ using Registration<PointSource, PointTarget>::update_visualizer_; ^~~~~~~~~~~~~~~~~~ /home/quanfayan/autoware.ai/src/autoware/core_perception/pcl_omp_registration/include/pcl_omp_registration/ndt.h: In instantiation of ‘class pcl_omp::NormalDistributionsTransform<pcl::PointXYZI, pcl::PointXYZI>’: /home/quanfayan/autoware.ai/src/autoware/core_perception/pcl_omp_registration/src/ndt.cpp:50:37: required from here
{ "domain": "robotics.stackexchange", "id": 35590, "lm_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-kinetic", "url": null }
beginner, primes, rust The files lib.rs pub mod prime; main.rs pub mod prime; use std::env; use std::io::stdin; fn take_input() { println!("Prime cheker utility.\n=====================\n"); loop { process_single_line(); if user_wants_to_exit() { break; } } } fn process_single_line() { let mut num_str: String = String::new(); println!("Enter the number to check : "); stdin().read_line(&mut num_str).unwrap(); process_string(num_str.trim()); } fn user_wants_to_exit() -> bool { let mut usr_str = String::new(); println!("Do you want to exit? (y/n) : "); stdin() .read_line(&mut usr_str) .expect("Error while reading input."); let trimmed = usr_str.trim(); trimmed == "y" || trimmed == "Y" || trimmed.to_lowercase() == "yes" } fn process_string(num_str: &str) { let num = num_str.parse::<u64>().expect(INVALID_NUMBER);
{ "domain": "codereview.stackexchange", "id": 32997, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, primes, rust", "url": null }
So $P \left({k}\right) \implies P \left({k + 1}\right)$ and the result follows by the Principle of Mathematical Induction. Therefore: $\displaystyle \forall n \in \N_{>0}: D_x \left({\sum_{i \mathop = 1}^n f_i \left({x}\right)}\right) = \sum_{i \mathop = 1}^n D_x \left({f_i \left({x}\right)}\right)$ $\blacksquare$
{ "domain": "proofwiki.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9938070110343908, "lm_q1q2_score": 0.8054596240067541, "lm_q2_score": 0.8104789109591832, "openwebmath_perplexity": 311.0008654634531, "openwebmath_score": 0.946927547454834, "tags": null, "url": "https://proofwiki.org/wiki/Sum_Rule_for_Derivatives/General_Result" }
reinforcement-learning, q-learning What could be causing this undesirable behavior?
{ "domain": "ai.stackexchange", "id": 979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, q-learning", "url": null }
c++, algorithm, search int main() { int array[] = { 2, 4, 5, 6, 7, 0, 1 }; int index = search( array, 7, 0 ); std::cout<<"index :"<<index; } Generally speaking, well-designed algorithms in C++ work with iterators, not with arrays and size or with full collections. By using iterators, you can make your algorithm work with any standard collection. Since you heavily rely on the indices and make math with them, I guess that you algorithm is only meant to work with random-access iterators, but we can still generalize it with iterators to make it work with arrays, std::array, std::vector and std::deque with trivial changes. Make it work with any random-access iterator First, let's change the signature: template<typename RandomAccessIt> int search(RandomAccessIt begin, RandomAccessIt end, int key); We don't have the size N anymore, but we can still compute last_index with the iterators: int last_index = std::distance(begin, end) - 1;
{ "domain": "codereview.stackexchange", "id": 13773, "lm_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, search", "url": null }
reinforcement-learning, reward-design I assume there must be a good reason for this, but I could not figure it out yet. Reward normalisation is constrained by the need to not change the problem definition. The optimal policy should be the same with or without reward normalisation. The intended improvement is to make it easier to converge on the right policy, and possibly - as in DQN Atari paper - to allow the use of the same hyperparameters elsewhere. A change to reward ratios could change the problem definition. Consider an environment where the agent could choose between receiving a reward of +1 three times or a reward of +2 once, due to the rewards being associated with exclusive pathways. Offset these rewards towards zero then the optimal choice will change. A change of sign to rewards, when they become centered around zero, can also change what is optimal. This can change things so much that an agent will prefer to end an episode instead of completing a task as originally described in the problem definition.
{ "domain": "ai.stackexchange", "id": 3865, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, reward-design", "url": null }
moveit, ros-melodic, ros-control If you implement a hardware_interface that simply copies command -> current_state (perhaps with a small delay) then none of the controllers will ever notice this. Originally posted by gvdhoorn with karma: 86574 on 2020-03-03 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 34529, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "moveit, ros-melodic, ros-control", "url": null }
java, performance, game, playing-cards System.out.println(""); System.out.println(""); for (int i = 0; i < 8; i++) { graphics(-1, i); System.out.print(" "); graphics(-1, i); System.out.print(" "); graphics(-1, i); System.out.print(" "); graphics(-1, i); System.out.println(""); } } if (flips == 2) { for (int i = 0; i < 8; i++) { graphics(set[0], i); System.out.print(" "); graphics(set[1], i); System.out.print(" "); graphics(-1, i); System.out.print(" "); graphics(-1, i); System.out.println(""); } System.out.println(""); System.out.println("");
{ "domain": "codereview.stackexchange", "id": 31510, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, game, playing-cards", "url": null }
bioinformatics, computational-model, blast In simple words, the BLOSUM matrices give you a score based on how often the alignment you observe in your sequences is found in alignments of similar sequences. There are several BLOSUM matrices which have been computed using proteins of more or less sequence similarity. The most commonly used one is BLOSUM62 which was built using alignments between proteins of $\ge 62\%$ sequence identity. This is a nice middle ground and will do for most cases. If you are comparing proteins that are very closely related, you might want to use a matrix based on more similar sequences such as BLOSUM90 (built from sequences with $\ge 90\%$ sequence sequence identity) and for less conserved proteins, you might use something like BLOSUM45 ($\ge45\%$ sequence identity). PAM matrices
{ "domain": "biology.stackexchange", "id": 5913, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bioinformatics, computational-model, blast", "url": null }
java, object-oriented, design-patterns, text-editor private void clearRedo() { while (!redo.isEmpty()) { redo.pop(); } } } package com.onedirect.oodesign.textpad; import java.util.Scanner; public class TextPadDriver { public static void main(String[] args) { TextPad textPad = new TextPad(); Scanner in = new Scanner(System.in); while (true) { System.out.println("Please enter I to insert," + " D to delete, C to copy , P to paste, " + "U to undo, R to redo, S to show, another to end"); String c = in.next(); switch (c) { case "I" : System.out.println("Give Line Number"); Integer n = in.nextInt(); System.out.println("Give Text"); String text = in.next(); textPad.insert(n, text); break;
{ "domain": "codereview.stackexchange", "id": 33879, "lm_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, object-oriented, design-patterns, text-editor", "url": null }
• Each of $X$ and $Y$ is dependent on $Z$ but they are still independent of each other. The question is a little unclear about whether this is the kind of relationship being sought. – David K Aug 22 '16 at 20:13 • My interpretation of the question was find a random variable $Z$ such that $X$ and $Y$ are no longer independent under the probability law obtained by conditioning on an event in $\sigma(Z)$. – carmichael561 Aug 22 '16 at 20:16 • That's a plausible interpretation. I'm just not sure what the question is asking. (There's also still the question, what is the intuition behind this?) – David K Aug 22 '16 at 20:18 Yes. Consider The result of two independent Coin. Conditioning on sum of results Works!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534327754852, "lm_q1q2_score": 0.8024112740286344, "lm_q2_score": 0.8175744739711883, "openwebmath_perplexity": 301.17946961819047, "openwebmath_score": 0.7049826979637146, "tags": null, "url": "https://math.stackexchange.com/questions/1900375/is-it-possible-that-two-independent-variables-become-dependent-conditioning-on-a" }
quantum-mechanics, terminology, potential, hamiltonian, interactions Title: What is an "Interaction Hamiltonian" I'm an undergraduate reading up on some quantum physics so that I can help out more in the lab that I'm working in this summer. In the book I'm reading (Shankar's "Principles of Quantum Mechanics") I just came across the term interaction Hamiltonian in describing how orbiting electrons interact with a magnetic field. I have an idea of what it might mean, but I can't find a good explanation anywhere. What is an "interaction Hamiltonian", and how does it differ from a standard Hamiltonian? Any Hamiltonian contains kinetic and potential parts. Interaction means the potential part of the Hamiltonian. Sometimes a part of interaction can be treated exactly together with the kinetic part. They form an approximative or "non perturbed" Hamiltonian. The rest of interaction is then treated perturbatively and is called "a perturbation". Interaction of the atomic electron with an external magnetic field is such part of the total Hamiltonian.
{ "domain": "physics.stackexchange", "id": 14426, "lm_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, terminology, potential, hamiltonian, interactions", "url": null }
c#, design-patterns, console, dependency-injection, integration-testing Assert.AreEqual(0, exitCode); Assert.AreEqual(1, TestAlert.GetReports("single-test.json").Count); } } internal class TestModule : Autofac.Module { public TestFileSystem FileSystem { get; set; } protected override void Load(ContainerBuilder builder) { builder .RegisterType<TestAlert>(); builder .RegisterType<TestPathResolver>() .As<IPathResolver>(); builder .RegisterInstance(FileSystem) .As<IFileSystem>(); } } internal class TestFileSystem : IFileSystem { public List<string> Files { get; } = new List<string>();
{ "domain": "codereview.stackexchange", "id": 26176, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, design-patterns, console, dependency-injection, integration-testing", "url": null }
>>> # chips 2, 3, 4, 5 are good >>> chip_table = [[True, True, False, False, False, False], ... [True, True, False, False, False, False], ... [False, False, True, True, True, True], ... [False, False, True, True, True, True], ... [False, False, True, True, True, True], ... [False, False, True, True, True, True]] >>> get_a_good_chip(chip_table, [0, 1, 2, 3, 4, 5]) 2 #### Problem 4-5c Once one good chip is found, it suffices to test all chips against the good chip to identify all good chips. This takes $\Theta(n)$ pairwise tests and can be implemented as follows: def get_all_good_chips(chip_table): n = len(chip_table) testing = get_a_good_chip(chip_table, range(n)) good_chips = [tested for tested in range(n) if chip_table[testing][tested]] return good_chips
{ "domain": "markhkim.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.962673113726775, "lm_q1q2_score": 0.8655599823803488, "lm_q2_score": 0.8991213840277783, "openwebmath_perplexity": 732.0085319858442, "openwebmath_score": 0.9267470836639404, "tags": null, "url": "https://markhkim.com/clrs/ch04/" }
$$\mathbb{P}(\text{Increasing Function}) = \frac{n!}{m!(n-m)! \cdot n^m}.$$ Taking a first-order Stirling approximation for large $n$ gives $\mathbb{P}(\text{Increasing Function}) \approx 1/m!$, which is a very crude estimate that is suitable when $n$ is substantially larger than $m$. So basically, we see that once the co-domain in this problem is large, the probability of getting an increasing sequence at random is small; this accords with intuition. $^\dagger$ If $m=1$ then we have only a single value in the mapping and every mapping to any of the $n$ places gives an increasing map. We therefore have $S(n,1)=n$ for all $n \in \mathbb{N}$. Moreover, the number of sub-arrays $S(n+1,m)$ includes all sub-arrays where the values occurs in the first $n$ places (there are $S(n,m)$ of these) and all the sub-arrays where the last value occurs in the last place and the remaining values occur before this (there are $S(n,m-1)$ of these).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846659768266, "lm_q1q2_score": 0.8429157663039019, "lm_q2_score": 0.86153820232079, "openwebmath_perplexity": 105.12672737503156, "openwebmath_score": 0.9371325969696045, "tags": null, "url": "https://stats.stackexchange.com/questions/348726/how-can-we-calculate-the-probability-that-the-randomly-chosen-function-will-be-s/348738" }
java, beginner, game, formatting, number-guessing-game } /** * Takes in the user's guess, validates it, and tells them when they win */ public static void userGuess() { // Prompts user for guess and ensures it's an integer do { userGuess = 0; try { userGuess = Integer.parseInt(JOptionPane.showInputDialog("Guess a number between 1 and " + max + ": ")); } catch (NumberFormatException e){} // Ensures user's guess is an integer greater than 0 and less than max while (userGuess > max || userGuess < 1) { try { userGuess = Integer.parseInt(JOptionPane.showInputDialog(null, "Your guess must be between 1 and " + max)); } catch (NumberFormatException e) {} } userWinLose(); } while (userGuess != objective); }
{ "domain": "codereview.stackexchange", "id": 5702, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, game, formatting, number-guessing-game", "url": null }
genomics, scaffold -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/blocks_coords.txt -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/circos -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/circos/circos.conf -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/circos/circos.highlight.txt -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/circos/circos.highlight1.txt -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/circos/circos.highlight2.txt -- Installing: /Users/cr517/Documents/phd/project/sibelia-build/share/Sibelia/doc/examples/Sibelia/Helicobacter_pylori/circos/circos.highlight3.txt
{ "domain": "bioinformatics.stackexchange", "id": 253, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genomics, scaffold", "url": null }
homework-and-exercises, electrostatics, potential The method is explained in many classic textbooks like Griffith’s Introduction to Electrodynamics (Sec. 3.3, 4th edition) or Jackson’s Classical Electrodynamics (Sec. 2.10). Hope this helps.
{ "domain": "physics.stackexchange", "id": 94209, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electrostatics, potential", "url": null }
math, probability-distribution, expectation $p(1) = \frac{2}{3}$ $p(0) = \frac{1}{3}$ In this case, we actually wouldn't have to estimate anything by sampling; the exact probabilities are known, so we could just compute the expected value as $p(1) \times 1 + p(0) \times 0 = \frac{2}{3}$. But now suppose that we do not know exactly how the coin is weighted, i.e. we do not know the exact values of $p(1)$ and $p(0)$. If we simply flip our weighted coin $N = 100$ times, we will in expectation find about $67$ samples of $x_n = 1$, and about $33$ samples of $x_n = 0$ (rounded to integers because we can't obtain a non-integer number of observations). So we cannot explicitly use the probabilities (because we do not know them), but they will implicitly be present in the number of repeated observations we have for every possible datapoint.
{ "domain": "ai.stackexchange", "id": 1272, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "math, probability-distribution, expectation", "url": null }
standard-model, spinors, chirality, helicity Massive spinors don't have an intrinsic chirality (since they are not eigenstates of chirality operator), the only information I have is about helicity, and the odd thing I described before is actually observed (really odd to me). Massive particles have an intrinsic chirality, but I don't see how the chirality information gets encoded into the Dirac spinor / how the weak interaction couples to only half of it. To me it seems that only the helicity information is carried by a spinor. You are correct that for a massive spinor, helicity is not Lorentz invariant. For a massless spinor, helicity is Lorentz invariant and coincides with chirality. Chirality is always Lorentz invariant.
{ "domain": "physics.stackexchange", "id": 12983, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "standard-model, spinors, chirality, helicity", "url": null }
neural-network However, I'm trying to wrap my head around if this is possible to be done with string inputs? The use-case I've got is a "recommendation engine" for movies a user has watched. Movies have lots of string data (title, plot, tags), and I could imagine "downsampling" the text down to a few key words that describe that movie, but even if I parse out the top five words that describe this movie, I think I'd need input neurons for every english word in order to compare a set of movies? I could limit the input neurons just to the words used in the set, but then could it grow/learn by adding new movies (user watches a new movie, with new words)? Most of the libraries I've seen don't allow adding new neurons after the system has been trained?
{ "domain": "datascience.stackexchange", "id": 1969, "lm_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-network", "url": null }
.net, functional-programming, f# { battle with combatantGroups = transformGroups battle.combatantGroups } Can you please give me advise on how can I use features of F# and functional programming, to make given code more pretty and concise? I think you need an id field to be sure that you're updating the correct combatant. I assume it's possible to have multiple combatants with the same hp and attack. And in that case it makes sense to store a group as a Map of id to combatant. This makes it really simple to update a value by id and there's no need to check for existence first. See the tryUpdateCombatantById function below. You can add small helper functions to update specific record fields with a function that is passed in. Here's the code with all of those changes: type Combatant = { id : int hp : int attack : int } type Battle = { combatantGroups : Map<int, Combatant> list } let updateHp f combatant = { combatant with hp = f combatant.hp } let removeHp attack = updateHp (fun hp -> hp - attack)
{ "domain": "codereview.stackexchange", "id": 34089, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": ".net, functional-programming, f#", "url": null }
haskell, recursion I'm not very pleased that I have to repeat explicitly add the negated formula at this point and deal with the returned world possibly being Nothing here, maybe there's a nicer way to do this. The satisfiable function recursively calls itself and tries to evaluate all formulas in the world until it encounters an inconsistent world. The implementation of this function might be a bit complex and possibly should have been split up more or written on more lines. General concerns
{ "domain": "codereview.stackexchange", "id": 28494, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell, recursion", "url": null }
interferometry, vlbi However, even if you could "tape" the data, there are many other problems to be overcome. These difficulties mostly relate to the coherence length and coherence time of phase changes introduced in the atmosphere above each telescope and the inability to use phase-reference sources as a result; and the inability to use phase-closure techniques unless the sources are very bright. These difficulties are explained in more detail in https://astronomy.stackexchange.com/a/35215/2531
{ "domain": "astronomy.stackexchange", "id": 5559, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "interferometry, vlbi", "url": null }
inorganic-chemistry, ionic-compounds, covalent-compounds, atomic-radius When you have smaller atoms in a compound such as NaF, you sure have similar size but their outermost shell are different from HgCl2. Sodium has low electronegativity and fluorine has a large energy gain when receive an electron. Also is good to remember that in NaF you have ions, differently from compounds with covalent character. Electronegativity for the cited atoms:
{ "domain": "chemistry.stackexchange", "id": 16926, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, ionic-compounds, covalent-compounds, atomic-radius", "url": null }
v = ˙rur +rθ˙uθ + ˙zk a = (¨r −rθ˙2)ur +(rθ¨+ 2˙rθ˙)uθ + ¨zk. 03 Find the velocity and acceleration in cylindrical polar coordinates for a particle travelling along the helix x t y t z t 3cos2 , 3sin2 ,. Shear stress is a function of velocity and viscosity, so once you have the shear stress, you will be able to get your velocity. com [email protected] When we switch to the Eulerian reference, the velocity becomes a function of position, which, implicitly, is a function of time as well as viewed from the. The equation of continuity for cylindrical coordinates (r,θ,z) is given by (Bird et al. where U = the maximum velocity at a cross section of the duct, r = the radial coordinate measured from the duct centerline, and R = the duct radius. The velocity profile is dependent on the coordinates and boundary conditions set for fluid flow. The radial component of the convective derivative is non-zero due to centrifugal forces. Any help is greatly appreciated, Cheers. All of them, except for
{ "domain": "daisytale.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9891815519849906, "lm_q1q2_score": 0.8177680555031247, "lm_q2_score": 0.8267117940706734, "openwebmath_perplexity": 603.2376859278611, "openwebmath_score": 0.8972199559211731, "tags": null, "url": "http://daisytale.it/qiyn/velocity-in-cylindrical-coordinates.html" }
gravity, titan Title: Why does Titan have lower surface gravity than the Moon when Titan is more massive? Reading on Wikipedia I saw that Titan is 80% more massive than the earth's moon but has only 85% the surface gravity. Why is this? Surface gravitational acceleration on an object with mass $M$ and radius $R$ is given by $$ g = \frac{GM}{R^2} \propto G\rho R $$ where $\rho \propto M/R^3$ is the density of the object. If one body has smaller surface $g$ than another, it must have smaller density $\rho$, smaller radius $R$, or both. Titan is larger than Earth's Moon, so your observation about its surface gravity means Titan must be less dense than the Moon. Wikipedia confirms: $R_\text{Titan} = 1.5 R_\text{Moon}$, but $\rho_\text{Moon} = 3.34\rm\,g/cm^3$ while Titan has only $\rho_\text{Titan} = 1.88\rm\,g/cm^3$.
{ "domain": "astronomy.stackexchange", "id": 1529, "lm_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, titan", "url": null }
machine-learning, deep-learning, machine-learning-model, binary Title: Can you choose a binary feature matrix for a binary classification model This may be a stupid, but, I am new to deep learning (and machine learning for that matter) and I can't seem to find any literature to help with my question. All I can see when Googling many different questions (trying to change keywords to try get a hit on my question) is about binary classification. And also, binary classification where the feature matrix consists of real numbers. I would like to know, is it possible to build a binary classifier with a binary feature matrix? And please can you point me to some literature. I'm not aware of any literature specific to the case of classification based on binary features since it's just a subset of the general case, but it's definitely possible.
{ "domain": "datascience.stackexchange", "id": 9466, "lm_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, deep-learning, machine-learning-model, binary", "url": null }
homework-and-exercises, astrophysics, neutrinos, estimation, neutron-stars I think there are then two things going on here. First, the cross-sections for neutrino interactions are energy dependent and decrease rapidly with neutrino energy as the neutron star cools. Secondly, neutrinos can only interact with a particle if they can give the particle some of their energy (scattering) or if they can create new particles (e.g. inverse beta decay), but this is difficult if all the available energy and momentum states for particles are full, as in the case of degenerate fermion gases. Essentially, only particles within $\sim kT$ of the Fermi energy are able to participate, which is a very small fraction in a highly degenerate gas where $E_F \gg kT$ by definition. Hence the rates are even lower than the already low interaction rates between neutrinos and baryons/leptons.
{ "domain": "physics.stackexchange", "id": 33678, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, astrophysics, neutrinos, estimation, neutron-stars", "url": null }
java, performance try(Scanner in = new Scanner(System.in)) { first = in.nextInt(); second = in.nextInt(); } As for the actual logic of your code, You can use the Euclidean algorithm // Greatest Common Denominator public int computeGCD(int a, int b) { return b == 0 ? a : computeGCD(b, a % b); }
{ "domain": "codereview.stackexchange", "id": 13086, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance", "url": null }
astrophysics Title: Distance to objects When we read that, for instance, M31 is 2.54 ± 0.11 Mly (778 ± 33 kpc) away from us, does this distance estimate take into account the travel time of the light we observe? In other words, what is the "timestamp" on the distance estimate? Does it actually reflect how far away M31 is now? It represents the distance when light measured was emitted. That is the conventional way that the distance to anything is defined isn't it. To do anything else requires a very accurate knowledge of what will happen to an object in its future. You could in principle do that, if you have very good measurements of an object's velocity and know all the forces acting upon it) but it doesn't make much difference unless something is travelling at a fair fraction of the speed of light (and M31 isn't).
{ "domain": "astronomy.stackexchange", "id": 3361, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics", "url": null }
ros, navigation, base-global-planner, base-local-planner Title: the way to check which planner is selected This question has relation to my former question ( http://answers.ros.org/question/152196/about-a-way-to-change-default-global-planner/ ). I want to confirm which planner is selected. I selected the eband_local_planner and carrot_planner in Rviz and added the definition of eband_local_planner param name="base_local_planner" value="eband_local_planner/EBandPlannerROS" and param name="base_global_planner" value="carrot_planner/CarrotPlanner"to move_base.launch.xml , but following is displayed on a terminal. ken@ken:~$ rostopic echo /move_base/parameter_descriptions
{ "domain": "robotics.stackexchange", "id": 17650, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, navigation, base-global-planner, base-local-planner", "url": null }