text
stringlengths
1
1.11k
source
dict
organic-chemistry, reaction-mechanism, stereochemistry, stereoselectivity, enolate-chemistry Francis A. Carey and Richard J Sundberg, In Advanced Organic Chemistry, Part B: Reactions and Synthesis; Fourth Edition, Kluwer Academic Publishers: New York, NY, 2002 (ISBN: 0-306-46244-3). Sergi Figueras, Ricardo Martín, Pedro Romea, Fèlix Urpí, Jaume Vilarrasa, "Highly stereoselective aldol reactions of titanium enolates from ethyl α-silyloxyalkyl ketones," Tetrahedron Lett. 1997, 38(9), 1637-1640 (DOI: https://doi.org/10.1016/S0040-4039(97)00108-1). Note that according to Ref.2, the meaning of the non-chelated- and chelated-transition states mentioned here is the five-membered chelation within enolate $\ce{O}$, $\ce{OR'}$, and the metal ion. In all three transition states, the six-membered transition chelation exists. S. D. Kahn, G. E. Keck, W. J. Hehre, "The Effect of Protecting Groups on Chelation Control," Tetrahedron Lett. 1987, 28(3), 279-280 (DOI: https://doi.org/10.1016/S0040-4039(00)95706-X).
{ "domain": "chemistry.stackexchange", "id": 15892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, reaction-mechanism, stereochemistry, stereoselectivity, enolate-chemistry", "url": null }
quantum-mechanics, quantum-field-theory, operators, commutator When you consider the bound state problem of QM, a boundary condition quantize the energy. This is one thing that is true, and all the same thing happens in QFT, for example, when you consider the quantum photons between two conductors (it is well-known as the Casimir effect). But in this case, what is discretized is the energy which appears on the exponential, not the quantized field itself. Let us write this more explicitly. If we consider the photon without boundary, we will obtain following mode expansion: $$A^\mu(x)=\sum_\lambda \int\frac{d^4p}{(2\pi)^4}\Big(\epsilon^\mu_\lambda\ a(p,\lambda)\ e^{ikx}+h.c.\Big).$$
{ "domain": "physics.stackexchange", "id": 94400, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-field-theory, operators, commutator", "url": null }
homework-and-exercises, newtonian-mechanics, acceleration, free-body-diagram, string Title: Acceleration in an Atwood's Machine Is the acceleration magnitude of two objects in an Atwood's Machine always the same? Or does the machine need to have a massless, frictionless pulley and massless string? What would be a proof of this? Here, whether the pulley is massless or frictionless doesn't matter. What actually matters is the type of rope that you you use. If the rope is inextensible, then its length must remain the same and for that to happen, the 2 objects must have the same acceleration. If the rope is flexible, its length can change, and so it is possible that the 2 objects have different accelerations.
{ "domain": "physics.stackexchange", "id": 73765, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, acceleration, free-body-diagram, string", "url": null }
ros, slam, coordinate-system Originally posted by Stefan Kohlbrecher with karma: 24361 on 2014-05-06 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by aviprobo on 2014-05-06: Thanks Stefan! Now, once I have acquired the translation from map to robot pose estimate, if I want to send a goal to the map (map co-ordinates), how am I able to translate from metric back to grid? Do I still use tf to perform the translation from metric to grid or is there another way? Comment by Stefan Kohlbrecher on 2014-05-07: Navigation happens in a metric map frame when using the ROS navigation stack. You normally do not care about the grid (e.g. pixel) coordinates of the underlying occupancy grid map (unless you want to do lower level things like SLAM or query the map data directly).
{ "domain": "robotics.stackexchange", "id": 17853, "lm_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, slam, coordinate-system", "url": null }
electromagnetism, conductors Title: Does the electric displacement field account for free charges? I'm trying to understand the electric displacement field $\mathbf{D}$ for a lossy material with conductivity $\sigma$ and permittivity $\epsilon$. Most textbooks I've looked at only consider perfect dielectrics when discussing $\mathbf{D}$. However, the first two sentences of the Wikipedia article on $\mathbf{D}$ state In physics, the electric displacement field (denoted by D) or electric induction is a vector field that appears in Maxwell's equations. It accounts for the effects of free and bound charge within materials.
{ "domain": "physics.stackexchange", "id": 73323, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, conductors", "url": null }
thermodynamics, temperature, everyday-life, home-experiment You can also drop both together and wait until sugar dissolves in the colder beverage. I think this is exactly the flipped order scenario. The milk, dropped into the hotter tea, causes more degrees to drop immediately because, say, when it is as cold as milk, the milk won't cool it down at all. I think that this is because you have an average energy between two masses, of tea and milk. Temperature is proportional to the energy, $$T_\textrm{mixed} = {MT_M + mT_m\over M+m}= {kmT_M+mT_m \over km+m}= {kT_M + T_m\over k+1}.$$
{ "domain": "physics.stackexchange", "id": 30193, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, everyday-life, home-experiment", "url": null }
sql, database, join Title: Query using cross join or inner join Please consider the following three tables that I am playing with in the image below: I want to come up with a SQL Query which shows first_name, last_name, and the total amount of all orders for customer_id 12345 Here is what I have come up with: SELECT C.first_name , C.last_name, SUM(O.total_price) AS TotalAmount FROM Customer C , Order O WHERE C.customer_id = O.customer_id AND C.customer_id = 12345; Does my query look good? If yes, then should I be using Inner Join instead of Cross Join from an efficiency point of view? Your query looks OK, for the most part. There are two things you could do better.
{ "domain": "codereview.stackexchange", "id": 12445, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, database, join", "url": null }
- Okay, let's see what's given: $P(\text{recovered} \mid \text{vaccine}) = \frac{1}{5} = 0.2$ $P(\text{recovered} \mid \text{no-vaccine}) = \frac{1}{20} = 0.05$ $P(\text{vaccine} ) = 0.7$ $P(\text{no-vaccine} ) = 0.3$ $P(\text{vaccine} \mid \text{recovered} ) = ?$ The Bayes rule is: $P(\text{vaccine} \mid \text{recovered} ) = \frac{P(\text{recovered} \mid \text{vaccine}) \times P(\text{vaccine} )}{P(\text{recovered} )}$ $$= \frac{0.2 \times 0.7}{P(\text{recovered} )}$$ where $P(\text{recovered} ) = P(\text{rec} \mid \text{vac}) \times P(\text{vac} ) + P(\text{rec} \mid \text{no-vac}) \times P(\text{no-vac} ) \\ = 0.2 \times 0.7 + 0.05 \times 0.3 = 0.155$ plugin it back into the equation $$= \frac{0.2 \times 0.7}{P(\text{recovered} )} \\ = \frac{0.2 \times 0.7}{0.155}\\ \approx 90.3\%$$ Which is exactly what you got. Hm, I am curious. Have you had a chance to talk to your teacher/prof about that? -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658905, "lm_q1q2_score": 0.8334024675061261, "lm_q2_score": 0.8479677660619634, "openwebmath_perplexity": 823.6079719737605, "openwebmath_score": 0.8906112909317017, "tags": null, "url": "http://math.stackexchange.com/questions/800925/probability-question-probably-bayes-rule-and-total-probability-theorem" }
c++, beginner, algorithm, programming-challenge, c++17 if (hash_map.find(curr) == hash_map.end()) { hash_map[curr] = std::vector<int>(1, -~index - length); } else { for (const auto iter : hash_map[curr]) { if (std::strcmp((base.substr(iter, length)).data(), base.substr(-~index - length, length).data()) == 0) { return base.substr(iter, length); } } hash_map[curr].push_back(-~index - length); } } return ""; }
{ "domain": "codereview.stackexchange", "id": 38599, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, algorithm, programming-challenge, c++17", "url": null }
c++, macros commandLine.assign(ReadRemoteUnicodeString(hProc, procParameters.CommandLine)); mainModulePath.assign(ReadRemoteUnicodeString(hProc, procParameters.ImagePathName)); PEB_LDR_DATA ldrData; rpmError = ReadProcessMemory(hProc, peb.Ldr, static_cast<void *>(&ldrData), sizeof(PEB_LDR_DATA), 0); if (rpmError == 0) { THROW_LAST_WINDOWS_ERROR(); }
{ "domain": "codereview.stackexchange", "id": 27, "lm_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++, macros", "url": null }
database, gene, conversion Title: Converting gene names from one public database format to another This is a question from /u/apivan19 on reddit. The original post can be found here. I have some proteomics data that was given to me with the UniProt gene identifiers in column 1. I've been trying to convert these to normal gene symbols using various programs, but it is proving to be difficult. The Uniprot website does it fairly decently, but it is not able to convert all of them and then adds some unknown genes into my list. For example, I will give it 5439 genes in UniProt notation, and will say "5420 of 5439 UniProt identifiers have been converted to 5450 gene symbols"... which is ridiculous. I tried using David to change the symbols, but it returns them to me in some ridiculous, random order and there's no way I can sort... actually there might be but it'll take a second.
{ "domain": "bioinformatics.stackexchange", "id": 152, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "database, gene, conversion", "url": null }
magnetic-fields, magnetic-monopoles $$ \mathbf B=\frac{\mu_0/4\pi}{r^3}\left(3({\mathbf m}\cdot\hat{\mathbf r})\hat{\mathbf r}-{\mathbf m}\right), $$ which needs to be equivalent under the identification $\mathbf m=q_\mathrm{m} d\:\hat{\mathbf u}$, and this completely fixes the magnetic-field constant at $$ k_1=\frac{\mu_0}{4\pi}, $$ i.e. $$ \mathbf B=\frac{\mu_0}{4\pi}\frac{q_\mathrm{m}}{r^2}\hat{\mathbf r} $$ for a point magnetic monopole of magnetic charge $q_\mathrm{m}$. Similarly, this fixes the magnetic Gauss law to the naive $$ \nabla\cdot\mathbf B=\mu_0\rho_\mathrm m $$ (where $\rho_\mathrm m$ is of course the volumetric density of magnetic charge).
{ "domain": "physics.stackexchange", "id": 34145, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetic-fields, magnetic-monopoles", "url": null }
performance, comparative-review, graph, clojure, bitwise Here's my revised tonnetz-connected?, which is essentially the same as yours: (defn tonnetz-connected? "is the subgraph of the chord in the tonnetz graph connected?" [^long chord] (let [chord (int chord)] (loop [found (Integer/lowestOneBit chord) unmatched chord] (or (zero? unmatched) (let [newly-found (bit-and found unmatched)] (and (not (zero? newly-found)) (recur (bit-or found (get-tonnetz-connected newly-found)) (bit-and-not unmatched newly-found)))))))) What is it doing? It conducts a breadth-first search of the chord's subgraph of the tonnetz graph, starting at an arbitrary note (in fact, the lowest one) of the chord. It keeps track of the found notes and of the unmatched ones: those yet to be found. It terminates when there are no unmatched notes , returning true; otherwise when there are no newly-found notes, returning false. I've improved the algorithm a little, by
{ "domain": "codereview.stackexchange", "id": 26963, "lm_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, comparative-review, graph, clojure, bitwise", "url": null }
# Are there primes of every possible number of digits? That is, is it the case that for every natural number $n$, there is a prime number of $n$ digits? Or, is there some $n$ such that no primes of $n$-digits exist? I am wondering this because of this Project Euler problem: https://projecteuler.net/problem=37. I find it very surprising that there are only a finite number of truncatable primes (and even more surprising that there are only 11)! However, I was thinking that result would make total sense if there is an $n$ such that there are no $n$-digit primes, since any $k$-digit truncatable prime implies the existence of at least one $n$-digit prime for every $n\leq k$. If not, does anyone have insight into an intuitive reason why there are finitely many trunctable primes (and such a small number at that)? Thanks!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9905874115238967, "lm_q1q2_score": 0.9013424173683846, "lm_q2_score": 0.9099069974872589, "openwebmath_perplexity": 153.28106886512555, "openwebmath_score": 0.8959529399871826, "tags": null, "url": "https://math.stackexchange.com/questions/1922013/are-there-primes-of-every-possible-number-of-digits/1922015" }
neuroscience, neurophysiology, sensation, hearing, perception Now, all these processes will not affect backward masking, where a short probe stimulus is swamped by a following masker (e.g., Oxenham & Moore (1995). This is caused by more central, higher-level processes that include attention processes, i.e.,
{ "domain": "biology.stackexchange", "id": 8425, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, neurophysiology, sensation, hearing, perception", "url": null }
measurement, information-theory, entropy In quantum information theory, the accessible information of a quantum system is given by $$\chi := S(\rho) - \sum_{j}P_{j}S(\rho_{j}),$$ where $S$ is the von Neumann entropy of the quantum state. How can we show that if $\rho_{0}^{(AE)}$ is independent of the preparation $k$, that $$\chi^{(AEQ)} = \chi^{(Q)}?$$ Thanks for any assistance. For density matrices $\rho_A$ and $\rho_B$ having eigenvalues $\lambda^{\left(A\right)}$ and $\lambda^{\left(B\right)}$, \begin{align}S\left(\rho_A\otimes\rho_B\right) &= -\rho_A\otimes\rho_B\ln\left(\rho_A\otimes\rho_B\right)\\ &= -\sum_{j, k}\lambda^{\left(A\right)}_j\lambda^{\left(B\right)}_k\ln\left(\lambda^{\left(A\right)}_j\lambda^{\left(B\right)}_k\right)\\ &= -\sum_{j, k}\left[\lambda^{\left(A\right)}_j\lambda^{\left(B\right)}_k\ln\left(\lambda^{\left(A\right)}_j\right) + \lambda^{\left(A\right)}_j\lambda^{\left(B\right)}_k\ln\left(\lambda^{\left(B\right)}_k\right)\right]\\
{ "domain": "quantumcomputing.stackexchange", "id": 137, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "measurement, information-theory, entropy", "url": null }
turtlebot, ros-fuerte, eigen, transform I'd like to get the Eigen2 support modes enabled using the pre-processor #define EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API but putting that at the top of my .cpp files is not working. Does that go somewhere in the CMake or manifest.xml files? Has anyone already gotten the Eigen->TF working with Eigen 3? Thanks! Originally posted by Dave Coleman on ROS Answers with karma: 1396 on 2012-05-08 Post score: 0 Original comments Comment by tfoote on 2012-05-10: Non of these errors appear to be Eigen related. I also suggest that you file a ticket for this so the maintainer will be notified. https://kforge.ros.org/turtlebot/trac/newticket?component=turtlebot_arm&type=defect&&turtlebot_arm I was able to resolve the first two error messages with the following replacement: On line 68 convert: btQuaternion quat = trans.getRotation(); btVector3 origin = trans.getOrigin();
{ "domain": "robotics.stackexchange", "id": 9301, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turtlebot, ros-fuerte, eigen, transform", "url": null }
Exponential and Logarithmic Equations 8.4 – Solving Logarithmic Equations and Inequalities. 1 Exponential Equations of the ormF ka(x+p) = m Exponential equations generally have the unknown ariablev as the power. The following are examples of exponential equations: 2x = 1 2 x 3x+1 = 2 4 3 6 = 7 x +2 (1) ouY should already be familiar with exponential notation. Solving exponential equations is simple, if we remember how to apply the https://en.wikipedia.org/wiki/Lieb%27s_theorem Exponential & Logarithmic Equations This chapter is about using the inverses of exponentials or logarithms to solve equations involving exponentials or logarithms. Solving exponential equations An exponential equation is an equation that has an unknown quantity, usually called x, written somewhere in the exponent of some positive number..
{ "domain": "pestys.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429629196683, "lm_q1q2_score": 0.8084938999721527, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 1601.3583961524498, "openwebmath_score": 0.5527512431144714, "tags": null, "url": "http://pestys.com/misamis-oriental/solving-exponential-equations-and-inequalities-pdf.php" }
quantum-mechanics, thermodynamics Title: Wouldn't the thermodynamic cost of creating alternate universes make the Many Worlds interpretation implausible? I was thinking about the many interpretations of quantum physics, and one thing that never made sense to me was the many world's interpretation. Basically at any given moment for which something exists in a superposition, isn't this interpretation basically saying that there would have to exist a new universe for every possible discrete outcome that could result once the measurement is made? So let's say an electron's location is a superposition of two distinct locations. Doesn't that mean there would at that moment have to be two distinct universes for each distinct location that is superposed? If so, then clearly the amount of universes being spawned every moment must be astronomical.
{ "domain": "physics.stackexchange", "id": 32300, "lm_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, thermodynamics", "url": null }
electromagnetism, magnetic-fields, electric-current, potential, boundary-conditions $$ \bar{B} = \hat{\phi}\times \bar{\nabla}\Phi_1 + \bar{\nabla}\Phi_0 $$ where $$ \Phi_0 = A \cos(kz)K_0(k\rho) \\ \Phi_1 = B \sin(kz)K_1(k\rho) $$ and $K_0(x)$ and $K_1(x)$ are the exponentially decaying modified Bessel functions. Both yield non-zero surface currents $$ \hat{\rho}\times \bar{B} = \hat{\rho}\times (\hat{\phi}\times \bar{\nabla}\Phi_1) + \hat{\rho}\times \bar{\nabla}\Phi_0 \\= \hat{\phi} (\hat{\rho} \cdot\bar{\nabla} \Phi_1) + \hat{\rho}\times \bar{\nabla}\Phi_0 \\= \hat{\phi} \dfrac{\partial \Phi_1}{\partial \rho} - \hat{\phi} \dfrac{\partial \Phi_0}{\partial z} $$ and both satsify $\bar{\nabla}\times \bar{B}=0$ and $\bar{\nabla}\cdot \bar{B}=0$.
{ "domain": "physics.stackexchange", "id": 21905, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, magnetic-fields, electric-current, potential, boundary-conditions", "url": null }
java, unit-testing, connect-four try { connectFourGame.putTokenInColumn(player2Token, 3); printFailingMessageForNotWinningTheGame(player2Token); } catch (GameIsOverException ignored) { } }
{ "domain": "codereview.stackexchange", "id": 27775, "lm_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, unit-testing, connect-four", "url": null }
• That +1 is because you are indexing from one, isn't it? – Pablo Ivan Dec 20 '16 at 18:35 • Which +1 are you referring to? – hypergeometric Dec 20 '16 at 18:39 • r=n+1-j, that one. – Pablo Ivan Dec 20 '16 at 21:36 • @PabloIvan - the number of items from $a$ to $b$ ($b>a)$ inclusive of both $a,b$ is $b+1-a$. – hypergeometric Dec 21 '16 at 2:28 • This is a great algebraic answer (y) – gowrath Dec 21 '16 at 2:55 Note that $i= \sum_{j=1}^i(1)$. Hence, we can write \begin{align} \sum_{i=1}^n i^2&=\sum_{i=1}^n i\sum_{j=1}^i(1)\\\\ &=\sum_{j=1}^n \sum_{i=j}^n i\,\,\dots\text{changing the order of summation}\\\\ &=\sum_{j=n}^1 \sum_{i=j}^n i \,\,\dots\text{reversing the order of the exterior summation}\\\\ &=n+(n+(n-1))+(n+(n-1)+(n-2))+\cdots+\sum_{i=1}^n i \end{align} as was to be shown!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9546474246069458, "lm_q1q2_score": 0.8151856068952661, "lm_q2_score": 0.8539127492339909, "openwebmath_perplexity": 482.81324595668923, "openwebmath_score": 0.889638364315033, "tags": null, "url": "https://math.stackexchange.com/questions/2065066/formal-notation-of-the-sum-of-the-first-n-squares" }
gazebo, drcsim, groovy Title: Install DRC Sim on Ubuntu 12.04 + Groovy Hi! I have installed ROS Groovy on Ubuntu 12.04 and I want to install DRCSim without installing fuerte. Is there a way of do this? If so, Where can I find some instructions for doing it? Thanks, Gustavo. EDIT Error message after installation, changing 'fuerte' for 'groovy' and cloning repos: auto-starting new master process[master]: started with pid [17411] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 895d6d12-c6d0-11e2-bc6b-001e65d8adfa process[rosout-1]: started with pid [17424] started core service [/rosout] process[gazebo-2]: started with pid [17438] Gazebo multi-robot simulator, version 1.8.1 Copyright (C) 2013 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org process[atlas_robot_state_publisher-3]: started with pid [17444] Gazebo multi-robot simulator, version 1.8.1 Copyright (C) 2013 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org
{ "domain": "robotics.stackexchange", "id": 3314, "lm_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, drcsim, groovy", "url": null }
# Mod of numbers with large exponents I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two: • $13^{100} \bmod 7$ • $7^{100} \bmod 13$ I've also heard of this formula: $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n$$ But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?) Any hints or pointers in the right direction would be great.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303434461162, "lm_q1q2_score": 0.8734538842401021, "lm_q2_score": 0.882427872638409, "openwebmath_perplexity": 513.835971277717, "openwebmath_score": 0.9354007840156555, "tags": null, "url": "https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents" }
complexity-theory, time-complexity In your second formulation, you're asking whether the language $L=\{(\langle M \rangle,w)| \text{$M$ halts on $w$ within $2^{|w|} steps$}\}$ is decidable in polynomial time? The answer is no, since $L$ is hard (under polynomial time reductions) for the class $\mathsf{DTIME\left(2^n\right)}$. This means that if $L\in P$ then $\mathsf{P=DTIME\left(2^n\right)}$, contradicting the time hierarchy theorem.
{ "domain": "cs.stackexchange", "id": 10133, "lm_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, time-complexity", "url": null }
python, cython, compiler Title: Cyther: The Cross Platform Cython/Python Compiler The newer version of this question is located here: Cyther: The Cross Platform Cython/Python Compiler (Take 2) I am currently writing a Python library (soon to be published)that automatically compiles a Cython/Python file to pure -O3 C, without the user having to do anything other than: C:\Project_dir\> cyther example.pyx C:\Project_dir\> cyther example.py from cyther import main main('example.pyx')
{ "domain": "codereview.stackexchange", "id": 19218, "lm_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, cython, compiler", "url": null }
java, strings, parsing, integer, comparative-review } public static void print_digits(int num){ int digit = 0 ; while(num != 0 ){ digit = num%10 ; System.out.print(digit + "\t") ; num = num/ 10 ; } } public static void main(String args[]){ print_digits2(7658) ; System.out.println("--------------------------") ; print_digits3(7658) ; } } How can I rewrite the print_digits2? I want a more efficient MATH method of doing - no converting to string \ char[]. Admonition about sloppiness These functions all "work", but the workmanship is clearly sloppy in many ways.
{ "domain": "codereview.stackexchange", "id": 7664, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, strings, parsing, integer, comparative-review", "url": null }
javascript, react.js </div> } <div className={`label-container-${showFilter ? 'with-filter' : 'without-filter'}`}> <p className='dropdown__floatingLabel'>{availableLabel}</p> <p className='dropdown__floatingLabel'>{selectedLabel}</p> </div> <div className='options-container'> <div className='available-options'> {availableOptions.map((option, key) => row(option, key, true))} </div>
{ "domain": "codereview.stackexchange", "id": 38253, "lm_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, react.js", "url": null }
machine-learning, machine-learning-model, training, model-selection, generative-models Title: Assess the goodness of a ML generative model (text) Take a RNN network fed with Shakespeare and generating Shakespeare-like text. Once a model seems mathematically fine, as can be assessed by observing its loss and accuracy over training epochs, how can one assess and refine the goodness of the result ? Only human eyes can judge of the readable character of a text, its creativity, its grammatical correctness etc. QUESTION : Which systematic approach can be used to refine a generative model (text) ? The answer is in the question :) Only human eyes can judge of the readable character of a text, its creativity, its grammatical correctness etc.
{ "domain": "datascience.stackexchange", "id": 10066, "lm_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, machine-learning-model, training, model-selection, generative-models", "url": null }
homework-and-exercises, heat, convection Title: What happens to pipe outlet temperature here? I have a fluid flowing through a pipe in the ocean and there is heat transfer from the ocean to the fluid in the pipe. I prepared a simulation and the results show that if I increase the mass flow rate of the fluid through the pipe then the heat transfer rate to the fluid increases and the outlet temperature increases.
{ "domain": "physics.stackexchange", "id": 7303, "lm_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, heat, convection", "url": null }
ros, moveit, ros-industrial, transmission, universal-robot [ INFO] [1418585538.169698380, 4.353000000]: Loading gazebo_ros_control plugin [ INFO] [1418585538.170219815, 4.353000000]: Starting gazebo_ros_control plugin in namespace: / [ INFO] [1418585538.172550559, 4.353000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server. [ERROR] [1418585538.277281754, 4.353000000]: No valid hardware interface element found in joint 'shoulder_pan_joint'. [ERROR] [1418585538.278313449, 4.353000000]: Failed to load joints for transmission 'shoulder_pan_trans'. [ERROR] [1418585538.279196313, 4.353000000]: No valid hardware interface element found in joint 'shoulder_lift_joint'. [ERROR] [1418585538.279989430, 4.353000000]: Failed to load joints for transmission 'shoulder_lift_trans'. [ERROR] [1418585538.280931031, 4.353000000]: No valid hardware interface element found in joint 'elbow_joint'. [ERROR] [1418585538.281650396, 4.353000000]: Failed to load joints for transmission 'elbow_trans'.
{ "domain": "robotics.stackexchange", "id": 20332, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, ros-industrial, transmission, universal-robot", "url": null }
c++, beginner // freqOffset as the pass through data. NTSTATUS nt = RhInjectLibrary( processId, // The process to inject into 0, // ThreadId to wake up upon injection EASYHOOK_INJECT_DEFAULT, dllToInject32, // 32-bit dllToInject64, // 64-bit NULL, // data to send to injected DLL entry point 0 // size of data to send ); if (nt != 0) { printf("RhInjectLibrary failed with error code = %d\n", nt); PWCHAR err = RtlGetLastErrorString(); std::wcout << err << "\n"; get_exit_input(); return 1; } else { std::wcout << L"Library injected successfully.\n"; } get_exit_input(); return 0; } // finding part of path which shows file name int file_name_index = -1; // increases to 0 and checks entire path if no slash is found for (int i = 0; path[i] != '\0'; i++) { if (path[i] == '/') { file_name_index = i; } }
{ "domain": "codereview.stackexchange", "id": 41438, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner", "url": null }
java, unit-testing, file-system The class to track duplicates: /** * Track objects that are considered duplicates. * (Completely unrelated to logical equality by .equals, or identity by ==) * * @param <T> */ public class DuplicateTracker<T> { private final Map<T, Set<T>> pools = new HashMap<>(); public void add(T item1, T item2) { Set<T> pool1 = pools.get(item1); Set<T> pool2 = pools.get(item2);
{ "domain": "codereview.stackexchange", "id": 44978, "lm_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, unit-testing, file-system", "url": null }
sql, t-sql ) select * from sys.tables inner join MyTables on object_id = Tab where ColCount = (select count(*) from FindColumns) Note how this is really just a re-expression of your second query using Common Table Expressions I put that query together on the Stack Exchange data explorer as an example using a couple of different column names.... you can see it working there.
{ "domain": "codereview.stackexchange", "id": 15091, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, t-sql", "url": null }
java, swing public double calculateDistY(Body other) { double y1 = this.getY(); double y2 = other.getY(); return Math.sqrt(Math.pow(y2 - y1, 2)); } public static double calculateDistance(double dist_x, double dist_y) { return Math.sqrt(Math.pow(dist_x, 2) + Math.pow(dist_y, 2)); } Finally, the method that calculates gravitational force: public void interact(Body other) { double x = calculateDistX(other); double y = calculateDistY(other); double r = calculateDistance(x, y); double force = (this.getMass() * other.getMass()) / Math.pow(r, 2); double force_x = force * (x / r); // force * cos double force_y = force * (y / r); // force * sin /* calculate accelerations for both bodies, set vector orientation */ if (other.getX() > this.getX()) { this.setAx(force_x / this.getMass()); other.setAx(-force_x / other.getMass()); } else { this.setAx(-force_x / this.getMass()); other.setAx(force_x / other.getMass()); }
{ "domain": "codereview.stackexchange", "id": 13355, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, swing", "url": null }
fluid-dynamics Remember that the flow always exits the device at atmospheric pressure so long as it is subsonic, precisely because of the information propagated upstream by unsteady pressure waves. Thus, if reducing the exit area means a higher exit Mach number is required to conserve mass, the total-to-static pressure ratio must increase. A fixed exit static pressure and increased total-to-static pressure ratio demands that the upstream stagnation pressure increase, and so the upstream turbomachinery will be affected. If you are looking to put numbers on things, the isentropic flow function is a useful and straightforward way to determine the massflow rate of a compressible fluid if other of the fluid's basic properties are known. In general, the massflow rate of a fluid through a cross-sectional area $A$ is equal to $\dot{m}=\rho VA$. Now, if the fluid is compressible and the Ideal Gas Law applies, then $\dot{m}=\rho VA=\left(\frac{P}{RT}\right)(M\sqrt{\gamma RT})A=PAM\sqrt{\frac{\gamma}{RT}}$.
{ "domain": "physics.stackexchange", "id": 14961, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics", "url": null }
java, beginner, object-oriented //The current stack has enough room to push the item currentStack().push( item ); } (note that this is not thread-safe) Besides easier to read, it also becomes easier to refactor. For example, if you decide not to use Deque but Stack or your own implementation, it is easier to change. Error handling What happens when an empty SetOfStacks gets a pop()? You should throw a nice exception to make sure that both your SetOfStacks stays consistent and make use the caller gets a nice exception. Variable names int c and int d are not that great for passing on information about what the integer means. Is c capacity? And the initial capacity? Or the maximum capacity? Access modifiers Make sure to apply public, protected and private to make sure you only expose functionality that needs to be exposed, and keep private stuff private. Proposed solution public class StackOfPlates<T> { private Deque<Deque<T>> setOfStacks; private int maxStackCapacity;
{ "domain": "codereview.stackexchange", "id": 25676, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, object-oriented", "url": null }
python, pandas temp_1 = pd.DataFrame(df.groupby(['subject_id','date','hr','val'], sort=False)['t_d'].agg({'cumduration':sum,'freq':'count'}).reset_index()) # here i remove the `hour` component and sum the value duration in same day but different hours (for example `5` was in 12th hour and 13th hour. we sum them) temp_2 = pd.DataFrame(temp_1.groupby(['subject_id','date','val'], sort=False)['cumduration'].agg({'sum_of_cumduration':sum,'freq':'count'}).reset_index()) # Later, I create a mask for `> 1` hr criteria mask = temp_2.groupby(['subject_id','date'])['sum_of_cumduration'].apply(lambda x: x > 1) output_1 = pd.DataFrame(temp_2[mask].groupby(['subject_id','date'])['val'].min()).reset_index() # I check for `< 1 ` hr records here output_2 = pd.DataFrame(temp_2[~mask].groupby(['subject_id','date'])['val'].min()).reset_index() # I finally check for `subject_id` and `date` and then append output = output_1.append(output_2[~output_2['subject_id'].isin(output_1['subject_id'])])
{ "domain": "codereview.stackexchange", "id": 35773, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, pandas", "url": null }
• Yes then we would need to multiply by 2 to account for the two possible permutations of putting these two fruits into the basket (and of course, not divide through by the $3!$ when putting the fruit into basket A). – user504775 Feb 27 at 21:30 • We do care about their order: after allocating the fruit to basket A, there are two choices left for the first fruit to go into basket B and 1 choice for the last fruit, if that's what you meant? Alternatively, you could start with basket B: there are 5 choices for the first fruit to go in and 4 for the second, then onto basket A, there are a further 3 choices for the first fruit, 2 for the second and 1 for the final fruit so you end up with the same answer $5!$ when order matters. – user504775 Feb 27 at 21:39 How many possibilities do you have for the basket $$A$$ ? You have to choose $$3$$ fruits among a total of $$5$$ fruits. By definition, the number of possibilities is $${5 \choose 3}$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517475646369, "lm_q1q2_score": 0.8233490434985096, "lm_q2_score": 0.8418256452674009, "openwebmath_perplexity": 300.09976477649656, "openwebmath_score": 0.7700121402740479, "tags": null, "url": "https://math.stackexchange.com/questions/3129371/permutations-dividing-5-pieces-of-fruit-between-2-baskets/3129382" }
dsp-core Title: regarding visual dsp ++ i've written a source code in visual dp ++ in c language. the platform is sharc processor adsp 21062.after the build is complete. while running the program it is displaying a message Instruction timed out with PC at: 0x20a5a . what may be the error in my c code. can you please resolve? The processor is stalled. For example you are trying to read a peripheral register and there is no data available. This can have many different reasons so without further detail that's impossible to assess. First step would be to look at program memory at address 0x20a5a and see what the processor was trying to do. Take a look at the disassembly window.
{ "domain": "dsp.stackexchange", "id": 1539, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dsp-core", "url": null }
finite-impulse-response, decimation, group-delay Consider a simple case of a moving average filter of 2 samples, and we down sample by selecting every other sample: We can select either the even samples OR the odd samples at the output of the two sample moving average. Within the bandwidth of the decimation, the two waveforms are identical other than the difference in phase associated with the one sample offset (one sample offset at the input sampling rate). Further, prior to down sampling, the delay at the output of the 2 sample moving average will be one half a sample at the input sampling rate: the group delay of any symmetric or antisymmetric filter (in this case with coefficients [1 1]) is $(N-1)/2$ where $N$ is the number of coefficients (here 2). That said, we see in this example, relative to the input sampling rate the delay at the output of the two sample moving average is 0.5 samples. We then select either even or odd samples which will have an 1 sample delay between them (at the input sampling rate).
{ "domain": "dsp.stackexchange", "id": 11901, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "finite-impulse-response, decimation, group-delay", "url": null }
Row-major order $$\scriptsize { \begin{bmatrix}x & y & z\end{bmatrix} * \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} }$$ $$\scriptsize { \begin{array}{l}x' = x * a + y * d * y + z * g\\y' = x * b + y * e * y + z * h\\z' = x * c + y * f * y + z * i\end{array} }$$ Column-major order $$\scriptsize { \begin{bmatrix} a & d & g \\ b & e & h \\ c & f & i \end{bmatrix} * \begin{bmatrix}x\\y\\z\end{bmatrix} }$$ $$\scriptsize { \begin{array}{l}x' = a * x + d * y + g * z\\y' = b * x + e * y + h * z\\z' = c * x + f * y + i * z\end{array} }$$ In conclusion, going from row-major order to column-major order not only involve to swap the point or vector and the matrix in the multiplication but also to transpose the [3x3] matrix, to guarantee that both conventions give the same result (and vice versa).
{ "domain": "scratchapixel.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787846017969, "lm_q1q2_score": 0.80478021135912, "lm_q2_score": 0.8152324826183822, "openwebmath_perplexity": 921.7886747497524, "openwebmath_score": 0.6234551668167114, "tags": null, "url": "http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-4-geometry/conventions-again-row-major-vs-column-major-vector/" }
c++, beginner, boost, trie VertexPtr addEdge(char ch) { VertexPtr targetVertex = std::make_shared<TrieVertex>(); EdgePtr e = std::make_shared<TrieEdge>(targetVertex); fOutEdges[ch] = e; return e->fTarget; }
{ "domain": "codereview.stackexchange", "id": 11232, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, boost, trie", "url": null }
distribution, weighted-data, randomized-algorithms In [10]: normalised_neg = samples_neg / total_neg We see that the result this time includes negative values, as you mentioned: In [11]: normalised_neg Out[11]: array([ 0.13333333, 0.23333333, 0. , 0.13333333, -0.1 , 0. , 0.3 , -0.1 , 0.3 , 0.1 ]) However, this does still satisfy the constraint you originally had, which was that they sum to 1: In [12]: np.sum(normalised_neg) Out[12]: 0.9999999999999999 # this is 1, within rounding errors of floating point values A suggestion would be to first normalise the values in a range of [0, 1] and afterwards, re-weight the values such that their sum is 1.
{ "domain": "datascience.stackexchange", "id": 5737, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "distribution, weighted-data, randomized-algorithms", "url": null }
complexity-theory, graphs Title: Decision problem - vertex with path to all other vertcies Consider the following decision problem: Given a directed graph $G$, is there a vertex $v$ that has path to all other vertcies. I am able to place this problem in NL, similarly to the strongly-connected graph problem. But is this problem NL-complete? Thinking about reduction from $stCON$ problem, but can't get it through. Suppose we are given a directed graph $G$ and two vertices $s,t$. Add a new vertex $a$ and an edge from $a$ to $s$. Also, add an edge from $t$ to all vertices in the graph apart from $a$.
{ "domain": "cs.stackexchange", "id": 14102, "lm_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", "url": null }
sql, sql-server, finance We can move the following into a CROSS APPLY, which I named Calcs. , SUM((ISNULL(Price,0) * Qty)) -- Subtotal , SUM(CAST((ISNULL(SalesTaxRate,0) * ISNULL(Price,0) * Qty) / 100 AS DECIMAL(6,2))) , SUM(CAST((ISNULL(ImportTaxRate,0) * ISNULL(Price,0) * Qty) / 100 AS DECIMAL(6,2)))
{ "domain": "codereview.stackexchange", "id": 14912, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, sql-server, finance", "url": null }
# Thread: Find the absolute maximum and minimum of... 1. ## Find the absolute maximum and minimum of... Find the absolute maximum and minimum of f(x,y)=x^2+xy+y^2-6y on the rectangle {f(x,y) | -3 <= x <=3, 0 <= y <= 5} i find the critical point by taking the derivative of f(x,y), setting it to 0, then finding x and y. fx = 2x+y fy= x+2y-6 y = -2x x + 2(-2x) - 6 = 0 x - 4x = 6 -3x = 6 x = -2 y = -2(-2) y = 4 i'm unsure of what to do next, can someone help? thanks! 2. Now evaluate the Hessian matrix at that point to determine the nature of the stationary point. 3. okay so Hf(-2,4) = [2,1] [1,2] d1 = fxx = 2 d1 = 2 > 0 d2 = (2)(2) - (1)(1) = 3 d2 = 3 > 0 local minimum = (-2,4) did i do this correctly? how do i find the maximum? is local and absolute the same? 4. i think i got it. since local minimum is (-2,4) then f(-2,4) = (-2)^2 + (-2)(4) + (4)^2 - (6)(4) = -12 so Absolute Minimum = -12
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964177527898, "lm_q1q2_score": 0.8434382322190787, "lm_q2_score": 0.8558511396138365, "openwebmath_perplexity": 472.65680789938455, "openwebmath_score": 0.6858922243118286, "tags": null, "url": "http://mathhelpforum.com/calculus/165427-find-absolute-maximum-minimum.html" }
• Key idea $\,E\,$ is closed under subtraction, hence its least positive element divides every element. This ideal/subgroup view is emphasized in proof $(2)$ in this answer, along with $4$ other proofs of Euclid's Lemma. Here $\,E\,$ can be viewed as the denominator ideal of $\,b/p\,$ or the order ideal of $\,b\pmod p.\$ – Bill Dubuque Feb 24 '15 at 0:27 • Fine reference! Actually, the proof I ppresent can be extended to a proof of Gauß's lemma (if $n\mid ab$ and $n$ is coprime with $a$, then $n\mid b$. – Bernard Feb 24 '15 at 0:52 • Yes, that's true for most proofs of Euclid's Lemma. – Bill Dubuque Feb 24 '15 at 0:53 • See also both of my answers here for some conceptual ways to perform such descent-based proofs. – Bill Dubuque Nov 2 '16 at 3:32
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795098861571, "lm_q1q2_score": 0.8114838315265747, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 394.0002927101561, "openwebmath_score": 0.9711299538612366, "tags": null, "url": "https://math.stackexchange.com/questions/1162373/if-p-is-a-prime-and-p-mid-ab-then-p-mid-a-or-p-mid-b?noredirect=1" }
dna, virology, human-genome, retrovirus active viral infection, with proliferating virus particles, without exposure to additional viral contaminants. If it couldn't, then would there be much point (from a virus' perspective) to the storage of viral DNA in the genome which, as you've noted, retroviruses can do?
{ "domain": "biology.stackexchange", "id": 9550, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dna, virology, human-genome, retrovirus", "url": null }
reinforcement-learning, reference-request, proofs, bellman-equations, policy-evaluation Definition ($\gamma$-contraction): An operator on a normed vector space $\mathcal{X}$ is a $\gamma$-contraction, for $0 < \gamma < 1$, provided for all $x, y \in \mathcal{X}$ $$\| F(x) - F(y) \| \leq \gamma \| x - y\|$$ Contraction mapping theorem: For a $\gamma$-contraction $F$ in a complete normed vector space $\mathcal{X}$ Iterative application of $F$ converges to a unique fixed point in $\mathcal{X}$ independently of the starting point at a linear convergence rate determined by $\gamma$
{ "domain": "ai.stackexchange", "id": 1870, "lm_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, reference-request, proofs, bellman-equations, policy-evaluation", "url": null }
c++ } if(count>=2) { std::cout<<"dup char ="<<temp[i]<<" "<<count<<std::endl; count =1; } } } int main() { std::string userInput; std::getline(std::cin,userInput); userInput.erase(std::remove(userInput.begin(), userInput.end(),' '), userInput.end()); std::sort(userInput.begin(),userInput.end()); std::cout<<userInput<<std::endl; if(!userInput.empty()) dupcheck(userInput); } Please help me to improve the code if possible. Copying the string in step 3 is unnecessary You can iterate through the characters of a std::string s using std::string::operator[] and std::string::size(): for (std::string::size_type pos = 0; pos < s.size(); pos++) { char c = s[pos]; // do something with the char now }
{ "domain": "codereview.stackexchange", "id": 28535, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++", "url": null }
mass, newtonian-gravity, acceleration, free-fall Am I right or wrong? What really clinched this for me was considering dropping a small Moon-massed object close to the Earth and dropping a small Earth-massed object close to the Moon. This thought experiment made me realize that falling isn't one object moving toward some fixed frame of reference, and treating the Earth as just another object, "falling" consists of multiple objects mutually attracting in space.
{ "domain": "physics.stackexchange", "id": 48207, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mass, newtonian-gravity, acceleration, free-fall", "url": null }
c, ruby-on-rails }// train index_controller.rb require 'fbai' class IndexController < ApplicationController layout false # I need the AI to survive between calls to the testit function. $ai = Fbai.new
{ "domain": "codereview.stackexchange", "id": 44028, "lm_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, ruby-on-rails", "url": null }
optics, waves, lenses Back to our set-up. The total distance between the two planes $z_2-z_1 = \Delta_0$. Distance travelled through the lens is $\Delta(x,y)$ and the distance travelled through the vacuum is $\Delta_0 - \Delta(x,y)$. $t$ is the factor we need to multiply our light formula with to get the correct phase after the light has travelled through the two planes. In the vacuum $n=1$. $t$-factor due to vacuum part: $e^{i k \cdot 1 \cdot distance} = e^{i k \cdot (\Delta_0 - \Delta(x,y))}$. $t$-factor due to lens part: $e^{i k n \cdot distance} = e^{i k n \cdot \Delta(x,y)}$ Total t-factor is: t = $e^{i k n \cdot \Delta(x,y)} \cdot e^{i k \cdot (\Delta_0 - \Delta(x,y))}$ $$t = e^{i k \Delta_0} e^{i k (n-1) \Delta(x,y)}$$
{ "domain": "physics.stackexchange", "id": 42462, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, waves, lenses", "url": null }
thermodynamics, notation Title: Why do chemistry and physics have different sign convention in thermodynamics? In physics class, we write the first law of thermodynamics as $\mathrm dU =\mathrm dQ - \mathrm dW$ and in the physical chemistry class, we write the same law as $\mathrm dU =\mathrm dQ + \mathrm dW$. The reason being the sign convention is different in both the cases. In physics we take work done by the system as positive and in chemistry work done on the system. I realize that this does not cause any change in the actual law of nature but I just want to know why we have different sign conventions. Wouldn't just one convention make life easier? Is there a historical reason? Or is this is to differentiate between subjects? This is not a simple physics versus chemistry distinction. I taught Physics for 25 years and saw many examples of either usage in multiple textbooks. In fact, at some point in my tenure, the AP Physics committee swapped conventions on the equation sheet for the AP Exam.
{ "domain": "chemistry.stackexchange", "id": 11718, "lm_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, notation", "url": null }
Then the first quartile, written $$Q_1$$, is the median of the lower half data, and the third quartile, written $$Q_3$$, is the median of the upper half data. Note that the first quartile is halfway through the lower half of the data. In other words, it is a value such that one quarter of the data is smaller. Similarly, the third quartile is halfway through the upper half of the data, so it is a value such that three quarters of the data is small. Hence the names “first” and “third quartiles.” We can build a outlier-insensitive measure of spread out of the quartiles. DEFINITION 1.5.6. Given a quantitative dataset, its inter-quartile range or $$IQR$$ is defined by $$IQR=Q_3-Q_1$$.
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984336353126336, "lm_q1q2_score": 0.8115478543921585, "lm_q2_score": 0.8244619350028204, "openwebmath_perplexity": 316.3384305320065, "openwebmath_score": 0.8571988940238953, "tags": null, "url": "https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Book%3A_Lies%2C_Damned_Lies%2C_or_Statistics_-_How_to_Tell_the_Truth_with_Statistics_(Poritz)/01%3A__One-Variable_Statistics_-_Basics/1.5%3A_Numerical_Descriptions_of_Data%2C_II%3A_Measures_of_Spread" }
java, beginner, game, pong private class KAdapter extends KeyAdapter{ public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); if(!inGame && keyCode == KeyEvent.VK_SPACE) { inGame = true; ball.start(); return; } if(inGame) { if(rightPaddle.isKey(keyCode)) { rightPaddle.keyPressed(keyCode); } else if(leftPaddle.isKey(keyCode)) { leftPaddle.keyPressed(keyCode); } } } public void keyReleased(KeyEvent e) { int keyCode = e.getKeyCode(); if(rightPaddle.isKey(keyCode)) { rightPaddle.keyReleased(keyCode); } else if(leftPaddle.isKey(keyCode)) { leftPaddle.keyReleased(keyCode); } } } } Sprite.java: import java.awt.Color; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.image.BufferedImage; public class Sprite {
{ "domain": "codereview.stackexchange", "id": 40950, "lm_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, pong", "url": null }
organic-chemistry, aromatic-compounds Title: Suggest the product from two-substituted benzene ring Which are the possible products from this reaction? The answer in the mark scheme shows that it should be as demonstrated as pic A. However, I think it could be either A. or B. since both substituted groups of the benzene ring, NH2 and Cl, direct the incoming electrophiles to attack the 2,4 and or 6 positions. Do I understand correctly? I have never come across two substituted groups before. Should I consider both NH2 and Cl as substituted groups or only one of them, but which one? Also, how to count the position of carbon on the benzene ring in this case?
{ "domain": "chemistry.stackexchange", "id": 7652, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, aromatic-compounds", "url": null }
acceleration, vacuum Title: Creating vacuum in a glass by acceleration Suppose we have a cylindrical glass at atmospheric pressure. The glass is put in a horizontal position such that the bottom of it (the closed end) is at the right side and the open side is on the left. Is it possible to create vacuum in the glass just by accelerating it to the right fast enough? And if it is, how can one calculate an approximate value for it? You can certainly create a pressure gradient. Depending on the acceleration, that gradient could be as large as you like and could lead to a very low pressure at the front, which might approach a vacuum. The equation is very simple: $$ \Delta P = - \rho g \Delta h $$ So for a $1m$ tube, filled with ambient air ($\rho = 1.2754\ kg/m^3$) and a $1g$ acceleration, you'd get $\Delta P = 12.5 Pa$. Twelve Pascals isn't very much (sea-level air pressure is about 100,000 Pa).
{ "domain": "physics.stackexchange", "id": 19815, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acceleration, vacuum", "url": null }
javascript, promise var imagePaths = ['http://www.mozilla.org/media/img/firefox/favicon.png', 'https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png']; [].forEach.call(imagePaths, function(path) { let myImage = new Image(); let loadThisImagePromise = Promise.defer(); mySubPromises.push(loadThisImagePromise.promise); myImage.onload = function() { loadThisImagePromise.resolve('Succesfully loaded image at path = "' + path + '" the width of this image is = "' + this.naturalWidth + '".'); if (!this.naturalWidth) { loadThisImagePromise.reject('Image loaded but it has 0 width at path = "' + path + '" the naturalWidth was 0'); } } myImage.onerror = function(e) { loadThisImagePromise.reject('An error occured while loading path = "' + path + '". The error = ' + uneval(e)); } myImage.onabort = function(e) { loadThisImagePromise.reject('Image load was aborted loading path = "' + path + '".'); }
{ "domain": "codereview.stackexchange", "id": 8481, "lm_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, promise", "url": null }
neuroscience, neurophysiology, electrophysiology, action-potential Why do spikes start at the axon hillock? The axon hillock is a special part of axon, right at the beginning of the axon. This area is more than just the first section of axon, it also typically has the lowest threshold for initiating an action potential due to a greater density of voltage-gated sodium channels. Sort of by definition, a cell's threshold is going to be the threshold for whatever part of that cell has the lowest threshold (at least near the soma, which is so big compared to axons/dendrites that it is nearly isopotential).
{ "domain": "biology.stackexchange", "id": 7265, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, neurophysiology, electrophysiology, action-potential", "url": null }
computability, turing-machines, logic, decision-problem, incompleteness Turing's machine, when applied to any given finite first-order proof system $\Pi$, will thus be able to prove neither the statement that $\Pi$ is consistent nor its negation. Of course, this is not a proof that the Entscheidungsproblem itself is unsolvable; perhaps there is an altogether different approach that does work. Turing was able to show that, in fact, no (computable) approach works.
{ "domain": "cs.stackexchange", "id": 20279, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computability, turing-machines, logic, decision-problem, incompleteness", "url": null }
organic-chemistry, reaction-mechanism Title: Competition between substitution and elimination (uni- or bimolecular) Whats is/are the main product/s of the following reaction: I think the main product would be the one obtained by $S_N2$, and then the one pair of enantiomers obtained by $E2$. Is $E1$ with subsequent rearrangement possible? For an $\mathrm{E1}$ mechanism, we would need to generate a carbocation. Our halide is attached to a secondary carbon so the generated carbocation would be secondary. A quick check of neighbouring stabilising groups is negative. And as a professor of mine once put it (possible slightly oversimplified but with some general truth in it): Exactly one secondary carbocation exists and that is the prop-2-yl cation. Thus, $\mathrm{E1}$ is not possible since the carbocation will not form in any measurable amounts. For the same reason, $\mathrm{S_N1}$ is not an option. For everything else, let’s consider the molecule’s 3D structure:
{ "domain": "chemistry.stackexchange", "id": 4582, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, reaction-mechanism", "url": null }
observational-astronomy, spectroscopy, sky-survey Title: What is the dimensions of the smallest object detectable by an optical fiber from a specific distance? Optical fibers are well-known to observe astronomical objects, say, galaxies, to generate massive spectroscopic surveys. The galaxies are often very far from the optical fibers of a telescope. However, I'm thinking about the possibility of using optical fibers to observe much smaller objects (compared to galaxies) like satellites in much shorter ranges like from earth to GEO orbit.
{ "domain": "astronomy.stackexchange", "id": 3413, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy, spectroscopy, sky-survey", "url": null }
In MATLAB eigenvalues and eigenvectors of matrices can be calculated by command eig. 1 Solve a semi-linear heat equation 8. Thanks MATLAB Follow question. We should update the nano-tutorial to use the new version of the code (i. (In fact, it gets the right eigenvalue on the first step, but convergence detection is not that fast. The characteristic polynomial of A , denoted P A (x ) for x 2 R , is the degree n polynomial de ned by P A (x ) = det( xI A ): It is straightforward to see that the roots of the characteristic polynomial of a matrix are exactly the. So then the only eigenvalues of A are zero. However, to relate the output eigenvalues to the critical load, one must clarify the following:. Without this section you will not be able to do any of the differential equations work that is in this chapter. View Homework Help - MATLAB 4 from MATH 20F 20F at University of California, San Diego. Matrix Random Input: octave:4> # octave:4> # Another Example using Random Function "rand" to
{ "domain": "umood.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97112909472487, "lm_q1q2_score": 0.800658955819999, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 1050.789163476664, "openwebmath_score": 0.7538413405418396, "tags": null, "url": "http://lzxc.umood.it/eigenvalue-matlab-code.html" }
neutron-star, pulsar R. N. Manchester We mostly can't see "ordinary neutron stars". "neutron stars can only be easily detected in certain instances, such as if they are a pulsar or part of a binary system" - Wikipedia If the pulsar is radiating gamma rays more isotropically (but still varying with phase as in the Manchester charts), then these could be detected.
{ "domain": "astronomy.stackexchange", "id": 4121, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neutron-star, pulsar", "url": null }
python, python-3.x, simulation def never_switch(doors: Doors, selected: int, goats: Doors) -> Door: return selected Again, no extra information to allow them to cheat. And they don't get to break the rules and play incorrectly (asking Monty Hall multiple times to reveal doors) to cheat. How about function to evaluate various strategies: def evaluate(strategies: List[SecondPick], games, **kwargs): for strategy in strategies: prizes = monty_halls(strategy, games, **kwargs) wins = prizes[Prize.CAR] losses = prizes[Prize.GOAT] total = wins + losses print(f"{strategy.__name__}: wins {wins / total * 100:.2f} %") print() Let's see it in action: if __name__ == '__main__': print("Standard game (1 car, 2 goats)") evaluate([always_switch, never_switch], 10_000) print("Alternate game (2 car, 3 goats, 2 reveals)") evaluate([always_switch, never_switch], 10_000, cars=2, goats=3, reveal=2)
{ "domain": "codereview.stackexchange", "id": 38018, "lm_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, simulation", "url": null }
weather-forecasting Now that is only the forecast, based generally on model ensembles and such. It still doesn't include any measure of how *reliable* the forecasts are. The Climate Prediction Center site itself actually has some info towards that aspect of your question... unfortunately the page you happened to come from them had bad verification links. But the main [CPC page][7] (as of now at least) has a [proper link to verification][7], on the left sidebar under Outlooks(Forecast) > Verification. Then we need to trudge through the complexity of how forecasts are scored, particularly areal ones. The CPC verification focuses around a Heidke score. If I understand everything, the basics are: 0 is no skill, 100 is perfect. Or 0 bad, 100 great. Here are those Heidke Skill Scores for the 8-14 day temperature forecast over the past year as of yesterday:
{ "domain": "earthscience.stackexchange", "id": 2399, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "weather-forecasting", "url": null }
homework-and-exercises, newtonian-mechanics, drag, dimensional-analysis Edit Now I have a pretty good understanding of why air resistance is independent of mass, since it's actually quite straight forward. However, something that is not so straight forward, is explaining why air resistance is also independent of acceleration, $a$. How would you convince someone, that this is the case, because I don't see a clear way of doing that? Drag or air resistance doesn't depend on acceleration, only on speed. Because that resistance is a result of particles being in the way that now have to move out of the way. Compare with you running through a crowd of people at prime-time Christmas shopping at the mall. If you run slow, it is semi-tough to get through. If you run fast, it is tougher to get through. How quickly you change from slow to fast speed, isn't relevant - only for how long time you are at each individual speed-level.
{ "domain": "physics.stackexchange", "id": 53965, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, drag, dimensional-analysis", "url": null }
python, pygame, battle-simulation, pokemon @staticmethod def attack(attacker, defender, move, y): type_advantage = Game.type_advantage(defender, move) power = Game.damage_calc(attacker, defender, move, type_advantage) x = y damage = None if defender.current_health - power > 0 and type_advantage > 0: defender.current_health -= power damage = power elif defender.current_health - power <= 0: damage = defender.current_health defender.current_health = 0 x+=35 Game.text_y += 35 if type_advantage == 2 or type_advantage == 4: type_advantage_text = ["It's super effective!", 375, y+35] elif type_advantage == 0.5 or type_advantage == 0.25: type_advantage_text = ["It's not very effective...", 375, y+35] elif type_advantage == 0: type_advantage_text = ["It didn't do anything...", 375, y+35] else: type_advantage_text = "" x -= 35
{ "domain": "codereview.stackexchange", "id": 23211, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, pygame, battle-simulation, pokemon", "url": null }
java File vs. Path You should try to stick with one, or the other, but changing between them is not cool. Your BaseChecker class takes Files as inputs, but internally, it does, in places, convert them to Paths, and then processes the Path values. If you are using Path, then stick with it. Actually, it is not that simple, but you should consider using other features of Path like the Watchable interface it implements.... this would remove the need to poll the state of the config file. Charsets You have: Charset.forName("UTF-8") This is most conveniently replaced with: StandardCharsets.UTF_8
{ "domain": "codereview.stackexchange", "id": 6562, "lm_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", "url": null }
backpropagation, gradient-descent BackPropagation Calculating gradient of loss function by calculus I found many resources for understanding backpropagation. The 2nd method I am referring to is the image below(taken for a specific example, e is the error: difference between target and prediction): Also, the proof was mentioned in this paper:here Moreover, I found this method while reading this blog.(You might have to scroll down to see the code: gradient = X.T.dot(error) / X.shape[0] ) My question is are the two methods of finding gradient of cost function same? It appears different and if yes, which one is more efficient( though one can guess it is backpropagation) Would be grateful for any help. Thanks for being patient(it's my 1st time learning ML). I'm pretty sure they're the same thing. Both backpropagation and gradient descent's essential ideas are to calculate the partial derivative of the cost with respect to each weight, and subtract the partial derivative times the learning rate.
{ "domain": "ai.stackexchange", "id": 1812, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "backpropagation, gradient-descent", "url": null }
neural-networks, machine-learning, image-recognition I want to get some information about which type of image is better for training number in different lighting condition. I wish to use edge image if they don't differ much since i can prepare edge image right now. Theoretically you will have no gain in the error ratio if the system preprocess the images with a linear high-pass filter before to send the image to the NN. Let see a simple 1-dimension case that supports this statement: Assume inputs are "a", "b" and "c". A node at first hidden layer will receive an input to the activation function equal to s=w1*a+w2*b*w3*c+... being w1, w2, w3, ... the weights for this node. Now, assume a simple differential case, where inputs will be ... , b'=b-a, c'=c-b, ... being the input to the hidden node s=w1'a'+w2'b'+w3'c'+...=...+w2'(b-a)+w3'(c-b)+...=...+(w2'-w3')b+...
{ "domain": "ai.stackexchange", "id": 436, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, machine-learning, image-recognition", "url": null }
beginner, algorithm, strings, go Output: "love" "time" "reprehenderit" Go programmers often write reasonably efficient programs. The Go standard library testing package provides a benchmark facility. For example, $ go test maxword_test.go -bench=. -benchmem BenchmarkPeterSO-4 24316906 47.7 ns/op 0 B/op 0 allocs/op BenchmarkMannu-4 557594 2022 ns/op 448 B/op 10 allocs/op maxword_test.go: package main import ( "regexp" "testing" "unicode" ) func maxWordP(s string) string { var word string inWord := false j, k := 0, 0 for i, r := range s { if !unicode.IsLetter(r) { if inWord { k = i if k-j > len(word) { word = s[j:k] } } inWord = false } else if !inWord { inWord = true j = i } } if inWord { k = len(s) if k-j > len(word) { word = s[j:k] } } return word }
{ "domain": "codereview.stackexchange", "id": 34857, "lm_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, algorithm, strings, go", "url": null }
java, minecraft Title: Minecraft resource calculator I'm writing a basic program that calculates the total base resources needed to craft items in Minecraft. It's intended to be modular for support for modded versions of Minecraft (new items or different recipe's). To start, I created an Item class that will function as a base resource. A base resource is something I have determined to be harvestable in Minecraft (such as planks or coal) or something that is easily craftable and does not warrant its own recipe (such as an iron ingot, easily obtained by smelting iron ore). public class Item { String name; int count; boolean isPopulated; boolean isItem; public Item() { this.name = ""; this.count = 1; this.isPopulated = false; this.isItem = true; } public Item(String name) { this.name = name; this.count = 1; this.isPopulated = false; this.isItem = true; }
{ "domain": "codereview.stackexchange", "id": 31593, "lm_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, minecraft", "url": null }
f(b)) in the figure has a slope given by the formula: Note that this is the same as the right side of the equation in the mean value theorem. That’s all the mean value theorem says. Discuss this mean value theorem rhyme with the community: 0 Comments. US English. Viewed 379 times 1. Practice using the mean value theorem. Meaning of mean value theorem. So, at some point, your speedometer slides past 50 mph, and for at least one instant, you’re going exactly 50 mph. Cauchy's Mean Value Theorem Suppose that the functions and are continuous on and differentiable on, and for all in. The algorithm is based upon a multiple energy group analysis of the straight ahead Boltzmann equation utilizing a mean value theorem for integrals. Recall that the MEAN VALUE THEOREM states: If f is a function that is both CONTINUOUS over the closed interval [a,b] and DIFFERENTIABLE over the open interval (a, b), then THERE EXISTS a value "c" in the open interval (a, b) for which the instantaneous rate of change
{ "domain": "truongphatsafety.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561667674653, "lm_q1q2_score": 0.8273186311757473, "lm_q2_score": 0.853912747375134, "openwebmath_perplexity": 419.0139443976686, "openwebmath_score": 0.7743996977806091, "tags": null, "url": "http://truongphatsafety.com/chromatics-music-cnh/language-mean-value-theorem-0d3ae5" }
c#, console, calculator, community-challenge, math-expression-eval private static Operators getNextOperator() { const string OperatorSet = "+-*/%"; char token = (char)dataStream.Read(); if (OperatorSet.IndexOf(token) == -1) { throw new InvalidDataException("Invalid or missing operator."); } return (Operators)OperatorSet.IndexOf(token); } private static double getNextNum() { string value = string.Empty; while (true) { if ("0123456789.".IndexOf((char)dataStream.Peek()) == -1) { break; } value += (char)dataStream.Read(); } double d; if (double.TryParse(value, out d)) { return d; } Console.WriteLine(value); throw new InvalidDataException("Expected a number."); } private static double NumbersAndParens() { bool valueIsNegative = false; double val = -1; // trick the compiler
{ "domain": "codereview.stackexchange", "id": 13235, "lm_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#, console, calculator, community-challenge, math-expression-eval", "url": null }
javascript, validation Title: Null checks in user validation I would like to know an alternative, more elegant way to write the following method. I am especially not enthusiastic of the nested if statement. hasUserSavedCredentials: function () { var userName = Storage.get(CONFIG.app.storageUserName), password = Storage.get(CONFIG.app.storagePassword), result = false; if (userName !== null && password !== null) { if (userName.length > 0 && password.length > 0) { result = true; // save in state for faster retrivial State.xx.isSaved = result; State.xx.userName = userName; State.xx.password = password; } else { result = false; State.xx.isSaved = false; } } return result; }, You can remove result = false;, as result is already false.
{ "domain": "codereview.stackexchange", "id": 9625, "lm_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, validation", "url": null }
quantum-mechanics, wavefunction, schroedinger-equation, hydrogen Title: Expectation Value Involving $s$-Wave Solutions to Central Potential I previously posted a question regarding the expectation value described below, but it was closed because the question was not developed enough. Since I was given the option to delete it, I deleted it; however, now I think I have developed some additional ideas and observations and therefore I am posting this related question. Consider a central potential $V(r)$. When I computed the following expectation value for an $s$-wave solution to the Schrodinger equation for the hydrogen atom, i.e. a solution of the form $\psi = \phi(r) Y_{00} = \frac{1}{\sqrt{4\pi}} \phi(r)$, I noticed the following: $$ \langle \psi | \frac{dV}{dr} |\psi \rangle \propto |\phi(0)|^2 $$ Basically, I plugged in several hydrogen radial functions $R_{n,\ell}(r)$ found in Griffiths Quantum Mechanics and noticed this behavior.
{ "domain": "physics.stackexchange", "id": 99881, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, wavefunction, schroedinger-equation, hydrogen", "url": null }
thermodynamics, astrophysics, entropy, dark-matter, virial-theorem But it's true that dark matter doesn't seem to have collapsed into very dense structures -- that is, things like stars and planets. Dark matter does cluster, collapsing gravitationally into clumps, but those clumps are much larger and more diffuse than the clumps of ordinary matter we're so familiar with. Why not? The answer seems to be that dark matter has few ways to dissipate energy. Imagine that you have a diffuse cloud of stuff that starts to collapse under its own weight. If there's no way for it to dissipate its energy, it can't form a stable, dense structure. All the particles will fall in towards the center, but then they'll have so much kinetic energy that they'll pop right back out again. In order to collapse to a dense structure, things need the ability to "cool." Ordinary atomic matter has various ways of dissipating energy and cooling, such as emitting radiation, which allow it to collapse and
{ "domain": "physics.stackexchange", "id": 17225, "lm_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, astrophysics, entropy, dark-matter, virial-theorem", "url": null }
python, object-oriented, tkinter def create_widgets(self): # Define widgets self.lower_checkbtn = ttk.Checkbutton(self, variable=self.lower) self.lower_label = ttk.Label(self, text="string.ascii_lower") self.upper_checkbtn = ttk.Checkbutton(self, variable=self.upper) self.upper_label = ttk.Label(self, text="string.ascii_upper") self.digits_checkbtn = ttk.Checkbutton(self, variable=self.digits) self.digits_label = ttk.Label(self, text="string.digits") self.punct_checkbtn = ttk.Checkbutton(self, variable=self.punct) self.punct_label = ttk.Label(self, text="string.punctuation") self.length_spinbox = ttk.Spinbox(self, from_=1, to=128, width=3, textvariable=self.length) self.length_label = ttk.Label(self, text="Password length") self.separator = ttk.Separator(self, orient=VERTICAL) self.generate_btn = ttk.Button(self, text="Generate password",
{ "domain": "codereview.stackexchange", "id": 41952, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, object-oriented, tkinter", "url": null }
gpt, automatic-summarization index = GPTTreeIndex(documents) response = index.query("<summarization_query>", mode="summarize") The “default” mode for a tree-based query is traversing from the top of the graph down to leaf nodes. For summarization purposes we will want to use mode="summarize". A summarization query could look like one of the following: “What is a summary of this collection of text?” “Give me a summary of person X’s experience with the company.” The documentation includes a notebook with complete examples: https://github.com/jerryjliu/gpt_index/blob/main/examples/paul_graham_essay/TestEssay.ipynb Another Python library: https://github.com/hwchase17/langchain (MIT license). From the documentation: from langchain.chains.summarize import load_summarize_chain chain = load_summarize_chain(llm, chain_type="map_reduce") chain.run(docs)
{ "domain": "datascience.stackexchange", "id": 11434, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gpt, automatic-summarization", "url": null }
discrete-signals, audio Why single tones and resonators? Because they are very easy and fast to decode. Alternatives? Record a Pseudorandom generator signal at step 4 and use cross correlation for step 5. Cross correlation though will be much slower because it would have to run repeatedly in a "sliding window" fashion (please see http://en.wikipedia.org/wiki/Overlap%E2%80%93add_method). An alternative for step 5 could be multimon (please see http://manpages.ubuntu.com/manpages/gutsy/man1/multimon.1.html ), but that would not give you the offset. These are all approximate solutions though, they will not give you a dead accurate point in time that your "event" occurs, only a rough approximation (which also depends from the length of your recording). Hope this helps.
{ "domain": "dsp.stackexchange", "id": 2534, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, audio", "url": null }
python, python-3.x, web-scraping, selenium titles = wait.until(all_present((By.CSS_SELECTOR, ".title"))) for title in titles: print(title.text) finally: driver.quit() We can further improve on following the DRY principle and extract the common wait.until(is_visible(...)) part into a separate function.
{ "domain": "codereview.stackexchange", "id": 27034, "lm_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, web-scraping, selenium", "url": null }
electricity, voltage, antimatter Can positrons serve as charge carriers in electric circuits? Theoretically, yes, if you replaced every matter particle in an electric circuit with a corresponding anti-matter particle, the circuit would work the same way (except the flow of electric charge would be in the opposite direction). However in practice this is impossible. Realistically, it's only possible to create a small amount of positrons with current technology, and if you injected these into an electric circuit the positrons would immediately collide with ordinary electrons and annihilate. How are heat and light generated as electrons move through a filament?
{ "domain": "physics.stackexchange", "id": 80966, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, voltage, antimatter", "url": null }
ros Title: python tutorials for robot setup tf and sensors Hi, Very new to ROS.....please excuse core server navigation visualisation etc maverick 2.6.35-28-generic ros-cturtle-core (synaptics version) 1.0.0-s1302849017~maverick robot node ubuntu-10-04 architecture armel ( beagle board xM ) ros cturtle compiled on board from svn Outline Was planning to implement ROS via python to control.read data from personal arduino robot. My arduino is working well so I do n't really want to start integrating other's libraries into it at the moment. Progress Working through the tutorials and most work, transform listener/broadcaster mostly work, but the introductions to time fail. Now trying to work through the c/cpp tutorials for robot setup and laser sensor. http://www.ros.org/wiki/navigation/Tutorials/RobotSetup http://www.ros.org/wiki/navigation/Tutorials Issue
{ "domain": "robotics.stackexchange", "id": 5427, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
nlp, books, corpus Title: Of all the books ever published in English, what percentage are available for NLP training? I notice a lot of NLP models are trained on news articles and Wikipedia content and some books. I wonder if NLP models would be better if they were trained on more books. I assume we don't have datasets/corpus of all books published in English for example. Is this true? Does anyone have any idea what percentage of books published in English are available as NLP training data? Things are much more complex than this in reality. Obviously Wikipedia and a few other datasets are used mostly because they are quite large and easily available and free. But there is a huge variety of corpora in various languages and for various tasks. There are several semi-commercial sites, for example the Linguistic Data Consortium or ELDA. So as mentioned earlier, of course there is no such dataset of all books in the English language:
{ "domain": "datascience.stackexchange", "id": 11323, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nlp, books, corpus", "url": null }
botany, flowers, pollination https://www.researchgate.net/publication/268523373_Stimulation_of_flower_nectar_replenishment_by_removal_A_survey_of_eleven_animal-pollinated_plant_species
{ "domain": "biology.stackexchange", "id": 9485, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "botany, flowers, pollination", "url": null }
ros, topic-tools, transform If transform isn't the right tool to use, is there something else I should be using? Or perhaps it's just better to write my own node after all?
{ "domain": "robotics.stackexchange", "id": 27923, "lm_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, topic-tools, transform", "url": null }
java, object-oriented, state-machine In a 2D array, how would I count the neighbors? Well, that'd be a bother. I'd have to do math with X/Y. In a mesh network, how would I count the neighbors? Easy, use a for loop. In a 1D array, how would I count the neighbors? Wat. That's some evil math right there. It seems there's two choices. Here I have to say that I'm biased. My original own assignment only used N W E S neighbors. I was able to make the argument that if we ever needed diagonal movement, it would be a pain to add in a 2D array. It would be easy to add in a mesh network. So I opted for the mesh network. This is where you use experience to make a choice. Possibly even implement both in a proof of concept, and see the pros and cons, and pick the one you like. How do we simulate the timestep? Again, multiple options.
{ "domain": "codereview.stackexchange", "id": 10373, "lm_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, state-machine", "url": null }
electromagnetism, induction Title: Understanding the basics of electromagnetic induction Suppose two rings are kept facing each other and that one ring have some current which increases constantly. Will the other ring be attracted or repelled? Does this also depend on how they are kept? Since the current increases uniformly the flux would increase uniformly. As per Faraday's and Lenz's law the induced currents tend to oppose the change in flux. So currents would be induced in the opposite direction causing the two rings to repel.
{ "domain": "physics.stackexchange", "id": 8962, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, induction", "url": null }
python Is pretty good except, randrange is a little more specialized for this: code = [random.randrange(10) for _ in range(length)] (Also, when you disregard a variable the convention is to use _, not i.) __str__ Since you rap everything in a game object, maybe you should give it a string representation overloading the __str__ function, and just print out the string representation of itself. Move print_game_state to __str__.
{ "domain": "codereview.stackexchange", "id": 44930, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
light This therefore being 20’’,2, AC will be to AB that is the Velocity of Light to the Velocity of the Eye (which in this Case may be supposed the same as the Velocity of the Earth's annual Motion in its Orbit) as 10210 to One from whence it would follow that Light moves or is propagated as far as from the Sun to the Earth in 8’ 12’’. (source) The calculation to get to the ratio of 10210 is, size of a radian (206265’’) / angle of aberration (20’’,2) This ratio also holds for the speed of light to the speed of the earth. Not sure though exactly how britannica and wikipedia arrive at their respective values.
{ "domain": "astronomy.stackexchange", "id": 1286, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "light", "url": null }
mechanical-engineering Title: Rotary Motion to 180 Degrees Reciprocating Mechanism Are there any established solutions for truning a gear (or wheel) half-circle in one direction, back in the opposite direction, and repeating? Mechanism must be driven by a motor and continuous rotary motion. Compact and simple mechanisms preferred. Below are two possible solutions I dreamed up. Which one is better and why? Or what should I do instead? One idea I had was to use a motorized disk (orange) with a slotted shaft(yellow) to create reciprocating motion. Then by extending the shaft and connecting it to a second disk (Red) I could achieve it, I think. Another Idea I had was to use a full-square Scotch Yoke (Yellow) with gear teeth on the bottom. Properly sizing the connecting gear would allow for 180 degrees reciprocating motion. Selection of a mechanism highly depends on the end application. Here are some ways to evaluate a mechanism vs your application:
{ "domain": "engineering.stackexchange", "id": 542, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering", "url": null }
catkin-make Built target speed_profile_generate_messages_py [ 68%] Built target gridmapping_msgs_generate_messages [ 68%] Built target tictoc_profiler [ 68%] [ 68%] Built target tictoc_profiler_generate_messages Built target ca_nav_msgs_generate_messages [ 68%] Built target shapes_generate_messages [ 68%] [ 68%] Built target speed_profile_generate_messages Built target tictoc_profiler_example [ 68%] Built target ca_nav_msgs_trajectory_converter [ 68%] Built target ca_nav_msgs_trajectory_converter_example [ 68%] Built target distancemap2 [ 72%] Built target shapes [ 73%] Built target distancemap2_3d_obst_test [ 73%] Built target shapes_cgal_complement [ 73%] Built target distancemap2_subscribe_to_grid [ 73%] Built target shapes_bbox_shape_example [ 74%] Built target shapes_cgal_connect_holes [ 74%] Built target shapes_cgal_difference [ 74%] Built target shapes_cgal_multiple_holes [ 74%] Built target shapes_cgal_nested_triangulation [ 74%] [ 75%] Built target shapes_cgal_polygon_join_intersect
{ "domain": "robotics.stackexchange", "id": 26246, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin-make", "url": null }
python, number-guessing-game, basic-lang should be d, e, f = (get_input(axis) for axis in "YXZ") because you don't need to keep that list in memory. Format strings print(str(D) + str(E) + str(F)) becomes print(f'{d}{e}{f}') Stack abuse You call game, which calls end, which calls game... Don't do this. Just loop.
{ "domain": "codereview.stackexchange", "id": 35850, "lm_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, number-guessing-game, basic-lang", "url": null }
ros, ros2 ardent is quite old, but I was thinking of the versions I've worked on, eloquent (18.04) and foxy (20.04); looking at the ROS Docker repo ardent is the only one offered for 16.04. Use multiple terminals / sessions. You can certainly have multiple versions of ROS running but you should make sure to only source the one required in each terminal before running a launch / run command.
{ "domain": "robotics.stackexchange", "id": 35179, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2", "url": null }
so from the first assertion we can prove directly that (without induction) that $F_2=1,F_3=2,F_4=3,\cdots$, and from the second assertion we can prove directly that $\forall n \in \mathbb{N}\ \ \ F_{n+3}=F_{n+1}+2F_{n}$ and $$(3)\ \ \ \ \ \ \forall n\in \mathbb{N}\ \ \ \ F_{n+20}\equiv F_n \mod 20$$ If we want to be more precise, we will say that we can prove without induction that "every sequence $(F_n)_{n\in \mathbb{N}}$ verifying $(2)$ must verify also $(3)$", and more formally: $$\forall (F_n)\in \mathbb{N}^{\mathbb{N}} \ \ \ \ \big(\left(\forall n \in \mathbb{N} F_{n+2}=F_{n+1}+F_n\right)\implies\left(\forall n\in \mathbb{N} F_{n+20}\equiv F_n \mod 20\right)\big)$$ (and here we don't now if $F_n$ is defined uniquely to prove it we must use induction)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226334351969, "lm_q1q2_score": 0.8417423353935076, "lm_q2_score": 0.8615382147637196, "openwebmath_perplexity": 327.63171772041284, "openwebmath_score": 0.9709072113037109, "tags": null, "url": "https://math.stackexchange.com/questions/1358310/how-to-prove-that-the-fibonacci-sequence-is-periodic-mod-5-without-using-inducti/1358352" }
classical-mechanics, angular-momentum, momentum, conservation-laws How would you calculate the velocity vectors and angular velocity for the slab and the puck post-collision? Assume the puck and slab are made of the same uniform-density material and the puck has radius r and the slab side lengths a and b. I think that you have missed the idea that a body moving with a linear velocity can have angular momentum. Consider a mass $v$ with velocity $v$ hitting a stationary slab $M$, with centre of mass at $C$, elastically as shown in the left-hand diagram.
{ "domain": "physics.stackexchange", "id": 96234, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, angular-momentum, momentum, conservation-laws", "url": null }
ros, rviz, pcl, markerarray marker_array_msg.markers[i].pose.orientation.w = 1.0; marker_array_msg.markers[i].scale.x = 1; marker_array_msg.markers[i].scale.y = 0.1; marker_array_msg.markers[i].scale.z = 0.1; marker_array_msg.markers[i].color.a = 1.0; marker_array_msg.markers[i].color.r = 0.0; if (i == 0) { marker_array_msg.markers[i].color.g = 0.1; } else { marker_array_msg.markers[i].color.g = i * 0.15; } marker_array_msg.markers[i].color.b = 0.0;
{ "domain": "robotics.stackexchange", "id": 14940, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, rviz, pcl, markerarray", "url": null }